super-agent-sdk 1.0.24 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +44 -44
- package/dist/{mammoth.browser-_e1UoKEX.js → mammoth.browser-DFNnVkev.js} +1 -1
- package/dist/{mammoth.browser-CKp13R4W.cjs → mammoth.browser-DrqsE041.cjs} +1 -1
- package/dist/nosUploader-BD9gHyMF.cjs +13 -0
- package/dist/{nosUploader-2VXYPLap.js → nosUploader-vxkhX3-O.js} +448 -440
- package/dist/widget.cjs +68 -63
- package/dist/widget.d.ts +1 -1
- package/dist/widget.mjs +6743 -6736
- package/package.json +1 -1
- package/dist/nosUploader-Dk2GyRpT.cjs +0 -13
package/dist/widget.cjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";var B0=Object.defineProperty;var H0=(e,t,n)=>t in e?B0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ee=(e,t,n)=>H0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),pm=require("react-dom/client"),S=require("react/jsx-runtime"),zn=require("./nosUploader-Dk2GyRpT.cjs"),po=require("react-dom");function V0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=V0(b);function mm(e){const{sdk:t,sessionId:n,onSessionCreated:r,onRoundStart:o,onStreamStart:i,onStreamEnd:a,onError:s,onMessageSend:l}=e,[c,u]=b.useState([]),[d,f]=b.useState("ready"),[p,h]=b.useState(null),m=b.useRef(new Map),w=b.useRef(new Map),y=b.useRef(n),$=b.useRef(!0),x=b.useRef(c);y.current=n,$.current=c.length===0,x.current=c;const E=b.useCallback((A,z)=>{if(A===y.current)u(D=>{const L=w.current.get(A)??D,j=z(L);return w.current.set(A,j),j});else{const D=w.current.get(A)??[];w.current.set(A,z(D))}},[]),v=b.useCallback((A,z)=>{const D=m.current.get(A);D!=null&&D.stopTimer&&(clearTimeout(D.stopTimer),D.stopTimer=null),m.current.delete(A),w.current.delete(A),A===y.current&&f(z)},[]);b.useEffect(()=>{const A=n?m.current.get(n):void 0;f(A!=null&&A.busy?"streaming":"ready")},[n]);const C=b.useRef(()=>{}),I=b.useCallback((A,z,D)=>{var J;const L=y.current;if(L&&((J=m.current.get(L))!=null&&J.busy))return;if(L){const F=W0(x.current);if(F){l==null||l(A),C.current(F,{action:"submit",value:A});return}}l==null||l(A);const j=D??A,V={id:`user_${Date.now()}`,role:"user",parts:[...(z??[]).map(F=>({type:"attachment",attachment:F})),{type:"text",content:j}],timestamp:Date.now(),rawContent:D!=null&&D!==A?A:void 0},q=`assistant_${Date.now()}`,P={id:q,role:"assistant",parts:[],timestamp:Date.now()},Q=$.current,X=x.current;u(F=>[...F,V,P]),L&&w.current.set(L,[...X,V,P]),f("submitted"),h(null);const T=F=>{let G="",re=0,_="",H=[],te=!1,oe,B=null;w.current.has(F)||w.current.set(F,[...X,V,P]);const ie={abortController:null,busy:!0,stopTimer:null};m.current.set(F,ie);const ae=()=>{G&&(H.push({type:"thinking",content:G,durationMs:Date.now()-re}),G="",re=0)},Se=()=>{_&&(H.push({type:"text",content:_}),_="")},ye=()=>{const U=[...H];G&&U.push({type:"thinking",content:G,durationMs:Date.now()-re}),_&&U.push({type:"text",content:_}),E(F,me=>me.map(he=>he.id===q?{...he,parts:U,...oe?{roundId:oe}:{}}:he))};ie.abortController=t.chat({sessionId:F,message:A,attachments:z&&z.length>0?z:void 0,stream:!0,onMessage:U=>{switch(te||(te=!0,F===y.current&&f("streaming")),U.type){case"session.start":U.roundId&&(oe=U.roundId,o==null||o(U.roundId));break;case"user":U.content&&(B=U.content,E(F,me=>me.map(he=>he.id===V.id?{...he,parts:he.parts.map(se=>se.type==="text"?{...se,content:U.content}:se)}:he)));break;case"thinking":Se(),G||(re=Date.now()),G+=U.content;break;case"ai":ae(),_+=U.content;break;case"tool_call":ae(),Se(),H.push({type:"tool_call",toolName:U.toolName,toolCallId:U.toolCallId,args:U.args??"{}"});break;case"tool_result":ae(),Se(),H.push({type:"tool_result",toolName:U.toolName??"",toolCallId:U.toolCallId,content:U.content,artifacts:U.artifacts,renderMode:U.renderMode,html:U.html,markdown:U.markdown,defaultExpanded:U.defaultExpanded});break;case"interrupt":ae(),Se(),U.interrupt&&H.push({type:"interrupt",interrupt:U.interrupt,resolved:!1}),ye(),v(F,"ready");return;case"stop":U.content&&(_=U.content),ye();return}ye()},onDone:U=>{if((_||H.length>0||G)&&ye(),U.artifacts&&U.artifacts.length>0){const he=U.artifacts;E(F,se=>se.map(ue=>ue.id===q?{...ue,artifacts:he}:ue))}if(U.messageId){const he=U.messageId;E(F,se=>se.map(ue=>ue.id===q?{...ue,messageId:he}:ue))}const me=()=>{v(F,"ready"),a==null||a(U.sessionId||F)};if(Q){const he=(B??j).slice(0,30),se=U.sessionId||F;t.renameConversation(se,he).catch(()=>{}).finally(me)}else me()},onError:U=>{H.push({type:"error",content:U.message}),ye(),F===y.current&&(h(U),f("error")),s==null||s(U),v(F,"error")}}),i==null||i(F)};L?T(L):t.createSession().then(F=>{y.current==null&&(y.current=F,r==null||r(F)),T(F)}).catch(F=>{y.current==null&&(h(F instanceof Error?F:new Error(String(F))),f("error")),s==null||s(F instanceof Error?F:new Error(String(F)))})},[t,r,i,a,s,l,E,v]),N=b.useCallback(()=>{const A=y.current;if(!A)return;const z=m.current.get(A);z!=null&&z.busy&&(z.stopTimer&&clearTimeout(z.stopTimer),z.stopTimer=setTimeout(()=>{var D;z.stopTimer=null,(D=z.abortController)==null||D.abort(),v(A,"ready")},8e3),t.stopGeneration(A).catch(()=>{}))},[t,v]),M=b.useCallback(()=>{var j;const A=y.current;if(A&&((j=m.current.get(A))!=null&&j.busy))return;const z=c.findLastIndex(V=>V.role==="user");if(z<0)return;const D=c[z].rawContent??c[z].parts.filter(V=>V.type==="text").map(V=>V.content).join(""),L=c[z].parts.filter(V=>V.type==="attachment").map(V=>V.attachment);u(V=>V.slice(0,z)),I(D,L.length>0?L:void 0)},[c,I]),k=b.useCallback((A,z)=>{var re;const D=y.current;if(!D||(re=m.current.get(D))!=null&&re.busy)return;E(D,_=>_.map(H=>({...H,parts:H.parts.map(te=>te.type==="interrupt"&&te.interrupt.interruptId===A?{...te,resolved:!0,response:z}:te)})));const L={abortController:null,busy:!0,stopTimer:null};m.current.set(D,L);const j=new AbortController;L.abortController=j;let V=0;E(D,_=>_.length>0&&_[_.length-1].role==="assistant"?(V=_[_.length-1].parts.length,_):(V=0,[..._,{id:`assistant_${Date.now()}`,role:"assistant",parts:[],timestamp:Date.now()}])),f("streaming");let q="",P=0,Q="",X=[],T;const J=()=>{q&&(X.push({type:"thinking",content:q,durationMs:Date.now()-P}),q="",P=0)},F=()=>{Q&&(X.push({type:"text",content:Q}),Q="")},G=()=>{const _=[...X];q&&_.push({type:"thinking",content:q,durationMs:Date.now()-P}),Q&&_.push({type:"text",content:Q}),E(D,H=>{const te=H.findLastIndex(oe=>oe.role==="assistant");return te<0?H:H.map((oe,B)=>B===te?{...oe,parts:[...oe.parts.slice(0,V),..._],...T?{roundId:T}:{}}:oe)})};t.respondInterrupt(A,D,z,_=>{let H=!1;switch(_.type){case"session.start":_.roundId&&(T=_.roundId);break;case"thinking":F(),q||(P=Date.now()),q+=_.content;break;case"ai":J(),Q+=_.content;break;case"tool_call":J(),F(),X.push({type:"tool_call",toolName:_.toolName,toolCallId:_.toolCallId,args:_.args??"{}"});break;case"tool_result":J(),F(),X.push({type:"tool_result",toolName:_.toolName??"",toolCallId:_.toolCallId,content:_.content,artifacts:_.artifacts,renderMode:_.renderMode,html:_.html,markdown:_.markdown,defaultExpanded:_.defaultExpanded});break;case"interrupt":J(),F(),_.interrupt&&X.push({type:"interrupt",interrupt:_.interrupt,resolved:!1}),H=!0;break;case"stop":_.content&&(Q=_.content),a==null||a(D),H=!0;break;case"done":{const te=_.artifacts&&_.artifacts.length>0?_.artifacts:void 0;(_.messageId||te)&&E(D,oe=>{const B=oe.findLastIndex(ie=>ie.role==="assistant");return B<0?oe:oe.map((ie,ae)=>ae===B?{...ie,..._.messageId?{messageId:_.messageId}:{},...te?{artifacts:te}:{}}:ie)}),a==null||a(D),H=!0;break}}G(),H&&v(D,"ready")},_=>{X.push({type:"error",content:_.message}),G(),D===y.current&&(h(_),f("error")),s==null||s(_),v(D,"error")},j.signal).catch(_=>{if((_==null?void 0:_.name)==="AbortError"){v(D,"ready");return}D===y.current&&(h(_ instanceof Error?_:new Error(String(_))),f("error")),s==null||s(_ instanceof Error?_:new Error(String(_))),v(D,"error")})},[t,s,a,E,v]);C.current=k;const R=b.useCallback((A,z)=>{y.current=A;const D=z??w.current.get(A)??[];w.current.set(A,D),u(D)},[]),O=b.useCallback(A=>m.current.has(A)?w.current.get(A)??null:null,[]);return b.useEffect(()=>{var z;if(!n||d!=="ready"||(z=m.current.get(n))!=null&&z.busy)return;const A=zn.popPendingChat();A&&A.sessionId===n&&I(A.message)},[n,d]),{messages:c,status:d,error:p,sendMessage:I,stop:N,regenerate:M,setMessages:u,showSession:R,getLiveMessages:O,respondToInterrupt:k}}function W0(e){for(let t=e.length-1;t>=0;t--)for(let n=e[t].parts.length-1;n>=0;n--){const r=e[t].parts[n];if(r.type==="interrupt"&&!r.resolved&&r.interrupt.interruptId)return r.interrupt.interruptId}return null}const gm="sa_active_conversation",ws=20;function xd(e){try{return localStorage.getItem(`${gm}_${e}`)}catch{return null}}function q0(e,t){try{const n=`${gm}_${e}`;t?localStorage.setItem(n,t):localStorage.removeItem(n)}catch{}}function hm(e){const{sdk:t,onConversationChange:n}=e,r=t.botCode,[o,i]=b.useState([]),[a,s]=b.useState(()=>xd(r)),[l,c]=b.useState(!1),[u,d]=b.useState(!0),f=b.useRef(!0),p=b.useRef(1),h=b.useRef(!1);b.useEffect(()=>()=>{f.current=!1},[]);const m=b.useCallback(I=>{s(I),q0(r,I),I&&(n==null||n(I))},[r,n]),w=b.useCallback(async()=>{if(!h.current){h.current=!0,c(!0);try{p.current=1;const I=await t.listConversations({page:1,size:ws});if(!f.current)return;i(I.items),d(I.items.length<I.total);const N=xd(r);N&&!I.items.find(M=>M.sessionId===N)&&m(null)}catch{}finally{h.current=!1,f.current&&c(!1)}}},[t,m]),y=b.useCallback(async()=>{if(!(h.current||!u)){h.current=!0,c(!0);try{const I=p.current+1,N=await t.listConversations({page:I,size:ws});if(!f.current)return;p.current=I,i(k=>{const R=new Set(k.map(A=>A.sessionId)),O=N.items.filter(A=>!R.has(A.sessionId));return[...k,...O]});const M=p.current*ws;d(M<N.total)}catch{}finally{h.current=!1,f.current&&c(!1)}}},[t,u]),$=b.useCallback(async(I,N)=>(m(I),(N==null?void 0:N.fetchHistory)===!1?[]:await t.getMessages(I)),[t,m]),x=b.useCallback(async()=>{try{const I=await t.createSession(),N=new Date().toISOString();i(M=>[{sessionId:I,title:"新对话",createTime:N,updateTime:N},...M]),m(I)}catch{m(null)}},[t,m]),E=b.useCallback(async I=>{i(N=>N.filter(M=>M.sessionId!==I)),a===I&&m(null);try{await t.deleteConversation(I)}catch{}},[t,a,m]),v=b.useCallback(async(I,N)=>{await t.renameConversation(I,N),i(M=>M.map(k=>k.sessionId===I?{...k,title:N}:k))},[t]),{enabled:C=!0}=e;return b.useEffect(()=>{C&&w()},[C,w]),{conversations:o,activeConversationId:a,loading:l,hasMore:u,loadConversations:w,loadMore:y,switchConversation:$,newConversation:x,deleteConversation:E,renameConversation:v,setActiveConversationId:m}}function bm(e){return!e&&e!==0?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function xm(e){return e==="pdf"?"PDF":e==="docx"?"DOC":e==="html"?"HTM":e==="md"?"MD":e.slice(0,3).toUpperCase()||"FILE"}function X0(e,t){var o;const n=(e||"").toLowerCase();if(n.includes("html"))return"html";if(n.includes("markdown"))return"md";if(n.includes("pdf"))return"pdf";if(n.includes("wordprocessingml")||n==="application/msword")return"docx";const r=((o=(t||"").split(".").pop())==null?void 0:o.toLowerCase())??"";return r==="htm"||r==="html"?"html":r==="md"||r==="markdown"?"md":r==="pdf"?"pdf":r==="doc"||r==="docx"?"docx":r}function ym(e){if(!e)return[];const t=[];for(const n of e)if(n.type==="file"&&n.data){const r=n.data.name??n.data.filename??"",o=n.data.mime??n.data.mime_type??n.data.mimeType;t.push({id:n.data.id??"",type:n.data.fileType??n.data.type??X0(o,r),filename:r,url:n.data.url??"",mime:o,size:n.data.size,summary:n.data.summary})}return t}async function fa(e){try{const t=await fetch(e.url);if(!t.ok)throw new Error(`HTTP ${t.status}`);const n=await t.blob(),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=e.filename,document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(r),4e3)}catch{const t=document.createElement("a");t.href=e.url,t.download=e.filename,t.target="_blank",document.body.appendChild(t),t.click(),t.remove()}}const U0=632,G0=640,wm=b.createContext(null);function Fn(){const e=b.useContext(wm);if(!e)throw new Error("useChatContext must be used within ChatProvider");return e}function dl({sdk:e,hooks:t,attachmentUploader:n,nosUpload:r,mode:o="floating",children:i}){const[a,s]=b.useState(!1),[l,c]=b.useState(!1),[u,d]=b.useState(null),[f,p]=b.useState(null),[h,m]=b.useState(!1),[w,y]=b.useState(!1),[$,x]=b.useState(null),[E,v]=b.useState(0),[C,I]=b.useState("split"),[N,M]=b.useState(!1),k=b.useCallback(H=>x(H),[]);b.useLayoutEffect(()=>{if(!$){v(0);return}const H=()=>{const oe=$.getBoundingClientRect().width;if(v(B=>B===oe?B:oe),o!=="fullpage"){I(B=>B==="cover"?B:"cover");return}I(B=>B==="cover"&&oe>=G0?"split":B==="split"&&oe<U0?"cover":B)};if(H(),typeof ResizeObserver>"u")return;const te=new ResizeObserver(H);return te.observe($),()=>te.disconnect()},[$,o]),b.useEffect(()=>{l||M(!1)},[l]),b.useEffect(()=>{e.getToken().then(()=>{m(!0)}).catch(()=>{m(!0)})},[e]);const R=hm({sdk:e,onConversationChange:t==null?void 0:t.onConversationChange,enabled:h}),O=mm({sdk:e,sessionId:R.activeConversationId,onSessionCreated:H=>{R.setActiveConversationId(H)},onStreamStart:t==null?void 0:t.onStreamStart,onStreamEnd:H=>{var te;(te=t==null?void 0:t.onStreamEnd)==null||te.call(t,H),R.loadConversations()},onError:t==null?void 0:t.onError,onMessageSend:t==null?void 0:t.onMessageSend}),A=b.useCallback(H=>{if(H.type==="link"){window.open(H.url,H.target??"_blank","noopener");return}p(H)},[]),z=b.useCallback(()=>p(null),[]),D=b.useRef(0),L=b.useCallback(async H=>{p(null),c(!1);const te=++D.current;if(O.getLiveMessages(H)){await R.switchConversation(H,{fetchHistory:!1}),O.showSession(H),y(!1);return}y(!0);try{const oe=await R.switchConversation(H);if(D.current!==te)return;O.showSession(H,oe)}finally{D.current===te&&y(!1)}},[R,O]),j=b.useCallback(async()=>{p(null),c(!1),O.setMessages([]),await R.newConversation()},[R,O]),V=b.useCallback(async H=>{R.activeConversationId===H&&O.setMessages([]),await R.deleteConversation(H)},[R,O]);b.useEffect(()=>{R.activeConversationId&&O.messages.length===0&&(y(!0),e.getMessages(R.activeConversationId).then(H=>{O.setMessages(H)}).catch(()=>{}).finally(()=>y(!1)))},[]);const q=b.useCallback(()=>{s(H=>!H)},[]),P=b.useCallback(H=>{s(H)},[]),Q=b.useCallback(()=>{c(H=>!H),d(H=>null)},[]),X=b.useCallback(H=>{d(H),c(!0)},[]),T=b.useMemo(()=>{const H=new Set,te=[];for(const oe of O.messages)if(oe.role==="assistant"&&oe.artifacts)for(const B of ym(oe.artifacts)){const ie=B.id||`${B.url}:${B.filename}`;H.has(ie)||(H.add(ie),te.push(B))}return te},[O.messages]),J=b.useCallback(async H=>{const te=R.activeConversationId;if(!te)return null;try{const oe=await e.getMessages(te);O.setMessages(oe);const B=H?oe.filter(ie=>ie.role==="assistant"&&ie.roundId===H).pop():oe.findLast(ie=>ie.role==="assistant");return(B==null?void 0:B.messageId)??null}catch{return null}},[e,R.activeConversationId,O]),F=b.useCallback(H=>{if(typeof H!="string")return{messageId:H.messageId,roundId:H.roundId};const te=O.messages.find(oe=>oe.id===H||oe.messageId===H);return te?{messageId:te.messageId,roundId:te.roundId}:/^(user|assistant)_/.test(H)?{}:{messageId:H}},[O.messages]),G=b.useCallback((H,te,oe)=>{const{messageId:B,roundId:ie}=F(H);if(B){e.feedback(B,te,oe).catch(()=>{});return}J(ie).then(ae=>{ae&&e.feedback(ae,te,oe).catch(()=>{})})},[e,F,J]),re=b.useCallback(H=>{const{messageId:te,roundId:oe}=F(H);if(te){e.cancelFeedback(te).catch(()=>{});return}J(oe).then(B=>{B&&e.cancelFeedback(B).catch(()=>{})})},[e,F,J]),_=b.useMemo(()=>({sdk:e,status:O.status,error:O.error,messages:O.messages,conversations:R.conversations,activeConversationId:R.activeConversationId,isThreadListOpen:a,isArtifactDrawerOpen:l,allArtifacts:T,activePreviewArtifact:u,activePanel:f,hasMore:R.hasMore,conversationsLoading:R.loading,messagesLoading:w,containerWidth:E,previewLayoutMode:C,isDrawerFullscreen:N,setDrawerFullscreen:M,registerContentEl:k,sendMessage:O.sendMessage,attachmentUploader:n??null,nosUpload:r??null,stop:O.stop,regenerate:O.regenerate,switchConversation:L,newConversation:j,deleteConversation:V,renameConversation:R.renameConversation,loadMoreConversations:R.loadMore,toggleThreadList:q,setThreadListOpen:P,toggleArtifactDrawer:Q,openArtifactPreview:X,openPanel:A,closePanel:z,feedback:G,cancelFeedback:re,respondToInterrupt:O.respondToInterrupt}),[e,O.status,O.error,O.messages,O.sendMessage,O.stop,O.regenerate,O.respondToInterrupt,n,r,R.conversations,R.activeConversationId,R.renameConversation,R.hasMore,R.loadMore,R.loading,a,l,T,u,f,w,E,C,N,L,j,V,q,P,Q,X,A,z,G,re]);return S.jsx(wm.Provider,{value:_,children:i})}const qt="https://ehr-web.netease.com/ehr-web/erh-super-agent",Gt={recently:`${qt}/recently.svg`,home:`${qt}/home.svg`,mergeWindow:`${qt}/merge_window.svg`,spiltWindow:`${qt}/spilt_window.svg`,close:`${qt}/close.svg`,message:`${qt}/message.svg`,messageCreate:`${qt}/message_create.svg`,customerService:`${qt}/customer_service.svg`,sendSolid:`${qt}/send_solid.svg`,capabilityIcons:[`${qt}/icon1.png`,`${qt}/icon2.png`,`${qt}/icon3.png`],triggerLogo:`${qt}/HRlogo.png`,logo:`${qt}/HRlogo2.png`,assistantAvatarGenerating:`${qt}/profile0.gif`,assistantAvatar:`${qt}/profile1.png`},Ut={TRIGGER_SIZE:56,TRIGGER_RIGHT:20,TRIGGER_BOTTOM:80,DEFAULT_WIDTH:400,DEFAULT_HEIGHT:648,MIN_WIDTH:360,MAX_WIDTH:800,MAX_HEIGHT_RATIO:.95};function K0({defaultWidth:e=Ut.DEFAULT_WIDTH,defaultHeight:t=Ut.DEFAULT_HEIGHT,sidebarWidth:n=0}={}){const[r,o]=b.useState(e),[i,a]=b.useState({x:0,y:0}),[s,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(null),[p,h]=b.useState(()=>typeof window>"u"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight}),m=b.useRef(!1),w=b.useRef(0),y=b.useRef(r),$=b.useRef(!1),x=b.useRef({x:0,y:0}),E=b.useRef({x:0,y:0}),v=b.useRef(!1),C=b.useRef(null);b.useEffect(()=>{const z=()=>h({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",z),()=>window.removeEventListener("resize",z)},[]),b.useEffect(()=>()=>{var z;(z=C.current)==null||z.call(C)},[]);const I=Math.floor(p.height*Ut.MAX_HEIGHT_RATIO),N=Math.min(d||t,I),M=r+n;b.useEffect(()=>{if(!s){const z=p.width-M-20,D=p.height-N-20;a(L=>L.x===z&&L.y===D?L:{x:z,y:D})}},[s,M,N,p]);const k=b.useCallback(z=>{if(c||z.target.closest("button, input, textarea"))return;$.current=!0,v.current=!1,x.current={x:z.clientX,y:z.clientY},E.current={...i};const D=V=>{if(!$.current)return;const q=V.clientX-x.current.x,P=V.clientY-x.current.y;(Math.abs(q)>3||Math.abs(P)>3)&&(v.current=!0),v.current&&(l(!0),a({x:Math.max(-200,Math.min(E.current.x+q,window.innerWidth-100)),y:Math.max(0,Math.min(E.current.y+P,window.innerHeight-48))}))},L=()=>{$.current=!1,j()},j=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",L),C.current=null};document.addEventListener("mousemove",D),document.addEventListener("mouseup",L),C.current=j},[c,i]),R=b.useCallback(z=>{z.preventDefault(),z.stopPropagation(),m.current=!0,w.current=z.clientX,y.current=r;const D=i.x+r,L=i.y,j=P=>{if(!m.current)return;const Q=P.clientX-w.current;let X=y.current-Q;if(X>Ut.MAX_WIDTH){m.current=!1,u(!0),q();return}X=Math.max(Ut.MIN_WIDTH,X),o(X),a({x:D-X,y:L})},V=()=>{m.current=!1,q()},q=()=>{document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",V),C.current=null};document.addEventListener("mousemove",j),document.addEventListener("mouseup",V),C.current=q},[r,i]),O=b.useCallback(()=>{c&&o(e),u(z=>!z)},[c,e]),A=b.useCallback(()=>{u(!1),o(e),l(!1),f(null)},[e]);return{width:r,position:i,hasCustomPosition:s,isMaximized:c,lockedHeight:d,viewport:p,defaultHeight:t,totalWidth:M,windowHeight:N,startWindowDrag:k,startResize:R,toggleMaximize:O,setIsMaximized:u,setLockedHeight:f,setHasCustomPosition:l,reset:A}}function Y0(e){const{enabled:t,contentSelector:n,defaultHeight:r,onHeightChange:o}=e,i=b.useRef(null);return b.useEffect(()=>{if(!t||!i.current)return;const s=i.current.querySelector(n);if(!s)return;const l=()=>{const d=i.current;if(!d)return;const f=d.querySelector(n);if(!f)return;const p=d.offsetHeight-f.clientHeight,h=f.scrollHeight+p,m=Math.floor(window.innerHeight*Ut.MAX_HEIGHT_RATIO),w=Math.max(r,Math.min(h,m));o(y=>y===w?y:w)};l();const c=new ResizeObserver(()=>l());Array.from(s.children).forEach(d=>c.observe(d));const u=new MutationObserver(()=>{Array.from(s.children).forEach(d=>c.observe(d)),l()});return u.observe(s,{childList:!0,subtree:!0,characterData:!0}),()=>{c.disconnect(),u.disconnect()}},[t,n,r,o]),i}function Q0(e,t){const n=Ut.TRIGGER_SIZE;return{x:Math.max(8,Math.min(e,window.innerWidth-n-8)),y:Math.max(8,Math.min(t,window.innerHeight-n-8))}}function vm({isOpen:e,onClick:t,triggerLogo:n}){const[r,o]=b.useState(null),i=b.useRef(!1),a=b.useRef(!1),s=b.useRef({x:0,y:0}),l=b.useRef({x:0,y:0}),c=b.useRef(null);b.useEffect(()=>()=>{var p;(p=c.current)==null||p.call(c)},[]);const u=b.useCallback(p=>{if(p.button!==0)return;i.current=!0,a.current=!1,s.current={x:p.clientX,y:p.clientY};const h=p.currentTarget.getBoundingClientRect();l.current={x:h.left,y:h.top};const m=y=>{if(!i.current)return;const $=y.clientX-s.current.x,x=y.clientY-s.current.y;(Math.abs($)>4||Math.abs(x)>4)&&(a.current=!0),a.current&&o(Q0(l.current.x+$,l.current.y+x))},w=()=>{i.current=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",w),c.current=null};document.addEventListener("mousemove",m),document.addEventListener("mouseup",w),c.current=w},[]),d=b.useCallback(()=>{if(a.current){a.current=!1;return}t()},[t]),f=r?{left:r.x,top:r.y,width:Ut.TRIGGER_SIZE,height:Ut.TRIGGER_SIZE}:{right:Ut.TRIGGER_RIGHT,bottom:Ut.TRIGGER_BOTTOM,width:Ut.TRIGGER_SIZE,height:Ut.TRIGGER_SIZE};return S.jsx("button",{type:"button",className:`fixed z-[10000] flex items-center justify-center border-none bg-transparent p-0 transition-transform duration-200 ease-out hover:scale-[1.08] active:scale-95 ${e?"pointer-events-none scale-50 opacity-0":"opacity-100"}`,style:f,onMouseDown:u,onClick:d,"aria-label":"打开 AI 助手",title:"AI 助手",children:S.jsx("img",{src:n||Gt.triggerLogo,alt:"AI 助手",className:"block h-full w-full",draggable:!1})})}function Ao({tooltip:e,onClick:t,children:n}){return S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white active:bg-[#F5F5F5]","data-tooltip":e,"aria-label":e,onClick:t,children:n})}function Cm({onClose:e,onToggleThreadList:t,isMaximized:n=!1,onToggleMaximize:r,showHome:o=!1,onHome:i,showClose:a=!0,artifactCount:s=0,onToggleArtifactDrawer:l,panelTitle:c}){return S.jsxs("div",{className:"relative z-20 flex h-9 shrink-0 select-none items-center px-[15px]",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx(Ao,{tooltip:"历史记录",onClick:t,children:S.jsx("img",{src:Gt.recently,alt:"",width:20,height:20})}),o&&i&&S.jsx(Ao,{tooltip:c?"返回聊天":"回到首页",onClick:i,children:S.jsx("img",{src:Gt.home,alt:"",width:20,height:20})})]}),c&&S.jsx("div",{className:"pointer-events-none absolute inset-x-0 flex justify-center",children:S.jsx("span",{className:"max-w-[50%] truncate text-[15px] font-semibold text-[#18181b]",children:c})}),S.jsxs("div",{className:"ml-auto flex items-center gap-2.5",children:[s>0&&l&&S.jsx(Ao,{tooltip:"会话产物",onClick:l,children:S.jsxs("span",{className:"relative flex items-center gap-1",children:[S.jsxs("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),s>0&&S.jsx("span",{className:"absolute -right-2 -top-1.5 min-w-[14px] rounded-full bg-[var(--sa-primary)] px-0.5 text-center text-[9px] font-medium leading-[14px] text-white",children:s>99?"99+":s})]})}),r&&S.jsx(Ao,{tooltip:n?"小窗":"大窗",onClick:r,children:S.jsx("img",{src:n?Gt.spiltWindow:Gt.mergeWindow,alt:"",width:20,height:20})}),a&&S.jsx(Ao,{tooltip:"关闭",onClick:e,children:S.jsx("img",{src:Gt.close,alt:"",width:20,height:20})})]})]})}const yd="sa-widget-open:";function zi(e,t){if(!e)return!1;try{if(t===void 0)return sessionStorage.getItem(`${yd}${e}`)==="1";sessionStorage.setItem(`${yd}${e}`,t?"1":"0")}catch{}return!!t}const zo=e=>String(e).padStart(2,"0");function Z0(e){if(!e)return"";const t=new Date(e);return isNaN(t.getTime())?"":`${t.getFullYear()}-${zo(t.getMonth()+1)}-${zo(t.getDate())} ${zo(t.getHours())}:${zo(t.getMinutes())}:${zo(t.getSeconds())}`}function Sm(e){const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),r=n-6*864e5,o=[],i=[],a=[];for(const l of e){const c=new Date(l.updateTime).getTime();c>=n?o.push(l):c>=r?i.push(l):a.push(l)}const s=[];return o.length&&s.push({label:"今天",items:o}),i.length&&s.push({label:"最近 7 天",items:i}),a.length&&s.push({label:"更早",items:a}),s}function fl({width:e}){const{conversations:t,activeConversationId:n,switchConversation:r,newConversation:o,deleteConversation:i,renameConversation:a,hasMore:s,loadMoreConversations:l,conversationsLoading:c}=Fn(),[u,d]=b.useState(null),[f,p]=b.useState(""),[h,m]=b.useState(null),w=b.useRef(null),y=b.useCallback((v,C)=>{d(v),p(C??"")},[]),$=b.useCallback(v=>{f.trim()&&a(v,f.trim()),d(null)},[f,a]),x=b.useCallback(()=>{const v=w.current;!v||!s||v.scrollHeight-v.scrollTop-v.clientHeight<50&&l()},[s,l]),E=b.useMemo(()=>Sm(t),[t]);return S.jsxs("div",{className:"relative z-[5] flex h-full shrink-0 flex-col overflow-visible border-r border-[#ECECEC] bg-[#FAFAFA] p-3 animate-sa-history-in",style:{width:e??200},children:[S.jsxs("button",{type:"button",className:"sa-new-chat mb-4 flex h-8 w-full shrink-0 items-center justify-center gap-2 rounded-md text-[14px] font-medium transition-colors",onClick:o,children:[S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18}),S.jsx("span",{className:"sa-new-chat-text whitespace-nowrap",children:"新建对话"})]}),S.jsxs("div",{ref:w,className:"flex-1 overflow-y-auto",onScroll:x,children:[c&&t.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"加载中..."}),!c&&t.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"暂无记录"}),E.map(v=>S.jsxs("div",{className:"mb-1",children:[S.jsx("div",{className:"px-1 pb-1 pt-2 text-[11px] text-[#A0A0A0]",children:v.label}),v.items.map(C=>S.jsx("div",{className:`group relative mb-0.5 flex h-8 w-full cursor-pointer items-center gap-1 rounded-md px-0.5 text-[13px] transition-colors ${C.sessionId===n?"bg-[#E8F1FE]":"hover:bg-[#E8F1FE]"}`,onClick:()=>{u!==C.sessionId&&r(C.sessionId)},onMouseEnter:I=>{if(u===C.sessionId)return;const N=I.currentTarget.getBoundingClientRect();m({text:C.title||"新会话",x:N.right+8,y:N.top+N.height/2})},onMouseLeave:()=>m(null),children:u===C.sessionId?S.jsx("input",{className:"w-full rounded border border-[var(--sa-primary)] bg-white px-1.5 py-0.5 text-[12px] outline-none",value:f,onChange:I=>p(I.target.value),onBlur:()=>$(C.sessionId),onKeyDown:I=>{I.key==="Enter"&&$(C.sessionId),I.key==="Escape"&&d(null)},onClick:I=>I.stopPropagation(),autoFocus:!0}):S.jsxs(S.Fragment,{children:[S.jsx("img",{src:Gt.message,alt:"",width:16,height:16,className:"shrink-0 opacity-60"}),S.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-[#333]",children:C.title||"新会话"}),S.jsxs("span",{className:"hidden shrink-0 items-center gap-0.5 group-hover:flex",children:[S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[var(--sa-primary)]",onClick:I=>{I.stopPropagation(),y(C.sessionId,C.title)},title:"重命名",children:S.jsx("svg",{width:12,height:12,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})})}),S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[#ef4444]",onClick:I=>{I.stopPropagation(),i(C.sessionId)},title:"删除",children:S.jsx("svg",{width:12,height:12,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})})})]})]})},C.sessionId))]},v.label)),c&&t.length>0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:s?"加载更多...":"加载中..."}),!c&&s&&S.jsx("div",{className:"px-0.5 py-2 text-center text-[11px] text-[#C0C0C0]",children:"向下滚动加载更多"})]}),h&&S.jsx("div",{className:"pointer-events-none fixed z-[10001] whitespace-nowrap rounded border border-[#E8E8E8] bg-white px-2.5 py-1.5 text-[12px] leading-[1.4] text-[#333] shadow-[0_2px_8px_rgba(0,0,0,0.12)]",style:{left:h.x,top:h.y,transform:"translateY(-50%)"},children:h.text})]})}function Em(e){const t=b.useRef(null),n=b.useRef(!1),r=b.useRef(0),o=b.useCallback(()=>{const a=t.current;if(!a)return;const{scrollTop:s,scrollHeight:l,clientHeight:c}=a,u=l-s-c<40;s<r.current&&!u&&(n.current=!0),u&&(n.current=!1),r.current=s},[]);b.useEffect(()=>{const a=t.current;if(a)return a.addEventListener("scroll",o,{passive:!0}),()=>a.removeEventListener("scroll",o)},[o]),b.useEffect(()=>{if(n.current)return;const a=t.current;a&&requestAnimationFrame(()=>{a.scrollTop=a.scrollHeight})},e);const i=b.useCallback(()=>{n.current=!1;const a=t.current;a&&(a.scrollTop=a.scrollHeight)},[]);return{containerRef:t,scrollToBottom:i}}function J0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ey=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ty=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ny={};function wd(e,t){return(ny.jsx?ty:ey).test(e)}const ry=/[ \t\n\f\r]/g;function oy(e){return typeof e=="object"?e.type==="text"?vd(e.value):!1:vd(e)}function vd(e){return e.replace(ry,"")===""}let mi=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};mi.prototype.normal={};mi.prototype.property={};mi.prototype.space=void 0;function $m(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new mi(n,r,t)}function pl(e){return e.toLowerCase()}class dn{constructor(t,n){this.attribute=n,this.property=t}}dn.prototype.attribute="";dn.prototype.booleanish=!1;dn.prototype.boolean=!1;dn.prototype.commaOrSpaceSeparated=!1;dn.prototype.commaSeparated=!1;dn.prototype.defined=!1;dn.prototype.mustUseProperty=!1;dn.prototype.number=!1;dn.prototype.overloadedBoolean=!1;dn.prototype.property="";dn.prototype.spaceSeparated=!1;dn.prototype.space=void 0;let iy=0;const je=Br(),St=Br(),ml=Br(),fe=Br(),lt=Br(),Or=Br(),bn=Br();function Br(){return 2**++iy}const gl=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:St,commaOrSpaceSeparated:bn,commaSeparated:Or,number:fe,overloadedBoolean:ml,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),vs=Object.keys(gl);class eu extends dn{constructor(t,n,r,o){let i=-1;if(super(t,n),Cd(this,"space",o),typeof r=="number")for(;++i<vs.length;){const a=vs[i];Cd(this,vs[i],(r&gl[a])===gl[a])}}}eu.prototype.defined=!0;function Cd(e,t,n){n&&(e[t]=n)}function Co(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new eu(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[pl(r)]=r,n[pl(i.attribute)]=r}return new mi(t,n,e.space)}const km=Co({properties:{ariaActiveDescendant:null,ariaAtomic:St,ariaAutoComplete:null,ariaBusy:St,ariaChecked:St,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:St,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:St,ariaFlowTo:lt,ariaGrabbed:St,ariaHasPopup:null,ariaHidden:St,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:fe,ariaLive:null,ariaModal:St,ariaMultiLine:St,ariaMultiSelectable:St,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:St,ariaReadOnly:St,ariaRelevant:null,ariaRequired:St,ariaRoleDescription:lt,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:St,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Im(e,t){return t in e?e[t]:t}function Rm(e,t){return Im(e,t.toLowerCase())}const ay=Co({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Or,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alpha:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:lt,autoFocus:je,autoPlay:je,blocking:lt,capture:null,charSet:null,checked:je,cite:null,className:lt,closedBy:null,colorSpace:null,cols:fe,colSpan:fe,command:null,commandFor:null,content:null,contentEditable:St,controls:je,controlsList:lt,coords:fe|Or,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:ml,draggable:St,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:lt,height:fe,hidden:ml,high:fe,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:lt,itemRef:lt,itemScope:je,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:je,optimum:fe,pattern:null,ping:lt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:lt,required:je,reversed:je,rows:fe,rowSpan:fe,sandbox:lt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootCustomElementRegistry:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shadowRootSerializable:je,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:St,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:St,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:St,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:je,disablePictureInPicture:je,disableRemotePlayback:je,exportParts:Or,part:lt,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:Rm}),sy=Co({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:bn,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Or,g2:Or,glyphName:Or,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:bn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bn,rev:bn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bn,requiredFeatures:bn,requiredFonts:bn,requiredFormats:bn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:bn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bn,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Im}),Pm=Co({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Tm=Co({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Rm}),Nm=Co({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ly={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},cy=/[A-Z]/g,Sd=/-[a-z]/g,uy=/^data[-\w.:]+$/i;function dy(e,t){const n=pl(t);let r=t,o=dn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uy.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Sd,py);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Sd.test(i)){let a=i.replace(cy,fy);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=eu}return new o(r,t)}function fy(e){return"-"+e.toLowerCase()}function py(e){return e.charAt(1).toUpperCase()}const my=$m([km,ay,Pm,Tm,Nm],"html"),tu=$m([km,sy,Pm,Tm,Nm],"svg");function gy(e){return e.join(" ").trim()}var nu={},Ed=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,hy=/\n/g,by=/^\s*/,xy=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,yy=/^:\s*/,wy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,vy=/^[;\s]*/,Cy=/^\s+|\s+$/g,Sy=`
|
|
2
|
-
`,$d="/",kd="*",Tr="",Ey="comment",$y="declaration";function ky(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(h){var m=h.match(hy);m&&(n+=m.length);var w=h.lastIndexOf(Sy);r=~w?h.length-w:r+h.length}function i(){var h={line:n,column:r};return function(m){return m.position=new a(h),c(),m}}function a(h){this.start=h,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(h){var m=h.exec(e);if(m){var w=m[0];return o(w),e=e.slice(w.length),m}}function c(){l(by)}function u(h){var m;for(h=h||[];m=d();)m!==!1&&h.push(m);return h}function d(){var h=i();if(!($d!=e.charAt(0)||kd!=e.charAt(1))){for(var m=2;Tr!=e.charAt(m)&&(kd!=e.charAt(m)||$d!=e.charAt(m+1));)++m;if(m+=2,Tr===e.charAt(m-1))return s("End of comment missing");var w=e.slice(2,m-2);return r+=2,o(w),e=e.slice(m),r+=2,h({type:Ey,comment:w})}}function f(){var h=i(),m=l(xy);if(m){if(d(),!l(yy))return s("property missing ':'");var w=l(wy),y=h({type:$y,property:Id(m[0].replace(Ed,Tr)),value:w?Id(w[0].replace(Ed,Tr)):Tr});return l(vy),y}}function p(){var h=[];u(h);for(var m;m=f();)m!==!1&&(h.push(m),u(h));return h}return c(),p()}function Id(e){return e?e.replace(Cy,Tr):Tr}var Iy=ky,Ry=zn.commonjsGlobal&&zn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nu,"__esModule",{value:!0});nu.default=Ty;const Py=Ry(Iy);function Ty(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Py.default)(e),o=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;const{property:a,value:s}=i;o?t(a,s,i):s&&(n=n||{},n[a]=s)}),n}var Ba={};Object.defineProperty(Ba,"__esModule",{value:!0});Ba.camelCase=void 0;var Ny=/^--[a-zA-Z0-9_-]+$/,My=/-([a-z])/g,Ay=/^[^-]+$/,zy=/^-(webkit|moz|ms|o|khtml)-/,Oy=/^-(ms)-/,Dy=function(e){return!e||Ay.test(e)||Ny.test(e)},Ly=function(e,t){return t.toUpperCase()},Rd=function(e,t){return"".concat(t,"-")},Fy=function(e,t){return t===void 0&&(t={}),Dy(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Oy,Rd):e=e.replace(zy,Rd),e.replace(My,Ly))};Ba.camelCase=Fy;var _y=zn.commonjsGlobal&&zn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},jy=_y(nu),By=Ba;function hl(e,t){var n={};return!e||typeof e!="string"||(0,jy.default)(e,function(r,o){r&&o&&(n[(0,By.camelCase)(r,t)]=o)}),n}hl.default=hl;var Hy=hl;const Vy=zn.getDefaultExportFromCjs(Hy),Mm=Am("end"),ru=Am("start");function Am(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Wy(e){const t=ru(e),n=Mm(e);if(t&&n)return{start:t,end:n}}function Ko(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Pd(e.position):"start"in e||"end"in e?Pd(e):"line"in e||"column"in e?bl(e):""}function bl(e){return Td(e&&e.line)+":"+Td(e&&e.column)}function Pd(e){return bl(e&&e.start)+"-"+bl(e&&e.end)}function Td(e){return e&&typeof e=="number"?e:1}class Zt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=s?s.line:void 0,this.name=Ko(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Zt.prototype.file="";Zt.prototype.name="";Zt.prototype.reason="";Zt.prototype.message="";Zt.prototype.stack="";Zt.prototype.column=void 0;Zt.prototype.line=void 0;Zt.prototype.ancestors=void 0;Zt.prototype.cause=void 0;Zt.prototype.fatal=void 0;Zt.prototype.place=void 0;Zt.prototype.ruleId=void 0;Zt.prototype.source=void 0;const ou={}.hasOwnProperty,qy=new Map,Xy=/[A-Z]/g,Uy=new Set(["table","tbody","thead","tfoot","tr"]),Gy=new Set(["td","th"]),zm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ky(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=rw(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=nw(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?tu:my,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Om(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Om(e,t,n){if(t.type==="element")return Yy(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Qy(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Jy(e,t,n);if(t.type==="mdxjsEsm")return Zy(e,t);if(t.type==="root")return ew(e,t,n);if(t.type==="text")return tw(e,t)}function Yy(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=tu,e.schema=o),e.ancestors.push(t);const i=Lm(e,t.tagName,!1),a=ow(e,t);let s=au(e,t);return Uy.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!oy(l):!0})),Dm(e,a,i,t),iu(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Qy(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ni(e,t.position)}function Zy(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ni(e,t.position)}function Jy(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=tu,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:Lm(e,t.name,!0),a=iw(e,t),s=au(e,t);return Dm(e,a,i,t),iu(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function ew(e,t,n){const r={};return iu(r,au(e,t)),e.create(t,e.Fragment,r,n)}function tw(e,t){return t.value}function Dm(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function iu(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function nw(e,t,n){return r;function r(o,i,a,s){const c=Array.isArray(a.children)?n:t;return s?c(i,a,s):c(i,a)}}function rw(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=ru(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function ow(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&ou.call(t.properties,o)){const i=aw(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Gy.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function iw(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else ni(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else ni(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function au(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:qy;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=o.get(l)||0;a=l+"-"+c,o.set(l,c+1)}}const s=Om(e,i,a);s!==void 0&&n.push(s)}return n}function aw(e,t,n){const r=dy(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?J0(n):gy(n)),r.property==="style"){let o=typeof n=="object"?n:sw(e,String(n));return e.stylePropertyNameCase==="css"&&(o=lw(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?ly[r.property]||r.property:r.attribute,n]}}function sw(e,t){try{return Vy(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Zt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=zm+"#cannot-parse-style-attribute",o}}function Lm(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=wd(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=wd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return ou.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ni(e)}function ni(e,t){const n=new Zt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=zm+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lw(e){const t={};let n;for(n in e)ou.call(e,n)&&(t[cw(n)]=e[n]);return t}function cw(e){let t=e.replace(Xy,uw);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uw(e){return"-"+e.toLowerCase()}const Cs={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},dw={};function su(e,t){const n=dw,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Fm(e,r,o)}function Fm(e,t,n){if(fw(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Nd(e.children,t,n)}return Array.isArray(e)?Nd(e,t,n):""}function Nd(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Fm(e[o],t,n);return r.join("")}function fw(e){return!!(e&&typeof e=="object")}const Md=document.createElement("i");function lu(e){const t="&"+e+";";Md.innerHTML=t;const n=Md.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wn(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function kn(e,t){return e.length>0?(wn(e,e.length,0,t),e):t}const Ad={}.hasOwnProperty;function _m(e){const t={};let n=-1;for(;++n<e.length;)pw(t,e[n]);return t}function pw(e,t){let n;for(n in t){const o=(Ad.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Ad.call(o,a)||(o[a]=[]);const s=i[a];mw(o[a],Array.isArray(s)?s:s?[s]:[])}}}function mw(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wn(e,0,0,r)}function jm(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Mn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=wr(/[A-Za-z]/),Kt=wr(/[\dA-Za-z]/),gw=wr(/[#-'*+\--9=?A-Z^-~]/);function pa(e){return e!==null&&(e<32||e===127)}const xl=wr(/\d/),hw=wr(/[\dA-Fa-f]/),bw=wr(/[!-/:-@[-`{-~]/);function Ae(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function qe(e){return e===-2||e===-1||e===32}const Ha=wr(new RegExp("\\p{P}|\\p{S}","u")),Fr=wr(/\s/);function wr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function So(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&Kt(e.charCodeAt(n+1))&&Kt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ye(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return qe(l)?(e.enter(n),s(l)):t(l)}function s(l){return qe(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const xw={tokenize:yw};function yw(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ye(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Ae(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const ww={tokenize:vw},zd={tokenize:Cw};function vw(e){const t=this,n=[];let r=0,o,i,a;return s;function s(x){if(r<n.length){const E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,l,c)(x)}return c(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&$();const E=t.events.length;let v=E,C;for(;v--;)if(t.events[v][0]==="exit"&&t.events[v][1].type==="chunkFlow"){C=t.events[v][1].end;break}y(r);let I=E;for(;I<t.events.length;)t.events[I][1].end={...C},I++;return wn(t.events,v+1,0,t.events.slice(E)),t.events.length=I,c(x)}return s(x)}function c(x){if(r===n.length){if(!o)return f(x);if(o.currentConstruct&&o.currentConstruct.concrete)return h(x);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(zd,u,d)(x)}function u(x){return o&&$(),y(r),f(x)}function d(x){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,h(x)}function f(x){return t.containerState={},e.attempt(zd,p,h)(x)}function p(x){return r++,n.push([t.currentConstruct,t.containerState]),f(x)}function h(x){if(x===null){o&&$(),y(0),e.consume(x);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),m(x)}function m(x){if(x===null){w(e.exit("chunkFlow"),!0),y(0),e.consume(x);return}return Ae(x)?(e.consume(x),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(x),m)}function w(x,E){const v=t.sliceStream(x);if(E&&v.push(null),x.previous=i,i&&(i.next=x),i=x,o.defineSkip(x.start),o.write(v),t.parser.lazy[x.start.line]){let C=o.events.length;for(;C--;)if(o.events[C][1].start.offset<a&&(!o.events[C][1].end||o.events[C][1].end.offset>a))return;const I=t.events.length;let N=I,M,k;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(M){k=t.events[N][1].end;break}M=!0}for(y(r),C=I;C<t.events.length;)t.events[C][1].end={...k},C++;wn(t.events,N+1,0,t.events.slice(I)),t.events.length=C}}function y(x){let E=n.length;for(;E-- >x;){const v=n[E];t.containerState=v[1],v[0].exit.call(t,e)}n.length=x}function $(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Cw(e,t,n){return Ye(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function mo(e){if(e===null||ct(e)||Fr(e))return 1;if(Ha(e))return 2}function Va(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const yl={name:"attention",resolveAll:Sw,tokenize:Ew};function Sw(e,t){let n=-1,r,o,i,a,s,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Od(d,-l),Od(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=kn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=kn(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=kn(c,Va(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=kn(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=kn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,wn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Ew(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=mo(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const c=e.exit("attentionSequence"),u=mo(l),d=!u||u===2&&o||n.includes(l),f=!o||o===2&&u||n.includes(r);return c._open=!!(i===42?d:d&&(o||!f)),c._close=!!(i===42?f:f&&(u||!d)),t(l)}}function Od(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $w={name:"autolink",tokenize:kw};function kw(e,t,n){let r=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return nn(p)?(e.consume(p),a):p===64?n(p):c(p)}function a(p){return p===43||p===45||p===46||Kt(p)?(r=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Kt(p))&&r++<32?(e.consume(p),s):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||pa(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):gw(p)?(e.consume(p),c):n(p)}function u(p){return Kt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Kt(p))&&r++<63){const h=p===45?f:d;return e.consume(p),h}return n(p)}}const gi={partial:!0,tokenize:Iw};function Iw(e,t,n){return r;function r(i){return qe(i)?Ye(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||Ae(i)?t(i):n(i)}}const Bm={continuation:{tokenize:Pw},exit:Tw,name:"blockQuote",tokenize:Rw};function Rw(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return qe(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Pw(e,t,n){const r=this;return o;function o(a){return qe(a)?Ye(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(Bm,t,n)(a)}}function Tw(e){e.exit("blockQuote")}const Hm={name:"characterEscape",tokenize:Nw};function Nw(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return bw(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Vm={name:"characterReference",tokenize:Mw};function Mw(e,t,n){const r=this;let o=0,i,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,a=Kt,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=hw,u):(e.enter("characterReferenceValue"),i=7,a=xl,u(d))}function u(d){if(d===59&&o){const f=e.exit("characterReferenceValue");return a===Kt&&!lu(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&o++<i?(e.consume(d),u):n(d)}}const Dd={partial:!0,tokenize:zw},Ld={concrete:!0,name:"codeFenced",tokenize:Aw};function Aw(e,t,n){const r=this,o={partial:!0,tokenize:v};let i=0,a=0,s;return l;function l(C){return c(C)}function c(C){const I=r.events[r.events.length-1];return i=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,s=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(C)}function u(C){return C===s?(a++,e.consume(C),u):a<3?n(C):(e.exit("codeFencedFenceSequence"),qe(C)?Ye(e,d,"whitespace")(C):d(C))}function d(C){return C===null||Ae(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(Dd,m,E)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(C))}function f(C){return C===null||Ae(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):qe(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ye(e,p,"whitespace")(C)):C===96&&C===s?n(C):(e.consume(C),f)}function p(C){return C===null||Ae(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||Ae(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===s?n(C):(e.consume(C),h)}function m(C){return e.attempt(o,E,w)(C)}function w(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return i>0&&qe(C)?Ye(e,$,"linePrefix",i+1)(C):$(C)}function $(C){return C===null||Ae(C)?e.check(Dd,m,E)(C):(e.enter("codeFlowValue"),x(C))}function x(C){return C===null||Ae(C)?(e.exit("codeFlowValue"),$(C)):(e.consume(C),x)}function E(C){return e.exit("codeFenced"),t(C)}function v(C,I,N){let M=0;return k;function k(D){return C.enter("lineEnding"),C.consume(D),C.exit("lineEnding"),R}function R(D){return C.enter("codeFencedFence"),qe(D)?Ye(C,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):O(D)}function O(D){return D===s?(C.enter("codeFencedFenceSequence"),A(D)):N(D)}function A(D){return D===s?(M++,C.consume(D),A):M>=a?(C.exit("codeFencedFenceSequence"),qe(D)?Ye(C,z,"whitespace")(D):z(D)):N(D)}function z(D){return D===null||Ae(D)?(C.exit("codeFencedFence"),I(D)):N(D)}}}function zw(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Ss={name:"codeIndented",tokenize:Dw},Ow={partial:!0,tokenize:Lw};function Dw(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),Ye(e,i,"linePrefix",5)(c)}function i(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):Ae(c)?e.attempt(Ow,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Ae(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function Lw(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):Ae(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Ye(e,i,"linePrefix",5)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):Ae(a)?o(a):n(a)}}const Fw={name:"codeText",previous:jw,resolve:_w,tokenize:Bw};function _w(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function jw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Bw(e,t,n){let r=0,o,i;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(i=e.enter("codeTextSequence"),o=0,u(d)):Ae(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Ae(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",c(d))}}class Hw{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Oo(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Oo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Oo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Oo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Oo(this.left,n.reverse())}}}function Oo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Wm(e){const t={};let n=-1,r,o,i,a,s,l,c;const u=new Hw(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Vw(u,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(a=u.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(u.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end={...u.get(o)[1].start},s=u.slice(o,n),s.unshift(r),u.splice(o,n-o+1,s))}}return wn(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Vw(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=n,h=0,m=0;const w=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,w.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),f=w.length;f--;){const y=s.slice(w[f],w[f+1]),$=i.pop();l.push([$,$+y.length-1]),e.splice($,2,y)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}const Ww={resolve:Xw,tokenize:Uw},qw={partial:!0,tokenize:Gw};function Xw(e){return Wm(e),e}function Uw(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):Ae(s)?e.check(qw,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Gw(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ye(e,i,"linePrefix")}function i(a){if(a===null||Ae(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function qm(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(y),e.exit(i),f):y===null||y===32||y===41||pa(y)?n(y):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(s),f(y)):y===null||y===60||Ae(y)?n(y):(e.consume(y),y===92?h:p)}function h(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function m(y){return!u&&(y===null||y===41||ct(y))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(y)):u<c&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||pa(y)?n(y):(e.consume(y),y===92?w:m)}function w(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Xm(e,t,n,r,o,i){const a=this;let s=0,l;return c;function c(p){return e.enter(r),e.enter(o),e.consume(p),e.exit(o),e.enter(i),u}function u(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(i),e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):Ae(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Ae(p)||s++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!qe(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function Um(e,t,n,r,o,i){let a;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(o),e.consume(f),e.exit(o),a=f===40?41:f,l):n(f)}function l(f){return f===a?(e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):(e.enter(i),c(f))}function c(f){return f===a?(e.exit(i),l(a)):f===null?n(f):Ae(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ye(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===a||f===null||Ae(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===a||f===92?(e.consume(f),u):u(f)}}function Yo(e,t){let n;return r;function r(o){return Ae(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):qe(o)?Ye(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Kw={name:"definition",tokenize:Qw},Yw={partial:!0,tokenize:Zw};function Qw(e,t,n){const r=this;let o;return i;function i(p){return e.enter("definition"),a(p)}function a(p){return Xm.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return o=Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return ct(p)?Yo(e,c)(p):c(p)}function c(p){return qm(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(Yw,d,d)(p)}function d(p){return qe(p)?Ye(e,f,"whitespace")(p):f(p)}function f(p){return p===null||Ae(p)?(e.exit("definition"),r.parser.defined.push(o),t(p)):n(p)}}function Zw(e,t,n){return r;function r(s){return ct(s)?Yo(e,o)(s):n(s)}function o(s){return Um(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return qe(s)?Ye(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Ae(s)?t(s):n(s)}}const Jw={name:"hardBreakEscape",tokenize:e1};function e1(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return Ae(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const t1={name:"headingAtx",resolve:n1,tokenize:r1};function n1(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wn(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function r1(e,t,n){let r=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||ct(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Ae(u)?(e.exit("atxHeading"),t(u)):qe(u)?Ye(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||ct(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const o1=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fd=["pre","script","style","textarea"],i1={concrete:!0,name:"htmlFlow",resolveTo:l1,tokenize:c1},a1={partial:!0,tokenize:d1},s1={partial:!0,tokenize:u1};function l1(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function c1(e,t,n){const r=this;let o,i,a,s,l;return c;function c(T){return u(T)}function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),f):T===47?(e.consume(T),i=!0,m):T===63?(e.consume(T),o=3,r.interrupt?t:P):nn(T)?(e.consume(T),a=String.fromCharCode(T),w):n(T)}function f(T){return T===45?(e.consume(T),o=2,p):T===91?(e.consume(T),o=5,s=0,h):nn(T)?(e.consume(T),o=4,r.interrupt?t:P):n(T)}function p(T){return T===45?(e.consume(T),r.interrupt?t:P):n(T)}function h(T){const J="CDATA[";return T===J.charCodeAt(s++)?(e.consume(T),s===J.length?r.interrupt?t:O:h):n(T)}function m(T){return nn(T)?(e.consume(T),a=String.fromCharCode(T),w):n(T)}function w(T){if(T===null||T===47||T===62||ct(T)){const J=T===47,F=a.toLowerCase();return!J&&!i&&Fd.includes(F)?(o=1,r.interrupt?t(T):O(T)):o1.includes(a.toLowerCase())?(o=6,J?(e.consume(T),y):r.interrupt?t(T):O(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):i?$(T):x(T))}return T===45||Kt(T)?(e.consume(T),a+=String.fromCharCode(T),w):n(T)}function y(T){return T===62?(e.consume(T),r.interrupt?t:O):n(T)}function $(T){return qe(T)?(e.consume(T),$):k(T)}function x(T){return T===47?(e.consume(T),k):T===58||T===95||nn(T)?(e.consume(T),E):qe(T)?(e.consume(T),x):k(T)}function E(T){return T===45||T===46||T===58||T===95||Kt(T)?(e.consume(T),E):v(T)}function v(T){return T===61?(e.consume(T),C):qe(T)?(e.consume(T),v):x(T)}function C(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,I):qe(T)?(e.consume(T),C):N(T)}function I(T){return T===l?(e.consume(T),l=null,M):T===null||Ae(T)?n(T):(e.consume(T),I)}function N(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||ct(T)?v(T):(e.consume(T),N)}function M(T){return T===47||T===62||qe(T)?x(T):n(T)}function k(T){return T===62?(e.consume(T),R):n(T)}function R(T){return T===null||Ae(T)?O(T):qe(T)?(e.consume(T),R):n(T)}function O(T){return T===45&&o===2?(e.consume(T),L):T===60&&o===1?(e.consume(T),j):T===62&&o===4?(e.consume(T),Q):T===63&&o===3?(e.consume(T),P):T===93&&o===5?(e.consume(T),q):Ae(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(a1,X,A)(T)):T===null||Ae(T)?(e.exit("htmlFlowData"),A(T)):(e.consume(T),O)}function A(T){return e.check(s1,z,X)(T)}function z(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),D}function D(T){return T===null||Ae(T)?A(T):(e.enter("htmlFlowData"),O(T))}function L(T){return T===45?(e.consume(T),P):O(T)}function j(T){return T===47?(e.consume(T),a="",V):O(T)}function V(T){if(T===62){const J=a.toLowerCase();return Fd.includes(J)?(e.consume(T),Q):O(T)}return nn(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),V):O(T)}function q(T){return T===93?(e.consume(T),P):O(T)}function P(T){return T===62?(e.consume(T),Q):T===45&&o===2?(e.consume(T),P):O(T)}function Q(T){return T===null||Ae(T)?(e.exit("htmlFlowData"),X(T)):(e.consume(T),Q)}function X(T){return e.exit("htmlFlow"),t(T)}}function u1(e,t,n){const r=this;return o;function o(a){return Ae(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function d1(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(gi,t,n)}}const f1={name:"htmlText",tokenize:p1};function p1(e,t,n){const r=this;let o,i,a;return s;function s(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),l}function l(P){return P===33?(e.consume(P),c):P===47?(e.consume(P),v):P===63?(e.consume(P),x):nn(P)?(e.consume(P),N):n(P)}function c(P){return P===45?(e.consume(P),u):P===91?(e.consume(P),i=0,h):nn(P)?(e.consume(P),$):n(P)}function u(P){return P===45?(e.consume(P),p):n(P)}function d(P){return P===null?n(P):P===45?(e.consume(P),f):Ae(P)?(a=d,j(P)):(e.consume(P),d)}function f(P){return P===45?(e.consume(P),p):d(P)}function p(P){return P===62?L(P):P===45?f(P):d(P)}function h(P){const Q="CDATA[";return P===Q.charCodeAt(i++)?(e.consume(P),i===Q.length?m:h):n(P)}function m(P){return P===null?n(P):P===93?(e.consume(P),w):Ae(P)?(a=m,j(P)):(e.consume(P),m)}function w(P){return P===93?(e.consume(P),y):m(P)}function y(P){return P===62?L(P):P===93?(e.consume(P),y):m(P)}function $(P){return P===null||P===62?L(P):Ae(P)?(a=$,j(P)):(e.consume(P),$)}function x(P){return P===null?n(P):P===63?(e.consume(P),E):Ae(P)?(a=x,j(P)):(e.consume(P),x)}function E(P){return P===62?L(P):x(P)}function v(P){return nn(P)?(e.consume(P),C):n(P)}function C(P){return P===45||Kt(P)?(e.consume(P),C):I(P)}function I(P){return Ae(P)?(a=I,j(P)):qe(P)?(e.consume(P),I):L(P)}function N(P){return P===45||Kt(P)?(e.consume(P),N):P===47||P===62||ct(P)?M(P):n(P)}function M(P){return P===47?(e.consume(P),L):P===58||P===95||nn(P)?(e.consume(P),k):Ae(P)?(a=M,j(P)):qe(P)?(e.consume(P),M):L(P)}function k(P){return P===45||P===46||P===58||P===95||Kt(P)?(e.consume(P),k):R(P)}function R(P){return P===61?(e.consume(P),O):Ae(P)?(a=R,j(P)):qe(P)?(e.consume(P),R):M(P)}function O(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),o=P,A):Ae(P)?(a=O,j(P)):qe(P)?(e.consume(P),O):(e.consume(P),z)}function A(P){return P===o?(e.consume(P),o=void 0,D):P===null?n(P):Ae(P)?(a=A,j(P)):(e.consume(P),A)}function z(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||ct(P)?M(P):(e.consume(P),z)}function D(P){return P===47||P===62||ct(P)?M(P):n(P)}function L(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function j(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),V}function V(P){return qe(P)?Ye(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):q(P)}function q(P){return e.enter("htmlTextData"),a(P)}}const cu={name:"labelEnd",resolveAll:b1,resolveTo:x1,tokenize:y1},m1={tokenize:w1},g1={tokenize:v1},h1={tokenize:C1};function b1(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&wn(e,0,e.length,n),e}function x1(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",c,t]],s=kn(s,e.slice(i+1,i+r+3)),s=kn(s,[["enter",u,t]]),s=kn(s,Va(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=kn(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=kn(s,e.slice(a+1)),s=kn(s,[["exit",l,t]]),wn(e,i,e.length,s),e}function y1(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(f){return i?i._inactive?d(f):(a=r.parser.defined.includes(Mn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(m1,u,a?u:d)(f):f===91?e.attempt(g1,u,a?c:d)(f):a?u(f):d(f)}function c(f){return e.attempt(h1,u,d)(f)}function u(f){return t(f)}function d(f){return i._balanced=!0,n(f)}}function w1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),o}function o(d){return ct(d)?Yo(e,i)(d):i(d)}function i(d){return d===41?u(d):qm(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return ct(d)?Yo(e,l)(d):u(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?Um(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return ct(d)?Yo(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function v1(e,t,n){const r=this;return o;function o(s){return Xm.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function C1(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const S1={name:"labelStartImage",resolveAll:cu.resolveAll,tokenize:E1};function E1(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const $1={name:"labelStartLink",resolveAll:cu.resolveAll,tokenize:k1};function k1(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Es={name:"lineEnding",tokenize:I1};function I1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ye(e,t,"linePrefix")}}const ta={name:"thematicBreak",tokenize:R1};function R1(e,t,n){let r=0,o;return i;function i(c){return e.enter("thematicBreak"),a(c)}function a(c){return o=c,s(c)}function s(c){return c===o?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||Ae(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===o?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),qe(c)?Ye(e,s,"whitespace")(c):s(c))}}const ln={continuation:{tokenize:M1},exit:z1,name:"list",tokenize:N1},P1={partial:!0,tokenize:O1},T1={partial:!0,tokenize:A1};function N1(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(p){const h=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:xl(p)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(ta,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return xl(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(gi,r.interrupt?n:u,e.attempt(P1,f,d))}function u(p){return r.containerState.initialBlankLine=!0,i++,f(p)}function d(p){return qe(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function M1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(gi,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ye(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!qe(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(T1,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ye(e,e.attempt(ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function A1(e,t,n){const r=this;return Ye(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function z1(e){e.exit(this.containerState.type)}function O1(e,t,n){const r=this;return Ye(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const a=r.events[r.events.length-1];return!qe(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const _d={name:"setextUnderline",resolveTo:D1,tokenize:L1};function D1(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function L1(e,t,n){const r=this;let o;return i;function i(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),o=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===o?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),qe(c)?Ye(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ae(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const F1={tokenize:_1};function _1(e){const t=this,n=e.attempt(gi,r,e.attempt(this.parser.constructs.flowInitial,o,Ye(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Ww,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const j1={resolveAll:Km()},B1=Gm("string"),H1=Gm("text");function Gm(e){return{resolveAll:Km(e==="text"?V1:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(u){return c(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=o[u];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Km(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function V1(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,l;for(;i--;){const c=o[i];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const W1={42:ln,43:ln,45:ln,48:ln,49:ln,50:ln,51:ln,52:ln,53:ln,54:ln,55:ln,56:ln,57:ln,62:Bm},q1={91:Kw},X1={[-2]:Ss,[-1]:Ss,32:Ss},U1={35:t1,42:ta,45:[_d,ta],60:i1,61:_d,95:ta,96:Ld,126:Ld},G1={38:Vm,92:Hm},K1={[-5]:Es,[-4]:Es,[-3]:Es,33:S1,38:Vm,42:yl,60:[$w,f1],91:$1,92:[Jw,Hm],93:cu,95:yl,96:Fw},Y1={null:[yl,j1]},Q1={null:[42,95]},Z1={null:[]},J1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Q1,contentInitial:q1,disable:Z1,document:W1,flow:U1,flowInitial:X1,insideSpan:Y1,string:G1,text:K1},Symbol.toStringTag,{value:"Module"}));function ev(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:I(v),check:I(C),consume:$,enter:x,exit:E,interrupt:I(C,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:h,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(R){return a=kn(a,R),w(),a[a.length-1]!==null?[]:(N(t,0),c.events=Va(i,c.events,c),c.events)}function f(R,O){return nv(p(R),O)}function p(R){return tv(a,R)}function h(){const{_bufferIndex:R,_index:O,line:A,column:z,offset:D}=r;return{_bufferIndex:R,_index:O,line:A,column:z,offset:D}}function m(R){o[R.line]=R.column,k()}function w(){let R;for(;r._index<a.length;){const O=a[r._index];if(typeof O=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<O.length;)y(O.charCodeAt(r._bufferIndex));else y(O)}}function y(R){u=u(R)}function $(R){Ae(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,k()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=R}function x(R,O){const A=O||{};return A.type=R,A.start=h(),c.events.push(["enter",A,c]),s.push(A),A}function E(R){const O=s.pop();return O.end=h(),c.events.push(["exit",O,c]),O}function v(R,O){N(R,O.from)}function C(R,O){O.restore()}function I(R,O){return A;function A(z,D,L){let j,V,q,P;return Array.isArray(z)?X(z):"tokenize"in z?X([z]):Q(z);function Q(G){return re;function re(_){const H=_!==null&&G[_],te=_!==null&&G.null,oe=[...Array.isArray(H)?H:H?[H]:[],...Array.isArray(te)?te:te?[te]:[]];return X(oe)(_)}}function X(G){return j=G,V=0,G.length===0?L:T(G[V])}function T(G){return re;function re(_){return P=M(),q=G,G.partial||(c.currentConstruct=G),G.name&&c.parser.constructs.disable.null.includes(G.name)?F():G.tokenize.call(O?Object.assign(Object.create(c),O):c,l,J,F)(_)}}function J(G){return R(q,P),D}function F(G){return P.restore(),++V<j.length?T(j[V]):L}}}function N(R,O){R.resolveAll&&!i.includes(R)&&i.push(R),R.resolve&&wn(c.events,O,c.events.length-O,R.resolve(c.events.slice(O),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function M(){const R=h(),O=c.previous,A=c.currentConstruct,z=c.events.length,D=Array.from(s);return{from:z,restore:L};function L(){r=R,c.previous=O,c.currentConstruct=A,c.events.length=z,s=D,k()}}function k(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function tv(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function nv(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
|
|
1
|
+
"use strict";var H0=Object.defineProperty;var V0=(e,t,n)=>t in e?H0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var J=(e,t,n)=>V0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),hm=require("react-dom/client"),S=require("react/jsx-runtime"),zn=require("./nosUploader-BD9gHyMF.cjs"),po=require("react-dom");function W0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=W0(b);function bm(e){const{sdk:t,sessionId:n,onSessionCreated:r,onRoundStart:o,onStreamStart:i,onStreamEnd:a,onError:s,onMessageSend:l}=e,[c,u]=b.useState([]),[d,f]=b.useState("ready"),[p,h]=b.useState(null),m=b.useRef(new Map),w=b.useRef(new Map),y=b.useRef(n),$=b.useRef(!0),x=b.useRef(c);y.current=n,$.current=c.length===0,x.current=c;const E=b.useCallback((z,D)=>{if(z===y.current)u(M=>{const L=w.current.get(z)??M,_=D(L);return w.current.set(z,_),_});else{const M=w.current.get(z)??[];w.current.set(z,D(M))}},[]),v=b.useCallback((z,D)=>{const M=m.current.get(z);M!=null&&M.stopTimer&&(clearTimeout(M.stopTimer),M.stopTimer=null),m.current.delete(z),w.current.delete(z),z===y.current&&f(D)},[]);b.useEffect(()=>{const z=n?m.current.get(n):void 0;f(z!=null&&z.busy?"streaming":"ready")},[n]);const C=b.useRef(()=>{}),I=b.useCallback((z,D,M)=>{var ne;const L=y.current;if(L&&((ne=m.current.get(L))!=null&&ne.busy))return;if(L){const F=q0(x.current);if(F){l==null||l(z),C.current(F,{action:"submit",value:z});return}}l==null||l(z);const _=M??z,V={id:`user_${Date.now()}`,role:"user",parts:[...(D??[]).map(F=>({type:"attachment",attachment:F})),{type:"text",content:_}],timestamp:Date.now(),rawContent:M!=null&&M!==z?z:void 0},X=`assistant_${Date.now()}`,P={id:X,role:"assistant",parts:[],timestamp:Date.now()},Y=$.current,K=x.current;u(F=>[...F,V,P]),L&&w.current.set(L,[...K,V,P]),f("submitted"),h(null);const T=F=>{let U="",re=0,j="",H=[],ee=!1,oe,B=null;w.current.has(F)||w.current.set(F,[...K,V,P]);const ie={abortController:null,busy:!0,stopTimer:null};m.current.set(F,ie);const ae=()=>{U&&(H.push({type:"thinking",content:U,durationMs:Date.now()-re}),U="",re=0)},Se=()=>{j&&(H.push({type:"text",content:j}),j="")},ye=()=>{const q=[...H];U&&q.push({type:"thinking",content:U,durationMs:Date.now()-re}),j&&q.push({type:"text",content:j}),E(F,me=>me.map(he=>he.id===X?{...he,parts:q,...oe?{roundId:oe}:{}}:he))};ie.abortController=t.chat({sessionId:F,message:z,attachments:D&&D.length>0?D:void 0,stream:!0,onMessage:q=>{switch(ee||(ee=!0,F===y.current&&f("streaming")),q.type){case"session.start":q.roundId&&(oe=q.roundId,o==null||o(q.roundId));break;case"user":q.content&&(B=q.content,E(F,me=>me.map(he=>he.id===V.id?{...he,parts:he.parts.map(se=>se.type==="text"?{...se,content:q.content}:se)}:he)));break;case"thinking":Se(),U||(re=Date.now()),U+=q.content;break;case"ai":ae(),j+=q.content;break;case"tool_call":ae(),Se(),H.push({type:"tool_call",toolName:q.toolName,toolCallId:q.toolCallId,args:q.args??"{}"});break;case"tool_result":ae(),Se(),H.push({type:"tool_result",toolName:q.toolName??"",toolCallId:q.toolCallId,content:q.content,artifacts:q.artifacts,renderMode:q.renderMode,html:q.html,markdown:q.markdown,defaultExpanded:q.defaultExpanded});break;case"interrupt":ae(),Se(),q.interrupt&&H.push({type:"interrupt",interrupt:q.interrupt,resolved:!1}),ye(),v(F,"ready");return;case"stop":q.content&&(j=q.content),ye();return}ye()},onDone:q=>{if((j||H.length>0||U)&&ye(),q.artifacts&&q.artifacts.length>0){const he=q.artifacts;E(F,se=>se.map(ue=>ue.id===X?{...ue,artifacts:he}:ue))}if(q.messageId){const he=q.messageId;E(F,se=>se.map(ue=>ue.id===X?{...ue,messageId:he}:ue))}const me=()=>{v(F,"ready"),a==null||a(q.sessionId||F)};if(Y){const he=(B??_).slice(0,30),se=q.sessionId||F;t.renameConversation(se,he).catch(()=>{}).finally(me)}else me()},onError:q=>{H.push({type:"error",content:q.message}),ye(),F===y.current&&(h(q),f("error")),s==null||s(q),v(F,"error")}}),i==null||i(F)};L?T(L):t.createSession().then(F=>{y.current==null&&(y.current=F,r==null||r(F)),T(F)}).catch(F=>{y.current==null&&(h(F instanceof Error?F:new Error(String(F))),f("error")),s==null||s(F instanceof Error?F:new Error(String(F)))})},[t,r,i,a,s,l,E,v]),N=b.useCallback(()=>{const z=y.current;if(!z)return;const D=m.current.get(z);D!=null&&D.busy&&(D.stopTimer&&clearTimeout(D.stopTimer),D.stopTimer=setTimeout(()=>{var M;D.stopTimer=null,(M=D.abortController)==null||M.abort(),v(z,"ready")},8e3),t.stopGeneration(z).catch(()=>{}))},[t,v]),A=b.useCallback(()=>{var _;const z=y.current;if(z&&((_=m.current.get(z))!=null&&_.busy))return;const D=c.findLastIndex(V=>V.role==="user");if(D<0)return;const M=c[D].rawContent??c[D].parts.filter(V=>V.type==="text").map(V=>V.content).join(""),L=c[D].parts.filter(V=>V.type==="attachment").map(V=>V.attachment);u(V=>V.slice(0,D)),I(M,L.length>0?L:void 0)},[c,I]),k=b.useCallback((z,D)=>{var re;const M=y.current;if(!M||(re=m.current.get(M))!=null&&re.busy)return;E(M,j=>j.map(H=>({...H,parts:H.parts.map(ee=>ee.type==="interrupt"&&ee.interrupt.interruptId===z?{...ee,resolved:!0,response:D}:ee)})));const L={abortController:null,busy:!0,stopTimer:null};m.current.set(M,L);const _=new AbortController;L.abortController=_;let V=0;E(M,j=>j.length>0&&j[j.length-1].role==="assistant"?(V=j[j.length-1].parts.length,j):(V=0,[...j,{id:`assistant_${Date.now()}`,role:"assistant",parts:[],timestamp:Date.now()}])),f("streaming");let X="",P=0,Y="",K=[],T;const ne=()=>{X&&(K.push({type:"thinking",content:X,durationMs:Date.now()-P}),X="",P=0)},F=()=>{Y&&(K.push({type:"text",content:Y}),Y="")},U=()=>{const j=[...K];X&&j.push({type:"thinking",content:X,durationMs:Date.now()-P}),Y&&j.push({type:"text",content:Y}),E(M,H=>{const ee=H.findLastIndex(oe=>oe.role==="assistant");return ee<0?H:H.map((oe,B)=>B===ee?{...oe,parts:[...oe.parts.slice(0,V),...j],...T?{roundId:T}:{}}:oe)})};t.respondInterrupt(z,M,D,j=>{let H=!1;switch(j.type){case"session.start":j.roundId&&(T=j.roundId);break;case"thinking":F(),X||(P=Date.now()),X+=j.content;break;case"ai":ne(),Y+=j.content;break;case"tool_call":ne(),F(),K.push({type:"tool_call",toolName:j.toolName,toolCallId:j.toolCallId,args:j.args??"{}"});break;case"tool_result":ne(),F(),K.push({type:"tool_result",toolName:j.toolName??"",toolCallId:j.toolCallId,content:j.content,artifacts:j.artifacts,renderMode:j.renderMode,html:j.html,markdown:j.markdown,defaultExpanded:j.defaultExpanded});break;case"interrupt":ne(),F(),j.interrupt&&K.push({type:"interrupt",interrupt:j.interrupt,resolved:!1}),H=!0;break;case"stop":j.content&&(Y=j.content),a==null||a(M),H=!0;break;case"done":{const ee=j.artifacts&&j.artifacts.length>0?j.artifacts:void 0;(j.messageId||ee)&&E(M,oe=>{const B=oe.findLastIndex(ie=>ie.role==="assistant");return B<0?oe:oe.map((ie,ae)=>ae===B?{...ie,...j.messageId?{messageId:j.messageId}:{},...ee?{artifacts:ee}:{}}:ie)}),a==null||a(M),H=!0;break}}U(),H&&v(M,"ready")},j=>{K.push({type:"error",content:j.message}),U(),M===y.current&&(h(j),f("error")),s==null||s(j),v(M,"error")},_.signal).catch(j=>{if((j==null?void 0:j.name)==="AbortError"){v(M,"ready");return}M===y.current&&(h(j instanceof Error?j:new Error(String(j))),f("error")),s==null||s(j instanceof Error?j:new Error(String(j))),v(M,"error")})},[t,s,a,E,v]);C.current=k;const R=b.useCallback((z,D)=>{y.current=z;const M=D??w.current.get(z)??[];w.current.set(z,M),u(M)},[]),O=b.useCallback(z=>m.current.has(z)?w.current.get(z)??null:null,[]);return{messages:c,status:d,error:p,sendMessage:I,stop:N,regenerate:A,setMessages:u,showSession:R,getLiveMessages:O,respondToInterrupt:k}}function q0(e){for(let t=e.length-1;t>=0;t--)for(let n=e[t].parts.length-1;n>=0;n--){const r=e[t].parts[n];if(r.type==="interrupt"&&!r.resolved&&r.interrupt.interruptId)return r.interrupt.interruptId}return null}const xm="sa_active_conversation",vs=20;function vd(e){try{return localStorage.getItem(`${xm}_${e}`)}catch{return null}}function X0(e,t){try{const n=`${xm}_${e}`;t?localStorage.setItem(n,t):localStorage.removeItem(n)}catch{}}function ym(e){const{sdk:t,onConversationChange:n}=e,r=t.botCode,[o,i]=b.useState([]),[a,s]=b.useState(()=>vd(r)),[l,c]=b.useState(!1),[u,d]=b.useState(!0),f=b.useRef(!0),p=b.useRef(1),h=b.useRef(!1);b.useEffect(()=>()=>{f.current=!1},[]);const m=b.useCallback(I=>{s(I),X0(r,I),I&&(n==null||n(I))},[r,n]),w=b.useCallback(async()=>{if(!h.current){h.current=!0,c(!0);try{p.current=1;const I=await t.listConversations({page:1,size:vs});if(!f.current)return;i(I.items),d(I.items.length<I.total);const N=vd(r);N&&!I.items.find(A=>A.sessionId===N)&&m(null)}catch{}finally{h.current=!1,f.current&&c(!1)}}},[t,m]),y=b.useCallback(async()=>{if(!(h.current||!u)){h.current=!0,c(!0);try{const I=p.current+1,N=await t.listConversations({page:I,size:vs});if(!f.current)return;p.current=I,i(k=>{const R=new Set(k.map(z=>z.sessionId)),O=N.items.filter(z=>!R.has(z.sessionId));return[...k,...O]});const A=p.current*vs;d(A<N.total)}catch{}finally{h.current=!1,f.current&&c(!1)}}},[t,u]),$=b.useCallback(async(I,N)=>(m(I),(N==null?void 0:N.fetchHistory)===!1?[]:await t.getMessages(I)),[t,m]),x=b.useCallback(async()=>{try{const I=await t.createSession(),N=new Date().toISOString();i(A=>[{sessionId:I,title:"新对话",createTime:N,updateTime:N},...A]),m(I)}catch{m(null)}},[t,m]),E=b.useCallback(async I=>{i(N=>N.filter(A=>A.sessionId!==I)),a===I&&m(null);try{await t.deleteConversation(I)}catch{}},[t,a,m]),v=b.useCallback(async(I,N)=>{await t.renameConversation(I,N),i(A=>A.map(k=>k.sessionId===I?{...k,title:N}:k))},[t]),{enabled:C=!0}=e;return b.useEffect(()=>{C&&w()},[C,w]),{conversations:o,activeConversationId:a,loading:l,hasMore:u,loadConversations:w,loadMore:y,switchConversation:$,newConversation:x,deleteConversation:E,renameConversation:v,setActiveConversationId:m}}function wm(e){return!e&&e!==0?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function vm(e){return e==="pdf"?"PDF":e==="docx"?"DOC":e==="html"?"HTM":e==="md"?"MD":e.slice(0,3).toUpperCase()||"FILE"}function U0(e,t){var o;const n=(e||"").toLowerCase();if(n.includes("html"))return"html";if(n.includes("markdown"))return"md";if(n.includes("pdf"))return"pdf";if(n.includes("wordprocessingml")||n==="application/msword")return"docx";const r=((o=(t||"").split(".").pop())==null?void 0:o.toLowerCase())??"";return r==="htm"||r==="html"?"html":r==="md"||r==="markdown"?"md":r==="pdf"?"pdf":r==="doc"||r==="docx"?"docx":r}function Cm(e){if(!e)return[];const t=[];for(const n of e)if(n.type==="file"&&n.data){const r=n.data.name??n.data.filename??"",o=n.data.mime??n.data.mime_type??n.data.mimeType;t.push({id:n.data.id??"",type:n.data.fileType??n.data.type??U0(o,r),filename:r,url:n.data.url??"",mime:o,size:n.data.size,summary:n.data.summary})}return t}async function pa(e){try{const t=await fetch(e.url);if(!t.ok)throw new Error(`HTTP ${t.status}`);const n=await t.blob(),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=e.filename,document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(r),4e3)}catch{const t=document.createElement("a");t.href=e.url,t.download=e.filename,t.target="_blank",document.body.appendChild(t),t.click(),t.remove()}}const G0=632,K0=640,Sm=b.createContext(null);function Fn(){const e=b.useContext(Sm);if(!e)throw new Error("useChatContext must be used within ChatProvider");return e}function fl({sdk:e,hooks:t,attachmentUploader:n,nosUpload:r,mode:o="floating",children:i}){const[a,s]=b.useState(!1),[l,c]=b.useState(!1),[u,d]=b.useState(null),[f,p]=b.useState(null),[h,m]=b.useState(!1),[w,y]=b.useState(!1),[$,x]=b.useState(null),[E,v]=b.useState(0),[C,I]=b.useState("split"),[N,A]=b.useState(!1),k=b.useCallback(H=>x(H),[]);b.useLayoutEffect(()=>{if(!$){v(0);return}const H=()=>{const oe=$.getBoundingClientRect().width;if(v(B=>B===oe?B:oe),o!=="fullpage"){I(B=>B==="cover"?B:"cover");return}I(B=>B==="cover"&&oe>=K0?"split":B==="split"&&oe<G0?"cover":B)};if(H(),typeof ResizeObserver>"u")return;const ee=new ResizeObserver(H);return ee.observe($),()=>ee.disconnect()},[$,o]),b.useEffect(()=>{l||A(!1)},[l]),b.useEffect(()=>{e.getToken().then(()=>{m(!0)}).catch(()=>{m(!0)})},[e]);const R=ym({sdk:e,onConversationChange:t==null?void 0:t.onConversationChange,enabled:h}),O=bm({sdk:e,sessionId:R.activeConversationId,onSessionCreated:H=>{R.setActiveConversationId(H)},onStreamStart:t==null?void 0:t.onStreamStart,onStreamEnd:H=>{var ee;(ee=t==null?void 0:t.onStreamEnd)==null||ee.call(t,H),R.loadConversations()},onError:t==null?void 0:t.onError,onMessageSend:t==null?void 0:t.onMessageSend}),z=b.useCallback(H=>{if(H.type==="link"){window.open(H.url,H.target??"_blank","noopener");return}p(H)},[]),D=b.useCallback(()=>p(null),[]),M=b.useRef(0),L=b.useCallback(async H=>{p(null),c(!1);const ee=++M.current;if(O.getLiveMessages(H)){await R.switchConversation(H,{fetchHistory:!1}),O.showSession(H),y(!1);return}y(!0);try{const oe=await R.switchConversation(H);if(M.current!==ee)return;O.showSession(H,oe)}finally{M.current===ee&&y(!1)}},[R,O]),_=b.useCallback(async()=>{p(null),c(!1),O.setMessages([]),await R.newConversation()},[R,O]),V=b.useCallback(async H=>{R.activeConversationId===H&&O.setMessages([]),await R.deleteConversation(H)},[R,O]);b.useEffect(()=>{R.activeConversationId&&O.messages.length===0&&(y(!0),e.getMessages(R.activeConversationId).then(H=>{O.setMessages(H)}).catch(()=>{}).finally(()=>y(!1)))},[]);const X=b.useCallback(()=>{s(H=>!H)},[]),P=b.useCallback(H=>{s(H)},[]),Y=b.useCallback(()=>{c(H=>!H),d(H=>null)},[]),K=b.useCallback(H=>{d(H),c(!0)},[]),T=b.useMemo(()=>{const H=new Set,ee=[];for(const oe of O.messages)if(oe.role==="assistant"&&oe.artifacts)for(const B of Cm(oe.artifacts)){const ie=B.id||`${B.url}:${B.filename}`;H.has(ie)||(H.add(ie),ee.push(B))}return ee},[O.messages]),ne=b.useCallback(async H=>{const ee=R.activeConversationId;if(!ee)return null;try{const oe=await e.getMessages(ee);O.setMessages(oe);const B=H?oe.filter(ie=>ie.role==="assistant"&&ie.roundId===H).pop():oe.findLast(ie=>ie.role==="assistant");return(B==null?void 0:B.messageId)??null}catch{return null}},[e,R.activeConversationId,O]),F=b.useCallback(H=>{if(typeof H!="string")return{messageId:H.messageId,roundId:H.roundId};const ee=O.messages.find(oe=>oe.id===H||oe.messageId===H);return ee?{messageId:ee.messageId,roundId:ee.roundId}:/^(user|assistant)_/.test(H)?{}:{messageId:H}},[O.messages]),U=b.useCallback((H,ee,oe)=>{const{messageId:B,roundId:ie}=F(H);if(B){e.feedback(B,ee,oe).catch(()=>{});return}ne(ie).then(ae=>{ae&&e.feedback(ae,ee,oe).catch(()=>{})})},[e,F,ne]),re=b.useCallback(H=>{const{messageId:ee,roundId:oe}=F(H);if(ee){e.cancelFeedback(ee).catch(()=>{});return}ne(oe).then(B=>{B&&e.cancelFeedback(B).catch(()=>{})})},[e,F,ne]),j=b.useMemo(()=>({sdk:e,status:O.status,error:O.error,messages:O.messages,conversations:R.conversations,activeConversationId:R.activeConversationId,isThreadListOpen:a,isArtifactDrawerOpen:l,allArtifacts:T,activePreviewArtifact:u,activePanel:f,hasMore:R.hasMore,conversationsLoading:R.loading,messagesLoading:w,containerWidth:E,previewLayoutMode:C,isDrawerFullscreen:N,setDrawerFullscreen:A,registerContentEl:k,sendMessage:O.sendMessage,attachmentUploader:n??null,nosUpload:r??null,stop:O.stop,regenerate:O.regenerate,switchConversation:L,newConversation:_,deleteConversation:V,renameConversation:R.renameConversation,loadMoreConversations:R.loadMore,toggleThreadList:X,setThreadListOpen:P,toggleArtifactDrawer:Y,openArtifactPreview:K,openPanel:z,closePanel:D,feedback:U,cancelFeedback:re,respondToInterrupt:O.respondToInterrupt}),[e,O.status,O.error,O.messages,O.sendMessage,O.stop,O.regenerate,O.respondToInterrupt,n,r,R.conversations,R.activeConversationId,R.renameConversation,R.hasMore,R.loadMore,R.loading,a,l,T,u,f,w,E,C,N,L,_,V,X,P,Y,K,z,D,U,re]);return S.jsx(Sm.Provider,{value:j,children:i})}const qt="https://ehr-web.netease.com/ehr-web/erh-super-agent",Gt={recently:`${qt}/recently.svg`,home:`${qt}/home.svg`,mergeWindow:`${qt}/merge_window.svg`,spiltWindow:`${qt}/spilt_window.svg`,close:`${qt}/close.svg`,message:`${qt}/message.svg`,messageCreate:`${qt}/message_create.svg`,customerService:`${qt}/customer_service.svg`,sendSolid:`${qt}/send_solid.svg`,capabilityIcons:[`${qt}/icon1.png`,`${qt}/icon2.png`,`${qt}/icon3.png`],triggerLogo:`${qt}/HRlogo.png`,logo:`${qt}/HRlogo2.png`,assistantAvatarGenerating:`${qt}/profile0.gif`,assistantAvatar:`${qt}/profile1.png`},Ut={TRIGGER_SIZE:56,TRIGGER_RIGHT:20,TRIGGER_BOTTOM:80,DEFAULT_WIDTH:400,DEFAULT_HEIGHT:648,MIN_WIDTH:360,MAX_WIDTH:800,MAX_HEIGHT_RATIO:.95};function Y0({defaultWidth:e=Ut.DEFAULT_WIDTH,defaultHeight:t=Ut.DEFAULT_HEIGHT,sidebarWidth:n=0}={}){const[r,o]=b.useState(e),[i,a]=b.useState({x:0,y:0}),[s,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(null),[p,h]=b.useState(()=>typeof window>"u"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight}),m=b.useRef(!1),w=b.useRef(0),y=b.useRef(r),$=b.useRef(!1),x=b.useRef({x:0,y:0}),E=b.useRef({x:0,y:0}),v=b.useRef(!1),C=b.useRef(null);b.useEffect(()=>{const D=()=>h({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]),b.useEffect(()=>()=>{var D;(D=C.current)==null||D.call(C)},[]);const I=Math.floor(p.height*Ut.MAX_HEIGHT_RATIO),N=Math.min(d||t,I),A=r+n;b.useEffect(()=>{if(!s){const D=p.width-A-20,M=p.height-N-20;a(L=>L.x===D&&L.y===M?L:{x:D,y:M})}},[s,A,N,p]);const k=b.useCallback(D=>{if(c||D.target.closest("button, input, textarea"))return;$.current=!0,v.current=!1,x.current={x:D.clientX,y:D.clientY},E.current={...i};const M=V=>{if(!$.current)return;const X=V.clientX-x.current.x,P=V.clientY-x.current.y;(Math.abs(X)>3||Math.abs(P)>3)&&(v.current=!0),v.current&&(l(!0),a({x:Math.max(-200,Math.min(E.current.x+X,window.innerWidth-100)),y:Math.max(0,Math.min(E.current.y+P,window.innerHeight-48))}))},L=()=>{$.current=!1,_()},_=()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",L),C.current=null};document.addEventListener("mousemove",M),document.addEventListener("mouseup",L),C.current=_},[c,i]),R=b.useCallback(D=>{D.preventDefault(),D.stopPropagation(),m.current=!0,w.current=D.clientX,y.current=r;const M=i.x+r,L=i.y,_=P=>{if(!m.current)return;const Y=P.clientX-w.current;let K=y.current-Y;if(K>Ut.MAX_WIDTH){m.current=!1,u(!0),X();return}K=Math.max(Ut.MIN_WIDTH,K),o(K),a({x:M-K,y:L})},V=()=>{m.current=!1,X()},X=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",V),C.current=null};document.addEventListener("mousemove",_),document.addEventListener("mouseup",V),C.current=X},[r,i]),O=b.useCallback(()=>{c&&o(e),u(D=>!D)},[c,e]),z=b.useCallback(()=>{u(!1),o(e),l(!1),f(null)},[e]);return{width:r,position:i,hasCustomPosition:s,isMaximized:c,lockedHeight:d,viewport:p,defaultHeight:t,totalWidth:A,windowHeight:N,startWindowDrag:k,startResize:R,toggleMaximize:O,setIsMaximized:u,setLockedHeight:f,setHasCustomPosition:l,reset:z}}function Q0(e){const{enabled:t,contentSelector:n,defaultHeight:r,onHeightChange:o}=e,i=b.useRef(null);return b.useEffect(()=>{if(!t||!i.current)return;const s=i.current.querySelector(n);if(!s)return;const l=()=>{const d=i.current;if(!d)return;const f=d.querySelector(n);if(!f)return;const p=d.offsetHeight-f.clientHeight,h=f.scrollHeight+p,m=Math.floor(window.innerHeight*Ut.MAX_HEIGHT_RATIO),w=Math.max(r,Math.min(h,m));o(y=>y===w?y:w)};l();const c=new ResizeObserver(()=>l());Array.from(s.children).forEach(d=>c.observe(d));const u=new MutationObserver(()=>{Array.from(s.children).forEach(d=>c.observe(d)),l()});return u.observe(s,{childList:!0,subtree:!0,characterData:!0}),()=>{c.disconnect(),u.disconnect()}},[t,n,r,o]),i}function Z0(e,t){const n=Ut.TRIGGER_SIZE;return{x:Math.max(8,Math.min(e,window.innerWidth-n-8)),y:Math.max(8,Math.min(t,window.innerHeight-n-8))}}function Em({isOpen:e,onClick:t,triggerLogo:n}){const[r,o]=b.useState(null),i=b.useRef(!1),a=b.useRef(!1),s=b.useRef({x:0,y:0}),l=b.useRef({x:0,y:0}),c=b.useRef(null);b.useEffect(()=>()=>{var p;(p=c.current)==null||p.call(c)},[]);const u=b.useCallback(p=>{if(p.button!==0)return;i.current=!0,a.current=!1,s.current={x:p.clientX,y:p.clientY};const h=p.currentTarget.getBoundingClientRect();l.current={x:h.left,y:h.top};const m=y=>{if(!i.current)return;const $=y.clientX-s.current.x,x=y.clientY-s.current.y;(Math.abs($)>4||Math.abs(x)>4)&&(a.current=!0),a.current&&o(Z0(l.current.x+$,l.current.y+x))},w=()=>{i.current=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",w),c.current=null};document.addEventListener("mousemove",m),document.addEventListener("mouseup",w),c.current=w},[]),d=b.useCallback(()=>{if(a.current){a.current=!1;return}t()},[t]),f=r?{left:r.x,top:r.y,width:Ut.TRIGGER_SIZE,height:Ut.TRIGGER_SIZE}:{right:Ut.TRIGGER_RIGHT,bottom:Ut.TRIGGER_BOTTOM,width:Ut.TRIGGER_SIZE,height:Ut.TRIGGER_SIZE};return S.jsx("button",{type:"button",className:`fixed z-[10000] flex items-center justify-center border-none bg-transparent p-0 transition-transform duration-200 ease-out hover:scale-[1.08] active:scale-95 ${e?"pointer-events-none scale-50 opacity-0":"opacity-100"}`,style:f,onMouseDown:u,onClick:d,"aria-label":"打开 AI 助手",title:"AI 助手",children:S.jsx("img",{src:n||Gt.triggerLogo,alt:"AI 助手",className:"block h-full w-full",draggable:!1})})}function zo({tooltip:e,onClick:t,children:n}){return S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white active:bg-[#F5F5F5]","data-tooltip":e,"aria-label":e,onClick:t,children:n})}function $m({onClose:e,onToggleThreadList:t,isMaximized:n=!1,onToggleMaximize:r,showHome:o=!1,onHome:i,showClose:a=!0,artifactCount:s=0,onToggleArtifactDrawer:l,panelTitle:c}){return S.jsxs("div",{className:"relative z-20 flex h-9 shrink-0 select-none items-center px-[15px]",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx(zo,{tooltip:"历史记录",onClick:t,children:S.jsx("img",{src:Gt.recently,alt:"",width:20,height:20})}),o&&i&&S.jsx(zo,{tooltip:c?"返回聊天":"回到首页",onClick:i,children:S.jsx("img",{src:Gt.home,alt:"",width:20,height:20})})]}),c&&S.jsx("div",{className:"pointer-events-none absolute inset-x-0 flex justify-center",children:S.jsx("span",{className:"max-w-[50%] truncate text-[15px] font-semibold text-[#18181b]",children:c})}),S.jsxs("div",{className:"ml-auto flex items-center gap-2.5",children:[s>0&&l&&S.jsx(zo,{tooltip:"会话产物",onClick:l,children:S.jsxs("span",{className:"relative flex items-center gap-1",children:[S.jsxs("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),s>0&&S.jsx("span",{className:"absolute -right-2 -top-1.5 min-w-[14px] rounded-full bg-[var(--sa-primary)] px-0.5 text-center text-[9px] font-medium leading-[14px] text-white",children:s>99?"99+":s})]})}),r&&S.jsx(zo,{tooltip:n?"小窗":"大窗",onClick:r,children:S.jsx("img",{src:n?Gt.spiltWindow:Gt.mergeWindow,alt:"",width:20,height:20})}),a&&S.jsx(zo,{tooltip:"关闭",onClick:e,children:S.jsx("img",{src:Gt.close,alt:"",width:20,height:20})})]})]})}const Cd="sa-widget-open:";function Oi(e,t){if(!e)return!1;try{if(t===void 0)return sessionStorage.getItem(`${Cd}${e}`)==="1";sessionStorage.setItem(`${Cd}${e}`,t?"1":"0")}catch{}return!!t}const Oo=e=>String(e).padStart(2,"0");function J0(e){if(!e)return"";const t=new Date(e);return isNaN(t.getTime())?"":`${t.getFullYear()}-${Oo(t.getMonth()+1)}-${Oo(t.getDate())} ${Oo(t.getHours())}:${Oo(t.getMinutes())}:${Oo(t.getSeconds())}`}function km(e){const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),r=n-6*864e5,o=[],i=[],a=[];for(const l of e){const c=new Date(l.updateTime).getTime();c>=n?o.push(l):c>=r?i.push(l):a.push(l)}const s=[];return o.length&&s.push({label:"今天",items:o}),i.length&&s.push({label:"最近 7 天",items:i}),a.length&&s.push({label:"更早",items:a}),s}function pl({width:e}){const{conversations:t,activeConversationId:n,switchConversation:r,newConversation:o,deleteConversation:i,renameConversation:a,hasMore:s,loadMoreConversations:l,conversationsLoading:c}=Fn(),[u,d]=b.useState(null),[f,p]=b.useState(""),[h,m]=b.useState(null),w=b.useRef(null),y=b.useCallback((v,C)=>{d(v),p(C??"")},[]),$=b.useCallback(v=>{f.trim()&&a(v,f.trim()),d(null)},[f,a]),x=b.useCallback(()=>{const v=w.current;!v||!s||v.scrollHeight-v.scrollTop-v.clientHeight<50&&l()},[s,l]),E=b.useMemo(()=>km(t),[t]);return S.jsxs("div",{className:"relative z-[5] flex h-full shrink-0 flex-col overflow-visible border-r border-[#ECECEC] bg-[#FAFAFA] p-3 animate-sa-history-in",style:{width:e??200},children:[S.jsxs("button",{type:"button",className:"sa-new-chat mb-4 flex h-8 w-full shrink-0 items-center justify-center gap-2 rounded-md text-[14px] font-medium transition-colors",onClick:o,children:[S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18}),S.jsx("span",{className:"sa-new-chat-text whitespace-nowrap",children:"新建对话"})]}),S.jsxs("div",{ref:w,className:"flex-1 overflow-y-auto",onScroll:x,children:[c&&t.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"加载中..."}),!c&&t.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"暂无记录"}),E.map(v=>S.jsxs("div",{className:"mb-1",children:[S.jsx("div",{className:"px-1 pb-1 pt-2 text-[11px] text-[#A0A0A0]",children:v.label}),v.items.map(C=>S.jsx("div",{className:`group relative mb-0.5 flex h-8 w-full cursor-pointer items-center gap-1 rounded-md px-0.5 text-[13px] transition-colors ${C.sessionId===n?"bg-[#E8F1FE]":"hover:bg-[#E8F1FE]"}`,onClick:()=>{u!==C.sessionId&&r(C.sessionId)},onMouseEnter:I=>{if(u===C.sessionId)return;const N=I.currentTarget.getBoundingClientRect();m({text:C.title||"新会话",x:N.right+8,y:N.top+N.height/2})},onMouseLeave:()=>m(null),children:u===C.sessionId?S.jsx("input",{className:"w-full rounded border border-[var(--sa-primary)] bg-white px-1.5 py-0.5 text-[12px] outline-none",value:f,onChange:I=>p(I.target.value),onBlur:()=>$(C.sessionId),onKeyDown:I=>{I.key==="Enter"&&$(C.sessionId),I.key==="Escape"&&d(null)},onClick:I=>I.stopPropagation(),autoFocus:!0}):S.jsxs(S.Fragment,{children:[S.jsx("img",{src:Gt.message,alt:"",width:16,height:16,className:"shrink-0 opacity-60"}),S.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-[#333]",children:C.title||"新会话"}),S.jsxs("span",{className:"hidden shrink-0 items-center gap-0.5 group-hover:flex",children:[S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[var(--sa-primary)]",onClick:I=>{I.stopPropagation(),y(C.sessionId,C.title)},title:"重命名",children:S.jsx("svg",{width:12,height:12,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})})}),S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[#ef4444]",onClick:I=>{I.stopPropagation(),i(C.sessionId)},title:"删除",children:S.jsx("svg",{width:12,height:12,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})})})]})]})},C.sessionId))]},v.label)),c&&t.length>0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:s?"加载更多...":"加载中..."}),!c&&s&&S.jsx("div",{className:"px-0.5 py-2 text-center text-[11px] text-[#C0C0C0]",children:"向下滚动加载更多"})]}),h&&S.jsx("div",{className:"pointer-events-none fixed z-[10001] whitespace-nowrap rounded border border-[#E8E8E8] bg-white px-2.5 py-1.5 text-[12px] leading-[1.4] text-[#333] shadow-[0_2px_8px_rgba(0,0,0,0.12)]",style:{left:h.x,top:h.y,transform:"translateY(-50%)"},children:h.text})]})}function Im(e){const t=b.useRef(null),n=b.useRef(!1),r=b.useRef(0),o=b.useCallback(()=>{const a=t.current;if(!a)return;const{scrollTop:s,scrollHeight:l,clientHeight:c}=a,u=l-s-c<40;s<r.current&&!u&&(n.current=!0),u&&(n.current=!1),r.current=s},[]);b.useEffect(()=>{const a=t.current;if(a)return a.addEventListener("scroll",o,{passive:!0}),()=>a.removeEventListener("scroll",o)},[o]),b.useEffect(()=>{if(n.current)return;const a=t.current;a&&requestAnimationFrame(()=>{a.scrollTop=a.scrollHeight})},e);const i=b.useCallback(()=>{n.current=!1;const a=t.current;a&&(a.scrollTop=a.scrollHeight)},[]);return{containerRef:t,scrollToBottom:i}}function ey(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ty=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ny=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ry={};function Sd(e,t){return(ry.jsx?ny:ty).test(e)}const oy=/[ \t\n\f\r]/g;function iy(e){return typeof e=="object"?e.type==="text"?Ed(e.value):!1:Ed(e)}function Ed(e){return e.replace(oy,"")===""}let gi=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};gi.prototype.normal={};gi.prototype.property={};gi.prototype.space=void 0;function Rm(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new gi(n,r,t)}function ml(e){return e.toLowerCase()}class dn{constructor(t,n){this.attribute=n,this.property=t}}dn.prototype.attribute="";dn.prototype.booleanish=!1;dn.prototype.boolean=!1;dn.prototype.commaOrSpaceSeparated=!1;dn.prototype.commaSeparated=!1;dn.prototype.defined=!1;dn.prototype.mustUseProperty=!1;dn.prototype.number=!1;dn.prototype.overloadedBoolean=!1;dn.prototype.property="";dn.prototype.spaceSeparated=!1;dn.prototype.space=void 0;let ay=0;const je=Br(),St=Br(),gl=Br(),fe=Br(),lt=Br(),Or=Br(),bn=Br();function Br(){return 2**++ay}const hl=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:St,commaOrSpaceSeparated:bn,commaSeparated:Or,number:fe,overloadedBoolean:gl,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Cs=Object.keys(hl);class tu extends dn{constructor(t,n,r,o){let i=-1;if(super(t,n),$d(this,"space",o),typeof r=="number")for(;++i<Cs.length;){const a=Cs[i];$d(this,Cs[i],(r&hl[a])===hl[a])}}}tu.prototype.defined=!0;function $d(e,t,n){n&&(e[t]=n)}function Co(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new tu(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[ml(r)]=r,n[ml(i.attribute)]=r}return new gi(t,n,e.space)}const Pm=Co({properties:{ariaActiveDescendant:null,ariaAtomic:St,ariaAutoComplete:null,ariaBusy:St,ariaChecked:St,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:St,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:St,ariaFlowTo:lt,ariaGrabbed:St,ariaHasPopup:null,ariaHidden:St,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:fe,ariaLive:null,ariaModal:St,ariaMultiLine:St,ariaMultiSelectable:St,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:St,ariaReadOnly:St,ariaRelevant:null,ariaRequired:St,ariaRoleDescription:lt,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:St,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Tm(e,t){return t in e?e[t]:t}function Nm(e,t){return Tm(e,t.toLowerCase())}const sy=Co({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Or,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alpha:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:lt,autoFocus:je,autoPlay:je,blocking:lt,capture:null,charSet:null,checked:je,cite:null,className:lt,closedBy:null,colorSpace:null,cols:fe,colSpan:fe,command:null,commandFor:null,content:null,contentEditable:St,controls:je,controlsList:lt,coords:fe|Or,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:gl,draggable:St,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:lt,height:fe,hidden:gl,high:fe,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:lt,itemRef:lt,itemScope:je,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:je,optimum:fe,pattern:null,ping:lt,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:lt,required:je,reversed:je,rows:fe,rowSpan:fe,sandbox:lt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootCustomElementRegistry:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shadowRootSerializable:je,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:St,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:St,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:St,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:je,disablePictureInPicture:je,disableRemotePlayback:je,exportParts:Or,part:lt,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:Nm}),ly=Co({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:bn,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Or,g2:Or,glyphName:Or,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:bn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bn,rev:bn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bn,requiredFeatures:bn,requiredFonts:bn,requiredFormats:bn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:bn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bn,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Tm}),Mm=Co({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Am=Co({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nm}),zm=Co({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),cy={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},uy=/[A-Z]/g,kd=/-[a-z]/g,dy=/^data[-\w.:]+$/i;function fy(e,t){const n=ml(t);let r=t,o=dn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&dy.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(kd,my);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!kd.test(i)){let a=i.replace(uy,py);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=tu}return new o(r,t)}function py(e){return"-"+e.toLowerCase()}function my(e){return e.charAt(1).toUpperCase()}const gy=Rm([Pm,sy,Mm,Am,zm],"html"),nu=Rm([Pm,ly,Mm,Am,zm],"svg");function hy(e){return e.join(" ").trim()}var ru={},Id=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,by=/\n/g,xy=/^\s*/,yy=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,wy=/^:\s*/,vy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Cy=/^[;\s]*/,Sy=/^\s+|\s+$/g,Ey=`
|
|
2
|
+
`,Rd="/",Pd="*",Tr="",$y="comment",ky="declaration";function Iy(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(h){var m=h.match(by);m&&(n+=m.length);var w=h.lastIndexOf(Ey);r=~w?h.length-w:r+h.length}function i(){var h={line:n,column:r};return function(m){return m.position=new a(h),c(),m}}function a(h){this.start=h,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(h){var m=h.exec(e);if(m){var w=m[0];return o(w),e=e.slice(w.length),m}}function c(){l(xy)}function u(h){var m;for(h=h||[];m=d();)m!==!1&&h.push(m);return h}function d(){var h=i();if(!(Rd!=e.charAt(0)||Pd!=e.charAt(1))){for(var m=2;Tr!=e.charAt(m)&&(Pd!=e.charAt(m)||Rd!=e.charAt(m+1));)++m;if(m+=2,Tr===e.charAt(m-1))return s("End of comment missing");var w=e.slice(2,m-2);return r+=2,o(w),e=e.slice(m),r+=2,h({type:$y,comment:w})}}function f(){var h=i(),m=l(yy);if(m){if(d(),!l(wy))return s("property missing ':'");var w=l(vy),y=h({type:ky,property:Td(m[0].replace(Id,Tr)),value:w?Td(w[0].replace(Id,Tr)):Tr});return l(Cy),y}}function p(){var h=[];u(h);for(var m;m=f();)m!==!1&&(h.push(m),u(h));return h}return c(),p()}function Td(e){return e?e.replace(Sy,Tr):Tr}var Ry=Iy,Py=zn.commonjsGlobal&&zn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ru,"__esModule",{value:!0});ru.default=Ny;const Ty=Py(Ry);function Ny(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Ty.default)(e),o=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;const{property:a,value:s}=i;o?t(a,s,i):s&&(n=n||{},n[a]=s)}),n}var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0});Ha.camelCase=void 0;var My=/^--[a-zA-Z0-9_-]+$/,Ay=/-([a-z])/g,zy=/^[^-]+$/,Oy=/^-(webkit|moz|ms|o|khtml)-/,Dy=/^-(ms)-/,Ly=function(e){return!e||zy.test(e)||My.test(e)},Fy=function(e,t){return t.toUpperCase()},Nd=function(e,t){return"".concat(t,"-")},_y=function(e,t){return t===void 0&&(t={}),Ly(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Dy,Nd):e=e.replace(Oy,Nd),e.replace(Ay,Fy))};Ha.camelCase=_y;var jy=zn.commonjsGlobal&&zn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},By=jy(ru),Hy=Ha;function bl(e,t){var n={};return!e||typeof e!="string"||(0,By.default)(e,function(r,o){r&&o&&(n[(0,Hy.camelCase)(r,t)]=o)}),n}bl.default=bl;var Vy=bl;const Wy=zn.getDefaultExportFromCjs(Vy),Om=Dm("end"),ou=Dm("start");function Dm(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function qy(e){const t=ou(e),n=Om(e);if(t&&n)return{start:t,end:n}}function Yo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Md(e.position):"start"in e||"end"in e?Md(e):"line"in e||"column"in e?xl(e):""}function xl(e){return Ad(e&&e.line)+":"+Ad(e&&e.column)}function Md(e){return xl(e&&e.start)+"-"+xl(e&&e.end)}function Ad(e){return e&&typeof e=="number"?e:1}class Zt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=s?s.line:void 0,this.name=Yo(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Zt.prototype.file="";Zt.prototype.name="";Zt.prototype.reason="";Zt.prototype.message="";Zt.prototype.stack="";Zt.prototype.column=void 0;Zt.prototype.line=void 0;Zt.prototype.ancestors=void 0;Zt.prototype.cause=void 0;Zt.prototype.fatal=void 0;Zt.prototype.place=void 0;Zt.prototype.ruleId=void 0;Zt.prototype.source=void 0;const iu={}.hasOwnProperty,Xy=new Map,Uy=/[A-Z]/g,Gy=new Set(["table","tbody","thead","tfoot","tr"]),Ky=new Set(["td","th"]),Lm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yy(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ow(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=rw(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?nu:gy,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Fm(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Fm(e,t,n){if(t.type==="element")return Qy(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Zy(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ew(e,t,n);if(t.type==="mdxjsEsm")return Jy(e,t);if(t.type==="root")return tw(e,t,n);if(t.type==="text")return nw(e,t)}function Qy(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=nu,e.schema=o),e.ancestors.push(t);const i=jm(e,t.tagName,!1),a=iw(e,t);let s=su(e,t);return Gy.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!iy(l):!0})),_m(e,a,i,t),au(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Zy(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ri(e,t.position)}function Jy(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ri(e,t.position)}function ew(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=nu,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:jm(e,t.name,!0),a=aw(e,t),s=su(e,t);return _m(e,a,i,t),au(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function tw(e,t,n){const r={};return au(r,su(e,t)),e.create(t,e.Fragment,r,n)}function nw(e,t){return t.value}function _m(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function au(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function rw(e,t,n){return r;function r(o,i,a,s){const c=Array.isArray(a.children)?n:t;return s?c(i,a,s):c(i,a)}}function ow(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=ou(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function iw(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&iu.call(t.properties,o)){const i=sw(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Ky.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function aw(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else ri(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else ri(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function su(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Xy;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=o.get(l)||0;a=l+"-"+c,o.set(l,c+1)}}const s=Fm(e,i,a);s!==void 0&&n.push(s)}return n}function sw(e,t,n){const r=fy(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ey(n):hy(n)),r.property==="style"){let o=typeof n=="object"?n:lw(e,String(n));return e.stylePropertyNameCase==="css"&&(o=cw(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?cy[r.property]||r.property:r.attribute,n]}}function lw(e,t){try{return Wy(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Zt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Lm+"#cannot-parse-style-attribute",o}}function jm(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=Sd(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=a}else r=Sd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return iu.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ri(e)}function ri(e,t){const n=new Zt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Lm+"#cannot-handle-mdx-estrees-without-createevaluater",n}function cw(e){const t={};let n;for(n in e)iu.call(e,n)&&(t[uw(n)]=e[n]);return t}function uw(e){let t=e.replace(Uy,dw);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function dw(e){return"-"+e.toLowerCase()}const Ss={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},fw={};function lu(e,t){const n=fw,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Bm(e,r,o)}function Bm(e,t,n){if(pw(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return zd(e.children,t,n)}return Array.isArray(e)?zd(e,t,n):""}function zd(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Bm(e[o],t,n);return r.join("")}function pw(e){return!!(e&&typeof e=="object")}const Od=document.createElement("i");function cu(e){const t="&"+e+";";Od.innerHTML=t;const n=Od.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wn(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function kn(e,t){return e.length>0?(wn(e,e.length,0,t),e):t}const Dd={}.hasOwnProperty;function Hm(e){const t={};let n=-1;for(;++n<e.length;)mw(t,e[n]);return t}function mw(e,t){let n;for(n in t){const o=(Dd.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Dd.call(o,a)||(o[a]=[]);const s=i[a];gw(o[a],Array.isArray(s)?s:s?[s]:[])}}}function gw(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wn(e,0,0,r)}function Vm(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Mn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=wr(/[A-Za-z]/),Kt=wr(/[\dA-Za-z]/),hw=wr(/[#-'*+\--9=?A-Z^-~]/);function ma(e){return e!==null&&(e<32||e===127)}const yl=wr(/\d/),bw=wr(/[\dA-Fa-f]/),xw=wr(/[!-/:-@[-`{-~]/);function Ae(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}const Va=wr(new RegExp("\\p{P}|\\p{S}","u")),Fr=wr(/\s/);function wr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function So(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&Kt(e.charCodeAt(n+1))&&Kt(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ke(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return We(l)?(e.enter(n),s(l)):t(l)}function s(l){return We(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const yw={tokenize:ww};function ww(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Ae(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const vw={tokenize:Cw},Ld={tokenize:Sw};function Cw(e){const t=this,n=[];let r=0,o,i,a;return s;function s(x){if(r<n.length){const E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,l,c)(x)}return c(x)}function l(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&$();const E=t.events.length;let v=E,C;for(;v--;)if(t.events[v][0]==="exit"&&t.events[v][1].type==="chunkFlow"){C=t.events[v][1].end;break}y(r);let I=E;for(;I<t.events.length;)t.events[I][1].end={...C},I++;return wn(t.events,v+1,0,t.events.slice(E)),t.events.length=I,c(x)}return s(x)}function c(x){if(r===n.length){if(!o)return f(x);if(o.currentConstruct&&o.currentConstruct.concrete)return h(x);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ld,u,d)(x)}function u(x){return o&&$(),y(r),f(x)}function d(x){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,h(x)}function f(x){return t.containerState={},e.attempt(Ld,p,h)(x)}function p(x){return r++,n.push([t.currentConstruct,t.containerState]),f(x)}function h(x){if(x===null){o&&$(),y(0),e.consume(x);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),m(x)}function m(x){if(x===null){w(e.exit("chunkFlow"),!0),y(0),e.consume(x);return}return Ae(x)?(e.consume(x),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(x),m)}function w(x,E){const v=t.sliceStream(x);if(E&&v.push(null),x.previous=i,i&&(i.next=x),i=x,o.defineSkip(x.start),o.write(v),t.parser.lazy[x.start.line]){let C=o.events.length;for(;C--;)if(o.events[C][1].start.offset<a&&(!o.events[C][1].end||o.events[C][1].end.offset>a))return;const I=t.events.length;let N=I,A,k;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(A){k=t.events[N][1].end;break}A=!0}for(y(r),C=I;C<t.events.length;)t.events[C][1].end={...k},C++;wn(t.events,N+1,0,t.events.slice(I)),t.events.length=C}}function y(x){let E=n.length;for(;E-- >x;){const v=n[E];t.containerState=v[1],v[0].exit.call(t,e)}n.length=x}function $(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Sw(e,t,n){return Ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function mo(e){if(e===null||ct(e)||Fr(e))return 1;if(Va(e))return 2}function Wa(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const wl={name:"attention",resolveAll:Ew,tokenize:$w};function Ew(e,t){let n=-1,r,o,i,a,s,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Fd(d,-l),Fd(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=kn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=kn(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=kn(c,Wa(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=kn(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=kn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,wn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $w(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=mo(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const c=e.exit("attentionSequence"),u=mo(l),d=!u||u===2&&o||n.includes(l),f=!o||o===2&&u||n.includes(r);return c._open=!!(i===42?d:d&&(o||!f)),c._close=!!(i===42?f:f&&(u||!d)),t(l)}}function Fd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const kw={name:"autolink",tokenize:Iw};function Iw(e,t,n){let r=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return nn(p)?(e.consume(p),a):p===64?n(p):c(p)}function a(p){return p===43||p===45||p===46||Kt(p)?(r=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Kt(p))&&r++<32?(e.consume(p),s):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ma(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):hw(p)?(e.consume(p),c):n(p)}function u(p){return Kt(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Kt(p))&&r++<63){const h=p===45?f:d;return e.consume(p),h}return n(p)}}const hi={partial:!0,tokenize:Rw};function Rw(e,t,n){return r;function r(i){return We(i)?Ke(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||Ae(i)?t(i):n(i)}}const Wm={continuation:{tokenize:Tw},exit:Nw,name:"blockQuote",tokenize:Pw};function Pw(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return We(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Tw(e,t,n){const r=this;return o;function o(a){return We(a)?Ke(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(Wm,t,n)(a)}}function Nw(e){e.exit("blockQuote")}const qm={name:"characterEscape",tokenize:Mw};function Mw(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return xw(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Xm={name:"characterReference",tokenize:Aw};function Aw(e,t,n){const r=this;let o=0,i,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,a=Kt,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=bw,u):(e.enter("characterReferenceValue"),i=7,a=yl,u(d))}function u(d){if(d===59&&o){const f=e.exit("characterReferenceValue");return a===Kt&&!cu(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&o++<i?(e.consume(d),u):n(d)}}const _d={partial:!0,tokenize:Ow},jd={concrete:!0,name:"codeFenced",tokenize:zw};function zw(e,t,n){const r=this,o={partial:!0,tokenize:v};let i=0,a=0,s;return l;function l(C){return c(C)}function c(C){const I=r.events[r.events.length-1];return i=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,s=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(C)}function u(C){return C===s?(a++,e.consume(C),u):a<3?n(C):(e.exit("codeFencedFenceSequence"),We(C)?Ke(e,d,"whitespace")(C):d(C))}function d(C){return C===null||Ae(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(_d,m,E)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(C))}function f(C){return C===null||Ae(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):We(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,p,"whitespace")(C)):C===96&&C===s?n(C):(e.consume(C),f)}function p(C){return C===null||Ae(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||Ae(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===s?n(C):(e.consume(C),h)}function m(C){return e.attempt(o,E,w)(C)}function w(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return i>0&&We(C)?Ke(e,$,"linePrefix",i+1)(C):$(C)}function $(C){return C===null||Ae(C)?e.check(_d,m,E)(C):(e.enter("codeFlowValue"),x(C))}function x(C){return C===null||Ae(C)?(e.exit("codeFlowValue"),$(C)):(e.consume(C),x)}function E(C){return e.exit("codeFenced"),t(C)}function v(C,I,N){let A=0;return k;function k(M){return C.enter("lineEnding"),C.consume(M),C.exit("lineEnding"),R}function R(M){return C.enter("codeFencedFence"),We(M)?Ke(C,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):O(M)}function O(M){return M===s?(C.enter("codeFencedFenceSequence"),z(M)):N(M)}function z(M){return M===s?(A++,C.consume(M),z):A>=a?(C.exit("codeFencedFenceSequence"),We(M)?Ke(C,D,"whitespace")(M):D(M)):N(M)}function D(M){return M===null||Ae(M)?(C.exit("codeFencedFence"),I(M)):N(M)}}}function Ow(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Es={name:"codeIndented",tokenize:Lw},Dw={partial:!0,tokenize:Fw};function Lw(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),Ke(e,i,"linePrefix",5)(c)}function i(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):Ae(c)?e.attempt(Dw,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Ae(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function Fw(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):Ae(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Ke(e,i,"linePrefix",5)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):Ae(a)?o(a):n(a)}}const _w={name:"codeText",previous:Bw,resolve:jw,tokenize:Hw};function jw(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function Bw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Hw(e,t,n){let r=0,o,i;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(i=e.enter("codeTextSequence"),o=0,u(d)):Ae(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Ae(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",c(d))}}class Vw{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Do(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Do(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Do(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Do(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Do(this.left,n.reverse())}}}function Do(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Um(e){const t={};let n=-1,r,o,i,a,s,l,c;const u=new Vw(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Ww(u,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(a=u.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(u.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(r[1].end={...u.get(o)[1].start},s=u.slice(o,n),s.unshift(r),u.splice(o,n-o+1,s))}}return wn(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Ww(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=n,h=0,m=0;const w=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,w.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),f=w.length;f--;){const y=s.slice(w[f],w[f+1]),$=i.pop();l.push([$,$+y.length-1]),e.splice($,2,y)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}const qw={resolve:Uw,tokenize:Gw},Xw={partial:!0,tokenize:Kw};function Uw(e){return Um(e),e}function Gw(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):Ae(s)?e.check(Xw,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Kw(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ke(e,i,"linePrefix")}function i(a){if(a===null||Ae(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Gm(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(y),e.exit(i),f):y===null||y===32||y===41||ma(y)?n(y):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(s),f(y)):y===null||y===60||Ae(y)?n(y):(e.consume(y),y===92?h:p)}function h(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function m(y){return!u&&(y===null||y===41||ct(y))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(y)):u<c&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||ma(y)?n(y):(e.consume(y),y===92?w:m)}function w(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Km(e,t,n,r,o,i){const a=this;let s=0,l;return c;function c(p){return e.enter(r),e.enter(o),e.consume(p),e.exit(o),e.enter(i),u}function u(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(i),e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):Ae(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Ae(p)||s++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!We(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function Ym(e,t,n,r,o,i){let a;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(o),e.consume(f),e.exit(o),a=f===40?41:f,l):n(f)}function l(f){return f===a?(e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):(e.enter(i),c(f))}function c(f){return f===a?(e.exit(i),l(a)):f===null?n(f):Ae(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ke(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===a||f===null||Ae(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===a||f===92?(e.consume(f),u):u(f)}}function Qo(e,t){let n;return r;function r(o){return Ae(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):We(o)?Ke(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Yw={name:"definition",tokenize:Zw},Qw={partial:!0,tokenize:Jw};function Zw(e,t,n){const r=this;let o;return i;function i(p){return e.enter("definition"),a(p)}function a(p){return Km.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return o=Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return ct(p)?Qo(e,c)(p):c(p)}function c(p){return Gm(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(Qw,d,d)(p)}function d(p){return We(p)?Ke(e,f,"whitespace")(p):f(p)}function f(p){return p===null||Ae(p)?(e.exit("definition"),r.parser.defined.push(o),t(p)):n(p)}}function Jw(e,t,n){return r;function r(s){return ct(s)?Qo(e,o)(s):n(s)}function o(s){return Ym(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return We(s)?Ke(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Ae(s)?t(s):n(s)}}const e1={name:"hardBreakEscape",tokenize:t1};function t1(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return Ae(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const n1={name:"headingAtx",resolve:r1,tokenize:o1};function r1(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wn(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function o1(e,t,n){let r=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||ct(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Ae(u)?(e.exit("atxHeading"),t(u)):We(u)?Ke(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||ct(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const i1=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Bd=["pre","script","style","textarea"],a1={concrete:!0,name:"htmlFlow",resolveTo:c1,tokenize:u1},s1={partial:!0,tokenize:f1},l1={partial:!0,tokenize:d1};function c1(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function u1(e,t,n){const r=this;let o,i,a,s,l;return c;function c(T){return u(T)}function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),f):T===47?(e.consume(T),i=!0,m):T===63?(e.consume(T),o=3,r.interrupt?t:P):nn(T)?(e.consume(T),a=String.fromCharCode(T),w):n(T)}function f(T){return T===45?(e.consume(T),o=2,p):T===91?(e.consume(T),o=5,s=0,h):nn(T)?(e.consume(T),o=4,r.interrupt?t:P):n(T)}function p(T){return T===45?(e.consume(T),r.interrupt?t:P):n(T)}function h(T){const ne="CDATA[";return T===ne.charCodeAt(s++)?(e.consume(T),s===ne.length?r.interrupt?t:O:h):n(T)}function m(T){return nn(T)?(e.consume(T),a=String.fromCharCode(T),w):n(T)}function w(T){if(T===null||T===47||T===62||ct(T)){const ne=T===47,F=a.toLowerCase();return!ne&&!i&&Bd.includes(F)?(o=1,r.interrupt?t(T):O(T)):i1.includes(a.toLowerCase())?(o=6,ne?(e.consume(T),y):r.interrupt?t(T):O(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):i?$(T):x(T))}return T===45||Kt(T)?(e.consume(T),a+=String.fromCharCode(T),w):n(T)}function y(T){return T===62?(e.consume(T),r.interrupt?t:O):n(T)}function $(T){return We(T)?(e.consume(T),$):k(T)}function x(T){return T===47?(e.consume(T),k):T===58||T===95||nn(T)?(e.consume(T),E):We(T)?(e.consume(T),x):k(T)}function E(T){return T===45||T===46||T===58||T===95||Kt(T)?(e.consume(T),E):v(T)}function v(T){return T===61?(e.consume(T),C):We(T)?(e.consume(T),v):x(T)}function C(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,I):We(T)?(e.consume(T),C):N(T)}function I(T){return T===l?(e.consume(T),l=null,A):T===null||Ae(T)?n(T):(e.consume(T),I)}function N(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||ct(T)?v(T):(e.consume(T),N)}function A(T){return T===47||T===62||We(T)?x(T):n(T)}function k(T){return T===62?(e.consume(T),R):n(T)}function R(T){return T===null||Ae(T)?O(T):We(T)?(e.consume(T),R):n(T)}function O(T){return T===45&&o===2?(e.consume(T),L):T===60&&o===1?(e.consume(T),_):T===62&&o===4?(e.consume(T),Y):T===63&&o===3?(e.consume(T),P):T===93&&o===5?(e.consume(T),X):Ae(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(s1,K,z)(T)):T===null||Ae(T)?(e.exit("htmlFlowData"),z(T)):(e.consume(T),O)}function z(T){return e.check(l1,D,K)(T)}function D(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),M}function M(T){return T===null||Ae(T)?z(T):(e.enter("htmlFlowData"),O(T))}function L(T){return T===45?(e.consume(T),P):O(T)}function _(T){return T===47?(e.consume(T),a="",V):O(T)}function V(T){if(T===62){const ne=a.toLowerCase();return Bd.includes(ne)?(e.consume(T),Y):O(T)}return nn(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),V):O(T)}function X(T){return T===93?(e.consume(T),P):O(T)}function P(T){return T===62?(e.consume(T),Y):T===45&&o===2?(e.consume(T),P):O(T)}function Y(T){return T===null||Ae(T)?(e.exit("htmlFlowData"),K(T)):(e.consume(T),Y)}function K(T){return e.exit("htmlFlow"),t(T)}}function d1(e,t,n){const r=this;return o;function o(a){return Ae(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function f1(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(hi,t,n)}}const p1={name:"htmlText",tokenize:m1};function m1(e,t,n){const r=this;let o,i,a;return s;function s(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),l}function l(P){return P===33?(e.consume(P),c):P===47?(e.consume(P),v):P===63?(e.consume(P),x):nn(P)?(e.consume(P),N):n(P)}function c(P){return P===45?(e.consume(P),u):P===91?(e.consume(P),i=0,h):nn(P)?(e.consume(P),$):n(P)}function u(P){return P===45?(e.consume(P),p):n(P)}function d(P){return P===null?n(P):P===45?(e.consume(P),f):Ae(P)?(a=d,_(P)):(e.consume(P),d)}function f(P){return P===45?(e.consume(P),p):d(P)}function p(P){return P===62?L(P):P===45?f(P):d(P)}function h(P){const Y="CDATA[";return P===Y.charCodeAt(i++)?(e.consume(P),i===Y.length?m:h):n(P)}function m(P){return P===null?n(P):P===93?(e.consume(P),w):Ae(P)?(a=m,_(P)):(e.consume(P),m)}function w(P){return P===93?(e.consume(P),y):m(P)}function y(P){return P===62?L(P):P===93?(e.consume(P),y):m(P)}function $(P){return P===null||P===62?L(P):Ae(P)?(a=$,_(P)):(e.consume(P),$)}function x(P){return P===null?n(P):P===63?(e.consume(P),E):Ae(P)?(a=x,_(P)):(e.consume(P),x)}function E(P){return P===62?L(P):x(P)}function v(P){return nn(P)?(e.consume(P),C):n(P)}function C(P){return P===45||Kt(P)?(e.consume(P),C):I(P)}function I(P){return Ae(P)?(a=I,_(P)):We(P)?(e.consume(P),I):L(P)}function N(P){return P===45||Kt(P)?(e.consume(P),N):P===47||P===62||ct(P)?A(P):n(P)}function A(P){return P===47?(e.consume(P),L):P===58||P===95||nn(P)?(e.consume(P),k):Ae(P)?(a=A,_(P)):We(P)?(e.consume(P),A):L(P)}function k(P){return P===45||P===46||P===58||P===95||Kt(P)?(e.consume(P),k):R(P)}function R(P){return P===61?(e.consume(P),O):Ae(P)?(a=R,_(P)):We(P)?(e.consume(P),R):A(P)}function O(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),o=P,z):Ae(P)?(a=O,_(P)):We(P)?(e.consume(P),O):(e.consume(P),D)}function z(P){return P===o?(e.consume(P),o=void 0,M):P===null?n(P):Ae(P)?(a=z,_(P)):(e.consume(P),z)}function D(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||ct(P)?A(P):(e.consume(P),D)}function M(P){return P===47||P===62||ct(P)?A(P):n(P)}function L(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function _(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),V}function V(P){return We(P)?Ke(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):X(P)}function X(P){return e.enter("htmlTextData"),a(P)}}const uu={name:"labelEnd",resolveAll:x1,resolveTo:y1,tokenize:w1},g1={tokenize:v1},h1={tokenize:C1},b1={tokenize:S1};function x1(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&wn(e,0,e.length,n),e}function y1(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",c,t]],s=kn(s,e.slice(i+1,i+r+3)),s=kn(s,[["enter",u,t]]),s=kn(s,Wa(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=kn(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=kn(s,e.slice(a+1)),s=kn(s,[["exit",l,t]]),wn(e,i,e.length,s),e}function w1(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(f){return i?i._inactive?d(f):(a=r.parser.defined.includes(Mn(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(g1,u,a?u:d)(f):f===91?e.attempt(h1,u,a?c:d)(f):a?u(f):d(f)}function c(f){return e.attempt(b1,u,d)(f)}function u(f){return t(f)}function d(f){return i._balanced=!0,n(f)}}function v1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),o}function o(d){return ct(d)?Qo(e,i)(d):i(d)}function i(d){return d===41?u(d):Gm(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return ct(d)?Qo(e,l)(d):u(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?Ym(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return ct(d)?Qo(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function C1(e,t,n){const r=this;return o;function o(s){return Km.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function S1(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const E1={name:"labelStartImage",resolveAll:uu.resolveAll,tokenize:$1};function $1(e,t,n){const r=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const k1={name:"labelStartLink",resolveAll:uu.resolveAll,tokenize:I1};function I1(e,t,n){const r=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const $s={name:"lineEnding",tokenize:R1};function R1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const na={name:"thematicBreak",tokenize:P1};function P1(e,t,n){let r=0,o;return i;function i(c){return e.enter("thematicBreak"),a(c)}function a(c){return o=c,s(c)}function s(c){return c===o?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||Ae(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===o?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),We(c)?Ke(e,s,"whitespace")(c):s(c))}}const ln={continuation:{tokenize:A1},exit:O1,name:"list",tokenize:M1},T1={partial:!0,tokenize:D1},N1={partial:!0,tokenize:z1};function M1(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(p){const h=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:yl(p)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(na,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return yl(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(hi,r.interrupt?n:u,e.attempt(T1,f,d))}function u(p){return r.containerState.initialBlankLine=!0,i++,f(p)}function d(p){return We(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function A1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(hi,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ke(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!We(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(N1,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ke(e,e.attempt(ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function z1(e,t,n){const r=this;return Ke(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function O1(e){e.exit(this.containerState.type)}function D1(e,t,n){const r=this;return Ke(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const a=r.events[r.events.length-1];return!We(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Hd={name:"setextUnderline",resolveTo:L1,tokenize:F1};function L1(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function F1(e,t,n){const r=this;let o;return i;function i(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),o=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===o?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),We(c)?Ke(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ae(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const _1={tokenize:j1};function j1(e){const t=this,n=e.attempt(hi,r,e.attempt(this.parser.constructs.flowInitial,o,Ke(e,e.attempt(this.parser.constructs.flow,o,e.attempt(qw,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const B1={resolveAll:Zm()},H1=Qm("string"),V1=Qm("text");function Qm(e){return{resolveAll:Zm(e==="text"?W1:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(u){return c(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=o[u];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Zm(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function W1(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,l;for(;i--;){const c=o[i];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const q1={42:ln,43:ln,45:ln,48:ln,49:ln,50:ln,51:ln,52:ln,53:ln,54:ln,55:ln,56:ln,57:ln,62:Wm},X1={91:Yw},U1={[-2]:Es,[-1]:Es,32:Es},G1={35:n1,42:na,45:[Hd,na],60:a1,61:Hd,95:na,96:jd,126:jd},K1={38:Xm,92:qm},Y1={[-5]:$s,[-4]:$s,[-3]:$s,33:E1,38:Xm,42:wl,60:[kw,p1],91:k1,92:[e1,qm],93:uu,95:wl,96:_w},Q1={null:[wl,B1]},Z1={null:[42,95]},J1={null:[]},ev=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Z1,contentInitial:X1,disable:J1,document:q1,flow:G1,flowInitial:U1,insideSpan:Q1,string:K1,text:Y1},Symbol.toStringTag,{value:"Module"}));function tv(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:I(v),check:I(C),consume:$,enter:x,exit:E,interrupt:I(C,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:h,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(R){return a=kn(a,R),w(),a[a.length-1]!==null?[]:(N(t,0),c.events=Wa(i,c.events,c),c.events)}function f(R,O){return rv(p(R),O)}function p(R){return nv(a,R)}function h(){const{_bufferIndex:R,_index:O,line:z,column:D,offset:M}=r;return{_bufferIndex:R,_index:O,line:z,column:D,offset:M}}function m(R){o[R.line]=R.column,k()}function w(){let R;for(;r._index<a.length;){const O=a[r._index];if(typeof O=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<O.length;)y(O.charCodeAt(r._bufferIndex));else y(O)}}function y(R){u=u(R)}function $(R){Ae(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,k()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=R}function x(R,O){const z=O||{};return z.type=R,z.start=h(),c.events.push(["enter",z,c]),s.push(z),z}function E(R){const O=s.pop();return O.end=h(),c.events.push(["exit",O,c]),O}function v(R,O){N(R,O.from)}function C(R,O){O.restore()}function I(R,O){return z;function z(D,M,L){let _,V,X,P;return Array.isArray(D)?K(D):"tokenize"in D?K([D]):Y(D);function Y(U){return re;function re(j){const H=j!==null&&U[j],ee=j!==null&&U.null,oe=[...Array.isArray(H)?H:H?[H]:[],...Array.isArray(ee)?ee:ee?[ee]:[]];return K(oe)(j)}}function K(U){return _=U,V=0,U.length===0?L:T(U[V])}function T(U){return re;function re(j){return P=A(),X=U,U.partial||(c.currentConstruct=U),U.name&&c.parser.constructs.disable.null.includes(U.name)?F():U.tokenize.call(O?Object.assign(Object.create(c),O):c,l,ne,F)(j)}}function ne(U){return R(X,P),M}function F(U){return P.restore(),++V<_.length?T(_[V]):L}}}function N(R,O){R.resolveAll&&!i.includes(R)&&i.push(R),R.resolve&&wn(c.events,O,c.events.length-O,R.resolve(c.events.slice(O),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function A(){const R=h(),O=c.previous,z=c.currentConstruct,D=c.events.length,M=Array.from(s);return{from:D,restore:L};function L(){r=R,c.previous=O,c.currentConstruct=z,c.events.length=D,s=M,k()}}function k(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function nv(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function rv(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
|
|
3
3
|
`;break}case-3:{a=`\r
|
|
4
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}function rv(e){const r={constructs:_m([J1,...(e||{}).extensions||[]]),content:o(xw),defined:[],document:o(ww),flow:o(F1),lazy:{},string:o(B1),text:o(H1)};return r;function o(i){return a;function a(s){return ev(r,i,s)}}}function ov(e){for(;!Wm(e););return e}const jd=/[\0\t\n\r]/g;function iv(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let c,u,d,f,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(jd.lastIndex=d,c=jd.exec(i),f=c&&c.index!==void 0?c.index:i.length,p=i.charCodeAt(f),!c){t=i.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(i.slice(d,f)),e+=f-d),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const av=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sv(e){return e.replace(av,lv)}function lv(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return jm(n.slice(i?2:1),i?16:10)}return lu(n)||e}const Ym={}.hasOwnProperty;function cv(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),uv(n)(ov(rv(n).document().write(iv()(e,t,!0))))}function uv(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(he),autolinkProtocol:M,autolinkEmail:M,atxHeading:i(Se),blockQuote:i(te),characterEscape:M,characterReference:M,codeFenced:i(oe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(oe,a),codeText:i(B,a),codeTextData:M,data:M,codeFlowValue:M,definition:i(ie),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(ae),hardBreakEscape:i(ye),hardBreakTrailing:i(ye),htmlFlow:i(U,a),htmlFlowData:M,htmlText:i(U,a),htmlTextData:M,image:i(me),label:a,link:i(he),listItem:i(ue),listItemValue:f,listOrdered:i(se,d),listUnordered:i(se),paragraph:i(pe),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Se),strong:i(Ne),thematicBreak:i(Ie)},exit:{atxHeading:l(),atxHeadingSequence:v,autolink:l(),autolinkEmail:H,autolinkProtocol:_,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:F,characterReferenceMarkerNumeric:F,characterReferenceValue:G,characterReference:re,codeFenced:l(w),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:k,codeIndented:l(y),codeText:l(D),codeTextData:k,data:k,definition:l(),definitionDestinationString:E,definitionLabelString:$,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(O),hardBreakTrailing:l(O),htmlFlow:l(A),htmlFlowData:k,htmlText:l(z),htmlTextData:k,image:l(j),label:q,labelText:V,lineEnding:R,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:J,resourceDestinationString:P,resourceTitleString:Q,resource:X,setextHeading:l(N),setextHeadingLineSequence:I,setextHeadingText:C,strong:l(),thematicBreak:l()}};Qm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let Y={type:"root",children:[]};const le={stack:[Y],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},be=[];let $e=-1;for(;++$e<W.length;)if(W[$e][1].type==="listOrdered"||W[$e][1].type==="listUnordered")if(W[$e][0]==="enter")be.push($e);else{const ce=be.pop();$e=o(W,ce,$e)}for($e=-1;++$e<W.length;){const ce=t[W[$e][0]];Ym.call(ce,W[$e][1].type)&&ce[W[$e][1].type].call(Object.assign({sliceSerialize:W[$e][2].sliceSerialize},le),W[$e][1])}if(le.tokenStack.length>0){const ce=le.tokenStack[le.tokenStack.length-1];(ce[1]||Bd).call(le,void 0,ce[0])}for(Y.position={start:dr(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:dr(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)Y=t.transforms[$e](Y)||Y;return Y}function o(W,Y,le){let be=Y-1,$e=-1,ce=!1,ne,ve,Re,Ge;for(;++be<=le;){const Pe=W[be];switch(Pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pe[0]==="enter"?$e++:$e--,Ge=void 0;break}case"lineEndingBlank":{Pe[0]==="enter"&&(ne&&!Ge&&!$e&&!Re&&(Re=be),Ge=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ge=void 0}if(!$e&&Pe[0]==="enter"&&Pe[1].type==="listItemPrefix"||$e===-1&&Pe[0]==="exit"&&(Pe[1].type==="listUnordered"||Pe[1].type==="listOrdered")){if(ne){let ze=be;for(ve=void 0;ze--;){const Me=W[ze];if(Me[1].type==="lineEnding"||Me[1].type==="lineEndingBlank"){if(Me[0]==="exit")continue;ve&&(W[ve][1].type="lineEndingBlank",ce=!0),Me[1].type="lineEnding",ve=ze}else if(!(Me[1].type==="linePrefix"||Me[1].type==="blockQuotePrefix"||Me[1].type==="blockQuotePrefixWhitespace"||Me[1].type==="blockQuoteMarker"||Me[1].type==="listItemIndent"))break}Re&&(!ve||Re<ve)&&(ne._spread=!0),ne.end=Object.assign({},ve?W[ve][1].start:Pe[1].end),W.splice(ve||be,0,["exit",ne,Pe[2]]),be++,le++}if(Pe[1].type==="listItemPrefix"){const ze={type:"listItem",_spread:!1,start:Object.assign({},Pe[1].start),end:void 0};ne=ze,W.splice(be,0,["enter",ze,Pe[2]]),be++,le++,Re=void 0,Ge=!0}}}return W[Y][1]._spread=ce,le}function i(W,Y){return le;function le(be){s.call(this,W(be),be),Y&&Y.call(this,be)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(W,Y,le){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([Y,le||void 0]),W.position={start:dr(Y.start),end:void 0}}function l(W){return Y;function Y(le){W&&W.call(this,le),c.call(this,le)}}function c(W,Y){const le=this.stack.pop(),be=this.tokenStack.pop();if(be)be[0].type!==W.type&&(Y?Y.call(this,W,be[0]):(be[1]||Bd).call(this,W,be[0]));else throw new Error("Cannot close `"+W.type+"` ("+Ko({start:W.start,end:W.end})+"): it’s not open");le.position.end=dr(W.end)}function u(){return su(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(W){if(this.data.expectingFirstListItemValue){const Y=this.stack[this.stack.length-2];Y.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function p(){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.lang=W}function h(){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.meta=W}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.value=W.replace(/(\r?\n|\r)$/g,"")}function $(W){const Y=this.resume(),le=this.stack[this.stack.length-1];le.label=Y,le.identifier=Mn(this.sliceSerialize(W)).toLowerCase()}function x(){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.title=W}function E(){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.url=W}function v(W){const Y=this.stack[this.stack.length-1];if(!Y.depth){const le=this.sliceSerialize(W).length;Y.depth=le}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function I(W){const Y=this.stack[this.stack.length-1];Y.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function M(W){const le=this.stack[this.stack.length-1].children;let be=le[le.length-1];(!be||be.type!=="text")&&(be=Ee(),be.position={start:dr(W.start),end:void 0},le.push(be)),this.stack.push(be)}function k(W){const Y=this.stack.pop();Y.value+=this.sliceSerialize(W),Y.position.end=dr(W.end)}function R(W){const Y=this.stack[this.stack.length-1];if(this.data.atHardBreak){const le=Y.children[Y.children.length-1];le.position.end=dr(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Y.type)&&(M.call(this,W),k.call(this,W))}function O(){this.data.atHardBreak=!0}function A(){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.value=W}function z(){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.value=W}function D(){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.value=W}function L(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=Y,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function j(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=Y,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function V(W){const Y=this.sliceSerialize(W),le=this.stack[this.stack.length-2];le.label=sv(Y),le.identifier=Mn(Y).toLowerCase()}function q(){const W=this.stack[this.stack.length-1],Y=this.resume(),le=this.stack[this.stack.length-1];if(this.data.inReference=!0,le.type==="link"){const be=W.children;le.children=be}else le.alt=Y}function P(){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.url=W}function Q(){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.title=W}function X(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function J(W){const Y=this.resume(),le=this.stack[this.stack.length-1];le.label=Y,le.identifier=Mn(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function F(W){this.data.characterReferenceType=W.type}function G(W){const Y=this.sliceSerialize(W),le=this.data.characterReferenceType;let be;le?(be=jm(Y,le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):be=lu(Y);const $e=this.stack[this.stack.length-1];$e.value+=be}function re(W){const Y=this.stack.pop();Y.position.end=dr(W.end)}function _(W){k.call(this,W);const Y=this.stack[this.stack.length-1];Y.url=this.sliceSerialize(W)}function H(W){k.call(this,W);const Y=this.stack[this.stack.length-1];Y.url="mailto:"+this.sliceSerialize(W)}function te(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function B(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ae(){return{type:"emphasis",children:[]}}function Se(){return{type:"heading",depth:0,children:[]}}function ye(){return{type:"break"}}function U(){return{type:"html",value:""}}function me(){return{type:"image",title:null,url:"",alt:null}}function he(){return{type:"link",title:null,url:"",children:[]}}function se(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function ue(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function pe(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function Ee(){return{type:"text",value:""}}function Ie(){return{type:"thematicBreak"}}}function dr(e){return{line:e.line,column:e.column,offset:e.offset}}function Qm(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Qm(e,r):dv(e,r)}}function dv(e,t){let n;for(n in t)if(Ym.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Bd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ko({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ko({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ko({start:t.start,end:t.end})+") is still open")}function fv(e){const t=this;t.parser=n;function n(r){return cv(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function pv(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function mv(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
5
|
-
`}]}function
|
|
6
|
-
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function
|
|
4
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}function ov(e){const r={constructs:Hm([ev,...(e||{}).extensions||[]]),content:o(yw),defined:[],document:o(vw),flow:o(_1),lazy:{},string:o(H1),text:o(V1)};return r;function o(i){return a;function a(s){return tv(r,i,s)}}}function iv(e){for(;!Um(e););return e}const Vd=/[\0\t\n\r]/g;function av(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let c,u,d,f,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(Vd.lastIndex=d,c=Vd.exec(i),f=c&&c.index!==void 0?c.index:i.length,p=i.charCodeAt(f),!c){t=i.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(i.slice(d,f)),e+=f-d),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const sv=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lv(e){return e.replace(sv,cv)}function cv(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return Vm(n.slice(i?2:1),i?16:10)}return cu(n)||e}const Jm={}.hasOwnProperty;function uv(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),dv(n)(iv(ov(n).document().write(av()(e,t,!0))))}function dv(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(he),autolinkProtocol:A,autolinkEmail:A,atxHeading:i(Se),blockQuote:i(ee),characterEscape:A,characterReference:A,codeFenced:i(oe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(oe,a),codeText:i(B,a),codeTextData:A,data:A,codeFlowValue:A,definition:i(ie),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(ae),hardBreakEscape:i(ye),hardBreakTrailing:i(ye),htmlFlow:i(q,a),htmlFlowData:A,htmlText:i(q,a),htmlTextData:A,image:i(me),label:a,link:i(he),listItem:i(ue),listItemValue:f,listOrdered:i(se,d),listUnordered:i(se),paragraph:i(pe),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Se),strong:i(Ne),thematicBreak:i(Ie)},exit:{atxHeading:l(),atxHeadingSequence:v,autolink:l(),autolinkEmail:H,autolinkProtocol:j,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:F,characterReferenceMarkerNumeric:F,characterReferenceValue:U,characterReference:re,codeFenced:l(w),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:k,codeIndented:l(y),codeText:l(M),codeTextData:k,data:k,definition:l(),definitionDestinationString:E,definitionLabelString:$,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(O),hardBreakTrailing:l(O),htmlFlow:l(z),htmlFlowData:k,htmlText:l(D),htmlTextData:k,image:l(_),label:X,labelText:V,lineEnding:R,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ne,resourceDestinationString:P,resourceTitleString:Y,resource:K,setextHeading:l(N),setextHeadingLineSequence:I,setextHeadingText:C,strong:l(),thematicBreak:l()}};eg(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let Q={type:"root",children:[]};const le={stack:[Q],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},be=[];let $e=-1;for(;++$e<W.length;)if(W[$e][1].type==="listOrdered"||W[$e][1].type==="listUnordered")if(W[$e][0]==="enter")be.push($e);else{const ce=be.pop();$e=o(W,ce,$e)}for($e=-1;++$e<W.length;){const ce=t[W[$e][0]];Jm.call(ce,W[$e][1].type)&&ce[W[$e][1].type].call(Object.assign({sliceSerialize:W[$e][2].sliceSerialize},le),W[$e][1])}if(le.tokenStack.length>0){const ce=le.tokenStack[le.tokenStack.length-1];(ce[1]||Wd).call(le,void 0,ce[0])}for(Q.position={start:dr(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:dr(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)Q=t.transforms[$e](Q)||Q;return Q}function o(W,Q,le){let be=Q-1,$e=-1,ce=!1,te,ve,Re,Ue;for(;++be<=le;){const Pe=W[be];switch(Pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pe[0]==="enter"?$e++:$e--,Ue=void 0;break}case"lineEndingBlank":{Pe[0]==="enter"&&(te&&!Ue&&!$e&&!Re&&(Re=be),Ue=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ue=void 0}if(!$e&&Pe[0]==="enter"&&Pe[1].type==="listItemPrefix"||$e===-1&&Pe[0]==="exit"&&(Pe[1].type==="listUnordered"||Pe[1].type==="listOrdered")){if(te){let ze=be;for(ve=void 0;ze--;){const Me=W[ze];if(Me[1].type==="lineEnding"||Me[1].type==="lineEndingBlank"){if(Me[0]==="exit")continue;ve&&(W[ve][1].type="lineEndingBlank",ce=!0),Me[1].type="lineEnding",ve=ze}else if(!(Me[1].type==="linePrefix"||Me[1].type==="blockQuotePrefix"||Me[1].type==="blockQuotePrefixWhitespace"||Me[1].type==="blockQuoteMarker"||Me[1].type==="listItemIndent"))break}Re&&(!ve||Re<ve)&&(te._spread=!0),te.end=Object.assign({},ve?W[ve][1].start:Pe[1].end),W.splice(ve||be,0,["exit",te,Pe[2]]),be++,le++}if(Pe[1].type==="listItemPrefix"){const ze={type:"listItem",_spread:!1,start:Object.assign({},Pe[1].start),end:void 0};te=ze,W.splice(be,0,["enter",ze,Pe[2]]),be++,le++,Re=void 0,Ue=!0}}}return W[Q][1]._spread=ce,le}function i(W,Q){return le;function le(be){s.call(this,W(be),be),Q&&Q.call(this,be)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(W,Q,le){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([Q,le||void 0]),W.position={start:dr(Q.start),end:void 0}}function l(W){return Q;function Q(le){W&&W.call(this,le),c.call(this,le)}}function c(W,Q){const le=this.stack.pop(),be=this.tokenStack.pop();if(be)be[0].type!==W.type&&(Q?Q.call(this,W,be[0]):(be[1]||Wd).call(this,W,be[0]));else throw new Error("Cannot close `"+W.type+"` ("+Yo({start:W.start,end:W.end})+"): it’s not open");le.position.end=dr(W.end)}function u(){return lu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(W){if(this.data.expectingFirstListItemValue){const Q=this.stack[this.stack.length-2];Q.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function p(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.lang=W}function h(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.meta=W}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.value=W.replace(/(\r?\n|\r)$/g,"")}function $(W){const Q=this.resume(),le=this.stack[this.stack.length-1];le.label=Q,le.identifier=Mn(this.sliceSerialize(W)).toLowerCase()}function x(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.title=W}function E(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.url=W}function v(W){const Q=this.stack[this.stack.length-1];if(!Q.depth){const le=this.sliceSerialize(W).length;Q.depth=le}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function I(W){const Q=this.stack[this.stack.length-1];Q.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function A(W){const le=this.stack[this.stack.length-1].children;let be=le[le.length-1];(!be||be.type!=="text")&&(be=Ee(),be.position={start:dr(W.start),end:void 0},le.push(be)),this.stack.push(be)}function k(W){const Q=this.stack.pop();Q.value+=this.sliceSerialize(W),Q.position.end=dr(W.end)}function R(W){const Q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const le=Q.children[Q.children.length-1];le.position.end=dr(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Q.type)&&(A.call(this,W),k.call(this,W))}function O(){this.data.atHardBreak=!0}function z(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.value=W}function D(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.value=W}function M(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.value=W}function L(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=Q,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function _(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=Q,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function V(W){const Q=this.sliceSerialize(W),le=this.stack[this.stack.length-2];le.label=lv(Q),le.identifier=Mn(Q).toLowerCase()}function X(){const W=this.stack[this.stack.length-1],Q=this.resume(),le=this.stack[this.stack.length-1];if(this.data.inReference=!0,le.type==="link"){const be=W.children;le.children=be}else le.alt=Q}function P(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.url=W}function Y(){const W=this.resume(),Q=this.stack[this.stack.length-1];Q.title=W}function K(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ne(W){const Q=this.resume(),le=this.stack[this.stack.length-1];le.label=Q,le.identifier=Mn(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function F(W){this.data.characterReferenceType=W.type}function U(W){const Q=this.sliceSerialize(W),le=this.data.characterReferenceType;let be;le?(be=Vm(Q,le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):be=cu(Q);const $e=this.stack[this.stack.length-1];$e.value+=be}function re(W){const Q=this.stack.pop();Q.position.end=dr(W.end)}function j(W){k.call(this,W);const Q=this.stack[this.stack.length-1];Q.url=this.sliceSerialize(W)}function H(W){k.call(this,W);const Q=this.stack[this.stack.length-1];Q.url="mailto:"+this.sliceSerialize(W)}function ee(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function B(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ae(){return{type:"emphasis",children:[]}}function Se(){return{type:"heading",depth:0,children:[]}}function ye(){return{type:"break"}}function q(){return{type:"html",value:""}}function me(){return{type:"image",title:null,url:"",alt:null}}function he(){return{type:"link",title:null,url:"",children:[]}}function se(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function ue(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function pe(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function Ee(){return{type:"text",value:""}}function Ie(){return{type:"thematicBreak"}}}function dr(e){return{line:e.line,column:e.column,offset:e.offset}}function eg(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?eg(e,r):fv(e,r)}}function fv(e,t){let n;for(n in t)if(Jm.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Wd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Yo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Yo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Yo({start:t.start,end:t.end})+") is still open")}function pv(e){const t=this;t.parser=n;function n(r){return uv(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function mv(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gv(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
5
|
+
`}]}function hv(e,t){const n=t.value?t.value+`
|
|
6
|
+
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function bv(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xv(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yv(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=So(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function wv(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vv(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function tg(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function Cv(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tg(e,t);const o={src:So(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function Sv(e,t){const n={src:So(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ev(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function $v(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tg(e,t);const o={href:So(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function kv(e,t){const n={href:So(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Iv(e,t,n){const r=e.all(t),o=n?Rv(n):ng(t),i={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
|
|
7
7
|
`}),u.type==="element"&&u.tagName==="p"&&!o?a.push(...u.children):a.push(u)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
8
|
-
`});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)}function
|
|
8
|
+
`});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)}function Rv(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ng(n[r])}return t}function ng(e){const t=e.spread;return t??e.children.length>1}function Pv(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Tv(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nv(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Mv(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Av(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=ou(t.children[1]),l=Om(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function zv(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<s;){const d=t.children[l],f={},p=a?a[l]:void 0;p&&(f.align=p);let h={type:"element",tagName:i,properties:f,children:[]};d&&(h.children=e.all(d),e.patch(d,h),h=e.applyData(d,h)),c.push(h)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function Ov(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qd=9,Xd=32;function Dv(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Ud(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Ud(t.slice(o),o>0,!1)),i.join("")}function Ud(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===qd||i===Xd;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===qd||i===Xd;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function Lv(e,t){const n={type:"text",value:Dv(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Fv(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const _v={blockquote:mv,break:gv,code:hv,delete:bv,emphasis:xv,footnoteReference:yv,heading:wv,html:vv,imageReference:Cv,image:Sv,inlineCode:Ev,linkReference:$v,link:kv,listItem:Iv,list:Pv,paragraph:Tv,root:Nv,strong:Mv,table:Av,tableCell:Ov,tableRow:zv,text:Lv,thematicBreak:Fv,toml:Di,yaml:Di,definition:Di,footnoteDefinition:Di};function Di(){}const rg=-1,qa=0,Zo=1,ga=2,du=3,fu=4,pu=5,mu=6,og=7,ig=8,{defineProperty:jv}=Object,ag=typeof self=="object"?self:globalThis,Gd=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ag[e](t)},Bv=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case qa:case rg:return n(a,o);case Zo:{const s=n([],o);for(const l of a)s.push(r(l));return s}case ga:{const s=n({},o);for(const[l,c]of a){const u=r(l),d=r(c);u==="__proto__"?jv(s,u,{value:d,configurable:!0,enumerable:!0,writable:!0}):s[u]=d}return s}case du:return n(new Date(a),o);case fu:{const{source:s,flags:l}=a;return n(new RegExp(s,l),o)}case pu:{const s=n(new Map,o);for(const[l,c]of a)s.set(r(l),r(c));return s}case mu:{const s=n(new Set,o);for(const l of a)s.add(r(l));return s}case og:{const{name:s,message:l}=a;return n(typeof ag[s]=="function"?Gd(s,l):new Error(l),o)}case ig:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:s}=new Uint8Array(a);return n(new DataView(s),a)}case"-0":return-0}return n(Gd(i,a),o)};return r},Kd=e=>Bv(new Map,e)(0),Pr="",{toString:Hv}={},{keys:Vv,is:Wv}=Object,Lo=e=>{const t=typeof e;if(t!=="object"||!e)return[qa,t];const n=Hv.call(e).slice(8,-1);switch(n){case"Array":return[Zo,Pr];case"Object":return[ga,Pr];case"Date":return[du,Pr];case"RegExp":return[fu,Pr];case"Map":return[pu,Pr];case"Set":return[mu,Pr];case"DataView":return[Zo,n]}return n.includes("Array")?[Zo,n]:e instanceof Error?[og,e.name||"Error"]:[ga,n]},Li=([e,t])=>e===qa&&(t==="function"||t==="symbol"),qv=(e,t,n,r)=>{const o=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},i=a=>{if(n.has(a))return n.get(a);let[s,l]=Lo(a);switch(s){case qa:{let u=a;switch(l){case"bigint":s=ig,u=a.toString();break;case"number":if(!a&&Wv(a,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return o([rg],a)}return o([s,u],a)}case Zo:{if(l){let f=a;return l==="DataView"?f=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(a)),o([l,[...f]],a)}const u=[],d=o([s,u],a);for(const f of a)u.push(i(f));return d}case ga:{if(l)switch(l){case"BigInt":return o([l,a.toString()],a);case"Boolean":case"Number":case"String":return o([l,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const u=[],d=o([s,u],a);for(const f of Vv(a))(e||!Li(Lo(a[f])))&&u.push([i(f),i(a[f])]);return d}case du:return o([s,isNaN(a.getTime())?Pr:a.toISOString()],a);case fu:{const{source:u,flags:d}=a;return o([s,{source:u,flags:d}],a)}case pu:{const u=[],d=o([s,u],a);for(const[f,p]of a)(e||!(Li(Lo(f))||Li(Lo(p))))&&u.push([i(f),i(p)]);return d}case mu:{const u=[],d=o([s,u],a);for(const f of a)(e||!Li(Lo(f)))&&u.push(i(f));return d}}const{message:c}=a;return o([s,{name:l,message:c}],a)};return i},Yd=(e,{json:t,lossy:n}={})=>{const r=[];return qv(!(t||n),!!t,new Map,r)(e),r},ha=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Kd(Yd(e,t)):structuredClone(e):(e,t)=>Kd(Yd(e,t));function Xv(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Uv(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Gv(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Xv,r=e.options.footnoteBackLabel||Uv,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),f=So(d.toLowerCase());let p=0;const h=[],m=e.footnoteCounts.get(d);for(;m!==void 0&&++p<=m;){h.length>0&&h.push({type:"text",value:" "});let $=typeof n=="string"?n:n(l,p);typeof $=="string"&&($={type:"text",value:$}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray($)?$:[$]})}const w=u[u.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const $=w.children[w.children.length-1];$&&$.type==="text"?$.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...h)}else u.push(...h);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(u,!0)};e.patch(c,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...ha(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
9
9
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
10
|
-
`}]}}const
|
|
10
|
+
`}]}}const Xa=function(e){if(e==null)return Zv;if(typeof e=="function")return Ua(e);if(typeof e=="object")return Array.isArray(e)?Kv(e):Yv(e);if(typeof e=="string")return Qv(e);throw new Error("Expected function, string, or object as test")};function Kv(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Xa(e[n]);return Ua(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function Yv(e){const t=e;return Ua(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function Qv(e){return Ua(t);function t(n){return n&&n.type===e}}function Ua(e){return t;function t(n,r,o){return!!(Jv(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function Zv(){return!0}function Jv(e){return e!==null&&typeof e=="object"&&"type"in e}const sg=[],eC=!0,vl=!1,tC="skip";function lg(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Xa(o),a=r?-1:1;s(e,void 0,[])();function s(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=sg,h,m,w;if((!t||i(l,c,u[u.length-1]||void 0))&&(p=nC(n(l,u)),p[0]===vl))return p;if("children"in l&&l.children){const y=l;if(y.children&&p[0]!==tC)for(m=(r?y.children.length:-1)+a,w=u.concat(y);m>-1&&m<y.children.length;){const $=y.children[m];if(h=s($,m,w)(),h[0]===vl)return h;m=typeof h[1]=="number"?h[1]:m+a}}return p}}}function nC(e){return Array.isArray(e)?e:typeof e=="number"?[eC,e]:e==null?sg:[e]}function gu(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),lg(e,i,s,o);function s(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return a(l,d,u)}}const Cl={}.hasOwnProperty,rC={};function oC(e,t){const n=t||rC,r=new Map,o=new Map,i=new Map,a={..._v,...n.handlers},s={all:c,applyData:aC,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:iC,wrap:lC};return gu(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:o,f=String(u.identifier).toUpperCase();d.has(f)||d.set(f,u)}}),s;function l(u,d){const f=u.type,p=s.handlers[f];if(Cl.call(s.handlers,f)&&p)return p(s,u,d);if(s.options.passThrough&&s.options.passThrough.includes(f)){if("children"in u){const{children:m,...w}=u,y=ha(w);return y.children=s.all(u),y}return ha(u)}return(s.options.unknownHandler||sC)(s,u,d)}function c(u){const d=[];if("children"in u){const f=u.children;let p=-1;for(;++p<f.length;){const h=s.one(f[p],u);if(h){if(p&&f[p-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=Qd(h.value)),!Array.isArray(h)&&h.type==="element")){const m=h.children[0];m&&m.type==="text"&&(m.value=Qd(m.value))}Array.isArray(h)?d.push(...h):d.push(h)}}}return d}}function iC(e,t){e.position&&(t.position=qy(e))}function aC(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,ha(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function sC(e,t){const n=t.data||{},r="value"in t&&!(Cl.call(n,"hProperties")||Cl.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lC(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
11
11
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
12
12
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
13
|
-
`}),n}function
|
|
14
|
-
`},o),i}function lC(e,t){return e&&"run"in e?async function(n,r){const o=Kd(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Kd(n,{file:r,...e||t})}}function Yd(e){if(e)throw e}var na=Object.prototype.hasOwnProperty,ag=Object.prototype.toString,Qd=Object.defineProperty,Zd=Object.getOwnPropertyDescriptor,Jd=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ag.call(t)==="[object Array]"},ef=function(t){if(!t||ag.call(t)!=="[object Object]")return!1;var n=na.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&na.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||na.call(t,o)},tf=function(t,n){Qd&&n.name==="__proto__"?Qd(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},nf=function(t,n){if(n==="__proto__")if(na.call(t,n)){if(Zd)return Zd(t,n).value}else return;return t[n]},cC=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=nf(s,n),o=nf(t,n),s!==o&&(u&&o&&(ef(o)||(i=Jd(o)))?(i?(i=!1,a=r&&Jd(r)?r:[]):a=r&&ef(r)?r:{},tf(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&tf(s,{name:n,newValue:o}));return s};const $s=zn.getDefaultExportFromCjs(cC);function Cl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function uC(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...c){const u=e[++i];let d=-1;if(l){a(l);return}for(;++d<o.length;)(c[d]===null||c[d]===void 0)&&(c[d]=o[d]);o=c,u?dC(u,s)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function dC(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return o(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const Wn={basename:fC,dirname:pC,extname:mC,join:gC,sep:"/"};function fC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');hi(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function pC(e){if(hi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function mC(e){hi(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function gC(...e){let t=-1,n;for(;++t<e.length;)hi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":hC(n)}function hC(e){hi(e);const t=e.codePointAt(0)===47;let n=bC(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bC(e,t){let n="",r=0,o=-1,i=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function hi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xC={cwd:yC};function yC(){return"/"}function Sl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function wC(e){if(typeof e=="string")e=new URL(e);else if(!Sl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return vC(e)}function vC(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ks=["history","path","basename","stem","extname","dirname"];class sg{constructor(t){let n;t?Sl(t)?n={path:t}:typeof t=="string"||CC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":xC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ks.length;){const i=ks[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)ks.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Wn.basename(this.path):void 0}set basename(t){Rs(t,"basename"),Is(t,"basename"),this.path=Wn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Wn.dirname(this.path):void 0}set dirname(t){rf(this.basename,"dirname"),this.path=Wn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Wn.extname(this.path):void 0}set extname(t){if(Is(t,"extname"),rf(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Wn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Sl(t)&&(t=wC(t)),Rs(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Wn.basename(this.path,this.extname):void 0}set stem(t){Rs(t,"stem"),Is(t,"stem"),this.path=Wn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Zt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Is(e,t){if(e&&e.includes(Wn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Wn.sep+"`")}function Rs(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function rf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function CC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const SC=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},EC={}.hasOwnProperty;class gu extends SC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=uC()}copy(){const t=new gu;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data($s(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ns("data",this.frozen),this.namespace[t]=n,this):EC.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ns("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Li(t),r=this.parser||this.Parser;return Ps("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ps("process",this.parser||this.Parser),Ts("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Li(t),l=r.parse(s);r.run(l,s,function(u,d,f){if(u||!d||!f)return c(u);const p=d,h=r.stringify(p,f);IC(h)?f.value=h:f.result=h,c(u,f)});function c(u,d){u||!d?a(u):i?i(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Ps("processSync",this.parser||this.Parser),Ts("processSync",this.compiler||this.Compiler),this.process(t,o),af("processSync","process",n),r;function o(i,a){n=!0,Yd(i),r=a}}run(t,n,r){of(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=Li(n);o.run(t,l,c);function c(u,d,f){const p=d||t;u?s(u):a?a(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),af("runSync","run",r),o;function i(a,s){Yd(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Li(n),o=this.compiler||this.Compiler;return Ts("stringify",o),of(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Ns("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(o.settings=$s(!0,o.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];i(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...u]);else if(u.length>0){let[p,...h]=u;const m=r[f][1];Cl(m)&&Cl(p)&&(p=$s(!0,m,p)),r[f]=[c,p,...h]}}}}const $C=new gu().freeze();function Ps(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ts(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ns(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function of(e){if(!Cl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function af(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Li(e){return kC(e)?e:new sg(e)}function kC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function IC(e){return typeof e=="string"||RC(e)}function RC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const PC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sf=[],lf={allowDangerousHtml:!0},TC=/^(https?|ircs?|mailto|xmpp)$/i,NC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function lg(e){const t=MC(e),n=AC(e);return zC(t.runSync(t.parse(n),n),e)}function MC(e){const t=e.rehypePlugins||sf,n=e.remarkPlugins||sf,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lf}:lf;return $C().use(fv).use(n).use(lC,r).use(t)}function AC(e){const t=e.children||"",n=new sg;return typeof t=="string"&&(n.value=t),n}function zC(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||OC;for(const u of NC)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+PC+u.id,void 0);return mu(e,c),Ky(e,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function c(u,d,f){if(u.type==="raw"&&f&&typeof d=="number")return a?f.children.splice(d,1):f.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let p;for(p in Cs)if(Object.hasOwn(Cs,p)&&Object.hasOwn(u.properties,p)){const h=u.properties[p],m=Cs[p];(m===null||m.includes(u.tagName))&&(u.properties[p]=l(String(h||""),p,u))}}if(u.type==="element"){let p=n?!n.includes(u.tagName):i?i.includes(u.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(u,d,f)),p&&f&&typeof d=="number")return s&&u.children?f.children.splice(d,1,...u.children):f.children.splice(d,1),d}}}function OC(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||TC.test(e.slice(0,t))?e:""}function cf(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function DC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function LC(e,t,n){const o=qa((n||{}).ignore||[]),i=FC(t);let a=-1;for(;++a<i.length;)ig(e,"text",s);function s(c,u){let d=-1,f;for(;++d<u.length;){const p=u[d],h=f?f.children:void 0;if(o(p,h?h.indexOf(p):void 0,f))return;f=p}if(f)return l(c,u)}function l(c,u){const d=u[u.length-1],f=i[a][0],p=i[a][1];let h=0;const w=d.children.indexOf(c);let y=!1,$=[];f.lastIndex=0;let x=f.exec(c.value);for(;x;){const E=x.index,v={index:x.index,input:x.input,stack:[...u,c]};let C=p(...x,v);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?f.lastIndex=E+1:(h!==E&&$.push({type:"text",value:c.value.slice(h,E)}),Array.isArray(C)?$.push(...C):C&&$.push(C),h=E+x[0].length,y=!0),!f.global)break;x=f.exec(c.value)}return y?(h<c.value.length&&$.push({type:"text",value:c.value.slice(h)}),d.children.splice(w,1,...$)):$=[c],w+$.length}}function FC(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([_C(o[0]),jC(o[1])])}return t}function _C(e){return typeof e=="string"?new RegExp(DC(e),"g"):e}function jC(e){return typeof e=="function"?e:function(){return e}}const Ms="phrasing",As=["autolink","link","image","label"];function BC(){return{transforms:[GC],enter:{literalAutolink:VC,literalAutolinkEmail:zs,literalAutolinkHttp:zs,literalAutolinkWww:zs},exit:{literalAutolink:UC,literalAutolinkEmail:XC,literalAutolinkHttp:WC,literalAutolinkWww:qC}}}function HC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ms,notInConstruct:As},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ms,notInConstruct:As},{character:":",before:"[ps]",after:"\\/",inConstruct:Ms,notInConstruct:As}]}}function VC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function zs(e){this.config.enter.autolinkProtocol.call(this,e)}function WC(e){this.config.exit.autolinkProtocol.call(this,e)}function qC(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function XC(e){this.config.exit.autolinkEmail.call(this,e)}function UC(e){this.exit(e)}function GC(e){LC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,KC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),YC]],{ignore:["link","linkReference"]})}function KC(e,t,n,r,o){let i="";if(!cg(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!QC(n)))return!1;const a=ZC(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function YC(e,t,n,r){return!cg(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function QC(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ZC(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=cf(e,"(");let i=cf(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function cg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Fr(n)||Ha(n))&&(!t||n!==47)}ug.peek=sS;function JC(){this.buffer()}function eS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function tS(){this.buffer()}function nS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function rS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function oS(e){this.exit(e)}function iS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function aS(e){this.exit(e)}function sS(){return"["}function ug(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function lS(){return{enter:{gfmFootnoteCallString:JC,gfmFootnoteCall:eS,gfmFootnoteDefinitionLabelString:tS,gfmFootnoteDefinition:nS},exit:{gfmFootnoteCallString:rS,gfmFootnoteCall:oS,gfmFootnoteDefinitionLabelString:iS,gfmFootnoteDefinition:aS}}}function cS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ug},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,i,a){const s=i.createTracker(a);let l=s.move("[^");const c=i.enter("footnoteDefinition"),u=i.enter("label");return l+=s.move(i.safe(i.associationId(r),{before:l,after:"]"})),u(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
15
|
-
`:" ")+i.indentLines(i.containerFlow(r,s.current()),t?
|
|
16
|
-
`)}function
|
|
17
|
-
`&&
|
|
18
|
-
`}function
|
|
13
|
+
`}),n}function Qd(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Zd(e,t){const n=oC(e,t),r=n.one(e,void 0),o=Gv(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
|
|
14
|
+
`},o),i}function cC(e,t){return e&&"run"in e?async function(n,r){const o=Zd(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Zd(n,{file:r,...e||t})}}function Jd(e){if(e)throw e}var ra=Object.prototype.hasOwnProperty,cg=Object.prototype.toString,ef=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,nf=function(t){return typeof Array.isArray=="function"?Array.isArray(t):cg.call(t)==="[object Array]"},rf=function(t){if(!t||cg.call(t)!=="[object Object]")return!1;var n=ra.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ra.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||ra.call(t,o)},of=function(t,n){ef&&n.name==="__proto__"?ef(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},af=function(t,n){if(n==="__proto__")if(ra.call(t,n)){if(tf)return tf(t,n).value}else return;return t[n]},uC=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=af(s,n),o=af(t,n),s!==o&&(u&&o&&(rf(o)||(i=nf(o)))?(i?(i=!1,a=r&&nf(r)?r:[]):a=r&&rf(r)?r:{},of(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&of(s,{name:n,newValue:o}));return s};const ks=zn.getDefaultExportFromCjs(uC);function Sl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dC(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...c){const u=e[++i];let d=-1;if(l){a(l);return}for(;++d<o.length;)(c[d]===null||c[d]===void 0)&&(c[d]=o[d]);o=c,u?fC(u,s)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function fC(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return o(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const Wn={basename:pC,dirname:mC,extname:gC,join:hC,sep:"/"};function pC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');bi(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function mC(e){if(bi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gC(e){bi(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function hC(...e){let t=-1,n;for(;++t<e.length;)bi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":bC(n)}function bC(e){bi(e);const t=e.codePointAt(0)===47;let n=xC(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function xC(e,t){let n="",r=0,o=-1,i=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function bi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yC={cwd:wC};function wC(){return"/"}function El(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function vC(e){if(typeof e=="string")e=new URL(e);else if(!El(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return CC(e)}function CC(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Is=["history","path","basename","stem","extname","dirname"];class ug{constructor(t){let n;t?El(t)?n={path:t}:typeof t=="string"||SC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":yC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Is.length;){const i=Is[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)Is.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Wn.basename(this.path):void 0}set basename(t){Ps(t,"basename"),Rs(t,"basename"),this.path=Wn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Wn.dirname(this.path):void 0}set dirname(t){sf(this.basename,"dirname"),this.path=Wn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Wn.extname(this.path):void 0}set extname(t){if(Rs(t,"extname"),sf(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Wn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){El(t)&&(t=vC(t)),Ps(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Wn.basename(this.path,this.extname):void 0}set stem(t){Ps(t,"stem"),Rs(t,"stem"),this.path=Wn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Zt(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Rs(e,t){if(e&&e.includes(Wn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Wn.sep+"`")}function Ps(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function sf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function SC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const EC=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},$C={}.hasOwnProperty;class hu extends EC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=dC()}copy(){const t=new hu;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ks(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ms("data",this.frozen),this.namespace[t]=n,this):$C.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ms("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Fi(t),r=this.parser||this.Parser;return Ts("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ts("process",this.parser||this.Parser),Ns("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Fi(t),l=r.parse(s);r.run(l,s,function(u,d,f){if(u||!d||!f)return c(u);const p=d,h=r.stringify(p,f);RC(h)?f.value=h:f.result=h,c(u,f)});function c(u,d){u||!d?a(u):i?i(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Ts("processSync",this.parser||this.Parser),Ns("processSync",this.compiler||this.Compiler),this.process(t,o),cf("processSync","process",n),r;function o(i,a){n=!0,Jd(i),r=a}}run(t,n,r){lf(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=Fi(n);o.run(t,l,c);function c(u,d,f){const p=d||t;u?s(u):a?a(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),cf("runSync","run",r),o;function i(a,s){Jd(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Fi(n),o=this.compiler||this.Compiler;return Ns("stringify",o),lf(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Ms("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(o.settings=ks(!0,o.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];i(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...u]);else if(u.length>0){let[p,...h]=u;const m=r[f][1];Sl(m)&&Sl(p)&&(p=ks(!0,m,p)),r[f]=[c,p,...h]}}}}const kC=new hu().freeze();function Ts(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ns(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ms(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lf(e){if(!Sl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cf(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fi(e){return IC(e)?e:new ug(e)}function IC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function RC(e){return typeof e=="string"||PC(e)}function PC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const TC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",uf=[],df={allowDangerousHtml:!0},NC=/^(https?|ircs?|mailto|xmpp)$/i,MC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function bu(e){const t=AC(e),n=zC(e);return OC(t.runSync(t.parse(n),n),e)}function AC(e){const t=e.rehypePlugins||uf,n=e.remarkPlugins||uf,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...df}:df;return kC().use(pv).use(n).use(cC,r).use(t)}function zC(e){const t=e.children||"",n=new ug;return typeof t=="string"&&(n.value=t),n}function OC(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||DC;for(const u of MC)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+TC+u.id,void 0);return gu(e,c),Yy(e,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function c(u,d,f){if(u.type==="raw"&&f&&typeof d=="number")return a?f.children.splice(d,1):f.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let p;for(p in Ss)if(Object.hasOwn(Ss,p)&&Object.hasOwn(u.properties,p)){const h=u.properties[p],m=Ss[p];(m===null||m.includes(u.tagName))&&(u.properties[p]=l(String(h||""),p,u))}}if(u.type==="element"){let p=n?!n.includes(u.tagName):i?i.includes(u.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(u,d,f)),p&&f&&typeof d=="number")return s&&u.children?f.children.splice(d,1,...u.children):f.children.splice(d,1),d}}}function DC(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||NC.test(e.slice(0,t))?e:""}function ff(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function LC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function FC(e,t,n){const o=Xa((n||{}).ignore||[]),i=_C(t);let a=-1;for(;++a<i.length;)lg(e,"text",s);function s(c,u){let d=-1,f;for(;++d<u.length;){const p=u[d],h=f?f.children:void 0;if(o(p,h?h.indexOf(p):void 0,f))return;f=p}if(f)return l(c,u)}function l(c,u){const d=u[u.length-1],f=i[a][0],p=i[a][1];let h=0;const w=d.children.indexOf(c);let y=!1,$=[];f.lastIndex=0;let x=f.exec(c.value);for(;x;){const E=x.index,v={index:x.index,input:x.input,stack:[...u,c]};let C=p(...x,v);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?f.lastIndex=E+1:(h!==E&&$.push({type:"text",value:c.value.slice(h,E)}),Array.isArray(C)?$.push(...C):C&&$.push(C),h=E+x[0].length,y=!0),!f.global)break;x=f.exec(c.value)}return y?(h<c.value.length&&$.push({type:"text",value:c.value.slice(h)}),d.children.splice(w,1,...$)):$=[c],w+$.length}}function _C(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([jC(o[0]),BC(o[1])])}return t}function jC(e){return typeof e=="string"?new RegExp(LC(e),"g"):e}function BC(e){return typeof e=="function"?e:function(){return e}}const As="phrasing",zs=["autolink","link","image","label"];function HC(){return{transforms:[KC],enter:{literalAutolink:WC,literalAutolinkEmail:Os,literalAutolinkHttp:Os,literalAutolinkWww:Os},exit:{literalAutolink:GC,literalAutolinkEmail:UC,literalAutolinkHttp:qC,literalAutolinkWww:XC}}}function VC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:As,notInConstruct:zs},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:As,notInConstruct:zs},{character:":",before:"[ps]",after:"\\/",inConstruct:As,notInConstruct:zs}]}}function WC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Os(e){this.config.enter.autolinkProtocol.call(this,e)}function qC(e){this.config.exit.autolinkProtocol.call(this,e)}function XC(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function UC(e){this.config.exit.autolinkEmail.call(this,e)}function GC(e){this.exit(e)}function KC(e){FC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,YC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),QC]],{ignore:["link","linkReference"]})}function YC(e,t,n,r,o){let i="";if(!dg(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!ZC(n)))return!1;const a=JC(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function QC(e,t,n,r){return!dg(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ZC(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function JC(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=ff(e,"(");let i=ff(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function dg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Fr(n)||Va(n))&&(!t||n!==47)}fg.peek=lS;function eS(){this.buffer()}function tS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function nS(){this.buffer()}function rS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function oS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function iS(e){this.exit(e)}function aS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sS(e){this.exit(e)}function lS(){return"["}function fg(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function cS(){return{enter:{gfmFootnoteCallString:eS,gfmFootnoteCall:tS,gfmFootnoteDefinitionLabelString:nS,gfmFootnoteDefinition:rS},exit:{gfmFootnoteCallString:oS,gfmFootnoteCall:iS,gfmFootnoteDefinitionLabelString:aS,gfmFootnoteDefinition:sS}}}function uS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,i,a){const s=i.createTracker(a);let l=s.move("[^");const c=i.enter("footnoteDefinition"),u=i.enter("label");return l+=s.move(i.safe(i.associationId(r),{before:l,after:"]"})),u(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
|
|
15
|
+
`:" ")+i.indentLines(i.containerFlow(r,s.current()),t?pg:dS))),c(),l}}function dS(e,t,n){return t===0?e:pg(e,t,n)}function pg(e,t,n){return(n?"":" ")+e}const fS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];mg.peek=bS;function pS(){return{canContainEols:["delete"],enter:{strikethrough:gS},exit:{strikethrough:hS}}}function mS(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:fS}],handlers:{delete:mg}}}function gS(e){this.enter({type:"delete",children:[]},e)}function hS(e){this.exit(e)}function mg(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function bS(){return"~"}function xS(e){return e.length}function yS(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||xS,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],w=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const $=wS(e[u][y]);if(n.alignDelimiters!==!1){const x=o($);w[y]=x,(l[y]===void 0||x>l[y])&&(l[y]=x)}m.push($)}a[u]=m,s[u]=w}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)i[d]=pf(r[d]);else{const m=pf(r);for(;++d<c;)i[d]=m}d=-1;const f=[],p=[];for(;++d<c;){const m=i[d];let w="",y="";m===99?(w=":",y=":"):m===108?w=":":m===114&&(y=":");let $=n.alignDelimiters===!1?1:Math.max(1,l[d]-w.length-y.length);const x=w+"-".repeat($)+y;n.alignDelimiters!==!1&&($=w.length+$+y.length,$>l[d]&&(l[d]=$),p[d]=$),f[d]=x}a.splice(1,0,f),s.splice(1,0,p),u=-1;const h=[];for(;++u<a.length;){const m=a[u],w=s[u];d=-1;const y=[];for(;++d<c;){const $=m[d]||"";let x="",E="";if(n.alignDelimiters!==!1){const v=l[d]-(w[d]||0),C=i[d];C===114?x=" ".repeat(v):C===99?v%2?(x=" ".repeat(v/2+.5),E=" ".repeat(v/2-.5)):(x=" ".repeat(v/2),E=x):E=" ".repeat(v)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&$==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(x),y.push($),n.alignDelimiters!==!1&&y.push(E),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}h.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return h.join(`
|
|
16
|
+
`)}function wS(e){return e==null?"":String(e)}function pf(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function vS(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),CS);return o(),a}function CS(e,t,n){return">"+(n?"":" ")+e}function SS(e,t){return mf(e,t.inConstruct,!0)&&!mf(e,t.notInConstruct,!1)}function mf(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function gf(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
17
|
+
`&&SS(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
18
|
+
`}function ES(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}function $S(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function kS(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function IS(e,t,n,r){const o=kS(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if($S(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(i,RS);return d(),f}const s=n.createTracker(r),l=o.repeat(Math.max(ES(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const d=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
19
19
|
`,encode:["`"],...s.current()})),d()}return u+=s.move(`
|
|
20
20
|
`),i&&(u+=s.move(i+`
|
|
21
|
-
`)),u+=s.move(l),c(),u}function
|
|
22
|
-
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c}function
|
|
21
|
+
`)),u+=s.move(l),c(),u}function RS(e,t,n){return(n?"":" ")+e}function xu(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function PS(e,t,n,r){const o=xu(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
22
|
+
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c}function TS(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function oi(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ba(e,t,n){const r=mo(e),o=mo(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gg.peek=NS;function gg(e,t,n,r){const o=TS(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=ba(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=oi(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ba(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+oi(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function NS(e,t,n){return n.options.emphasis||"*"}function MS(e,t){let n=!1;return gu(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,vl}),!!((!e.depth||e.depth<3)&&lu(e)&&(t.options.setext||n))}function AS(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(MS(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...i.current(),before:`
|
|
23
23
|
`,after:`
|
|
24
24
|
`});return d(),u(),f+`
|
|
25
25
|
`+(o===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
26
26
|
`))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
27
|
-
`,...i.current()});return/^[\t ]/.test(c)&&(c=
|
|
27
|
+
`,...i.current()});return/^[\t ]/.test(c)&&(c=oi(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c}hg.peek=zS;function hg(e){return e.value||""}function zS(){return"<"}bg.peek=OS;function bg(e,t,n,r){const o=xu(n),i=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function OS(){return"!"}xg.peek=DS;function xg(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==d?l+=s.move(d+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function DS(){return"!"}yg.peek=LS;function yg(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return o+r+o}function LS(){return"`"}function wg(e,t){const n=lu(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}vg.peek=FS;function vg(e,t,n,r){const o=xu(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(wg(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),s(),n.stack=u,d}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function FS(e,t,n){return wg(e,n)?"<":"["}Cg.peek=_S;function Cg(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==d?l+=s.move(d+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function _S(){return"["}function yu(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function jS(e){const t=yu(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function BS(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Sg(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function HS(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?BS(n):yu(n);const s=e.ordered?a==="."?")":".":jS(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Sg(n)===a&&u){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c}function VS(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function WS(e,t,n,r){const o=VS(n);let i=n.bulletCurrent||yu(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),u);return l(),c;function u(d,f,p){return f?(p?"":" ".repeat(a))+d:(p?i:i+" ".repeat(a-i.length))+d}}function qS(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const XS=Xa(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function US(e,t,n,r){return(e.children.some(function(a){return XS(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function GS(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Eg.peek=KS;function Eg(e,t,n,r){const o=GS(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=ba(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=oi(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ba(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+oi(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function KS(e,t,n){return n.options.strong||"*"}function YS(e,t,n,r){return n.safe(e.value,r)}function QS(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ZS(e,t,n){const r=(Sg(n)+(n.options.ruleSpaces?" ":"")).repeat(QS(n));return n.options.ruleSpaces?r.slice(0,-1):r}const $g={blockquote:vS,break:gf,code:IS,definition:PS,emphasis:gg,hardBreak:gf,heading:AS,html:hg,image:bg,imageReference:xg,inlineCode:yg,link:vg,linkReference:Cg,list:HS,listItem:WS,paragraph:qS,root:US,strong:Eg,text:YS,thematicBreak:ZS};function JS(){return{enter:{table:eE,tableData:hf,tableHeader:hf,tableRow:nE},exit:{codeText:rE,table:tE,tableData:Ds,tableHeader:Ds,tableRow:Ds}}}function eE(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function tE(e){this.exit(e),this.data.inTable=void 0}function nE(e){this.enter({type:"tableRow",children:[]},e)}function Ds(e){this.exit(e)}function hf(e){this.enter({type:"tableCell",children:[]},e)}function rE(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oE));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oE(e,t){return t==="|"?t:e}function iE(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
28
28
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:l,tableRow:s}};function a(p,h,m,w){return c(u(p,m,w),p.align)}function s(p,h,m,w){const y=d(p,m,w),$=c([y]);return $.slice(0,$.indexOf(`
|
|
29
|
-
`))}function l(p,h,m,w){const y=m.enter("tableCell"),$=m.enter("phrasing"),x=m.containerPhrasing(p,{...w,before:i,after:i});return $(),y(),x}function c(p,h){return xS(p,{align:h,alignDelimiters:r,padding:n,stringLength:o})}function u(p,h,m){const w=p.children;let y=-1;const $=[],x=h.enter("table");for(;++y<w.length;)$[y]=d(w[y],h,m);return x(),$}function d(p,h,m){const w=p.children;let y=-1;const $=[],x=h.enter("tableRow");for(;++y<w.length;)$[y]=l(w[y],p,h,m);return x(),$}function f(p,h,m){let w=Sg.inlineCode(p,h,m);return m.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function iE(){return{exit:{taskListCheckValueChecked:mf,taskListCheckValueUnchecked:mf,paragraph:sE}}}function aE(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:lE}}}function mf(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function sE(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function lE(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=Sg.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function cE(){return[BC(),lS(),fS(),ZS(),iE()]}function uE(e){return{extensions:[HC(),cS(e),pS(),oE(e),aE()]}}const dE={tokenize:bE,partial:!0},Eg={tokenize:xE,partial:!0},$g={tokenize:yE,partial:!0},kg={tokenize:wE,partial:!0},fE={tokenize:vE,partial:!0},Ig={name:"wwwAutolink",tokenize:gE,previous:Pg},Rg={name:"protocolAutolink",tokenize:hE,previous:Tg},lr={name:"emailAutolink",tokenize:mE,previous:Ng},Un={};function pE(){return{text:Un}}let kr=48;for(;kr<123;)Un[kr]=lr,kr++,kr===58?kr=65:kr===91&&(kr=97);Un[43]=lr;Un[45]=lr;Un[46]=lr;Un[95]=lr;Un[72]=[lr,Rg];Un[104]=[lr,Rg];Un[87]=[lr,Ig];Un[119]=[lr,Ig];function mE(e,t,n){const r=this;let o,i;return a;function a(d){return!El(d)||!Ng.call(r,r.previous)||xu(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return El(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(fE,u,c)(d):d===45||d===95||Kt(d)?(i=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),o=!0,l}function u(d){return i&&o&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function gE(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Pg.call(r,r.previous)||xu(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(dE,e.attempt(Eg,e.attempt($g,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function hE(e,t,n){const r=this;let o="",i=!1;return a;function a(d){return(d===72||d===104)&&Tg.call(r,r.previous)&&!xu(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(nn(d)&&o.length<5)return o+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const f=o.toLowerCase();if(f==="http"||f==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),i?c:(i=!0,l)):n(d)}function c(d){return d===null||pa(d)||ct(d)||Fr(d)||Ha(d)?n(d):e.attempt(Eg,e.attempt($g,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function bE(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function xE(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(kg,l,s)(c):c===null||ct(c)||Fr(c)||c!==45&&Ha(c)?l(c):(i=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),a}function l(c){return o||r||!i?n(c):t(c)}}function yE(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(kg,t,i)(a):a===null||ct(a)||Fr(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function wE(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||ct(s)||Fr(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||ct(s)||Fr(s)?t(s):r(s)}function i(s){return nn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):nn(s)?(e.consume(s),a):n(s)}}function vE(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Kt(i)?n(i):t(i)}}function Pg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ct(e)}function Tg(e){return!nn(e)}function Ng(e){return!(e===47||El(e))}function El(e){return e===43||e===45||e===46||e===95||Kt(e)}function xu(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const CE={tokenize:TE,partial:!0};function SE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:IE,continuation:{tokenize:RE},exit:PE}},text:{91:{name:"gfmFootnoteCall",tokenize:kE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:EE,resolveTo:$E}}}}function EE(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=Mn(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function $E(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function kE(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(i>999||d===93&&!a||d===null||d===91||ct(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return o.includes(Mn(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ct(d)||(a=!0),i++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),i++,c):c(d)}}function IE(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||ct(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Mn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ct(h)||(s=!0),a++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function f(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),Ye(e,p,"gfmFootnoteDefinitionWhitespace")):n(h)}function p(h){return t(h)}}function RE(e,t,n){return e.check(gi,t,e.attempt(CE,t,n))}function PE(e){e.exit("gfmFootnoteDefinition")}function TE(e,t,n){const r=this;return Ye(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function NE(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},f=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",d,s]],p=s.parser.constructs.insideSpan.null;p&&wn(f,f.length,0,Va(p,a.slice(c+1,l),s)),wn(f,f.length,0,[["exit",d,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),wn(a,c-1,l-c+3,f),l=c+f.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const c=this.previous,u=this.events;let d=0;return f;function f(h){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(h):(a.enter("strikethroughSequenceTemporary"),p(h))}function p(h){const m=mo(c);if(h===126)return d>1?l(h):(a.consume(h),d++,p);if(d<2&&!n)return l(h);const w=a.exit("strikethroughSequenceTemporary"),y=mo(h);return w._open=!y||y===2&&!!m,w._close=!m||m===2&&!!y,s(h)}}}class ME{constructor(){this.map=[]}add(t,n,r){AE(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const i of o)t.push(i);o=r.pop()}this.map.length=0}}function AE(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function zE(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function OE(){return{flow:{null:{name:"table",tokenize:DE,resolveAll:LE}}}}function DE(e,t,n){const r=this;let o=0,i=0,a;return s;function s(k){let R=r.events.length-1;for(;R>-1;){const z=r.events[R][1].type;if(z==="lineEnding"||z==="linePrefix")R--;else break}const O=R>-1?r.events[R][1].type:null,A=O==="tableHead"||O==="tableRow"?C:l;return A===C&&r.parser.lazy[r.now().line]?n(k):A(k)}function l(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(a=!0,i+=1),u(k)}function u(k){return k===null?n(k):Ae(k)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):qe(k)?Ye(e,u,"whitespace")(k):(i+=1,a&&(a=!1,o+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),d(k)))}function d(k){return k===null||k===124||ct(k)?(e.exit("data"),u(k)):(e.consume(k),k===92?f:d)}function f(k){return k===92||k===124?(e.consume(k),d):d(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),a=!1,qe(k)?Ye(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):h(k))}function h(k){return k===45||k===58?w(k):k===124?(a=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),m):v(k)}function m(k){return qe(k)?Ye(e,w,"whitespace")(k):w(k)}function w(k){return k===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(i+=1,y(k)):k===null||Ae(k)?E(k):v(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),$(k)):v(k)}function $(k){return k===45?(e.consume(k),$):k===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(k))}function x(k){return qe(k)?Ye(e,E,"whitespace")(k):E(k)}function E(k){return k===124?h(k):k===null||Ae(k)?!a||o!==i?v(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):v(k)}function v(k){return n(k)}function C(k){return e.enter("tableRow"),I(k)}function I(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),I):k===null||Ae(k)?(e.exit("tableRow"),t(k)):qe(k)?Ye(e,I,"whitespace")(k):(e.enter("data"),N(k))}function N(k){return k===null||k===124||ct(k)?(e.exit("data"),I(k)):(e.consume(k),k===92?M:N)}function M(k){return k===92||k===124?(e.consume(k),N):N(k)}}function LE(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,d;const f=new ME;for(;++n<e.length;){const p=e[n],h=p[1];p[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(gf(f,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",c,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],d=Fi(f,t,i,o,void 0,d),i=[0,0,0,0]),a[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],d=Fi(f,t,i,o,void 0,d)),i=a,a=[i[1],n,0,0])):h.type==="tableHead"?(s=!0,l=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],d=Fi(f,t,i,o,n,d)):a[1]!==0&&(d=Fi(f,t,a,o,n,d)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&gf(f,t,l,c,u),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=zE(t.events,n))}return e}function Fi(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},ro(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=ro(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=ro(t.events,n[2]),u=ro(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return o!==void 0&&(i.end=Object.assign({},ro(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function gf(e,t,n,r,o){const i=[],a=ro(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function ro(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const FE={name:"tasklistCheck",tokenize:jE};function _E(){return{text:{91:FE}}}function jE(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return ct(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return Ae(l)?t(l):qe(l)?e.check({tokenize:BE},t,n)(l):n(l)}}function BE(e,t,n){return Ye(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function HE(e){return _m([pE(),SE(),NE(e),OE(),_E()])}const VE={};function Mg(e){const t=this,n=e||VE,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(HE(n)),i.push(cE()),a.push(uE(n))}function Ag({content:e}){return S.jsx("div",{className:"sa-text-part",children:S.jsx(lg,{remarkPlugins:[Mg],children:e})})}const WE="//at.alicdn.com/t/c/font_5210396_5l251pz1zln.js";let hf=!1;function zg(e=WE){if(hf||typeof document>"u")return;hf=!0;const t=e.split("?")[0].split("/").pop();if(t&&document.querySelector(`script[src*="${t}"]`))return;const n=document.createElement("script");n.src=e,document.head.appendChild(n)}zg();function We({name:e,size:t=16,color:n="currentColor",className:r,style:o}){return S.jsx("svg",{className:r,style:{width:t,height:t,fill:n,verticalAlign:"middle",...o},"aria-hidden":"true",children:S.jsx("use",{href:`#icon-agent-${e}`})})}function qE(e){const t=e/1e3;return t<10?`${t.toFixed(1)}s`:`${Math.round(t)}s`}function Og({content:e,isStreaming:t,durationMs:n,expandWhileStreaming:r,showDuration:o}){const[i,a]=b.useState(!1),s=t&&r||i,l=!t&&o&&n!=null&&n>0?qE(n):null;return S.jsxs("div",{className:"sa-thinking-part",onClick:()=>a(!i),children:[S.jsxs("div",{className:"sa-thinking-header",children:[S.jsx("span",{className:"sa-thinking-icon",children:S.jsx(We,{name:"brain",size:14})}),S.jsxs("span",{className:"sa-thinking-label",children:[t?"思考中…":"已深度思考",l&&S.jsxs("span",{className:"sa-thinking-duration",children:[" · 用时 ",l]})]}),S.jsx("span",{className:`sa-thinking-arrow ${s?"expanded":""}`,children:S.jsx(We,{name:"chevron-right",size:12})})]}),s&&S.jsx("div",{className:"sa-thinking-content",children:e})]})}function Dg({toolName:e,toolCallId:t,args:n,pending:r,expandWhileStreaming:o}){const[i,a]=b.useState(!1),[s,l]=b.useState(!1),c=r&&o||i;let u=n;try{u=JSON.stringify(JSON.parse(n),null,2)}catch{}const d=b.useCallback(()=>{var f;(f=navigator.clipboard)==null||f.writeText(u).then(()=>{l(!0),setTimeout(()=>l(!1),2e3)}).catch(()=>{})},[u]);return S.jsxs("div",{className:"sa-tool-call-part",children:[S.jsxs("div",{className:"sa-tool-call-header",onClick:()=>a(!i),children:[S.jsx("span",{className:"sa-tool-icon",children:S.jsx(We,{name:"zap",size:14})}),S.jsxs("span",{className:"sa-tool-name",children:[r?"正在调用":"调用工具",": ",e]}),S.jsx("span",{className:`sa-thinking-arrow ${c?"expanded":""}`,children:S.jsx(We,{name:"chevron-right",size:12})})]}),c&&S.jsxs(S.Fragment,{children:[S.jsx("pre",{className:"sa-tool-args",children:u}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsxs("button",{className:"sa-action-btn",onClick:d,title:"复制",children:[S.jsx(We,{name:s?"circle-check":"copy",size:14})," ",s?"已复制":"复制"]})})]})]})}function bf({text:e}){const[t,n]=b.useState(!1),r=()=>{var o;(o=navigator.clipboard)==null||o.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),2e3)}).catch(()=>{})};return S.jsxs("button",{className:"sa-action-btn",onClick:r,title:"复制",children:[S.jsx(We,{name:t?"circle-check":"copy",size:14})," ",t?"已复制":"复制"]})}function XE({html:e}){const[t,n]=b.useState(null);return b.useEffect(()=>{let r=!1;return Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs")).then(o=>{r||n(o.default.sanitize(e,{FORCE_BODY:!0,ADD_ATTR:["target"]}))}),()=>{r=!0}},[e]),t===null?null:S.jsx("div",{className:"sa-tool-result-html-scroll",children:S.jsx("div",{className:"sa-tool-result-html sa-text-part",dangerouslySetInnerHTML:{__html:t}})})}function Lg({toolName:e,content:t,renderMode:n,html:r,defaultExpanded:o}){const[i,a]=b.useState(!!(o??n==="html"));let s=t;if(s)try{s=JSON.stringify(JSON.parse(s),null,2)}catch{}return S.jsxs("div",{className:"sa-tool-result-part",children:[S.jsxs("div",{className:"sa-tool-result-header",onClick:()=>a(!i),children:[S.jsx("span",{className:"sa-tool-icon",children:S.jsx(We,{name:"circle-check",size:14,color:"#10b981"})}),S.jsx("span",{className:"sa-tool-result-label",children:e||"工具返回"}),S.jsx("span",{className:`sa-thinking-arrow ${i?"expanded":""}`,children:S.jsx(We,{name:"chevron-right",size:12})})]}),i&&(n==="html"&&r?S.jsxs(S.Fragment,{children:[S.jsx(XE,{html:r}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsx(bf,{text:r})})]}):s?S.jsxs(S.Fragment,{children:[S.jsx("pre",{className:"sa-tool-result-content",children:s}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsx(bf,{text:s})})]}):S.jsx("pre",{className:"sa-tool-result-content",children:"—"}))]})}function Fg({content:e,onRetry:t}){return S.jsxs("div",{className:"sa-error-part",children:[S.jsxs("div",{className:"sa-error-content",children:[S.jsx("span",{className:"sa-error-icon",children:S.jsx(We,{name:"triangle-alert",size:14})}),S.jsx("span",{children:e||"发生错误"})]}),t&&S.jsx("button",{className:"sa-error-retry",onClick:t,children:"重试"})]})}function _g(e){return e==null||Number.isNaN(e)?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function UE({attachment:e}){const t=S.jsxs(S.Fragment,{children:[S.jsx(We,{name:"file-text",size:14,color:"#6366f1"}),S.jsx("span",{className:"sa-attachment-chip-name",children:e.filename}),e.size!=null&&S.jsx("span",{className:"sa-attachment-chip-size",children:_g(e.size)})]});return e.url?S.jsx("a",{className:"sa-attachment-chip",href:e.url,target:"_blank",rel:"noreferrer",download:e.filename,title:`下载 ${e.filename}`,children:t}):S.jsx("span",{className:"sa-attachment-chip",title:e.filename,children:t})}function GE(e){if(e==null)return null;if(typeof e=="string")return e.trim()?e:null;if(Array.isArray(e))return e.length===0?null:e.map(t=>typeof t=="object"?JSON.stringify(t):String(t)).join("、");if(typeof e=="object")try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function bi({value:e}){const t=GE(e);return t==null?null:S.jsxs("div",{className:"sa-interrupt-answer",children:[S.jsx(We,{name:"text-cursor-input",size:14,color:"#6366f1"}),S.jsxs("span",{children:["你的回答:",t]})]})}function KE({interrupt:e,onRespond:t,disabled:n,answeredAction:r,answerValue:o}){var l,c;const i=e.options,a=(typeof(i==null?void 0:i[0])=="string"?i[0]:(l=i==null?void 0:i[0])==null?void 0:l.label)||"确认",s=(typeof(i==null?void 0:i[1])=="string"?i[1]:(c=i==null?void 0:i[1])==null?void 0:c.label)||"取消";return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsxs("div",{className:"sa-interrupt-content",children:[S.jsx(We,{name:"circle-alert",size:16,color:"#f59e0b"}),S.jsx("span",{children:e.content})]}),S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-primary ${r==="confirm"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"confirm"}),children:[S.jsx(We,{name:"check",size:14})," ",a]}),S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-secondary ${r==="cancel"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"cancel"}),children:[S.jsx(We,{name:"x",size:14})," ",s]})]}),n&&S.jsx(bi,{value:o}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function YE({interrupt:e,onRespond:t,disabled:n,answeredAction:r,answerValue:o}){var u,d,f,p;const i=e.options,a=(typeof(i==null?void 0:i[0])=="string"?i[0]:(u=i==null?void 0:i[0])==null?void 0:u.label)||"批准",s=(typeof(i==null?void 0:i[1])=="string"?i[1]:(d=i==null?void 0:i[1])==null?void 0:d.label)||"拒绝",l=(typeof(i==null?void 0:i[2])=="string"?i[2]:(f=i==null?void 0:i[2])==null?void 0:f.label)||"跳过",c=((p=e.metadata)==null?void 0:p.showSkip)!==!1;return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsxs("div",{className:"sa-interrupt-content",children:[S.jsx(We,{name:"circle-alert",size:16,color:"#f59e0b"}),S.jsx("span",{children:e.content})]}),S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-primary ${r==="approve"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"approve"}),children:[S.jsx(We,{name:"check",size:14})," ",a]}),S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-danger ${r==="reject"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"reject"}),children:[S.jsx(We,{name:"x",size:14})," ",s]}),c&&S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-secondary ${r==="skip"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"skip"}),children:[S.jsx(We,{name:"chevron-right",size:14})," ",l]})]}),n&&S.jsx(bi,{value:o}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function QE(e){return typeof e=="string"?{value:e,label:e}:e}function ZE({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=(e.options??[]).map(QE),i=n&&r!=null&&!o.some(a=>a.value===r);return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsxs("div",{className:"sa-interrupt-content",children:[S.jsx(We,{name:"list",size:16,color:"#6366f1"}),S.jsx("span",{children:e.content})]}),S.jsx("div",{className:"sa-interrupt-options",children:o.map(a=>{const s=r===a.value;return S.jsxs("button",{className:`sa-interrupt-option ${a.danger?"sa-interrupt-option-danger":""} ${s?"sa-interrupt-option-selected":""}`,disabled:n,onClick:()=>t({action:"select",value:a.value}),children:[S.jsx(We,{name:s?"circle-check":"circle",size:14}),a.icon&&S.jsx(We,{name:a.icon,size:14}),S.jsx("span",{children:a.label}),a.description&&S.jsx("span",{className:"sa-interrupt-option-desc",children:a.description})]},a.value)})}),i&&S.jsx(bi,{value:r}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function JE(e){return typeof e=="string"?{value:e,label:e}:e}function e$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=(e.options??[]).map(JE),i=Array.isArray(r)?r:r!=null?[String(r)]:[],[a,s]=b.useState(()=>new Set(i)),l=n?new Set(i):a,c=d=>{n||s(f=>{const p=new Set(f);return p.has(d)?p.delete(d):p.add(d),p})},u=n?i.filter(d=>!o.some(f=>f.value===d)):[];return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsxs("div",{className:"sa-interrupt-content",children:[S.jsx(We,{name:"list-checks",size:16,color:"#6366f1"}),S.jsx("span",{children:e.content})]}),S.jsx("div",{className:"sa-interrupt-options",children:o.map(d=>S.jsxs("button",{className:`sa-interrupt-option ${l.has(d.value)?"sa-interrupt-option-selected":""}`,disabled:n,onClick:()=>c(d.value),children:[S.jsx(We,{name:l.has(d.value)?"square-check":"square",size:14}),S.jsx("span",{children:d.label})]},d.value))}),u.length>0&&S.jsx(bi,{value:u}),!n&&S.jsx("div",{className:"sa-interrupt-actions",children:S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:a.size===0,onClick:()=>t({action:"submit",value:Array.from(a)}),children:[S.jsx(We,{name:"check",size:14})," 确认 (",a.size,")"]})}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function t$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const[o,i]=b.useState(r??""),a=n&&r!=null?String(r):o,s=e.inputType??"text",l=s==="textarea",c=()=>{n||e.required&&!a.trim()||t({action:"submit",value:a.trim()})};return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsxs("div",{className:"sa-interrupt-content",children:[S.jsx(We,{name:"text-cursor-input",size:16,color:"#6366f1"}),S.jsx("span",{children:e.content})]}),S.jsx("div",{className:"sa-interrupt-input-area",children:l?S.jsx("textarea",{className:"sa-interrupt-textarea",value:a,onChange:u=>i(u.target.value),placeholder:e.placeholder,maxLength:e.maxLength,rows:3,disabled:n}):S.jsx("input",{className:"sa-interrupt-input",type:s,value:a,onChange:u=>i(u.target.value),placeholder:e.placeholder,maxLength:e.maxLength,onKeyDown:u=>u.key==="Enter"&&c(),disabled:n})}),!n&&S.jsx("div",{className:"sa-interrupt-actions",children:S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:e.required?!a.trim():!1,onClick:c,children:[S.jsx(We,{name:"check",size:14})," 提交"]})}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function n$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=e.fields??[],i=typeof r=="object"&&r!=null&&!Array.isArray(r)?r:{},[a,s]=b.useState(()=>{const f={};for(const p of o)f[p.name]=i[p.name]??p.defaultValue??"";return f}),l=n&&r!=null&&typeof r=="object"&&!Array.isArray(r)?r:a,c=(f,p)=>{n||s(h=>({...h,[f]:p}))},u=!n&&o.every(f=>!f.required||a[f.name]),d=()=>{u&&t({action:"submit",value:a})};return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsxs("div",{className:"sa-interrupt-content",children:[S.jsx(We,{name:"file-text",size:16,color:"#6366f1"}),S.jsx("span",{children:e.content})]}),S.jsx("div",{className:"sa-interrupt-form",children:o.map(f=>S.jsxs("div",{className:"sa-interrupt-form-field",children:[S.jsxs("label",{className:"sa-interrupt-form-label",children:[f.label,f.required&&S.jsx("span",{className:"sa-interrupt-form-required",children:"*"})]}),r$(f,l[f.name],p=>c(f.name,p),n)]},f.name))}),n&&typeof r=="string"&&S.jsx(bi,{value:r}),!n&&S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:!u,onClick:d,children:[S.jsx(We,{name:"check",size:14})," 提交"]}),S.jsx("button",{className:"sa-interrupt-btn sa-interrupt-btn-secondary",onClick:()=>t({action:"cancel"}),children:"取消"})]}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function xf(e){return typeof e=="string"?{value:e,label:e}:e}function r$(e,t,n,r){switch(e.type){case"textarea":return S.jsx("textarea",{className:"sa-interrupt-textarea",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,rows:3,disabled:r});case"select":{const o=(e.options??[]).map(xf);return S.jsxs("select",{className:"sa-interrupt-select",value:t,onChange:i=>n(i.target.value),disabled:r,children:[S.jsx("option",{value:"",children:"请选择"}),o.map(i=>S.jsx("option",{value:i.value,children:i.label},i.value))]})}case"multiSelect":{const o=(e.options??[]).map(xf),i=Array.isArray(t)?t:[],a=s=>{r||n(i.includes(s)?i.filter(l=>l!==s):[...i,s])};return S.jsx("div",{className:"sa-interrupt-options",children:o.map(s=>S.jsx("button",{type:"button",className:`sa-interrupt-option ${i.includes(s.value)?"sa-interrupt-option-selected":""}`,disabled:r,onClick:()=>a(s.value),children:s.label},s.value))})}case"password":return S.jsx("input",{className:"sa-interrupt-input",type:"password",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,disabled:r});default:return S.jsx("input",{className:"sa-interrupt-input",type:e.type==="number"?"number":e.type==="date"?"date":"text",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,disabled:r})}}function jg({interrupt:e,resolved:t,response:n,onRespond:r}){const o=t,i=n==null?void 0:n.value;switch(e.interruptType){case"confirm":return S.jsx(KE,{interrupt:e,onRespond:r,disabled:o,answeredAction:n==null?void 0:n.action,answerValue:n==null?void 0:n.value});case"approve":return S.jsx(YE,{interrupt:e,onRespond:r,disabled:o,answeredAction:n==null?void 0:n.action,answerValue:n==null?void 0:n.value});case"select":return S.jsx(ZE,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"multiSelect":return S.jsx(e$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"input":return S.jsx(t$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"form":return S.jsx(n$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});default:return S.jsxs("div",{className:"sa-interrupt-unknown",children:["未知的交互类型: ",e.interruptType]})}}function o$({files:e,artifactPreview:t}){const{openArtifactPreview:n}=Fn();return e.length===0?null:S.jsx("ul",{className:"sa-artifact-file-list",role:"list",children:e.map((r,o)=>S.jsxs("li",{className:"sa-artifact-file-card",onClick:t?()=>n(r):void 0,onKeyDown:t?i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),n(r))}:void 0,tabIndex:t?0:void 0,role:t?"button":void 0,"aria-label":t?`预览 ${r.filename}`:void 0,style:t?{cursor:"pointer"}:void 0,children:[S.jsx("div",{className:"sa-artifact-file-icon",children:S.jsx("span",{className:"sa-artifact-chip-type",children:xm(r.type)})}),S.jsxs("div",{className:"sa-artifact-file-info",children:[S.jsx("span",{className:"sa-artifact-file-name",children:r.filename}),r.size!=null&&S.jsx("span",{className:"sa-artifact-file-size",children:bm(r.size)})]}),t&&S.jsx("button",{className:"sa-artifact-file-download",title:"下载","aria-label":`下载 ${r.filename}`,onClick:i=>{i.stopPropagation(),fa(r)},children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})})]},r.id||`art-${o}`))})}const i$=[{value:1,label:"事实错误"},{value:2,label:"逻辑问题"},{value:3,label:"不相关"},{value:4,label:"信息过时"},{value:5,label:"冗长啰嗦"},{value:6,label:"难以理解"}];function Bg({message:e,onCopy:t,onRegenerate:n,onFeedback:r}){var $;const{status:o,cancelFeedback:i}=Fn(),[a,s]=b.useState((($=e.feedback)==null?void 0:$.type)??null),[l,c]=b.useState(!1),[u,d]=b.useState(!1),f=b.useRef(null),p=b.useCallback(()=>{t(),c(!0),setTimeout(()=>c(!1),2e3)},[t]),h=b.useCallback(()=>{a==="like"?(s(null),i(e)):(s("like"),d(!1),r==null||r(e,"like"))},[a,e,r,i]),m=b.useCallback(()=>{a==="dislike"?(s(null),d(!1),i(e)):d(!0)},[a,e,i]),w=b.useCallback((x,E)=>{s("dislike"),d(!1),r==null||r(e,"dislike",{reason:x,remark:(E==null?void 0:E.trim())||void 0})},[e,r]),y=b.useCallback(()=>{d(!1)},[]);return b.useEffect(()=>{if(!u)return;const x=v=>{f.current&&!f.current.contains(v.target)&&d(!1)},E=v=>{v.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",x),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",E)}},[u]),o!=="ready"&&o!=="error"?null:S.jsxs("div",{className:"sa-action-bar",children:[S.jsxs("button",{className:"sa-action-btn",onClick:p,title:"复制",children:[S.jsx(We,{name:l?"circle-check":"copy",size:14})," ",l?"已复制":"复制"]}),n&&S.jsxs("button",{className:"sa-action-btn",onClick:n,title:"重新生成",children:[S.jsx(We,{name:"refresh-cw",size:14})," 重新生成"]}),r&&S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"sa-action-divider"}),S.jsx("button",{className:`sa-action-btn ${a==="like"?"sa-action-btn-active":""}`,onClick:h,title:"有用","aria-label":"点赞",children:S.jsx(We,{name:"thumbs-up",size:14})}),S.jsx("button",{className:`sa-action-btn ${a==="dislike"?"sa-action-btn-active":""}`,onClick:m,title:"无用","aria-label":"踩","aria-expanded":u,"aria-haspopup":"dialog",children:S.jsx(We,{name:"thumbs-down",size:14})})]}),u&&S.jsx("div",{ref:f,children:S.jsx(a$,{onSubmit:w,onCancel:y})})]})}function a$({onSubmit:e,onCancel:t}){const[n,r]=b.useState(void 0),[o,i]=b.useState("");return S.jsxs("div",{className:"sa-dislike-panel",children:[S.jsx("div",{className:"sa-dislike-panel-title",children:"请选择不满意的原因(可选)"}),S.jsx("div",{className:"sa-dislike-reasons",children:i$.map(a=>S.jsx("button",{className:`sa-dislike-reason-btn ${n===a.value?"active":""}`,onClick:()=>r(n===a.value?void 0:a.value),children:a.label},a.value))}),S.jsx("textarea",{className:"sa-dislike-remark",placeholder:"补充描述(选填,≤500 字)",maxLength:500,value:o,onChange:a=>i(a.target.value),rows:2}),S.jsxs("div",{className:"sa-dislike-actions",children:[S.jsx("button",{className:"sa-dislike-submit",onClick:()=>e(n,o||void 0),children:"提交"}),S.jsx("button",{className:"sa-dislike-cancel",onClick:t,children:"取消"})]})]})}const s$=/^(https?:\/\/|data:|blob:|\/\/|\/|\.\/|\.\.\/)/;function yf({src:e,alt:t}){return e?s$.test(e)?S.jsx("img",{src:e,alt:t??"",className:"sa-msg-avatar",draggable:!1}):S.jsx("span",{className:"sa-msg-avatar sa-msg-avatar-text",children:e}):null}function Hg({message:e,isStreaming:t,isLast:n,slots:r,avatar:o,artifactPreview:i,showTimestamp:a,collapse:s}){const{regenerate:l,feedback:c,respondToInterrupt:u}=Fn(),d=b.useCallback(()=>{var z;const A=e.parts.filter(D=>D.type==="text").map(D=>D.content).join(`
|
|
30
|
-
`);(
|
|
29
|
+
`))}function l(p,h,m,w){const y=m.enter("tableCell"),$=m.enter("phrasing"),x=m.containerPhrasing(p,{...w,before:i,after:i});return $(),y(),x}function c(p,h){return yS(p,{align:h,alignDelimiters:r,padding:n,stringLength:o})}function u(p,h,m){const w=p.children;let y=-1;const $=[],x=h.enter("table");for(;++y<w.length;)$[y]=d(w[y],h,m);return x(),$}function d(p,h,m){const w=p.children;let y=-1;const $=[],x=h.enter("tableRow");for(;++y<w.length;)$[y]=l(w[y],p,h,m);return x(),$}function f(p,h,m){let w=$g.inlineCode(p,h,m);return m.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function aE(){return{exit:{taskListCheckValueChecked:bf,taskListCheckValueUnchecked:bf,paragraph:lE}}}function sE(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cE}}}function bf(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function lE(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function cE(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=$g.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function uE(){return[HC(),cS(),pS(),JS(),aE()]}function dE(e){return{extensions:[VC(),uS(e),mS(),iE(e),sE()]}}const fE={tokenize:xE,partial:!0},kg={tokenize:yE,partial:!0},Ig={tokenize:wE,partial:!0},Rg={tokenize:vE,partial:!0},pE={tokenize:CE,partial:!0},Pg={name:"wwwAutolink",tokenize:hE,previous:Ng},Tg={name:"protocolAutolink",tokenize:bE,previous:Mg},lr={name:"emailAutolink",tokenize:gE,previous:Ag},Un={};function mE(){return{text:Un}}let kr=48;for(;kr<123;)Un[kr]=lr,kr++,kr===58?kr=65:kr===91&&(kr=97);Un[43]=lr;Un[45]=lr;Un[46]=lr;Un[95]=lr;Un[72]=[lr,Tg];Un[104]=[lr,Tg];Un[87]=[lr,Pg];Un[119]=[lr,Pg];function gE(e,t,n){const r=this;let o,i;return a;function a(d){return!$l(d)||!Ag.call(r,r.previous)||wu(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return $l(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(pE,u,c)(d):d===45||d===95||Kt(d)?(i=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),o=!0,l}function u(d){return i&&o&&nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function hE(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Ng.call(r,r.previous)||wu(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(fE,e.attempt(kg,e.attempt(Ig,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function bE(e,t,n){const r=this;let o="",i=!1;return a;function a(d){return(d===72||d===104)&&Mg.call(r,r.previous)&&!wu(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(nn(d)&&o.length<5)return o+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const f=o.toLowerCase();if(f==="http"||f==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),i?c:(i=!0,l)):n(d)}function c(d){return d===null||ma(d)||ct(d)||Fr(d)||Va(d)?n(d):e.attempt(kg,e.attempt(Ig,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function xE(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function yE(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(Rg,l,s)(c):c===null||ct(c)||Fr(c)||c!==45&&Va(c)?l(c):(i=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),a}function l(c){return o||r||!i?n(c):t(c)}}function wE(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Rg,t,i)(a):a===null||ct(a)||Fr(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function vE(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||ct(s)||Fr(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||ct(s)||Fr(s)?t(s):r(s)}function i(s){return nn(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):nn(s)?(e.consume(s),a):n(s)}}function CE(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return Kt(i)?n(i):t(i)}}function Ng(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ct(e)}function Mg(e){return!nn(e)}function Ag(e){return!(e===47||$l(e))}function $l(e){return e===43||e===45||e===46||e===95||Kt(e)}function wu(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const SE={tokenize:NE,partial:!0};function EE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:RE,continuation:{tokenize:PE},exit:TE}},text:{91:{name:"gfmFootnoteCall",tokenize:IE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$E,resolveTo:kE}}}}function $E(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=Mn(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function kE(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function IE(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(i>999||d===93&&!a||d===null||d===91||ct(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return o.includes(Mn(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return ct(d)||(a=!0),i++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),i++,c):c(d)}}function RE(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||ct(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Mn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return ct(h)||(s=!0),a++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function f(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),Ke(e,p,"gfmFootnoteDefinitionWhitespace")):n(h)}function p(h){return t(h)}}function PE(e,t,n){return e.check(hi,t,e.attempt(SE,t,n))}function TE(e){e.exit("gfmFootnoteDefinition")}function NE(e,t,n){const r=this;return Ke(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function ME(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},d={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},f=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",d,s]],p=s.parser.constructs.insideSpan.null;p&&wn(f,f.length,0,Wa(p,a.slice(c+1,l),s)),wn(f,f.length,0,[["exit",d,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),wn(a,c-1,l-c+3,f),l=c+f.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const c=this.previous,u=this.events;let d=0;return f;function f(h){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(h):(a.enter("strikethroughSequenceTemporary"),p(h))}function p(h){const m=mo(c);if(h===126)return d>1?l(h):(a.consume(h),d++,p);if(d<2&&!n)return l(h);const w=a.exit("strikethroughSequenceTemporary"),y=mo(h);return w._open=!y||y===2&&!!m,w._close=!m||m===2&&!!y,s(h)}}}class AE{constructor(){this.map=[]}add(t,n,r){zE(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const i of o)t.push(i);o=r.pop()}this.map.length=0}}function zE(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function OE(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function DE(){return{flow:{null:{name:"table",tokenize:LE,resolveAll:FE}}}}function LE(e,t,n){const r=this;let o=0,i=0,a;return s;function s(k){let R=r.events.length-1;for(;R>-1;){const D=r.events[R][1].type;if(D==="lineEnding"||D==="linePrefix")R--;else break}const O=R>-1?r.events[R][1].type:null,z=O==="tableHead"||O==="tableRow"?C:l;return z===C&&r.parser.lazy[r.now().line]?n(k):z(k)}function l(k){return e.enter("tableHead"),e.enter("tableRow"),c(k)}function c(k){return k===124||(a=!0,i+=1),u(k)}function u(k){return k===null?n(k):Ae(k)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),p):n(k):We(k)?Ke(e,u,"whitespace")(k):(i+=1,a&&(a=!1,o+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),d(k)))}function d(k){return k===null||k===124||ct(k)?(e.exit("data"),u(k)):(e.consume(k),k===92?f:d)}function f(k){return k===92||k===124?(e.consume(k),d):d(k)}function p(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),a=!1,We(k)?Ke(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):h(k))}function h(k){return k===45||k===58?w(k):k===124?(a=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),m):v(k)}function m(k){return We(k)?Ke(e,w,"whitespace")(k):w(k)}function w(k){return k===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),y):k===45?(i+=1,y(k)):k===null||Ae(k)?E(k):v(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),$(k)):v(k)}function $(k){return k===45?(e.consume(k),$):k===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(k))}function x(k){return We(k)?Ke(e,E,"whitespace")(k):E(k)}function E(k){return k===124?h(k):k===null||Ae(k)?!a||o!==i?v(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):v(k)}function v(k){return n(k)}function C(k){return e.enter("tableRow"),I(k)}function I(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),I):k===null||Ae(k)?(e.exit("tableRow"),t(k)):We(k)?Ke(e,I,"whitespace")(k):(e.enter("data"),N(k))}function N(k){return k===null||k===124||ct(k)?(e.exit("data"),I(k)):(e.consume(k),k===92?A:N)}function A(k){return k===92||k===124?(e.consume(k),N):N(k)}}function FE(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,d;const f=new AE;for(;++n<e.length;){const p=e[n],h=p[1];p[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(xf(f,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",c,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],d=_i(f,t,i,o,void 0,d),i=[0,0,0,0]),a[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],d=_i(f,t,i,o,void 0,d)),i=a,a=[i[1],n,0,0])):h.type==="tableHead"?(s=!0,l=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],d=_i(f,t,i,o,n,d)):a[1]!==0&&(d=_i(f,t,a,o,n,d)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&xf(f,t,l,c,u),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=OE(t.events,n))}return e}function _i(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},ro(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=ro(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=ro(t.events,n[2]),u=ro(t.events,n[3]),d={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return o!==void 0&&(i.end=Object.assign({},ro(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function xf(e,t,n,r,o){const i=[],a=ro(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function ro(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const _E={name:"tasklistCheck",tokenize:BE};function jE(){return{text:{91:_E}}}function BE(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return ct(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return Ae(l)?t(l):We(l)?e.check({tokenize:HE},t,n)(l):n(l)}}function HE(e,t,n){return Ke(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function VE(e){return Hm([mE(),EE(),ME(e),DE(),jE()])}const WE={};function vu(e){const t=this,n=e||WE,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(VE(n)),i.push(uE()),a.push(dE(n))}function zg({content:e}){return S.jsx("div",{className:"sa-text-part",children:S.jsx(bu,{remarkPlugins:[vu],children:e})})}const qE="//at.alicdn.com/t/c/font_5210396_5l251pz1zln.js";let yf=!1;function Og(e=qE){if(yf||typeof document>"u")return;yf=!0;const t=e.split("?")[0].split("/").pop();if(t&&document.querySelector(`script[src*="${t}"]`))return;const n=document.createElement("script");n.src=e,document.head.appendChild(n)}Og();function Ze({name:e,size:t=16,color:n="currentColor",className:r,style:o}){return S.jsx("svg",{className:r,style:{width:t,height:t,fill:n,verticalAlign:"middle",...o},"aria-hidden":"true",children:S.jsx("use",{href:`#icon-agent-${e}`})})}function XE(e){const t=e/1e3;return t<10?`${t.toFixed(1)}s`:`${Math.round(t)}s`}function Dg({content:e,isStreaming:t,durationMs:n,expandWhileStreaming:r,showDuration:o}){const[i,a]=b.useState(!1),s=t&&r||i,l=!t&&o&&n!=null&&n>0?XE(n):null;return S.jsxs("div",{className:"sa-thinking-part",onClick:()=>a(!i),children:[S.jsxs("div",{className:"sa-thinking-header",children:[S.jsx("span",{className:"sa-thinking-icon",children:S.jsx(Ze,{name:"brain",size:14})}),S.jsxs("span",{className:"sa-thinking-label",children:[t?"思考中…":"已深度思考",l&&S.jsxs("span",{className:"sa-thinking-duration",children:[" · 用时 ",l]})]}),S.jsx("span",{className:`sa-thinking-arrow ${s?"expanded":""}`,children:S.jsx(Ze,{name:"chevron-right",size:12})})]}),s&&S.jsx("div",{className:"sa-thinking-content",children:e})]})}function Lg({toolName:e,toolCallId:t,args:n,pending:r,expandWhileStreaming:o}){const[i,a]=b.useState(!1),[s,l]=b.useState(!1),c=r&&o||i;let u=n;try{u=JSON.stringify(JSON.parse(n),null,2)}catch{}const d=b.useCallback(()=>{var f;(f=navigator.clipboard)==null||f.writeText(u).then(()=>{l(!0),setTimeout(()=>l(!1),2e3)}).catch(()=>{})},[u]);return S.jsxs("div",{className:"sa-tool-call-part",children:[S.jsxs("div",{className:"sa-tool-call-header",onClick:()=>a(!i),children:[S.jsx("span",{className:"sa-tool-icon",children:S.jsx(Ze,{name:"zap",size:14})}),S.jsxs("span",{className:"sa-tool-name",children:[r?"正在调用":"调用工具",": ",e]}),S.jsx("span",{className:`sa-thinking-arrow ${c?"expanded":""}`,children:S.jsx(Ze,{name:"chevron-right",size:12})})]}),c&&S.jsxs(S.Fragment,{children:[S.jsx("pre",{className:"sa-tool-args",children:u}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsxs("button",{className:"sa-action-btn",onClick:d,title:"复制",children:[S.jsx(Ze,{name:s?"circle-check":"copy",size:14})," ",s?"已复制":"复制"]})})]})]})}function wf({text:e}){const[t,n]=b.useState(!1),r=()=>{var o;(o=navigator.clipboard)==null||o.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),2e3)}).catch(()=>{})};return S.jsxs("button",{className:"sa-action-btn",onClick:r,title:"复制",children:[S.jsx(Ze,{name:t?"circle-check":"copy",size:14})," ",t?"已复制":"复制"]})}function UE({html:e}){const[t,n]=b.useState(null);return b.useEffect(()=>{let r=!1;return Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs")).then(o=>{r||n(o.default.sanitize(e,{FORCE_BODY:!0,ADD_ATTR:["target"]}))}),()=>{r=!0}},[e]),t===null?null:S.jsx("div",{className:"sa-tool-result-html-scroll",children:S.jsx("div",{className:"sa-tool-result-html sa-text-part",dangerouslySetInnerHTML:{__html:t}})})}function Fg({toolName:e,content:t,renderMode:n,html:r,defaultExpanded:o}){const[i,a]=b.useState(!!(o??n==="html"));let s=t;if(s)try{s=JSON.stringify(JSON.parse(s),null,2)}catch{}return S.jsxs("div",{className:"sa-tool-result-part",children:[S.jsxs("div",{className:"sa-tool-result-header",onClick:()=>a(!i),children:[S.jsx("span",{className:"sa-tool-icon",children:S.jsx(Ze,{name:"circle-check",size:14,color:"#10b981"})}),S.jsx("span",{className:"sa-tool-result-label",children:e||"工具返回"}),S.jsx("span",{className:`sa-thinking-arrow ${i?"expanded":""}`,children:S.jsx(Ze,{name:"chevron-right",size:12})})]}),i&&(n==="html"&&r?S.jsxs(S.Fragment,{children:[S.jsx(UE,{html:r}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsx(wf,{text:r})})]}):s?S.jsxs(S.Fragment,{children:[S.jsx("pre",{className:"sa-tool-result-content",children:s}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsx(wf,{text:s})})]}):S.jsx("pre",{className:"sa-tool-result-content",children:"—"}))]})}function _g({content:e,onRetry:t}){return S.jsxs("div",{className:"sa-error-part",children:[S.jsxs("div",{className:"sa-error-content",children:[S.jsx("span",{className:"sa-error-icon",children:S.jsx(Ze,{name:"triangle-alert",size:14})}),S.jsx("span",{children:e||"发生错误"})]}),t&&S.jsx("button",{className:"sa-error-retry",onClick:t,children:"重试"})]})}function jg(e){return e==null||Number.isNaN(e)?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function GE({attachment:e}){const t=S.jsxs(S.Fragment,{children:[S.jsx(Ze,{name:"file-text",size:14,color:"#6366f1"}),S.jsx("span",{className:"sa-attachment-chip-name",children:e.filename}),e.size!=null&&S.jsx("span",{className:"sa-attachment-chip-size",children:jg(e.size)})]});return e.url?S.jsx("a",{className:"sa-attachment-chip",href:e.url,target:"_blank",rel:"noreferrer",download:e.filename,title:`下载 ${e.filename}`,children:t}):S.jsx("span",{className:"sa-attachment-chip",title:e.filename,children:t})}function KE(e){if(e==null)return null;if(typeof e=="string")return e.trim()?e:null;if(Array.isArray(e))return e.length===0?null:e.map(t=>typeof t=="object"?JSON.stringify(t):String(t)).join("、");if(typeof e=="object")try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function xi({value:e}){const t=KE(e);return t==null?null:S.jsxs("div",{className:"sa-interrupt-answer",children:[S.jsx(Ze,{name:"text-cursor-input",size:14,color:"#6366f1"}),S.jsxs("span",{children:["你的回答:",t]})]})}function Eo({interrupt:e,icon:t,color:n}){const r=e.content?S.jsx(bu,{remarkPlugins:[vu],children:e.content}):null;return S.jsxs("div",{className:"sa-interrupt-content",children:[S.jsx(Ze,{name:t,size:16,color:n}),S.jsx("div",{className:"sa-interrupt-markdown sa-text-part",children:r})]})}function YE({interrupt:e,onRespond:t,disabled:n,answeredAction:r,answerValue:o}){var l,c;const i=e.options,a=(typeof(i==null?void 0:i[0])=="string"?i[0]:(l=i==null?void 0:i[0])==null?void 0:l.label)||"确认",s=(typeof(i==null?void 0:i[1])=="string"?i[1]:(c=i==null?void 0:i[1])==null?void 0:c.label)||"取消";return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"circle-alert",color:"#f59e0b"}),S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-primary ${r==="confirm"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"confirm"}),children:[S.jsx(Ze,{name:"check",size:14})," ",a]}),S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-secondary ${r==="cancel"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"cancel"}),children:[S.jsx(Ze,{name:"x",size:14})," ",s]})]}),n&&S.jsx(xi,{value:o}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function QE({interrupt:e,onRespond:t,disabled:n,answeredAction:r,answerValue:o}){var u,d,f,p;const i=e.options,a=(typeof(i==null?void 0:i[0])=="string"?i[0]:(u=i==null?void 0:i[0])==null?void 0:u.label)||"批准",s=(typeof(i==null?void 0:i[1])=="string"?i[1]:(d=i==null?void 0:i[1])==null?void 0:d.label)||"拒绝",l=(typeof(i==null?void 0:i[2])=="string"?i[2]:(f=i==null?void 0:i[2])==null?void 0:f.label)||"跳过",c=((p=e.metadata)==null?void 0:p.showSkip)!==!1;return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"circle-alert",color:"#f59e0b"}),S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-primary ${r==="approve"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"approve"}),children:[S.jsx(Ze,{name:"check",size:14})," ",a]}),S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-danger ${r==="reject"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"reject"}),children:[S.jsx(Ze,{name:"x",size:14})," ",s]}),c&&S.jsxs("button",{className:`sa-interrupt-btn sa-interrupt-btn-secondary ${r==="skip"?"sa-interrupt-btn-answered":""}`,disabled:n,onClick:()=>t({action:"skip"}),children:[S.jsx(Ze,{name:"chevron-right",size:14})," ",l]})]}),n&&S.jsx(xi,{value:o}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function ZE(e){return typeof e=="string"?{value:e,label:e}:e}function JE({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=(e.options??[]).map(ZE),i=n&&r!=null&&!o.some(a=>a.value===r);return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"list",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-options",children:o.map(a=>{const s=r===a.value;return S.jsxs("button",{className:`sa-interrupt-option ${a.danger?"sa-interrupt-option-danger":""} ${s?"sa-interrupt-option-selected":""}`,disabled:n,onClick:()=>t({action:"select",value:a.value}),children:[S.jsx(Ze,{name:s?"circle-check":"circle",size:14}),a.icon&&S.jsx(Ze,{name:a.icon,size:14}),S.jsx("span",{children:a.label}),a.description&&S.jsx("span",{className:"sa-interrupt-option-desc",children:a.description})]},a.value)})}),i&&S.jsx(xi,{value:r}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function e$(e){return typeof e=="string"?{value:e,label:e}:e}function t$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=(e.options??[]).map(e$),i=Array.isArray(r)?r:r!=null?[String(r)]:[],[a,s]=b.useState(()=>new Set(i)),l=n?new Set(i):a,c=d=>{n||s(f=>{const p=new Set(f);return p.has(d)?p.delete(d):p.add(d),p})},u=n?i.filter(d=>!o.some(f=>f.value===d)):[];return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"list-checks",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-options",children:o.map(d=>S.jsxs("button",{className:`sa-interrupt-option ${l.has(d.value)?"sa-interrupt-option-selected":""}`,disabled:n,onClick:()=>c(d.value),children:[S.jsx(Ze,{name:l.has(d.value)?"square-check":"square",size:14}),S.jsx("span",{children:d.label})]},d.value))}),u.length>0&&S.jsx(xi,{value:u}),!n&&S.jsx("div",{className:"sa-interrupt-actions",children:S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:a.size===0,onClick:()=>t({action:"submit",value:Array.from(a)}),children:[S.jsx(Ze,{name:"check",size:14})," 确认 (",a.size,")"]})}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function n$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const[o,i]=b.useState(r??""),a=n&&r!=null?String(r):o,s=e.inputType??"text",l=s==="textarea",c=()=>{n||e.required&&!a.trim()||t({action:"submit",value:a.trim()})};return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"text-cursor-input",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-input-area",children:l?S.jsx("textarea",{className:"sa-interrupt-textarea",value:a,onChange:u=>i(u.target.value),placeholder:e.placeholder,maxLength:e.maxLength,rows:3,disabled:n}):S.jsx("input",{className:"sa-interrupt-input",type:s,value:a,onChange:u=>i(u.target.value),placeholder:e.placeholder,maxLength:e.maxLength,onKeyDown:u=>u.key==="Enter"&&c(),disabled:n})}),!n&&S.jsx("div",{className:"sa-interrupt-actions",children:S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:e.required?!a.trim():!1,onClick:c,children:[S.jsx(Ze,{name:"check",size:14})," 提交"]})}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function r$({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=e.fields??[],i=typeof r=="object"&&r!=null&&!Array.isArray(r)?r:{},[a,s]=b.useState(()=>{const f={};for(const p of o)f[p.name]=i[p.name]??p.defaultValue??"";return f}),l=n&&r!=null&&typeof r=="object"&&!Array.isArray(r)?r:a,c=(f,p)=>{n||s(h=>({...h,[f]:p}))},u=!n&&o.every(f=>!f.required||a[f.name]),d=()=>{u&&t({action:"submit",value:a})};return S.jsxs("div",{className:"sa-interrupt-card",children:[S.jsx(Eo,{interrupt:e,icon:"file-text",color:"#6366f1"}),S.jsx("div",{className:"sa-interrupt-form",children:o.map(f=>S.jsxs("div",{className:"sa-interrupt-form-field",children:[S.jsxs("label",{className:"sa-interrupt-form-label",children:[f.label,f.required&&S.jsx("span",{className:"sa-interrupt-form-required",children:"*"})]}),o$(f,l[f.name],p=>c(f.name,p),n)]},f.name))}),n&&typeof r=="string"&&S.jsx(xi,{value:r}),!n&&S.jsxs("div",{className:"sa-interrupt-actions",children:[S.jsxs("button",{className:"sa-interrupt-btn sa-interrupt-btn-primary",disabled:!u,onClick:d,children:[S.jsx(Ze,{name:"check",size:14})," 提交"]}),S.jsx("button",{className:"sa-interrupt-btn sa-interrupt-btn-secondary",onClick:()=>t({action:"cancel"}),children:"取消"})]}),n&&S.jsx("div",{className:"sa-interrupt-submitted",children:"已提交"})]})}function vf(e){return typeof e=="string"?{value:e,label:e}:e}function o$(e,t,n,r){switch(e.type){case"textarea":return S.jsx("textarea",{className:"sa-interrupt-textarea",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,rows:3,disabled:r});case"select":{const o=(e.options??[]).map(vf);return S.jsxs("select",{className:"sa-interrupt-select",value:t,onChange:i=>n(i.target.value),disabled:r,children:[S.jsx("option",{value:"",children:"请选择"}),o.map(i=>S.jsx("option",{value:i.value,children:i.label},i.value))]})}case"multiSelect":{const o=(e.options??[]).map(vf),i=Array.isArray(t)?t:[],a=s=>{r||n(i.includes(s)?i.filter(l=>l!==s):[...i,s])};return S.jsx("div",{className:"sa-interrupt-options",children:o.map(s=>S.jsx("button",{type:"button",className:`sa-interrupt-option ${i.includes(s.value)?"sa-interrupt-option-selected":""}`,disabled:r,onClick:()=>a(s.value),children:s.label},s.value))})}case"password":return S.jsx("input",{className:"sa-interrupt-input",type:"password",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,disabled:r});default:return S.jsx("input",{className:"sa-interrupt-input",type:e.type==="number"?"number":e.type==="date"?"date":"text",value:t,onChange:o=>n(o.target.value),placeholder:e.placeholder,disabled:r})}}function Bg({interrupt:e,resolved:t,response:n,onRespond:r}){const o=t,i=n==null?void 0:n.value;switch(e.interruptType){case"confirm":return S.jsx(YE,{interrupt:e,onRespond:r,disabled:o,answeredAction:n==null?void 0:n.action,answerValue:n==null?void 0:n.value});case"approve":return S.jsx(QE,{interrupt:e,onRespond:r,disabled:o,answeredAction:n==null?void 0:n.action,answerValue:n==null?void 0:n.value});case"select":return S.jsx(JE,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"multiSelect":return S.jsx(t$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"input":return S.jsx(n$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"form":return S.jsx(r$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});default:return S.jsxs("div",{className:"sa-interrupt-unknown",children:["未知的交互类型: ",e.interruptType]})}}function i$({files:e,artifactPreview:t}){const{openArtifactPreview:n}=Fn();return e.length===0?null:S.jsx("ul",{className:"sa-artifact-file-list",role:"list",children:e.map((r,o)=>S.jsxs("li",{className:"sa-artifact-file-card",onClick:t?()=>n(r):void 0,onKeyDown:t?i=>{(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),n(r))}:void 0,tabIndex:t?0:void 0,role:t?"button":void 0,"aria-label":t?`预览 ${r.filename}`:void 0,style:t?{cursor:"pointer"}:void 0,children:[S.jsx("div",{className:"sa-artifact-file-icon",children:S.jsx("span",{className:"sa-artifact-chip-type",children:vm(r.type)})}),S.jsxs("div",{className:"sa-artifact-file-info",children:[S.jsx("span",{className:"sa-artifact-file-name",children:r.filename}),r.size!=null&&S.jsx("span",{className:"sa-artifact-file-size",children:wm(r.size)})]}),t&&S.jsx("button",{className:"sa-artifact-file-download",title:"下载","aria-label":`下载 ${r.filename}`,onClick:i=>{i.stopPropagation(),pa(r)},children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})})]},r.id||`art-${o}`))})}const a$=[{value:1,label:"事实错误"},{value:2,label:"逻辑问题"},{value:3,label:"不相关"},{value:4,label:"信息过时"},{value:5,label:"冗长啰嗦"},{value:6,label:"难以理解"}];function Hg({message:e,onCopy:t,onRegenerate:n,onFeedback:r}){var $;const{status:o,cancelFeedback:i}=Fn(),[a,s]=b.useState((($=e.feedback)==null?void 0:$.type)??null),[l,c]=b.useState(!1),[u,d]=b.useState(!1),f=b.useRef(null),p=b.useCallback(()=>{t(),c(!0),setTimeout(()=>c(!1),2e3)},[t]),h=b.useCallback(()=>{a==="like"?(s(null),i(e)):(s("like"),d(!1),r==null||r(e,"like"))},[a,e,r,i]),m=b.useCallback(()=>{a==="dislike"?(s(null),d(!1),i(e)):d(!0)},[a,e,i]),w=b.useCallback((x,E)=>{s("dislike"),d(!1),r==null||r(e,"dislike",{reason:x,remark:(E==null?void 0:E.trim())||void 0})},[e,r]),y=b.useCallback(()=>{d(!1)},[]);return b.useEffect(()=>{if(!u)return;const x=v=>{f.current&&!f.current.contains(v.target)&&d(!1)},E=v=>{v.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",x),document.addEventListener("keydown",E),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",E)}},[u]),o!=="ready"&&o!=="error"?null:S.jsxs("div",{className:"sa-action-bar",children:[S.jsxs("button",{className:"sa-action-btn",onClick:p,title:"复制",children:[S.jsx(Ze,{name:l?"circle-check":"copy",size:14})," ",l?"已复制":"复制"]}),n&&S.jsxs("button",{className:"sa-action-btn",onClick:n,title:"重新生成",children:[S.jsx(Ze,{name:"refresh-cw",size:14})," 重新生成"]}),r&&S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"sa-action-divider"}),S.jsx("button",{className:`sa-action-btn ${a==="like"?"sa-action-btn-active":""}`,onClick:h,title:"有用","aria-label":"点赞",children:S.jsx(Ze,{name:"thumbs-up",size:14})}),S.jsx("button",{className:`sa-action-btn ${a==="dislike"?"sa-action-btn-active":""}`,onClick:m,title:"无用","aria-label":"踩","aria-expanded":u,"aria-haspopup":"dialog",children:S.jsx(Ze,{name:"thumbs-down",size:14})})]}),u&&S.jsx("div",{ref:f,children:S.jsx(s$,{onSubmit:w,onCancel:y})})]})}function s$({onSubmit:e,onCancel:t}){const[n,r]=b.useState(void 0),[o,i]=b.useState("");return S.jsxs("div",{className:"sa-dislike-panel",children:[S.jsx("div",{className:"sa-dislike-panel-title",children:"请选择不满意的原因(可选)"}),S.jsx("div",{className:"sa-dislike-reasons",children:a$.map(a=>S.jsx("button",{className:`sa-dislike-reason-btn ${n===a.value?"active":""}`,onClick:()=>r(n===a.value?void 0:a.value),children:a.label},a.value))}),S.jsx("textarea",{className:"sa-dislike-remark",placeholder:"补充描述(选填,≤500 字)",maxLength:500,value:o,onChange:a=>i(a.target.value),rows:2}),S.jsxs("div",{className:"sa-dislike-actions",children:[S.jsx("button",{className:"sa-dislike-submit",onClick:()=>e(n,o||void 0),children:"提交"}),S.jsx("button",{className:"sa-dislike-cancel",onClick:t,children:"取消"})]})]})}const l$=/^(https?:\/\/|data:|blob:|\/\/|\/|\.\/|\.\.\/)/;function Cf({src:e,alt:t}){return e?l$.test(e)?S.jsx("img",{src:e,alt:t??"",className:"sa-msg-avatar",draggable:!1}):S.jsx("span",{className:"sa-msg-avatar sa-msg-avatar-text",children:e}):null}function Vg({message:e,isStreaming:t,isLast:n,slots:r,avatar:o,artifactPreview:i,showTimestamp:a,collapse:s}){const{regenerate:l,feedback:c,respondToInterrupt:u}=Fn(),d=b.useCallback(()=>{var D;const z=e.parts.filter(M=>M.type==="text").map(M=>M.content).join(`
|
|
30
|
+
`);(D=navigator.clipboard)==null||D.writeText(z).catch(()=>{})},[e]),f=e.role==="user",p=r.Message;if(p)return S.jsx(p,{message:e,isStreaming:t,isLast:n,avatar:o,slots:r,onCopy:d,onRegenerate:l,onFeedback:c,showTimestamp:a,collapse:s});const h=r.TextPart??zg,m=r.ThinkingPart??Dg,w=r.ToolCallPart??Lg,y=r.ToolResultPart??Fg,$=r.ErrorPart??_g,x=r.ActionBar??Hg,E=s==null?void 0:s.thinking,v=s==null?void 0:s.toolCall,C=s?(E==null?void 0:E.expandWhileStreaming)??!0:!1,I=s?(E==null?void 0:E.showDuration)??!0:!1,N=s?(v==null?void 0:v.expandWhileStreaming)??!0:!1,A=new Set(e.parts.filter(z=>z.type==="tool_result").map(z=>z.toolCallId)),k=t&&n,R=!f&&e.parts.some(z=>z.type==="text"&&z.content),O=!f&&e.parts.some(z=>z.type==="thinking");return S.jsxs("div",{className:`sa-message ${f?"sa-message-user":"sa-message-assistant"}`,children:[!f&&S.jsx(Cf,{src:(o==null?void 0:o.assistant)||(t&&n?Gt.assistantAvatarGenerating:Gt.assistantAvatar),alt:"AI"}),S.jsxs("div",{className:"sa-message-content",children:[a&&S.jsx("span",{className:`sa-message-time ${f?"sa-message-time-right":""}`,children:J0(e.timestamp)}),S.jsxs("div",{className:"sa-message-body",children:[e.parts.map((z,D)=>{switch(z.type){case"text":return S.jsx(h,{content:z.content},D);case"attachment":return S.jsx(GE,{attachment:z.attachment},D);case"thinking":return S.jsx(m,{content:z.content,durationMs:z.durationMs,isStreaming:t&&n,expandWhileStreaming:C,showDuration:I},D);case"tool_call":return S.jsx(w,{toolName:z.toolName,toolCallId:z.toolCallId,args:z.args,pending:k&&!A.has(z.toolCallId),expandWhileStreaming:N},D);case"tool_result":return S.jsx(y,{toolName:z.toolName,toolCallId:z.toolCallId,content:z.content,artifacts:z.artifacts,renderMode:z.renderMode,html:z.html,defaultExpanded:z.defaultExpanded,artifactPreview:i},D);case"error":return S.jsx($,{content:z.content,onRetry:l},D);case"interrupt":return S.jsx(Bg,{interrupt:z.interrupt,resolved:z.resolved??!1,response:z.response,onRespond:M=>u(z.interrupt.interruptId,M)},D);default:return null}}),t&&n&&!f&&!R&&!O&&S.jsx("span",{className:"sa-thinking-indicator",children:"思考中…"}),!f&&e.artifacts&&e.artifacts.length>0&&S.jsx(i$,{files:Cm(e.artifacts),artifactPreview:i}),!f&&!t&&R&&S.jsx(x,{message:e,onCopy:d,onRegenerate:n?l:void 0,onFeedback:c})]})]}),f&&(o==null?void 0:o.user)&&S.jsx(Cf,{src:o.user,alt:"用户"})]})}function Wg({message:e,suggestedPrompts:t,onPromptClick:n,capabilities:r,quickLinks:o,logo:i,openPanel:a}){const s=l=>{if(l.onClick){l.onClick();return}const c=l.action;if(!c){l.prompt&&n(l.prompt);return}a==null||a(c.type==="link"?c:{...c,title:c.title??l.label})};return S.jsxs("div",{className:"flex flex-col gap-8 py-2",children:[S.jsxs("div",{className:"flex flex-col items-center gap-1 opacity-0 animate-sa-home-fade-in",children:[S.jsx("img",{src:i||Gt.logo,alt:"AI 助手",className:"block max-w-16 shrink-0 animate-sa-logo-float",draggable:!1}),S.jsx("h3",{className:"sa-shimmer-text m-0 mb-1 text-[18px] font-bold leading-[1.3] text-[#333] animate-sa-title-shimmer",children:e||"你好!有什么可以帮你的?"})]}),r&&r.length>0&&S.jsx("div",{className:"flex flex-col items-start gap-4 opacity-0 animate-sa-home-fade-in",style:{animationDelay:"150ms"},children:r.map(l=>S.jsxs("div",{className:"inline-flex w-full max-w-full min-w-0 items-center gap-[7px]",children:[l.icon&&S.jsx("img",{src:l.icon,alt:"",className:"h-[18px] w-[18px] shrink-0 object-contain",draggable:!1}),S.jsx("span",{className:"shrink-0 text-[14px] leading-[1.4] text-[#333]",children:l.label}),l.desc&&S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"h-[13px] w-px shrink-0 bg-[#DCDCDC]"}),S.jsx("span",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap text-[14px] leading-[1.4] text-[#9A9A9A]",children:l.desc})]})]},l.label))}),t&&t.length>0&&S.jsx("div",{className:"flex flex-col items-start gap-3",children:t.map((l,c)=>S.jsxs("button",{type:"button",className:"sa-chip inline-flex h-7 items-center gap-1 rounded-md px-3 text-[14px] leading-none text-[#333] opacity-0 transition-colors animate-sa-chip-in",style:{animationDelay:`${300+c*130}ms`},onClick:()=>n(l),children:[S.jsx("span",{className:"sa-chip-text overflow-hidden text-ellipsis whitespace-nowrap",children:l}),S.jsx("svg",{width:13,height:13,viewBox:"0 0 14 14",fill:"none",className:"shrink-0 text-[#9A9A9A]","aria-hidden":"true",children:S.jsx("path",{d:"M5 3L9 7L5 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]},`${l}-${c}`))}),o&&o.length>0&&S.jsxs("div",{className:"opacity-0 animate-sa-home-fade-in",style:{animationDelay:"420ms"},children:[S.jsx("div",{className:"mb-3 text-[14px] leading-none text-[#A0A0A0]",children:"快速查看"}),S.jsx("div",{className:"flex flex-wrap items-center gap-[22px]",children:o.map(l=>S.jsxs("button",{type:"button",className:"inline-flex items-center gap-[7px] rounded-md px-1 py-1 transition-colors hover:bg-[#F5F5F5]",onClick:()=>s(l),children:[l.icon&&S.jsx("span",{className:"flex h-[18px] w-[18px] shrink-0 items-center justify-center opacity-70",children:S.jsx("img",{src:l.icon,alt:"",width:18,height:18,draggable:!1})}),S.jsx("span",{className:"text-[14px] leading-none text-[#333] transition-colors hover:text-[#1881F0]",children:l.label})]},l.label))})]})]})}function Cu({slots:e,welcomeMessage:t,suggestedPrompts:n,avatar:r,artifactPreview:o,capabilities:i,quickLinks:a,logo:s,showTimestamp:l,collapse:c}){const{messages:u,status:d,sendMessage:f,openPanel:p}=Fn(),{containerRef:h}=Im([u]),m=d==="streaming"||d==="submitted",w=e.WelcomeScreen??Wg,y=e.AppendContainer;return u.length===0?S.jsxs("div",{className:"sa-thread",ref:h,children:[S.jsx(w,{message:t,suggestedPrompts:n,onPromptClick:f,capabilities:i,quickLinks:a,logo:s,openPanel:p}),y&&S.jsx(y,{openPanel:p})]}):S.jsx("div",{className:"sa-thread",ref:h,children:u.map(($,x)=>S.jsx(Vg,{message:$,isStreaming:m,isLast:x===u.length-1,slots:e,avatar:r,artifactPreview:o,showTimestamp:l,collapse:c},$.id))})}function $t(){return $t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$t.apply(null,arguments)}const Ge=e=>{const t=g.useRef(e);return t.current=e,g.useCallback((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])};function vn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}const Sf=process.env.NODE_ENV!=="test"&&vn()?g.useLayoutEffect:g.useEffect,Bt=(e,t)=>{const n=g.useRef(!0);Sf(()=>e(n.current),t),Sf(()=>(n.current=!1,()=>{n.current=!0}),[])},c$=e=>{const t=g.useRef(!1),[n,r]=g.useState(e);g.useEffect(()=>(t.current=!1,()=>{t.current=!0}),[]);function o(i,a){a&&t.current||r(i)}return[n,o]};function un(e,t){const[n,r]=b.useState(e),o=t!==void 0?t:n;return Bt(i=>{i||r(t)},[t]),[o,r]}let qg=e=>+setTimeout(e,16),Xg=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(qg=e=>window.requestAnimationFrame(e),Xg=e=>window.cancelAnimationFrame(e));let Ef=0;const Ga=new Map;function Ug(e){Ga.delete(e)}const xt=(e,t=1)=>{Ef+=1;const n=Ef;function r(o){if(o===0)Ug(n),e();else{const i=qg(()=>{r(o-1)});Ga.set(n,i)}}return r(t),n};xt.cancel=e=>{const t=Ga.get(e);return Ug(e),Xg(t)};process.env.NODE_ENV!=="production"&&(xt.ids=()=>Ga);function u$(e){const[t,n]=g.useState(e),r=g.useRef(null),o=Ge(()=>{if(r.current){const[a,s]=r.current;a?xt.cancel(s):clearTimeout(s),r.current=null}}),i=Ge((a,s)=>{const l=s||{frame:1};o(),l===!0?n(a):"ms"in l?r.current=[!1,setTimeout(()=>n(a),l.ms)]:r.current=[!0,xt(()=>n(a),l.frame)]});return[t,i]}function d$(){return{...g}.useId}let $f=0;const kf=d$(),Ka=kf?function(t){const n=kf();return t||(process.env.NODE_ENV==="test"?"test-id":n)}:function(t){const[n,r]=g.useState("ssr-id");return g.useEffect(()=>{const o=$f;$f+=1,r(`rc_unique_${o}`)},[]),t||(process.env.NODE_ENV==="test"?"test-id":n)};function Ya(e,t,n){const r=g.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function f$(e){const[,t]=g.useReducer(i=>i+1,0),n=g.useRef(e),r=Ge(()=>n.current),o=Ge(i=>{n.current=typeof i=="function"?i(n.current):i,t()});return[r,o]}var kl={exports:{}},nt={};/**
|
|
31
31
|
* @license React
|
|
32
32
|
* react-is.production.js
|
|
33
33
|
*
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the MIT license found in the
|
|
37
37
|
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var
|
|
38
|
+
*/var If;function p$(){if(If)return nt;If=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function h(m){if(typeof m=="object"&&m!==null){var w=m.$$typeof;switch(w){case e:switch(m=m.type,m){case n:case o:case r:case l:case c:case f:return m;default:switch(m=m&&m.$$typeof,m){case a:case s:case d:case u:return m;case i:return m;default:return w}}case t:return w}}}return nt.ContextConsumer=i,nt.ContextProvider=a,nt.Element=e,nt.ForwardRef=s,nt.Fragment=n,nt.Lazy=d,nt.Memo=u,nt.Portal=t,nt.Profiler=o,nt.StrictMode=r,nt.Suspense=l,nt.SuspenseList=c,nt.isContextConsumer=function(m){return h(m)===i},nt.isContextProvider=function(m){return h(m)===a},nt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},nt.isForwardRef=function(m){return h(m)===s},nt.isFragment=function(m){return h(m)===n},nt.isLazy=function(m){return h(m)===d},nt.isMemo=function(m){return h(m)===u},nt.isPortal=function(m){return h(m)===t},nt.isProfiler=function(m){return h(m)===o},nt.isStrictMode=function(m){return h(m)===r},nt.isSuspense=function(m){return h(m)===l},nt.isSuspenseList=function(m){return h(m)===c},nt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===o||m===r||m===l||m===c||m===f||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===u||m.$$typeof===a||m.$$typeof===i||m.$$typeof===s||m.$$typeof===p||m.getModuleId!==void 0)},nt.typeOf=h,nt}var rt={};/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-is.development.js
|
|
41
41
|
*
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var
|
|
46
|
+
*/var Rf;function m$(){return Rf||(Rf=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var w=m.$$typeof;switch(w){case t:switch(m=m.type,m){case r:case i:case o:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case s:case l:case f:case d:return m;case a:return m;default:return w}}case n:return w}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");rt.ContextConsumer=a,rt.ContextProvider=s,rt.Element=t,rt.ForwardRef=l,rt.Fragment=r,rt.Lazy=f,rt.Memo=d,rt.Portal=n,rt.Profiler=i,rt.StrictMode=o,rt.Suspense=c,rt.SuspenseList=u,rt.isContextConsumer=function(m){return e(m)===a},rt.isContextProvider=function(m){return e(m)===s},rt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},rt.isForwardRef=function(m){return e(m)===l},rt.isFragment=function(m){return e(m)===r},rt.isLazy=function(m){return e(m)===f},rt.isMemo=function(m){return e(m)===d},rt.isPortal=function(m){return e(m)===n},rt.isProfiler=function(m){return e(m)===i},rt.isStrictMode=function(m){return e(m)===o},rt.isSuspense=function(m){return e(m)===c},rt.isSuspenseList=function(m){return e(m)===u},rt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===o||m===c||m===u||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===d||m.$$typeof===s||m.$$typeof===a||m.$$typeof===l||m.$$typeof===h||m.getModuleId!==void 0)},rt.typeOf=e}()),rt}process.env.NODE_ENV==="production"?kl.exports=p$():kl.exports=m$();var Ls=kl.exports;const g$=Symbol.for("react.element"),h$=Symbol.for("react.transitional.element"),b$=Symbol.for("react.fragment");function Gg(e){return e&&typeof e=="object"&&(e.$$typeof===g$||e.$$typeof===h$)&&e.type===b$}const x$=Number(b.version.split(".")[0]),y$=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)},Gn=(...e)=>{const t=e.filter(Boolean);return t.length<=1?t[0]:n=>{e.forEach(r=>{y$(r,n)})}},Hr=(...e)=>Ya(()=>Gn(...e),e,(t,n)=>t.length!==n.length||t.every((r,o)=>r!==n[o])),$o=e=>{var n,r;if(!e)return!1;if(Su(e)&&x$>=19)return!0;const t=Ls.isMemo(e)?e.type.type:e.type;return!(typeof t=="function"&&!((n=t.prototype)!=null&&n.render)&&t.$$typeof!==Ls.ForwardRef||typeof e=="function"&&!((r=e.prototype)!=null&&r.render)&&e.$$typeof!==Ls.ForwardRef)};function Su(e){return b.isValidElement(e)&&!Gg(e)}const Kg=e=>Su(e)&&$o(e),cr=e=>{if(e&&Su(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function w$(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}const Pf="data-rc-order",Tf="data-rc-priority",v$="rc-util-key",Il=new Map;function Yg({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:v$}function Qa(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function C$(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Eu(e){return Array.from((Il.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function Qg(e,t={}){if(!vn())return null;const{csp:n,prepend:r,priority:o=0}=t,i=C$(r),a=i==="prependQueue",s=document.createElement("style");s.setAttribute(Pf,i),a&&o&&s.setAttribute(Tf,`${o}`),n!=null&&n.nonce&&(s.nonce=n==null?void 0:n.nonce),s.innerHTML=e;const l=Qa(t),{firstChild:c}=l;if(r){if(a){const u=(t.styles||Eu(l)).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(Pf)))return!1;const f=Number(d.getAttribute(Tf)||0);return o>=f});if(u.length)return l.insertBefore(s,u[u.length-1].nextSibling),s}l.insertBefore(s,c)}else l.appendChild(s);return s}function Zg(e,t={}){let{styles:n}=t;return n||(n=Eu(Qa(t))),n.find(r=>r.getAttribute(Yg(t))===e)}function ii(e,t={}){const n=Zg(e,t);n&&Qa(t).removeChild(n)}function S$(e,t){const n=Il.get(e);if(!n||!w$(document,n)){const r=Qg("",t),{parentNode:o}=r;Il.set(e,o),e.removeChild(r)}}function Dr(e,t,n={}){var l,c,u;const r=Qa(n),o=Eu(r),i={...n,styles:o};S$(r,i);const a=Zg(t,i);if(a)return(l=i.csp)!=null&&l.nonce&&a.nonce!==((c=i.csp)==null?void 0:c.nonce)&&(a.nonce=(u=i.csp)==null?void 0:u.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const s=Qg(e,i);return s.setAttribute(Yg(i),t),s}function go(e){return e instanceof HTMLElement||e instanceof SVGElement}function $u(e){return e&&typeof e=="object"&&go(e.nativeElement)?e.nativeElement:go(e)?e:null}const ku=e=>{if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){const{width:t,height:n}=e.getBBox();if(t||n)return!0}if(e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();if(t||n)return!0}}return!1};function Nf(e,t=!1){if(ku(e)){const n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o);let a=null;return o&&!Number.isNaN(i)?a=i:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return!1}function E$(e,t=!1){const n=[...e.querySelectorAll("*")].filter(r=>Nf(r,t));return Nf(e,t)&&n.unshift(e),n}function Jg(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){const r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}function eh(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function $$(e){return eh(e)instanceof ShadowRoot}function Rl(e){return $$(e)?eh(e):null}const Iu={TAB:9,ENTER:13,ESC:27,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};function k$(e){const t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,n=document.createElement("div");n.id=t;const r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";let o,i;if(e){const l=getComputedStyle(e);r.scrollbarColor=l.scrollbarColor,r.scrollbarWidth=l.scrollbarWidth;const c=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(c.width,10),d=parseInt(c.height,10);try{const f=u?`width: ${c.width};`:"",p=d?`height: ${c.height};`:"";Dr(`
|
|
47
47
|
#${t}::-webkit-scrollbar {
|
|
48
48
|
${f}
|
|
49
49
|
${p}
|
|
50
|
-
}`,t)}catch(f){console.error(f),o=u,i=d}}document.body.appendChild(n);const a=e&&o&&!Number.isNaN(o)?o:n.offsetWidth-n.clientWidth,s=e&&i&&!Number.isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),
|
|
50
|
+
}`,t)}catch(f){console.error(f),o=u,i=d}}document.body.appendChild(n);const a=e&&o&&!Number.isNaN(o)?o:n.offsetWidth-n.clientWidth,s=e&&i&&!Number.isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),ii(t),{width:a,height:s}}function I$(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:k$(e)}let Pl={};const Ru=[],R$=e=>{Ru.push(e)};function xa(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=Ru.reduce((r,o)=>o(r??"","warning"),t);n&&console.error(`Warning: ${n}`)}}function P$(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=Ru.reduce((r,o)=>o(r??"","note"),t);n&&console.warn(`Note: ${n}`)}}function T$(){Pl={}}function th(e,t,n){!t&&!Pl[n]&&(e(!1,n),Pl[n]=!0)}function tt(e,t){th(xa,e,t)}function N$(e,t){th(P$,e,t)}tt.preMessage=R$;tt.resetWarned=T$;tt.noteOnce=N$;function ai(e,t,n=!1){const r=new Set;function o(i,a,s=1){const l=r.has(i);if(tt(!l,"Warning: There may be circular references"),l)return!1;if(i===a)return!0;if(n&&s>1)return!1;r.add(i);const c=s+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(let u=0;u<i.length;u++)if(!o(i[u],a[u],c))return!1;return!0}if(i&&a&&typeof i=="object"&&typeof a=="object"){const u=Object.keys(i);return u.length!==Object.keys(a).length?!1:u.every(d=>o(i[d],a[d],c))}return!1}return o(e,t)}function Tl(e){return e!=null}function yi(e){return Tl(e)&&e!==!1&&e!==""}var Pu={exports:{}};Pu.exports=Tu;Pu.exports.isMobile=Tu;Pu.exports.default=Tu;const M$=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,A$=/CrOS/,z$=/android|ipad|playbook|silk/i;function Tu(e){e||(e={});let t=e.ua;if(!t&&typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let n=M$.test(t)&&!A$.test(t)||!!e.tablet&&z$.test(t);return!n&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(n=!0),n}function Yt(e,t){const n=Object.assign({},e);return Array.isArray(t)&&t.forEach(r=>{delete n[r]}),n}const O$=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
51
51
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
52
52
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
53
53
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
@@ -58,7 +58,7 @@ ${p}
|
|
|
58
58
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
59
59
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
60
60
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
61
|
-
summary tabIndex target title type useMap value width wmode wrap`,
|
|
61
|
+
summary tabIndex target title type useMap value width wmode wrap`,D$=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
62
62
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
63
63
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
64
64
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
@@ -69,7 +69,7 @@ ${p}
|
|
|
69
69
|
onAnimationStart onAnimationEnd onAnimationIteration
|
|
70
70
|
onTransitionEnd onTransitionRun onTransitionStart onTransitionCancel
|
|
71
71
|
onBeforeInput onReset onInvalid
|
|
72
|
-
onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,
|
|
72
|
+
onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,L$=`${O$} ${D$}`.split(/[\s\n]+/),F$="aria-",_$="data-";function Mf(e,t){return e.indexOf(t)===0}function nh(e,t=!1){let n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n={...t};const r={};return Object.keys(e).forEach(o=>{(n.aria&&(o==="role"||Mf(o,F$))||n.data&&Mf(o,_$)||n.attr&&L$.includes(o))&&(r[o]=e[o])}),r}function or(e,t={}){let n=[];return b.Children.forEach(e,r=>{r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(or(r)):Gg(r)&&r.props?n=n.concat(or(r.props.children,t)):n.push(r))}),n}function In(e,t){let n=e;for(let r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function rh(e,t,n,r){if(!t.length)return n;const[o,...i]=t;let a;return!e&&typeof o=="number"?a=[]:Array.isArray(e)?a=[...e]:a={...e},r&&n===void 0&&i.length===1?delete a[o][i[0]]:a[o]=rh(a[o],i,n,r),a}function xn(e,t,n,r=!1){return t.length&&r&&n===void 0&&!In(e,t.slice(0,-1))?e:rh(e,t,n,r)}function j$(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Af(e){return Array.isArray(e)?[]:{}}const B$=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function H$(e,t={}){const{prepareArray:n}=t,r=n||(()=>[]);let o=Af(e[0]);return e.forEach(i=>{function a(s,l){const c=new Set(l),u=In(i,s),d=Array.isArray(u);if(d||j$(u)){if(!c.has(u)){c.add(u);const f=In(o,s);d?o=xn(o,s,r(f,u)):(!f||typeof f!="object")&&(o=xn(o,s,Af(u))),B$(u).forEach(p=>{Object.getOwnPropertyDescriptor(u,p).enumerable&&a([...s,p],c)})}}else o=xn(o,s,u)}a([])}),o}function oo(...e){return H$(e)}const ya="__rc_react_root__";function V$(e,t){const n=t[ya]||hm.createRoot(t);n.render(e),t[ya]=n}async function W$(e){return Promise.resolve().then(()=>{var t;(t=e[ya])==null||t.unmount(),delete e[ya]})}function oh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=oh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Z(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=oh(e))&&(r&&(r+=" "),r+=t);return r}const ih=g.createContext({}),q$=e=>{const{children:t,...n}=e,r=g.useMemo(()=>({motion:n.motion}),[n.motion]);return g.createElement(ih.Provider,{value:r},t)},qn="none",ji="appear",Bi="enter",Hi="leave",zf="none",Tn="prepare",Nr="start",Mr="active",Nu="end",ah="prepared";function Of(e,t){const n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit${e}`]=`webkit${t}`,n[`Moz${e}`]=`moz${t}`,n[`ms${e}`]=`MS${t}`,n[`O${e}`]=`o${t.toLowerCase()}`,n}function X$(e,t){const n={animationend:Of("Animation","AnimationEnd"),transitionend:Of("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}const U$=X$(vn(),typeof window<"u"?window:{});let sh={};vn()&&({style:sh}=document.createElement("div"));const Vi={};function lh(e){if(Vi[e])return Vi[e];const t=U$[e];if(t){const n=Object.keys(t),r=n.length;for(let o=0;o<r;o+=1){const i=n[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in sh)return Vi[e]=t[i],Vi[e]}}return""}const ch=lh("animationend"),uh=lh("transitionend"),G$=!!(ch&&uh),Df=ch||"animationend",Lf=uh||"transitionend";function Ff(e,t){if(!e)return null;if(typeof e=="object"){const n=t.replace(/-\w/g,r=>r[1].toUpperCase());return e[n]}return`${e}-${t}`}const K$=e=>{const t=b.useRef();function n(o){o&&(o.removeEventListener(Lf,e),o.removeEventListener(Df,e))}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(Lf,e),o.addEventListener(Df,e),t.current=o)}return g.useEffect(()=>()=>{n(t.current),t.current=null},[]),[r,n]},dh=vn()?b.useLayoutEffect:b.useEffect,Y$=()=>{const e=g.useRef(null);function t(){xt.cancel(e.current)}function n(r,o=2){t();const i=xt(()=>{o<=1?r({isCanceled:()=>i!==e.current}):n(r,o-1)});e.current=i}return g.useEffect(()=>()=>{t()},[]),[n,t]},Q$=[Tn,Nr,Mr,Nu],Z$=[Tn,ah],fh=!1,J$=!0;function ph(e){return e===Mr||e===Nu}const ek=(e,t,n)=>{const[r,o]=c$(zf),[i,a]=Y$();function s(){o(Tn,!0)}const l=t?Z$:Q$;return dh(()=>{if(r!==zf&&r!==Nu){const c=l.indexOf(r),u=l[c+1],d=n(r);d===fh?o(u,!0):u&&i(f=>{function p(){f.isCanceled()||o(u,!0)}d===!0?p():Promise.resolve(d).then(p)})}},[e,r]),g.useEffect(()=>()=>{a()},[]),[s,r]};function tk(e,t,n,{motionEnter:r=!0,motionAppear:o=!0,motionLeave:i=!0,motionDeadline:a,motionLeaveImmediately:s,onAppearPrepare:l,onEnterPrepare:c,onLeavePrepare:u,onAppearStart:d,onEnterStart:f,onLeaveStart:p,onAppearActive:h,onEnterActive:m,onLeaveActive:w,onAppearEnd:y,onEnterEnd:$,onLeaveEnd:x,onVisibleChanged:E}){const[v,C]=g.useState(),[I,N]=f$(qn),[A,k]=g.useState([null,null]),R=I(),O=b.useRef(!1),z=b.useRef(null);function D(){return n()}const M=b.useRef(!1);function L(){N(qn),k([null,null])}const _=Ge(j=>{const H=I();if(H===qn)return;const ee=D();if(j&&!j.deadline&&j.target!==ee)return;const oe=M.current;let B;H===ji&&oe?B=y==null?void 0:y(ee,j):H===Bi&&oe?B=$==null?void 0:$(ee,j):H===Hi&&oe&&(B=x==null?void 0:x(ee,j)),oe&&B!==!1&&L()}),[V]=K$(_),X=j=>{switch(j){case ji:return{[Tn]:l,[Nr]:d,[Mr]:h};case Bi:return{[Tn]:c,[Nr]:f,[Mr]:m};case Hi:return{[Tn]:u,[Nr]:p,[Mr]:w};default:return{}}},P=g.useMemo(()=>X(R),[R]),[Y,K]=ek(R,!e,j=>{var H;if(j===Tn){const ee=P[Tn];return ee?ee(D()):fh}return j in P&&k([((H=P[j])==null?void 0:H.call(P,D(),null))||null,j]),j===Mr&&R!==qn&&(V(D()),a>0&&(clearTimeout(z.current),z.current=setTimeout(()=>{_({deadline:!0})},a))),j===ah&&L(),J$}),T=ph(K);M.current=T;const ne=b.useRef(null);dh(()=>{if(O.current&&ne.current===t)return;C(t);const j=O.current;O.current=!0;let H;!j&&t&&o&&(H=ji),j&&t&&r&&(H=Bi),(j&&!t&&i||!j&&s&&!t&&i)&&(H=Hi);const ee=X(H);H&&(e||ee[Tn])?(N(H),Y()):N(qn),ne.current=t},[t]),b.useEffect(()=>{(R===ji&&!o||R===Bi&&!r||R===Hi&&!i)&&N(qn)},[o,r,i]),b.useEffect(()=>()=>{O.current=!1,clearTimeout(z.current)},[]);const F=g.useRef(!1);b.useEffect(()=>{v&&(F.current=!0),v!==void 0&&R===qn&&((F.current||v)&&(E==null||E(v)),F.current=!0)},[v,R]);let U=A[0];P[Tn]&&K===Nr&&(U={transition:"none",...U});const re=A[1];return[I,K,U,v??t,!O.current&&R===qn&&e&&o?"NONE":K===Nr||K===Mr?re===K:!0]}function nk(e){return(e==null?void 0:e.length)<2}function rk(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function n(o,i){return!!(o.motionName&&t&&i!==!1)}const r=g.forwardRef((o,i)=>{const{visible:a=!0,removeOnLeave:s=!0,forceRender:l,children:c,motionName:u,leavedClassName:d,eventProps:f}=o,{motion:p}=g.useContext(ih),h=n(o,p),m=b.useRef();function w(){return $u(m.current)}const[y,$,x,E,v]=tk(h,a,w,o),C=y(),I=g.useRef(E);E&&(I.current=!0);const N=g.useMemo(()=>{const R={};return Object.defineProperties(R,{nativeElement:{enumerable:!0,get:w},inMotion:{enumerable:!0,get:()=>()=>y()!==qn},enableMotion:{enumerable:!0,get:()=>()=>h}}),R},[]);g.useImperativeHandle(i,()=>N,[]);const A=g.useRef(0);v&&(A.current+=1);const k=g.useMemo(()=>{if(v==="NONE")return null;let R;const O={...f,visible:a};if(!c)R=null;else if(C===qn)E?R=c({...O},m):!s&&I.current&&d?R=c({...O,className:d},m):l||!s&&!d?R=c({...O,style:{display:"none"}},m):R=null;else{let z;$===Tn?z="prepare":ph($)?z="active":$===Nr&&(z="start");const D=Ff(u,`${C}-${z}`);R=c({...O,className:Z(Ff(u,C),{[D]:D&&z,[u]:typeof u=="string"}),style:x},m)}return R},[A.current]);if(nk(c)&&Kg(k)){const R=cr(k);if(R!==m)return g.cloneElement(k,{ref:Gn(R,m)})}return k});return r.displayName="CSSMotion",r}const vr=rk(G$);var mh={};Object.defineProperty(mh,"__esModule",{value:!0});var Za=mh.default=ck;const ok=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
73
73
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
74
74
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
75
75
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
@@ -80,7 +80,7 @@ ${p}
|
|
|
80
80
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
81
81
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
82
82
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
83
|
-
summary tabIndex target title type useMap value width wmode wrap`,
|
|
83
|
+
summary tabIndex target title type useMap value width wmode wrap`,ik=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
84
84
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
85
85
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
86
86
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
@@ -91,13 +91,13 @@ ${p}
|
|
|
91
91
|
onAnimationStart onAnimationEnd onAnimationIteration
|
|
92
92
|
onTransitionEnd onTransitionRun onTransitionStart onTransitionCancel
|
|
93
93
|
onBeforeInput onReset onInvalid
|
|
94
|
-
onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,ik=`${rk} ${ok}`.split(/[\s\n]+/),ak="aria-",sk="data-";function Df(e,t){return e.indexOf(t)===0}function lk(e,t=!1){let n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n={...t};const r={};return Object.keys(e).forEach(o=>{(n.aria&&(o==="role"||Df(o,ak))||n.data&&Df(o,sk)||n.attr&&ik.includes(o))&&(r[o]=e[o])}),r}function mh(e,t){return b.useImperativeHandle(e,()=>{const n=t(),{nativeElement:r}=n;return new Proxy(r,{get(o,i){return n[i]?n[i]:Reflect.get(o,i)}})})}const ck=b.createContext({}),uk={classNames:{},styles:{},className:"",style:{},shortcutKeys:{}},Pu=e=>{const t=b.useContext(ck);return b.useMemo(()=>({...uk,...t[e]}),[t[e]])};function ai(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}const dk="%";function Tl(e){return e.join(dk)}let Lf=0;class fk{constructor(t){ee(this,"instanceId");ee(this,"cache",new Map);ee(this,"updateTimes",new Map);ee(this,"extracted",new Set);this.instanceId=t}get(t){return this.opGet(Tl(t))}opGet(t){return this.cache.get(t)||null}update(t,n){return this.opUpdate(Tl(t),n)}opUpdate(t,n){const r=this.cache.get(t),o=n(r);o===null?(this.cache.delete(t),this.updateTimes.delete(t)):(this.cache.set(t,o),this.updateTimes.set(t,Lf),Lf+=1)}}const Tu="data-token-hash",nr="data-css-hash",pk="data-cache-path",er="__cssinjs_instance__";function mk(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${nr}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(o=>{o[er]||(o[er]=e),o[er]===e&&document.head.insertBefore(o,n)});const r={};Array.from(document.querySelectorAll(`style[${nr}]`)).forEach(o=>{var a;const i=o.getAttribute(nr);r[i]?o[er]===e&&((a=o.parentNode)==null||a.removeChild(o)):r[i]=!0})}return new fk(e)}const yi=g.createContext({hashPriority:"low",cache:mk(),defaultCache:!0,autoPrefix:!1});function gk(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const co=class co{constructor(){ee(this,"cache");ee(this,"keys");ee(this,"cacheCallTimes");this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(t,n=!1){let r={map:this.cache};return t.forEach(o=>{var i;r?r=(i=r==null?void 0:r.map)==null?void 0:i.get(o):r=void 0}),r!=null&&r.value&&n&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(t){var n;return(n=this.internalGet(t,!0))==null?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>co.MAX_CACHE_SIZE+co.MAX_CACHE_OFFSET){const[o]=this.keys.reduce((i,a)=>{const[,s]=i;return this.internalGet(a)[1]<s?[a,this.internalGet(a)[1]]:i},[this.keys[0],this.cacheCallTimes]);this.delete(o)}this.keys.push(t)}let r=this.cache;t.forEach((o,i)=>{if(i===t.length-1)r.set(o,{value:[n,this.cacheCallTimes++]});else{const a=r.get(o);a?a.map||(a.map=new Map):r.set(o,{map:new Map}),r=r.get(o).map}})}deleteByPath(t,n){var i;const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(i=r.value)==null?void 0:i[0];const o=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),o}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!gk(n,t)),this.deleteByPath(this.cache,t)}};ee(co,"MAX_CACHE_SIZE",20),ee(co,"MAX_CACHE_OFFSET",5);let Nl=co,Ff=0;class gh{constructor(t){ee(this,"derivatives");ee(this,"id");this.derivatives=Array.isArray(t)?t:[t],this.id=Ff,t.length===0&&ba(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Ff+=1}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const Ls=new Nl;function ya(e){const t=Array.isArray(e)?e:[e];return Ls.has(t)||Ls.set(t,new gh(t)),Ls.get(t)}const hk=new WeakMap,Fs={};function bk(e,t){let n=hk;for(let r=0;r<t.length;r+=1){const o=t[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o)}return n.has(Fs)||n.set(Fs,e()),n.get(Fs)}const _f=new WeakMap;function Zo(e){let t=_f.get(e)||"";return t||(Object.keys(e).forEach(n=>{const r=e[n];t+=n,r instanceof gh?t+=r.id:r&&typeof r=="object"?t+=Zo(r):t+=r}),t=ai(t),_f.set(e,t)),t}function xk(e,t){return ai(`${t}_${Zo(e)}`)}const Ml=vn();function xe(e){return typeof e=="number"?`${e}px`:e}function hh(e){const{hashCls:t,hashPriority:n="low"}=e||{};if(!t)return"";const r=`.${t}`;return n==="low"?`:where(${r})`:r}const yk=e=>e!=null;function Nu(e,t){const n=typeof t=="function"?t():t;return n?{...e,csp:{...e.csp,nonce:n}}:e}const ra=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),wk=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",scope:i}=n||{};if(!Object.keys(e).length)return"";const a=`${hh({hashCls:r,hashPriority:o})}.${t}`,s=[i].flat().filter(Boolean);return`${s.length?s.map(c=>`${a}.${c}`).join(", "):a}{${Object.entries(e).map(([c,u])=>`${c}:${u};`).join("")}}`},bh=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",prefix:i,unitless:a,ignore:s,preserve:l}=n||{},c={},u={};return Object.entries(e).forEach(([d,f])=>{if(l!=null&&l[d])u[d]=f;else if((typeof f=="string"||typeof f=="number")&&!(s!=null&&s[d])){const p=ra(d,i);c[p]=typeof f=="number"&&!(a!=null&&a[d])?`${f}px`:String(f),u[d]=`var(${p})`}}),[u,wk(c,t,{scope:n==null?void 0:n.scope,hashCls:r,hashPriority:o})]};function vk(){return!1}let Al=!1;function Ck(){return Al}const Sk=process.env.NODE_ENV==="production"?vk:Ck;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:null;if(e&&typeof e.webpackHotUpdate=="function"){const t=e.webpackHotUpdate;e.webpackHotUpdate=(...n)=>(Al=!0,setTimeout(()=>{Al=!1},0),t(...n))}}const Vi=new Map;function Mu(e,t,n,r,o){const{cache:i}=g.useContext(yi),a=[e,...t],s=Tl(a),l=Sk(),c=f=>{i.opUpdate(s,p=>{const[h=0,m]=p||[void 0,void 0];let w=m;process.env.NODE_ENV!=="production"&&m&&l&&(r==null||r(w,l),w=null);const y=w||n(),$=[h,y];return f?f($):$})};g.useMemo(()=>{c()},[s]);let u=i.opGet(s);process.env.NODE_ENV!=="production"&&!u&&(c(),u=i.opGet(s));const d=u[1];return b.useInsertionEffect(()=>(c(([f,p])=>[f+1,p]),Vi.has(s)||(o==null||o(d),Vi.set(s,!0),Promise.resolve().then(()=>{Vi.delete(s)})),()=>{i.opUpdate(s,f=>{const[p=0,h]=f||[];return p-1===0?(r==null||r(h,!1),Vi.delete(s),null):[p-1,h]})}),[s]),d}const Ek={},$k=process.env.NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Ar=new Map;function kk(e){Ar.set(e,(Ar.get(e)||0)+1)}function Ik(e,t){typeof document<"u"&&document.querySelectorAll(`style[${Tu}="${e}"]`).forEach(r=>{var o;r[er]===t&&((o=r.parentNode)==null||o.removeChild(r))})}const Rk=-1;function Pk(e,t){Ar.set(e,(Ar.get(e)||0)-1);const n=new Set;Ar.forEach((r,o)=>{r<=0&&n.add(o)}),Ar.size-n.size>Rk&&n.forEach(r=>{Ik(r,t),Ar.delete(r)})}const Tk=(e,t,n,r)=>{let i={...n.getDerivativeToken(e),...t};return r&&(i=r(i)),i},Nk="token";function xh(e,t,n){const{cache:{instanceId:r},container:o,hashPriority:i}=b.useContext(yi),{salt:a="",override:s=Ek,formatToken:l,getComputedToken:c,cssVar:u,nonce:d}=n,f=bk(()=>Object.assign({},...t),t),p=Zo(f),h=Zo(s),m=Zo(u);return Mu(Nk,[a,e.id,p,h,m],()=>{const y=c?c(f,s,e):Tk(f,s,e,l),$={...y},x=`${a}_${u.prefix}`,E=ai(x),v=`${$k}-${E}`;$._tokenKey=xk($,x);const[C,I]=bh(y,u.key,{prefix:u.prefix,ignore:u.ignore,unitless:u.unitless,preserve:u.preserve,hashPriority:i,hashCls:u.hashed?v:void 0});return C._hashId=E,kk(u.key),[C,v,$,I,u.key]},([,,,,y])=>{Pk(y,r)},([,,,y,$])=>{if(!y)return;let x={mark:nr,prepend:"queue",attachTo:o,priority:-999};x=Nu(x,d);const E=Dr(y,ai(`css-var-${$}`),x);E[er]=r,E.setAttribute(Tu,$)})}var Mk={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ut="-ms-",Jo="-moz-",Je="-webkit-",yh="comm",Au="rule",zu="decl",Ak="@import",zk="@namespace",wh="@keyframes",Ok="@layer",Dk=Math.abs,ei=String.fromCharCode,zl=Object.assign;function Lk(e,t){return Mt(e,0)^45?(((t<<2^Mt(e,0))<<2^Mt(e,1))<<2^Mt(e,2))<<2^Mt(e,3):0}function vh(e){return e.trim()}function Zn(e,t){return(e=t.exec(e))?e[0]:e}function He(e,t,n){return e.replace(t,n)}function _s(e,t){return e.indexOf(t)}function Mt(e,t){return e.charCodeAt(t)|0}function _r(e,t,n){return e.slice(t,n)}function Nn(e){return e.length}function Ch(e){return e.length}function qo(e,t){return t.push(e),e}function Fk(e,t){return e.map(t).join("")}function jf(e,t){return e.filter(function(n){return!Zn(n,t)})}var Za=1,ho=1,Sh=0,Rn=0,Et=0,$o="";function Ja(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Za,column:ho,length:a,return:"",siblings:s}}function pr(e,t){return zl(Ja("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function qr(e){for(;e.root;)e=pr(e.root,{children:[e]});qo(e,e.siblings)}function _k(){return Et}function jk(){return Et=Rn>0?Mt($o,--Rn):0,ho--,Et===10&&(ho=1,Za--),Et}function An(){return Et=Rn<Sh?Mt($o,Rn++):0,ho++,Et===10&&(ho=1,Za++),Et}function gr(){return Mt($o,Rn)}function oa(){return Rn}function es(e,t){return _r($o,e,t)}function si(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Bk(e){return Za=ho=1,Sh=Nn($o=e),Rn=0,[]}function Hk(e){return $o="",e}function js(e){return vh(es(Rn-1,Ol(e===91?e+2:e===40?e+1:e)))}function Vk(e){for(;(Et=gr())&&Et<33;)An();return si(e)>2||si(Et)>3?"":" "}function Wk(e,t){for(;--t&&An()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return es(e,oa()+(t<6&&gr()==32&&An()==32))}function Ol(e){for(;An();)switch(Et){case e:return Rn;case 34:case 39:e!==34&&e!==39&&Ol(Et);break;case 40:e===41&&Ol(e);break;case 92:An();break}return Rn}function qk(e,t){for(;An()&&e+Et!==57;)if(e+Et===84&&gr()===47)break;return"/*"+es(t,Rn-1)+"*"+ei(e===47?e:An())}function Xk(e){for(;!si(gr());)An();return es(e,Rn)}function Bf(e){return Hk(ia("",null,null,null,[""],e=Bk(e),0,[0],e))}function ia(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,w=1,y=1,$=0,x=0,E="",v=o,C=i,I=r,N=E;w;)switch(h=x,x=An()){case 40:h!=108&&Mt(N,d-1)==58?($++,N+="("):N+=js(x);break;case 41:$--,N+=")";break;case 34:case 39:case 91:N+=js(x);break;case 9:case 10:case 13:case 32:if($>0){N+=ei(x);break}N+=Vk(h);break;case 92:N+=Wk(oa()-1,7);continue;case 47:switch(gr()){case 42:case 47:qo(Uk(qk(An(),oa()),t,n,l),l),(si(h||1)==5||si(gr()||1)==5)&&Nn(N)&&_r(N,-1,void 0)!==" "&&(N+=" ");break;default:N+="/"}break;case 123*m:s[c++]=Nn(N)*y;case 125*m:case 59:case 0:if($>0&&x){N+=ei(x);break}switch(x){case 0:case 125:w=0;case 59+u:y==-1&&(N=He(N,/\f/g,"")),p>0&&(Nn(N)-d||m===0)&&qo(p>32?Vf(N+";",r,n,d-1,l):Vf(He(N," ","")+";",r,n,d-2,l),l);break;case 59:N+=";";default:if(qo(I=Hf(N,t,n,c,u,o,s,E,v=[],C=[],d,i),i),x===123)if(u===0)ia(N,t,I,I,v,i,d,s,C);else{switch(f){case 99:if(Mt(N,3)===110)break;case 108:if(Mt(N,2)===97)break;default:u=0;case 100:case 109:case 115:}u?ia(e,I,I,r&&qo(Hf(e,I,I,0,0,o,s,E,o,v=[],d,C),C),o,C,d,s,r?v:C):ia(N,I,I,I,[""],C,0,s,C)}}c=u=p=0,m=y=1,E=N="",d=a;break;case 58:d=1+Nn(N),p=h;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&jk()==125)continue}switch(N+=ei(x),x*m){case 38:y=u>0?1:(N+="\f",-1);break;case 44:if($>0)break;s[c++]=(Nn(N)-1)*y,y=1;break;case 64:gr()===45&&(N+=js(An())),f=gr(),u=d=Nn(E=N+=Xk(oa())),x++;break;case 45:h===45&&Nn(N)==2&&(m=0)}}return i}function Hf(e,t,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,p=o===0?i:[""],h=Ch(p),m=0,w=0,y=0;m<r;++m)for(var $=0,x=_r(e,f+1,f=Dk(w=a[m])),E=e;$<h;++$)(E=vh(w>0?p[$]+" "+x:He(x,/&\f/g,p[$])))&&(l[y++]=E);return Ja(e,t,n,o===0?Au:s,l,c,u,d)}function Uk(e,t,n,r){return Ja(e,t,n,yh,ei(_k()),_r(e,2,-2),0,r)}function Vf(e,t,n,r,o){return Ja(e,t,n,zu,_r(e,0,r),_r(e,r+1,-1),r,o)}function Eh(e,t,n){switch(Lk(e,t)){case 5103:return Je+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Je+e+e;case 4855:return Je+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Jo+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Je+e+Jo+e+ut+e+e;case 5936:switch(Mt(e,t+11)){case 114:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Je+e+ut+e+e;case 6165:return Je+e+ut+"flex-"+e+e;case 5187:return Je+e+He(e,/(\w+).+(:[^]+)/,Je+"box-$1$2"+ut+"flex-$1$2")+e;case 5443:return Je+e+ut+"flex-item-"+He(e,/flex-|-self/g,"")+(Zn(e,/flex-|baseline/)?"":ut+"grid-row-"+He(e,/flex-|-self/g,""))+e;case 4675:return Je+e+ut+"flex-line-pack"+He(e,/align-content|flex-|-self/g,"")+e;case 5548:return Je+e+ut+He(e,"shrink","negative")+e;case 5292:return Je+e+ut+He(e,"basis","preferred-size")+e;case 6060:return Je+"box-"+He(e,"-grow","")+Je+e+ut+He(e,"grow","positive")+e;case 4554:return Je+He(e,/([^-])(transform)/g,"$1"+Je+"$2")+e;case 6187:return He(He(He(e,/(zoom-|grab)/,Je+"$1"),/(image-set)/,Je+"$1"),e,"")+e;case 5495:case 3959:return He(e,/(image-set\([^]*)/,Je+"$1$`$1");case 4968:return He(He(e,/(.+:)(flex-)?(.*)/,Je+"box-pack:$3"+ut+"flex-pack:$3"),/space-between/,"justify")+Je+e+e;case 4200:if(!Zn(e,/flex-|baseline/))return ut+"grid-column-align"+_r(e,t)+e;break;case 2592:case 3360:return ut+He(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,Zn(r.props,/grid-\w+-end/)})?~_s(e+(n=n[t].value),"span")?e:ut+He(e,"-start","")+e+ut+"grid-row-span:"+(~_s(n,"span")?Zn(n,/\d+/):+Zn(n,/\d+/)-+Zn(e,/\d+/))+";":ut+He(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return Zn(r.props,/grid-\w+-start/)})?e:ut+He(He(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return He(e,/(.+)-inline(.+)/,Je+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Nn(e)-1-t>6)switch(Mt(e,t+1)){case 109:if(Mt(e,t+4)!==45)break;case 102:return He(e,/(.+:)(.+)-([^]+)/,"$1"+Je+"$2-$3$1"+Jo+(Mt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~_s(e,"stretch")?Eh(He(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return He(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,i,a,s,l,c){return ut+o+":"+i+c+(a?ut+o+"-span:"+(s?l:+l-+i)+c:"")+e});case 4949:if(Mt(e,t+6)===121)return He(e,":",":"+Je)+e;break;case 6444:switch(Mt(e,Mt(e,14)===45?18:11)){case 120:return He(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Je+(Mt(e,14)===45?"inline-":"")+"box$3$1"+Je+"$2$3$1"+ut+"$2box$3")+e;case 100:return He(e,":",":"+ut)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return He(e,"scroll-","scroll-snap-")+e}return e}function li(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Wf(e,t,n,r){switch(e.type){case Ok:if(e.children.length)break;case Ak:case zk:case zu:return e.return=e.return||e.value;case yh:return"";case wh:return e.return=e.value+"{"+li(e.children,r)+"}";case Au:if(!Nn(e.value=e.props.join(",")))return""}return Nn(n=li(e.children,r))?e.return=e.value+"{"+n+"}":""}function Gk(e){var t=Ch(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function Kk(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case zu:e.return=Eh(e.value,e.length,n);return;case wh:return li([pr(e,{value:He(e.value,"@","@"+Je)})],r);case Au:if(e.length)return Fk(n=e.props,function(o){switch(Zn(o,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":qr(pr(e,{props:[He(o,/:(read-\w+)/,":"+Jo+"$1")]})),qr(pr(e,{props:[o]})),zl(e,{props:jf(n,r)});break;case"::placeholder":qr(pr(e,{props:[He(o,/:(plac\w+)/,":"+Je+"input-$1")]})),qr(pr(e,{props:[He(o,/:(plac\w+)/,":"+Jo+"$1")]})),qr(pr(e,{props:[He(o,/:(plac\w+)/,ut+"input-$1")]})),qr(pr(e,{props:[o]})),zl(e,{props:jf(n,r)});break}return""})}}function $h(e,t){const{path:n,parentSelectors:r}=t;tt(!1,`[Ant Design CSS-in-JS] ${n?`Error in ${n}: `:""}${e}${r.length?` Selector: ${r.join(" | ")}`:""}`)}const Yk=(e,t,n)=>{if(e==="content"){const r=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;(typeof t!="string"||["normal","none","initial","inherit","unset"].indexOf(t)===-1&&!r.test(t)&&!t.startsWith("var(")&&(t.charAt(0)!==t.charAt(t.length-1)||t.charAt(0)!=='"'&&t.charAt(0)!=="'"))&&$h(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${t}"'\`.`,n)}},Qk=(e,t,n)=>{e==="animation"&&n.hashId&&t!=="none"&&$h(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`,n)},qf="data-ant-cssinjs-cache-path",kh="_FILE_STYLE__";let Lr,Ih=!0;function Zk(){var e;if(!Lr&&(Lr={},vn())){const t=document.createElement("div");t.className=qf,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);let n=getComputedStyle(t).content||"";n=n.replace(/^"/,"").replace(/"$/,""),n.split(";").forEach(o=>{const[i,a]=o.split(":");Lr[i]=a});const r=document.querySelector(`style[${qf}]`);r&&(Ih=!1,(e=r.parentNode)==null||e.removeChild(r)),document.body.removeChild(t)}}function Jk(e){return Zk(),!!Lr[e]}function e2(e){const t=Lr[e];let n=null;if(t&&vn())if(Ih)n=kh;else{const r=document.querySelector(`style[${nr}="${Lr[e]}"]`);r?n=r.innerHTML:delete Lr[e]}return[n,t]}const Rh="_skip_check_",Ph="_multi_value_";function Bs(e,t){return(t?li(Bf(e),Gk([Kk,Wf])):li(Bf(e),Wf)).replace(/\{%%%\:[^;];}/g,";")}function t2(e){return typeof e=="object"&&e&&(Rh in e||Ph in e)}function Xf(e,t,n="high"){if(!t)return e;const r=hh({hashCls:t,hashPriority:n});return e.split(",").map(i=>{var c;const a=i.trim().split(/\s+/);let s=a[0]||"";const l=((c=s.match(/^\w+/))==null?void 0:c[0])||"";return s=`${l}${r}${s.slice(l.length)}`,[s,...a.slice(1)].join(" ")}).join(",")}const Dl=(e,t={},{root:n,injectHash:r,parentSelectors:o}={root:!0,parentSelectors:[]})=>{const{hashId:i,layer:a,path:s,hashPriority:l,transformers:c=[],linters:u=[]}=t;let d="",f={};function p(w){const y=w.getName(i);if(!f[y]){const[$]=Dl(w.style,t,{root:!1,parentSelectors:o});f[y]=`@keyframes ${w.getName(i)}${$}`}}function h(w,y=[]){return w.forEach($=>{Array.isArray($)?h($,y):$&&y.push($)}),y}return h(Array.isArray(e)?e:[e]).forEach(w=>{const y=typeof w=="string"&&!n?{}:w;if(typeof y=="string")d+=`${y}
|
|
95
|
-
`;else if(y._keyframe)p(y);else{const $=c.reduce((x,E)=>{var v;return((v=E==null?void 0:E.visit)==null?void 0:v.call(E,x))||x},y);Object.keys($).forEach(x=>{const E=$[x];if(typeof E=="object"&&E&&(x!=="animationName"||!E._keyframe)&&!
|
|
96
|
-
`))):d=`{${d}}`,[d,f]};function
|
|
97
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jr(e){return
|
|
98
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _h(e,t){return y2(e)||w2(e,t)||Fh(e,t)||v2()}function C2(e,t){if(On(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(On(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jh(e){var t=C2(e,"string");return On(t)=="symbol"?t:t+""}function Xn(e,t,n){return(t=jh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gf(Object(n),!0).forEach(function(r){Xn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ts(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jh(r.key),r)}}function ns(e,t,n){return t&&S2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bl(e,t){return Bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Bl(e,t)}function E2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bl(e,t)}function va(e){return va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},va(e)}function Bh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bh=function(){return!!e})()}function $2(e,t){if(t&&(On(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aa(e)}function k2(e){var t=Bh();return function(){var n,r=va(e);if(t){var o=va(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $2(this,n)}}var I2=ns(function e(){ts(this,e)}),Hh="CALC_UNIT",R2=new RegExp(Hh,"g");function Vs(e){return typeof e=="number"?"".concat(e).concat(Hh):e}var P2=function(e){E2(n,e);var t=k2(n);function n(r,o){var i;ts(this,n),i=t.call(this),Xn(aa(i),"result",""),Xn(aa(i),"unitlessCssVar",void 0),Xn(aa(i),"lowPriority",void 0);var a=On(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):a==="number"?i.result=Vs(r):a==="string"&&(i.result=r),i}return ns(n,[{key:"add",value:function(o){return o instanceof n?this.result="".concat(this.result," + ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," + ").concat(Vs(o))),this.lowPriority=!0,this}},{key:"sub",value:function(o){return o instanceof n?this.result="".concat(this.result," - ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," - ").concat(Vs(o))),this.lowPriority=!0,this}},{key:"mul",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," * ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," * ").concat(o)),this.lowPriority=!1,this}},{key:"div",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," / ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," / ").concat(o)),this.lowPriority=!1,this}},{key:"getResult",value:function(o){return this.lowPriority||o?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(o){var i=this,a=o||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return i.result.includes(c)})&&(l=!1),this.result=this.result.replace(R2,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(I2),T2=function(t,n){var r=P2;return function(o){return new r(o,n)}},Kf=function(t,n){return"".concat([n,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function Yf(e,t,n,r){var o=cn({},t[e]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(s){var l=_h(s,2),c=l[0],u=l[1];if(process.env.NODE_ENV!=="production"&&tt(!(o!=null&&o[c]),"Component Token `".concat(String(c),"` of ").concat(String(e)," is deprecated. Please use `").concat(String(u),"` instead.")),o!=null&&o[c]||o!=null&&o[u]){var d;(d=o[u])!==null&&d!==void 0||(o[u]=o==null?void 0:o[c])}})}var a=cn(cn({},n),o);return Object.keys(a).forEach(function(s){a[s]===t[s]&&delete a[s]}),a}var Vh=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",Hl=!0;function yt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!Vh)return Object.assign.apply(Object,[{}].concat(t));Hl=!1;var r={};return t.forEach(function(o){if(On(o)==="object"){var i=Object.keys(o);i.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return o[a]}})})}}),Hl=!0,r}var Qf={};function N2(){}var M2=function(t){var n,r=t,o=N2;return Vh&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(a,s){if(Hl){var l;(l=n)===null||l===void 0||l.add(s)}return a[s]}}),o=function(a,s){var l;Qf[a]={global:Array.from(n),component:cn(cn({},(l=Qf[a])===null||l===void 0?void 0:l.component),s)}}),{token:r,keys:n,flush:o}};function Zf(e,t,n){if(typeof n=="function"){var r;return n(yt(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function A2(e){return{max:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"max(".concat(r.map(function(i){return xe(i)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"min(".concat(r.map(function(i){return xe(i)}).join(","),")")}}}var z2=1e3*60*10,O2=function(){function e(){ts(this,e),Xn(this,"map",new Map),Xn(this,"objectIDMap",new WeakMap),Xn(this,"nextID",0),Xn(this,"lastAccessBeat",new Map),Xn(this,"accessBeat",0)}return ns(e,[{key:"set",value:function(n,r){this.clear();var o=this.getCompositeKey(n);this.map.set(o,r),this.lastAccessBeat.set(o,Date.now())}},{key:"get",value:function(n){var r=this.getCompositeKey(n),o=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,o}},{key:"getCompositeKey",value:function(n){var r=this,o=n.map(function(i){return i&&On(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(On(i),"_").concat(i)});return o.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var r=this.nextID;return this.objectIDMap.set(n,r),this.nextID+=1,r}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(o,i){r-o>z2&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),Jf=new O2;function D2(e,t){return b.useMemo(function(){var n=Jf.get(t);if(n)return n;var r=e();return Jf.set(t,r),r},t)}var L2=function(){return{}};function Wh(e){var t=e.useCSP,n=t===void 0?L2:t,r=e.useToken,o=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,s=e.getCompUnitless;function l(f,p,h,m){var w=Array.isArray(f)?f[0]:f;function y(N){return"".concat(String(w)).concat(N.slice(0,1).toUpperCase()).concat(N.slice(1))}var $=(m==null?void 0:m.unitless)||{},x=typeof s=="function"?s(f):{},E=cn(cn({},x),{},Xn({},y("zIndexPopup"),!0));Object.keys($).forEach(function(N){E[y(N)]=$[N]});var v=cn(cn({},m),{},{unitless:E,prefixToken:y}),C=u(f,p,h,v),I=c(w,h,v);return function(N){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N,k=C(N,M),R=m==null?void 0:m.extraCssVarPrefixCls,O=typeof R=="function"?R({prefixCls:N,rootCls:M}):R,A=I(O!=null&&O.length?[M].concat(jr(O)):M);return[k,A]}}function c(f,p,h){var m=h.unitless,w=h.prefixToken,y=h.ignore;return function($){var x=r(),E=x.cssVar,v=x.realToken,C=n();return o2({path:[f],prefix:E.prefix,key:E.key,unitless:m,ignore:y,token:v,scope:$,nonce:function(){return C.nonce}},function(){var I=Zf(f,v,p),N=Yf(f,v,I,{deprecatedTokens:h==null?void 0:h.deprecatedTokens});return I&&Object.keys(I).forEach(function(M){N[w(M)]=N[M],delete N[M]}),N}),E==null?void 0:E.key}}function u(f,p,h){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},w=Array.isArray(f)?f:[f,f],y=_h(w,1),$=y[0],x=w.join("-"),E=e.layer||{name:"antd"};return function(v){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v,I=r(),N=I.theme,M=I.realToken,k=I.hashId,R=I.token,O=I.cssVar,A=I.zeroRuntime,z=b.useMemo(function(){return A},[]);if(z)return k;var D=o(),L=D.rootPrefixCls,j=D.iconPrefixCls,V=n(),q="css",P=D2(function(){var F=new Set;return Object.keys(m.unitless||{}).forEach(function(G){F.add(ra(G,O.prefix)),F.add(ra(G,Kf($,O.prefix)))}),T2(q,F)},[q,$,O==null?void 0:O.prefix]),Q=A2(),X=Q.max,T=Q.min,J={theme:N,token:R,hashId:k,nonce:function(){return V.nonce},clientOnly:m.clientOnly,layer:E,order:m.order||-999};return typeof i=="function"&&Ll(cn(cn({},J),{},{clientOnly:!1,path:["Shared",L]}),function(){return i(R,{prefix:{rootPrefixCls:L,iconPrefixCls:j},csp:V})}),Ll(cn(cn({},J),{},{path:[x,v,j]}),function(){if(m.injectStyle===!1)return[];var F=M2(R),G=F.token,re=F.flush,_=Zf($,M,h),H=".".concat(v),te=Yf($,M,_,{deprecatedTokens:m.deprecatedTokens});_&&On(_)==="object"&&Object.keys(_).forEach(function(ae){_[ae]="var(".concat(ra(ae,Kf($,O.prefix)),")")});var oe=yt(G,{componentCls:H,prefixCls:v,iconCls:".".concat(j),antCls:".".concat(L),calc:P,max:X,min:T},_),B=p(oe,{hashId:k,prefixCls:v,rootPrefixCls:L,iconPrefixCls:j});re($,te);var ie=typeof a=="function"?a(oe,v,C,m.resetFont):null;return[m.resetStyle===!1?null:ie,B]}),k}}function d(f,p,h){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},w=u(f,p,h,cn({resetStyle:!1,order:-998},m)),y=function(x){var E=x.prefixCls,v=x.rootCls,C=v===void 0?E:v;return w(E,C),null};return process.env.NODE_ENV!=="production"&&(y.displayName="SubStyle_".concat(String(Array.isArray(f)?f.join("."):f))),y}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const xr=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function sa(e){return(e+8)/e}function F2(e){const t=Array.from({length:10}).map((n,r)=>{const o=r-1,i=e*Math.E**(o/5),a=r>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:sa(n)}))}const _2="6.6.4",qh={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},ci={...qh,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
94
|
+
onAuxClick onToggle onBeforeToggle onCancel onClose onResize onScrollEnd`,ak=`${ok} ${ik}`.split(/[\s\n]+/),sk="aria-",lk="data-";function _f(e,t){return e.indexOf(t)===0}function ck(e,t=!1){let n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n={...t};const r={};return Object.keys(e).forEach(o=>{(n.aria&&(o==="role"||_f(o,sk))||n.data&&_f(o,lk)||n.attr&&ak.includes(o))&&(r[o]=e[o])}),r}function gh(e,t){return b.useImperativeHandle(e,()=>{const n=t(),{nativeElement:r}=n;return new Proxy(r,{get(o,i){return n[i]?n[i]:Reflect.get(o,i)}})})}const uk=b.createContext({}),dk={classNames:{},styles:{},className:"",style:{},shortcutKeys:{}},Mu=e=>{const t=b.useContext(uk);return b.useMemo(()=>({...dk,...t[e]}),[t[e]])};function si(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}const fk="%";function Nl(e){return e.join(fk)}let jf=0;class pk{constructor(t){J(this,"instanceId");J(this,"cache",new Map);J(this,"updateTimes",new Map);J(this,"extracted",new Set);this.instanceId=t}get(t){return this.opGet(Nl(t))}opGet(t){return this.cache.get(t)||null}update(t,n){return this.opUpdate(Nl(t),n)}opUpdate(t,n){const r=this.cache.get(t),o=n(r);o===null?(this.cache.delete(t),this.updateTimes.delete(t)):(this.cache.set(t,o),this.updateTimes.set(t,jf),jf+=1)}}const Au="data-token-hash",nr="data-css-hash",mk="data-cache-path",er="__cssinjs_instance__";function gk(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${nr}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(o=>{o[er]||(o[er]=e),o[er]===e&&document.head.insertBefore(o,n)});const r={};Array.from(document.querySelectorAll(`style[${nr}]`)).forEach(o=>{var a;const i=o.getAttribute(nr);r[i]?o[er]===e&&((a=o.parentNode)==null||a.removeChild(o)):r[i]=!0})}return new pk(e)}const wi=g.createContext({hashPriority:"low",cache:gk(),defaultCache:!0,autoPrefix:!1});function hk(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const co=class co{constructor(){J(this,"cache");J(this,"keys");J(this,"cacheCallTimes");this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(t,n=!1){let r={map:this.cache};return t.forEach(o=>{var i;r?r=(i=r==null?void 0:r.map)==null?void 0:i.get(o):r=void 0}),r!=null&&r.value&&n&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(t){var n;return(n=this.internalGet(t,!0))==null?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>co.MAX_CACHE_SIZE+co.MAX_CACHE_OFFSET){const[o]=this.keys.reduce((i,a)=>{const[,s]=i;return this.internalGet(a)[1]<s?[a,this.internalGet(a)[1]]:i},[this.keys[0],this.cacheCallTimes]);this.delete(o)}this.keys.push(t)}let r=this.cache;t.forEach((o,i)=>{if(i===t.length-1)r.set(o,{value:[n,this.cacheCallTimes++]});else{const a=r.get(o);a?a.map||(a.map=new Map):r.set(o,{map:new Map}),r=r.get(o).map}})}deleteByPath(t,n){var i;const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(i=r.value)==null?void 0:i[0];const o=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),o}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!hk(n,t)),this.deleteByPath(this.cache,t)}};J(co,"MAX_CACHE_SIZE",20),J(co,"MAX_CACHE_OFFSET",5);let Ml=co,Bf=0;class hh{constructor(t){J(this,"derivatives");J(this,"id");this.derivatives=Array.isArray(t)?t:[t],this.id=Bf,t.length===0&&xa(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Bf+=1}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const Fs=new Ml;function wa(e){const t=Array.isArray(e)?e:[e];return Fs.has(t)||Fs.set(t,new hh(t)),Fs.get(t)}const bk=new WeakMap,_s={};function xk(e,t){let n=bk;for(let r=0;r<t.length;r+=1){const o=t[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o)}return n.has(_s)||n.set(_s,e()),n.get(_s)}const Hf=new WeakMap;function Jo(e){let t=Hf.get(e)||"";return t||(Object.keys(e).forEach(n=>{const r=e[n];t+=n,r instanceof hh?t+=r.id:r&&typeof r=="object"?t+=Jo(r):t+=r}),t=si(t),Hf.set(e,t)),t}function yk(e,t){return si(`${t}_${Jo(e)}`)}const Al=vn();function xe(e){return typeof e=="number"?`${e}px`:e}function bh(e){const{hashCls:t,hashPriority:n="low"}=e||{};if(!t)return"";const r=`.${t}`;return n==="low"?`:where(${r})`:r}const wk=e=>e!=null;function zu(e,t){const n=typeof t=="function"?t():t;return n?{...e,csp:{...e.csp,nonce:n}}:e}const oa=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),vk=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",scope:i}=n||{};if(!Object.keys(e).length)return"";const a=`${bh({hashCls:r,hashPriority:o})}.${t}`,s=[i].flat().filter(Boolean);return`${s.length?s.map(c=>`${a}.${c}`).join(", "):a}{${Object.entries(e).map(([c,u])=>`${c}:${u};`).join("")}}`},xh=(e,t,n)=>{const{hashCls:r,hashPriority:o="low",prefix:i,unitless:a,ignore:s,preserve:l}=n||{},c={},u={};return Object.entries(e).forEach(([d,f])=>{if(l!=null&&l[d])u[d]=f;else if((typeof f=="string"||typeof f=="number")&&!(s!=null&&s[d])){const p=oa(d,i);c[p]=typeof f=="number"&&!(a!=null&&a[d])?`${f}px`:String(f),u[d]=`var(${p})`}}),[u,vk(c,t,{scope:n==null?void 0:n.scope,hashCls:r,hashPriority:o})]};function Ck(){return!1}let zl=!1;function Sk(){return zl}const Ek=process.env.NODE_ENV==="production"?Ck:Sk;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:null;if(e&&typeof e.webpackHotUpdate=="function"){const t=e.webpackHotUpdate;e.webpackHotUpdate=(...n)=>(zl=!0,setTimeout(()=>{zl=!1},0),t(...n))}}const Wi=new Map;function Ou(e,t,n,r,o){const{cache:i}=g.useContext(wi),a=[e,...t],s=Nl(a),l=Ek(),c=f=>{i.opUpdate(s,p=>{const[h=0,m]=p||[void 0,void 0];let w=m;process.env.NODE_ENV!=="production"&&m&&l&&(r==null||r(w,l),w=null);const y=w||n(),$=[h,y];return f?f($):$})};g.useMemo(()=>{c()},[s]);let u=i.opGet(s);process.env.NODE_ENV!=="production"&&!u&&(c(),u=i.opGet(s));const d=u[1];return b.useInsertionEffect(()=>(c(([f,p])=>[f+1,p]),Wi.has(s)||(o==null||o(d),Wi.set(s,!0),Promise.resolve().then(()=>{Wi.delete(s)})),()=>{i.opUpdate(s,f=>{const[p=0,h]=f||[];return p-1===0?(r==null||r(h,!1),Wi.delete(s),null):[p-1,h]})}),[s]),d}const $k={},kk=process.env.NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Ar=new Map;function Ik(e){Ar.set(e,(Ar.get(e)||0)+1)}function Rk(e,t){typeof document<"u"&&document.querySelectorAll(`style[${Au}="${e}"]`).forEach(r=>{var o;r[er]===t&&((o=r.parentNode)==null||o.removeChild(r))})}const Pk=-1;function Tk(e,t){Ar.set(e,(Ar.get(e)||0)-1);const n=new Set;Ar.forEach((r,o)=>{r<=0&&n.add(o)}),Ar.size-n.size>Pk&&n.forEach(r=>{Rk(r,t),Ar.delete(r)})}const Nk=(e,t,n,r)=>{let i={...n.getDerivativeToken(e),...t};return r&&(i=r(i)),i},Mk="token";function yh(e,t,n){const{cache:{instanceId:r},container:o,hashPriority:i}=b.useContext(wi),{salt:a="",override:s=$k,formatToken:l,getComputedToken:c,cssVar:u,nonce:d}=n,f=xk(()=>Object.assign({},...t),t),p=Jo(f),h=Jo(s),m=Jo(u);return Ou(Mk,[a,e.id,p,h,m],()=>{const y=c?c(f,s,e):Nk(f,s,e,l),$={...y},x=`${a}_${u.prefix}`,E=si(x),v=`${kk}-${E}`;$._tokenKey=yk($,x);const[C,I]=xh(y,u.key,{prefix:u.prefix,ignore:u.ignore,unitless:u.unitless,preserve:u.preserve,hashPriority:i,hashCls:u.hashed?v:void 0});return C._hashId=E,Ik(u.key),[C,v,$,I,u.key]},([,,,,y])=>{Tk(y,r)},([,,,y,$])=>{if(!y)return;let x={mark:nr,prepend:"queue",attachTo:o,priority:-999};x=zu(x,d);const E=Dr(y,si(`css-var-${$}`),x);E[er]=r,E.setAttribute(Au,$)})}var Ak={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ut="-ms-",ei="-moz-",Je="-webkit-",wh="comm",Du="rule",Lu="decl",zk="@import",Ok="@namespace",vh="@keyframes",Dk="@layer",Lk=Math.abs,ti=String.fromCharCode,Ol=Object.assign;function Fk(e,t){return Mt(e,0)^45?(((t<<2^Mt(e,0))<<2^Mt(e,1))<<2^Mt(e,2))<<2^Mt(e,3):0}function Ch(e){return e.trim()}function Zn(e,t){return(e=t.exec(e))?e[0]:e}function He(e,t,n){return e.replace(t,n)}function js(e,t){return e.indexOf(t)}function Mt(e,t){return e.charCodeAt(t)|0}function _r(e,t,n){return e.slice(t,n)}function Nn(e){return e.length}function Sh(e){return e.length}function Xo(e,t){return t.push(e),e}function _k(e,t){return e.map(t).join("")}function Vf(e,t){return e.filter(function(n){return!Zn(n,t)})}var Ja=1,ho=1,Eh=0,Rn=0,Et=0,ko="";function es(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Ja,column:ho,length:a,return:"",siblings:s}}function pr(e,t){return Ol(es("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function qr(e){for(;e.root;)e=pr(e.root,{children:[e]});Xo(e,e.siblings)}function jk(){return Et}function Bk(){return Et=Rn>0?Mt(ko,--Rn):0,ho--,Et===10&&(ho=1,Ja--),Et}function An(){return Et=Rn<Eh?Mt(ko,Rn++):0,ho++,Et===10&&(ho=1,Ja++),Et}function gr(){return Mt(ko,Rn)}function ia(){return Rn}function ts(e,t){return _r(ko,e,t)}function li(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Hk(e){return Ja=ho=1,Eh=Nn(ko=e),Rn=0,[]}function Vk(e){return ko="",e}function Bs(e){return Ch(ts(Rn-1,Dl(e===91?e+2:e===40?e+1:e)))}function Wk(e){for(;(Et=gr())&&Et<33;)An();return li(e)>2||li(Et)>3?"":" "}function qk(e,t){for(;--t&&An()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return ts(e,ia()+(t<6&&gr()==32&&An()==32))}function Dl(e){for(;An();)switch(Et){case e:return Rn;case 34:case 39:e!==34&&e!==39&&Dl(Et);break;case 40:e===41&&Dl(e);break;case 92:An();break}return Rn}function Xk(e,t){for(;An()&&e+Et!==57;)if(e+Et===84&&gr()===47)break;return"/*"+ts(t,Rn-1)+"*"+ti(e===47?e:An())}function Uk(e){for(;!li(gr());)An();return ts(e,Rn)}function Wf(e){return Vk(aa("",null,null,null,[""],e=Hk(e),0,[0],e))}function aa(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,w=1,y=1,$=0,x=0,E="",v=o,C=i,I=r,N=E;w;)switch(h=x,x=An()){case 40:h!=108&&Mt(N,d-1)==58?($++,N+="("):N+=Bs(x);break;case 41:$--,N+=")";break;case 34:case 39:case 91:N+=Bs(x);break;case 9:case 10:case 13:case 32:if($>0){N+=ti(x);break}N+=Wk(h);break;case 92:N+=qk(ia()-1,7);continue;case 47:switch(gr()){case 42:case 47:Xo(Gk(Xk(An(),ia()),t,n,l),l),(li(h||1)==5||li(gr()||1)==5)&&Nn(N)&&_r(N,-1,void 0)!==" "&&(N+=" ");break;default:N+="/"}break;case 123*m:s[c++]=Nn(N)*y;case 125*m:case 59:case 0:if($>0&&x){N+=ti(x);break}switch(x){case 0:case 125:w=0;case 59+u:y==-1&&(N=He(N,/\f/g,"")),p>0&&(Nn(N)-d||m===0)&&Xo(p>32?Xf(N+";",r,n,d-1,l):Xf(He(N," ","")+";",r,n,d-2,l),l);break;case 59:N+=";";default:if(Xo(I=qf(N,t,n,c,u,o,s,E,v=[],C=[],d,i),i),x===123)if(u===0)aa(N,t,I,I,v,i,d,s,C);else{switch(f){case 99:if(Mt(N,3)===110)break;case 108:if(Mt(N,2)===97)break;default:u=0;case 100:case 109:case 115:}u?aa(e,I,I,r&&Xo(qf(e,I,I,0,0,o,s,E,o,v=[],d,C),C),o,C,d,s,r?v:C):aa(N,I,I,I,[""],C,0,s,C)}}c=u=p=0,m=y=1,E=N="",d=a;break;case 58:d=1+Nn(N),p=h;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&Bk()==125)continue}switch(N+=ti(x),x*m){case 38:y=u>0?1:(N+="\f",-1);break;case 44:if($>0)break;s[c++]=(Nn(N)-1)*y,y=1;break;case 64:gr()===45&&(N+=Bs(An())),f=gr(),u=d=Nn(E=N+=Uk(ia())),x++;break;case 45:h===45&&Nn(N)==2&&(m=0)}}return i}function qf(e,t,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,p=o===0?i:[""],h=Sh(p),m=0,w=0,y=0;m<r;++m)for(var $=0,x=_r(e,f+1,f=Lk(w=a[m])),E=e;$<h;++$)(E=Ch(w>0?p[$]+" "+x:He(x,/&\f/g,p[$])))&&(l[y++]=E);return es(e,t,n,o===0?Du:s,l,c,u,d)}function Gk(e,t,n,r){return es(e,t,n,wh,ti(jk()),_r(e,2,-2),0,r)}function Xf(e,t,n,r,o){return es(e,t,n,Lu,_r(e,0,r),_r(e,r+1,-1),r,o)}function $h(e,t,n){switch(Fk(e,t)){case 5103:return Je+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Je+e+e;case 4855:return Je+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return ei+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Je+e+ei+e+ut+e+e;case 5936:switch(Mt(e,t+11)){case 114:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Je+e+ut+He(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Je+e+ut+e+e;case 6165:return Je+e+ut+"flex-"+e+e;case 5187:return Je+e+He(e,/(\w+).+(:[^]+)/,Je+"box-$1$2"+ut+"flex-$1$2")+e;case 5443:return Je+e+ut+"flex-item-"+He(e,/flex-|-self/g,"")+(Zn(e,/flex-|baseline/)?"":ut+"grid-row-"+He(e,/flex-|-self/g,""))+e;case 4675:return Je+e+ut+"flex-line-pack"+He(e,/align-content|flex-|-self/g,"")+e;case 5548:return Je+e+ut+He(e,"shrink","negative")+e;case 5292:return Je+e+ut+He(e,"basis","preferred-size")+e;case 6060:return Je+"box-"+He(e,"-grow","")+Je+e+ut+He(e,"grow","positive")+e;case 4554:return Je+He(e,/([^-])(transform)/g,"$1"+Je+"$2")+e;case 6187:return He(He(He(e,/(zoom-|grab)/,Je+"$1"),/(image-set)/,Je+"$1"),e,"")+e;case 5495:case 3959:return He(e,/(image-set\([^]*)/,Je+"$1$`$1");case 4968:return He(He(e,/(.+:)(flex-)?(.*)/,Je+"box-pack:$3"+ut+"flex-pack:$3"),/space-between/,"justify")+Je+e+e;case 4200:if(!Zn(e,/flex-|baseline/))return ut+"grid-column-align"+_r(e,t)+e;break;case 2592:case 3360:return ut+He(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,Zn(r.props,/grid-\w+-end/)})?~js(e+(n=n[t].value),"span")?e:ut+He(e,"-start","")+e+ut+"grid-row-span:"+(~js(n,"span")?Zn(n,/\d+/):+Zn(n,/\d+/)-+Zn(e,/\d+/))+";":ut+He(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return Zn(r.props,/grid-\w+-start/)})?e:ut+He(He(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return He(e,/(.+)-inline(.+)/,Je+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Nn(e)-1-t>6)switch(Mt(e,t+1)){case 109:if(Mt(e,t+4)!==45)break;case 102:return He(e,/(.+:)(.+)-([^]+)/,"$1"+Je+"$2-$3$1"+ei+(Mt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~js(e,"stretch")?$h(He(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return He(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,i,a,s,l,c){return ut+o+":"+i+c+(a?ut+o+"-span:"+(s?l:+l-+i)+c:"")+e});case 4949:if(Mt(e,t+6)===121)return He(e,":",":"+Je)+e;break;case 6444:switch(Mt(e,Mt(e,14)===45?18:11)){case 120:return He(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Je+(Mt(e,14)===45?"inline-":"")+"box$3$1"+Je+"$2$3$1"+ut+"$2box$3")+e;case 100:return He(e,":",":"+ut)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return He(e,"scroll-","scroll-snap-")+e}return e}function ci(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Uf(e,t,n,r){switch(e.type){case Dk:if(e.children.length)break;case zk:case Ok:case Lu:return e.return=e.return||e.value;case wh:return"";case vh:return e.return=e.value+"{"+ci(e.children,r)+"}";case Du:if(!Nn(e.value=e.props.join(",")))return""}return Nn(n=ci(e.children,r))?e.return=e.value+"{"+n+"}":""}function Kk(e){var t=Sh(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function Yk(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Lu:e.return=$h(e.value,e.length,n);return;case vh:return ci([pr(e,{value:He(e.value,"@","@"+Je)})],r);case Du:if(e.length)return _k(n=e.props,function(o){switch(Zn(o,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":qr(pr(e,{props:[He(o,/:(read-\w+)/,":"+ei+"$1")]})),qr(pr(e,{props:[o]})),Ol(e,{props:Vf(n,r)});break;case"::placeholder":qr(pr(e,{props:[He(o,/:(plac\w+)/,":"+Je+"input-$1")]})),qr(pr(e,{props:[He(o,/:(plac\w+)/,":"+ei+"$1")]})),qr(pr(e,{props:[He(o,/:(plac\w+)/,ut+"input-$1")]})),qr(pr(e,{props:[o]})),Ol(e,{props:Vf(n,r)});break}return""})}}function kh(e,t){const{path:n,parentSelectors:r}=t;tt(!1,`[Ant Design CSS-in-JS] ${n?`Error in ${n}: `:""}${e}${r.length?` Selector: ${r.join(" | ")}`:""}`)}const Qk=(e,t,n)=>{if(e==="content"){const r=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;(typeof t!="string"||["normal","none","initial","inherit","unset"].indexOf(t)===-1&&!r.test(t)&&!t.startsWith("var(")&&(t.charAt(0)!==t.charAt(t.length-1)||t.charAt(0)!=='"'&&t.charAt(0)!=="'"))&&kh(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${t}"'\`.`,n)}},Zk=(e,t,n)=>{e==="animation"&&n.hashId&&t!=="none"&&kh(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`,n)},Gf="data-ant-cssinjs-cache-path",Ih="_FILE_STYLE__";let Lr,Rh=!0;function Jk(){var e;if(!Lr&&(Lr={},vn())){const t=document.createElement("div");t.className=Gf,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);let n=getComputedStyle(t).content||"";n=n.replace(/^"/,"").replace(/"$/,""),n.split(";").forEach(o=>{const[i,a]=o.split(":");Lr[i]=a});const r=document.querySelector(`style[${Gf}]`);r&&(Rh=!1,(e=r.parentNode)==null||e.removeChild(r)),document.body.removeChild(t)}}function e2(e){return Jk(),!!Lr[e]}function t2(e){const t=Lr[e];let n=null;if(t&&vn())if(Rh)n=Ih;else{const r=document.querySelector(`style[${nr}="${Lr[e]}"]`);r?n=r.innerHTML:delete Lr[e]}return[n,t]}const Ph="_skip_check_",Th="_multi_value_";function Hs(e,t){return(t?ci(Wf(e),Kk([Yk,Uf])):ci(Wf(e),Uf)).replace(/\{%%%\:[^;];}/g,";")}function n2(e){return typeof e=="object"&&e&&(Ph in e||Th in e)}function Kf(e,t,n="high"){if(!t)return e;const r=bh({hashCls:t,hashPriority:n});return e.split(",").map(i=>{var c;const a=i.trim().split(/\s+/);let s=a[0]||"";const l=((c=s.match(/^\w+/))==null?void 0:c[0])||"";return s=`${l}${r}${s.slice(l.length)}`,[s,...a.slice(1)].join(" ")}).join(",")}const Ll=(e,t={},{root:n,injectHash:r,parentSelectors:o}={root:!0,parentSelectors:[]})=>{const{hashId:i,layer:a,path:s,hashPriority:l,transformers:c=[],linters:u=[]}=t;let d="",f={};function p(w){const y=w.getName(i);if(!f[y]){const[$]=Ll(w.style,t,{root:!1,parentSelectors:o});f[y]=`@keyframes ${w.getName(i)}${$}`}}function h(w,y=[]){return w.forEach($=>{Array.isArray($)?h($,y):$&&y.push($)}),y}return h(Array.isArray(e)?e:[e]).forEach(w=>{const y=typeof w=="string"&&!n?{}:w;if(typeof y=="string")d+=`${y}
|
|
95
|
+
`;else if(y._keyframe)p(y);else{const $=c.reduce((x,E)=>{var v;return((v=E==null?void 0:E.visit)==null?void 0:v.call(E,x))||x},y);Object.keys($).forEach(x=>{const E=$[x];if(typeof E=="object"&&E&&(x!=="animationName"||!E._keyframe)&&!n2(E)){let v=!1,C=x.trim(),I=!1;(n||r)&&i?C.startsWith("@")?v=!0:C==="&"?C=Kf("",i,l):C=Kf(x,i,l):n&&!i&&(C==="&"||C==="")&&(C="",I=!0);const[N,A]=Ll(E,t,{root:I,injectHash:v,parentSelectors:[...o,C]});f={...f,...A},d+=`${C}${N}`}else{let v=function(I,N){process.env.NODE_ENV!=="production"&&(typeof E!="object"||!(E!=null&&E[Ph]))&&[Qk,Zk,...u].forEach(R=>R(I,N,{path:s,hashId:i,parentSelectors:o}));const A=I.replace(/[A-Z]/g,R=>`-${R.toLowerCase()}`);let k=N;!Ak[I]&&typeof k=="number"&&k!==0&&(k=`${k}px`),I==="animationName"&&(N!=null&&N._keyframe)&&(p(N),k=N.getName(i)),d+=`${A}:${k};`};const C=(E==null?void 0:E.value)??E;typeof E=="object"&&(E!=null&&E[Th])&&Array.isArray(C)?C.forEach(I=>{v(x,I)}):wk(C)&&v(x,C)}})}}),n?a&&(d&&(d=`@layer ${a.name} {${d}}`),a.dependencies&&(f[`@layer ${a.name}`]=a.dependencies.map(w=>`@layer ${w}, ${a.name};`).join(`
|
|
96
|
+
`))):d=`{${d}}`,[d,f]};function Nh(e,t){return si(`${e.join("%")}${t}`)}const r2="style";function Fl(e,t){const{path:n,hashId:r,layer:o,nonce:i,clientOnly:a,order:s=0}=e,{mock:l,hashPriority:c,container:u,transformers:d,linters:f,cache:p,layer:h,autoPrefix:m}=g.useContext(wi),w=[r||""];h&&w.push("layer"),w.push(...n);let y=Al;process.env.NODE_ENV!=="production"&&l!==void 0&&(y=l==="client"),Ou(r2,w,()=>{const $=w.join("|");if(e2($)){const[N,A]=t2($);if(N)return[N,A,{},a,s]}const x=t(),[E,v]=Ll(x,{hashId:r,hashPriority:c,layer:h?o:void 0,path:n.join("-"),transformers:d,linters:f}),C=Hs(E,m||!1),I=Nh(w,C);return[C,I,v,a,s]},($,x)=>{const[,E]=$;x&&Al&&ii(E,{mark:nr,attachTo:u})},$=>{const[x,E,v,,C]=$;if(y&&x!==Ih){let I={mark:nr,prepend:h?!1:"queue",attachTo:u,priority:C};I=zu(I,i);const N=[],A=[];Object.keys(v).forEach(R=>{R.startsWith("@layer")?N.push(R):A.push(R)}),N.forEach(R=>{Dr(Hs(v[R],m||!1),`_layer-${R}`,{...I,prepend:!0})});const k=Dr(x,E,I);k[er]=p.instanceId,process.env.NODE_ENV!=="production"&&k.setAttribute(mk,w.join("|")),A.forEach(R=>{Dr(Hs(v[R],m||!1),`_effect-${R}`,I)})}})}const o2="cssVar",i2=(e,t)=>{const{key:n,prefix:r,unitless:o,ignore:i,token:a,hashId:s,scope:l,nonce:c}=e,{cache:{instanceId:u},container:d,hashPriority:f}=b.useContext(wi),{_tokenKey:p}=a,h=Array.isArray(l)?l.join("@@"):l,m=[...e.path,n,h,p];return Ou(o2,m,()=>{const y=t(),[$,x]=xh(y,n,{prefix:r,unitless:o,ignore:i,scope:l,hashPriority:f,hashCls:s}),E=Nh(m,x);return[$,x,E,n]},([,,y])=>{Al&&ii(y,{mark:nr,attachTo:d})},([,y,$])=>{if(!y)return;let x={mark:nr,prepend:"queue",attachTo:d,priority:-999};x=zu(x,c);const E=Dr(y,$,x);E[er]=u,E.setAttribute(Au,n)})};class et{constructor(t,n){J(this,"name");J(this,"style");J(this,"_keyframe",!0);this.name=t,this.style=n}getName(t=""){return t?`${t}-${this.name}`:this.name}}function Xr(e){return e.notSplit=!0,e}Xr(["borderTop","borderBottom"]),Xr(["borderTop"]),Xr(["borderBottom"]),Xr(["borderLeft","borderRight"]),Xr(["borderLeft"]),Xr(["borderRight"]);const Fu=b.createContext({});function Mh(){}const{resetWarned:a2}=tt;let Yn=null;function s2(){Yn=null,a2()}let Ah=Mh;process.env.NODE_ENV!=="production"&&(Ah=(e,t,n)=>{tt(e,`[antd: ${t}] ${n}`),process.env.NODE_ENV==="test"&&s2()});const _u=Ah,zh=g.createContext({}),l2=process.env.NODE_ENV!=="production"?e=>{const{strict:t}=g.useContext(zh),n=(r,o,i)=>{if(!r)if(t===!1&&o==="deprecated"){const a=Yn;Yn||(Yn={}),Yn[e]=Yn[e]||[],Yn[e].includes(i||"")||Yn[e].push(i||""),a||console.warn("[antd] There exists deprecated usage in your code:",Yn)}else process.env.NODE_ENV!=="production"&&_u(r,e,i)};return n.deprecated=(r,o,i,a="")=>{n(r,"deprecated",`\`${o}\` is deprecated. Please use \`${i}\` instead.${a?` ${a}`:""}`)},n}:()=>{const e=()=>{};return e.deprecated=Mh,e},At=l2,_l=g.createContext(null);function c2({children:e,onBatchResize:t}){const n=g.useRef(0),r=g.useRef([]),o=g.useContext(_l),i=g.useCallback((a,s,l)=>{n.current+=1;const c=n.current;r.current.push({size:a,element:s,data:l}),Promise.resolve().then(()=>{c===n.current&&(t==null||t(r.current),r.current=[])}),o==null||o(a,s,l)},[t,o]);return g.createElement(_l.Provider,{value:i},e)}const tr=new Map;function Oh(e){e.forEach(t=>{var r;const{target:n}=t;(r=tr.get(n))==null||r.forEach(o=>o(n))})}let Vs;function Dh(){return Vs||(Vs=new ResizeObserver(Oh)),Vs}process.env.NODE_ENV;process.env.NODE_ENV;function u2(e,t){tr.has(e)||(tr.set(e,new Set),Dh().observe(e)),tr.get(e).add(t)}function d2(e,t){tr.has(e)&&(tr.get(e).delete(t),tr.get(e).size||(Dh().unobserve(e),tr.delete(e)))}function Lh(e,t,n,r){const o=g.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),i=Ge(l=>{const{width:c,height:u}=l.getBoundingClientRect(),{offsetWidth:d,offsetHeight:f}=l,p=Math.floor(c),h=Math.floor(u);if(o.current.width!==p||o.current.height!==h||o.current.offsetWidth!==d||o.current.offsetHeight!==f){const m={width:p,height:h,offsetWidth:d,offsetHeight:f};o.current=m;const w=d===Math.round(c)?c:d,y=f===Math.round(u)?u:f,$={...m,offsetWidth:w,offsetHeight:y};r==null||r($,l),Promise.resolve().then(()=>{n==null||n($,l)})}}),a=typeof t=="function",s=g.useRef(0);g.useEffect(()=>{const l=a?t():t;return l&&e?u2(l,i):e&&a&&(s.current+=1),()=>{l&&d2(l,i)}},[e,a?s.current:t])}function f2(e,t){const{children:n,disabled:r,onResize:o,data:i}=e,a=g.useRef(null),s=g.useContext(_l),l=typeof n=="function",c=l?n(a):n,u=!l&&g.isValidElement(c)&&$o(c),d=u?cr(c):null,f=Hr(d,a),p=()=>$u(a.current);return g.useImperativeHandle(t,()=>p()),Lh(!r,p,o,(h,m)=>{s==null||s(h,m,i)}),u?g.cloneElement(c,{ref:f}):c}const Fh=g.forwardRef(f2);process.env.NODE_ENV!=="production"&&(Fh.displayName="SingleObserver");function jl(){return jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jl.apply(this,arguments)}const p2="rc-observer-key";function m2(e,t){const{children:n}=e,r=typeof n=="function"?[n]:or(n);return process.env.NODE_ENV!=="production"&&(r.length>1?xa(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&xa(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map((o,i)=>{const a=(o==null?void 0:o.key)||`${p2}-${i}`;return g.createElement(Fh,jl({},e,{key:a,ref:i===0?t:void 0}),o)})}const Io=g.forwardRef(m2);process.env.NODE_ENV!=="production"&&(Io.displayName="ResizeObserver");Io.Collection=c2;function Bl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g2(e){if(Array.isArray(e))return Bl(e)}function h2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _h(e,t){if(e){if(typeof e=="string")return Bl(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bl(e,t):void 0}}function b2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
97
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jr(e){return g2(e)||h2(e)||_h(e)||b2()}const va="ant",ju="anticon",x2=["outlined","borderless","filled","underlined"],y2=(e,t)=>t||(e?`${va}-${e}`:va),dt=g.createContext({getPrefixCls:y2,iconPrefixCls:ju}),{Consumer:G5}=dt,Yf={};function Kn(e){const t=g.useContext(dt),{getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}=t,a=t[e];return{classNames:Yf,styles:Yf,...a,getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}}function On(e){"@babel/helpers - typeof";return On=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},On(e)}function w2(e){if(Array.isArray(e))return e}function v2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function C2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
98
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jh(e,t){return w2(e)||v2(e,t)||_h(e,t)||C2()}function S2(e,t){if(On(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(On(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bh(e){var t=S2(e,"string");return On(t)=="symbol"?t:t+""}function Xn(e,t,n){return(t=Bh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qf(Object(n),!0).forEach(function(r){Xn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ns(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bh(r.key),r)}}function rs(e,t,n){return t&&E2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hl(e,t){return Hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Hl(e,t)}function $2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hl(e,t)}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(e)}function Hh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hh=function(){return!!e})()}function k2(e,t){if(t&&(On(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sa(e)}function I2(e){var t=Hh();return function(){var n,r=Ca(e);if(t){var o=Ca(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k2(this,n)}}var R2=rs(function e(){ns(this,e)}),Vh="CALC_UNIT",P2=new RegExp(Vh,"g");function Ws(e){return typeof e=="number"?"".concat(e).concat(Vh):e}var T2=function(e){$2(n,e);var t=I2(n);function n(r,o){var i;ns(this,n),i=t.call(this),Xn(sa(i),"result",""),Xn(sa(i),"unitlessCssVar",void 0),Xn(sa(i),"lowPriority",void 0);var a=On(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):a==="number"?i.result=Ws(r):a==="string"&&(i.result=r),i}return rs(n,[{key:"add",value:function(o){return o instanceof n?this.result="".concat(this.result," + ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," + ").concat(Ws(o))),this.lowPriority=!0,this}},{key:"sub",value:function(o){return o instanceof n?this.result="".concat(this.result," - ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," - ").concat(Ws(o))),this.lowPriority=!0,this}},{key:"mul",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," * ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," * ").concat(o)),this.lowPriority=!1,this}},{key:"div",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," / ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," / ").concat(o)),this.lowPriority=!1,this}},{key:"getResult",value:function(o){return this.lowPriority||o?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(o){var i=this,a=o||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return i.result.includes(c)})&&(l=!1),this.result=this.result.replace(P2,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(R2),N2=function(t,n){var r=T2;return function(o){return new r(o,n)}},Zf=function(t,n){return"".concat([n,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function Jf(e,t,n,r){var o=cn({},t[e]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(s){var l=jh(s,2),c=l[0],u=l[1];if(process.env.NODE_ENV!=="production"&&tt(!(o!=null&&o[c]),"Component Token `".concat(String(c),"` of ").concat(String(e)," is deprecated. Please use `").concat(String(u),"` instead.")),o!=null&&o[c]||o!=null&&o[u]){var d;(d=o[u])!==null&&d!==void 0||(o[u]=o==null?void 0:o[c])}})}var a=cn(cn({},n),o);return Object.keys(a).forEach(function(s){a[s]===t[s]&&delete a[s]}),a}var Wh=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",Vl=!0;function yt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!Wh)return Object.assign.apply(Object,[{}].concat(t));Vl=!1;var r={};return t.forEach(function(o){if(On(o)==="object"){var i=Object.keys(o);i.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return o[a]}})})}}),Vl=!0,r}var ep={};function M2(){}var A2=function(t){var n,r=t,o=M2;return Wh&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(a,s){if(Vl){var l;(l=n)===null||l===void 0||l.add(s)}return a[s]}}),o=function(a,s){var l;ep[a]={global:Array.from(n),component:cn(cn({},(l=ep[a])===null||l===void 0?void 0:l.component),s)}}),{token:r,keys:n,flush:o}};function tp(e,t,n){if(typeof n=="function"){var r;return n(yt(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function z2(e){return{max:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"max(".concat(r.map(function(i){return xe(i)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"min(".concat(r.map(function(i){return xe(i)}).join(","),")")}}}var O2=1e3*60*10,D2=function(){function e(){ns(this,e),Xn(this,"map",new Map),Xn(this,"objectIDMap",new WeakMap),Xn(this,"nextID",0),Xn(this,"lastAccessBeat",new Map),Xn(this,"accessBeat",0)}return rs(e,[{key:"set",value:function(n,r){this.clear();var o=this.getCompositeKey(n);this.map.set(o,r),this.lastAccessBeat.set(o,Date.now())}},{key:"get",value:function(n){var r=this.getCompositeKey(n),o=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,o}},{key:"getCompositeKey",value:function(n){var r=this,o=n.map(function(i){return i&&On(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(On(i),"_").concat(i)});return o.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var r=this.nextID;return this.objectIDMap.set(n,r),this.nextID+=1,r}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(o,i){r-o>O2&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),np=new D2;function L2(e,t){return b.useMemo(function(){var n=np.get(t);if(n)return n;var r=e();return np.set(t,r),r},t)}var F2=function(){return{}};function qh(e){var t=e.useCSP,n=t===void 0?F2:t,r=e.useToken,o=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,s=e.getCompUnitless;function l(f,p,h,m){var w=Array.isArray(f)?f[0]:f;function y(N){return"".concat(String(w)).concat(N.slice(0,1).toUpperCase()).concat(N.slice(1))}var $=(m==null?void 0:m.unitless)||{},x=typeof s=="function"?s(f):{},E=cn(cn({},x),{},Xn({},y("zIndexPopup"),!0));Object.keys($).forEach(function(N){E[y(N)]=$[N]});var v=cn(cn({},m),{},{unitless:E,prefixToken:y}),C=u(f,p,h,v),I=c(w,h,v);return function(N){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N,k=C(N,A),R=m==null?void 0:m.extraCssVarPrefixCls,O=typeof R=="function"?R({prefixCls:N,rootCls:A}):R,z=I(O!=null&&O.length?[A].concat(jr(O)):A);return[k,z]}}function c(f,p,h){var m=h.unitless,w=h.prefixToken,y=h.ignore;return function($){var x=r(),E=x.cssVar,v=x.realToken,C=n();return i2({path:[f],prefix:E.prefix,key:E.key,unitless:m,ignore:y,token:v,scope:$,nonce:function(){return C.nonce}},function(){var I=tp(f,v,p),N=Jf(f,v,I,{deprecatedTokens:h==null?void 0:h.deprecatedTokens});return I&&Object.keys(I).forEach(function(A){N[w(A)]=N[A],delete N[A]}),N}),E==null?void 0:E.key}}function u(f,p,h){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},w=Array.isArray(f)?f:[f,f],y=jh(w,1),$=y[0],x=w.join("-"),E=e.layer||{name:"antd"};return function(v){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v,I=r(),N=I.theme,A=I.realToken,k=I.hashId,R=I.token,O=I.cssVar,z=I.zeroRuntime,D=b.useMemo(function(){return z},[]);if(D)return k;var M=o(),L=M.rootPrefixCls,_=M.iconPrefixCls,V=n(),X="css",P=L2(function(){var F=new Set;return Object.keys(m.unitless||{}).forEach(function(U){F.add(oa(U,O.prefix)),F.add(oa(U,Zf($,O.prefix)))}),N2(X,F)},[X,$,O==null?void 0:O.prefix]),Y=z2(),K=Y.max,T=Y.min,ne={theme:N,token:R,hashId:k,nonce:function(){return V.nonce},clientOnly:m.clientOnly,layer:E,order:m.order||-999};return typeof i=="function"&&Fl(cn(cn({},ne),{},{clientOnly:!1,path:["Shared",L]}),function(){return i(R,{prefix:{rootPrefixCls:L,iconPrefixCls:_},csp:V})}),Fl(cn(cn({},ne),{},{path:[x,v,_]}),function(){if(m.injectStyle===!1)return[];var F=A2(R),U=F.token,re=F.flush,j=tp($,A,h),H=".".concat(v),ee=Jf($,A,j,{deprecatedTokens:m.deprecatedTokens});j&&On(j)==="object"&&Object.keys(j).forEach(function(ae){j[ae]="var(".concat(oa(ae,Zf($,O.prefix)),")")});var oe=yt(U,{componentCls:H,prefixCls:v,iconCls:".".concat(_),antCls:".".concat(L),calc:P,max:K,min:T},j),B=p(oe,{hashId:k,prefixCls:v,rootPrefixCls:L,iconPrefixCls:_});re($,ee);var ie=typeof a=="function"?a(oe,v,C,m.resetFont):null;return[m.resetStyle===!1?null:ie,B]}),k}}function d(f,p,h){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},w=u(f,p,h,cn({resetStyle:!1,order:-998},m)),y=function(x){var E=x.prefixCls,v=x.rootCls,C=v===void 0?E:v;return w(E,C),null};return process.env.NODE_ENV!=="production"&&(y.displayName="SubStyle_".concat(String(Array.isArray(f)?f.join("."):f))),y}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const xr=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function la(e){return(e+8)/e}function _2(e){const t=Array.from({length:10}).map((n,r)=>{const o=r-1,i=e*Math.E**(o/5),a=r>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:la(n)}))}const j2="6.6.4",Xh={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},ui={...Xh,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
99
99
|
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
100
|
-
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,focusOutline:!0,motion:!0},j2={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},Ft=Math.round;function Ws(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const ep=(e,t,n)=>n===0?e:e/100;function Lo(e,t){const n=t||255;return e>n?n:e<0?0:e}class Ve{constructor(t){ee(this,"isValid",!0);ee(this,"r",0);ee(this,"g",0);ee(this,"b",0);ee(this,"a",1);ee(this,"_h");ee(this,"_hsl_s");ee(this,"_hsv_s");ee(this,"_l");ee(this,"_v");ee(this,"_max");ee(this,"_min");ee(this,"_brightness");function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let o=function(i){return r.startsWith(i)};const r=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(r))this.fromHexString(r);else if(o("rgb"))this.fromRgbString(r);else if(o("hsl"))this.fromHslString(r);else if(o("hsv")||o("hsb"))this.fromHsvString(r);else{const i=j2[r.toLowerCase()];i&&this.fromHexString(parseInt(i,36).toString(16).padStart(6,"0"))}}else if(t instanceof Ve)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=Lo(t.r),this.g=Lo(t.g),this.b=Lo(t.b),this.a=typeof t.a=="number"?Lo(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),o=t(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Ft(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(typeof this._hsv_s>"u"){const t=this.getMax()-this.getMin();t===0?this._hsv_s=0:this._hsv_s=t/this.getMax()}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s>"u"){const t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else{const n=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*n-1))}}return this._hsl_s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(t,n=50){const r=this._c(t),o=n/100,i=s=>(r[s]-this[s])*o+this[s],a={r:Ft(i("r")),g:Ft(i("g")),b:Ft(i("b")),a:Ft(i("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),o=i=>Ft((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Ft(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Ft(this.getHSLSaturation()*100),r=Ft(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const o=this.clone();return o[t]=Lo(n,r),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:o}){const i=(t%360+360)%360;if(this._h=i,this._hsl_s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const p=Ft(r*255);this.r=p,this.g=p,this.b=p;return}let a=0,s=0,l=0;const c=i/60,u=(1-Math.abs(2*r-1))*n,d=u*(1-Math.abs(c%2-1));c>=0&&c<1?(a=u,s=d):c>=1&&c<2?(a=d,s=u):c>=2&&c<3?(s=u,l=d):c>=3&&c<4?(s=d,l=u):c>=4&&c<5?(a=d,l=u):c>=5&&c<6&&(a=u,l=d);const f=r-u/2;this.r=Ft((a+f)*255),this.g=Ft((s+f)*255),this.b=Ft((l+f)*255)}fromHsv({h:t,s:n,v:r,a:o}){const i=(t%360+360)%360;this._h=i,this._hsv_s=n,this._v=r,this.a=typeof o=="number"?o:1;const a=Ft(r*255);if(this.r=a,this.g=a,this.b=a,n<=0)return;const s=i/60,l=Math.floor(s),c=s-l,u=Ft(r*(1-n)*255),d=Ft(r*(1-n*c)*255),f=Ft(r*(1-n*(1-c))*255);switch(l){case 0:this.g=f,this.b=u;break;case 1:this.r=d,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=d;break;case 4:this.r=f,this.g=u;break;case 5:default:this.g=u,this.b=d;break}}fromHsvString(t){const n=Ws(t,ep);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=Ws(t,ep);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=Ws(t,(r,o)=>o.includes("%")?Ft(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}const Wi=2,tp=.16,B2=.05,H2=.05,V2=.15,Xh=5,Uh=4,W2=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function np(e,t,n){let r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Wi*t:Math.round(e.h)+Wi*t:r=n?Math.round(e.h)+Wi*t:Math.round(e.h)-Wi*t,r<0?r+=360:r>=360&&(r-=360),r}function rp(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return n?r=e.s-tp*t:t===Uh?r=e.s+tp:r=e.s+B2*t,r>1&&(r=1),n&&t===Xh&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function op(e,t,n){let r;return n?r=e.v+H2*t:r=e.v-V2*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Gh(e,t={}){const n=[],r=new Ve(e),o=r.toHsv();for(let i=Xh;i>0;i-=1){const a=new Ve({h:np(o,i,!0),s:rp(o,i,!0),v:op(o,i,!0)});n.push(a)}n.push(r);for(let i=1;i<=Uh;i+=1){const a=new Ve({h:np(o,i),s:rp(o,i),v:op(o,i)});n.push(a)}return t.theme==="dark"?W2.map(({index:i,amount:a})=>new Ve(t.backgroundColor||"#141414").mix(n[i],a).toHexString()):n.map(i=>i.toHexString())}const qs={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Vl=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Vl.primary=Vl[5];const Wl=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Wl.primary=Wl[5];const ql=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];ql.primary=ql[5];const Xl=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Xl.primary=Xl[5];const Ul=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Ul.primary=Ul[5];const Gl=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Gl.primary=Gl[5];const Kl=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Kl.primary=Kl[5];const Yl=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Yl.primary=Yl[5];const Ql=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ql.primary=Ql[5];const Zl=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Zl.primary=Zl[5];const Jl=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Jl.primary=Jl[5];const ec=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];ec.primary=ec[5];const tc=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];tc.primary=tc[5];const Xs={red:Vl,volcano:Wl,orange:ql,gold:Xl,yellow:Ul,lime:Gl,green:Kl,cyan:Yl,blue:Ql,geekblue:Zl,purple:Jl,magenta:ec,grey:tc};function q2(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:o,colorError:i,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:c}=e,u=t(s),d=t(r),f=t(o),p=t(i),h=t(a),m=n(l,c),w=e.colorLink||e.colorInfo,y=t(w),$=new Ve(p[1]).mix(new Ve(p[3]),50).toHexString(),x={};return xr.forEach(E=>{const v=e[E];if(v){const C=t(v);x[`${E}Hover`]=C[5],x[`${E}Active`]=C[7]}}),{...m,colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBgFilledHover:$,colorErrorBgActive:p[3],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:h[1],colorInfoBgHover:h[2],colorInfoBorder:h[3],colorInfoBorderHover:h[4],colorInfoHover:h[4],colorInfo:h[6],colorInfoActive:h[7],colorInfoTextHover:h[8],colorInfoText:h[9],colorInfoTextActive:h[10],colorLinkHover:y[4],colorLink:y[6],colorLinkActive:y[7],...x,colorBgMask:new Ve("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}const X2=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};function U2(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return{motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1,...X2(r)}}const G2=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},K2=e=>{const t=F2(e),n=t.map(u=>u.size),r=t.map(u=>u.lineHeight),o=n[1],i=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*o),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function Y2(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const En=(e,t)=>new Ve(e).setA(t).toRgbString(),Ur=(e,t)=>new Ve(e).darken(t).toHexString(),Q2=e=>{const t=Gh(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},Z2=(e,t,n)=>{const r=e||"#fff",o=t||"#000";return{colorBgBase:r,colorTextBase:o,colorShadow:n||"#000",colorText:En(o,.88),colorTextSecondary:En(o,.65),colorTextTertiary:En(o,.45),colorTextQuaternary:En(o,.25),colorFill:En(o,.15),colorFillSecondary:En(o,.06),colorFillTertiary:En(o,.04),colorFillQuaternary:En(o,.02),colorBgSolid:En(o,1),colorBgSolidHover:En(o,.75),colorBgSolidActive:En(o,.95),colorBgLayout:Ur(r,4),colorBgContainer:Ur(r,0),colorBgElevated:Ur(r,0),colorBgSpotlight:En(o,.85),colorBgBlur:"transparent",colorBorder:Ur(r,15),colorBorderDisabled:Ur(r,15),colorBorderSecondary:Ur(r,6)}};function Kh(e){qs.pink=qs.magenta,Xs.pink=Xs.magenta;const t=Object.keys(qh).map(n=>{const r=e[n]===qs[n]?Xs[n]:Gh(e[n]);return Array.from({length:10},()=>1).reduce((o,i,a)=>(o[`${n}-${a+1}`]=r[a],o[`${n}${a+1}`]=r[a],o),{})}).reduce((n,r)=>(n={...n,...r},n),{});return{...e,...t,...q2(e,{generateColorPalettes:Q2,generateNeutralColorPalettes:Z2}),...K2(e.fontSize),...Y2(e),...G2(e),...U2(e)}}const Yh=ya(Kh),Ca={token:ci,override:{override:ci},hashed:!0},Fu=b.createContext(Ca);function Us(e){return e>=0&&e<=255}function Xo(e,t){const{r:n,g:r,b:o,a:i}=new Ve(e).toRgb();if(i<1)return e;const{r:a,g:s,b:l}=new Ve(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(Us(u)&&Us(d)&&Us(f))return new Ve({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Ve({r:n,g:r,b:o,a:1}).toRgbString()}function J2(e){const{override:t,...n}=e,r={...t};Object.keys(ci).forEach(w=>{delete r[w]});const o={...n,...r},i=new Ve(o.colorShadow),a=i.a,s=w=>i.clone().setA(a*w).toRgbString(),l=480,c=576,u=768,d=992,f=1200,p=1600,h=1920;if(o.motion===!1){const w="0s";o.motionDurationFast=w,o.motionDurationMid=w,o.motionDurationSlow=w}return{...o,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Xo(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:Xo(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Xo(o.colorWarningBg,o.colorBgContainer),colorErrorAffix:o.colorError,colorWarningAffix:o.colorWarning,fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.focusOutline===!1?0:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:Xo(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
|
|
100
|
+
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,focusOutline:!0,motion:!0},B2={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},Ft=Math.round;function qs(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const rp=(e,t,n)=>n===0?e:e/100;function Fo(e,t){const n=t||255;return e>n?n:e<0?0:e}class Ve{constructor(t){J(this,"isValid",!0);J(this,"r",0);J(this,"g",0);J(this,"b",0);J(this,"a",1);J(this,"_h");J(this,"_hsl_s");J(this,"_hsv_s");J(this,"_l");J(this,"_v");J(this,"_max");J(this,"_min");J(this,"_brightness");function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let o=function(i){return r.startsWith(i)};const r=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(r))this.fromHexString(r);else if(o("rgb"))this.fromRgbString(r);else if(o("hsl"))this.fromHslString(r);else if(o("hsv")||o("hsb"))this.fromHsvString(r);else{const i=B2[r.toLowerCase()];i&&this.fromHexString(parseInt(i,36).toString(16).padStart(6,"0"))}}else if(t instanceof Ve)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=Fo(t.r),this.g=Fo(t.g),this.b=Fo(t.b),this.a=typeof t.a=="number"?Fo(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),o=t(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Ft(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(typeof this._hsv_s>"u"){const t=this.getMax()-this.getMin();t===0?this._hsv_s=0:this._hsv_s=t/this.getMax()}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s>"u"){const t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else{const n=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*n-1))}}return this._hsl_s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(t,n=50){const r=this._c(t),o=n/100,i=s=>(r[s]-this[s])*o+this[s],a={r:Ft(i("r")),g:Ft(i("g")),b:Ft(i("b")),a:Ft(i("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),o=i=>Ft((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Ft(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Ft(this.getHSLSaturation()*100),r=Ft(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const o=this.clone();return o[t]=Fo(n,r),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:o}){const i=(t%360+360)%360;if(this._h=i,this._hsl_s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const p=Ft(r*255);this.r=p,this.g=p,this.b=p;return}let a=0,s=0,l=0;const c=i/60,u=(1-Math.abs(2*r-1))*n,d=u*(1-Math.abs(c%2-1));c>=0&&c<1?(a=u,s=d):c>=1&&c<2?(a=d,s=u):c>=2&&c<3?(s=u,l=d):c>=3&&c<4?(s=d,l=u):c>=4&&c<5?(a=d,l=u):c>=5&&c<6&&(a=u,l=d);const f=r-u/2;this.r=Ft((a+f)*255),this.g=Ft((s+f)*255),this.b=Ft((l+f)*255)}fromHsv({h:t,s:n,v:r,a:o}){const i=(t%360+360)%360;this._h=i,this._hsv_s=n,this._v=r,this.a=typeof o=="number"?o:1;const a=Ft(r*255);if(this.r=a,this.g=a,this.b=a,n<=0)return;const s=i/60,l=Math.floor(s),c=s-l,u=Ft(r*(1-n)*255),d=Ft(r*(1-n*c)*255),f=Ft(r*(1-n*(1-c))*255);switch(l){case 0:this.g=f,this.b=u;break;case 1:this.r=d,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=d;break;case 4:this.r=f,this.g=u;break;case 5:default:this.g=u,this.b=d;break}}fromHsvString(t){const n=qs(t,rp);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=qs(t,rp);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=qs(t,(r,o)=>o.includes("%")?Ft(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}const qi=2,op=.16,H2=.05,V2=.05,W2=.15,Uh=5,Gh=4,q2=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function ip(e,t,n){let r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-qi*t:Math.round(e.h)+qi*t:r=n?Math.round(e.h)+qi*t:Math.round(e.h)-qi*t,r<0?r+=360:r>=360&&(r-=360),r}function ap(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return n?r=e.s-op*t:t===Gh?r=e.s+op:r=e.s+H2*t,r>1&&(r=1),n&&t===Uh&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function sp(e,t,n){let r;return n?r=e.v+V2*t:r=e.v-W2*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Kh(e,t={}){const n=[],r=new Ve(e),o=r.toHsv();for(let i=Uh;i>0;i-=1){const a=new Ve({h:ip(o,i,!0),s:ap(o,i,!0),v:sp(o,i,!0)});n.push(a)}n.push(r);for(let i=1;i<=Gh;i+=1){const a=new Ve({h:ip(o,i),s:ap(o,i),v:sp(o,i)});n.push(a)}return t.theme==="dark"?q2.map(({index:i,amount:a})=>new Ve(t.backgroundColor||"#141414").mix(n[i],a).toHexString()):n.map(i=>i.toHexString())}const Xs={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Wl=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Wl.primary=Wl[5];const ql=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];ql.primary=ql[5];const Xl=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Xl.primary=Xl[5];const Ul=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Ul.primary=Ul[5];const Gl=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Gl.primary=Gl[5];const Kl=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Kl.primary=Kl[5];const Yl=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Yl.primary=Yl[5];const Ql=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Ql.primary=Ql[5];const Zl=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Zl.primary=Zl[5];const Jl=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Jl.primary=Jl[5];const ec=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];ec.primary=ec[5];const tc=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];tc.primary=tc[5];const nc=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];nc.primary=nc[5];const Us={red:Wl,volcano:ql,orange:Xl,gold:Ul,yellow:Gl,lime:Kl,green:Yl,cyan:Ql,blue:Zl,geekblue:Jl,purple:ec,magenta:tc,grey:nc};function X2(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:o,colorError:i,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:c}=e,u=t(s),d=t(r),f=t(o),p=t(i),h=t(a),m=n(l,c),w=e.colorLink||e.colorInfo,y=t(w),$=new Ve(p[1]).mix(new Ve(p[3]),50).toHexString(),x={};return xr.forEach(E=>{const v=e[E];if(v){const C=t(v);x[`${E}Hover`]=C[5],x[`${E}Active`]=C[7]}}),{...m,colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBgFilledHover:$,colorErrorBgActive:p[3],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:h[1],colorInfoBgHover:h[2],colorInfoBorder:h[3],colorInfoBorderHover:h[4],colorInfoHover:h[4],colorInfo:h[6],colorInfoActive:h[7],colorInfoTextHover:h[8],colorInfoText:h[9],colorInfoTextActive:h[10],colorLinkHover:y[4],colorLink:y[6],colorLinkActive:y[7],...x,colorBgMask:new Ve("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}const U2=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};function G2(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return{motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1,...U2(r)}}const K2=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},Y2=e=>{const t=_2(e),n=t.map(u=>u.size),r=t.map(u=>u.lineHeight),o=n[1],i=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*o),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function Q2(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const En=(e,t)=>new Ve(e).setA(t).toRgbString(),Ur=(e,t)=>new Ve(e).darken(t).toHexString(),Z2=e=>{const t=Kh(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},J2=(e,t,n)=>{const r=e||"#fff",o=t||"#000";return{colorBgBase:r,colorTextBase:o,colorShadow:n||"#000",colorText:En(o,.88),colorTextSecondary:En(o,.65),colorTextTertiary:En(o,.45),colorTextQuaternary:En(o,.25),colorFill:En(o,.15),colorFillSecondary:En(o,.06),colorFillTertiary:En(o,.04),colorFillQuaternary:En(o,.02),colorBgSolid:En(o,1),colorBgSolidHover:En(o,.75),colorBgSolidActive:En(o,.95),colorBgLayout:Ur(r,4),colorBgContainer:Ur(r,0),colorBgElevated:Ur(r,0),colorBgSpotlight:En(o,.85),colorBgBlur:"transparent",colorBorder:Ur(r,15),colorBorderDisabled:Ur(r,15),colorBorderSecondary:Ur(r,6)}};function Yh(e){Xs.pink=Xs.magenta,Us.pink=Us.magenta;const t=Object.keys(Xh).map(n=>{const r=e[n]===Xs[n]?Us[n]:Kh(e[n]);return Array.from({length:10},()=>1).reduce((o,i,a)=>(o[`${n}-${a+1}`]=r[a],o[`${n}${a+1}`]=r[a],o),{})}).reduce((n,r)=>(n={...n,...r},n),{});return{...e,...t,...X2(e,{generateColorPalettes:Z2,generateNeutralColorPalettes:J2}),...Y2(e.fontSize),...Q2(e),...K2(e),...G2(e)}}const Qh=wa(Yh),Sa={token:ui,override:{override:ui},hashed:!0},Bu=b.createContext(Sa);function Gs(e){return e>=0&&e<=255}function Uo(e,t){const{r:n,g:r,b:o,a:i}=new Ve(e).toRgb();if(i<1)return e;const{r:a,g:s,b:l}=new Ve(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(Gs(u)&&Gs(d)&&Gs(f))return new Ve({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Ve({r:n,g:r,b:o,a:1}).toRgbString()}function eI(e){const{override:t,...n}=e,r={...t};Object.keys(ui).forEach(w=>{delete r[w]});const o={...n,...r},i=new Ve(o.colorShadow),a=i.a,s=w=>i.clone().setA(a*w).toRgbString(),l=480,c=576,u=768,d=992,f=1200,p=1600,h=1920;if(o.motion===!1){const w="0s";o.motionDurationFast=w,o.motionDurationMid=w,o.motionDurationSlow=w}return{...o,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Uo(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:Uo(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Uo(o.colorWarningBg,o.colorBgContainer),colorErrorAffix:o.colorError,colorWarningAffix:o.colorWarning,fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.focusOutline===!1?0:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:Uo(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
|
|
101
101
|
0 6px 16px 0 ${s(.08)},
|
|
102
102
|
0 3px 6px -4px ${s(.12)},
|
|
103
103
|
0 9px 28px 8px ${s(.05)}
|
|
@@ -129,7 +129,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
129
129
|
0 -6px 16px 0 ${s(.08)},
|
|
130
130
|
0 -3px 6px -4px ${s(.12)},
|
|
131
131
|
0 -9px 28px 8px ${s(.05)}
|
|
132
|
-
`,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px ${s(.08)}`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px ${s(.08)}`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px ${s(.08)}`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px ${s(.08)}`,...r}}const
|
|
132
|
+
`,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px ${s(.08)}`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px ${s(.08)}`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px ${s(.08)}`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px ${s(.08)}`,...r}}const Zh={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},tI={motionBase:!0,motionUnit:!0},nI={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0,screenXXLMax:!0,screenXXXL:!0,screenXXXLMin:!0},Jh=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let a={...r,override:o};return a=eI(a),i&&Object.entries(i).forEach(([s,l])=>{const{theme:c,...u}=l;let d=u;c&&(d=Jh({...a,...u},{override:u},c)),a[s]=d}),a};function Cr(){const{token:e,hashed:t,theme:n,override:r,cssVar:o,zeroRuntime:i}=b.useContext(Bu),{csp:a,getPrefixCls:s}=b.useContext(dt),l={prefix:(o==null?void 0:o.prefix)??s(),key:(o==null?void 0:o.key)??"css-var-root"},c=`${j2}-${t||""}`,u=n||Qh,[d,f,p]=yh(u,[ui,e],{salt:c,override:r,getComputedToken:Jh,cssVar:{...l,unitless:Zh,ignore:tI,preserve:nI},nonce:a==null?void 0:a.nonce});return[u,p,t?f:"",d,l,!!i]}const eb={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Ro=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),Hu=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block",verticalAlign:"inherit"}}),rI=new et("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),rc=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),Vu=(e,t)=>({outline:`${xe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:["outline-offset","outline"].map(n=>`${n} 0s`).join(", ")}),Ea=(e,t)=>({"&:focus-visible":Vu(e)}),oI=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},...Ea(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),iI=(e,t,n,r)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:{...s,...a,[o]:a}}},tb=e=>({[`.${e}`]:{...Hu(),"&::before":{display:"none"},"&[tabindex]":{cursor:"pointer"}},[`.${e} .${e}-icon`]:{display:"block"},[`.${e}-spin`]:{animationName:rI,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),{genStyleHooks:on,genComponentStyleHook:aI,genSubStyleComponent:sI}=qh({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=b.useContext(dt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,o,i]=Cr();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{const{csp:e}=b.useContext(dt);return e??{}},getResetStyles:(e,t)=>{const n=oI(e);return[n,{"&":n},tb((t==null?void 0:t.prefix.iconPrefixCls)??ju)]},getCommonStyle:iI,getCompUnitless:()=>Zh}),ur=(e,t)=>{const n=`--${e.replace(/\./g,"")}-${t}-`;return[i=>`${n}${i}`,(i,a)=>a?`var(${n}${i}, ${a})`:`var(${n}${i})`]};function lI(e,t){return xr.reduce((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],a=e[`${r}6`],s=e[`${r}7`];return{...n,...t(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:s})}},{})}const cI=(e,t)=>(Cr(),Fl({hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>tb(e))),lp="data-rc-order",cp="data-rc-priority",uI="rc-util-key",oc=new Map;function nb(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function dI(e,t){if(!e||!t)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}function rb({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:uI}function Wu(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function fI(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function qu(e){return Array.from((oc.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function ob(e,t={}){if(!nb())return null;const{csp:n,prepend:r,priority:o=0}=t,i=fI(r),a=i==="prependQueue",s=document.createElement("style");s.setAttribute(lp,i),a&&o&&s.setAttribute(cp,`${o}`),n!=null&&n.nonce&&(s.nonce=n.nonce),s.innerHTML=e;const l=Wu(t),{firstChild:c}=l;if(r){if(a){const u=(t.styles||qu(l)).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(lp)))return!1;const f=Number(d.getAttribute(cp)||0);return o>=f});if(u.length)return l.insertBefore(s,u[u.length-1].nextSibling),s}l.insertBefore(s,c)}else l.appendChild(s);return s}function pI(e,t={}){let{styles:n}=t;return n||(n=qu(Wu(t))),n.find(r=>r.getAttribute(rb(t))===e)}function mI(e,t){const n=oc.get(e);if(!n||!dI(document,n)){const r=ob("",t);if(!r)return;const{parentNode:o}=r;oc.set(e,o),e.removeChild(r)}}function gI(e,t,n={}){var l;if(!nb())return null;const r=Wu(n),o=qu(r),i={...n,styles:o};mI(r,i);const a=pI(t,i);if(a)return(l=i.csp)!=null&&l.nonce&&a.nonce!==i.csp.nonce&&(a.nonce=i.csp.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const s=ob(e,i);return s==null||s.setAttribute(rb(i),t),s}function hI(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function bI(e){const t=hI(e);return typeof ShadowRoot<"u"&&t instanceof ShadowRoot?t:null}const up={};function xI(e,t){e||up[t]||(process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.error(`Warning: ${t}`),up[t]=!0)}function yI(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function ib(e,t){xI(e,`[@ant-design/icons] ${t}`)}function $a(e){return e!==null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function dp(e={}){return Object.keys(e).reduce((t,n)=>{const r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[yI(n)]=r}return t},{})}function ic(e,t,n){return n?b.createElement(e.tag,{key:t,...dp(e.attrs),...n},(e.children||[]).map((r,o)=>ic(r,`${t}-${e.tag}-${o}`))):b.createElement(e.tag,{key:t,...dp(e.attrs)},(e.children||[]).map((r,o)=>ic(r,`${t}-${e.tag}-${o}`)))}const wI=`
|
|
133
133
|
.anticon {
|
|
134
134
|
display: inline-flex;
|
|
135
135
|
align-items: center;
|
|
@@ -183,71 +183,71 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
183
183
|
transform: rotate(360deg);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
`,
|
|
186
|
+
`,vI=e=>{const{csp:t,prefixCls:n,layer:r,zeroRuntime:o}=b.useContext(Fu);let i=wI;n&&(i=i.replace(/anticon/g,n)),r&&(i=`@layer ${r} {
|
|
187
187
|
${i}
|
|
188
|
-
}`),b.useEffect(()=>{if(o)return;const a=e.current,s=hI(a);mI(i,"@ant-design-icons",{prepend:!r,csp:t,attachTo:s})},[])},ib=e=>{const{icon:t,className:n,onClick:r,style:o,primaryColor:i,secondaryColor:a,...s}=e,l=g.useRef(null);if(wI(l),ob(Ea(t),`icon should be icon definiton, but got ${typeof t}`),!Ea(t))return null;const c=t;return oc(c.icon,`svg-${c.name}`,{className:n,onClick:r,style:o,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...s,ref:l})};ib.displayName="IconReact";function ic(){return ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ic.apply(this,arguments)}const Jt=g.forwardRef((e,t)=>{const{className:n,icon:r,spin:o,rotate:i,tabIndex:a,onClick:s,twoToneColor:l,...c}=e,{prefixCls:u="anticon",rootClassName:d}=g.useContext(Ou);if(ob(Ea(r),`icon should be icon definiton, but got ${typeof r}`),!Ea(r))return null;const f=Z(d,u,{[`${u}-${r.name}`]:!!r.name,[`${u}-spin`]:!!o||r.name==="loading"},n);let p=a;p===void 0&&s&&(p=-1);const h=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0;return g.createElement("span",ic({role:"img","aria-label":r.name},c,{ref:t,tabIndex:p,onClick:s,className:f}),g.createElement(ib,{icon:r,style:h}))});process.env.NODE_ENV!=="production"&&(Jt.displayName="AntdIcon");var vI={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ac.apply(this,arguments)}const CI=(e,t)=>g.createElement(Jt,ac({},e,{ref:t,icon:vI})),ab=g.forwardRef(CI);process.env.NODE_ENV!=="production"&&(ab.displayName="CloseCircleFilled");var SI={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function sc(){return sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sc.apply(this,arguments)}const EI=(e,t)=>g.createElement(Jt,sc({},e,{ref:t,icon:SI})),Vu=g.forwardRef(EI);process.env.NODE_ENV!=="production"&&(Vu.displayName="CloseOutlined");const rs=e=>typeof e=="number"&&!Number.isNaN(e),br=e=>typeof e=="string",rn=e=>e!==null&&typeof e=="object",Qt=e=>typeof e=="function",$I=e=>typeof e!="object"&&!Qt(e)||e===null,sb=e=>rn(e)&&"propertyName"in e&&br(e.propertyName),lc=(e,t)=>{const n={...e};return Object.keys(t).forEach(r=>{t[r]._default?n[r]||(n[r]={}):n[r]=lc(n[r],t[r])}),n},lb=(e={},...t)=>t.filter(n=>!!n).reduce((n,r)=>(Object.keys(r).forEach(o=>{const i=e[o],a=r[o];if(i)if(rn(a))n[o]=lb(i,n[o],a);else{const{_default:s}=i;s&&(n[o]=n[o]||{},n[o][s]=Z(n[o][s],a))}else n[o]=Z(n[o],a)}),n),{}),kI=(e,...t)=>g.useMemo(()=>lb.apply(void 0,[e].concat(t)),[e].concat(t)),II=(...e)=>e.filter(t=>!!t).reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]={...t[r],...n[r]}}),t),{}),RI=(...e)=>g.useMemo(()=>II.apply(void 0,e),[].concat(e)),kt=(e,t="root")=>g.useMemo(()=>e?{[t]:e}:void 0,[e,t]),cp=(e,t)=>Qt(e)?e(t):e,Pn=(e,t,n,r)=>{const o=e.map(l=>l?cp(l,n):void 0),i=t.map(l=>l?cp(l,n):void 0),a=kI.apply(void 0,[r].concat(jr(o))),s=RI.apply(void 0,jr(i));return g.useMemo(()=>r?[lc(a,r),lc(s,r)]:[a,s],[a,s,r])},Ro=e=>`${e}-css-var`,PI=b.createContext(void 0),cb={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},TI=Object.freeze(Object.defineProperty({__proto__:null,default:cb},Symbol.toStringTag,{value:"Module"})),NI={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},ub={...NI,locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},MI=Object.freeze(Object.defineProperty({__proto__:null,default:ub},Symbol.toStringTag,{value:"Module"})),db={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},up={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...ub},timePickerLocale:{...db}},mn="${label} is not a valid ${type}",bo={locale:"en",Pagination:cb,DatePicker:up,TimePicker:db,Calendar:up,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:mn,method:mn,array:mn,object:mn,number:mn,date:mn,boolean:mn,integer:mn,float:mn,regexp:mn,email:mn,url:mn,hex:mn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};({...bo.Modal});let la=[];const dp=()=>la.reduce((e,t)=>({...e,...t}),bo.Modal);function AI(e){if(e){const t={...e};return la.push(t),dp(),()=>{la=la.filter(n=>n!==t),dp()}}({...bo.Modal})}const Wu=b.createContext(void 0),zI=(e,t)=>{const n=g.useContext(Wu),r=g.useMemo(()=>{const i=bo[e],a=(n==null?void 0:n[e])??{};return{...Qt(i)?i():i,...a||{}}},[e,t,n]),o=g.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?bo.locale:i},[n]);return[r,o]},fb="internalMark",pb=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;if(process.env.NODE_ENV!=="production"){const i=At("LocaleProvider");process.env.NODE_ENV!=="production"&&i(r===fb,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale")}g.useEffect(()=>AI(t==null?void 0:t.Modal),[t]);const o=g.useMemo(()=>({...t,exist:!0}),[t]);return g.createElement(Wu.Provider,{value:o},n)};process.env.NODE_ENV!=="production"&&(pb.displayName="LocaleProvider");const mb=g.createContext(null);let OI=!1;function DI(e){return OI}const fp=[];function LI(e,t){const[n]=g.useState(()=>{if(!vn())return null;const u=document.createElement("div");return process.env.NODE_ENV!=="production"&&t&&u.setAttribute("data-debug",t),u}),r=g.useRef(!1),o=g.useContext(mb),[i,a]=g.useState(fp),s=o||(r.current?void 0:u=>{a(d=>[u,...d])});function l(){n.parentElement||document.body.appendChild(n),r.current=!0}function c(){var u;(u=n.parentElement)==null||u.removeChild(n),r.current=!1}return Bt(()=>(e?o?o(l):l():c(),c),[e]),Bt(()=>{i.length&&(i.forEach(u=>u()),a(fp))},[i]),[n,s]}function FI(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const _I=`rc-util-locker-${Date.now()}`;let pp=0;function jI(e){const t=!!e,[n]=g.useState(()=>(pp+=1,`${_I}_${pp}`));Bt(()=>{if(t){const r=k$(document.body).width,o=FI();Dr(`
|
|
188
|
+
}`),b.useEffect(()=>{if(o)return;const a=e.current,s=bI(a);gI(i,"@ant-design-icons",{prepend:!r,csp:t,attachTo:s})},[])},ab=e=>{const{icon:t,className:n,onClick:r,style:o,primaryColor:i,secondaryColor:a,...s}=e,l=g.useRef(null);if(vI(l),ib($a(t),`icon should be icon definiton, but got ${typeof t}`),!$a(t))return null;const c=t;return ic(c.icon,`svg-${c.name}`,{className:n,onClick:r,style:o,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...s,ref:l})};ab.displayName="IconReact";function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ac.apply(this,arguments)}const Jt=g.forwardRef((e,t)=>{const{className:n,icon:r,spin:o,rotate:i,tabIndex:a,onClick:s,twoToneColor:l,...c}=e,{prefixCls:u="anticon",rootClassName:d}=g.useContext(Fu);if(ib($a(r),`icon should be icon definiton, but got ${typeof r}`),!$a(r))return null;const f=Z(d,u,{[`${u}-${r.name}`]:!!r.name,[`${u}-spin`]:!!o||r.name==="loading"},n);let p=a;p===void 0&&s&&(p=-1);const h=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0;return g.createElement("span",ac({role:"img","aria-label":r.name},c,{ref:t,tabIndex:p,onClick:s,className:f}),g.createElement(ab,{icon:r,style:h}))});process.env.NODE_ENV!=="production"&&(Jt.displayName="AntdIcon");var CI={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function sc(){return sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sc.apply(this,arguments)}const SI=(e,t)=>g.createElement(Jt,sc({},e,{ref:t,icon:CI})),sb=g.forwardRef(SI);process.env.NODE_ENV!=="production"&&(sb.displayName="CloseCircleFilled");var EI={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function lc(){return lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lc.apply(this,arguments)}const $I=(e,t)=>g.createElement(Jt,lc({},e,{ref:t,icon:EI})),Xu=g.forwardRef($I);process.env.NODE_ENV!=="production"&&(Xu.displayName="CloseOutlined");const os=e=>typeof e=="number"&&!Number.isNaN(e),br=e=>typeof e=="string",rn=e=>e!==null&&typeof e=="object",Qt=e=>typeof e=="function",kI=e=>typeof e!="object"&&!Qt(e)||e===null,lb=e=>rn(e)&&"propertyName"in e&&br(e.propertyName),cc=(e,t)=>{const n={...e};return Object.keys(t).forEach(r=>{t[r]._default?n[r]||(n[r]={}):n[r]=cc(n[r],t[r])}),n},cb=(e={},...t)=>t.filter(n=>!!n).reduce((n,r)=>(Object.keys(r).forEach(o=>{const i=e[o],a=r[o];if(i)if(rn(a))n[o]=cb(i,n[o],a);else{const{_default:s}=i;s&&(n[o]=n[o]||{},n[o][s]=Z(n[o][s],a))}else n[o]=Z(n[o],a)}),n),{}),II=(e,...t)=>g.useMemo(()=>cb.apply(void 0,[e].concat(t)),[e].concat(t)),RI=(...e)=>e.filter(t=>!!t).reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]={...t[r],...n[r]}}),t),{}),PI=(...e)=>g.useMemo(()=>RI.apply(void 0,e),[].concat(e)),kt=(e,t="root")=>g.useMemo(()=>e?{[t]:e}:void 0,[e,t]),fp=(e,t)=>Qt(e)?e(t):e,Pn=(e,t,n,r)=>{const o=e.map(l=>l?fp(l,n):void 0),i=t.map(l=>l?fp(l,n):void 0),a=II.apply(void 0,[r].concat(jr(o))),s=PI.apply(void 0,jr(i));return g.useMemo(()=>r?[cc(a,r),cc(s,r)]:[a,s],[a,s,r])},Po=e=>`${e}-css-var`,TI=b.createContext(void 0),ub={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},NI=Object.freeze(Object.defineProperty({__proto__:null,default:ub},Symbol.toStringTag,{value:"Module"})),MI={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},db={...MI,locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Last year",nextYear:"Next year",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},AI=Object.freeze(Object.defineProperty({__proto__:null,default:db},Symbol.toStringTag,{value:"Module"})),fb={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},pp={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...db},timePickerLocale:{...fb}},mn="${label} is not a valid ${type}",bo={locale:"en",Pagination:ub,DatePicker:pp,TimePicker:fb,Calendar:pp,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:mn,method:mn,array:mn,object:mn,number:mn,date:mn,boolean:mn,integer:mn,float:mn,regexp:mn,email:mn,url:mn,hex:mn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};({...bo.Modal});let ca=[];const mp=()=>ca.reduce((e,t)=>({...e,...t}),bo.Modal);function zI(e){if(e){const t={...e};return ca.push(t),mp(),()=>{ca=ca.filter(n=>n!==t),mp()}}({...bo.Modal})}const Uu=b.createContext(void 0),OI=(e,t)=>{const n=g.useContext(Uu),r=g.useMemo(()=>{const i=bo[e],a=(n==null?void 0:n[e])??{};return{...Qt(i)?i():i,...a||{}}},[e,t,n]),o=g.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?bo.locale:i},[n]);return[r,o]},pb="internalMark",mb=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;if(process.env.NODE_ENV!=="production"){const i=At("LocaleProvider");process.env.NODE_ENV!=="production"&&i(r===pb,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale")}g.useEffect(()=>zI(t==null?void 0:t.Modal),[t]);const o=g.useMemo(()=>({...t,exist:!0}),[t]);return g.createElement(Uu.Provider,{value:o},n)};process.env.NODE_ENV!=="production"&&(mb.displayName="LocaleProvider");const gb=g.createContext(null);let DI=!1;function LI(e){return DI}const gp=[];function FI(e,t){const[n]=g.useState(()=>{if(!vn())return null;const u=document.createElement("div");return process.env.NODE_ENV!=="production"&&t&&u.setAttribute("data-debug",t),u}),r=g.useRef(!1),o=g.useContext(gb),[i,a]=g.useState(gp),s=o||(r.current?void 0:u=>{a(d=>[u,...d])});function l(){n.parentElement||document.body.appendChild(n),r.current=!0}function c(){var u;(u=n.parentElement)==null||u.removeChild(n),r.current=!1}return Bt(()=>(e?o?o(l):l():c(),c),[e]),Bt(()=>{i.length&&(i.forEach(u=>u()),a(gp))},[i]),[n,s]}function _I(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const jI=`rc-util-locker-${Date.now()}`;let hp=0;function BI(e){const t=!!e,[n]=g.useState(()=>(hp+=1,`${jI}_${hp}`));Bt(()=>{if(t){const r=I$(document.body).width,o=_I();Dr(`
|
|
189
189
|
html body {
|
|
190
190
|
overflow-y: hidden;
|
|
191
191
|
${o?`width: calc(100% - ${r}px);`:""}
|
|
192
|
-
}`,n)}else oi(n);return()=>{oi(n)}},[t,n])}let hr=[];const BI=200;let qu=0;process.env.NODE_ENV;const gb=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-qu<BI)return;const n=hr.length;for(let r=n-1;r>=0;r-=1)hr[r].onEsc({top:r===n-1,event:e})}},hb=()=>{qu=Date.now()};function HI(){window.addEventListener("keydown",gb),window.addEventListener("compositionend",hb)}function VI(){hr.length===0&&(window.removeEventListener("keydown",gb),window.removeEventListener("compositionend",hb))}function WI(e,t){const n=Ga(),r=Ke(t),o=()=>{hr.find(a=>a.id===n)||hr.push({id:n,onEsc:r})},i=()=>{hr=hr.filter(a=>a.id!==n)};b.useMemo(()=>{e?o():e||i()},[e]),b.useEffect(()=>{if(e)return o(),HI(),()=>{i(),VI()}},[e])}const mp=e=>e===!1?!1:!vn()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,os=g.forwardRef((e,t)=>{const{open:n,autoLock:r,getContainer:o,debug:i,autoDestroy:a=!0,children:s,onEsc:l}=e,[c,u]=g.useState(n),d=c||n;process.env.NODE_ENV!=="production"&&tt(vn()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),g.useEffect(()=>{(a||n)&&u(n)},[n,a]);const[f,p]=g.useState(()=>mp(o));g.useEffect(()=>{const v=mp(o);p(()=>v??null)});const[h,m]=LI(d&&!f,i),w=f??h;jI(r&&n&&vn()&&(w===h||w===document.body)),WI(n,l);let y=null;s&&Eo(s)&&t&&(y=cr(s));const $=Hr(y,t);if(!d||!vn()||f===void 0)return null;const x=w===!1||DI();let E=s;return t&&(E=g.cloneElement(s,{ref:$})),g.createElement(mb.Provider,{value:m},x?E:po.createPortal(E,w))});process.env.NODE_ENV!=="production"&&(os.displayName="Portal");function qI(e){const{prefixCls:t,align:n,arrow:r,arrowPos:o}=e,{className:i,content:a,style:s}=r||{},{x:l=0,y:c=0}=o,u=g.useRef(null);if(!n||!n.points)return null;const d={position:"absolute"};if(n.autoArrow!==!1){const f=n.points[0],p=n.points[1],h=f[0],m=f[1],w=p[0],y=p[1];h===w||!["t","b"].includes(h)?d.top=c:h==="t"?d.top=0:d.bottom=0,m===y||!["l","r"].includes(m)?d.left=l:m==="l"?d.left=0:d.right=0}return g.createElement("div",{ref:u,className:Z(`${t}-arrow`,i),style:{...d,...s}},a)}function cc(){return cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cc.apply(this,arguments)}function XI(e){const{prefixCls:t,open:n,zIndex:r,mask:o,motion:i,mobile:a}=e;return o?g.createElement(vr,cc({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),({className:s})=>g.createElement("div",{style:{zIndex:r},className:Z(`${t}-mask`,a&&`${t}-mobile-mask`,s)})):null}const bb=g.memo(({children:e})=>e,(e,t)=>t.cache);process.env.NODE_ENV!=="production"&&(bb.displayName="PopupContent");function xb(e,t,n,r,o,i,a,s){var u;const l="auto",c=e?{}:{left:"-1000vw",top:"-1000vh",right:l,bottom:l};if(!e&&(t||!n)){const{points:d}=r,f=r.dynamicInset||((u=r._experimental)==null?void 0:u.dynamicInset),p=f&&d[0][1]==="r",h=f&&d[0][0]==="b";p?(c.right=o,c.left=l):(c.left=a,c.right=l),h?(c.bottom=i,c.top=l):(c.top=s,c.bottom=l)}return c}function uc(){return uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uc.apply(this,arguments)}const Xu=g.forwardRef((e,t)=>{const{onEsc:n,popup:r,className:o,prefixCls:i,style:a,target:s,onVisibleChanged:l,open:c,keepDom:u,fresh:d,onClick:f,mask:p,arrow:h,arrowPos:m,align:w,motion:y,maskMotion:$,mobile:x,forceRender:E,getPopupContainer:v,autoDestroy:C,portal:I,children:N,zIndex:M,onMouseEnter:k,onMouseLeave:R,onPointerEnter:O,onPointerDownCapture:A,ready:z,offsetX:D,offsetY:L,offsetR:j,offsetB:V,onAlign:q,onPrepare:P,onResize:Q,stretch:X,targetWidth:T,targetHeight:J}=e,F=typeof r=="function"?r():r,G=c||u,re=!!x,[_,H,te]=g.useMemo(()=>x?[x.mask,x.maskMotion,x.motion]:[p,$,y],[x,p,$,y]),oe=(v==null?void 0:v.length)>0,[B,ie]=g.useState(!v||!oe);Bt(()=>{!B&&oe&&s&&ie(!0)},[B,oe,s]);const ae=Ke((U,me)=>{Q==null||Q(U,me),q()}),Se=xb(re,z,c,w,j,V,D,L);if(!B)return null;const ye={};return X&&(X.includes("height")&&J?ye.height=J:X.includes("minHeight")&&J&&(ye.minHeight=J),X.includes("width")&&T?ye.width=T:X.includes("minWidth")&&T&&(ye.minWidth=T)),c||(ye.pointerEvents="none"),g.createElement(I,{open:E||G,getContainer:v&&(()=>v(s)),autoDestroy:C,onEsc:n},g.createElement(XI,{prefixCls:i,open:c,zIndex:M,mask:_,motion:H,mobile:re}),g.createElement(ko,{onResize:ae,disabled:!c},U=>g.createElement(vr,uc({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:`${i}-hidden`},te,{onAppearPrepare:P,onEnterPrepare:P,visible:c,onVisibleChanged:me=>{var he;(he=y==null?void 0:y.onVisibleChanged)==null||he.call(y,me),l(me)}}),({className:me,style:he},se)=>{const ue=Z(i,me,o,{[`${i}-mobile`]:re});return g.createElement("div",{ref:Gn(U,t,se),className:ue,style:{"--arrow-x":`${m.x||0}px`,"--arrow-y":`${m.y||0}px`,...Se,...ye,...he,boxSizing:"border-box",zIndex:M,...a},onMouseEnter:k,onMouseLeave:R,onPointerEnter:O,onClick:f,onPointerDownCapture:A},h&&g.createElement(qI,{prefixCls:i,arrow:h,arrowPos:m,align:w}),g.createElement(bb,{cache:!c&&!d},F))})),N)});process.env.NODE_ENV!=="production"&&(Xu.displayName="Popup");const $a=g.createContext(null),yb=g.createContext(null);function gp(e){return e?Array.isArray(e)?e:[e]:[]}function UI(e,t,n){return g.useMemo(()=>{const r=gp(t??e),o=gp(n??e),i=new Set(r),a=new Set(o);return i.has("hover")&&!i.has("click")&&i.add("touch"),a.has("hover")&&!a.has("click")&&a.add("touch"),[i,a]},[e,t,n])}function GI(e=[],t=[],n){const r=(o,i)=>o[i]||"";return n?r(e,0)===r(t,0):r(e,0)===r(t,0)&&r(e,1)===r(t,1)}function wb(e,t,n,r){var a;const{points:o}=n,i=Object.keys(e);for(let s=0;s<i.length;s+=1){const l=i[s];if(GI((a=e[l])==null?void 0:a.points,o,r))return`${t}-placement-${l}`}return""}function wi(e){return e.ownerDocument.defaultView}function dc(e){const t=[];let n=e==null?void 0:e.parentElement;const r=["hidden","scroll","clip","auto"];for(;n;){const{overflowX:o,overflowY:i,overflow:a}=wi(n).getComputedStyle(n);[o,i,a].some(s=>r.includes(s))&&t.push(n),n=n.parentElement}return t}function ui(e,t=1){return Number.isNaN(e)?t:e}function Fo(e){return ui(parseFloat(e),0)}function hp(e,t){const n={...e};return(t||[]).forEach(r=>{if(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)return;const{overflow:o,overflowClipMargin:i,borderTopWidth:a,borderBottomWidth:s,borderLeftWidth:l,borderRightWidth:c}=wi(r).getComputedStyle(r),u=r.getBoundingClientRect(),{offsetHeight:d,clientHeight:f,offsetWidth:p,clientWidth:h}=r,m=Fo(a),w=Fo(s),y=Fo(l),$=Fo(c),x=ui(Math.round(u.width/p*1e3)/1e3),E=ui(Math.round(u.height/d*1e3)/1e3),v=(p-h-y-$)*x,C=(d-f-m-w)*E,I=m*E,N=w*E,M=y*x,k=$*x;let R=0,O=0;if(o==="clip"){const j=Fo(i);R=j*x,O=j*E}const A=u.x+M-R,z=u.y+I-O,D=A+u.width+2*R-M-k-v,L=z+u.height+2*O-I-N-C;n.left=Math.max(n.left,A),n.top=Math.max(n.top,z),n.right=Math.min(n.right,D),n.bottom=Math.min(n.bottom,L)}),n}function bp(e,t=0){const n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function xp(e,t){const[n,r]=t||[];return[bp(e.width,n),bp(e.height,r)]}function yp(e=""){return[e[0],e[1]]}function Gr(e,t){const n=t[0],r=t[1];let o,i;return n==="t"?i=e.y:n==="b"?i=e.y+e.height:i=e.y+e.height/2,r==="l"?o=e.x:r==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:i}}function fr(e,t){const n={t:"b",b:"t",l:"r",r:"l"},r=[...e];return r[t]=n[e[t]]||"c",r}function wp(e){return e.join("")}function vb(e,t,n,r,o,i,a,s){const[l,c]=g.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),u=g.useRef(0),d=g.useMemo(()=>!t||s?[]:dc(t),[t]),f=g.useRef({});e||(()=>{f.current={}})();const h=Ke(()=>{var y,$;if(t&&n&&e&&!s){let it=function(Le,Tt,Nt=me){const Vn=j.x+Le,Er=j.y+Tt,Ai=Vn+re,gd=Er+G,bs=Math.max(Vn,Nt.left),xs=Math.max(Er,Nt.top),ys=Math.min(Ai,Nt.right),Ce=Math.min(gd,Nt.bottom);return Math.max(0,(ys-bs)*(Ce-xs))},Hn=function(){Rt=j.y+Me,Sn=Rt+G,Ht=j.x+ze,an=Ht+re};const x=t,E=x.ownerDocument,v=wi(x),{position:C}=v.getComputedStyle(x),I=x.style.left,N=x.style.top,M=x.style.right,k=x.style.bottom,R=x.style.overflow,O=x.style.overflowX,A=x.style.overflowY,z={...o[r],...i},D=E.createElement("div");(y=x.parentElement)==null||y.appendChild(D),D.style.left=`${x.offsetLeft}px`,D.style.top=`${x.offsetTop}px`,D.style.position=C,D.style.height=`${x.offsetHeight}px`,D.style.width=`${x.offsetWidth}px`,x.style.left="0",x.style.top="0",x.style.right="auto",x.style.bottom="auto",x.style.overflow="hidden";let L;if(Array.isArray(n))L={x:n[0],y:n[1],width:0,height:0};else{const Le=n.getBoundingClientRect();Le.x=Le.x??Le.left,Le.y=Le.y??Le.top,L={x:Le.x,y:Le.y,width:Le.width,height:Le.height}}const j=x.getBoundingClientRect(),{height:V,width:q}=v.getComputedStyle(x);j.x=j.x??j.left,j.y=j.y??j.top;const{clientWidth:P,clientHeight:Q,scrollWidth:X,scrollHeight:T,scrollTop:J,scrollLeft:F}=E.documentElement,G=j.height,re=j.width,_=L.height,H=L.width,te={left:0,top:0,right:P,bottom:Q},oe={left:-F,top:-J,right:X-F,bottom:T-J};let{htmlRegion:B}=z;const ie="visible",ae="visibleFirst";B!=="scroll"&&B!==ae&&(B=ie);const Se=B===ae,ye=hp(oe,d),U=hp(te,d),me=B===ie?U:ye,he=Se?U:me;x.style.left="auto",x.style.top="auto",x.style.right="0",x.style.bottom="0";const se=x.getBoundingClientRect();x.style.left=I,x.style.top=N,x.style.right=M,x.style.bottom=k,x.style.overflow=R,x.style.overflowX=O,x.style.overflowY=A,($=x.parentElement)==null||$.removeChild(D);const ue=ui(Math.round(re/parseFloat(q)*1e3)/1e3),pe=ui(Math.round(G/parseFloat(V)*1e3)/1e3);if(ue===0||pe===0||go(n)&&!Su(n))return;const{offset:Ne,targetOffset:Ee}=z;let[Ie,W]=xp(j,Ne);const[Y,le]=xp(L,Ee);L.x-=Y,L.y-=le;const[be,$e]=z.points||[],ce=yp($e),ne=yp(be),ve=Gr(L,ce),Re=Gr(j,ne),Ge={...z};let Pe=[ne,ce],ze=ve.x-Re.x+Ie,Me=ve.y-Re.y+W;const Qe=it(ze,Me),It=it(ze,Me,U),wt=Gr(L,["t","l"]),Ot=Gr(j,["t","l"]),gt=Gr(L,["b","r"]),_t=Gr(j,["b","r"]),jt=z.overflow||{},{adjustX:_e,adjustY:pt,shiftX:Cn,shiftY:jn}=jt,Bn=Le=>typeof Le=="boolean"?Le:Le>=0;let Rt,Sn,Ht,an;Hn();const fn=Bn(pt),pn=ne[0]===ce[0];if(fn&&ne[0]==="t"&&(Sn>he.bottom||f.current.bt)){let Le=Me;pn?Le-=G-_:Le=wt.y-_t.y-W;const Tt=it(ze,Le),Nt=it(ze,Le,U);Tt>Qe||Tt===Qe&&(!Se||Nt>=It)?(f.current.bt=!0,Me=Le,W=-W,Pe=[fr(Pe[0],0),fr(Pe[1],0)]):f.current.bt=!1}if(fn&&ne[0]==="b"&&(Rt<he.top||f.current.tb)){let Le=Me;pn?Le+=G-_:Le=gt.y-Ot.y-W;const Tt=it(ze,Le),Nt=it(ze,Le,U);Tt>Qe||Tt===Qe&&(!Se||Nt>=It)?(f.current.tb=!0,Me=Le,W=-W,Pe=[fr(Pe[0],0),fr(Pe[1],0)]):f.current.tb=!1}const en=Bn(_e),Dt=ne[1]===ce[1];if(en&&ne[1]==="l"&&(an>he.right||f.current.rl)){let Le=ze;Dt?Le-=re-H:Le=wt.x-_t.x-Ie;const Tt=it(Le,Me),Nt=it(Le,Me,U);Tt>Qe||Tt===Qe&&(!Se||Nt>=It)?(f.current.rl=!0,ze=Le,Ie=-Ie,Pe=[fr(Pe[0],1),fr(Pe[1],1)]):f.current.rl=!1}if(en&&ne[1]==="r"&&(Ht<he.left||f.current.lr)){let Le=ze;Dt?Le+=re-H:Le=gt.x-Ot.x-Ie;const Tt=it(Le,Me),Nt=it(Le,Me,U);Tt>Qe||Tt===Qe&&(!Se||Nt>=It)?(f.current.lr=!0,ze=Le,Ie=-Ie,Pe=[fr(Pe[0],1),fr(Pe[1],1)]):f.current.lr=!1}Ge.points=[wp(Pe[0]),wp(Pe[1])],Hn();const at=Cn===!0?0:Cn;typeof at=="number"&&(Ht<U.left&&(ze-=Ht-U.left-Ie,L.x+H<U.left+at&&(ze+=L.x-U.left+H-at)),an>U.right&&(ze-=an-U.right-Ie,L.x>U.right-at&&(ze+=L.x-U.right+at)));const Vt=jn===!0?0:jn;typeof Vt=="number"&&(Rt<U.top&&(Me-=Rt-U.top-W,L.y+_<U.top+Vt&&(Me+=L.y-U.top+_-Vt)),Sn>U.bottom&&(Me-=Sn-U.bottom-W,L.y>U.bottom-Vt&&(Me+=L.y-U.bottom+Vt)));const vt=j.x+ze,Oe=vt+re,Ze=j.y+Me,st=Ze+G,Be=L.x,K=Be+H,ge=L.y,de=ge+_,we=Math.max(vt,Be),Te=Math.min(Oe,K),Fe=(we+Te)/2-vt,De=Math.max(Ze,ge),ft=Math.min(st,de),ht=(De+ft)/2-Ze;a==null||a(t,Ge);let Ct=se.right-j.x-(ze+j.width),mt=se.bottom-j.y-(Me+j.height);ue===1&&(ze=Math.floor(ze),Ct=Math.floor(Ct)),pe===1&&(Me=Math.floor(Me),mt=Math.floor(mt));const Lt={ready:!0,offsetX:ze/ue,offsetY:Me/pe,offsetR:Ct/ue,offsetB:mt/pe,arrowX:Fe/ue,arrowY:ht/pe,scaleX:ue,scaleY:pe,align:Ge};c(Lt)}}),m=()=>{u.current+=1;const y=u.current;Promise.resolve().then(()=>{u.current===y&&h()})},w=()=>{c(y=>({...y,ready:!1}))};return Bt(w,[r]),Bt(()=>{e||w()},[e]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,m]}function Cb(){const e=g.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null)},n=(r,o)=>{t(),o===0?r():e.current=setTimeout(()=>{r()},o*1e3)};return g.useEffect(()=>()=>{t()},[]),n}function KI(e,t,n,r,o){Bt(()=>{if(e&&t&&n){let d=function(){r(),o()};const i=t,a=n,s=dc(i),l=dc(a),c=wi(a),u=new Set([c,...s,...l]);return u.forEach(f=>{f.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),r(),()=>{u.forEach(f=>{f.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[e,t,n])}function YI(e,t,n,r,o,i,a,s){const l=g.useRef(e);l.current=e;const c=g.useRef(!1);g.useEffect(()=>{var d,f;if(t&&r&&(!o||i)){const p=()=>{c.current=!1},h=y=>{var $,x;l.current&&!a(((x=($=y.composedPath)==null?void 0:$.call(y))==null?void 0:x[0])||y.target)&&!c.current&&s(!1)},m=wi(r);m.addEventListener("pointerdown",p,!0),m.addEventListener("mousedown",h,!0),m.addEventListener("contextmenu",h,!0);const w=Il(n);if(w&&(w.addEventListener("mousedown",h,!0),w.addEventListener("contextmenu",h,!0)),process.env.NODE_ENV!=="production"&&n){const y=(d=n.getRootNode)==null?void 0:d.call(n),$=(f=r.getRootNode)==null?void 0:f.call(r);tt(y===$,"trigger element and popup element should in same shadow root.")}return()=>{m.removeEventListener("pointerdown",p,!0),m.removeEventListener("mousedown",h,!0),m.removeEventListener("contextmenu",h,!0),w&&(w.removeEventListener("mousedown",h,!0),w.removeEventListener("contextmenu",h,!0))}}},[t,n,r,o,i]);function u(){c.current=!0}return u}function QI(){const[e,t]=b.useState(null),[n,r]=b.useState(!1),[o,i]=b.useState(!1),a=b.useRef(null),s=Ke(c=>{c===!1?(a.current=null,r(!1)):o&&n?a.current=c:(r(!0),t(c),a.current=null,n||i(!0))}),l=Ke(c=>{c?(i(!1),a.current&&(t(a.current),a.current=null)):(i(!1),a.current=null)});return[s,n,e,l]}function fc(){return fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fc.apply(this,arguments)}const ZI=e=>{const{prefixCls:t,isMobile:n,ready:r,open:o,align:i,offsetR:a,offsetB:s,offsetX:l,offsetY:c,arrowPos:u,popupSize:d,motion:f,uniqueContainerClassName:p,uniqueContainerStyle:h}=e,m=`${t}-unique-container`,[w,y]=b.useState(!1),$=xb(n,r,o,i,a,s,l,c),x=b.useRef($);r&&(x.current=$);const E={};return d&&(E.width=d.width,E.height=d.height),b.createElement(vr,fc({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${m}-hidden`},f,{visible:o,onVisibleChanged:v=>{y(v)}}),({className:v,style:C})=>{const I=Z(m,v,p,{[`${m}-visible`]:w});return b.createElement("div",{className:I,style:{"--arrow-x":`${(u==null?void 0:u.x)||0}px`,"--arrow-y":`${(u==null?void 0:u.y)||0}px`,...x.current,...E,...C,...h}})})},JI=({children:e,postTriggerProps:t})=>{const[n,r,o,i]=QI(),a=g.useMemo(()=>!o||!t?o:t(o),[o,t]),[s,l]=g.useState(null),[c,u]=g.useState(null),d=g.useRef(null),f=Ke(V=>{d.current=V,go(V)&&s!==V&&l(V)}),p=g.useRef(null),h=Cb(),m=Ke((V,q)=>{p.current=q,h(()=>{n(V)},V.delay)}),w=V=>{h(()=>{var q;(q=p.current)!=null&&q.call(p)||n(!1)},V)},y=Ke(V=>{i(V)}),[$,x,E,v,C,I,N,,,M,k]=vb(r,s,a==null?void 0:a.target,a==null?void 0:a.popupPlacement,(a==null?void 0:a.builtinPlacements)||{},a==null?void 0:a.popupAlign,void 0,!1),R=g.useMemo(()=>{var q;if(!a)return"";const V=wb(a.builtinPlacements||{},a.prefixCls||"",M,!1);return Z(V,(q=a.getPopupClassNameFromAlign)==null?void 0:q.call(a,M))},[M,a==null?void 0:a.getPopupClassNameFromAlign,a==null?void 0:a.builtinPlacements,a==null?void 0:a.prefixCls]),O=g.useMemo(()=>({show:m,hide:w}),[]);g.useEffect(()=>{k()},[a==null?void 0:a.target]);const A=Ke(()=>(k(),Promise.resolve())),z=g.useRef({}),D=g.useContext($a),L=g.useMemo(()=>({registerSubPopup:(V,q)=>{z.current[V]=q,D==null||D.registerSubPopup(V,q)}}),[D]),j=a==null?void 0:a.prefixCls;return g.createElement(yb.Provider,{value:O},e,a&&g.createElement($a.Provider,{value:L},g.createElement(Xu,{ref:f,portal:os,onEsc:a.onEsc,prefixCls:j,popup:a.popup,className:Z(a.popupClassName,R,`${j}-unique-controlled`),style:a.popupStyle,target:a.target,open:r,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:y,ready:$,offsetX:x,offsetY:E,offsetR:v,offsetB:C,onAlign:k,onPrepare:A,onResize:V=>u({width:V.offsetWidth,height:V.offsetHeight}),arrowPos:{x:I,y:N},align:M,zIndex:a.zIndex,mask:a.mask,arrow:a.arrow,motion:a.popupMotion,maskMotion:a.maskMotion,getPopupContainer:a.getPopupContainer},g.createElement(ZI,{prefixCls:j,isMobile:!1,ready:$,open:r,align:M,offsetR:v,offsetB:C,offsetX:x,offsetY:E,arrowPos:{x:I,y:N},popupSize:c,motion:a.popupMotion,uniqueContainerClassName:Z(a.uniqueContainerClassName,R),uniqueContainerStyle:a.uniqueContainerStyle}))))};function eR(e=os){const t=g.forwardRef((n,r)=>{const{prefixCls:o="rc-trigger-popup",children:i,action:a="hover",showAction:s,hideAction:l,disabled:c=!1,popupVisible:u,defaultPopupVisible:d,onOpenChange:f,afterOpenChange:p,onPopupVisibleChange:h,afterPopupVisibleChange:m,mouseEnterDelay:w,mouseLeaveDelay:y=.1,focusDelay:$,blurDelay:x,mask:E,maskClosable:v=!0,getPopupContainer:C,forceRender:I,autoDestroy:N,popup:M,popupClassName:k,uniqueContainerClassName:R,uniqueContainerStyle:O,popupStyle:A,popupPlacement:z,builtinPlacements:D={},popupAlign:L,zIndex:j,stretch:V,getPopupClassNameFromAlign:q,fresh:P,unique:Q,alignPoint:X,onPopupClick:T,onPopupAlign:J,arrow:F,popupMotion:G,maskMotion:re,mobile:_,...H}=n,te=N||!1,oe=u===void 0,B=!!_,ie=g.useRef({}),ae=g.useContext($a),Se=g.useMemo(()=>({registerSubPopup:(Ce,Xe)=>{ie.current[Ce]=Xe,ae==null||ae.registerSubPopup(Ce,Xe)}}),[ae]),ye=g.useContext(yb),U=Ga(),[me,he]=g.useState(null),se=g.useRef(null),ue=Ke(Ce=>{se.current=Ce,go(Ce)&&me!==Ce&&he(Ce),ae==null||ae.registerSubPopup(U,Ce)}),[pe,Ne]=g.useState(null),Ee=g.useRef(null),Ie=Ke(Ce=>{const Xe=Cu(Ce);go(Xe)&&pe!==Xe&&(Ne(Xe),Ee.current=Xe)}),W={},Y=Ke(Ce=>{var Wt,Wr;const Xe=pe;return(Xe==null?void 0:Xe.contains(Ce))||((Wt=Il(Xe))==null?void 0:Wt.host)===Ce||Ce===Xe||(me==null?void 0:me.contains(Ce))||((Wr=Il(me))==null?void 0:Wr.host)===Ce||Ce===me||Object.values(ie.current).some($r=>($r==null?void 0:$r.contains(Ce))||Ce===$r)}),le=F?{...F!==!0?F:{}}:null,[be,$e]=un(d||!1,u),ce=be||!1,ne=ce&&!c,ve=g.useMemo(()=>{const Ce=typeof i=="function"?i({open:ne}):i;return g.Children.only(Ce)},[i,ne]),Re=(ve==null?void 0:ve.props)||{},Ge=Ke(()=>ne),Pe=Ke((Ce=0)=>({popup:M,target:pe,delay:Ce,prefixCls:o,popupClassName:k,uniqueContainerClassName:R,uniqueContainerStyle:O,popupStyle:A,popupPlacement:z,builtinPlacements:D,popupAlign:L,zIndex:j,mask:E,maskClosable:v,popupMotion:G,maskMotion:re,arrow:le,getPopupContainer:C,getPopupClassNameFromAlign:q,id:U,onEsc:It}));Bt(()=>{ye&&Q&&pe&&!oe&&!ae&&(ne?ye.show(Pe(w),Ge):ye.hide(y))},[ne,pe]);const ze=g.useRef(ne);ze.current=ne;const Me=Ke(Ce=>{po.flushSync(()=>{ce!==Ce&&($e(Ce),f==null||f(Ce),h==null||h(Ce))})}),it=Cb(),Qe=(Ce,Xe=0)=>{if(u!==void 0){it(()=>{Me(Ce)},Xe);return}if(ye&&Q&&oe&&!ae){Ce?ye.show(Pe(Xe),Ge):ye.hide(Xe);return}it(()=>{Me(Ce)},Xe)};function It({top:Ce}){Ce&&Qe(!1)}const[wt,Ot]=g.useState(!1);Bt(Ce=>{(!Ce||ne)&&Ot(!0)},[ne]);const[gt,_t]=g.useState(null),[jt,_e]=g.useState(null),pt=Ce=>{_e([Ce.clientX,Ce.clientY])},[Cn,jn,Bn,Rt,Sn,Ht,an,Hn,fn,pn,en]=vb(ne,me,X&&jt!==null?jt:pe,z,D,L,J,B),[Dt,at]=UI(a,s,l),Vt=Dt.has("click"),vt=at.has("click")||at.has("contextMenu"),Oe=Ke(()=>{wt||en()});KI(ne,pe,me,Oe,()=>{ze.current&&X&&vt&&Qe(!1)}),Bt(()=>{Oe()},[jt,z]),Bt(()=>{ne&&!(D!=null&&D[z])&&Oe()},[JSON.stringify(L)]);const st=g.useMemo(()=>{const Ce=wb(D,o,pn,X);return Z(Ce,q==null?void 0:q(pn))},[pn,q,D,o,X]);g.useImperativeHandle(r,()=>({nativeElement:Ee.current,popupElement:se.current,forceAlign:Oe}));const[Be,K]=g.useState(0),[ge,de]=g.useState(0),we=()=>{if(V&&pe){const Ce=pe.getBoundingClientRect();K(Ce.width),de(Ce.height)}},Te=()=>{we(),Oe()},ke=Ce=>{Ot(!1),en(),p==null||p(Ce),m==null||m(Ce)},Fe=()=>new Promise(Ce=>{we(),_t(()=>Ce)});Bt(()=>{gt&&(en(),gt(),_t(null))},[gt]);function De(Ce,Xe,Wt,Wr,$r){W[Ce]=(hd,...j0)=>{var bd;(!$r||!$r())&&(Wr==null||Wr(hd),Qe(Xe,Wt)),(bd=Re[Ce])==null||bd.call(Re,hd,...j0)}}const ft=Dt.has("touch"),Pt=at.has("touch"),ht=g.useRef(!1);(ft||Pt)&&(W.onTouchStart=(...Ce)=>{var Xe;ht.current=!0,ze.current&&Pt?Qe(!1):!ze.current&&ft&&Qe(!0),(Xe=Re.onTouchStart)==null||Xe.call(Re,...Ce)}),(Vt||vt)&&(W.onClick=(Ce,...Xe)=>{var Wt;ze.current&&vt?Qe(!1):!ze.current&&Vt&&(pt(Ce),Qe(!0)),(Wt=Re.onClick)==null||Wt.call(Re,Ce,...Xe),ht.current=!1});const Ct=YI(ne,vt||Pt,pe,me,E,v,Y,Qe),mt=Dt.has("hover"),Lt=at.has("hover");let Le,Tt;const Nt=()=>ht.current;if(mt){const Ce=Xe=>{pt(Xe)};De("onMouseEnter",!0,w,Ce,Nt),De("onPointerEnter",!0,w,Ce,Nt),Le=Xe=>{(ne||wt)&&(me!=null&&me.contains(Xe.target))&&Qe(!0,w)},X&&(W.onMouseMove=Xe=>{var Wt;(Wt=Re.onMouseMove)==null||Wt.call(Re,Xe)})}Lt&&(De("onMouseLeave",!1,y,void 0,Nt),De("onPointerLeave",!1,y,void 0,Nt),Tt=()=>{Qe(!1,y)}),Dt.has("focus")&&De("onFocus",!0,$),at.has("focus")&&De("onBlur",!1,x),Dt.has("contextMenu")&&(W.onContextMenu=(Ce,...Xe)=>{var Wt;ze.current&&at.has("contextMenu")?Qe(!1):(pt(Ce),Qe(!0)),Ce.preventDefault(),(Wt=Re.onContextMenu)==null||Wt.call(Re,Ce,...Xe)});const Vn=g.useRef(!1);Vn.current||(Vn.current=I||ne||wt);const Er={...Re,...W},Ai={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(Ce=>{H[Ce]&&(Ai[Ce]=(...Xe)=>{var Wt;(Wt=Er[Ce])==null||Wt.call(Er,...Xe),H[Ce](...Xe)})});const bs={x:Ht,y:an};Dh(ne,pe,Te);const xs=Hr(Ie,cr(ve)),ys=g.cloneElement(ve,{...Er,...Ai,ref:xs});return g.createElement(g.Fragment,null,ys,Vn.current&&(!ye||!Q)&&g.createElement($a.Provider,{value:Se},g.createElement(Xu,{portal:e,ref:ue,prefixCls:o,popup:M,className:Z(k,!B&&st),style:A,target:pe,onMouseEnter:Le,onMouseLeave:Tt,onPointerEnter:Le,zIndex:j,open:ne,keepDom:wt,fresh:P,onClick:T,onPointerDownCapture:Ct,mask:E,motion:G,maskMotion:re,onVisibleChanged:ke,onPrepare:Fe,forceRender:I,autoDestroy:te,getPopupContainer:C,onEsc:It,align:pn,arrow:le,arrowPos:bs,ready:Cn,offsetX:jn,offsetY:Bn,offsetR:Rt,offsetB:Sn,onAlign:Oe,stretch:V,targetWidth:Be/Hn,targetHeight:ge/fn,mobile:_})))});return process.env.NODE_ENV!=="production"&&(t.displayName="Trigger"),t}const Uu=eR(os);function Sb(e){return e&&b.isValidElement(e)&&e.type===b.Fragment}const tR=(e,t,n)=>b.isValidElement(e)?b.cloneElement(e,Qt(n)?n(e.props||{}):n):t;function Dn(e,t){return tR(e,e,t)}const nR=({children:e})=>{const{getPrefixCls:t}=b.useContext(dt),n=t();return b.isValidElement(e)?b.createElement(vr,{visible:!0,motionName:`${n}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:r,className:o})=>Dn(e,i=>({className:Z(i.className,o),style:{...i.style,...r}}))):e},qi=[null,null];function rR(e){if(qi[0]!==e){const t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:!1}}),qi[0]=e,qi[1]=t}return qi[1]}const Eb=({children:e})=>{const t=n=>{const{id:r,builtinPlacements:o,popup:i}=n,a=Qt(i)?i():i,s=rR(o);return{...n,getPopupContainer:null,arrow:!1,popup:b.createElement(nR,{key:r},a),builtinPlacements:s}};return b.createElement(JI,{postTriggerProps:t},e)},yr=g.createContext(!1),oR=({children:e,disabled:t})=>{const n=g.useContext(yr);return g.createElement(yr.Provider,{value:t??n},e)},xo=g.createContext(void 0),iR=({children:e,size:t})=>{const n=g.useContext(xo);return g.createElement(xo.Provider,{value:t||n},e)};function aR(){const e=b.useContext(yr),t=b.useContext(xo);return{componentDisabled:e,componentSize:t}}function sR(e,t,n){var s;const r=At("ConfigProvider"),o=e||{},i=o.inherit===!1||!t?{...Ca,hashed:(t==null?void 0:t.hashed)??Ca.hashed,cssVar:t==null?void 0:t.cssVar,zeroRuntime:t==null?void 0:t.zeroRuntime}:t,a=b.useId();if(process.env.NODE_ENV!=="production"){const l=o.cssVar||i.cssVar,c=!!(rn(o.cssVar)&&((s=o.cssVar)!=null&&s.key)||a);process.env.NODE_ENV!=="production"&&r(!l||c,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return Ka(()=>{var d;if(!e)return t;const l={...i.components};Object.keys(e.components||{}).forEach(f=>{l[f]={...l[f],...e.components[f]}});const c=`css-var-${a.replace(/:/g,"")}`,u={prefix:n==null?void 0:n.prefixCls,...i.cssVar,...o.cssVar,key:((d=o.cssVar)==null?void 0:d.key)||c};return{...i,...o,token:{...i.token,...o.token},components:l,cssVar:u}},[o,i,n==null?void 0:n.prefixCls,a],(l,c)=>l.some((u,d)=>{const f=c[d];return!ii(u,f,!0)}))}const pc=g.createContext(!0);process.env.NODE_ENV!=="production"&&(pc.displayName="MotionCacheContext");function lR(e){const t=g.useContext(pc),{children:n}=e,[,r]=Cr(),{motion:o}=r,i=g.useRef(!1);return i.current||(i.current=t!==o),i.current?g.createElement(pc.Provider,{value:o},g.createElement(W$,{motion:o},n)):n}const $b=g.memo(e=>{const{dropdownMatchSelectWidth:t}=e;return At("ConfigProvider").deprecated(t===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&($b.displayName="PropWarning");const cR=process.env.NODE_ENV!=="production"?$b:()=>null,uR=({iconPrefixCls:e,csp:t})=>(lI(e,t),null);let mc=!1;process.env.NODE_ENV;const dR=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"],fR=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e},pR=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,app:s,form:l,locale:c,componentSize:u,direction:d,space:f,splitter:p,virtual:h,dropdownMatchSelectWidth:m,popupMatchSelectWidth:w,popupOverflow:y,legacyLocale:$,parentContext:x,iconPrefixCls:E,theme:v,componentDisabled:C,segmented:I,statistic:N,spin:M,calendar:k,carousel:R,cascader:O,collapse:A,typography:z,checkbox:D,descriptions:L,divider:j,drawer:V,skeleton:q,steps:P,image:Q,layout:X,list:T,listy:J,mentions:F,modal:G,progress:re,result:_,slider:H,breadcrumb:te,masonry:oe,menu:B,pagination:ie,input:ae,inputPassword:Se,inputSearch:ye,textArea:U,otp:me,empty:he,badge:se,borderBeam:ue,radio:pe,rate:Ne,ribbon:Ee,switch:Ie,transfer:W,avatar:Y,message:le,tag:be,table:$e,card:ce,cardMeta:ne,tabs:ve,timeline:Re,timePicker:Ge,upload:Pe,notification:ze,tree:Me,colorPicker:it,datePicker:Qe,rangePicker:It,flex:wt,wave:Ot,dropdown:gt,warning:_t,tour:jt,tooltip:_e,popover:pt,popconfirm:Cn,qrcode:jn,floatButton:Bn,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:Hn}=e,fn=g.useMemo(()=>{var de;return rn(c)&&Object.prototype.hasOwnProperty.call(c,"default")&&((de=c.default)!=null&&de.locale)?c.default:c},[c]),pn=g.useCallback((de,we)=>{const{prefixCls:Te}=e;if(we)return we;const ke=Te||x.getPrefixCls("");return de?`${ke}-${de}`:ke},[x.getPrefixCls,e.prefixCls]),en=E||x.iconPrefixCls||Lu,Dt=n||x.csp,at=sR(v,x.theme,{prefixCls:pn("")});process.env.NODE_ENV!=="production"&&(mc=mc||!!at);const Vt={csp:Dt,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,app:s,locale:fn||$,direction:d,space:f,splitter:p,virtual:h,popupMatchSelectWidth:w??m,popupOverflow:y,getPrefixCls:pn,iconPrefixCls:en,theme:at,segmented:I,statistic:N,spin:M,calendar:k,carousel:R,cascader:O,collapse:A,typography:z,checkbox:D,descriptions:L,divider:j,drawer:V,skeleton:q,steps:P,image:Q,input:ae,inputPassword:Se,inputSearch:ye,textArea:U,otp:me,layout:X,list:T,listy:J,mentions:F,modal:G,progress:re,result:_,slider:H,breadcrumb:te,masonry:oe,menu:B,pagination:ie,empty:he,badge:se,borderBeam:ue,radio:pe,rate:Ne,ribbon:Ee,switch:Ie,transfer:W,avatar:Y,message:le,tag:be,table:$e,card:ce,cardMeta:ne,tabs:ve,timeline:Re,timePicker:Ge,upload:Pe,notification:ze,tree:Me,colorPicker:it,datePicker:Qe,rangePicker:It,flex:wt,wave:Ot,dropdown:gt,warning:_t,tour:jt,tooltip:_e,popover:pt,popconfirm:Cn,qrcode:jn,floatButton:Bn,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:Hn};process.env.NODE_ENV!=="production"&&At("ConfigProvider")(!("autoInsertSpaceInButton"in e),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const vt={...x};Object.keys(Vt).forEach(de=>{Vt[de]!==void 0&&(vt[de]=Vt[de])}),dR.forEach(de=>{const we=e[de];we&&(vt[de]=we)}),typeof r<"u"&&(vt.button={autoInsertSpace:r,...vt.button});const Oe=Ka(()=>vt,vt,(de,we)=>{const Te=Object.keys(de),ke=Object.keys(we);return Te.length!==ke.length||Te.some(Fe=>de[Fe]!==we[Fe])}),{layer:Ze}=g.useContext(yi),st=g.useMemo(()=>({prefixCls:en,csp:Dt,layer:Ze?"antd":void 0,zeroRuntime:!!Ze||(at==null?void 0:at.zeroRuntime)}),[en,Dt,Ze,at==null?void 0:at.zeroRuntime]);let Be=g.createElement(g.Fragment,null,g.createElement(uR,{iconPrefixCls:en,csp:Dt}),g.createElement(cR,{dropdownMatchSelectWidth:m}),t);const K=g.useMemo(()=>{var de,we,Te,ke;return oo(((de=bo.Form)==null?void 0:de.defaultValidateMessages)||{},((Te=(we=Oe.locale)==null?void 0:we.Form)==null?void 0:Te.defaultValidateMessages)||{},((ke=Oe.form)==null?void 0:ke.validateMessages)||{},(l==null?void 0:l.validateMessages)||{})},[Oe,l==null?void 0:l.validateMessages]);Object.keys(K).length>0&&(Be=g.createElement(PI.Provider,{value:K},Be)),fn&&(Be=g.createElement(pb,{locale:fn,_ANT_MARK__:fb},Be)),Be=g.createElement(Ou.Provider,{value:st},Be),u&&(Be=g.createElement(iR,{size:u},Be)),Be=g.createElement(lR,null,Be),_e!=null&&_e.unique&&(Be=g.createElement(Eb,null,Be));const ge=g.useMemo(()=>{const{algorithm:de,token:we,components:Te,cssVar:ke,...Fe}=at||{},De=de&&(!Array.isArray(de)||de.length>0)?ya(de):Yh,ft={};Object.entries(Te||{}).forEach(([ht,Ct])=>{const mt={...Ct};"algorithm"in mt&&(mt.algorithm===!0?mt.theme=De:(Array.isArray(mt.algorithm)||Qt(mt.algorithm))&&(mt.theme=ya(mt.algorithm)),delete mt.algorithm),ft[ht]=mt});const Pt={...ci,...we};return{...Fe,theme:De,token:Pt,components:ft,override:{override:Pt,...ft},cssVar:ke}},[at]);return v&&(Be=g.createElement(Fu.Provider,{value:ge},Be)),Oe.warning&&(Be=g.createElement(Ah.Provider,{value:Oe.warning},Be)),C!==void 0&&(Be=g.createElement(oR,{disabled:C},Be)),g.createElement(dt.Provider,{value:Oe},Be)},Sr=e=>{const t=g.useContext(dt),n=g.useContext(Wu);return g.createElement(pR,{parentContext:t,legacyLocale:n,...e})};Sr.ConfigContext=dt;Sr.SizeContext=xo;Sr.config=fR;Sr.useConfig=aR;Object.defineProperty(Sr,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&Du(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),xo)});process.env.NODE_ENV!=="production"&&(Sr.displayName="ConfigProvider");var mR={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function gc(){return gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gc.apply(this,arguments)}const gR=(e,t)=>g.createElement(Jt,gc({},e,{ref:t,icon:mR})),kb=g.forwardRef(gR);process.env.NODE_ENV!=="production"&&(kb.displayName="LoadingOutlined");function Ib(...e){return e.find(t=>t!==void 0)}const Rb=e=>{const{allowClear:t,clearIcon:n,contextAllowClear:r,contextClearIcon:o,defaultAllowClear:i,componentName:a}=e;return process.env.NODE_ENV!=="production"&&At(a).deprecated(!n,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}"),b.useMemo(()=>t??r??i?{clearIcon:Ib(rn(t)?t==null?void 0:t.clearIcon:n,rn(r)?r==null?void 0:r.clearIcon:o,b.createElement(ab,null)),disabled:(rn(t)?t==null?void 0:t.disabled:void 0)??(rn(r)?r==null?void 0:r.disabled:void 0)}:!1,[t,n,r,o,i])},vp=e=>e==="horizontal"||e==="vertical",Gu=(e,t,n)=>b.useMemo(()=>{const r=vp(e);let o;return r?o=e:typeof t=="boolean"?o=t?"vertical":"horizontal":o=vp(n)?n:"horizontal",[o,o==="vertical"]},[n,e,t]),is=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(is.displayName="ZIndexContext");const Jn=100,hR=10,bR=Jn*hR,xR=bR+Jn,Pb={Modal:Jn,Drawer:Jn,Popover:Jn,Popconfirm:Jn,Tooltip:Jn,Tour:Jn,FloatButton:Jn},yR={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},wR=e=>e in Pb,Ku=(e,t)=>{const[,n]=Cr(),r=b.useContext(is),o=wR(e);let i;if(t!==void 0)i=[t,t];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+Pb[e]:a+=yR[e],i=[r===void 0?t:a,a]}if(process.env.NODE_ENV!=="production"){const a=At(e),s=n.zIndexPopupBase+xR,l=i[0]||0;process.env.NODE_ENV!=="production"&&a(t!==void 0||l<=s,"usage","`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.")}return i},Gs=()=>({height:0,opacity:0}),Cp=e=>({height:(e==null?void 0:e.scrollHeight)??0,opacity:e?1:0}),vR=e=>({height:(e==null?void 0:e.offsetHeight)??0}),Ks=(e,t)=>(t==null?void 0:t.deadline)===!0||sb(t)&&t.propertyName==="height",CR=(e=wa)=>({motionName:`${e}-motion-collapse`,onAppearStart:Gs,onEnterStart:Gs,onAppearActive:Cp,onEnterActive:Cp,onLeaveStart:vR,onLeaveActive:Gs,onAppearEnd:Ks,onEnterEnd:Ks,onLeaveEnd:Ks,motionDeadline:500}),SR=(e,t,n)=>n!==void 0?n:`${e}-${t}`,ER=e=>{const{componentCls:t,colorPrimary:n,motionDurationSlow:r,motionEaseInOut:o,motionEaseOutCirc:i,antCls:a}=e,[,s]=ur(a,"wave");return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:s("color",n),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s","opacity 2s"].map(l=>`${l} ${i}`).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(l=>`${l} ${r} ${o}`).join(",")}}}}},$R=iI("Wave",ER),Tb=`${wa}-wave-target`,Sp=e=>e?br(e)&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/i.test(e)&&!/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i.test(e)&&e!=="transparent"&&e!=="canvastext":!1;function kR(e,t=null){const n=getComputedStyle(e),{borderTopColor:r,borderColor:o,backgroundColor:i}=n;return t&&Sp(n[t])?n[t]:[r,o,i].find(Sp)??null}function Ys(e){return Number.isNaN(e)?0:e}const IR=e=>{const{className:t,target:n,component:r,colorSource:o}=e,i=g.useRef(null),{getPrefixCls:a}=g.useContext(dt),s=a(),[l]=ur(s,"wave"),[c,u]=g.useState(null),[d,f]=g.useState([]),[p,h]=g.useState(0),[m,w]=g.useState(0),[y,$]=g.useState(0),[x,E]=g.useState(0),[v,C]=g.useState(!1),I={left:p,top:m,width:y,height:x,borderRadius:d.map(k=>`${k}px`).join(" ")};c&&(I[l("color")]=c);function N(){const k=getComputedStyle(n);u(kR(n,o));const R=k.position==="static",{borderLeftWidth:O,borderTopWidth:A}=k;h(R?n.offsetLeft:Ys(-Number.parseFloat(O))),w(R?n.offsetTop:Ys(-Number.parseFloat(A))),$(n.offsetWidth),E(n.offsetHeight);const{borderTopLeftRadius:z,borderTopRightRadius:D,borderBottomLeftRadius:L,borderBottomRightRadius:j}=k;f([z,D,j,L].map(V=>Ys(Number.parseFloat(V))))}if(g.useEffect(()=>{if(n){const k=xt(()=>{N(),C(!0)});let R;return typeof ResizeObserver<"u"&&(R=new ResizeObserver(N),R.observe(n)),()=>{xt.cancel(k),R==null||R.disconnect()}}},[n]),!v)return null;const M=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(Tb));return g.createElement(vr,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(k,R)=>{var O;if(R.deadline||sb(R)&&R.propertyName==="opacity"){const A=(O=i.current)==null?void 0:O.parentElement;V$(A).then(()=>{A==null||A.remove()})}return!1}},({className:k},R)=>g.createElement("div",{ref:Gn(i,R),className:Z(t,k,{"wave-quick":M}),style:I}))},RR=(e,t)=>{var o;const{component:n}=t;if(n==="Checkbox"&&!((o=e.querySelector("input"))!=null&&o.checked))return;const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",e==null||e.insertBefore(r,e==null?void 0:e.firstChild),H$(g.createElement(IR,{...t,target:e}),r)},PR=(e,t,n,r)=>{const{wave:o}=g.useContext(dt),[,i,a]=Cr(),s=Ke(u=>{const d=e.current;if(o!=null&&o.disabled||!d)return;const f=d.querySelector(`.${Tb}`)||d,{showEffect:p}=o||{};(p||RR)(f,{className:t,token:i,component:n,event:u,hashId:a,colorSource:r})}),l=g.useRef(null);return g.useEffect(()=>()=>{xt.cancel(l.current)},[]),u=>{xt.cancel(l.current),l.current=xt(()=>{s(u)})}},Ep={click:"click",mousedown:"mousedown",mouseup:"mouseup",pointerdown:"pointerdown",pointerup:"pointerup"},Nb=e=>{const{children:t,disabled:n,component:r,colorSource:o}=e,{getPrefixCls:i,wave:a}=b.useContext(dt),s=b.useRef(null),l=i("wave"),c=$R(l),u=PR(s,Z(l,c),r,o);if(b.useEffect(()=>{const f=s.current;if(!f||f.nodeType!==window.Node.ELEMENT_NODE||n)return;const p=w=>{!Su(w.target)||!f.getAttribute||f.getAttribute("disabled")||f.disabled||f.className.includes("disabled")&&!f.className.includes("disabled:")||f.getAttribute("aria-disabled")==="true"||f.className.includes("-leave")||u(w)},h=a==null?void 0:a.triggerType,m=h&&h in Ep?Ep[h]:"click";return f.addEventListener(m,p,!0),()=>{f.removeEventListener(m,p,!0)}},[n,a==null?void 0:a.triggerType]),!b.isValidElement(t))return t??null;const d=Eo(t)?Gn(cr(t),s):s;return Dn(t,{ref:d})};process.env.NODE_ENV!=="production"&&(Nb.displayName="Wave");const Po=e=>{const t=b.useContext(xo);return b.useMemo(()=>e?br(e)?e??t:Qt(e)?e(t):t:t,[e,t])},TR=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},NR=on(["Space","Compact"],TR,()=>({}),{resetStyle:!1}),as=g.createContext(null),To=(e,t)=>{const n=g.useContext(as),r=g.useMemo(()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return Z(`${e}-compact${s}item`,{[`${e}-compact${s}first-item`]:i,[`${e}-compact${s}last-item`]:a,[`${e}-compact${s}item-rtl`]:t==="rtl"})},[e,t,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},MR=e=>{const{children:t}=e;return g.createElement(as.Provider,{value:null},t)},AR=e=>{const{children:t,...n}=e;return g.createElement(as.Provider,{value:g.useMemo(()=>n,[n])},t)},Mb=g.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=g.useContext(dt),{size:o,direction:i,orientation:a,block:s,prefixCls:l,className:c,rootClassName:u,children:d,vertical:f,...p}=e;process.env.NODE_ENV!=="production"&&At("Space.Compact").deprecated(!i,"direction","orientation");const[h,m]=Gu(a,f,i),w=Po(N=>o??N),y=n("space-compact",l),[$]=NR(y),x=Z(y,$,{[`${y}-rtl`]:r==="rtl",[`${y}-block`]:s,[`${y}-vertical`]:m},c,u),E=g.useContext(as),v=g.useRef(null);g.useImperativeHandle(t,()=>({nativeElement:v.current}));const C=or(d),I=g.useMemo(()=>C.map((N,M)=>{const k=(N==null?void 0:N.key)||`${y}-item-${M}`;return g.createElement(AR,{key:k,compactSize:w,compactDirection:h,isFirstItem:M===0&&(!E||(E==null?void 0:E.isFirstItem)),isLastItem:M===C.length-1&&(!E||(E==null?void 0:E.isLastItem))},N)}),[C,E,h,w,y]);return C.length===0?null:g.createElement("div",{ref:v,className:x,...p},I)}),Ab=g.createContext(void 0),zR=e=>{const{getPrefixCls:t,direction:n}=g.useContext(dt),{prefixCls:r,size:o,className:i,...a}=e,s=t("btn-group",r),[,,l]=Cr(),c=g.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]);if(process.env.NODE_ENV!=="production"){const d=At("Button.Group");d.deprecated(!1,"Button.Group","Space.Compact"),process.env.NODE_ENV!=="production"&&d(!o||["large","medium","small"].includes(o),"usage","Invalid prop `size`.")}const u=Z(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},i,l);return g.createElement(Ab.Provider,{value:o},g.createElement("div",{...a,className:u}))},$p=/^[\u4E00-\u9FA5]{2}$/,hc=$p.test.bind($p);function Xi(e){return e==="text"||e==="link"}function OR(e,t,n,r){if(!xi(e))return;const o=t?" ":"";return!br(e)&&!rs(e)&&br(e.type)&&hc(e.props.children)?Dn(e,i=>{const a=Z(i.className,r)||void 0,s={...n,...i.style};return{...i,children:i.children.split("").join(o),className:a,style:s}}):br(e)?b.createElement("span",{className:r,style:n},hc(e)?e.split("").join(o):e):Sb(e)?b.createElement("span",{className:r,style:n},e):Dn(e,i=>({...i,className:Z(i.className,r)||void 0,style:{...i.style,...n}}))}function DR(e,t,n,r){let o=!1;const i=[];return b.Children.forEach(e,a=>{const s=br(a)||rs(a);if(o&&s){const l=i.length-1,c=i[l];i[l]=`${c}${a}`}else i.push(a);o=s}),b.Children.map(i,a=>OR(a,t,n,r))}["default","primary","danger"].concat(jr(xr));const zb=b.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,a=Z(`${i}-icon`,n);return b.createElement("span",{ref:t,className:a,style:r},o)}),kp=b.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,a=Z(`${n}-loading-icon`,r);return b.createElement(zb,{prefixCls:n,className:a,style:o,ref:t},b.createElement(kb,{className:i}))}),Qs=()=>({width:0,opacity:0,transform:"scale(0)"}),Zs=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),LR=e=>{const{prefixCls:t,loading:n,existIcon:r,className:o,style:i,mount:a}=e,s=!!n;return r?b.createElement(kp,{prefixCls:t,className:o,style:i}):b.createElement(vr,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Qs,onAppearActive:Zs,onEnterStart:Qs,onEnterActive:Zs,onLeaveStart:Zs,onLeaveActive:Qs},({className:l,style:c},u)=>{const d={...i,...c};return b.createElement(kp,{prefixCls:t,className:Z(o,l),style:d,ref:u})})},FR=e=>{const{componentCls:t,antCls:n,motionDurationMid:r,motionEaseInOut:o}=e;return{[t]:{[`${n}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(i=>`${i} ${r} ${o}`).join(", ")} !important`}},[`${n}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(i=>`${i} ${r} ${o}`).join(", ")} !important`}}}},Ip=e=>({animationDuration:e,animationFillMode:"both"}),ss=(e,t,n,r,o=!1)=>{const i=o?"&":"";return{[`
|
|
192
|
+
}`,n)}else ii(n);return()=>{ii(n)}},[t,n])}let hr=[];const HI=200;let Gu=0;process.env.NODE_ENV;const hb=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-Gu<HI)return;const n=hr.length;for(let r=n-1;r>=0;r-=1)hr[r].onEsc({top:r===n-1,event:e})}},bb=()=>{Gu=Date.now()};function VI(){window.addEventListener("keydown",hb),window.addEventListener("compositionend",bb)}function WI(){hr.length===0&&(window.removeEventListener("keydown",hb),window.removeEventListener("compositionend",bb))}function qI(e,t){const n=Ka(),r=Ge(t),o=()=>{hr.find(a=>a.id===n)||hr.push({id:n,onEsc:r})},i=()=>{hr=hr.filter(a=>a.id!==n)};b.useMemo(()=>{e?o():e||i()},[e]),b.useEffect(()=>{if(e)return o(),VI(),()=>{i(),WI()}},[e])}const bp=e=>e===!1?!1:!vn()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,is=g.forwardRef((e,t)=>{const{open:n,autoLock:r,getContainer:o,debug:i,autoDestroy:a=!0,children:s,onEsc:l}=e,[c,u]=g.useState(n),d=c||n;process.env.NODE_ENV!=="production"&&tt(vn()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),g.useEffect(()=>{(a||n)&&u(n)},[n,a]);const[f,p]=g.useState(()=>bp(o));g.useEffect(()=>{const v=bp(o);p(()=>v??null)});const[h,m]=FI(d&&!f,i),w=f??h;BI(r&&n&&vn()&&(w===h||w===document.body)),qI(n,l);let y=null;s&&$o(s)&&t&&(y=cr(s));const $=Hr(y,t);if(!d||!vn()||f===void 0)return null;const x=w===!1||LI();let E=s;return t&&(E=g.cloneElement(s,{ref:$})),g.createElement(gb.Provider,{value:m},x?E:po.createPortal(E,w))});process.env.NODE_ENV!=="production"&&(is.displayName="Portal");function XI(e){const{prefixCls:t,align:n,arrow:r,arrowPos:o}=e,{className:i,content:a,style:s}=r||{},{x:l=0,y:c=0}=o,u=g.useRef(null);if(!n||!n.points)return null;const d={position:"absolute"};if(n.autoArrow!==!1){const f=n.points[0],p=n.points[1],h=f[0],m=f[1],w=p[0],y=p[1];h===w||!["t","b"].includes(h)?d.top=c:h==="t"?d.top=0:d.bottom=0,m===y||!["l","r"].includes(m)?d.left=l:m==="l"?d.left=0:d.right=0}return g.createElement("div",{ref:u,className:Z(`${t}-arrow`,i),style:{...d,...s}},a)}function uc(){return uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uc.apply(this,arguments)}function UI(e){const{prefixCls:t,open:n,zIndex:r,mask:o,motion:i,mobile:a}=e;return o?g.createElement(vr,uc({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),({className:s})=>g.createElement("div",{style:{zIndex:r},className:Z(`${t}-mask`,a&&`${t}-mobile-mask`,s)})):null}const xb=g.memo(({children:e})=>e,(e,t)=>t.cache);process.env.NODE_ENV!=="production"&&(xb.displayName="PopupContent");function yb(e,t,n,r,o,i,a,s){var u;const l="auto",c=e?{}:{left:"-1000vw",top:"-1000vh",right:l,bottom:l};if(!e&&(t||!n)){const{points:d}=r,f=r.dynamicInset||((u=r._experimental)==null?void 0:u.dynamicInset),p=f&&d[0][1]==="r",h=f&&d[0][0]==="b";p?(c.right=o,c.left=l):(c.left=a,c.right=l),h?(c.bottom=i,c.top=l):(c.top=s,c.bottom=l)}return c}function dc(){return dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dc.apply(this,arguments)}const Ku=g.forwardRef((e,t)=>{const{onEsc:n,popup:r,className:o,prefixCls:i,style:a,target:s,onVisibleChanged:l,open:c,keepDom:u,fresh:d,onClick:f,mask:p,arrow:h,arrowPos:m,align:w,motion:y,maskMotion:$,mobile:x,forceRender:E,getPopupContainer:v,autoDestroy:C,portal:I,children:N,zIndex:A,onMouseEnter:k,onMouseLeave:R,onPointerEnter:O,onPointerDownCapture:z,ready:D,offsetX:M,offsetY:L,offsetR:_,offsetB:V,onAlign:X,onPrepare:P,onResize:Y,stretch:K,targetWidth:T,targetHeight:ne}=e,F=typeof r=="function"?r():r,U=c||u,re=!!x,[j,H,ee]=g.useMemo(()=>x?[x.mask,x.maskMotion,x.motion]:[p,$,y],[x,p,$,y]),oe=(v==null?void 0:v.length)>0,[B,ie]=g.useState(!v||!oe);Bt(()=>{!B&&oe&&s&&ie(!0)},[B,oe,s]);const ae=Ge((q,me)=>{Y==null||Y(q,me),X()}),Se=yb(re,D,c,w,_,V,M,L);if(!B)return null;const ye={};return K&&(K.includes("height")&&ne?ye.height=ne:K.includes("minHeight")&&ne&&(ye.minHeight=ne),K.includes("width")&&T?ye.width=T:K.includes("minWidth")&&T&&(ye.minWidth=T)),c||(ye.pointerEvents="none"),g.createElement(I,{open:E||U,getContainer:v&&(()=>v(s)),autoDestroy:C,onEsc:n},g.createElement(UI,{prefixCls:i,open:c,zIndex:A,mask:j,motion:H,mobile:re}),g.createElement(Io,{onResize:ae,disabled:!c},q=>g.createElement(vr,dc({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:`${i}-hidden`},ee,{onAppearPrepare:P,onEnterPrepare:P,visible:c,onVisibleChanged:me=>{var he;(he=y==null?void 0:y.onVisibleChanged)==null||he.call(y,me),l(me)}}),({className:me,style:he},se)=>{const ue=Z(i,me,o,{[`${i}-mobile`]:re});return g.createElement("div",{ref:Gn(q,t,se),className:ue,style:{"--arrow-x":`${m.x||0}px`,"--arrow-y":`${m.y||0}px`,...Se,...ye,...he,boxSizing:"border-box",zIndex:A,...a},onMouseEnter:k,onMouseLeave:R,onPointerEnter:O,onClick:f,onPointerDownCapture:z},h&&g.createElement(XI,{prefixCls:i,arrow:h,arrowPos:m,align:w}),g.createElement(xb,{cache:!c&&!d},F))})),N)});process.env.NODE_ENV!=="production"&&(Ku.displayName="Popup");const ka=g.createContext(null),wb=g.createContext(null);function xp(e){return e?Array.isArray(e)?e:[e]:[]}function GI(e,t,n){return g.useMemo(()=>{const r=xp(t??e),o=xp(n??e),i=new Set(r),a=new Set(o);return i.has("hover")&&!i.has("click")&&i.add("touch"),a.has("hover")&&!a.has("click")&&a.add("touch"),[i,a]},[e,t,n])}function KI(e=[],t=[],n){const r=(o,i)=>o[i]||"";return n?r(e,0)===r(t,0):r(e,0)===r(t,0)&&r(e,1)===r(t,1)}function vb(e,t,n,r){var a;const{points:o}=n,i=Object.keys(e);for(let s=0;s<i.length;s+=1){const l=i[s];if(KI((a=e[l])==null?void 0:a.points,o,r))return`${t}-placement-${l}`}return""}function vi(e){return e.ownerDocument.defaultView}function fc(e){const t=[];let n=e==null?void 0:e.parentElement;const r=["hidden","scroll","clip","auto"];for(;n;){const{overflowX:o,overflowY:i,overflow:a}=vi(n).getComputedStyle(n);[o,i,a].some(s=>r.includes(s))&&t.push(n),n=n.parentElement}return t}function di(e,t=1){return Number.isNaN(e)?t:e}function _o(e){return di(parseFloat(e),0)}function yp(e,t){const n={...e};return(t||[]).forEach(r=>{if(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)return;const{overflow:o,overflowClipMargin:i,borderTopWidth:a,borderBottomWidth:s,borderLeftWidth:l,borderRightWidth:c}=vi(r).getComputedStyle(r),u=r.getBoundingClientRect(),{offsetHeight:d,clientHeight:f,offsetWidth:p,clientWidth:h}=r,m=_o(a),w=_o(s),y=_o(l),$=_o(c),x=di(Math.round(u.width/p*1e3)/1e3),E=di(Math.round(u.height/d*1e3)/1e3),v=(p-h-y-$)*x,C=(d-f-m-w)*E,I=m*E,N=w*E,A=y*x,k=$*x;let R=0,O=0;if(o==="clip"){const _=_o(i);R=_*x,O=_*E}const z=u.x+A-R,D=u.y+I-O,M=z+u.width+2*R-A-k-v,L=D+u.height+2*O-I-N-C;n.left=Math.max(n.left,z),n.top=Math.max(n.top,D),n.right=Math.min(n.right,M),n.bottom=Math.min(n.bottom,L)}),n}function wp(e,t=0){const n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function vp(e,t){const[n,r]=t||[];return[wp(e.width,n),wp(e.height,r)]}function Cp(e=""){return[e[0],e[1]]}function Gr(e,t){const n=t[0],r=t[1];let o,i;return n==="t"?i=e.y:n==="b"?i=e.y+e.height:i=e.y+e.height/2,r==="l"?o=e.x:r==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:i}}function fr(e,t){const n={t:"b",b:"t",l:"r",r:"l"},r=[...e];return r[t]=n[e[t]]||"c",r}function Sp(e){return e.join("")}function Cb(e,t,n,r,o,i,a,s){const[l,c]=g.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),u=g.useRef(0),d=g.useMemo(()=>!t||s?[]:fc(t),[t]),f=g.useRef({});e||(()=>{f.current={}})();const h=Ge(()=>{var y,$;if(t&&n&&e&&!s){let it=function(Le,Tt,Nt=me){const Vn=_.x+Le,Er=_.y+Tt,zi=Vn+re,xd=Er+U,xs=Math.max(Vn,Nt.left),ys=Math.max(Er,Nt.top),ws=Math.min(zi,Nt.right),Ce=Math.min(xd,Nt.bottom);return Math.max(0,(ws-xs)*(Ce-ys))},Hn=function(){Rt=_.y+Me,Sn=Rt+U,Ht=_.x+ze,an=Ht+re};const x=t,E=x.ownerDocument,v=vi(x),{position:C}=v.getComputedStyle(x),I=x.style.left,N=x.style.top,A=x.style.right,k=x.style.bottom,R=x.style.overflow,O=x.style.overflowX,z=x.style.overflowY,D={...o[r],...i},M=E.createElement("div");(y=x.parentElement)==null||y.appendChild(M),M.style.left=`${x.offsetLeft}px`,M.style.top=`${x.offsetTop}px`,M.style.position=C,M.style.height=`${x.offsetHeight}px`,M.style.width=`${x.offsetWidth}px`,x.style.left="0",x.style.top="0",x.style.right="auto",x.style.bottom="auto",x.style.overflow="hidden";let L;if(Array.isArray(n))L={x:n[0],y:n[1],width:0,height:0};else{const Le=n.getBoundingClientRect();Le.x=Le.x??Le.left,Le.y=Le.y??Le.top,L={x:Le.x,y:Le.y,width:Le.width,height:Le.height}}const _=x.getBoundingClientRect(),{height:V,width:X}=v.getComputedStyle(x);_.x=_.x??_.left,_.y=_.y??_.top;const{clientWidth:P,clientHeight:Y,scrollWidth:K,scrollHeight:T,scrollTop:ne,scrollLeft:F}=E.documentElement,U=_.height,re=_.width,j=L.height,H=L.width,ee={left:0,top:0,right:P,bottom:Y},oe={left:-F,top:-ne,right:K-F,bottom:T-ne};let{htmlRegion:B}=D;const ie="visible",ae="visibleFirst";B!=="scroll"&&B!==ae&&(B=ie);const Se=B===ae,ye=yp(oe,d),q=yp(ee,d),me=B===ie?q:ye,he=Se?q:me;x.style.left="auto",x.style.top="auto",x.style.right="0",x.style.bottom="0";const se=x.getBoundingClientRect();x.style.left=I,x.style.top=N,x.style.right=A,x.style.bottom=k,x.style.overflow=R,x.style.overflowX=O,x.style.overflowY=z,($=x.parentElement)==null||$.removeChild(M);const ue=di(Math.round(re/parseFloat(X)*1e3)/1e3),pe=di(Math.round(U/parseFloat(V)*1e3)/1e3);if(ue===0||pe===0||go(n)&&!ku(n))return;const{offset:Ne,targetOffset:Ee}=D;let[Ie,W]=vp(_,Ne);const[Q,le]=vp(L,Ee);L.x-=Q,L.y-=le;const[be,$e]=D.points||[],ce=Cp($e),te=Cp(be),ve=Gr(L,ce),Re=Gr(_,te),Ue={...D};let Pe=[te,ce],ze=ve.x-Re.x+Ie,Me=ve.y-Re.y+W;const Ye=it(ze,Me),It=it(ze,Me,q),wt=Gr(L,["t","l"]),Ot=Gr(_,["t","l"]),gt=Gr(L,["b","r"]),_t=Gr(_,["b","r"]),jt=D.overflow||{},{adjustX:_e,adjustY:pt,shiftX:Cn,shiftY:jn}=jt,Bn=Le=>typeof Le=="boolean"?Le:Le>=0;let Rt,Sn,Ht,an;Hn();const fn=Bn(pt),pn=te[0]===ce[0];if(fn&&te[0]==="t"&&(Sn>he.bottom||f.current.bt)){let Le=Me;pn?Le-=U-j:Le=wt.y-_t.y-W;const Tt=it(ze,Le),Nt=it(ze,Le,q);Tt>Ye||Tt===Ye&&(!Se||Nt>=It)?(f.current.bt=!0,Me=Le,W=-W,Pe=[fr(Pe[0],0),fr(Pe[1],0)]):f.current.bt=!1}if(fn&&te[0]==="b"&&(Rt<he.top||f.current.tb)){let Le=Me;pn?Le+=U-j:Le=gt.y-Ot.y-W;const Tt=it(ze,Le),Nt=it(ze,Le,q);Tt>Ye||Tt===Ye&&(!Se||Nt>=It)?(f.current.tb=!0,Me=Le,W=-W,Pe=[fr(Pe[0],0),fr(Pe[1],0)]):f.current.tb=!1}const en=Bn(_e),Dt=te[1]===ce[1];if(en&&te[1]==="l"&&(an>he.right||f.current.rl)){let Le=ze;Dt?Le-=re-H:Le=wt.x-_t.x-Ie;const Tt=it(Le,Me),Nt=it(Le,Me,q);Tt>Ye||Tt===Ye&&(!Se||Nt>=It)?(f.current.rl=!0,ze=Le,Ie=-Ie,Pe=[fr(Pe[0],1),fr(Pe[1],1)]):f.current.rl=!1}if(en&&te[1]==="r"&&(Ht<he.left||f.current.lr)){let Le=ze;Dt?Le+=re-H:Le=gt.x-Ot.x-Ie;const Tt=it(Le,Me),Nt=it(Le,Me,q);Tt>Ye||Tt===Ye&&(!Se||Nt>=It)?(f.current.lr=!0,ze=Le,Ie=-Ie,Pe=[fr(Pe[0],1),fr(Pe[1],1)]):f.current.lr=!1}Ue.points=[Sp(Pe[0]),Sp(Pe[1])],Hn();const at=Cn===!0?0:Cn;typeof at=="number"&&(Ht<q.left&&(ze-=Ht-q.left-Ie,L.x+H<q.left+at&&(ze+=L.x-q.left+H-at)),an>q.right&&(ze-=an-q.right-Ie,L.x>q.right-at&&(ze+=L.x-q.right+at)));const Vt=jn===!0?0:jn;typeof Vt=="number"&&(Rt<q.top&&(Me-=Rt-q.top-W,L.y+j<q.top+Vt&&(Me+=L.y-q.top+j-Vt)),Sn>q.bottom&&(Me-=Sn-q.bottom-W,L.y>q.bottom-Vt&&(Me+=L.y-q.bottom+Vt)));const vt=_.x+ze,Oe=vt+re,Qe=_.y+Me,st=Qe+U,Be=L.x,G=Be+H,ge=L.y,de=ge+j,we=Math.max(vt,Be),Te=Math.min(Oe,G),Fe=(we+Te)/2-vt,De=Math.max(Qe,ge),ft=Math.min(st,de),ht=(De+ft)/2-Qe;a==null||a(t,Ue);let Ct=se.right-_.x-(ze+_.width),mt=se.bottom-_.y-(Me+_.height);ue===1&&(ze=Math.floor(ze),Ct=Math.floor(Ct)),pe===1&&(Me=Math.floor(Me),mt=Math.floor(mt));const Lt={ready:!0,offsetX:ze/ue,offsetY:Me/pe,offsetR:Ct/ue,offsetB:mt/pe,arrowX:Fe/ue,arrowY:ht/pe,scaleX:ue,scaleY:pe,align:Ue};c(Lt)}}),m=()=>{u.current+=1;const y=u.current;Promise.resolve().then(()=>{u.current===y&&h()})},w=()=>{c(y=>({...y,ready:!1}))};return Bt(w,[r]),Bt(()=>{e||w()},[e]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,m]}function Sb(){const e=g.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null)},n=(r,o)=>{t(),o===0?r():e.current=setTimeout(()=>{r()},o*1e3)};return g.useEffect(()=>()=>{t()},[]),n}function YI(e,t,n,r,o){Bt(()=>{if(e&&t&&n){let d=function(){r(),o()};const i=t,a=n,s=fc(i),l=fc(a),c=vi(a),u=new Set([c,...s,...l]);return u.forEach(f=>{f.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),r(),()=>{u.forEach(f=>{f.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[e,t,n])}function QI(e,t,n,r,o,i,a,s){const l=g.useRef(e);l.current=e;const c=g.useRef(!1);g.useEffect(()=>{var d,f;if(t&&r&&(!o||i)){const p=()=>{c.current=!1},h=y=>{var $,x;l.current&&!a(((x=($=y.composedPath)==null?void 0:$.call(y))==null?void 0:x[0])||y.target)&&!c.current&&s(!1)},m=vi(r);m.addEventListener("pointerdown",p,!0),m.addEventListener("mousedown",h,!0),m.addEventListener("contextmenu",h,!0);const w=Rl(n);if(w&&(w.addEventListener("mousedown",h,!0),w.addEventListener("contextmenu",h,!0)),process.env.NODE_ENV!=="production"&&n){const y=(d=n.getRootNode)==null?void 0:d.call(n),$=(f=r.getRootNode)==null?void 0:f.call(r);tt(y===$,"trigger element and popup element should in same shadow root.")}return()=>{m.removeEventListener("pointerdown",p,!0),m.removeEventListener("mousedown",h,!0),m.removeEventListener("contextmenu",h,!0),w&&(w.removeEventListener("mousedown",h,!0),w.removeEventListener("contextmenu",h,!0))}}},[t,n,r,o,i]);function u(){c.current=!0}return u}function ZI(){const[e,t]=b.useState(null),[n,r]=b.useState(!1),[o,i]=b.useState(!1),a=b.useRef(null),s=Ge(c=>{c===!1?(a.current=null,r(!1)):o&&n?a.current=c:(r(!0),t(c),a.current=null,n||i(!0))}),l=Ge(c=>{c?(i(!1),a.current&&(t(a.current),a.current=null)):(i(!1),a.current=null)});return[s,n,e,l]}function pc(){return pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pc.apply(this,arguments)}const JI=e=>{const{prefixCls:t,isMobile:n,ready:r,open:o,align:i,offsetR:a,offsetB:s,offsetX:l,offsetY:c,arrowPos:u,popupSize:d,motion:f,uniqueContainerClassName:p,uniqueContainerStyle:h}=e,m=`${t}-unique-container`,[w,y]=b.useState(!1),$=yb(n,r,o,i,a,s,l,c),x=b.useRef($);r&&(x.current=$);const E={};return d&&(E.width=d.width,E.height=d.height),b.createElement(vr,pc({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${m}-hidden`},f,{visible:o,onVisibleChanged:v=>{y(v)}}),({className:v,style:C})=>{const I=Z(m,v,p,{[`${m}-visible`]:w});return b.createElement("div",{className:I,style:{"--arrow-x":`${(u==null?void 0:u.x)||0}px`,"--arrow-y":`${(u==null?void 0:u.y)||0}px`,...x.current,...E,...C,...h}})})},eR=({children:e,postTriggerProps:t})=>{const[n,r,o,i]=ZI(),a=g.useMemo(()=>!o||!t?o:t(o),[o,t]),[s,l]=g.useState(null),[c,u]=g.useState(null),d=g.useRef(null),f=Ge(V=>{d.current=V,go(V)&&s!==V&&l(V)}),p=g.useRef(null),h=Sb(),m=Ge((V,X)=>{p.current=X,h(()=>{n(V)},V.delay)}),w=V=>{h(()=>{var X;(X=p.current)!=null&&X.call(p)||n(!1)},V)},y=Ge(V=>{i(V)}),[$,x,E,v,C,I,N,,,A,k]=Cb(r,s,a==null?void 0:a.target,a==null?void 0:a.popupPlacement,(a==null?void 0:a.builtinPlacements)||{},a==null?void 0:a.popupAlign,void 0,!1),R=g.useMemo(()=>{var X;if(!a)return"";const V=vb(a.builtinPlacements||{},a.prefixCls||"",A,!1);return Z(V,(X=a.getPopupClassNameFromAlign)==null?void 0:X.call(a,A))},[A,a==null?void 0:a.getPopupClassNameFromAlign,a==null?void 0:a.builtinPlacements,a==null?void 0:a.prefixCls]),O=g.useMemo(()=>({show:m,hide:w}),[]);g.useEffect(()=>{k()},[a==null?void 0:a.target]);const z=Ge(()=>(k(),Promise.resolve())),D=g.useRef({}),M=g.useContext(ka),L=g.useMemo(()=>({registerSubPopup:(V,X)=>{D.current[V]=X,M==null||M.registerSubPopup(V,X)}}),[M]),_=a==null?void 0:a.prefixCls;return g.createElement(wb.Provider,{value:O},e,a&&g.createElement(ka.Provider,{value:L},g.createElement(Ku,{ref:f,portal:is,onEsc:a.onEsc,prefixCls:_,popup:a.popup,className:Z(a.popupClassName,R,`${_}-unique-controlled`),style:a.popupStyle,target:a.target,open:r,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:y,ready:$,offsetX:x,offsetY:E,offsetR:v,offsetB:C,onAlign:k,onPrepare:z,onResize:V=>u({width:V.offsetWidth,height:V.offsetHeight}),arrowPos:{x:I,y:N},align:A,zIndex:a.zIndex,mask:a.mask,arrow:a.arrow,motion:a.popupMotion,maskMotion:a.maskMotion,getPopupContainer:a.getPopupContainer},g.createElement(JI,{prefixCls:_,isMobile:!1,ready:$,open:r,align:A,offsetR:v,offsetB:C,offsetX:x,offsetY:E,arrowPos:{x:I,y:N},popupSize:c,motion:a.popupMotion,uniqueContainerClassName:Z(a.uniqueContainerClassName,R),uniqueContainerStyle:a.uniqueContainerStyle}))))};function tR(e=is){const t=g.forwardRef((n,r)=>{const{prefixCls:o="rc-trigger-popup",children:i,action:a="hover",showAction:s,hideAction:l,disabled:c=!1,popupVisible:u,defaultPopupVisible:d,onOpenChange:f,afterOpenChange:p,onPopupVisibleChange:h,afterPopupVisibleChange:m,mouseEnterDelay:w,mouseLeaveDelay:y=.1,focusDelay:$,blurDelay:x,mask:E,maskClosable:v=!0,getPopupContainer:C,forceRender:I,autoDestroy:N,popup:A,popupClassName:k,uniqueContainerClassName:R,uniqueContainerStyle:O,popupStyle:z,popupPlacement:D,builtinPlacements:M={},popupAlign:L,zIndex:_,stretch:V,getPopupClassNameFromAlign:X,fresh:P,unique:Y,alignPoint:K,onPopupClick:T,onPopupAlign:ne,arrow:F,popupMotion:U,maskMotion:re,mobile:j,...H}=n,ee=N||!1,oe=u===void 0,B=!!j,ie=g.useRef({}),ae=g.useContext(ka),Se=g.useMemo(()=>({registerSubPopup:(Ce,qe)=>{ie.current[Ce]=qe,ae==null||ae.registerSubPopup(Ce,qe)}}),[ae]),ye=g.useContext(wb),q=Ka(),[me,he]=g.useState(null),se=g.useRef(null),ue=Ge(Ce=>{se.current=Ce,go(Ce)&&me!==Ce&&he(Ce),ae==null||ae.registerSubPopup(q,Ce)}),[pe,Ne]=g.useState(null),Ee=g.useRef(null),Ie=Ge(Ce=>{const qe=$u(Ce);go(qe)&&pe!==qe&&(Ne(qe),Ee.current=qe)}),W={},Q=Ge(Ce=>{var Wt,Wr;const qe=pe;return(qe==null?void 0:qe.contains(Ce))||((Wt=Rl(qe))==null?void 0:Wt.host)===Ce||Ce===qe||(me==null?void 0:me.contains(Ce))||((Wr=Rl(me))==null?void 0:Wr.host)===Ce||Ce===me||Object.values(ie.current).some($r=>($r==null?void 0:$r.contains(Ce))||Ce===$r)}),le=F?{...F!==!0?F:{}}:null,[be,$e]=un(d||!1,u),ce=be||!1,te=ce&&!c,ve=g.useMemo(()=>{const Ce=typeof i=="function"?i({open:te}):i;return g.Children.only(Ce)},[i,te]),Re=(ve==null?void 0:ve.props)||{},Ue=Ge(()=>te),Pe=Ge((Ce=0)=>({popup:A,target:pe,delay:Ce,prefixCls:o,popupClassName:k,uniqueContainerClassName:R,uniqueContainerStyle:O,popupStyle:z,popupPlacement:D,builtinPlacements:M,popupAlign:L,zIndex:_,mask:E,maskClosable:v,popupMotion:U,maskMotion:re,arrow:le,getPopupContainer:C,getPopupClassNameFromAlign:X,id:q,onEsc:It}));Bt(()=>{ye&&Y&&pe&&!oe&&!ae&&(te?ye.show(Pe(w),Ue):ye.hide(y))},[te,pe]);const ze=g.useRef(te);ze.current=te;const Me=Ge(Ce=>{po.flushSync(()=>{ce!==Ce&&($e(Ce),f==null||f(Ce),h==null||h(Ce))})}),it=Sb(),Ye=(Ce,qe=0)=>{if(u!==void 0){it(()=>{Me(Ce)},qe);return}if(ye&&Y&&oe&&!ae){Ce?ye.show(Pe(qe),Ue):ye.hide(qe);return}it(()=>{Me(Ce)},qe)};function It({top:Ce}){Ce&&Ye(!1)}const[wt,Ot]=g.useState(!1);Bt(Ce=>{(!Ce||te)&&Ot(!0)},[te]);const[gt,_t]=g.useState(null),[jt,_e]=g.useState(null),pt=Ce=>{_e([Ce.clientX,Ce.clientY])},[Cn,jn,Bn,Rt,Sn,Ht,an,Hn,fn,pn,en]=Cb(te,me,K&&jt!==null?jt:pe,D,M,L,ne,B),[Dt,at]=GI(a,s,l),Vt=Dt.has("click"),vt=at.has("click")||at.has("contextMenu"),Oe=Ge(()=>{wt||en()});YI(te,pe,me,Oe,()=>{ze.current&&K&&vt&&Ye(!1)}),Bt(()=>{Oe()},[jt,D]),Bt(()=>{te&&!(M!=null&&M[D])&&Oe()},[JSON.stringify(L)]);const st=g.useMemo(()=>{const Ce=vb(M,o,pn,K);return Z(Ce,X==null?void 0:X(pn))},[pn,X,M,o,K]);g.useImperativeHandle(r,()=>({nativeElement:Ee.current,popupElement:se.current,forceAlign:Oe}));const[Be,G]=g.useState(0),[ge,de]=g.useState(0),we=()=>{if(V&&pe){const Ce=pe.getBoundingClientRect();G(Ce.width),de(Ce.height)}},Te=()=>{we(),Oe()},ke=Ce=>{Ot(!1),en(),p==null||p(Ce),m==null||m(Ce)},Fe=()=>new Promise(Ce=>{we(),_t(()=>Ce)});Bt(()=>{gt&&(en(),gt(),_t(null))},[gt]);function De(Ce,qe,Wt,Wr,$r){W[Ce]=(yd,...B0)=>{var wd;(!$r||!$r())&&(Wr==null||Wr(yd),Ye(qe,Wt)),(wd=Re[Ce])==null||wd.call(Re,yd,...B0)}}const ft=Dt.has("touch"),Pt=at.has("touch"),ht=g.useRef(!1);(ft||Pt)&&(W.onTouchStart=(...Ce)=>{var qe;ht.current=!0,ze.current&&Pt?Ye(!1):!ze.current&&ft&&Ye(!0),(qe=Re.onTouchStart)==null||qe.call(Re,...Ce)}),(Vt||vt)&&(W.onClick=(Ce,...qe)=>{var Wt;ze.current&&vt?Ye(!1):!ze.current&&Vt&&(pt(Ce),Ye(!0)),(Wt=Re.onClick)==null||Wt.call(Re,Ce,...qe),ht.current=!1});const Ct=QI(te,vt||Pt,pe,me,E,v,Q,Ye),mt=Dt.has("hover"),Lt=at.has("hover");let Le,Tt;const Nt=()=>ht.current;if(mt){const Ce=qe=>{pt(qe)};De("onMouseEnter",!0,w,Ce,Nt),De("onPointerEnter",!0,w,Ce,Nt),Le=qe=>{(te||wt)&&(me!=null&&me.contains(qe.target))&&Ye(!0,w)},K&&(W.onMouseMove=qe=>{var Wt;(Wt=Re.onMouseMove)==null||Wt.call(Re,qe)})}Lt&&(De("onMouseLeave",!1,y,void 0,Nt),De("onPointerLeave",!1,y,void 0,Nt),Tt=()=>{Ye(!1,y)}),Dt.has("focus")&&De("onFocus",!0,$),at.has("focus")&&De("onBlur",!1,x),Dt.has("contextMenu")&&(W.onContextMenu=(Ce,...qe)=>{var Wt;ze.current&&at.has("contextMenu")?Ye(!1):(pt(Ce),Ye(!0)),Ce.preventDefault(),(Wt=Re.onContextMenu)==null||Wt.call(Re,Ce,...qe)});const Vn=g.useRef(!1);Vn.current||(Vn.current=I||te||wt);const Er={...Re,...W},zi={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(Ce=>{H[Ce]&&(zi[Ce]=(...qe)=>{var Wt;(Wt=Er[Ce])==null||Wt.call(Er,...qe),H[Ce](...qe)})});const xs={x:Ht,y:an};Lh(te,pe,Te);const ys=Hr(Ie,cr(ve)),ws=g.cloneElement(ve,{...Er,...zi,ref:ys});return g.createElement(g.Fragment,null,ws,Vn.current&&(!ye||!Y)&&g.createElement(ka.Provider,{value:Se},g.createElement(Ku,{portal:e,ref:ue,prefixCls:o,popup:A,className:Z(k,!B&&st),style:z,target:pe,onMouseEnter:Le,onMouseLeave:Tt,onPointerEnter:Le,zIndex:_,open:te,keepDom:wt,fresh:P,onClick:T,onPointerDownCapture:Ct,mask:E,motion:U,maskMotion:re,onVisibleChanged:ke,onPrepare:Fe,forceRender:I,autoDestroy:ee,getPopupContainer:C,onEsc:It,align:pn,arrow:le,arrowPos:xs,ready:Cn,offsetX:jn,offsetY:Bn,offsetR:Rt,offsetB:Sn,onAlign:Oe,stretch:V,targetWidth:Be/Hn,targetHeight:ge/fn,mobile:j})))});return process.env.NODE_ENV!=="production"&&(t.displayName="Trigger"),t}const Yu=tR(is);function Eb(e){return e&&b.isValidElement(e)&&e.type===b.Fragment}const nR=(e,t,n)=>b.isValidElement(e)?b.cloneElement(e,Qt(n)?n(e.props||{}):n):t;function Dn(e,t){return nR(e,e,t)}const rR=({children:e})=>{const{getPrefixCls:t}=b.useContext(dt),n=t();return b.isValidElement(e)?b.createElement(vr,{visible:!0,motionName:`${n}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:r,className:o})=>Dn(e,i=>({className:Z(i.className,o),style:{...i.style,...r}}))):e},Xi=[null,null];function oR(e){if(Xi[0]!==e){const t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:!1}}),Xi[0]=e,Xi[1]=t}return Xi[1]}const $b=({children:e})=>{const t=n=>{const{id:r,builtinPlacements:o,popup:i}=n,a=Qt(i)?i():i,s=oR(o);return{...n,getPopupContainer:null,arrow:!1,popup:b.createElement(rR,{key:r},a),builtinPlacements:s}};return b.createElement(eR,{postTriggerProps:t},e)},yr=g.createContext(!1),iR=({children:e,disabled:t})=>{const n=g.useContext(yr);return g.createElement(yr.Provider,{value:t??n},e)},xo=g.createContext(void 0),aR=({children:e,size:t})=>{const n=g.useContext(xo);return g.createElement(xo.Provider,{value:t||n},e)};function sR(){const e=b.useContext(yr),t=b.useContext(xo);return{componentDisabled:e,componentSize:t}}function lR(e,t,n){var s;const r=At("ConfigProvider"),o=e||{},i=o.inherit===!1||!t?{...Sa,hashed:(t==null?void 0:t.hashed)??Sa.hashed,cssVar:t==null?void 0:t.cssVar,zeroRuntime:t==null?void 0:t.zeroRuntime}:t,a=b.useId();if(process.env.NODE_ENV!=="production"){const l=o.cssVar||i.cssVar,c=!!(rn(o.cssVar)&&((s=o.cssVar)!=null&&s.key)||a);process.env.NODE_ENV!=="production"&&r(!l||c,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return Ya(()=>{var d;if(!e)return t;const l={...i.components};Object.keys(e.components||{}).forEach(f=>{l[f]={...l[f],...e.components[f]}});const c=`css-var-${a.replace(/:/g,"")}`,u={prefix:n==null?void 0:n.prefixCls,...i.cssVar,...o.cssVar,key:((d=o.cssVar)==null?void 0:d.key)||c};return{...i,...o,token:{...i.token,...o.token},components:l,cssVar:u}},[o,i,n==null?void 0:n.prefixCls,a],(l,c)=>l.some((u,d)=>{const f=c[d];return!ai(u,f,!0)}))}const mc=g.createContext(!0);process.env.NODE_ENV!=="production"&&(mc.displayName="MotionCacheContext");function cR(e){const t=g.useContext(mc),{children:n}=e,[,r]=Cr(),{motion:o}=r,i=g.useRef(!1);return i.current||(i.current=t!==o),i.current?g.createElement(mc.Provider,{value:o},g.createElement(q$,{motion:o},n)):n}const kb=g.memo(e=>{const{dropdownMatchSelectWidth:t}=e;return At("ConfigProvider").deprecated(t===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&(kb.displayName="PropWarning");const uR=process.env.NODE_ENV!=="production"?kb:()=>null,dR=({iconPrefixCls:e,csp:t})=>(cI(e,t),null);let gc=!1;process.env.NODE_ENV;const fR=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"],pR=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e},mR=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,app:s,form:l,locale:c,componentSize:u,direction:d,space:f,splitter:p,virtual:h,dropdownMatchSelectWidth:m,popupMatchSelectWidth:w,popupOverflow:y,legacyLocale:$,parentContext:x,iconPrefixCls:E,theme:v,componentDisabled:C,segmented:I,statistic:N,spin:A,calendar:k,carousel:R,cascader:O,collapse:z,typography:D,checkbox:M,descriptions:L,divider:_,drawer:V,skeleton:X,steps:P,image:Y,layout:K,list:T,listy:ne,mentions:F,modal:U,progress:re,result:j,slider:H,breadcrumb:ee,masonry:oe,menu:B,pagination:ie,input:ae,inputPassword:Se,inputSearch:ye,textArea:q,otp:me,empty:he,badge:se,borderBeam:ue,radio:pe,rate:Ne,ribbon:Ee,switch:Ie,transfer:W,avatar:Q,message:le,tag:be,table:$e,card:ce,cardMeta:te,tabs:ve,timeline:Re,timePicker:Ue,upload:Pe,notification:ze,tree:Me,colorPicker:it,datePicker:Ye,rangePicker:It,flex:wt,wave:Ot,dropdown:gt,warning:_t,tour:jt,tooltip:_e,popover:pt,popconfirm:Cn,qrcode:jn,floatButton:Bn,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:Hn}=e,fn=g.useMemo(()=>{var de;return rn(c)&&Object.prototype.hasOwnProperty.call(c,"default")&&((de=c.default)!=null&&de.locale)?c.default:c},[c]),pn=g.useCallback((de,we)=>{const{prefixCls:Te}=e;if(we)return we;const ke=Te||x.getPrefixCls("");return de?`${ke}-${de}`:ke},[x.getPrefixCls,e.prefixCls]),en=E||x.iconPrefixCls||ju,Dt=n||x.csp,at=lR(v,x.theme,{prefixCls:pn("")});process.env.NODE_ENV!=="production"&&(gc=gc||!!at);const Vt={csp:Dt,autoInsertSpaceInButton:r,alert:o,affix:i,anchor:a,app:s,locale:fn||$,direction:d,space:f,splitter:p,virtual:h,popupMatchSelectWidth:w??m,popupOverflow:y,getPrefixCls:pn,iconPrefixCls:en,theme:at,segmented:I,statistic:N,spin:A,calendar:k,carousel:R,cascader:O,collapse:z,typography:D,checkbox:M,descriptions:L,divider:_,drawer:V,skeleton:X,steps:P,image:Y,input:ae,inputPassword:Se,inputSearch:ye,textArea:q,otp:me,layout:K,list:T,listy:ne,mentions:F,modal:U,progress:re,result:j,slider:H,breadcrumb:ee,masonry:oe,menu:B,pagination:ie,empty:he,badge:se,borderBeam:ue,radio:pe,rate:Ne,ribbon:Ee,switch:Ie,transfer:W,avatar:Q,message:le,tag:be,table:$e,card:ce,cardMeta:te,tabs:ve,timeline:Re,timePicker:Ue,upload:Pe,notification:ze,tree:Me,colorPicker:it,datePicker:Ye,rangePicker:It,flex:wt,wave:Ot,dropdown:gt,warning:_t,tour:jt,tooltip:_e,popover:pt,popconfirm:Cn,qrcode:jn,floatButton:Bn,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:Hn};process.env.NODE_ENV!=="production"&&At("ConfigProvider")(!("autoInsertSpaceInButton"in e),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const vt={...x};Object.keys(Vt).forEach(de=>{Vt[de]!==void 0&&(vt[de]=Vt[de])}),fR.forEach(de=>{const we=e[de];we&&(vt[de]=we)}),typeof r<"u"&&(vt.button={autoInsertSpace:r,...vt.button});const Oe=Ya(()=>vt,vt,(de,we)=>{const Te=Object.keys(de),ke=Object.keys(we);return Te.length!==ke.length||Te.some(Fe=>de[Fe]!==we[Fe])}),{layer:Qe}=g.useContext(wi),st=g.useMemo(()=>({prefixCls:en,csp:Dt,layer:Qe?"antd":void 0,zeroRuntime:!!Qe||(at==null?void 0:at.zeroRuntime)}),[en,Dt,Qe,at==null?void 0:at.zeroRuntime]);let Be=g.createElement(g.Fragment,null,g.createElement(dR,{iconPrefixCls:en,csp:Dt}),g.createElement(uR,{dropdownMatchSelectWidth:m}),t);const G=g.useMemo(()=>{var de,we,Te,ke;return oo(((de=bo.Form)==null?void 0:de.defaultValidateMessages)||{},((Te=(we=Oe.locale)==null?void 0:we.Form)==null?void 0:Te.defaultValidateMessages)||{},((ke=Oe.form)==null?void 0:ke.validateMessages)||{},(l==null?void 0:l.validateMessages)||{})},[Oe,l==null?void 0:l.validateMessages]);Object.keys(G).length>0&&(Be=g.createElement(TI.Provider,{value:G},Be)),fn&&(Be=g.createElement(mb,{locale:fn,_ANT_MARK__:pb},Be)),Be=g.createElement(Fu.Provider,{value:st},Be),u&&(Be=g.createElement(aR,{size:u},Be)),Be=g.createElement(cR,null,Be),_e!=null&&_e.unique&&(Be=g.createElement($b,null,Be));const ge=g.useMemo(()=>{const{algorithm:de,token:we,components:Te,cssVar:ke,...Fe}=at||{},De=de&&(!Array.isArray(de)||de.length>0)?wa(de):Qh,ft={};Object.entries(Te||{}).forEach(([ht,Ct])=>{const mt={...Ct};"algorithm"in mt&&(mt.algorithm===!0?mt.theme=De:(Array.isArray(mt.algorithm)||Qt(mt.algorithm))&&(mt.theme=wa(mt.algorithm)),delete mt.algorithm),ft[ht]=mt});const Pt={...ui,...we};return{...Fe,theme:De,token:Pt,components:ft,override:{override:Pt,...ft},cssVar:ke}},[at]);return v&&(Be=g.createElement(Bu.Provider,{value:ge},Be)),Oe.warning&&(Be=g.createElement(zh.Provider,{value:Oe.warning},Be)),C!==void 0&&(Be=g.createElement(iR,{disabled:C},Be)),g.createElement(dt.Provider,{value:Oe},Be)},Sr=e=>{const t=g.useContext(dt),n=g.useContext(Uu);return g.createElement(mR,{parentContext:t,legacyLocale:n,...e})};Sr.ConfigContext=dt;Sr.SizeContext=xo;Sr.config=pR;Sr.useConfig=sR;Object.defineProperty(Sr,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&_u(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),xo)});process.env.NODE_ENV!=="production"&&(Sr.displayName="ConfigProvider");var gR={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function hc(){return hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hc.apply(this,arguments)}const hR=(e,t)=>g.createElement(Jt,hc({},e,{ref:t,icon:gR})),Ib=g.forwardRef(hR);process.env.NODE_ENV!=="production"&&(Ib.displayName="LoadingOutlined");function Rb(...e){return e.find(t=>t!==void 0)}const Pb=e=>{const{allowClear:t,clearIcon:n,contextAllowClear:r,contextClearIcon:o,defaultAllowClear:i,componentName:a}=e;return process.env.NODE_ENV!=="production"&&At(a).deprecated(!n,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}"),b.useMemo(()=>t??r??i?{clearIcon:Rb(rn(t)?t==null?void 0:t.clearIcon:n,rn(r)?r==null?void 0:r.clearIcon:o,b.createElement(sb,null)),disabled:(rn(t)?t==null?void 0:t.disabled:void 0)??(rn(r)?r==null?void 0:r.disabled:void 0)}:!1,[t,n,r,o,i])},Ep=e=>e==="horizontal"||e==="vertical",Qu=(e,t,n)=>b.useMemo(()=>{const r=Ep(e);let o;return r?o=e:typeof t=="boolean"?o=t?"vertical":"horizontal":o=Ep(n)?n:"horizontal",[o,o==="vertical"]},[n,e,t]),as=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(as.displayName="ZIndexContext");const Jn=100,bR=10,xR=Jn*bR,yR=xR+Jn,Tb={Modal:Jn,Drawer:Jn,Popover:Jn,Popconfirm:Jn,Tooltip:Jn,Tour:Jn,FloatButton:Jn},wR={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},vR=e=>e in Tb,Zu=(e,t)=>{const[,n]=Cr(),r=b.useContext(as),o=vR(e);let i;if(t!==void 0)i=[t,t];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+Tb[e]:a+=wR[e],i=[r===void 0?t:a,a]}if(process.env.NODE_ENV!=="production"){const a=At(e),s=n.zIndexPopupBase+yR,l=i[0]||0;process.env.NODE_ENV!=="production"&&a(t!==void 0||l<=s,"usage","`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.")}return i},Ks=()=>({height:0,opacity:0}),$p=e=>({height:(e==null?void 0:e.scrollHeight)??0,opacity:e?1:0}),CR=e=>({height:(e==null?void 0:e.offsetHeight)??0}),Ys=(e,t)=>(t==null?void 0:t.deadline)===!0||lb(t)&&t.propertyName==="height",SR=(e=va)=>({motionName:`${e}-motion-collapse`,onAppearStart:Ks,onEnterStart:Ks,onAppearActive:$p,onEnterActive:$p,onLeaveStart:CR,onLeaveActive:Ks,onAppearEnd:Ys,onEnterEnd:Ys,onLeaveEnd:Ys,motionDeadline:500}),ER=(e,t,n)=>n!==void 0?n:`${e}-${t}`,$R=e=>{const{componentCls:t,colorPrimary:n,motionDurationSlow:r,motionEaseInOut:o,motionEaseOutCirc:i,antCls:a}=e,[,s]=ur(a,"wave");return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:s("color",n),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s","opacity 2s"].map(l=>`${l} ${i}`).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(l=>`${l} ${r} ${o}`).join(",")}}}}},kR=aI("Wave",$R),Nb=`${va}-wave-target`,kp=e=>e?br(e)&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/i.test(e)&&!/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i.test(e)&&e!=="transparent"&&e!=="canvastext":!1;function IR(e,t=null){const n=getComputedStyle(e),{borderTopColor:r,borderColor:o,backgroundColor:i}=n;return t&&kp(n[t])?n[t]:[r,o,i].find(kp)??null}function Qs(e){return Number.isNaN(e)?0:e}const RR=e=>{const{className:t,target:n,component:r,colorSource:o}=e,i=g.useRef(null),{getPrefixCls:a}=g.useContext(dt),s=a(),[l]=ur(s,"wave"),[c,u]=g.useState(null),[d,f]=g.useState([]),[p,h]=g.useState(0),[m,w]=g.useState(0),[y,$]=g.useState(0),[x,E]=g.useState(0),[v,C]=g.useState(!1),I={left:p,top:m,width:y,height:x,borderRadius:d.map(k=>`${k}px`).join(" ")};c&&(I[l("color")]=c);function N(){const k=getComputedStyle(n);u(IR(n,o));const R=k.position==="static",{borderLeftWidth:O,borderTopWidth:z}=k;h(R?n.offsetLeft:Qs(-Number.parseFloat(O))),w(R?n.offsetTop:Qs(-Number.parseFloat(z))),$(n.offsetWidth),E(n.offsetHeight);const{borderTopLeftRadius:D,borderTopRightRadius:M,borderBottomLeftRadius:L,borderBottomRightRadius:_}=k;f([D,M,_,L].map(V=>Qs(Number.parseFloat(V))))}if(g.useEffect(()=>{if(n){const k=xt(()=>{N(),C(!0)});let R;return typeof ResizeObserver<"u"&&(R=new ResizeObserver(N),R.observe(n)),()=>{xt.cancel(k),R==null||R.disconnect()}}},[n]),!v)return null;const A=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(Nb));return g.createElement(vr,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(k,R)=>{var O;if(R.deadline||lb(R)&&R.propertyName==="opacity"){const z=(O=i.current)==null?void 0:O.parentElement;W$(z).then(()=>{z==null||z.remove()})}return!1}},({className:k},R)=>g.createElement("div",{ref:Gn(i,R),className:Z(t,k,{"wave-quick":A}),style:I}))},PR=(e,t)=>{var o;const{component:n}=t;if(n==="Checkbox"&&!((o=e.querySelector("input"))!=null&&o.checked))return;const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",e==null||e.insertBefore(r,e==null?void 0:e.firstChild),V$(g.createElement(RR,{...t,target:e}),r)},TR=(e,t,n,r)=>{const{wave:o}=g.useContext(dt),[,i,a]=Cr(),s=Ge(u=>{const d=e.current;if(o!=null&&o.disabled||!d)return;const f=d.querySelector(`.${Nb}`)||d,{showEffect:p}=o||{};(p||PR)(f,{className:t,token:i,component:n,event:u,hashId:a,colorSource:r})}),l=g.useRef(null);return g.useEffect(()=>()=>{xt.cancel(l.current)},[]),u=>{xt.cancel(l.current),l.current=xt(()=>{s(u)})}},Ip={click:"click",mousedown:"mousedown",mouseup:"mouseup",pointerdown:"pointerdown",pointerup:"pointerup"},Mb=e=>{const{children:t,disabled:n,component:r,colorSource:o}=e,{getPrefixCls:i,wave:a}=b.useContext(dt),s=b.useRef(null),l=i("wave"),c=kR(l),u=TR(s,Z(l,c),r,o);if(b.useEffect(()=>{const f=s.current;if(!f||f.nodeType!==window.Node.ELEMENT_NODE||n)return;const p=w=>{!ku(w.target)||!f.getAttribute||f.getAttribute("disabled")||f.disabled||f.className.includes("disabled")&&!f.className.includes("disabled:")||f.getAttribute("aria-disabled")==="true"||f.className.includes("-leave")||u(w)},h=a==null?void 0:a.triggerType,m=h&&h in Ip?Ip[h]:"click";return f.addEventListener(m,p,!0),()=>{f.removeEventListener(m,p,!0)}},[n,a==null?void 0:a.triggerType]),!b.isValidElement(t))return t??null;const d=$o(t)?Gn(cr(t),s):s;return Dn(t,{ref:d})};process.env.NODE_ENV!=="production"&&(Mb.displayName="Wave");const To=e=>{const t=b.useContext(xo);return b.useMemo(()=>e?br(e)?e??t:Qt(e)?e(t):t:t,[e,t])},NR=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},MR=on(["Space","Compact"],NR,()=>({}),{resetStyle:!1}),ss=g.createContext(null),No=(e,t)=>{const n=g.useContext(ss),r=g.useMemo(()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return Z(`${e}-compact${s}item`,{[`${e}-compact${s}first-item`]:i,[`${e}-compact${s}last-item`]:a,[`${e}-compact${s}item-rtl`]:t==="rtl"})},[e,t,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},AR=e=>{const{children:t}=e;return g.createElement(ss.Provider,{value:null},t)},zR=e=>{const{children:t,...n}=e;return g.createElement(ss.Provider,{value:g.useMemo(()=>n,[n])},t)},Ab=g.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=g.useContext(dt),{size:o,direction:i,orientation:a,block:s,prefixCls:l,className:c,rootClassName:u,children:d,vertical:f,...p}=e;process.env.NODE_ENV!=="production"&&At("Space.Compact").deprecated(!i,"direction","orientation");const[h,m]=Qu(a,f,i),w=To(N=>o??N),y=n("space-compact",l),[$]=MR(y),x=Z(y,$,{[`${y}-rtl`]:r==="rtl",[`${y}-block`]:s,[`${y}-vertical`]:m},c,u),E=g.useContext(ss),v=g.useRef(null);g.useImperativeHandle(t,()=>({nativeElement:v.current}));const C=or(d),I=g.useMemo(()=>C.map((N,A)=>{const k=(N==null?void 0:N.key)||`${y}-item-${A}`;return g.createElement(zR,{key:k,compactSize:w,compactDirection:h,isFirstItem:A===0&&(!E||(E==null?void 0:E.isFirstItem)),isLastItem:A===C.length-1&&(!E||(E==null?void 0:E.isLastItem))},N)}),[C,E,h,w,y]);return C.length===0?null:g.createElement("div",{ref:v,className:x,...p},I)}),zb=g.createContext(void 0),OR=e=>{const{getPrefixCls:t,direction:n}=g.useContext(dt),{prefixCls:r,size:o,className:i,...a}=e,s=t("btn-group",r),[,,l]=Cr(),c=g.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]);if(process.env.NODE_ENV!=="production"){const d=At("Button.Group");d.deprecated(!1,"Button.Group","Space.Compact"),process.env.NODE_ENV!=="production"&&d(!o||["large","medium","small"].includes(o),"usage","Invalid prop `size`.")}const u=Z(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},i,l);return g.createElement(zb.Provider,{value:o},g.createElement("div",{...a,className:u}))},Rp=/^[\u4E00-\u9FA5]{2}$/,bc=Rp.test.bind(Rp);function Ui(e){return e==="text"||e==="link"}function DR(e,t,n,r){if(!yi(e))return;const o=t?" ":"";return!br(e)&&!os(e)&&br(e.type)&&bc(e.props.children)?Dn(e,i=>{const a=Z(i.className,r)||void 0,s={...n,...i.style};return{...i,children:i.children.split("").join(o),className:a,style:s}}):br(e)?b.createElement("span",{className:r,style:n},bc(e)?e.split("").join(o):e):Eb(e)?b.createElement("span",{className:r,style:n},e):Dn(e,i=>({...i,className:Z(i.className,r)||void 0,style:{...i.style,...n}}))}function LR(e,t,n,r){let o=!1;const i=[];return b.Children.forEach(e,a=>{const s=br(a)||os(a);if(o&&s){const l=i.length-1,c=i[l];i[l]=`${c}${a}`}else i.push(a);o=s}),b.Children.map(i,a=>DR(a,t,n,r))}["default","primary","danger"].concat(jr(xr));const Ob=b.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,a=Z(`${i}-icon`,n);return b.createElement("span",{ref:t,className:a,style:r},o)}),Pp=b.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,a=Z(`${n}-loading-icon`,r);return b.createElement(Ob,{prefixCls:n,className:a,style:o,ref:t},b.createElement(Ib,{className:i}))}),Zs=()=>({width:0,opacity:0,transform:"scale(0)"}),Js=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),FR=e=>{const{prefixCls:t,loading:n,existIcon:r,className:o,style:i,mount:a}=e,s=!!n;return r?b.createElement(Pp,{prefixCls:t,className:o,style:i}):b.createElement(vr,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Zs,onAppearActive:Js,onEnterStart:Zs,onEnterActive:Js,onLeaveStart:Js,onLeaveActive:Zs},({className:l,style:c},u)=>{const d={...i,...c};return b.createElement(Pp,{prefixCls:t,className:Z(o,l),style:d,ref:u})})},_R=e=>{const{componentCls:t,antCls:n,motionDurationMid:r,motionEaseInOut:o}=e;return{[t]:{[`${n}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(i=>`${i} ${r} ${o}`).join(", ")} !important`}},[`${n}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(i=>`${i} ${r} ${o}`).join(", ")} !important`}}}},Tp=e=>({animationDuration:e,animationFillMode:"both"}),ls=(e,t,n,r,o=!1)=>{const i=o?"&":"";return{[`
|
|
193
193
|
${i}${e}-enter,
|
|
194
194
|
${i}${e}-appear
|
|
195
|
-
`]:{...
|
|
195
|
+
`]:{...Tp(r),animationPlayState:"paused"},[`${i}${e}-leave`]:{...Tp(r),animationPlayState:"paused"},[`
|
|
196
196
|
${i}${e}-enter${e}-enter-active,
|
|
197
197
|
${i}${e}-appear${e}-appear-active
|
|
198
|
-
`]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},
|
|
198
|
+
`]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},jR=new et("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),BR=new et("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),HR=(e,t=!1)=>{const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return[ls(r,jR,BR,e.motionDurationMid,t),{[`
|
|
199
199
|
${o}${r}-enter,
|
|
200
200
|
${o}${r}-appear
|
|
201
|
-
`]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},
|
|
201
|
+
`]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},VR=new et("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),WR=new et("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),qR=new et("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),XR=new et("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),UR=new et("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),GR=new et("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),KR=new et("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),YR=new et("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),QR={"move-up":{inKeyframes:KR,outKeyframes:YR},"move-down":{inKeyframes:VR,outKeyframes:WR},"move-left":{inKeyframes:qR,outKeyframes:XR},"move-right":{inKeyframes:UR,outKeyframes:GR}},Np=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=QR[t];return[ls(r,o,i,e.motionDurationMid),{[`
|
|
202
202
|
${r}-enter,
|
|
203
203
|
${r}-appear
|
|
204
|
-
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},
|
|
204
|
+
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Db=new et("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Lb=new et("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Fb=new et("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),_b=new et("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),jb=new et("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),Bb=new et("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),Hb=new et("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Vb=new et("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),ZR={"slide-up":{inKeyframes:Db,outKeyframes:Lb},"slide-down":{inKeyframes:Fb,outKeyframes:_b},"slide-left":{inKeyframes:jb,outKeyframes:Bb},"slide-right":{inKeyframes:Hb,outKeyframes:Vb}},io=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=ZR[t];return[ls(r,o,i,e.motionDurationMid),{[`
|
|
205
205
|
${r}-enter,
|
|
206
206
|
${r}-appear
|
|
207
|
-
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},
|
|
207
|
+
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},JR=()=>({"@media (prefers-reduced-motion: reduce)":{"&, &::before, &::after":{transition:"none",animation:"none"}}}),eP=new et("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),tP=new et("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Mp=new et("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Ap=new et("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),nP=new et("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),rP=new et("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),oP=new et("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),iP=new et("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),aP=new et("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),sP=new et("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),lP=new et("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),cP=new et("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),uP={zoom:{inKeyframes:eP,outKeyframes:tP},"zoom-big":{inKeyframes:Mp,outKeyframes:Ap},"zoom-big-fast":{inKeyframes:Mp,outKeyframes:Ap},"zoom-left":{inKeyframes:oP,outKeyframes:iP},"zoom-right":{inKeyframes:aP,outKeyframes:sP},"zoom-up":{inKeyframes:nP,outKeyframes:rP},"zoom-down":{inKeyframes:lP,outKeyframes:cP}},Ju=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=uP[t];return[ls(r,o,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
|
|
208
208
|
${r}-enter,
|
|
209
209
|
${r}-appear
|
|
210
|
-
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Np=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),uP=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},Np(`${t}-primary`,o),Np(`${t}-danger`,i)]}},Js=e=>Math.round(Number(e||0)),dP=e=>{if(e instanceof Ve)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){const{b:t,...n}=e;return{...n,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e};class ir extends Ve{constructor(t){super(dP(t))}toHsbString(){const t=this.toHsb(),n=Js(t.s*100),r=Js(t.b*100),o=Js(t.h),i=t.a,a=`hsb(${o}, ${n}%, ${r}%)`,s=`hsba(${o}, ${n}%, ${r}%, ${i.toFixed(i===0?0:2)})`;return i===1?a:s}toHsb(){const{v:t,...n}=this.toHsv();return{...n,b:t,a:this.a}}}const fP="rc-color-picker",uo=e=>e instanceof ir?e:new ir(e),pP=uo("#1677ff"),Vb=e=>{const{offset:t,targetRef:n,containerRef:r,color:o,type:i}=e,{width:a,height:s}=r.current.getBoundingClientRect(),{width:l,height:c}=n.current.getBoundingClientRect(),u=l/2,d=c/2,f=(t.x+u)/a,p=1-(t.y+d)/s,h=o.toHsb(),m=f,w=(t.x+u)/a*360;if(i)switch(i){case"hue":return uo({...h,h:w<=0?0:w});case"alpha":return uo({...h,a:m<=0?0:m})}return uo({h:h.h,s:f<=0?0:f,b:p>=1?1:p,a:h.a})},Wb=(e,t)=>{const n=e.toHsb();switch(t){case"hue":return{x:n.h/360*100,y:50};case"alpha":return{x:e.a*100,y:50};default:return{x:n.s*100,y:(1-n.b)*100}}},mP=({color:e,prefixCls:t,className:n,style:r,innerClassName:o,innerStyle:i,onClick:a})=>{const s=`${t}-color-block`;return b.createElement("div",{className:Z(s,n),style:r,onClick:a},b.createElement("div",{className:Z(`${s}-inner`,o),style:{background:e,...i}}))};function gP(e){const t="touches"in e?e.touches[0]:e,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:t.pageX-n,pageY:t.pageY-r}}function qb(e){const{targetRef:t,containerRef:n,direction:r,onDragChange:o,onDragChangeComplete:i,calculate:a,color:s,disabledDrag:l}=e,[c,u]=b.useState({x:0,y:0}),d=b.useRef(null),f=b.useRef(null);b.useEffect(()=>{u(a())},[s]),b.useEffect(()=>()=>{document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),document.removeEventListener("touchmove",d.current),document.removeEventListener("touchend",f.current),d.current=null,f.current=null},[]);const p=y=>{const{pageX:$,pageY:x}=gP(y),{x:E,y:v,width:C,height:I}=n.current.getBoundingClientRect(),{width:N,height:M}=t.current.getBoundingClientRect(),k=N/2,R=M/2,O=Math.max(0,Math.min($-E,C))-k,A=Math.max(0,Math.min(x-v,I))-R,z={x:O,y:r==="x"?c.y:A};if(N===0&&M===0||N!==M)return!1;o==null||o(z)},h=y=>{y.preventDefault(),p(y)},m=y=>{y.preventDefault(),document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),document.removeEventListener("touchmove",d.current),document.removeEventListener("touchend",f.current),d.current=null,f.current=null,i==null||i()};return[c,y=>{document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),!l&&(p(y),document.addEventListener("mousemove",h),document.addEventListener("mouseup",m),document.addEventListener("touchmove",h),document.addEventListener("touchend",m),d.current=h,f.current=m)}]}const Xb=({size:e="default",color:t,prefixCls:n})=>b.createElement("div",{className:Z(`${n}-handler`,{[`${n}-handler-sm`]:e==="small"}),style:{backgroundColor:t}}),Ub=({children:e,style:t,prefixCls:n})=>b.createElement("div",{className:`${n}-palette`,style:{position:"relative",...t}},e),Gb=b.forwardRef((e,t)=>{const{children:n,x:r,y:o}=e;return b.createElement("div",{ref:t,style:{position:"absolute",left:`${r}%`,top:`${o}%`,zIndex:1,transform:"translate(-50%, -50%)"}},n)}),hP=({color:e,onChange:t,prefixCls:n,onChangeComplete:r,disabled:o})=>{const i=b.useRef(),a=b.useRef(),s=b.useRef(e),l=Ke(d=>{const f=Vb({offset:d,targetRef:a,containerRef:i,color:e});s.current=f,t(f)}),[c,u]=qb({color:e,containerRef:i,targetRef:a,calculate:()=>Wb(e),onDragChange:l,onDragChangeComplete:()=>r==null?void 0:r(s.current),disabledDrag:o});return b.createElement("div",{ref:i,className:`${n}-select`,onMouseDown:u,onTouchStart:u},b.createElement(Ub,{prefixCls:n},b.createElement(Gb,{x:c.x,y:c.y,ref:a},b.createElement(Xb,{color:e.toRgbString(),prefixCls:n})),b.createElement("div",{className:`${n}-saturation`,style:{backgroundColor:`hsl(${e.toHsb().h},100%, 50%)`,backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},bP=(e,t)=>{const[n,r]=un(e,t);return[b.useMemo(()=>uo(n),[n]),r]},xP=({colors:e,children:t,direction:n="to right",type:r,prefixCls:o})=>{const i=b.useMemo(()=>e.map((a,s)=>{let l=uo(a);return r==="alpha"&&s===e.length-1&&(l=new ir(l.setA(1))),l.toRgbString()}).join(","),[e,r]);return b.createElement("div",{className:`${o}-gradient`,style:{position:"absolute",inset:0,background:`linear-gradient(${n}, ${i})`}},t)},yP=e=>{const{prefixCls:t,colors:n,disabled:r,onChange:o,onChangeComplete:i,color:a,type:s}=e,l=b.useRef(null),c=b.useRef(null),u=b.useRef(a),d=y=>s==="hue"?y.getHue():y.a*100,f=Ke(y=>{const $=Vb({offset:y,targetRef:c,containerRef:l,color:a,type:s});u.current=$,o(d($))}),[p,h]=qb({color:a,targetRef:c,containerRef:l,calculate:()=>Wb(a,s),onDragChange:f,onDragChangeComplete(){i(d(u.current))},direction:"x",disabledDrag:r}),m=b.useMemo(()=>{if(s==="hue"){const y=a.toHsb();return y.s=1,y.b=1,y.a=1,new ir(y)}return a},[a,s]),w=b.useMemo(()=>n.map(y=>`${y.color} ${y.percent}%`),[n]);return b.createElement("div",{ref:l,className:Z(`${t}-slider`,`${t}-slider-${s}`),onMouseDown:h,onTouchStart:h},b.createElement(Ub,{prefixCls:t},b.createElement(Gb,{x:p.x,y:p.y,ref:c},b.createElement(Xb,{size:"small",color:m.toHexString(),prefixCls:t})),b.createElement(xP,{colors:w,type:s,prefixCls:t})))};function wP(e){return g.useMemo(()=>{const{slider:t}=e||{};return[t||yP]},[e])}function ti(){return ti=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ti.apply(this,arguments)}const vP=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],CP=b.forwardRef((e,t)=>{const{value:n,defaultValue:r,prefixCls:o=fP,onChange:i,onChangeComplete:a,className:s,style:l,panelRender:c,disabledAlpha:u=!1,disabled:d=!1,components:f}=e,[p]=wP(f),[h,m]=bP(r||pP,n),w=b.useMemo(()=>h.setA(1).toRgbString(),[h]),y=(R,O)=>{n||m(R),i==null||i(R,O)},$=R=>new ir(h.setHue(R)),x=R=>new ir(h.setA(R/100)),E=R=>{y($(R),{type:"hue",value:R})},v=R=>{y(x(R),{type:"alpha",value:R})},C=R=>{a&&a($(R))},I=R=>{a&&a(x(R))},N=Z(`${o}-panel`,s,{[`${o}-panel-disabled`]:d}),M={prefixCls:o,disabled:d,color:h},k=b.createElement(b.Fragment,null,b.createElement(hP,ti({onChange:y},M,{onChangeComplete:a})),b.createElement("div",{className:`${o}-slider-container`},b.createElement("div",{className:Z(`${o}-slider-group`,{[`${o}-slider-group-disabled-alpha`]:u})},b.createElement(p,ti({},M,{type:"hue",colors:vP,min:0,max:359,value:h.getHue(),onChange:E,onChangeComplete:C})),!u&&b.createElement(p,ti({},M,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:w}],min:0,max:100,value:h.a*100,onChange:v,onChangeComplete:I}))),b.createElement(mP,{color:h.toRgbString(),prefixCls:o})));return b.createElement("div",{className:N,style:l,ref:t},typeof c=="function"?c(k):k)});process.env.NODE_ENV!=="production"&&(CP.displayName="ColorPicker");const SP=(e,t)=>(e==null?void 0:e.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6))||"",EP=(e,t)=>e?SP(e,t):"";let bc=function(){function e(t){var r;if(ts(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)==null?void 0:r.map(o=>({color:new e(o.color),percent:o.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:o,percent:i})=>({color:new e(o),percent:i})),this.metaColor=new ir(this.colors[0].color.metaColor)):this.metaColor=new ir(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return ns(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return EP(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(o=>`${o.color.toRgbString()} ${o.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,o)=>{const i=n.colors[o];return r.percent===i.percent&&r.color.equals(i.color)}):this.toHexString()===n.toHexString()}}])}();var $P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function xc(){return xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xc.apply(this,arguments)}const kP=(e,t)=>g.createElement(Jt,xc({},e,{ref:t,icon:$P})),ka=g.forwardRef(kP);process.env.NODE_ENV!=="production"&&(ka.displayName="RightOutlined");const IP=e=>e instanceof bc?e:new bc(e),RP=(e,t)=>{const{r:n,g:r,b:o,a:i}=e.toRgb(),a=new ir(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},Kb=e=>{const{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return yt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},Yb=e=>{const t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??sa(t),i=e.contentLineHeightSM??sa(n),a=e.contentLineHeightLG??sa(r),s=RP(new bc(e.colorBgSolid),"#fff")?"#000":"#fff",l=xr.reduce((d,f)=>({...d,[`${f}ShadowColor`]:`0 ${xe(e.controlOutlineWidth)} 0 ${Xo(e[`${f}1`],e.colorBgContainer)}`}),{}),c=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...l,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:s,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:o,contentLineHeightSM:i,contentLineHeightLG:a,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*i)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*a)/2-e.lineWidth,0),defaultBgDisabled:c,dashedBgDisabled:u}},PP=e=>{const{componentCls:t,antCls:n,lineWidth:r,lineType:o}=e,[i,a]=ur(n,"btn");return{[t]:[{[i("border-width")]:r,[i("border-color")]:"#000",[i("border-color-hover")]:a("border-color"),[i("border-color-active")]:a("border-color"),[i("border-color-disabled")]:a("border-color"),[i("border-style")]:o,[i("text-color")]:"#000",[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color"),[i("text-color-disabled")]:a("text-color"),[i("bg-color")]:"#ddd",[i("bg-color-hover")]:a("bg-color"),[i("bg-color-active")]:a("bg-color"),[i("bg-color-disabled")]:e.colorBgContainerDisabled,[i("bg-color-container")]:e.colorBgContainer,[i("shadow")]:"none"},{border:[a("border-width"),a("border-style"),a("border-color")].join(" "),color:a("text-color"),backgroundColor:a("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a("border-width"),a("border-style"),a("border-color-hover")].join(" "),color:a("text-color-hover"),backgroundColor:a("bg-color-hover")},"&:active":{border:[a("border-width"),a("border-style"),a("border-color-active")].join(" "),color:a("text-color-active"),backgroundColor:a("bg-color-active")}}},{[`&${t}-variant-solid`]:{[i("solid-bg-color")]:a("color-base"),[i("solid-bg-color-hover")]:a("color-hover"),[i("solid-bg-color-active")]:a("color-active"),[i("border-color")]:"transparent",[i("text-color")]:e.colorTextLightSolid,[i("bg-color")]:a("solid-bg-color"),[i("bg-color-hover")]:a("solid-bg-color-hover"),[i("bg-color-active")]:a("solid-bg-color-active"),boxShadow:a("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("border-color")]:a("color-base"),[i("border-color-hover")]:a("color-hover"),[i("border-color-active")]:a("color-active"),[i("bg-color")]:a("bg-color-container"),[i("text-color")]:a("color-base"),[i("text-color-hover")]:a("color-hover"),[i("text-color-active")]:a("color-active"),boxShadow:a("shadow")},[`&${t}-variant-dashed`]:{[i("border-style")]:"dashed",[i("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i("border-color")]:"transparent",[i("text-color")]:a("color-base"),[i("bg-color")]:a("color-light"),[i("bg-color-hover")]:a("color-light-hover"),[i("bg-color-active")]:a("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[i("border-color")]:"transparent",[i("text-color")]:a("color-base"),[i("text-color-hover")]:a("color-hover"),[i("text-color-active")]:a("color-active"),[i("bg-color")]:"transparent",[i("bg-color-hover")]:"transparent",[i("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[i("bg-color-hover")]:a("color-light"),[i("bg-color-active")]:a("color-light-active")}},{[`&${t}-variant-link`]:{[i("color-base")]:e.colorLink,[i("color-hover")]:e.colorLinkHover,[i("color-active")]:e.colorLinkActive,[i("bg-color-hover")]:e.linkHoverBg},[`&${t}-color-primary`]:{[i("color-base")]:e.colorPrimary,[i("color-hover")]:e.colorPrimaryHover,[i("color-active")]:e.colorPrimaryActive,[i("color-light")]:e.colorPrimaryBg,[i("color-light-hover")]:e.colorPrimaryBgHover,[i("color-light-active")]:e.colorPrimaryBorder,[i("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[i("text-color")]:e.primaryColor,[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")}},[`&${t}-color-dangerous`]:{[i("color-base")]:e.colorError,[i("color-hover")]:e.colorErrorHover,[i("color-active")]:e.colorErrorActive,[i("color-light")]:e.colorErrorBg,[i("color-light-hover")]:e.colorErrorBgFilledHover,[i("color-light-active")]:e.colorErrorBgActive,[i("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[i("text-color")]:e.dangerColor,[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")}},[`&${t}-color-default`]:{[i("solid-bg-color")]:e.colorBgSolid,[i("solid-bg-color-hover")]:e.colorBgSolidHover,[i("solid-bg-color-active")]:e.colorBgSolidActive,[i("color-base")]:e.defaultBorderColor,[i("color-hover")]:e.defaultHoverBorderColor,[i("color-active")]:e.defaultActiveBorderColor,[i("color-light")]:e.colorFillTertiary,[i("color-light-hover")]:e.colorFillSecondary,[i("color-light-active")]:e.colorFill,[i("text-color")]:e.defaultColor,[i("text-color-hover")]:e.defaultHoverColor,[i("text-color-active")]:e.defaultActiveColor,[i("shadow")]:e.defaultShadow,[`&${t}-variant-outlined`]:{[i("bg-color-disabled")]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[i("text-color")]:e.solidTextColor,[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("text-color")]:e.defaultColor,[i("text-color-hover")]:e.defaultHoverColor,[i("text-color-active")]:e.defaultActiveColor,[i("bg-color-container")]:e.defaultBg,[i("bg-color-hover")]:e.defaultHoverBg,[i("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[i("text-color")]:e.textTextColor,[i("text-color-hover")]:e.textTextHoverColor,[i("text-color-active")]:e.textTextActiveColor,[i("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("text-color")]:e.defaultGhostColor,[i("border-color")]:e.defaultGhostBorderColor}}}},xr.map(s=>{const l=e[`${s}6`],c=e[`${s}1`],u=e[`${s}Hover`],d=e[`${s}2`],f=e[`${s}3`],p=e[`${s}Active`],h=e[`${s}ShadowColor`];return{[`&${t}-color-${s}`]:{[i("color-base")]:l,[i("color-hover")]:u,[i("color-active")]:p,[i("color-light")]:c,[i("color-light-hover")]:d,[i("color-light-active")]:f,[i("shadow")]:h}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:a("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[i("bg-color")]:e.ghostBg,[i("bg-color-hover")]:e.ghostBg,[i("bg-color-active")]:e.ghostBg,[i("shadow")]:"none",[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("bg-color-hover")]:e.ghostBg,[i("bg-color-active")]:e.ghostBg}}}]}},TP=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,iconGap:s,calc:l}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:s,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",...ZR(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:_u(),[`${t}-icon`]:{display:"inline-flex",alignItems:"center",[n]:{verticalAlign:"middle","&:before":{content:'"\\a0"',display:"inline-block",width:0}}},"> a":{color:"currentColor"},"&:not(:disabled)":Sa(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineEnd:l(s).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineStart:l(s).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},NP=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),Qu=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:o,height:r,padding:`${xe(l)} ${xe(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${t}`]:NP(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},MP=e=>{const t=yt(e,{fontSize:e.contentFontSize});return Qu(t,e.componentCls)},AP=e=>{const t=yt(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Qu(t,`${e.componentCls}-sm`)},zP=e=>{const t=yt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Qu(t,`${e.componentCls}-lg`)},OP=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},DP=on("Button",e=>{const t=Kb(e);return[TP(t),MP(t),AP(t),zP(t),OP(t),PP(t),uP(t)]},Yb,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function LP(e,t,n,r){const{focusElCls:o,focus:i,borderElCls:a}=n,s=a?"> *":"",l=s?` ${s}`:"",c=f=>f.filter(Boolean).map(p=>`&:${p}${l}`).join(","),u=c(["hover",o?`hover${o}`:null]),d=c([i?"focus":null,"active"]);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[d]:{zIndex:3},[u]:{zIndex:4},...o?{[`&${o}`]:{zIndex:3}}:{},[`&[disabled] ${s}`]:{zIndex:0}}}}function FP(e,t,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Zu(e,t={focus:!0}){const{componentCls:n}=e,{componentCls:r}=t,o=r||n,i=`${o}-compact`;return{[i]:{...LP(e,i,t,o),...FP(o,i,t)}}}function _P(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}}function jP(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function BP(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:{..._P(e,t,e.componentCls),...jP(e.componentCls,t)}}}const HP=e=>{const{antCls:t,componentCls:n,lineWidth:r,calc:o,colorBgContainer:i}=e,a=`${n}-variant-solid:not([disabled])`,s=o(r).mul(-1).equal(),[l,c]=ur(t,"btn"),u=d=>({[`${n}-compact${d?"-vertical":""}-item`]:{[l("compact-connect-border-color")]:c("bg-color-hover"),[`&${a}`]:{transition:"none",[`& + ${a}:before`]:[{position:"absolute",backgroundColor:c("compact-connect-border-color"),content:'""'},d?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:"none"}}}});return[u(),u(!0),{[`${a}${n}-color-default`]:{[l("compact-connect-border-color")]:`color-mix(in srgb, ${c("bg-color-hover")} 75%, ${i})`}}]},VP=aI(["Button","compact"],e=>{const t=Kb(e);return[Zu(t),BP(t),HP(t)]},Yb);function WP(e){if(rn(e)){let t=e==null?void 0:e.delay;return t=rs(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const qP={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},XP=b.forwardRef((e,t)=>{const{_skipSemantic:n,loading:r=!1,prefixCls:o,color:i,variant:a,type:s,danger:l=!1,shape:c,size:u,disabled:d,className:f,rootClassName:p,children:h,icon:m,iconPosition:w,iconPlacement:y,ghost:$=!1,block:x=!1,htmlType:E="button",classNames:v,styles:C,style:I,autoInsertSpace:N,autoFocus:M,...k}=e,R=or(h),O=s||"default",{getPrefixCls:A,direction:z,autoInsertSpace:D,className:L,style:j,classNames:V,styles:q,loadingIcon:P,shape:Q,color:X,variant:T}=Kn("button"),J=c||Q||"default",[F,G]=b.useMemo(()=>{if(i&&a)return[i,a];if(s||l){const _e=qP[O]||[];return l?["danger",_e[1]]:_e}return a==="solid"?["primary",a]:X&&T?[X,T]:T==="solid"?["primary",T]:["default","outlined"]},[i,a,s,l,X,T,O]),[re,_]=b.useMemo(()=>$&&G==="solid"?[F,"outlined"]:[F,G],[F,G,$]),H=re==="danger",te=H?"dangerous":re,oe=N??D??!0,B=A("btn",o),[ie,ae]=DP(B),Se=b.useContext(yr),ye=d??Se,U=b.useContext(Ab),me=b.useMemo(()=>WP(r),[r]),[he,se]=c$(me.loading),[ue,pe]=b.useState(!1),Ne=b.useRef(null),Ee=Hr(t,Ne),Ie=R.length===1&&!m&&!Xi(_),W=b.useRef(!0);b.useEffect(()=>(W.current=!1,()=>{W.current=!0}),[]),Bt(()=>{me.delay>0?se(!0,{ms:me.delay}):se(me.loading,!0)},[me.delay,me.loading]),b.useEffect(()=>{if(!Ne.current||!oe)return;const _e=Ne.current.textContent||"";Ie&&hc(_e)?ue||pe(!0):ue&&pe(!1)}),b.useEffect(()=>{var _e;M&&((_e=Ne.current)==null||_e.focus())},[]);const Y=b.useCallback(_e=>{var pt;if(he||ye){_e.preventDefault();return}(pt=e.onClick)==null||pt.call(e,("href"in e,_e))},[e.onClick,he,ye]);if(process.env.NODE_ENV!=="production"){const _e=At("Button");process.env.NODE_ENV!=="production"&&_e(!(typeof m=="string"&&m.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${m}\` at https://ant.design/components/icon`),process.env.NODE_ENV!=="production"&&_e(!($&&Xi(_)),"usage","`link` or `text` button can't be a `ghost` button."),_e.deprecated(!w,"iconPosition","iconPlacement")}const{compactSize:le,compactItemClassnames:be}=To(B,z),$e=Po(_e=>u??le??U??_e),ce=he?"loading":m,ne=y??w??"start",ve=Yt(k,["navigate"]),Re={...e,type:O,color:re,variant:_,danger:H,shape:J,size:$e,disabled:ye,loading:he,iconPlacement:ne},Ge=kt(j),Pe=kt(I),[ze,Me]=Pn([n?void 0:V,v],[n?void 0:q,Ge,C,Pe],{props:Re}),it=Z(B,ie,ae,{[`${B}-${J}`]:J!=="default"&&J!=="square"&&J,[`${B}-${O}`]:O,[`${B}-dangerous`]:l,[`${B}-color-${te}`]:te,[`${B}-variant-${_}`]:_,[`${B}-lg`]:$e==="large",[`${B}-sm`]:$e==="small",[`${B}-icon-only`]:!h&&h!==0&&!!ce,[`${B}-background-ghost`]:$&&!Xi(_),[`${B}-loading`]:he,[`${B}-two-chinese-chars`]:ue&&oe&&!he,[`${B}-block`]:x,[`${B}-rtl`]:z==="rtl",[`${B}-icon-end`]:ne==="end"},be,f,p,L,ze.root),Qe={className:ze.icon,style:Me.icon},It=_e=>b.createElement(zb,{prefixCls:B,...Qe},_e),wt=b.createElement(LR,{existIcon:!!m,prefixCls:B,loading:he,mount:W.current,...Qe}),Ot=rn(r)&&r.icon||P;let gt;m&&!he?gt=It(m):r&&Ot?gt=It(Ot):gt=wt;const _t=xi(h)?DR(h,Ie&&oe,Me.content,ze.content):null;if(ve.href!==void 0)return b.createElement("a",{...ve,className:Z(it,{[`${B}-disabled`]:ye}),href:ye?void 0:ve.href,style:Me.root,onClick:Y,ref:Ee,tabIndex:ye?-1:0,"aria-disabled":ye},gt,_t);let jt=b.createElement("button",{...k,type:E,className:it,style:Me.root,onClick:Y,disabled:ye,ref:Ee},gt,_t,be&&b.createElement(VP,{prefixCls:B}));return Xi(_)||(jt=b.createElement(Nb,{component:"Button",disabled:he},jt)),jt}),ar=XP;ar.Group=zR;ar.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(ar.displayName="Button");const zr="RC_FORM_INTERNAL_HOOKS",ot=()=>{tt(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},yo=g.createContext({getFieldValue:ot,getFieldsValue:ot,getFieldError:ot,getFieldWarning:ot,getFieldsError:ot,isFieldsTouched:ot,isFieldTouched:ot,isFieldValidating:ot,isFieldsValidating:ot,resetFields:ot,setFields:ot,setFieldValue:ot,setFieldsValue:ot,validateFields:ot,submit:ot,getInternalHooks:()=>(ot(),{dispatch:ot,initEntityValue:ot,registerField:ot,useSubscribe:ot,setInitialValues:ot,destroyForm:ot,setCallbacks:ot,registerWatch:ot,getFields:ot,setValidateMessages:ot,setPreserve:ot,getInitialValue:ot})}),Ia=g.createContext(null);function yc(e){return e==null?[]:Array.isArray(e)?e:[e]}function UP(e){return e&&!!e._init}function wc(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone(){const e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}const el=wc(),GP=/%[sdj%]/g;let Qb=()=>{};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(Qb=(e,t)=>{typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&t.every(n=>typeof n=="string")&&console.warn(e,t)});function vc(e){if(!e||!e.length)return null;const t={};return e.forEach(n=>{const r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function yn(e,...t){let n=0;const r=t.length;return typeof e=="function"?e.apply(null,t):typeof e=="string"?e.replace(GP,i=>{if(i==="%%")return"%";if(n>=r)return i;switch(i){case"%s":return String(t[n++]);case"%d":return Number(t[n++]);case"%j":try{return JSON.stringify(t[n++])}catch{return"[Circular]"}break;default:return i}}):e}function KP(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function zt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||KP(t)&&typeof e=="string"&&!e)}function YP(e,t,n){const r=[];let o=0;const i=e.length;function a(s){r.push(...s||[]),o++,o===i&&n(r)}e.forEach(s=>{t(s,a)})}function Mp(e,t,n){let r=0;const o=e.length;function i(a){if(a&&a.length){n(a);return}const s=r;r=r+1,s<o?t(e[s],i):n([])}i([])}function QP(e){const t=[];return Object.keys(e).forEach(n=>{t.push(...e[n]||[])}),t}class Ap extends Error{constructor(n,r){super("Async Validation Error");ee(this,"errors");ee(this,"fields");this.errors=n,this.fields=r}}function ZP(e,t,n,r,o){if(t.first){const d=new Promise((f,p)=>{const h=w=>(r(w),w.length?p(new Ap(w,vc(w))):f(o)),m=QP(e);Mp(m,n,h)});return d.catch(f=>f),d}const i=t.firstFields===!0?Object.keys(e):t.firstFields||[],a=Object.keys(e),s=a.length;let l=0;const c=[],u=new Promise((d,f)=>{const p=h=>{if(c.push.apply(c,h),l++,l===s)return r(c),c.length?f(new Ap(c,vc(c))):d(o)};a.length||(r(c),d(o)),a.forEach(h=>{const m=e[h];i.indexOf(h)!==-1?Mp(m,n,p):YP(m,n,p)})});return u.catch(d=>d),u}function JP(e){return!!(e&&e.message!==void 0)}function eT(e,t){let n=e;for(let r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function zp(e,t){return n=>{let r;return e.fullFields?r=eT(t,e.fullFields):r=t[n.field||e.fullField],JP(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function Op(e,t){if(t){for(const n in t)if(t.hasOwnProperty(n)){const r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]={...e[n],...r}:e[n]=r}}return e}const Kr="enum",tT=(e,t,n,r,o)=>{e[Kr]=Array.isArray(e[Kr])?e[Kr]:[],e[Kr].indexOf(t)===-1&&r.push(yn(o.messages[Kr],e.fullField,e[Kr].join(", ")))},nT=(e,t,n,r,o)=>{e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(yn(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern=="string"&&(new RegExp(e.pattern).test(t)||r.push(yn(o.messages.pattern.mismatch,e.fullField,t,e.pattern))))},rT=(e,t,n,r,o)=>{const i=typeof e.len=="number",a=typeof e.min=="number",s=typeof e.max=="number",l=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let c=t,u=null;const d=typeof t=="number",f=typeof t=="string",p=Array.isArray(t);if(d?u="number":f?u="string":p&&(u="array"),!u)return!1;p&&(c=t.length),f&&(c=t.replace(l,"_").length),i?c!==e.len&&r.push(yn(o.messages[u].len,e.fullField,e.len)):a&&!s&&c<e.min?r.push(yn(o.messages[u].min,e.fullField,e.min)):s&&!a&&c>e.max?r.push(yn(o.messages[u].max,e.fullField,e.max)):a&&s&&(c<e.min||c>e.max)&&r.push(yn(o.messages[u].range,e.fullField,e.min,e.max))},Zb=(e,t,n,r,o,i)=>{e.required&&(!n.hasOwnProperty(e.field)||zt(t,i||e.type))&&r.push(yn(o.messages.required,e.fullField))};let Ui;const oT=()=>{if(Ui)return Ui;const e="[a-fA-F\\d:]",t=v=>v&&v.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|$))`:"",n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",a=`(?:${[`(?:${r}:){7}(?:${r}|:)`,`(?:${r}:){6}(?:${n}|:${r}|:)`,`(?:${r}:){5}(?::${n}|(?::${r}){1,2}|:)`,`(?:${r}:){4}(?:(?::${r}){0,1}:${n}|(?::${r}){1,3}|:)`,`(?:${r}:){3}(?:(?::${r}){0,2}:${n}|(?::${r}){1,4}|:)`,`(?:${r}:){2}(?:(?::${r}){0,3}:${n}|(?::${r}){1,5}|:)`,`(?:${r}:){1}(?:(?::${r}){0,4}:${n}|(?::${r}){1,6}|:)`,`(?::(?:(?::${r}){0,5}:${n}|(?::${r}){1,7}|:))`].join("|")})(?:%[0-9a-zA-Z]{1,})?`,s=new RegExp(`(?:^${n}$)|(?:^${a}$)`),l=new RegExp(`^${n}$`),c=new RegExp(`^${a}$`),u=v=>v&&v.exact?s:new RegExp(`(?:${t(v)}${n}${t(v)})|(?:${t(v)}${a}${t(v)})`,"g");u.v4=v=>v&&v.exact?l:new RegExp(`${t(v)}${n}${t(v)}`,"g"),u.v6=v=>v&&v.exact?c:new RegExp(`${t(v)}${a}${t(v)}`,"g");const d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,h=u.v6().source,E=`(?:${d}|www\\.)${f}(?:localhost|${p}|${h}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return Ui=new RegExp(`(?:^${E}$)`,"i"),Ui},tl={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Uo={integer(e){return Uo.number(e)&&parseInt(e,10)===e},float(e){return Uo.number(e)&&!Uo.integer(e)},array(e){return Array.isArray(e)},regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number(e){return isNaN(e)?!1:typeof e=="number"},object(e){return typeof e=="object"&&!Uo.array(e)},method(e){return typeof e=="function"},email(e){return typeof e=="string"&&e.length<=320&&!!e.match(tl.email)},tel(e){return typeof e=="string"&&e.length<=32&&!!e.match(tl.tel)},url(e){return typeof e=="string"&&e.length<=2048&&!!e.match(oT())},hex(e){return typeof e=="string"&&!!e.match(tl.hex)}},iT=(e,t,n,r,o)=>{if(e.required&&t===void 0){Zb(e,t,n,r,o);return}const i=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],a=e.type;i.indexOf(a)>-1?Uo[a](t)||r.push(yn(o.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(yn(o.messages.types[a],e.fullField,e.type))},aT=(e,t,n,r,o)=>{(/^\s+$/.test(t)||t==="")&&r.push(yn(o.messages.whitespace,e.fullField))},Ue={required:Zb,whitespace:aT,type:iT,range:rT,enum:tT,pattern:nT},sT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Ue.required(e,t,r,i,o)}n(i)},lT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();Ue.required(e,t,r,i,o,"array"),t!=null&&(Ue.type(e,t,r,i,o),Ue.range(e,t,r,i,o))}n(i)},cT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Ue.required(e,t,r,i,o),t!==void 0&&Ue.type(e,t,r,i,o)}n(i)},uT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"date")&&!e.required)return n();if(Ue.required(e,t,r,i,o),!zt(t,"date")){let s;t instanceof Date?s=t:s=new Date(t),Ue.type(e,s,r,i,o),s&&Ue.range(e,s.getTime(),r,i,o)}}n(i)},dT="enum",fT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Ue.required(e,t,r,i,o),t!==void 0&&Ue[dT](e,t,r,i,o)}n(i)},pT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Ue.required(e,t,r,i,o),t!==void 0&&(Ue.type(e,t,r,i,o),Ue.range(e,t,r,i,o))}n(i)},mT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Ue.required(e,t,r,i,o),t!==void 0&&(Ue.type(e,t,r,i,o),Ue.range(e,t,r,i,o))}n(i)},gT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Ue.required(e,t,r,i,o),t!==void 0&&Ue.type(e,t,r,i,o)}n(i)},hT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===""&&(t=void 0),zt(t)&&!e.required)return n();Ue.required(e,t,r,i,o),t!==void 0&&(Ue.type(e,t,r,i,o),Ue.range(e,t,r,i,o))}n(i)},bT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Ue.required(e,t,r,i,o),t!==void 0&&Ue.type(e,t,r,i,o)}n(i)},xT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"string")&&!e.required)return n();Ue.required(e,t,r,i,o),zt(t,"string")||Ue.pattern(e,t,r,i,o)}n(i)},yT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Ue.required(e,t,r,i,o),zt(t)||Ue.type(e,t,r,i,o)}n(i)},wT=(e,t,n,r,o)=>{const i=[],a=Array.isArray(t)?"array":typeof t;Ue.required(e,t,r,i,o,a),n(i)},vT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"string")&&!e.required)return n();Ue.required(e,t,r,i,o,"string"),zt(t,"string")||(Ue.type(e,t,r,i,o),Ue.range(e,t,r,i,o),Ue.pattern(e,t,r,i,o),e.whitespace===!0&&Ue.whitespace(e,t,r,i,o))}n(i)},Gi=(e,t,n,r,o)=>{const i=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,i)&&!e.required)return n();Ue.required(e,t,r,a,o,i),zt(t,i)||Ue.type(e,t,r,a,o)}n(a)},_o={string:vT,method:gT,number:hT,boolean:cT,regexp:yT,integer:mT,float:pT,array:lT,object:bT,enum:fT,pattern:xT,date:uT,url:Gi,hex:Gi,email:Gi,tel:Gi,required:wT,any:sT},mr=class mr{constructor(t){ee(this,"rules",null);ee(this,"_messages",el);this.define(t)}define(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(n=>{const r=t[n];this.rules[n]=Array.isArray(r)?r:[r]})}messages(t){return t&&(this._messages=Op(wc(),t)),this._messages}validate(t,n={},r=()=>{}){let o=t,i=n,a=r;if(typeof i=="function"&&(a=i,i={}),!this.rules||Object.keys(this.rules).length===0)return a&&a(null,o),Promise.resolve(o);function s(d){let f=[],p={};function h(m){Array.isArray(m)?f=f.concat(...m):f.push(m)}for(let m=0;m<d.length;m++)h(d[m]);f.length?(p=vc(f),a(f,p)):a(null,o)}if(i.messages){let d=this.messages();d===el&&(d=wc()),Op(d,i.messages),i.messages=d}else i.messages=this.messages();const l={};(i.keys||Object.keys(this.rules)).forEach(d=>{const f=this.rules[d];let p=o[d];f.forEach(h=>{let m=h;typeof m.transform=="function"&&(o===t&&(o={...o}),p=o[d]=m.transform(p),p!=null&&(m.type=m.type||(Array.isArray(p)?"array":typeof p))),typeof m=="function"?m={validator:m}:m={...m},m.validator=this.getValidationMethod(m),m.validator&&(m.field=d,m.fullField=m.fullField||d,m.type=this.getType(m),l[d]=l[d]||[],l[d].push({rule:m,value:p,source:o,field:d}))})});const u={};return ZP(l,i,(d,f)=>{var $;const p=d.rule;let h=(p.type==="object"||p.type==="array")&&(typeof p.fields=="object"||typeof p.defaultField=="object");h=h&&(p.required||!p.required&&d.value),p.field=d.field;function m(x,E){return{...E,fullField:`${p.fullField}.${x}`,fullFields:p.fullFields?[...p.fullFields,x]:[x]}}function w(x=[]){let E=Array.isArray(x)?x:[x];!i.suppressWarning&&E.length&&mr.warning("async-validator:",E),E.length&&p.message!==void 0&&p.message!==null&&(E=[].concat(p.message));let v=E.map(zp(p,o));if(i.first&&v.length)return u[p.field]=1,f(v);if(!h)f(v);else{if(p.required&&!d.value)return p.message!==void 0?v=[].concat(p.message).map(zp(p,o)):i.error&&(v=[i.error(p,yn(i.messages.required,p.field))]),f(v);let C={};p.defaultField&&Object.keys(d.value).map(M=>{C[M]=p.defaultField}),C={...C,...d.rule.fields};const I={};Object.keys(C).forEach(M=>{const k=C[M],R=Array.isArray(k)?k:[k];I[M]=R.map(m.bind(null,M))});const N=new mr(I);N.messages(i.messages),d.rule.options&&(d.rule.options.messages=i.messages,d.rule.options.error=i.error),N.validate(d.value,d.rule.options||i,M=>{const k=[];v&&v.length&&k.push(...v),M&&M.length&&k.push(...M),f(k.length?k:null)})}}let y;if(p.asyncValidator)y=p.asyncValidator(p,d.value,w,d.source,i);else if(p.validator){try{y=p.validator(p,d.value,w,d.source,i)}catch(x){($=console.error)==null||$.call(console,x),i.suppressValidatorError||setTimeout(()=>{throw x},0),w(x.message)}y===!0?w():y===!1?w(typeof p.message=="function"?p.message(p.fullField||p.field):p.message||`${p.fullField||p.field} fails`):y instanceof Array?w(y):y instanceof Error&&w(y.message)}y&&y.then&&y.then(()=>w(),x=>w(x))},d=>{s(d)},o)}getType(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!_o.hasOwnProperty(t.type))throw new Error(yn("Unknown rule type %s",t.type));return t.type||"string"}getValidationMethod(t){if(typeof t.validator=="function")return t.validator;const n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?_o.required:_o[this.getType(t)]||void 0}};ee(mr,"register",function(n,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");_o[n]=r}),ee(mr,"warning",Qb),ee(mr,"messages",el),ee(mr,"validators",_o);let Cc=mr;const sn="'${name}' is not a valid ${type}",Jb={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:sn,method:sn,array:sn,object:sn,number:sn,date:sn,boolean:sn,integer:sn,float:sn,regexp:sn,email:sn,tel:sn,url:sn,hex:sn},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Dp=Cc;function CT(e,t){return e.replace(/\\?\$\{\w+\}/g,n=>{if(n.startsWith("\\"))return n.slice(1);const r=n.slice(2,-1);return t[r]})}const Lp="CODE_LOGIC_ERROR";async function Sc(e,t,n,r,o){const i={...n};if(delete i.ruleIndex,Dp.warning=()=>{},i.validator){const f=i.validator;i.validator=(...p)=>{try{return f(...p)}catch(h){return console.error(h),Promise.reject(Lp)}}}let a=null;i&&i.type==="array"&&i.defaultField&&(a=i.defaultField,delete i.defaultField);const s=new Dp({[e]:[i]}),l=oo(Jb,r.validateMessages);s.messages(l);let c=[];try{await Promise.resolve(s.validate({[e]:t},{...r}))}catch(f){f.errors&&(c=f.errors.map(({message:p},h)=>{const m=p===Lp?l.default:p;return g.isValidElement(m)?g.cloneElement(m,{key:`error_${h}`}):m}))}if(!c.length&&a&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((p,h)=>Sc(`${e}.${h}`,p,a,r,o)))).reduce((p,h)=>[...p,...h],[]);const u={...n,name:e,enum:(n.enum||[]).join(", "),...o};return c.map(f=>typeof f=="string"?CT(f,u):f)}function ST(e,t,n,r,o,i){const a=e.join("."),s=n.map((c,u)=>{const d=c.validator,f={...c,ruleIndex:u};return d&&(f.validator=(p,h,m)=>{let w=!1;const $=d(p,h,(...x)=>{Promise.resolve().then(()=>{tt(!w,"Your validator function has already return a promise. `callback` will be ignored."),w||m(...x)})});w=$&&typeof $.then=="function"&&typeof $.catch=="function",tt(w,"`callback` is deprecated. Please return a promise instead."),w&&$.then(()=>{m()}).catch(x=>{m(x||" ")})}),f}).sort(({warningOnly:c,ruleIndex:u},{warningOnly:d,ruleIndex:f})=>!!c==!!d?u-f:c?1:-1);let l;if(o===!0)l=new Promise(async(c,u)=>{for(let d=0;d<s.length;d+=1){const f=s[d],p=await Sc(a,t,f,r,i);if(p.length){u([{errors:p,rule:f}]);return}}c([])});else{const c=s.map(u=>Sc(a,t,u,r,i).then(d=>({errors:d,rule:u})));l=(o?$T(c):ET(c)).then(u=>Promise.reject(u))}return l.catch(c=>c),l}async function ET(e){return Promise.all(e).then(t=>[].concat(...t))}async function $T(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(o=>{o.errors.length&&n([o]),t+=1,t===e.length&&n([])})})})}function bt(e){return yc(e)}function Fp(e,t){let n={};return t.forEach(r=>{const o=In(e,r);n=xn(n,r,o)}),n}function fo(e,t,n=!1){return e&&e.some(r=>Ra(t,r,n))}function Ra(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((r,o)=>e[o]===r)}function kT(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(i=>{const a=e[i],s=t[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function IT(e,...t){const n=t[0];return n&&n.target&&typeof n.target=="object"&&e in n.target?n.target[e]:n}function _p(e,t,n){const{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;const o=e[t],i=t-n;return i>0?[...e.slice(0,n),o,...e.slice(n,t),...e.slice(t+1,r)]:i<0?[...e.slice(0,t),...e.slice(t+1,n+1),o,...e.slice(n+1,r)]:e}const ex=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)};class RT{constructor(t){ee(this,"namePathList",[]);ee(this,"taskId",0);ee(this,"watcherList",new Set);ee(this,"form");this.form=t}register(t){return this.watcherList.add(t),()=>{this.watcherList.delete(t)}}notify(t){t.forEach(n=>{this.namePathList.every(r=>!Ra(r,n))&&this.namePathList.push(n)}),this.doBatch()}doBatch(){this.taskId+=1;const t=this.taskId;ex(()=>{if(t===this.taskId&&this.watcherList.size){const n=this.form.getForm(),r=n.getFieldsValue(),o=n.getFieldsValue(!0);this.watcherList.forEach(i=>{i(r,o,this.namePathList)}),this.namePathList=[]}})}}async function PT(){return new Promise(e=>{ex(()=>{xt(()=>{e()})})})}function Ec(){return Ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ec.apply(this,arguments)}const Ir=[],jo=[];function nl(e,t,n,r,o,i){return typeof e=="function"?e(t,n,"source"in i?{source:i.source}:{}):r!==o}class tx extends g.PureComponent{constructor(n){super(n);ee(this,"state",{resetCount:0});ee(this,"cancelRegisterFunc",null);ee(this,"mounted",!1);ee(this,"touched",!1);ee(this,"dirty",!1);ee(this,"validatePromise");ee(this,"prevValidating");ee(this,"errors",Ir);ee(this,"warnings",jo);ee(this,"cancelRegister",()=>{const{preserve:n,isListField:r,name:o}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(r,n,bt(o)),this.cancelRegisterFunc=null});ee(this,"getNamePath",()=>{const{name:n,fieldContext:r}=this.props,{prefixName:o=[]}=r;return n!==void 0?[...o,...n]:[]});ee(this,"getRules",()=>{const{rules:n=[],fieldContext:r}=this.props;return n.map(o=>typeof o=="function"?o(r):o)});ee(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:n})=>({resetCount:n+1}))});ee(this,"metaCache",null);ee(this,"triggerMetaEvent",n=>{const{onMetaChange:r}=this.props;if(r){const o={...this.getMeta(),destroy:n};ii(this.metaCache,o)||r(o),this.metaCache=o}else this.metaCache=null});ee(this,"onStoreChange",(n,r,o)=>{const{shouldUpdate:i,dependencies:a=[],onReset:s}=this.props,{store:l}=o,c=this.getNamePath(),u=this.getValue(n),d=this.getValue(l),f=r&&fo(r,c);switch(o.type==="valueUpdate"&&o.source==="external"&&!ii(u,d)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=Ir,this.warnings=jo,this.triggerMetaEvent()),o.type){case"reset":if(!r||f){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=Ir,this.warnings=jo,this.triggerMetaEvent(),s==null||s(),this.refresh();return}break;case"remove":{if(i&&nl(i,n,l,u,d,o)){this.reRender();return}break}case"setField":{const{data:p}=o;if(f){"touched"in p&&(this.touched=p.touched),"validating"in p&&!("originRCField"in p)&&(this.validatePromise=p.validating?Promise.resolve([]):null),"errors"in p&&(this.errors=p.errors||Ir),"warnings"in p&&(this.warnings=p.warnings||jo),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in p&&fo(r,c,!0)){this.reRender();return}if(i&&!c.length&&nl(i,n,l,u,d,o)){this.reRender();return}break}case"dependenciesUpdate":{if(a.map(bt).some(h=>fo(o.relatedFields,h))){this.reRender();return}break}default:if(f||(!a.length||c.length||i)&&nl(i,n,l,u,d,o)){this.reRender();return}break}i===!0&&this.reRender()});ee(this,"validateRules",n=>{const r=this.getNamePath(),o=this.getValue(),{triggerName:i,validateOnly:a=!1,delayFrame:s}=n||{},l=Promise.resolve().then(async()=>{if(!this.mounted)return[];const{validateFirst:c=!1,messageVariables:u,validateDebounce:d}=this.props;s&&await PT();let f=this.getRules();if(i&&(f=f.filter(h=>h).filter(h=>{const{validateTrigger:m}=h;return m?yc(m).includes(i):!0})),d&&i&&(await new Promise(h=>{setTimeout(h,d)}),this.validatePromise!==l))return[];const p=ST(r,o,f,n,c,u);return p.catch(h=>h).then((h=Ir)=>{var m;if(this.validatePromise===l){this.validatePromise=null;const w=[],y=[];(m=h.forEach)==null||m.call(h,({rule:{warningOnly:$},errors:x=Ir})=>{$?y.push(...x):w.push(...x)}),this.errors=w,this.warnings=y,this.triggerMetaEvent(),this.reRender()}}),p});return a||(this.validatePromise=l,this.dirty=!0,this.errors=Ir,this.warnings=jo,this.triggerMetaEvent(),this.reRender()),l});ee(this,"isFieldValidating",()=>!!this.validatePromise);ee(this,"isFieldTouched",()=>this.touched);ee(this,"isFieldDirty",()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;const{fieldContext:n}=this.props,{getInitialValue:r}=n.getInternalHooks(zr);return r(this.getNamePath())!==void 0});ee(this,"getErrors",()=>this.errors);ee(this,"getWarnings",()=>this.warnings);ee(this,"isListField",()=>this.props.isListField);ee(this,"isList",()=>this.props.isList);ee(this,"isPreserve",()=>this.props.preserve);ee(this,"getMeta",()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null}));ee(this,"getOnlyChild",n=>{if(typeof n=="function"){const o=this.getMeta();return{...this.getOnlyChild(n(this.getControlled(),o,this.props.fieldContext)),isFunction:!0}}const r=or(n);return r.length!==1||!g.isValidElement(r[0])?{child:r,isFunction:!1}:{child:r[0],isFunction:!1}});ee(this,"getValue",n=>{const{getFieldsValue:r}=this.props.fieldContext,o=this.getNamePath();return In(n||r(!0),o)});ee(this,"getControlled",(n={})=>{const{name:r,trigger:o="onChange",validateTrigger:i,getValueFromEvent:a,normalize:s,valuePropName:l="value",getValueProps:c,fieldContext:u}=this.props,d=i!==void 0?i:u.validateTrigger,f=this.getNamePath(),{getInternalHooks:p,getFieldsValue:h}=u,{dispatch:m}=p(zr),w=this.getValue(),y=c||(C=>({[l]:C})),$=n[o],x=r!==void 0?y(w):{};process.env.NODE_ENV!=="production"&&x&&Object.keys(x).forEach(C=>{tt(typeof x[C]!="function",`It's not recommended to generate dynamic function prop by \`getValueProps\`. Please pass it to child component directly (prop: ${C})`)});const E={...n,...x};return E[o]=(...C)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();const I=this.getValue();let N;a?N=a(...C):N=IT(l,...C),s&&(N=s(N,I,h(!0))),N!==I&&m({type:"updateValue",namePath:f,value:N}),$&&$(...C)},yc(d||[]).forEach(C=>{const I=E[C];E[C]=(...N)=>{I&&I(...N);const{rules:M}=this.props;M&&M.length&&m({type:"validateField",namePath:f,triggerName:C})}}),E});if(n.fieldContext){const{getInternalHooks:r}=n.fieldContext,{initEntityValue:o}=r(zr);o(this)}}componentDidMount(){const{shouldUpdate:n,fieldContext:r}=this.props;if(this.mounted=!0,r){const{getInternalHooks:o}=r,{registerField:i}=o(zr);this.cancelRegisterFunc=i(this)}n===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}reRender(){this.mounted&&this.forceUpdate()}render(){const{resetCount:n}=this.state,{children:r}=this.props,{child:o,isFunction:i}=this.getOnlyChild(r);let a;return i?a=o:g.isValidElement(o)?a=g.cloneElement(o,this.getControlled(o.props)):(tt(!o,"`children` of Field is not validate ReactElement."),a=o),g.createElement(g.Fragment,{key:n},a)}}ee(tx,"contextType",yo);function nx({name:e,...t}){const n=g.useContext(yo),r=g.useContext(Ia),o=e!==void 0?bt(e):void 0,i=t.isListField??!!r;let a="keep";return i||(a=`_${(o||[]).join("_")}`),process.env.NODE_ENV!=="production"&&t.preserve===!1&&i&&o.length<=1&&tt(!1,"`preserve` should not apply on Form.List fields."),g.createElement(tx,Ec({key:a,name:o,isListField:i},t,{fieldContext:n}))}function TT({name:e,initialValue:t,children:n,rules:r,validateTrigger:o,isListField:i}){const a=g.useContext(yo),s=g.useContext(Ia),c=g.useRef({keys:[],id:0}).current,u=g.useMemo(()=>[...bt(a.prefixName)||[],...bt(e)],[a.prefixName,e]),d=g.useMemo(()=>({...a,prefixName:u}),[a,u]),f=g.useMemo(()=>({getKey:h=>{const m=u.length,w=h[m];return[c.keys[w],h.slice(m+1)]}}),[c,u]);if(typeof n!="function")return tt(!1,"Form.List only accepts function as children."),null;const p=(h,m,{source:w})=>w==="internal"?!1:h!==m;return g.createElement(Ia.Provider,{value:f},g.createElement(yo.Provider,{value:d},g.createElement(nx,{name:[],shouldUpdate:p,rules:r,validateTrigger:o,initialValue:t,isList:!0,isListField:i??!!s},({value:h=[],onChange:m},w)=>{const{getFieldValue:y}=a,$=()=>y(u||[])||[],x={add:(v,C)=>{const I=$();C>=0&&C<=I.length?(c.keys=[...c.keys.slice(0,C),c.id,...c.keys.slice(C)],m([...I.slice(0,C),v,...I.slice(C)])):(process.env.NODE_ENV!=="production"&&(C<0||C>I.length)&&tt(!1,"The second parameter of the add function should be a valid positive number."),c.keys=[...c.keys,c.id],m([...I,v])),c.id+=1},remove:v=>{const C=$(),I=new Set(Array.isArray(v)?v:[v]);I.size<=0||(c.keys=c.keys.filter((N,M)=>!I.has(M)),m(C.filter((N,M)=>!I.has(M))))},move(v,C){if(v===C)return;const I=$();v<0||v>=I.length||C<0||C>=I.length||(c.keys=_p(c.keys,v,C),m(_p(I,v,C)))}};let E=h||[];return Array.isArray(E)||(E=[],process.env.NODE_ENV!=="production"&&tt(!1,`Current value of '${u.join(" > ")}' is not an array type.`)),n(E.map((v,C)=>{let I=c.keys[C];return I===void 0&&(c.keys[C]=c.id,I=c.keys[C],c.id+=1),{name:C,key:I,isListField:!0}}),x,w)})))}function NT(e){let t=!1,n=e.length;const r=[];return e.length?new Promise((o,i)=>{e.forEach((a,s)=>{a.catch(l=>(t=!0,l)).then(l=>{n-=1,r[s]=l,!(n>0)&&(t&&i(r),o(r))})})}):Promise.resolve([])}const $c="__@field_split__";function Ki(e){return e.map(t=>`${typeof t}:${t}`).join($c)}class Yr{constructor(){ee(this,"kvs",new Map)}set(t,n){this.kvs.set(Ki(t),n)}get(t){return this.kvs.get(Ki(t))}getAsPrefix(t){const n=Ki(t),r=n+$c,o=[],i=this.kvs.get(n);return i!==void 0&&o.push(i),this.kvs.forEach((a,s)=>{s.startsWith(r)&&o.push(a)}),o}update(t,n){const r=this.get(t),o=n(r);o?this.set(t,o):this.delete(t)}delete(t){this.kvs.delete(Ki(t))}map(t){return[...this.kvs.entries()].map(([n,r])=>{const o=n.split($c);return t({key:o.map(i=>{const[,a,s]=i.match(/^([^:]*):(.*)$/);return a==="number"?Number(s):s}),value:r})})}toJSON(){const t={};return this.map(({key:n,value:r})=>(t[n.join(".")]=r,null)),t}}class MT{constructor(t){ee(this,"formHooked",!1);ee(this,"forceRootUpdate");ee(this,"subscribable",!0);ee(this,"store",{});ee(this,"fieldEntities",[]);ee(this,"initialValues",{});ee(this,"callbacks",{});ee(this,"validateMessages",null);ee(this,"preserve",null);ee(this,"lastValidatePromise",null);ee(this,"watcherCenter",new RT(this));ee(this,"getForm",()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks}));ee(this,"getInternalHooks",t=>t===zr?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(tt(!1,"`getInternalHooks` is internal usage. Should not call directly."),null));ee(this,"useSubscribe",t=>{this.subscribable=t});ee(this,"prevWithoutPreserves",null);ee(this,"setInitialValues",(t,n)=>{var r;if(this.initialValues=t||{},n){let o=oo(t,this.store);(r=this.prevWithoutPreserves)==null||r.map(({key:i})=>{o=xn(o,i,In(t,i))}),this.prevWithoutPreserves=null,this.updateStore(o)}});ee(this,"destroyForm",t=>{if(t)this.updateStore({});else{const n=new Yr;this.getFieldEntities(!0).forEach(r=>{this.isMergedPreserve(r.isPreserve())||n.set(r.getNamePath(),!0)}),this.prevWithoutPreserves=n}});ee(this,"getInitialValue",t=>{const n=In(this.initialValues,t);return t.length?oo(n):n});ee(this,"setCallbacks",t=>{this.callbacks=t});ee(this,"setValidateMessages",t=>{this.validateMessages=t});ee(this,"setPreserve",t=>{this.preserve=t});ee(this,"registerWatch",t=>this.watcherCenter.register(t));ee(this,"notifyWatch",(t=[])=>{this.watcherCenter.notify(t)});ee(this,"timeoutId",null);ee(this,"warningUnhooked",()=>{process.env.NODE_ENV!=="production"&&!this.timeoutId&&typeof window<"u"&&(this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.formHooked||tt(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))});ee(this,"updateStore",t=>{this.store=t});ee(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(n=>n.getNamePath().length):this.fieldEntities);ee(this,"getFieldsMap",(t=!1)=>{const n=new Yr;return this.getFieldEntities(t).forEach(r=>{const o=r.getNamePath();n.set(o,r)}),n});ee(this,"getFieldEntitiesForNamePathList",(t,n=!1)=>{if(!t)return this.getFieldEntities(!0);const r=this.getFieldsMap(!0);return n?t.flatMap(o=>{const i=bt(o),a=r.getAsPrefix(i);return a.length?a:[{INVALIDATE_NAME_PATH:i}]}):t.map(o=>{const i=bt(o);return r.get(i)||{INVALIDATE_NAME_PATH:bt(o)}})});ee(this,"getFieldsValue",(t,n)=>{this.warningUnhooked();let r,o;if(t===!0||Array.isArray(t)?(r=t,o=n):t&&typeof t=="object"&&(o=t.filter),r===!0&&!o)return this.store;const i=this.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null,!0),a=[],s=[];i.forEach(c=>{var d;const u=c.INVALIDATE_NAME_PATH||c.getNamePath();if((d=c.isList)!=null&&d.call(c)){s.push(u);return}if(!o)a.push(u);else{const f="getMeta"in c?c.getMeta():null;o(f)&&a.push(u)}});let l=Fp(this.store,a.map(bt));return s.forEach(c=>{In(l,c)||(l=xn(l,c,[]))}),l});ee(this,"getFieldValue",t=>{this.warningUnhooked();const n=bt(t);return In(this.store,n)});ee(this,"getFieldsError",t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((r,o)=>r&&!r.INVALIDATE_NAME_PATH?{name:r.getNamePath(),errors:r.getErrors(),warnings:r.getWarnings()}:{name:bt(t[o]),errors:[],warnings:[]})));ee(this,"getFieldError",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].errors});ee(this,"getFieldWarning",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].warnings});ee(this,"isFieldsTouched",(...t)=>{this.warningUnhooked();const[n,r]=t;let o,i=!1;t.length===0?o=null:t.length===1?Array.isArray(n)?(o=n.map(bt),i=!1):(o=null,i=n):(o=n.map(bt),i=r);const a=this.getFieldEntities(!0),s=d=>d.isFieldTouched();if(!o)return i?a.every(d=>s(d)||d.isList()):a.some(s);const l=new Yr;o.forEach(d=>{l.set(d,[])}),a.forEach(d=>{const f=d.getNamePath();o.forEach(p=>{p.every((h,m)=>f[m]===h)&&l.update(p,h=>[...h,d])})});const c=d=>d.some(s),u=l.map(({value:d})=>d);return i?u.every(c):u.some(c)});ee(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t])));ee(this,"isFieldsValidating",t=>{this.warningUnhooked();const n=this.getFieldEntities();if(!t)return n.some(o=>o.isFieldValidating());const r=t.map(bt);return n.some(o=>{const i=o.getNamePath();return fo(r,i)&&o.isFieldValidating()})});ee(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t])));ee(this,"resetWithFieldInitialValue",(t={})=>{const n=new Yr,r=this.getFieldEntities(!0);r.forEach(a=>{const{initialValue:s}=a.props,l=a.getNamePath();if(s!==void 0){const c=n.get(l)||new Set;c.add({entity:a,value:s}),n.set(l,c)}});const o=a=>{a.forEach(s=>{const{initialValue:l}=s.props;if(l!==void 0){const c=s.getNamePath();if(this.getInitialValue(c)!==void 0)tt(!1,`Form already set 'initialValues' with path '${c.join(".")}'. Field can not overwrite it.`);else{const d=n.get(c);if(d&&d.size>1)tt(!1,`Multiple Field with path '${c.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(d){const f=this.getFieldValue(c);!s.isListField()&&(!t.skipExist||f===void 0)&&this.updateStore(xn(this.store,c,[...d][0].value))}}}})};let i;t.entities?i=t.entities:t.namePathList?(i=[],t.namePathList.forEach(a=>{const s=n.get(a);s&&i.push(...[...s].map(l=>l.entity))})):i=r,o(i)});ee(this,"resetFields",t=>{this.warningUnhooked();const n=this.store;if(!t){this.updateStore(oo(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(n,null,{type:"reset"}),this.notifyWatch();return}const r=t.map(bt);r.forEach(o=>{const i=this.getInitialValue(o);this.updateStore(xn(this.store,o,i))}),this.resetWithFieldInitialValue({namePathList:r}),this.notifyObservers(n,r,{type:"reset"}),this.notifyWatch(r)});ee(this,"setFields",t=>{this.warningUnhooked();const n=this.store,r=[];t.forEach(o=>{const{name:i,...a}=o,s=bt(i);r.push(s),"value"in a&&this.updateStore(xn(this.store,s,a.value)),this.notifyObservers(n,[s],{type:"setField",data:o})}),this.notifyWatch(r)});ee(this,"getFields",()=>this.getFieldEntities(!0).map(r=>{const o=r.getNamePath(),a={...r.getMeta(),name:o,value:this.getFieldValue(o)};return Object.defineProperty(a,"originRCField",{value:!0}),a}));ee(this,"initEntityValue",t=>{const{initialValue:n}=t.props;if(n!==void 0){const r=t.getNamePath();In(this.store,r)===void 0&&this.updateStore(xn(this.store,r,n))}});ee(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0);ee(this,"registerField",t=>{this.fieldEntities.push(t);const n=t.getNamePath();if(this.notifyWatch([n]),t.props.initialValue!==void 0){const r=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:!0}),this.notifyObservers(r,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return(r,o,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(a=>a!==t),!this.isMergedPreserve(o)&&(!r||i.length>1)){const a=r?void 0:this.getInitialValue(n);if(n.length&&this.getFieldValue(n)!==a&&this.fieldEntities.every(s=>!Ra(s.getNamePath(),n))){const s=this.store;this.updateStore(xn(s,n,a,!0)),this.notifyObservers(s,[n],{type:"remove"}),this.triggerDependenciesUpdate(s,n)}}this.notifyWatch([n])}});ee(this,"dispatch",t=>{switch(t.type){case"updateValue":{const{namePath:n,value:r}=t;this.updateValue(n,r);break}case"validateField":{const{namePath:n,triggerName:r}=t;this.validateFields([n],{triggerName:r});break}}});ee(this,"notifyObservers",(t,n,r)=>{if(this.subscribable){const o={...r,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:i})=>{i(t,n,o)})}else this.forceRootUpdate()});ee(this,"triggerDependenciesUpdate",(t,n)=>{const r=this.getDependencyChildrenFields(n);return r.length&&this.validateFields(r,{delayFrame:!0}),this.notifyObservers(t,r,{type:"dependenciesUpdate",relatedFields:[n,...r]}),r});ee(this,"updateValue",(t,n)=>{const r=bt(t),o=this.store;this.updateStore(xn(this.store,r,n)),this.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),this.notifyWatch([r]);const i=this.triggerDependenciesUpdate(o,r),{onValuesChange:a}=this.callbacks;if(a){const s=Fp(this.store,[r]),l=this.getFieldsValue(),c=xn(l,r,In(s,r));a(s,c)}this.triggerOnFieldsChange([r,...i])});ee(this,"setFieldsValue",t=>{this.warningUnhooked();const n=this.store;if(t){const r=oo(this.store,t);this.updateStore(r)}this.notifyObservers(n,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()});ee(this,"setFieldValue",(t,n)=>{this.setFields([{name:t,value:n,errors:[],warnings:[],touched:!0}])});ee(this,"getDependencyChildrenFields",t=>{const n=new Set,r=[],o=new Yr;this.getFieldEntities().forEach(a=>{const{dependencies:s}=a.props;(s||[]).forEach(l=>{const c=bt(l);o.update(c,(u=new Set)=>(u.add(a),u))})});const i=a=>{(o.get(a)||new Set).forEach(l=>{if(!n.has(l)){n.add(l);const c=l.getNamePath();l.isFieldDirty()&&c.length&&(r.push(c),i(c))}})};return i(t),r});ee(this,"triggerOnFieldsChange",(t,n)=>{const{onFieldsChange:r}=this.callbacks;if(r){const o=this.getFields();if(n){const a=new Yr;n.forEach(({name:s,errors:l})=>{a.set(s,l)}),o.forEach(s=>{s.errors=a.get(s.name)||s.errors})}const i=o.filter(({name:a})=>fo(t,a));i.length&&r(i,o)}});ee(this,"validateFields",(t,n)=>{this.warningUnhooked();let r,o;Array.isArray(t)||typeof t=="string"||typeof n=="string"?(r=t,o=n):o=t;const i=!!r,a=i?r.map(bt):[],s=[...a],l=[],c=String(Date.now()),u=new Set,{recursive:d,dirty:f}=o||{};this.getFieldEntities(!0).forEach(w=>{const y=w.getNamePath();if(i||((!w.isList()||!a.some($=>Ra($,y,!0)))&&s.push(y),a.push(y)),!(!w.props.rules||!w.props.rules.length)&&!(f&&!w.isFieldDirty())&&(u.add(y.join(c)),!i||fo(a,y,d))){const $=w.validateRules({validateMessages:{...Jb,...this.validateMessages},...o});l.push($.then(()=>({name:y,errors:[],warnings:[]})).catch(x=>{var C;const E=[],v=[];return(C=x.forEach)==null||C.call(x,({rule:{warningOnly:I},errors:N})=>{I?v.push(...N):E.push(...N)}),E.length?Promise.reject({name:y,errors:E,warnings:v}):{name:y,errors:E,warnings:v}}))}});const p=NT(l);this.lastValidatePromise=p,p.catch(w=>w).then(w=>{const y=w.map(({name:$})=>$);this.notifyObservers(this.store,y,{type:"validateFinish"}),this.triggerOnFieldsChange(y,w)});const h=p.then(()=>this.lastValidatePromise===p?Promise.resolve(this.getFieldsValue(s)):Promise.reject([])).catch(w=>{var x,E;const y=w.filter(v=>v&&v.errors.length),$=(E=(x=y[0])==null?void 0:x.errors)==null?void 0:E[0];return Promise.reject({message:$,values:this.getFieldsValue(a),errorFields:y,outOfDate:this.lastValidatePromise!==p})});h.catch(w=>w);const m=a.filter(w=>u.has(w.join(c)));return this.triggerOnFieldsChange(m),h});ee(this,"submit",()=>{this.warningUnhooked(),this.validateFields().then(t=>{const{onFinish:n}=this.callbacks;if(n)try{n(t)}catch(r){console.error(r)}}).catch(t=>{const{onFinishFailed:n}=this.callbacks;n&&n(t)})});this.forceRootUpdate=t}}function rx(e){const t=g.useRef(null),[,n]=g.useState({});if(!t.current)if(e)t.current=e;else{const r=()=>{n({})},o=new MT(r);t.current=o.getForm()}return[t.current]}const kc=g.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),AT=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{const o=g.useContext(kc),i=g.useRef({});return g.createElement(kc.Provider,{value:{...o,validateMessages:{...o.validateMessages,...e},triggerFormChange:(a,s)=>{t&&t(a,{changedFields:s,forms:i.current}),o.triggerFormChange(a,s)},triggerFormFinish:(a,s)=>{n&&n(a,{values:s,forms:i.current}),o.triggerFormFinish(a,s)},registerForm:(a,s)=>{a&&(i.current={...i.current,[a]:s}),o.registerForm(a,s)},unregisterForm:a=>{const s={...i.current};delete s[a],i.current=s,o.unregisterForm(a)}}},r)};function Ic(){return Ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ic.apply(this,arguments)}const zT=(e,t)=>{const{name:n,initialValues:r,fields:o,form:i,preserve:a,children:s,component:l="form",validateMessages:c,validateTrigger:u="onChange",onValuesChange:d,onFieldsChange:f,onFinish:p,onFinishFailed:h,clearOnDestroy:m,...w}=e,y=g.useRef(null),$=g.useContext(kc),[x]=rx(i),{useSubscribe:E,setInitialValues:v,setCallbacks:C,setValidateMessages:I,setPreserve:N,destroyForm:M}=x.getInternalHooks(zr);g.useImperativeHandle(t,()=>({...x,nativeElement:y.current})),g.useEffect(()=>($.registerForm(n,x),()=>{$.unregisterForm(n)}),[$,x,n]),I({...$.validateMessages,...c}),C({onValuesChange:d,onFieldsChange:(L,...j)=>{$.triggerFormChange(n,L),f&&f(L,...j)},onFinish:L=>{$.triggerFormFinish(n,L),p&&p(L)},onFinishFailed:h}),N(a);const k=g.useRef(null);v(r,!k.current),k.current||(k.current=!0),g.useEffect(()=>()=>M(m),[]);let R;const O=typeof s=="function";if(O){const L=x.getFieldsValue(!0);R=s(L,x)}else R=s;E(!O);const A=g.useRef(null);g.useEffect(()=>{kT(A.current||[],o||[])||x.setFields(o||[]),A.current=o},[o,x]);const z=g.useMemo(()=>({...x,validateTrigger:u}),[x,u]),D=g.createElement(Ia.Provider,{value:null},g.createElement(yo.Provider,{value:z},R));return l===!1?D:g.createElement(l,Ic({},w,{ref:y,onSubmit:L=>{L.preventDefault(),L.stopPropagation(),x.submit()},onReset:L=>{var j;L.preventDefault(),x.resetFields(),(j=w.onReset)==null||j.call(w,L)}}),D)};function rl(e){try{return JSON.stringify(e)}catch{return Math.random()}}function OT(...e){const[t,n={}]=e,r=UP(n)?{form:n}:n,o=r.form,[i,a]=b.useState(()=>typeof t=="function"?t({}):void 0),s=b.useMemo(()=>rl(i),[i]),l=b.useRef(s);l.current=s;const c=b.useContext(yo),u=o||c,d=u&&u._init;process.env.NODE_ENV!=="production"&&tt(e.length===2?o?d:!0:d,"useWatch requires a form instance since it can not auto detect from context.");const{getFieldsValue:f,getInternalHooks:p}=u,{registerWatch:h}=p(zr),m=Ke((y,$)=>{const x=r.preserve?$??f(!0):y??f(),E=typeof t=="function"?t(x):In(x,bt(t));rl(i)!==rl(E)&&a(E)}),w=typeof t=="function"?t:JSON.stringify(t);return b.useEffect(()=>{d&&m()},[d,w]),b.useEffect(()=>d?h(($,x)=>{m($,x)}):void 0,[d]),i}const DT=g.forwardRef(zT),vi=DT;vi.FormProvider=AT;vi.Field=nx;vi.List=TT;vi.useForm=rx;vi.useWatch=OT;const sr=g.createContext({});process.env.NODE_ENV!=="production"&&(sr.displayName="FormItemInputContext");const LT=({children:e,status:t,override:n})=>{const r=g.useContext(sr),o=g.useMemo(()=>{const i={...r};return n&&delete i.isFormItemInput,t&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[t,n,r]);return g.createElement(sr.Provider,{value:o},e)},FT=g.createContext(void 0),Pa=e=>{const{space:t,form:n,children:r}=e;if(!xi(r))return null;let o=r;return n&&(o=b.createElement(LT,{override:!0,status:!0},o)),t&&(o=b.createElement(MR,null,o)),o};function _T(e){return t=>g.createElement(Sr,{theme:{token:{motion:!1,zIndexPopupBase:0}}},g.createElement(e,{...t}))}const jT=(e,t,n,r,o)=>_T(a=>{const{prefixCls:s,style:l}=a,c=g.useRef(null),[u,d]=g.useState(0),[f,p]=g.useState(0),[h,m]=un(!1,a.open),{getPrefixCls:w}=g.useContext(dt),y=w(r,s);g.useEffect(()=>{if(m(!0),typeof ResizeObserver<"u"){const E=new ResizeObserver(C=>{const I=C[0].target;d(I.offsetHeight+8),p(I.offsetWidth)}),v=setInterval(()=>{var N;const C=o?`.${o(y)}`:`.${y}-dropdown`,I=(N=c.current)==null?void 0:N.querySelector(C);I&&(clearInterval(v),E.observe(I))},10);return()=>{clearInterval(v),E.disconnect()}}},[y]);let $={...a,style:{...l,margin:0},open:h,getPopupContainer:()=>c.current};$={...$,[t]:{overflow:{adjustX:!1,adjustY:!1}}};const x={paddingBottom:u,position:"relative",minWidth:f};return g.createElement("div",{ref:c,style:x},g.createElement(e,{...$}))}),Qr=void 0;function BT(e,t){const{prefixCls:n,invalidate:r,item:o,renderItem:i,responsive:a,responsiveDisabled:s,registerSize:l,itemKey:c,className:u,style:d,children:f,display:p,order:h,component:m="div",...w}=e,y=a&&!p;function $(I){l(c,I)}g.useEffect(()=>()=>{$(null)},[]);const x=i&&o!==Qr?i(o,{index:h}):f;let E;r||(E={opacity:y?0:1,height:y?0:Qr,overflowY:y?"hidden":Qr,order:a?h:Qr,pointerEvents:y?"none":Qr,position:y?"absolute":Qr});const v={};y&&(v["aria-hidden"]=!0);let C=g.createElement(m,$t({className:Z(!r&&n,u),style:{...E,...d}},v,w,{ref:t}),x);return a&&(C=g.createElement(ko,{onResize:({offsetWidth:I})=>{$(I)},disabled:s},C)),C}const ao=g.forwardRef(BT);process.env.NODE_ENV!=="production"&&(ao.displayName="Item");function HT(e){if(typeof MessageChannel>"u")xt(e);else{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function VT(){const e=g.useRef(null);return n=>{e.current||(e.current=[],HT(()=>{po.unstable_batchedUpdates(()=>{e.current.forEach(r=>{r()}),e.current=null})})),e.current.push(n)}}function Zr(e,t){const[n,r]=g.useState(t),o=Ke(i=>{e(()=>{r(i)})});return[n,o]}const Ta=b.createContext(null),WT=(e,t)=>{const n=g.useContext(Ta);if(!n){const{component:s="div",...l}=e;return g.createElement(s,$t({},l,{ref:t}))}const{className:r,...o}=n,{className:i,...a}=e;return g.createElement(Ta.Provider,{value:null},g.createElement(ao,$t({ref:t,className:Z(r,i)},o,a)))},ox=g.forwardRef(WT);process.env.NODE_ENV!=="production"&&(ox.displayName="RawItem");const ix="responsive",ax="invalidate";function qT(e){return`+ ${e.length} ...`}function XT(e,t){const{prefixCls:n="rc-overflow",data:r=[],renderItem:o,renderRawItem:i,itemKey:a,itemWidth:s=10,ssr:l,style:c,className:u,maxCount:d,renderRest:f,renderRawRest:p,prefix:h,suffix:m,component:w="div",itemComponent:y,onVisibleChange:$,...x}=e,E=l==="full",v=VT(),[C,I]=Zr(v,null),N=C||0,[M,k]=Zr(v,new Map),[R,O]=Zr(v,0),[A,z]=Zr(v,0),[D,L]=Zr(v,0),[j,V]=Zr(v,0),[q,P]=b.useState(null),[Q,X]=b.useState(null),T=g.useMemo(()=>Q===null&&E?Number.MAX_SAFE_INTEGER:Q||0,[Q,C]),[J,F]=b.useState(!1),G=`${n}-item`,re=Math.max(R,A),_=d===ix,H=r.length&&_,te=d===ax,oe=H||typeof d=="number"&&r.length>d,B=b.useMemo(()=>{let ce=r;return H?C===null&&E?ce=r:ce=r.slice(0,Math.min(r.length,N/s)):typeof d=="number"&&(ce=r.slice(0,d)),ce},[r,s,C,d,H]),ie=b.useMemo(()=>H?r.slice(T+1):r.slice(B.length),[r,B,H,T]),ae=b.useCallback((ce,ne)=>typeof a=="function"?a(ce):(a&&(ce==null?void 0:ce[a]))??ne,[a]),Se=b.useCallback(o||(ce=>ce),[o]);function ye(ce,ne,ve){Q===ce&&(ne===void 0||ne===q)||(X(ce),ve||(F(ce<r.length-1),$==null||$(ce)),ne!==void 0&&P(ne))}function U(ce,ne){I(ne.clientWidth)}function me(ce,ne){k(ve=>{const Re=new Map(ve);return ne===null?Re.delete(ce):Re.set(ce,ne),Re})}function he(ce,ne){z(ne),O(A)}function se(ce,ne){L(ne)}function ue(ce,ne){V(ne)}function pe(ce){return M.get(ae(B[ce],ce))}Bt(()=>{if(N&&typeof re=="number"&&B){let ce=D+j;const ne=B.length,ve=ne-1;if(!ne){ye(0,null);return}for(let Re=0;Re<ne;Re+=1){let Ge=pe(Re);if(E&&(Ge=Ge||0),Ge===void 0){ye(Re-1,void 0,!0);break}if(ce+=Ge,ve===0&&ce<=N||Re===ve-1&&ce+pe(ve)<=N){ye(ve,null);break}else if(ce+re>N){ye(Re-1,ce-Ge-j+A);break}}m&&pe(0)+j>N&&P(null)}},[N,M,A,D,j,ae,B]);const Ne=J&&!!ie.length;let Ee={};q!==null&&H&&(Ee={position:"absolute",top:0,insetInlineStart:q});const Ie={prefixCls:G,responsive:H,component:y,invalidate:te},W=i?(ce,ne)=>{const ve=ae(ce,ne);return g.createElement(Ta.Provider,{key:ve,value:{...Ie,order:ne,item:ce,itemKey:ve,registerSize:me,display:ne<=T}},i(ce,ne))}:(ce,ne)=>{const ve=ae(ce,ne);return g.createElement(ao,$t({},Ie,{order:ne,key:ve,item:ce,renderItem:Se,itemKey:ve,registerSize:me,display:ne<=T}))},Y={order:Ne?T:Number.MAX_SAFE_INTEGER,className:`${G}-rest`,registerSize:he,display:Ne},le=f||qT,be=p?g.createElement(Ta.Provider,{value:{...Ie,...Y}},p(ie)):g.createElement(ao,$t({},Ie,Y),typeof le=="function"?le(ie):le),$e=g.createElement(w,$t({className:Z(!te&&n,u),style:c,ref:t},x),h&&g.createElement(ao,$t({},Ie,{responsive:_,responsiveDisabled:!H,order:-1,className:`${G}-prefix`,registerSize:se,display:!0}),h),B.map(W),oe?be:null,m&&g.createElement(ao,$t({},Ie,{responsive:_,responsiveDisabled:!H,order:T,className:`${G}-suffix`,registerSize:ue,display:!0,style:Ee}),m));return _?g.createElement(ko,{onResize:U,disabled:!H},$e):$e}const rr=g.forwardRef(XT);rr.Item=ox;rr.RESPONSIVE=ix;rr.INVALIDATE=ax;process.env.NODE_ENV!=="production"&&(rr.displayName="Overflow");const Na=(e,t,n)=>Z({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n}),Ju=(e,t)=>t||e,wo=(e,t,n,r)=>{const o=g.useContext(dt),{variant:i,[e]:a}=o,s=g.useContext(FT),l=r?o[r]:void 0,c=(a==null?void 0:a.variant)??(l==null?void 0:l.variant),u=typeof t<"u"||n===!1||typeof s<"u"||typeof c<"u"||typeof i<"u";let d;typeof t<"u"?d=t:n===!1?d="borderless":d=s??c??i??"outlined";const f=b2.includes(d);return[d,f,u]};var UT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};function Rc(){return Rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rc.apply(this,arguments)}const GT=(e,t)=>g.createElement(Jt,Rc({},e,{ref:t,icon:UT})),sx=g.forwardRef(GT);process.env.NODE_ENV!=="production"&&(sx.displayName="SearchOutlined");const lx=e=>{const{children:t,prefixCls:n,id:r,classNames:o,styles:i,className:a,style:s}=e;return g.createElement("div",{id:r,className:Z(`${n}-container`,o==null?void 0:o.container,a),style:{...i==null?void 0:i.container,...s},role:"tooltip"},typeof t=="function"?t():t)},Jr={shiftX:64,adjustY:1},eo={adjustX:1,shiftY:!0},$n=[0,0],KT={left:{points:["cr","cl"],overflow:eo,offset:[-4,0],targetOffset:$n},right:{points:["cl","cr"],overflow:eo,offset:[4,0],targetOffset:$n},top:{points:["bc","tc"],overflow:Jr,offset:[0,-4],targetOffset:$n},bottom:{points:["tc","bc"],overflow:Jr,offset:[0,4],targetOffset:$n},topLeft:{points:["bl","tl"],overflow:Jr,offset:[0,-4],targetOffset:$n},leftTop:{points:["tr","tl"],overflow:eo,offset:[-4,0],targetOffset:$n},topRight:{points:["br","tr"],overflow:Jr,offset:[0,-4],targetOffset:$n},rightTop:{points:["tl","tr"],overflow:eo,offset:[4,0],targetOffset:$n},bottomRight:{points:["tr","br"],overflow:Jr,offset:[0,4],targetOffset:$n},rightBottom:{points:["bl","br"],overflow:eo,offset:[4,0],targetOffset:$n},bottomLeft:{points:["tl","bl"],overflow:Jr,offset:[0,4],targetOffset:$n},leftBottom:{points:["br","bl"],overflow:eo,offset:[-4,0],targetOffset:$n}};function Pc(){return Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pc.apply(this,arguments)}const YT=g.forwardRef((e,t)=>{const{trigger:n=["hover","focus"],mouseEnterDelay:r=0,mouseLeaveDelay:o=.1,prefixCls:i="rc-tooltip",children:a,onVisibleChange:s,afterVisibleChange:l,motion:c,placement:u="right",align:d={},destroyOnHidden:f=!1,defaultVisible:p,getTooltipContainer:h,arrowContent:m,overlay:w,id:y,showArrow:$=!0,classNames:x,styles:E,...v}=e,C=Ga(y),I=b.useRef(null);b.useImperativeHandle(t,()=>I.current);const N={...v};"visible"in e&&(N.popupVisible=e.visible);const M=g.useMemo(()=>{if(!$)return!1;const R=$===!0?{}:$;return{...R,className:Z(R.className,x==null?void 0:x.arrow),style:{...R.style,...E==null?void 0:E.arrow},content:R.content??m}},[$,x==null?void 0:x.arrow,E==null?void 0:E.arrow,m]),k=({open:R})=>{const O=g.Children.only(a),D={"aria-describedby":[O.props["aria-describedby"],w&&R?C:void 0].filter(Boolean).join(" ")||void 0};return g.cloneElement(O,D)};return g.createElement(Uu,Pc({popupClassName:x==null?void 0:x.root,prefixCls:i,popup:g.createElement(lx,{key:"content",prefixCls:i,id:C,classNames:x,styles:E},w),action:n,builtinPlacements:KT,popupPlacement:u,ref:I,popupAlign:d,getPopupContainer:h,onOpenChange:s,afterOpenChange:l,popupMotion:c,defaultPopupVisible:p,autoDestroy:f,mouseLeaveDelay:o,popupStyle:E==null?void 0:E.root,mouseEnterDelay:r,arrow:M,uniqueContainerClassName:x==null?void 0:x.uniqueContainer,uniqueContainerStyle:E==null?void 0:E.uniqueContainer},N),k)});function cx(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=0,a=o,s=r*1/Math.sqrt(2),l=o-r*(1-1/Math.sqrt(2)),c=o-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*o-c,f=u,p=2*o-s,h=l,m=2*o-i,w=a,y=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),$=r*(Math.sqrt(2)-1),x=`polygon(${$}px 100%, 50% ${$}px, ${2*o-$}px 100%, ${$}px 100%)`,E=`path('M ${i} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${p} ${h} A ${r} ${r} 0 0 0 ${m} ${w} Z')`;return{arrowShadowWidth:y,arrowPath:E,arrowPolygon:x}}const QT=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e,c={content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${xe(s)} 0`},transform:"translateY(50%) rotate(-135deg)",zIndex:0,background:"transparent"};return n&&(c.boxShadow=n),{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":c}},ux=8;function ed(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?ux:r}}const dx=(e,t,n)=>{const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a,antCls:s}=e,[l]=ur(s,"tooltip"),{arrowDistance:c=0,arrowShadow:u=!0}=n||{};return{[r]:{[`${r}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...QT(e,t,u?o:!1),"&:before":{background:t}}],[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:c,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[l("arrow-offset-x")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{[l("arrow-offset-x")]:`calc(100% - ${xe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}},[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:c,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[l("arrow-offset-x")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{[l("arrow-offset-x")]:`calc(100% - ${xe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}},[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:c},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i},[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:c},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}}}};function ZT(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const o=rn(r)?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=t.arrowOffsetHorizontal*2+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=t.arrowOffsetVertical*2+n,i.shiftX=!0,i.adjustX=!0;break}const a={...i,...o};return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const jp={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},JT={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},eN=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function fx(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,s=t/2,l={},c=ed({contentRadius:i,limitVerticalRadius:!0});return Object.keys(jp).forEach(u=>{const f={...r&&JT[u]||jp[u],offset:[0,0],dynamicInset:!0};switch(l[u]=f,eN.has(u)&&(f.autoArrow=!1),u){case"top":case"topLeft":case"topRight":f.offset[1]=-s-o;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+o;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-o;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+o;break}if(r)switch(u){case"topLeft":case"bottomLeft":f.offset[0]=-c.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=c.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-c.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=c.arrowOffsetHorizontal*2-s;break}f.overflow=ZT(u,c,t,n),a&&(f.htmlRegion="visibleFirst")}),l}const tN=b.createContext(!1),nN=(e,t)=>{const n=r=>typeof r=="boolean"?{show:r}:r||{};return b.useMemo(()=>{const r=n(e),o=n(t);return{...o,...r,show:r.show??o.show??!0}},[e,t])},Bp="50%",rN=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,dropShadowPopover:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p,antCls:h}=e,[m,w]=ur(h,"tooltip"),y=t(a).add(p).add(f).equal(),x={minWidth:t(a).mul(2).add(p).equal(),minHeight:l,padding:`${xe(e.calc(u).div(2).equal())} ${xe(d)}`,color:w("overlay-color",o),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxSizing:"border-box"},E={[m("valid-offset-x")]:w("arrow-offset-x","var(--arrow-x)"),transformOrigin:[w("valid-offset-x",Bp),`var(--arrow-y, ${Bp})`].join(" ")};return[{[n]:{...Io(e),position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible",filter:c,...E,"&-hidden":{display:"none"},[m("arrow-background-color")]:i,[`${n}-container`]:[x,BR(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:"none",background:"transparent"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:y},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,ux)}},[`${n}-content`]:{position:"relative"},...sI(e,(v,{darkColor:C})=>({[`&${n}-${v}`]:{[`${n}-container`]:{backgroundColor:C},[`${n}-arrow`]:{[m("arrow-background-color")]:C}}})),"&-rtl":{direction:"rtl"}}},dx(e,w("arrow-background-color"),{arrowShadow:!1}),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...x,...E,position:"absolute",zIndex:t(s).sub(1).equal(),filter:c,"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},oN=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...ed({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...cx(yt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),px=(e,t,n=!0)=>on("Tooltip",o=>{const{borderRadius:i,colorTextLightSolid:a,colorBgSpotlight:s,maxWidth:l}=o,c=yt(o,{tooltipMaxWidth:l,tooltipColor:a,tooltipBorderRadius:i,tooltipBg:s});return[rN(c),Yu(o,"zoom-big-fast")]},oN,{resetStyle:!1,injectStyle:n})(e,t),iN=xr.map(e=>`${e}-inverse`);function aN(e,t=!0){return t?[].concat(jr(iN),jr(xr)).includes(e):xr.includes(e)}const mx=(e,t,n)=>{const r=aN(n),[o]=ur(e,"tooltip"),i=Z({[`${t}-${n}`]:n&&r}),a={},s={},l=IP(n).toRgb(),u=(.299*l.r+.587*l.g+.114*l.b)/255<.5?"#FFF":"#000";return n&&!r&&(a.background=n,a[o("overlay-color")]=u,s[o("arrow-background-color")]=n),{className:i,overlayStyle:a,arrowStyle:s}},sN=e=>{const{prefixCls:t,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a,classNames:s,styles:l}=e,{getPrefixCls:c}=g.useContext(dt),u=c("tooltip",t),d=c(),f=Ro(u),[p,h]=px(u,f),m=mx(d,u,i),w=m.arrowStyle,y=g.useMemo(()=>({container:{...a,...m.overlayStyle}}),[a,m.overlayStyle]),$={...e,placement:r},[x,E]=Pn([s],[y,l],{props:$}),v=Z(f,p,h,u,`${u}-pure`,`${u}-placement-${r}`,n,m.className);return g.createElement("div",{className:v,style:w},g.createElement("div",{className:`${u}-arrow`}),g.createElement(lx,{...e,className:p,prefixCls:u,classNames:x,styles:E},o))},lN=g.forwardRef((e,t)=>{const{prefixCls:n,openClassName:r,getTooltipContainer:o,color:i,children:a,afterOpenChange:s,arrow:l,destroyTooltipOnHide:c,destroyOnHidden:u,title:d,overlay:f,trigger:p,builtinPlacements:h,autoAdjustOverflow:m=!0,motion:w,getPopupContainer:y,placement:$="top",mouseEnterDelay:x,mouseLeaveDelay:E,rootClassName:v,styles:C,classNames:I,onOpenChange:N,overlayInnerStyle:M,overlayStyle:k,overlayClassName:R,...O}=e,[,A]=Cr(),z=e["data-popover-inject"],{getPopupContainer:D,getPrefixCls:L,direction:j,...V}=Kn("tooltip"),{className:q,style:P,classNames:Q,styles:X,arrow:T,trigger:J,mouseEnterDelay:F,mouseLeaveDelay:G}=z?{}:V,re=x??F??.1,_=E??G??.1,H=nN(l,T),te=H.show,oe=p||J||"hover",B=y||D,ie=u??!!c,ae=g.useContext(tN),Se=At("Tooltip"),ye=g.useRef(null),U=()=>{var _e;(_e=ye.current)==null||_e.forceAlign()};g.useImperativeHandle(t,()=>{var _e,pt;return{forceAlign:U,nativeElement:(_e=ye.current)==null?void 0:_e.nativeElement,popupElement:(pt=ye.current)==null?void 0:pt.popupElement}}),process.env.NODE_ENV!=="production"&&([["overlayStyle","styles.root"],["overlayInnerStyle","styles.container"],["overlayClassName","classNames.root"],["destroyTooltipOnHide","destroyOnHidden"]].forEach(([_e,pt])=>{Se.deprecated(!(_e in e),_e,pt)}),process.env.NODE_ENV!=="production"&&Se(!c||typeof c=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."));const[me,he]=un(e.defaultOpen??!1,e.open),se=!d&&!f&&d!==0,ue=_e=>{he(se?!1:_e),!se&&N&&N(_e)},pe=g.useMemo(()=>h||fx({arrowPointAtCenter:(H==null?void 0:H.pointAtCenter)??!1,autoAdjustOverflow:m,arrowWidth:te?A.sizePopupArrow:0,borderRadius:A.borderRadius,offset:A.marginXXS,visibleFirst:!0}),[H,h,A,te,m]),Ne=g.useMemo(()=>d===0?d:f||d||"",[f,d]),Ee=g.createElement(Pa,{space:!0,form:!0},Qt(Ne)?Ne():Ne),Ie={...e,trigger:oe,builtinPlacements:pe,getPopupContainer:B,destroyOnHidden:ie,mouseEnterDelay:re,mouseLeaveDelay:_},W=kt(P),Y=kt(k),[le,be]=Pn([Q,I],[X,W,C,Y],{props:Ie}),$e=L("tooltip",n),ce=L();let ne=me;(!("open"in e)&&se||ae)&&(ne=!1);const ve=g.isValidElement(a)&&!Sb(a)?a:g.createElement("span",null,a),Re=ve.props,Ge=!Re.className||typeof Re.className=="string"?Z(Re.className,r||`${$e}-open`):Re.className,Pe=Ro($e),[ze,Me]=px($e,Pe,!z),it=mx(ce,$e,i),Qe=it.arrowStyle,It=Z(Pe,ze,Me),wt=Z(R,{[`${$e}-rtl`]:j==="rtl"},it.className,v,It,q,le.root),[Ot,gt]=Ku("Tooltip",O.zIndex),_t={...be.container,...M,...it.overlayStyle},jt=g.createElement(YT,{unique:!0,...O,zIndex:Ot,showArrow:te,placement:$,mouseEnterDelay:re,mouseLeaveDelay:_,prefixCls:$e,classNames:{root:wt,container:le.container,arrow:le.arrow,uniqueContainer:Z(It,le.container)},styles:{root:{...Qe,...be.root},container:_t,uniqueContainer:_t,arrow:be.arrow},ref:ye,overlay:Ee,visible:ne,onVisibleChange:ue,afterVisibleChange:s,arrowContent:g.createElement("span",{className:`${$e}-arrow-content`}),motion:{motionName:SR(ce,"zoom-big-fast",typeof(w==null?void 0:w.motionName)=="string"?w==null?void 0:w.motionName:void 0),motionDeadline:1e3},trigger:oe,builtinPlacements:pe,getTooltipContainer:B,destroyOnHidden:ie},ne&&!O.disabled?Dn(ve,{className:Ge}):ve);return g.createElement(is.Provider,{value:gt},jt)}),Ci=lN;process.env.NODE_ENV!=="production"&&(Ci.displayName="Tooltip");Ci._InternalPanelDoNotUseOrYouWillBeFired=sN;Ci.UniqueProvider=Eb;var cN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function Tc(){return Tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tc.apply(this,arguments)}const uN=(e,t)=>g.createElement(Jt,Tc({},e,{ref:t,icon:cN})),Ma=g.forwardRef(uN);process.env.NODE_ENV!=="production"&&(Ma.displayName="LeftOutlined");const{ESC:dN,TAB:fN}=Eu;function pN({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:o}){const i=g.useRef(!1),a=()=>{var c,u;e&&((u=(c=t.current)==null?void 0:c.focus)==null||u.call(c),n==null||n(!1))},s=()=>{var c;return(c=o.current)!=null&&c.focus?(o.current.focus(),i.current=!0,!0):!1},l=c=>{switch(c.keyCode){case dN:a();break;case fN:{let u=!1;i.current||(u=s()),u?c.preventDefault():a();break}}};g.useEffect(()=>e?(window.addEventListener("keydown",l),r&&xt(s,3),()=>{window.removeEventListener("keydown",l),i.current=!1}):()=>{i.current=!1},[e])}const mN=b.forwardRef((e,t)=>{const{overlay:n,arrow:r,prefixCls:o}=e,i=b.useMemo(()=>{let s;return typeof n=="function"?s=n():s=n,s},[n]),a=Gn(t,cr(i));return b.createElement(b.Fragment,null,r&&b.createElement("div",{className:`${o}-arrow`}),b.cloneElement(i,{ref:Eo(i)?a:void 0}))}),to={adjustX:1,adjustY:1},no=[0,0],gN={topLeft:{points:["bl","tl"],overflow:to,offset:[0,-4],targetOffset:no},top:{points:["bc","tc"],overflow:to,offset:[0,-4],targetOffset:no},topRight:{points:["br","tr"],overflow:to,offset:[0,-4],targetOffset:no},bottomLeft:{points:["tl","bl"],overflow:to,offset:[0,4],targetOffset:no},bottom:{points:["tc","bc"],overflow:to,offset:[0,4],targetOffset:no},bottomRight:{points:["tr","br"],overflow:to,offset:[0,4],targetOffset:no}};function Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nc.apply(this,arguments)}const hN=b.forwardRef((e,t)=>{var J;const{arrow:n=!1,prefixCls:r="rc-dropdown",transitionName:o,animation:i,align:a,placement:s="bottomLeft",placements:l=gN,getPopupContainer:c,showAction:u,hideAction:d,overlayClassName:f,overlayStyle:p,visible:h,trigger:m=["hover"],autoFocus:w,overlay:y,children:$,onVisibleChange:x,disabled:E,...v}=e,[C,I]=b.useState(),N="visible"in e?h:C,M=i?`${r}-${i}`:o,k=b.useRef(null),R=b.useRef(null),O=b.useRef(null);b.useImperativeHandle(t,()=>k.current);const A=F=>{I(F),x==null||x(F)};pN({visible:N,triggerRef:O,onVisibleChange:A,autoFocus:w,overlayRef:R});const z=F=>{const{onOverlayClick:G}=e;I(!1),G&&G(F)},D=()=>b.createElement(mN,{ref:R,overlay:y,prefixCls:r,arrow:n}),L=()=>typeof y=="function"?D:D(),j=()=>{const{minOverlayWidthMatchTrigger:F,alignPoint:G}=e;return"minOverlayWidthMatchTrigger"in e?F:!G},V=()=>{const{openClassName:F}=e;return F!==void 0?F:`${r}-open`},q=$,P=Z((J=q.props)==null?void 0:J.className,N&&V()),Q={className:P,ref:Gn(O,cr(q))},X=Eo(q)?b.cloneElement(q,Q):b.createElement("span",{className:P,ref:O},b.cloneElement(q,{className:P}));let T=d;return!T&&m.indexOf("contextMenu")!==-1&&(T=["click"]),b.createElement(Uu,Nc({builtinPlacements:l},v,{prefixCls:r,ref:k,popupClassName:Z(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:m,showAction:u,hideAction:T,popupPlacement:s,popupAlign:a,popupMotion:{motionName:M},popupVisible:N,stretch:j()?"minWidth":"",popup:L(),onOpenChange:A,onPopupClick:z,getPopupContainer:c}),X)}),gx=g.createContext(null);function hx(e,t){return`${e}-${t}`}function bx(e){const t=g.useContext(gx);return hx(t,e)}const Ln=g.createContext(null);function bN(e,t){const n={...e};return Object.keys(t).forEach(r=>{const o=t[r];o!==void 0&&(n[r]=o)}),n}function di({children:e,locked:t,...n}){const r=g.useContext(Ln),o=Ka(()=>bN(r,n),[r,n],(i,a)=>!t&&(i[0]!==a[0]||!ii(i[1],a[1],!0)));return g.createElement(Ln.Provider,{value:o},e)}const xN=[],xx=g.createContext(null);function ls(){return g.useContext(xx)}const yx=g.createContext(xN);function No(e){const t=g.useContext(yx);return g.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const wx=g.createContext(null),td=g.createContext({}),{LEFT:Mc,RIGHT:Ac,UP:zc,DOWN:ca,ENTER:ua,ESC:vx,HOME:Bo,END:Ho}=Eu,Hp=[zc,ca,Mc,Ac];function yN(e,t,n,r){var p;const o="prev",i="next",a="children",s="parent";if(e==="inline"&&r===ua)return{inlineTrigger:!0};const l={[zc]:o,[ca]:i},c={[Mc]:n?i:o,[Ac]:n?o:i,[ca]:a,[ua]:a},u={[zc]:o,[ca]:i,[ua]:a,[vx]:s,[Mc]:n?a:s,[Ac]:n?s:a};switch((p={inline:l,horizontal:c,vertical:u,inlineSub:l,horizontalSub:u,verticalSub:u}[`${e}${t?"":"Sub"}`])==null?void 0:p[r]){case o:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case a:return{offset:1,sibling:!1};default:return null}}function wN(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function vN(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function nd(e,t){return S$(e,!0).filter(r=>t.has(r))}function Vp(e,t,n,r=1){if(!e)return null;const o=nd(e,t),i=o.length;let a=o.findIndex(s=>n===s);return r<0?a===-1?a=i-1:a-=1:r>0&&(a+=1),a=(a+i)%i,o[a]}const Aa=(e,t)=>{const n=new Set,r=new Map,o=new Map;return e.forEach(i=>{const a=document.querySelector(`[data-menu-id='${hx(t,i)}']`);a&&(n.add(a),o.set(a,i),r.set(i,a))}),{elements:n,key2element:r,element2key:o}};function CN(e,t,n,r,o,i,a,s,l,c){const u=g.useRef(void 0),d=g.useRef(void 0);d.current=t;const f=()=>{xt.cancel(u.current)};return g.useEffect(()=>()=>{f()},[]),p=>{const{which:h}=p;if([...Hp,ua,vx,Bo,Ho].includes(h)){const m=i();let w=Aa(m,r);const{elements:y,key2element:$,element2key:x}=w,E=$.get(t),v=vN(E,y),C=x.get(v),I=yN(e,a(C,!0).length===1,n,h);if(!I&&h!==Bo&&h!==Ho)return;(Hp.includes(h)||[Bo,Ho].includes(h))&&p.preventDefault();const N=M=>{if(M){let k=M;const R=M.querySelector("a");R!=null&&R.getAttribute("href")&&(k=R);const O=x.get(M);s(O),f(),u.current=xt(()=>{d.current===O&&k.focus()})}};if([Bo,Ho].includes(h)||I.sibling||!v){let M;!v||e==="inline"?M=o.current:M=wN(v);let k;const R=nd(M,y);h===Bo?k=R[0]:h===Ho?k=R[R.length-1]:k=Vp(M,y,v,I.offset),N(k)}else if(I.inlineTrigger)l(C);else if(I.offset>0)l(C,!0),f(),u.current=xt(()=>{w=Aa(m,r);const M=v.getAttribute("aria-controls"),k=document.getElementById(M),R=Vp(k,w.elements);N(R)},5);else if(I.offset<0){const M=a(C,!0),k=M[M.length-2],R=$.get(k);l(k,!1),N(R)}}c==null||c(p)}}function SN(e){Promise.resolve().then(e)}const rd="__RC_UTIL_PATH_SPLIT__",Wp=e=>e.join(rd),EN=e=>e.split(rd),Oc="rc-menu-more";function $N(){const[,e]=g.useState({}),t=b.useRef(new Map),n=b.useRef(new Map),[r,o]=g.useState([]),i=b.useRef(0),a=b.useRef(!1),s=()=>{a.current||e({})},l=b.useCallback((m,w)=>{process.env.NODE_ENV!=="production"&&tt(!t.current.has(m),`Duplicated key '${m}' used in Menu by path [${w.join(" > ")}]`);const y=Wp(w);n.current.set(y,m),t.current.set(m,y),i.current+=1;const $=i.current;SN(()=>{$===i.current&&s()})},[]),c=b.useCallback((m,w)=>{const y=Wp(w);n.current.delete(y),t.current.delete(m)},[]),u=b.useCallback(m=>{o(m)},[]),d=b.useCallback((m,w)=>{const y=t.current.get(m)||"",$=EN(y);return w&&r.includes($[0])&&$.unshift(Oc),$},[r]),f=b.useCallback((m,w)=>m.filter(y=>y!==void 0).some(y=>d(y,!0).includes(w)),[d]),p=()=>{const m=[...t.current.keys()];return r.length&&m.push(Oc),m},h=b.useCallback(m=>{const w=`${t.current.get(m)}${rd}`,y=new Set;return[...n.current.keys()].forEach($=>{$.startsWith(w)&&y.add(n.current.get($))}),y},[]);return g.useEffect(()=>()=>{a.current=!0},[]),{registerPath:l,unregisterPath:c,refreshOverflowKeys:u,isSubPathKey:f,getKeyPath:d,getKeys:p,getSubPathKeys:h}}function Go(e){const t=g.useRef(e);t.current=e;const n=g.useCallback((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[]);return e?n:void 0}function Cx(e,t,n,r){const{activeKey:o,onActive:i,onInactive:a}=g.useContext(Ln),s={active:o===e};return t||(s.onMouseEnter=l=>{n==null||n({key:e,domEvent:l}),i(e)},s.onMouseLeave=l=>{r==null||r({key:e,domEvent:l}),a(e)}),s}function Sx(e){const{mode:t,rtl:n,inlineIndent:r}=g.useContext(Ln);if(t!=="inline")return null;const o=e;return n?{paddingRight:o*r}:{paddingLeft:o*r}}function Ex({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e=="function"?r=g.createElement(e,{...t}):typeof e!="boolean"&&(r=e),r||n||null)}function za({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(tt(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function fi(){return fi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fi.apply(this,arguments)}class kN extends g.Component{render(){const{title:t,attribute:n,elementRef:r,...o}=this.props,i=Yt(o,["eventKey","popupClassName","popupOffset","onTitleClick"]);return tt(!n,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),g.createElement(rr.Item,fi({},n,{title:typeof t=="string"?t:void 0},i,{ref:r}))}}const IN=g.forwardRef((e,t)=>{const{style:n,className:r,eventKey:o,warnKey:i,disabled:a,itemIcon:s,children:l,itemData:c,role:u,onMouseEnter:d,onMouseLeave:f,onClick:p,onKeyDown:h,onFocus:m,...w}=e,y=bx(o),{prefixCls:$,onItemClick:x,disabled:E,overflowDisabled:v,itemIcon:C,selectedKeys:I,onActive:N}=g.useContext(Ln),{_internalRenderMenuItem:M}=g.useContext(td),k=`${$}-item`,R=g.useRef(null),O=g.useRef(null),A=E||a,z=Hr(t,O),D=No(o);process.env.NODE_ENV!=="production"&&i&&tt(!1,"MenuItem should not leave undefined `key`.");const L=re=>{const _=c||{key:o||"",label:l,itemIcon:s,extra:e.extra,title:e.title};return{key:o,keyPath:[...D].reverse(),item:R.current,domEvent:re,itemData:c||_}},j=s||C,{active:V,...q}=Cx(o,A,d,f),P=I.includes(o),Q=Sx(D.length),X=re=>{if(A)return;const _=L(re);p==null||p(za(_)),x(_)},T=re=>{if(h==null||h(re),re.which===Eu.ENTER){const _=L(re);p==null||p(za(_)),x(_)}},J=re=>{N(o),m==null||m(re)},F={};e.role==="option"&&(F["aria-selected"]=P);let G=g.createElement(kN,fi({ref:R,elementRef:z,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":v&&y?null:y},Yt(w,["extra"]),q,F,{component:"li","aria-disabled":a,style:{...Q,...n},className:Z(k,{[`${k}-active`]:V,[`${k}-selected`]:P,[`${k}-disabled`]:A},r),onClick:X,onKeyDown:T,onFocus:J}),l,g.createElement(Ex,{props:{...e,isSelected:P},icon:j}));return M&&(G=M(G,e,{selected:P})),G});function RN(e,t){const{eventKey:n}=e,r=ls(),o=No(n);return g.useEffect(()=>{if(r)return r.registerPath(n,o),()=>{r.unregisterPath(n,o)}},[o]),r?null:g.createElement(IN,fi({},e,{ref:t}))}const cs=g.forwardRef(RN);function Dc(){return Dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dc.apply(this,arguments)}const PN=({className:e,children:t,...n},r)=>{const{prefixCls:o,mode:i,rtl:a}=g.useContext(Ln);return g.createElement("ul",Dc({className:Z(o,a&&`${o}-rtl`,`${o}-sub`,`${o}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},n,{"data-menu-list":!0,ref:r}),t)},od=g.forwardRef(PN);process.env.NODE_ENV!=="production"&&(od.displayName="SubMenuList");function id(e,t){return or(e).map((n,r)=>{var o;if(g.isValidElement(n)){const{key:i}=n;let a=((o=n.props)==null?void 0:o.eventKey)??i;const s=a==null;s&&(a=`tmp_key-${[...t,r].join("-")}`);const l={key:a,eventKey:a};return process.env.NODE_ENV!=="production"&&s&&(l.warnKey=!0),g.cloneElement(n,l)}return n})}const Xt={adjustX:1,adjustY:1},TN={topLeft:{points:["bl","tl"],overflow:Xt},topRight:{points:["br","tr"],overflow:Xt},bottomLeft:{points:["tl","bl"],overflow:Xt},bottomRight:{points:["tr","br"],overflow:Xt},leftTop:{points:["tr","tl"],overflow:Xt},leftBottom:{points:["br","bl"],overflow:Xt},rightTop:{points:["tl","tr"],overflow:Xt},rightBottom:{points:["bl","br"],overflow:Xt}},NN={topLeft:{points:["bl","tl"],overflow:Xt},topRight:{points:["br","tr"],overflow:Xt},bottomLeft:{points:["tl","bl"],overflow:Xt},bottomRight:{points:["tr","br"],overflow:Xt},rightTop:{points:["tr","tl"],overflow:Xt},rightBottom:{points:["br","bl"],overflow:Xt},leftTop:{points:["tl","tr"],overflow:Xt},leftBottom:{points:["bl","br"],overflow:Xt}};function $x(e,t,n){if(t)return t;if(n)return n[e]||n.other}const MN={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function AN({prefixCls:e,visible:t,children:n,popup:r,popupStyle:o,popupClassName:i,popupOffset:a,disabled:s,mode:l,onVisibleChange:c}){const{getPopupContainer:u,rtl:d,subMenuOpenDelay:f,subMenuCloseDelay:p,builtinPlacements:h,triggerSubMenuAction:m,forceSubMenuRender:w,rootClassName:y,motion:$,defaultMotions:x}=g.useContext(Ln),[E,v]=g.useState(!1),C=d?{...NN,...h}:{...TN,...h},I=MN[l],N=$x(l,$,x),M=g.useRef(N);l!=="inline"&&(M.current=N);const k={...M.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},R=g.useRef(void 0);return g.useEffect(()=>(R.current=xt(()=>{v(t)}),()=>{xt.cancel(R.current)}),[t]),g.createElement(Uu,{prefixCls:e,popupClassName:Z(`${e}-popup`,{[`${e}-rtl`]:d},i,y),stretch:l==="horizontal"?"minWidth":null,getPopupContainer:u,builtinPlacements:C,popupPlacement:I,popupVisible:E,popup:r,popupStyle:o,popupAlign:a&&{offset:a},action:s?[]:[m],mouseEnterDelay:f,mouseLeaveDelay:p,onPopupVisibleChange:c,forceRender:w,popupMotion:k,fresh:!0},n)}function Lc(){return Lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lc.apply(this,arguments)}function zN({id:e,open:t,keyPath:n,children:r}){const o="inline",{prefixCls:i,forceSubMenuRender:a,motion:s,defaultMotions:l,mode:c}=g.useContext(Ln),u=g.useRef(!1);u.current=c===o;const[d,f]=g.useState(!u.current),p=u.current?t:!1;g.useEffect(()=>{u.current&&f(!1)},[c]);const h={...$x(o,s,l)};n.length>1&&(h.motionAppear=!1);const m=h.onVisibleChanged;return h.onVisibleChanged=w=>(!u.current&&!w&&f(!0),m==null?void 0:m(w)),d?null:g.createElement(di,{mode:o,locked:!u.current},g.createElement(vr,Lc({visible:p},h,{forceRender:a,removeOnLeave:!1,leavedClassName:`${i}-hidden`}),({className:w,style:y})=>g.createElement(od,{id:e,className:w,style:y},r)))}function pi(){return pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pi.apply(this,arguments)}const ON=g.forwardRef((e,t)=>{const{style:n,className:r,styles:o,classNames:i,title:a,itemTitle:s,eventKey:l,warnKey:c,disabled:u,internalPopupClose:d,children:f,itemIcon:p,expandIcon:h,popupClassName:m,popupOffset:w,popupStyle:y,onClick:$,onMouseEnter:x,onMouseLeave:E,onTitleClick:v,onTitleMouseEnter:C,onTitleMouseLeave:I,popupRender:N,...M}=e,k=bx(l),{prefixCls:R,mode:O,openKeys:A,disabled:z,overflowDisabled:D,activeKey:L,selectedKeys:j,itemIcon:V,expandIcon:q,onItemClick:P,onOpenChange:Q,onActive:X,popupRender:T}=g.useContext(Ln),{_internalRenderSubMenuItem:J}=g.useContext(td),{isSubPathKey:F}=g.useContext(wx),G=No(),re=`${R}-submenu`,_=z||u,H=g.useRef(null),te=g.useRef(null);process.env.NODE_ENV!=="production"&&c&&tt(!1,"SubMenu should not leave undefined `key`.");const oe=p??V,B=h??q,ie=A.includes(l),ae=!D&&ie,Se=F(j,l),{active:ye,...U}=Cx(l,_,C,I),[me,he]=g.useState(!1),se=Pe=>{_||he(Pe)},ue=Pe=>{se(!0),x==null||x({key:l,domEvent:Pe})},pe=Pe=>{se(!1),E==null||E({key:l,domEvent:Pe})},Ne=g.useMemo(()=>ye||(O!=="inline"?me||F([L],l):!1),[O,ye,L,me,l,F]),Ee=Sx(G.length),Ie=Pe=>{_||(v==null||v({key:l,domEvent:Pe}),O==="inline"&&Q(l,!ie))},W=Go(Pe=>{$==null||$(za(Pe)),P(Pe)}),Y=Pe=>{O!=="inline"&&Q(l,Pe)},le=()=>{X(l)},be=k&&`${k}-popup`,$e=g.useMemo(()=>g.createElement(Ex,{icon:O!=="horizontal"?B:void 0,props:{...e,isOpen:ae,isSubMenu:!0}},g.createElement("i",{className:`${re}-arrow`})),[O,B,e,ae,re]);let ce=g.createElement("div",pi({role:"menuitem",style:Ee,className:`${re}-title`,tabIndex:_?null:-1,ref:H,title:s??(typeof a=="string"?a:null),"data-menu-id":D&&k?null:k,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":be,"aria-disabled":_,onClick:Ie,onFocus:le},U),a,$e);const ne=g.useRef(O);O!=="inline"&&G.length>1?ne.current="vertical":ne.current=O;const ve=ne.current,Re=g.useMemo(()=>{const Pe=g.createElement(di,{classNames:i,styles:o,mode:ve==="horizontal"?"vertical":ve},g.createElement(od,{id:be,ref:te},f)),ze=N||T;return ze?ze(Pe,{item:e,keys:G}):Pe},[N,T,G,be,f,e,ve]);if(!D){const Pe=ne.current;ce=g.createElement(AN,{mode:Pe,prefixCls:re,visible:!d&&ae&&O!=="inline",popupClassName:m,popupOffset:w,popupStyle:y,popup:Re,disabled:_,onVisibleChange:Y},ce)}let Ge=g.createElement(rr.Item,pi({ref:t,role:"none"},M,{component:"li",style:n,className:Z(re,`${re}-${O}`,r,{[`${re}-open`]:ae,[`${re}-active`]:Ne,[`${re}-selected`]:Se,[`${re}-disabled`]:_}),onMouseEnter:ue,onMouseLeave:pe}),ce,!D&&g.createElement(zN,{id:be,open:ae,keyPath:G},f));return J&&(Ge=J(Ge,e,{selected:Se,active:Ne,open:ae,disabled:_})),g.createElement(di,{classNames:i,styles:o,onItemClick:W,mode:O==="horizontal"?"vertical":O,itemIcon:oe,expandIcon:B},Ge)}),Si=g.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=No(n),i=id(r,o),a=ls();g.useEffect(()=>{if(a)return a.registerPath(n,o),()=>{a.unregisterPath(n,o)}},[o]);let s;return a?s=i:s=g.createElement(ON,pi({ref:t},e),i),g.createElement(yx.Provider,{value:o},s)});process.env.NODE_ENV!=="production"&&(Si.displayName="SubMenu");function ad({className:e,style:t}){const{prefixCls:n}=g.useContext(Ln);return ls()?null:g.createElement("li",{role:"separator",className:Z(`${n}-item-divider`,e),style:t})}function Oa(){return Oa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oa.apply(this,arguments)}const DN=g.forwardRef((e,t)=>{const{className:n,title:r,eventKey:o,children:i,...a}=e,{prefixCls:s,classNames:l,styles:c}=g.useContext(Ln),u=`${s}-item-group`;return g.createElement("li",Oa({ref:t,role:"presentation"},a,{onClick:d=>d.stopPropagation(),className:Z(u,n)}),g.createElement("div",{role:"presentation",className:Z(`${u}-title`,l==null?void 0:l.listTitle),style:c==null?void 0:c.listTitle,title:typeof r=="string"?r:void 0},r),g.createElement("ul",{role:"group",className:Z(`${u}-list`,l==null?void 0:l.list),style:c==null?void 0:c.list},i))}),us=g.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=No(n),i=id(r,o);return ls()?i:g.createElement(DN,Oa({ref:t},Yt(e,["warnKey"])),i)});process.env.NODE_ENV!=="production"&&(us.displayName="MenuItemGroup");function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},so.apply(this,arguments)}function Fc(e,t,n){const{item:r,group:o,submenu:i,divider:a}=t;return(e||[]).map((s,l)=>{if(s&&typeof s=="object"){const{label:c,children:u,key:d,type:f,extra:p,...h}=s,m=d??`tmp-${l}`;if(u||f==="group"){if(f==="group")return g.createElement(o,so({key:m},h,{title:c}),Fc(u,t,n));const{title:y,...$}=h;return g.createElement(i,so({key:m},$,{title:c,itemTitle:typeof y=="string"?y:void 0}),Fc(u,t,n))}if(f==="divider")return g.createElement(a,so({key:m},h));const w=!!p||p===0;return g.createElement(r,so({key:m},h,{extra:p,itemData:{...s,key:m}}),w?g.createElement(g.Fragment,null,g.createElement("span",{className:`${n}-item-label`},c),g.createElement("span",{className:`${n}-item-extra`},p)):c)}return null}).filter(s=>s)}function qp(e,t,n,r,o){let i=e;const a={divider:ad,item:cs,group:us,submenu:Si,...r};return t&&(i=Fc(t,a,o)),id(i,n)}function _c(){return _c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_c.apply(this,arguments)}const Rr=[],LN=g.forwardRef((e,t)=>{var vt;const{prefixCls:n="rc-menu",rootClassName:r,style:o,className:i,styles:a,classNames:s,tabIndex:l=0,items:c,children:u,direction:d,id:f,mode:p="vertical",inlineCollapsed:h,disabled:m,disabledOverflow:w,subMenuOpenDelay:y=.1,subMenuCloseDelay:$=.1,forceSubMenuRender:x,defaultOpenKeys:E,openKeys:v,activeKey:C,defaultActiveFirst:I,selectable:N=!0,multiple:M=!1,defaultSelectedKeys:k,selectedKeys:R,onSelect:O,onDeselect:A,inlineIndent:z=24,motion:D,defaultMotions:L,triggerSubMenuAction:j="hover",builtinPlacements:V,itemIcon:q,expandIcon:P,overflowedIndicator:Q="...",overflowedIndicatorPopupClassName:X,getPopupContainer:T,onClick:J,onOpenChange:F,onKeyDown:G,openAnimation:re,openTransitionName:_,_internalRenderMenuItem:H,_internalRenderSubMenuItem:te,_internalComponents:oe,popupRender:B,...ie}=e,[ae,Se]=g.useMemo(()=>[qp(u,c,Rr,oe,n),qp(u,c,Rr,{},n)],[u,c,oe]),[ye,U]=g.useState(!1),me=g.useRef(null),he=Ga(),se=f??`rc-menu-uuid-${he}`,ue=d==="rtl";process.env.NODE_ENV!=="production"&&tt(!re&&!_,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");const[pe,Ne]=un(E,v),Ee=pe||Rr,Ie=(Oe,Ze=!1)=>{function st(){Ne(Oe),F==null||F(Oe)}Ze?po.flushSync(st):st()},[W,Y]=g.useState(Ee),le=g.useRef(!1),[be,$e]=g.useMemo(()=>(p==="inline"||p==="vertical")&&h?["vertical",h]:[p,!1],[p,h]),ce=be==="inline",[ne,ve]=g.useState(be),[Re,Ge]=g.useState($e);g.useEffect(()=>{ve(be),Ge($e),le.current&&(ce?Ne(W):Ie(Rr))},[be,$e]);const[Pe,ze]=g.useState(0),Me=Pe>=ae.length-1||ne!=="horizontal"||w;g.useEffect(()=>{ce&&Y(Ee)},[Ee]),g.useEffect(()=>(le.current=!0,()=>{le.current=!1}),[]);const{registerPath:it,unregisterPath:Qe,refreshOverflowKeys:It,isSubPathKey:wt,getKeyPath:Ot,getKeys:gt,getSubPathKeys:_t}=$N(),jt=g.useMemo(()=>({registerPath:it,unregisterPath:Qe}),[it,Qe]),_e=g.useMemo(()=>({isSubPathKey:wt}),[wt]);g.useEffect(()=>{It(Me?Rr:ae.slice(Pe+1).map(Oe=>Oe.key))},[Pe,Me]);const[pt,Cn]=un(C||I&&((vt=ae[0])==null?void 0:vt.key),C),jn=Go(Oe=>{Cn(Oe)}),Bn=Go(()=>{Cn(void 0)});b.useImperativeHandle(t,()=>({list:me.current,focus:Oe=>{var Te,ke;const Ze=gt(),{elements:st,key2element:Be,element2key:K}=Aa(Ze,se),ge=nd(me.current,st);let de;pt&&Ze.includes(pt)?de=pt:de=ge[0]?K.get(ge[0]):(Te=ae.find(Fe=>!Fe.props.disabled))==null?void 0:Te.key;const we=Be.get(de);de&&we&&((ke=we==null?void 0:we.focus)==null||ke.call(we,Oe))},findItem:({key:Oe})=>{const Ze=gt(),{key2element:st}=Aa(Ze,se);return st.get(Oe)||null}}));const[Rt,Sn]=un(k||[],R),Ht=g.useMemo(()=>Array.isArray(Rt)?Rt:Rt==null?Rr:[Rt],[Rt]),an=Oe=>{if(N){const{key:Ze}=Oe,st=Ht.includes(Ze);let Be;M?st?Be=Ht.filter(ge=>ge!==Ze):Be=[...Ht,Ze]:Be=[Ze],Sn(Be);const K={...Oe,selectedKeys:Be};st?A==null||A(K):O==null||O(K)}!M&&Ee.length&&ne!=="inline"&&Ie(Rr)},Hn=Go(Oe=>{J==null||J(za(Oe)),an(Oe)}),fn=Go((Oe,Ze)=>{let st=Ee.filter(Be=>Be!==Oe);if(Ze)st.push(Oe);else if(ne!=="inline"){const Be=_t(Oe);st=st.filter(K=>!Be.has(K))}ii(Ee,st,!0)||Ie(st,!0)}),en=CN(ne,pt,ue,se,me,gt,Ot,Cn,(Oe,Ze)=>{const st=Ze??!Ee.includes(Oe);fn(Oe,st)},G);g.useEffect(()=>{U(!0)},[]);const Dt=g.useMemo(()=>({_internalRenderMenuItem:H,_internalRenderSubMenuItem:te}),[H,te]),at=ne!=="horizontal"||w?ae:ae.map((Oe,Ze)=>g.createElement(di,{key:Oe.key,overflowDisabled:Ze>Pe,classNames:s,styles:a},Oe)),Vt=g.createElement(rr,_c({id:f,ref:me,prefixCls:`${n}-overflow`,component:"ul",itemComponent:cs,className:Z(n,`${n}-root`,`${n}-${ne}`,i,{[`${n}-inline-collapsed`]:Re,[`${n}-rtl`]:ue},r),dir:d,style:o,role:"menu",tabIndex:l,data:at,renderRawItem:Oe=>Oe,renderRawRest:Oe=>{const Ze=Oe.length,st=Ze?ae.slice(-Ze):null;return g.createElement(Si,{eventKey:Oc,title:Q,disabled:Me,internalPopupClose:Ze===0,popupClassName:X},st)},maxCount:ne!=="horizontal"||w?rr.INVALIDATE:rr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:Oe=>{ze(Oe)},onKeyDown:en},ie));return g.createElement(td.Provider,{value:Dt},g.createElement(gx.Provider,{value:se},g.createElement(di,{prefixCls:n,rootClassName:r,classNames:s,styles:a,mode:ne,openKeys:Ee,rtl:ue,disabled:m,motion:ye?D:null,defaultMotions:ye?L:null,activeKey:pt,onActive:jn,onInactive:Bn,selectedKeys:Ht,inlineIndent:z,subMenuOpenDelay:y,subMenuCloseDelay:$,forceSubMenuRender:x,builtinPlacements:V,triggerSubMenuAction:j,getPopupContainer:T,itemIcon:q,expandIcon:P,onItemClick:Hn,onOpenChange:fn,popupRender:B},g.createElement(wx.Provider,{value:_e},Vt),g.createElement("div",{style:{display:"none"},"aria-hidden":!0},g.createElement(xx.Provider,{value:jt},Se)))))}),Ei=LN;Ei.Item=cs;Ei.SubMenu=Si;Ei.ItemGroup=us;Ei.Divider=ad;var FN={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};function jc(){return jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jc.apply(this,arguments)}const _N=(e,t)=>g.createElement(Jt,jc({},e,{ref:t,icon:FN})),kx=g.forwardRef(_N);process.env.NODE_ENV!=="production"&&(kx.displayName="BarsOutlined");const jN=g.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),BN=e=>{const{antCls:t,componentCls:n,colorText:r,footerBg:o,headerHeight:i,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=e;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:i,padding:a,color:s,lineHeight:xe(i),background:d,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:o},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},Ix=e=>{const{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:i,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=e,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:o,footerPadding:`${i}px ${c}px`,footerBg:t,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:o}},Rx=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];on("Layout",BN,Ix,{deprecatedTokens:Rx});const HN=e=>{const{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:o,antCls:i,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:h,lightTriggerBg:m,bodyBg:w}=e;return{[t]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${i}-menu${i}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:xe(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:c,insetInlineEnd:e.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${xe(f)} ${xe(f)} 0`,cursor:"pointer",transition:`background-color ${o} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${o}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${xe(f)} 0 0 ${xe(f)}`}},"&-light":{background:p,[`${t}-trigger`]:{color:h,background:m},[`${t}-zero-width-trigger`]:{color:h,background:m,border:`${xe(e.lineWidth)} ${e.lineType} ${w}`,borderInlineStart:0}}}}},VN=on(["Layout","Sider"],HN,Ix,{deprecatedTokens:Rx}),Xp={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1839.98px"},WN=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),sd=g.createContext({}),qN=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),XN=g.forwardRef((e,t)=>{const{prefixCls:n,className:r,trigger:o,children:i,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:h,onCollapse:m,onBreakpoint:w,classNames:y,styles:$,...x}=e,{siderHook:E}=b.useContext(jN),[v,C]=un(a,e.collapsed),[I,N]=b.useState(!1),M=(B,ie)=>{C(B),m==null||m(B,ie)},k={...e,collapsed:v,defaultCollapsed:a,theme:s,style:l,collapsible:c,reverseArrow:u,width:d,collapsedWidth:f,zeroWidthTriggerStyle:p,breakpoint:h,onCollapse:m,onBreakpoint:w},[R,O]=Pn([y],[$],{props:k}),{getPrefixCls:A,direction:z}=b.useContext(dt),D=A("layout-sider",n),[L,j]=VN(D),V=b.useRef(null);V.current=B=>{N(B.matches),w==null||w(B.matches),v!==B.matches&&M(B.matches,"responsive")},b.useEffect(()=>{function B(ae){var Se;return(Se=V.current)==null?void 0:Se.call(V,ae)}let ie;return typeof(window==null?void 0:window.matchMedia)<"u"&&h&&h in Xp&&(ie=window.matchMedia(`screen and (max-width: ${Xp[h]})`),Qt(ie==null?void 0:ie.addEventListener)&&ie.addEventListener("change",B),B(ie)),()=>{Qt(ie==null?void 0:ie.removeEventListener)&&ie.removeEventListener("change",B)}},[h]),b.useEffect(()=>{const B=qN("ant-sider-");return E.addSider(B),()=>E.removeSider(B)},[]);const q=()=>{M(!v,"clickTrigger")},P=Yt(x,["collapsed"]),Q=v?f:d,X=WN(Q)?`${Q}px`:String(Q),T=Number.parseFloat(String(f||0))===0?g.createElement("span",{onClick:q,className:Z(`${D}-zero-width-trigger`,`${D}-zero-width-trigger-${u?"right":"left"}`),style:p},o||g.createElement(kx,null)):null,J=z==="rtl"==!u,re={expanded:J?g.createElement(ka,null):g.createElement(Ma,null),collapsed:J?g.createElement(Ma,null):g.createElement(ka,null)}[v?"collapsed":"expanded"],_=o!==null?T||g.createElement("div",{className:`${D}-trigger`,onClick:q,style:{width:X}},o||re):null,H={...l,flex:`0 0 ${X}`,maxWidth:X,minWidth:X,width:X},te=Z(D,`${D}-${s}`,{[`${D}-collapsed`]:!!v,[`${D}-has-trigger`]:c&&o!==null&&!T,[`${D}-below`]:!!I,[`${D}-zero-width`]:Number.parseFloat(X)===0},r,R.root,L,j),oe=g.useMemo(()=>({siderCollapsed:v}),[v]);return g.createElement(sd.Provider,{value:oe},g.createElement("aside",{className:te,...P,style:{...O.root,...H},ref:t},g.createElement("div",{className:Z(`${D}-children`,R.body),style:O.body},i),c||I&&T?_:null))});process.env.NODE_ENV!=="production"&&(XN.displayName="Sider");var UN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bc.apply(this,arguments)}const GN=(e,t)=>g.createElement(Jt,Bc({},e,{ref:t,icon:UN})),ld=g.forwardRef(GN);process.env.NODE_ENV!=="production"&&(ld.displayName="EllipsisOutlined");const Da=b.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),Px=e=>{const{prefixCls:t,className:n,dashed:r,...o}=e,{getPrefixCls:i}=g.useContext(dt),a=i("menu",t),s=Z({[`${a}-item-divider-dashed`]:!!r},n);return g.createElement(ad,{className:s,...o})},Tx=e=>{var k,R;const{className:t,children:n,icon:r,title:o,danger:i,extra:a}=e,{prefixCls:s,firstLevel:l,direction:c,disableMenuItemTitleTooltip:u,tooltip:d,inlineCollapsed:f,styles:p,classNames:h}=g.useContext(Da),{siderCollapsed:m}=g.useContext(sd),w=!!(m||f),[y,$]=g.useState(!1);g.useEffect(()=>{$(!1)},[w]);const x=O=>{var D,L;const A=n==null?void 0:n[0],z=g.createElement("span",{className:Z(`${s}-title-content`,l?h==null?void 0:h.itemContent:(D=h==null?void 0:h.subMenu)==null?void 0:D.itemContent,{[`${s}-title-content-with-extra`]:!!a||a===0}),style:l?p==null?void 0:p.itemContent:(L=p==null?void 0:p.subMenu)==null?void 0:L.itemContent},n);return(!r||g.isValidElement(n)&&n.type==="span")&&n&&O&&l&&typeof A=="string"?g.createElement("div",{className:`${s}-inline-collapsed-noicon`},A.charAt(0)):z};let E=o;typeof o>"u"?E=l?n:"":o===!1&&(E="");const v=d===!1?void 0:d,C=v&&v.title!==void 0?v.title:E,I={...v??null,title:C};w?(I.open=(v==null?void 0:v.open)??y,I.onOpenChange=O=>{var A;$(O),(A=v==null?void 0:v.onOpenChange)==null||A.call(v,O)}):(I.title=null,I.open=!1);const N=or(n).length;let M=g.createElement(cs,{...Yt(e,["title","icon","danger"]),className:Z(l?h==null?void 0:h.item:(k=h==null?void 0:h.subMenu)==null?void 0:k.item,{[`${s}-item-danger`]:i,[`${s}-item-only-child`]:(r?N+1:N)===1},t),style:{...l?p==null?void 0:p.item:(R=p==null?void 0:p.subMenu)==null?void 0:R.item,...e.style},title:typeof o=="string"?o:void 0,itemData:(e==null?void 0:e.itemData)??{...e,key:e.eventKey}},Dn(r,O=>{var A,z;return{className:Z(`${s}-item-icon`,l?h==null?void 0:h.itemIcon:(A=h==null?void 0:h.subMenu)==null?void 0:A.itemIcon,O.className),style:{...l?p==null?void 0:p.itemIcon:(z=p==null?void 0:p.subMenu)==null?void 0:z.itemIcon,...O.style}}}),x(f));if(!u&&d!==!1){const O=v&&v.placement?v.placement:c==="rtl"?"left":"right",A=`${s}-inline-collapsed-tooltip`,z=L=>({...L,root:Z(A,L==null?void 0:L.root)}),D=Qt(v==null?void 0:v.classNames)?L=>{const j=v.classNames(L);return z(j)}:z(v==null?void 0:v.classNames);M=g.createElement(Ci,{...I,placement:O,classNames:D},M)}return M},La=g.createContext(null),KN=g.forwardRef((e,t)=>{const{children:n,...r}=e,o=g.useContext(La),i=g.useMemo(()=>({...o,...r}),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=Gg(n),s=Hr(t,a?cr(n):null);return g.createElement(La.Provider,{value:i},g.createElement(Pa,{space:!0},a?g.cloneElement(n,{ref:s}):n))}),YN=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${xe(i)} ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${t}-item:hover,
|
|
210
|
+
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},zp=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),dP=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},zp(`${t}-primary`,o),zp(`${t}-danger`,i)]}},el=e=>Math.round(Number(e||0)),fP=e=>{if(e instanceof Ve)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){const{b:t,...n}=e;return{...n,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e};class ir extends Ve{constructor(t){super(fP(t))}toHsbString(){const t=this.toHsb(),n=el(t.s*100),r=el(t.b*100),o=el(t.h),i=t.a,a=`hsb(${o}, ${n}%, ${r}%)`,s=`hsba(${o}, ${n}%, ${r}%, ${i.toFixed(i===0?0:2)})`;return i===1?a:s}toHsb(){const{v:t,...n}=this.toHsv();return{...n,b:t,a:this.a}}}const pP="rc-color-picker",uo=e=>e instanceof ir?e:new ir(e),mP=uo("#1677ff"),Wb=e=>{const{offset:t,targetRef:n,containerRef:r,color:o,type:i}=e,{width:a,height:s}=r.current.getBoundingClientRect(),{width:l,height:c}=n.current.getBoundingClientRect(),u=l/2,d=c/2,f=(t.x+u)/a,p=1-(t.y+d)/s,h=o.toHsb(),m=f,w=(t.x+u)/a*360;if(i)switch(i){case"hue":return uo({...h,h:w<=0?0:w});case"alpha":return uo({...h,a:m<=0?0:m})}return uo({h:h.h,s:f<=0?0:f,b:p>=1?1:p,a:h.a})},qb=(e,t)=>{const n=e.toHsb();switch(t){case"hue":return{x:n.h/360*100,y:50};case"alpha":return{x:e.a*100,y:50};default:return{x:n.s*100,y:(1-n.b)*100}}},gP=({color:e,prefixCls:t,className:n,style:r,innerClassName:o,innerStyle:i,onClick:a})=>{const s=`${t}-color-block`;return b.createElement("div",{className:Z(s,n),style:r,onClick:a},b.createElement("div",{className:Z(`${s}-inner`,o),style:{background:e,...i}}))};function hP(e){const t="touches"in e?e.touches[0]:e,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:t.pageX-n,pageY:t.pageY-r}}function Xb(e){const{targetRef:t,containerRef:n,direction:r,onDragChange:o,onDragChangeComplete:i,calculate:a,color:s,disabledDrag:l}=e,[c,u]=b.useState({x:0,y:0}),d=b.useRef(null),f=b.useRef(null);b.useEffect(()=>{u(a())},[s]),b.useEffect(()=>()=>{document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),document.removeEventListener("touchmove",d.current),document.removeEventListener("touchend",f.current),d.current=null,f.current=null},[]);const p=y=>{const{pageX:$,pageY:x}=hP(y),{x:E,y:v,width:C,height:I}=n.current.getBoundingClientRect(),{width:N,height:A}=t.current.getBoundingClientRect(),k=N/2,R=A/2,O=Math.max(0,Math.min($-E,C))-k,z=Math.max(0,Math.min(x-v,I))-R,D={x:O,y:r==="x"?c.y:z};if(N===0&&A===0||N!==A)return!1;o==null||o(D)},h=y=>{y.preventDefault(),p(y)},m=y=>{y.preventDefault(),document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),document.removeEventListener("touchmove",d.current),document.removeEventListener("touchend",f.current),d.current=null,f.current=null,i==null||i()};return[c,y=>{document.removeEventListener("mousemove",d.current),document.removeEventListener("mouseup",f.current),!l&&(p(y),document.addEventListener("mousemove",h),document.addEventListener("mouseup",m),document.addEventListener("touchmove",h),document.addEventListener("touchend",m),d.current=h,f.current=m)}]}const Ub=({size:e="default",color:t,prefixCls:n})=>b.createElement("div",{className:Z(`${n}-handler`,{[`${n}-handler-sm`]:e==="small"}),style:{backgroundColor:t}}),Gb=({children:e,style:t,prefixCls:n})=>b.createElement("div",{className:`${n}-palette`,style:{position:"relative",...t}},e),Kb=b.forwardRef((e,t)=>{const{children:n,x:r,y:o}=e;return b.createElement("div",{ref:t,style:{position:"absolute",left:`${r}%`,top:`${o}%`,zIndex:1,transform:"translate(-50%, -50%)"}},n)}),bP=({color:e,onChange:t,prefixCls:n,onChangeComplete:r,disabled:o})=>{const i=b.useRef(),a=b.useRef(),s=b.useRef(e),l=Ge(d=>{const f=Wb({offset:d,targetRef:a,containerRef:i,color:e});s.current=f,t(f)}),[c,u]=Xb({color:e,containerRef:i,targetRef:a,calculate:()=>qb(e),onDragChange:l,onDragChangeComplete:()=>r==null?void 0:r(s.current),disabledDrag:o});return b.createElement("div",{ref:i,className:`${n}-select`,onMouseDown:u,onTouchStart:u},b.createElement(Gb,{prefixCls:n},b.createElement(Kb,{x:c.x,y:c.y,ref:a},b.createElement(Ub,{color:e.toRgbString(),prefixCls:n})),b.createElement("div",{className:`${n}-saturation`,style:{backgroundColor:`hsl(${e.toHsb().h},100%, 50%)`,backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},xP=(e,t)=>{const[n,r]=un(e,t);return[b.useMemo(()=>uo(n),[n]),r]},yP=({colors:e,children:t,direction:n="to right",type:r,prefixCls:o})=>{const i=b.useMemo(()=>e.map((a,s)=>{let l=uo(a);return r==="alpha"&&s===e.length-1&&(l=new ir(l.setA(1))),l.toRgbString()}).join(","),[e,r]);return b.createElement("div",{className:`${o}-gradient`,style:{position:"absolute",inset:0,background:`linear-gradient(${n}, ${i})`}},t)},wP=e=>{const{prefixCls:t,colors:n,disabled:r,onChange:o,onChangeComplete:i,color:a,type:s}=e,l=b.useRef(null),c=b.useRef(null),u=b.useRef(a),d=y=>s==="hue"?y.getHue():y.a*100,f=Ge(y=>{const $=Wb({offset:y,targetRef:c,containerRef:l,color:a,type:s});u.current=$,o(d($))}),[p,h]=Xb({color:a,targetRef:c,containerRef:l,calculate:()=>qb(a,s),onDragChange:f,onDragChangeComplete(){i(d(u.current))},direction:"x",disabledDrag:r}),m=b.useMemo(()=>{if(s==="hue"){const y=a.toHsb();return y.s=1,y.b=1,y.a=1,new ir(y)}return a},[a,s]),w=b.useMemo(()=>n.map(y=>`${y.color} ${y.percent}%`),[n]);return b.createElement("div",{ref:l,className:Z(`${t}-slider`,`${t}-slider-${s}`),onMouseDown:h,onTouchStart:h},b.createElement(Gb,{prefixCls:t},b.createElement(Kb,{x:p.x,y:p.y,ref:c},b.createElement(Ub,{size:"small",color:m.toHexString(),prefixCls:t})),b.createElement(yP,{colors:w,type:s,prefixCls:t})))};function vP(e){return g.useMemo(()=>{const{slider:t}=e||{};return[t||wP]},[e])}function ni(){return ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ni.apply(this,arguments)}const CP=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],SP=b.forwardRef((e,t)=>{const{value:n,defaultValue:r,prefixCls:o=pP,onChange:i,onChangeComplete:a,className:s,style:l,panelRender:c,disabledAlpha:u=!1,disabled:d=!1,components:f}=e,[p]=vP(f),[h,m]=xP(r||mP,n),w=b.useMemo(()=>h.setA(1).toRgbString(),[h]),y=(R,O)=>{n||m(R),i==null||i(R,O)},$=R=>new ir(h.setHue(R)),x=R=>new ir(h.setA(R/100)),E=R=>{y($(R),{type:"hue",value:R})},v=R=>{y(x(R),{type:"alpha",value:R})},C=R=>{a&&a($(R))},I=R=>{a&&a(x(R))},N=Z(`${o}-panel`,s,{[`${o}-panel-disabled`]:d}),A={prefixCls:o,disabled:d,color:h},k=b.createElement(b.Fragment,null,b.createElement(bP,ni({onChange:y},A,{onChangeComplete:a})),b.createElement("div",{className:`${o}-slider-container`},b.createElement("div",{className:Z(`${o}-slider-group`,{[`${o}-slider-group-disabled-alpha`]:u})},b.createElement(p,ni({},A,{type:"hue",colors:CP,min:0,max:359,value:h.getHue(),onChange:E,onChangeComplete:C})),!u&&b.createElement(p,ni({},A,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:w}],min:0,max:100,value:h.a*100,onChange:v,onChangeComplete:I}))),b.createElement(gP,{color:h.toRgbString(),prefixCls:o})));return b.createElement("div",{className:N,style:l,ref:t},typeof c=="function"?c(k):k)});process.env.NODE_ENV!=="production"&&(SP.displayName="ColorPicker");const EP=(e,t)=>(e==null?void 0:e.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6))||"",$P=(e,t)=>e?EP(e,t):"";let xc=function(){function e(t){var r;if(ns(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)==null?void 0:r.map(o=>({color:new e(o.color),percent:o.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:o,percent:i})=>({color:new e(o),percent:i})),this.metaColor=new ir(this.colors[0].color.metaColor)):this.metaColor=new ir(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return rs(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return $P(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(o=>`${o.color.toRgbString()} ${o.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,o)=>{const i=n.colors[o];return r.percent===i.percent&&r.color.equals(i.color)}):this.toHexString()===n.toHexString()}}])}();var kP={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function yc(){return yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yc.apply(this,arguments)}const IP=(e,t)=>g.createElement(Jt,yc({},e,{ref:t,icon:kP})),Ia=g.forwardRef(IP);process.env.NODE_ENV!=="production"&&(Ia.displayName="RightOutlined");const RP=e=>e instanceof xc?e:new xc(e),PP=(e,t)=>{const{r:n,g:r,b:o,a:i}=e.toRgb(),a=new ir(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},Yb=e=>{const{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return yt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},Qb=e=>{const t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??la(t),i=e.contentLineHeightSM??la(n),a=e.contentLineHeightLG??la(r),s=PP(new xc(e.colorBgSolid),"#fff")?"#000":"#fff",l=xr.reduce((d,f)=>({...d,[`${f}ShadowColor`]:`0 ${xe(e.controlOutlineWidth)} 0 ${Uo(e[`${f}1`],e.colorBgContainer)}`}),{}),c=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...l,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:s,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:o,contentLineHeightSM:i,contentLineHeightLG:a,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*i)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*a)/2-e.lineWidth,0),defaultBgDisabled:c,dashedBgDisabled:u}},TP=e=>{const{componentCls:t,antCls:n,lineWidth:r,lineType:o}=e,[i,a]=ur(n,"btn");return{[t]:[{[i("border-width")]:r,[i("border-color")]:"#000",[i("border-color-hover")]:a("border-color"),[i("border-color-active")]:a("border-color"),[i("border-color-disabled")]:a("border-color"),[i("border-style")]:o,[i("text-color")]:"#000",[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color"),[i("text-color-disabled")]:a("text-color"),[i("bg-color")]:"#ddd",[i("bg-color-hover")]:a("bg-color"),[i("bg-color-active")]:a("bg-color"),[i("bg-color-disabled")]:e.colorBgContainerDisabled,[i("bg-color-container")]:e.colorBgContainer,[i("shadow")]:"none"},{border:[a("border-width"),a("border-style"),a("border-color")].join(" "),color:a("text-color"),backgroundColor:a("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a("border-width"),a("border-style"),a("border-color-hover")].join(" "),color:a("text-color-hover"),backgroundColor:a("bg-color-hover")},"&:active":{border:[a("border-width"),a("border-style"),a("border-color-active")].join(" "),color:a("text-color-active"),backgroundColor:a("bg-color-active")}}},{[`&${t}-variant-solid`]:{[i("solid-bg-color")]:a("color-base"),[i("solid-bg-color-hover")]:a("color-hover"),[i("solid-bg-color-active")]:a("color-active"),[i("border-color")]:"transparent",[i("text-color")]:e.colorTextLightSolid,[i("bg-color")]:a("solid-bg-color"),[i("bg-color-hover")]:a("solid-bg-color-hover"),[i("bg-color-active")]:a("solid-bg-color-active"),boxShadow:a("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("border-color")]:a("color-base"),[i("border-color-hover")]:a("color-hover"),[i("border-color-active")]:a("color-active"),[i("bg-color")]:a("bg-color-container"),[i("text-color")]:a("color-base"),[i("text-color-hover")]:a("color-hover"),[i("text-color-active")]:a("color-active"),boxShadow:a("shadow")},[`&${t}-variant-dashed`]:{[i("border-style")]:"dashed",[i("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i("border-color")]:"transparent",[i("text-color")]:a("color-base"),[i("bg-color")]:a("color-light"),[i("bg-color-hover")]:a("color-light-hover"),[i("bg-color-active")]:a("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[i("border-color")]:"transparent",[i("text-color")]:a("color-base"),[i("text-color-hover")]:a("color-hover"),[i("text-color-active")]:a("color-active"),[i("bg-color")]:"transparent",[i("bg-color-hover")]:"transparent",[i("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[i("bg-color-hover")]:a("color-light"),[i("bg-color-active")]:a("color-light-active")}},{[`&${t}-variant-link`]:{[i("color-base")]:e.colorLink,[i("color-hover")]:e.colorLinkHover,[i("color-active")]:e.colorLinkActive,[i("bg-color-hover")]:e.linkHoverBg},[`&${t}-color-primary`]:{[i("color-base")]:e.colorPrimary,[i("color-hover")]:e.colorPrimaryHover,[i("color-active")]:e.colorPrimaryActive,[i("color-light")]:e.colorPrimaryBg,[i("color-light-hover")]:e.colorPrimaryBgHover,[i("color-light-active")]:e.colorPrimaryBorder,[i("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[i("text-color")]:e.primaryColor,[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")}},[`&${t}-color-dangerous`]:{[i("color-base")]:e.colorError,[i("color-hover")]:e.colorErrorHover,[i("color-active")]:e.colorErrorActive,[i("color-light")]:e.colorErrorBg,[i("color-light-hover")]:e.colorErrorBgFilledHover,[i("color-light-active")]:e.colorErrorBgActive,[i("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[i("text-color")]:e.dangerColor,[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")}},[`&${t}-color-default`]:{[i("solid-bg-color")]:e.colorBgSolid,[i("solid-bg-color-hover")]:e.colorBgSolidHover,[i("solid-bg-color-active")]:e.colorBgSolidActive,[i("color-base")]:e.defaultBorderColor,[i("color-hover")]:e.defaultHoverBorderColor,[i("color-active")]:e.defaultActiveBorderColor,[i("color-light")]:e.colorFillTertiary,[i("color-light-hover")]:e.colorFillSecondary,[i("color-light-active")]:e.colorFill,[i("text-color")]:e.defaultColor,[i("text-color-hover")]:e.defaultHoverColor,[i("text-color-active")]:e.defaultActiveColor,[i("shadow")]:e.defaultShadow,[`&${t}-variant-outlined`]:{[i("bg-color-disabled")]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[i("text-color")]:e.solidTextColor,[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[i("text-color-hover")]:a("text-color"),[i("text-color-active")]:a("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("text-color")]:e.defaultColor,[i("text-color-hover")]:e.defaultHoverColor,[i("text-color-active")]:e.defaultActiveColor,[i("bg-color-container")]:e.defaultBg,[i("bg-color-hover")]:e.defaultHoverBg,[i("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[i("text-color")]:e.textTextColor,[i("text-color-hover")]:e.textTextHoverColor,[i("text-color-active")]:e.textTextActiveColor,[i("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("text-color")]:e.defaultGhostColor,[i("border-color")]:e.defaultGhostBorderColor}}}},xr.map(s=>{const l=e[`${s}6`],c=e[`${s}1`],u=e[`${s}Hover`],d=e[`${s}2`],f=e[`${s}3`],p=e[`${s}Active`],h=e[`${s}ShadowColor`];return{[`&${t}-color-${s}`]:{[i("color-base")]:l,[i("color-hover")]:u,[i("color-active")]:p,[i("color-light")]:c,[i("color-light-hover")]:d,[i("color-light-active")]:f,[i("shadow")]:h}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:a("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[i("bg-color")]:e.ghostBg,[i("bg-color-hover")]:e.ghostBg,[i("bg-color-active")]:e.ghostBg,[i("shadow")]:"none",[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("bg-color-hover")]:e.ghostBg,[i("bg-color-active")]:e.ghostBg}}}]}},NP=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,iconGap:s,calc:l}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:s,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",...JR(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:Hu(),[`${t}-icon`]:{display:"inline-flex",alignItems:"center",[n]:{verticalAlign:"middle","&:before":{content:'"\\a0"',display:"inline-block",width:0}}},"> a":{color:"currentColor"},"&:not(:disabled)":Ea(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineEnd:l(s).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start, &-appear-prepare, &-enter-prepare":{marginInlineStart:l(s).mul(-1).equal(),opacity:0},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},MP=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),ed=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:o,height:r,padding:`${xe(l)} ${xe(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${t}`]:MP(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},AP=e=>{const t=yt(e,{fontSize:e.contentFontSize});return ed(t,e.componentCls)},zP=e=>{const t=yt(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return ed(t,`${e.componentCls}-sm`)},OP=e=>{const t=yt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return ed(t,`${e.componentCls}-lg`)},DP=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},LP=on("Button",e=>{const t=Yb(e);return[NP(t),AP(t),zP(t),OP(t),DP(t),TP(t),dP(t)]},Qb,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function FP(e,t,n,r){const{focusElCls:o,focus:i,borderElCls:a}=n,s=a?"> *":"",l=s?` ${s}`:"",c=f=>f.filter(Boolean).map(p=>`&:${p}${l}`).join(","),u=c(["hover",o?`hover${o}`:null]),d=c([i?"focus":null,"active"]);return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[d]:{zIndex:3},[u]:{zIndex:4},...o?{[`&${o}`]:{zIndex:3}}:{},[`&[disabled] ${s}`]:{zIndex:0}}}}function _P(e,t,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function td(e,t={focus:!0}){const{componentCls:n}=e,{componentCls:r}=t,o=r||n,i=`${o}-compact`;return{[i]:{...FP(e,i,t,o),..._P(o,i,t)}}}function jP(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}}function BP(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function HP(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:{...jP(e,t,e.componentCls),...BP(e.componentCls,t)}}}const VP=e=>{const{antCls:t,componentCls:n,lineWidth:r,calc:o,colorBgContainer:i}=e,a=`${n}-variant-solid:not([disabled])`,s=o(r).mul(-1).equal(),[l,c]=ur(t,"btn"),u=d=>({[`${n}-compact${d?"-vertical":""}-item`]:{[l("compact-connect-border-color")]:c("bg-color-hover"),[`&${a}`]:{transition:"none",[`& + ${a}:before`]:[{position:"absolute",backgroundColor:c("compact-connect-border-color"),content:'""'},d?{top:s,insetInline:s,height:r}:{insetBlock:s,insetInlineStart:s,width:r}],"&:hover:before":{display:"none"}}}});return[u(),u(!0),{[`${a}${n}-color-default`]:{[l("compact-connect-border-color")]:`color-mix(in srgb, ${c("bg-color-hover")} 75%, ${i})`}}]},WP=sI(["Button","compact"],e=>{const t=Yb(e);return[td(t),HP(t),VP(t)]},Qb);function qP(e){if(rn(e)){let t=e==null?void 0:e.delay;return t=os(t)?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const XP={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},UP=b.forwardRef((e,t)=>{const{_skipSemantic:n,loading:r=!1,prefixCls:o,color:i,variant:a,type:s,danger:l=!1,shape:c,size:u,disabled:d,className:f,rootClassName:p,children:h,icon:m,iconPosition:w,iconPlacement:y,ghost:$=!1,block:x=!1,htmlType:E="button",classNames:v,styles:C,style:I,autoInsertSpace:N,autoFocus:A,...k}=e,R=or(h),O=s||"default",{getPrefixCls:z,direction:D,autoInsertSpace:M,className:L,style:_,classNames:V,styles:X,loadingIcon:P,shape:Y,color:K,variant:T}=Kn("button"),ne=c||Y||"default",[F,U]=b.useMemo(()=>{if(i&&a)return[i,a];if(s||l){const _e=XP[O]||[];return l?["danger",_e[1]]:_e}return a==="solid"?["primary",a]:K&&T?[K,T]:T==="solid"?["primary",T]:["default","outlined"]},[i,a,s,l,K,T,O]),[re,j]=b.useMemo(()=>$&&U==="solid"?[F,"outlined"]:[F,U],[F,U,$]),H=re==="danger",ee=H?"dangerous":re,oe=N??M??!0,B=z("btn",o),[ie,ae]=LP(B),Se=b.useContext(yr),ye=d??Se,q=b.useContext(zb),me=b.useMemo(()=>qP(r),[r]),[he,se]=u$(me.loading),[ue,pe]=b.useState(!1),Ne=b.useRef(null),Ee=Hr(t,Ne),Ie=R.length===1&&!m&&!Ui(j),W=b.useRef(!0);b.useEffect(()=>(W.current=!1,()=>{W.current=!0}),[]),Bt(()=>{me.delay>0?se(!0,{ms:me.delay}):se(me.loading,!0)},[me.delay,me.loading]),b.useEffect(()=>{if(!Ne.current||!oe)return;const _e=Ne.current.textContent||"";Ie&&bc(_e)?ue||pe(!0):ue&&pe(!1)}),b.useEffect(()=>{var _e;A&&((_e=Ne.current)==null||_e.focus())},[]);const Q=b.useCallback(_e=>{var pt;if(he||ye){_e.preventDefault();return}(pt=e.onClick)==null||pt.call(e,("href"in e,_e))},[e.onClick,he,ye]);if(process.env.NODE_ENV!=="production"){const _e=At("Button");process.env.NODE_ENV!=="production"&&_e(!(typeof m=="string"&&m.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${m}\` at https://ant.design/components/icon`),process.env.NODE_ENV!=="production"&&_e(!($&&Ui(j)),"usage","`link` or `text` button can't be a `ghost` button."),_e.deprecated(!w,"iconPosition","iconPlacement")}const{compactSize:le,compactItemClassnames:be}=No(B,D),$e=To(_e=>u??le??q??_e),ce=he?"loading":m,te=y??w??"start",ve=Yt(k,["navigate"]),Re={...e,type:O,color:re,variant:j,danger:H,shape:ne,size:$e,disabled:ye,loading:he,iconPlacement:te},Ue=kt(_),Pe=kt(I),[ze,Me]=Pn([n?void 0:V,v],[n?void 0:X,Ue,C,Pe],{props:Re}),it=Z(B,ie,ae,{[`${B}-${ne}`]:ne!=="default"&&ne!=="square"&&ne,[`${B}-${O}`]:O,[`${B}-dangerous`]:l,[`${B}-color-${ee}`]:ee,[`${B}-variant-${j}`]:j,[`${B}-lg`]:$e==="large",[`${B}-sm`]:$e==="small",[`${B}-icon-only`]:!h&&h!==0&&!!ce,[`${B}-background-ghost`]:$&&!Ui(j),[`${B}-loading`]:he,[`${B}-two-chinese-chars`]:ue&&oe&&!he,[`${B}-block`]:x,[`${B}-rtl`]:D==="rtl",[`${B}-icon-end`]:te==="end"},be,f,p,L,ze.root),Ye={className:ze.icon,style:Me.icon},It=_e=>b.createElement(Ob,{prefixCls:B,...Ye},_e),wt=b.createElement(FR,{existIcon:!!m,prefixCls:B,loading:he,mount:W.current,...Ye}),Ot=rn(r)&&r.icon||P;let gt;m&&!he?gt=It(m):r&&Ot?gt=It(Ot):gt=wt;const _t=yi(h)?LR(h,Ie&&oe,Me.content,ze.content):null;if(ve.href!==void 0)return b.createElement("a",{...ve,className:Z(it,{[`${B}-disabled`]:ye}),href:ye?void 0:ve.href,style:Me.root,onClick:Q,ref:Ee,tabIndex:ye?-1:0,"aria-disabled":ye},gt,_t);let jt=b.createElement("button",{...k,type:E,className:it,style:Me.root,onClick:Q,disabled:ye,ref:Ee},gt,_t,be&&b.createElement(WP,{prefixCls:B}));return Ui(j)||(jt=b.createElement(Mb,{component:"Button",disabled:he},jt)),jt}),ar=UP;ar.Group=OR;ar.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(ar.displayName="Button");const zr="RC_FORM_INTERNAL_HOOKS",ot=()=>{tt(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},yo=g.createContext({getFieldValue:ot,getFieldsValue:ot,getFieldError:ot,getFieldWarning:ot,getFieldsError:ot,isFieldsTouched:ot,isFieldTouched:ot,isFieldValidating:ot,isFieldsValidating:ot,resetFields:ot,setFields:ot,setFieldValue:ot,setFieldsValue:ot,validateFields:ot,submit:ot,getInternalHooks:()=>(ot(),{dispatch:ot,initEntityValue:ot,registerField:ot,useSubscribe:ot,setInitialValues:ot,destroyForm:ot,setCallbacks:ot,registerWatch:ot,getFields:ot,setValidateMessages:ot,setPreserve:ot,getInitialValue:ot})}),Ra=g.createContext(null);function wc(e){return e==null?[]:Array.isArray(e)?e:[e]}function GP(e){return e&&!!e._init}function vc(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone(){const e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}const tl=vc(),KP=/%[sdj%]/g;let Zb=()=>{};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(Zb=(e,t)=>{typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&t.every(n=>typeof n=="string")&&console.warn(e,t)});function Cc(e){if(!e||!e.length)return null;const t={};return e.forEach(n=>{const r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function yn(e,...t){let n=0;const r=t.length;return typeof e=="function"?e.apply(null,t):typeof e=="string"?e.replace(KP,i=>{if(i==="%%")return"%";if(n>=r)return i;switch(i){case"%s":return String(t[n++]);case"%d":return Number(t[n++]);case"%j":try{return JSON.stringify(t[n++])}catch{return"[Circular]"}break;default:return i}}):e}function YP(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function zt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||YP(t)&&typeof e=="string"&&!e)}function QP(e,t,n){const r=[];let o=0;const i=e.length;function a(s){r.push(...s||[]),o++,o===i&&n(r)}e.forEach(s=>{t(s,a)})}function Op(e,t,n){let r=0;const o=e.length;function i(a){if(a&&a.length){n(a);return}const s=r;r=r+1,s<o?t(e[s],i):n([])}i([])}function ZP(e){const t=[];return Object.keys(e).forEach(n=>{t.push(...e[n]||[])}),t}class Dp extends Error{constructor(n,r){super("Async Validation Error");J(this,"errors");J(this,"fields");this.errors=n,this.fields=r}}function JP(e,t,n,r,o){if(t.first){const d=new Promise((f,p)=>{const h=w=>(r(w),w.length?p(new Dp(w,Cc(w))):f(o)),m=ZP(e);Op(m,n,h)});return d.catch(f=>f),d}const i=t.firstFields===!0?Object.keys(e):t.firstFields||[],a=Object.keys(e),s=a.length;let l=0;const c=[],u=new Promise((d,f)=>{const p=h=>{if(c.push.apply(c,h),l++,l===s)return r(c),c.length?f(new Dp(c,Cc(c))):d(o)};a.length||(r(c),d(o)),a.forEach(h=>{const m=e[h];i.indexOf(h)!==-1?Op(m,n,p):QP(m,n,p)})});return u.catch(d=>d),u}function eT(e){return!!(e&&e.message!==void 0)}function tT(e,t){let n=e;for(let r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function Lp(e,t){return n=>{let r;return e.fullFields?r=tT(t,e.fullFields):r=t[n.field||e.fullField],eT(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function Fp(e,t){if(t){for(const n in t)if(t.hasOwnProperty(n)){const r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]={...e[n],...r}:e[n]=r}}return e}const Kr="enum",nT=(e,t,n,r,o)=>{e[Kr]=Array.isArray(e[Kr])?e[Kr]:[],e[Kr].indexOf(t)===-1&&r.push(yn(o.messages[Kr],e.fullField,e[Kr].join(", ")))},rT=(e,t,n,r,o)=>{e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(yn(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):typeof e.pattern=="string"&&(new RegExp(e.pattern).test(t)||r.push(yn(o.messages.pattern.mismatch,e.fullField,t,e.pattern))))},oT=(e,t,n,r,o)=>{const i=typeof e.len=="number",a=typeof e.min=="number",s=typeof e.max=="number",l=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let c=t,u=null;const d=typeof t=="number",f=typeof t=="string",p=Array.isArray(t);if(d?u="number":f?u="string":p&&(u="array"),!u)return!1;p&&(c=t.length),f&&(c=t.replace(l,"_").length),i?c!==e.len&&r.push(yn(o.messages[u].len,e.fullField,e.len)):a&&!s&&c<e.min?r.push(yn(o.messages[u].min,e.fullField,e.min)):s&&!a&&c>e.max?r.push(yn(o.messages[u].max,e.fullField,e.max)):a&&s&&(c<e.min||c>e.max)&&r.push(yn(o.messages[u].range,e.fullField,e.min,e.max))},Jb=(e,t,n,r,o,i)=>{e.required&&(!n.hasOwnProperty(e.field)||zt(t,i||e.type))&&r.push(yn(o.messages.required,e.fullField))};let Gi;const iT=()=>{if(Gi)return Gi;const e="[a-fA-F\\d:]",t=v=>v&&v.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|$))`:"",n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",a=`(?:${[`(?:${r}:){7}(?:${r}|:)`,`(?:${r}:){6}(?:${n}|:${r}|:)`,`(?:${r}:){5}(?::${n}|(?::${r}){1,2}|:)`,`(?:${r}:){4}(?:(?::${r}){0,1}:${n}|(?::${r}){1,3}|:)`,`(?:${r}:){3}(?:(?::${r}){0,2}:${n}|(?::${r}){1,4}|:)`,`(?:${r}:){2}(?:(?::${r}){0,3}:${n}|(?::${r}){1,5}|:)`,`(?:${r}:){1}(?:(?::${r}){0,4}:${n}|(?::${r}){1,6}|:)`,`(?::(?:(?::${r}){0,5}:${n}|(?::${r}){1,7}|:))`].join("|")})(?:%[0-9a-zA-Z]{1,})?`,s=new RegExp(`(?:^${n}$)|(?:^${a}$)`),l=new RegExp(`^${n}$`),c=new RegExp(`^${a}$`),u=v=>v&&v.exact?s:new RegExp(`(?:${t(v)}${n}${t(v)})|(?:${t(v)}${a}${t(v)})`,"g");u.v4=v=>v&&v.exact?l:new RegExp(`${t(v)}${n}${t(v)}`,"g"),u.v6=v=>v&&v.exact?c:new RegExp(`${t(v)}${a}${t(v)}`,"g");const d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,h=u.v6().source,E=`(?:${d}|www\\.)${f}(?:localhost|${p}|${h}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return Gi=new RegExp(`(?:^${E}$)`,"i"),Gi},nl={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Go={integer(e){return Go.number(e)&&parseInt(e,10)===e},float(e){return Go.number(e)&&!Go.integer(e)},array(e){return Array.isArray(e)},regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number(e){return isNaN(e)?!1:typeof e=="number"},object(e){return typeof e=="object"&&!Go.array(e)},method(e){return typeof e=="function"},email(e){return typeof e=="string"&&e.length<=320&&!!e.match(nl.email)},tel(e){return typeof e=="string"&&e.length<=32&&!!e.match(nl.tel)},url(e){return typeof e=="string"&&e.length<=2048&&!!e.match(iT())},hex(e){return typeof e=="string"&&!!e.match(nl.hex)}},aT=(e,t,n,r,o)=>{if(e.required&&t===void 0){Jb(e,t,n,r,o);return}const i=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],a=e.type;i.indexOf(a)>-1?Go[a](t)||r.push(yn(o.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(yn(o.messages.types[a],e.fullField,e.type))},sT=(e,t,n,r,o)=>{(/^\s+$/.test(t)||t==="")&&r.push(yn(o.messages.whitespace,e.fullField))},Xe={required:Jb,whitespace:sT,type:aT,range:oT,enum:nT,pattern:rT},lT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o)}n(i)},cT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t==null&&!e.required)return n();Xe.required(e,t,r,i,o,"array"),t!=null&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},uT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe.type(e,t,r,i,o)}n(i)},dT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"date")&&!e.required)return n();if(Xe.required(e,t,r,i,o),!zt(t,"date")){let s;t instanceof Date?s=t:s=new Date(t),Xe.type(e,s,r,i,o),s&&Xe.range(e,s.getTime(),r,i,o)}}n(i)},fT="enum",pT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe[fT](e,t,r,i,o)}n(i)},mT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},gT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},hT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe.type(e,t,r,i,o)}n(i)},bT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(t===""&&(t=void 0),zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o))}n(i)},xT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),t!==void 0&&Xe.type(e,t,r,i,o)}n(i)},yT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"string")&&!e.required)return n();Xe.required(e,t,r,i,o),zt(t,"string")||Xe.pattern(e,t,r,i,o)}n(i)},wT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t)&&!e.required)return n();Xe.required(e,t,r,i,o),zt(t)||Xe.type(e,t,r,i,o)}n(i)},vT=(e,t,n,r,o)=>{const i=[],a=Array.isArray(t)?"array":typeof t;Xe.required(e,t,r,i,o,a),n(i)},CT=(e,t,n,r,o)=>{const i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,"string")&&!e.required)return n();Xe.required(e,t,r,i,o,"string"),zt(t,"string")||(Xe.type(e,t,r,i,o),Xe.range(e,t,r,i,o),Xe.pattern(e,t,r,i,o),e.whitespace===!0&&Xe.whitespace(e,t,r,i,o))}n(i)},Ki=(e,t,n,r,o)=>{const i=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(zt(t,i)&&!e.required)return n();Xe.required(e,t,r,a,o,i),zt(t,i)||Xe.type(e,t,r,a,o)}n(a)},jo={string:CT,method:hT,number:bT,boolean:uT,regexp:wT,integer:gT,float:mT,array:cT,object:xT,enum:pT,pattern:yT,date:dT,url:Ki,hex:Ki,email:Ki,tel:Ki,required:vT,any:lT},mr=class mr{constructor(t){J(this,"rules",null);J(this,"_messages",tl);this.define(t)}define(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(n=>{const r=t[n];this.rules[n]=Array.isArray(r)?r:[r]})}messages(t){return t&&(this._messages=Fp(vc(),t)),this._messages}validate(t,n={},r=()=>{}){let o=t,i=n,a=r;if(typeof i=="function"&&(a=i,i={}),!this.rules||Object.keys(this.rules).length===0)return a&&a(null,o),Promise.resolve(o);function s(d){let f=[],p={};function h(m){Array.isArray(m)?f=f.concat(...m):f.push(m)}for(let m=0;m<d.length;m++)h(d[m]);f.length?(p=Cc(f),a(f,p)):a(null,o)}if(i.messages){let d=this.messages();d===tl&&(d=vc()),Fp(d,i.messages),i.messages=d}else i.messages=this.messages();const l={};(i.keys||Object.keys(this.rules)).forEach(d=>{const f=this.rules[d];let p=o[d];f.forEach(h=>{let m=h;typeof m.transform=="function"&&(o===t&&(o={...o}),p=o[d]=m.transform(p),p!=null&&(m.type=m.type||(Array.isArray(p)?"array":typeof p))),typeof m=="function"?m={validator:m}:m={...m},m.validator=this.getValidationMethod(m),m.validator&&(m.field=d,m.fullField=m.fullField||d,m.type=this.getType(m),l[d]=l[d]||[],l[d].push({rule:m,value:p,source:o,field:d}))})});const u={};return JP(l,i,(d,f)=>{var $;const p=d.rule;let h=(p.type==="object"||p.type==="array")&&(typeof p.fields=="object"||typeof p.defaultField=="object");h=h&&(p.required||!p.required&&d.value),p.field=d.field;function m(x,E){return{...E,fullField:`${p.fullField}.${x}`,fullFields:p.fullFields?[...p.fullFields,x]:[x]}}function w(x=[]){let E=Array.isArray(x)?x:[x];!i.suppressWarning&&E.length&&mr.warning("async-validator:",E),E.length&&p.message!==void 0&&p.message!==null&&(E=[].concat(p.message));let v=E.map(Lp(p,o));if(i.first&&v.length)return u[p.field]=1,f(v);if(!h)f(v);else{if(p.required&&!d.value)return p.message!==void 0?v=[].concat(p.message).map(Lp(p,o)):i.error&&(v=[i.error(p,yn(i.messages.required,p.field))]),f(v);let C={};p.defaultField&&Object.keys(d.value).map(A=>{C[A]=p.defaultField}),C={...C,...d.rule.fields};const I={};Object.keys(C).forEach(A=>{const k=C[A],R=Array.isArray(k)?k:[k];I[A]=R.map(m.bind(null,A))});const N=new mr(I);N.messages(i.messages),d.rule.options&&(d.rule.options.messages=i.messages,d.rule.options.error=i.error),N.validate(d.value,d.rule.options||i,A=>{const k=[];v&&v.length&&k.push(...v),A&&A.length&&k.push(...A),f(k.length?k:null)})}}let y;if(p.asyncValidator)y=p.asyncValidator(p,d.value,w,d.source,i);else if(p.validator){try{y=p.validator(p,d.value,w,d.source,i)}catch(x){($=console.error)==null||$.call(console,x),i.suppressValidatorError||setTimeout(()=>{throw x},0),w(x.message)}y===!0?w():y===!1?w(typeof p.message=="function"?p.message(p.fullField||p.field):p.message||`${p.fullField||p.field} fails`):y instanceof Array?w(y):y instanceof Error&&w(y.message)}y&&y.then&&y.then(()=>w(),x=>w(x))},d=>{s(d)},o)}getType(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!jo.hasOwnProperty(t.type))throw new Error(yn("Unknown rule type %s",t.type));return t.type||"string"}getValidationMethod(t){if(typeof t.validator=="function")return t.validator;const n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?jo.required:jo[this.getType(t)]||void 0}};J(mr,"register",function(n,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");jo[n]=r}),J(mr,"warning",Zb),J(mr,"messages",tl),J(mr,"validators",jo);let Sc=mr;const sn="'${name}' is not a valid ${type}",ex={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:sn,method:sn,array:sn,object:sn,number:sn,date:sn,boolean:sn,integer:sn,float:sn,regexp:sn,email:sn,tel:sn,url:sn,hex:sn},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},_p=Sc;function ST(e,t){return e.replace(/\\?\$\{\w+\}/g,n=>{if(n.startsWith("\\"))return n.slice(1);const r=n.slice(2,-1);return t[r]})}const jp="CODE_LOGIC_ERROR";async function Ec(e,t,n,r,o){const i={...n};if(delete i.ruleIndex,_p.warning=()=>{},i.validator){const f=i.validator;i.validator=(...p)=>{try{return f(...p)}catch(h){return console.error(h),Promise.reject(jp)}}}let a=null;i&&i.type==="array"&&i.defaultField&&(a=i.defaultField,delete i.defaultField);const s=new _p({[e]:[i]}),l=oo(ex,r.validateMessages);s.messages(l);let c=[];try{await Promise.resolve(s.validate({[e]:t},{...r}))}catch(f){f.errors&&(c=f.errors.map(({message:p},h)=>{const m=p===jp?l.default:p;return g.isValidElement(m)?g.cloneElement(m,{key:`error_${h}`}):m}))}if(!c.length&&a&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((p,h)=>Ec(`${e}.${h}`,p,a,r,o)))).reduce((p,h)=>[...p,...h],[]);const u={...n,name:e,enum:(n.enum||[]).join(", "),...o};return c.map(f=>typeof f=="string"?ST(f,u):f)}function ET(e,t,n,r,o,i){const a=e.join("."),s=n.map((c,u)=>{const d=c.validator,f={...c,ruleIndex:u};return d&&(f.validator=(p,h,m)=>{let w=!1;const $=d(p,h,(...x)=>{Promise.resolve().then(()=>{tt(!w,"Your validator function has already return a promise. `callback` will be ignored."),w||m(...x)})});w=$&&typeof $.then=="function"&&typeof $.catch=="function",tt(w,"`callback` is deprecated. Please return a promise instead."),w&&$.then(()=>{m()}).catch(x=>{m(x||" ")})}),f}).sort(({warningOnly:c,ruleIndex:u},{warningOnly:d,ruleIndex:f})=>!!c==!!d?u-f:c?1:-1);let l;if(o===!0)l=new Promise(async(c,u)=>{for(let d=0;d<s.length;d+=1){const f=s[d],p=await Ec(a,t,f,r,i);if(p.length){u([{errors:p,rule:f}]);return}}c([])});else{const c=s.map(u=>Ec(a,t,u,r,i).then(d=>({errors:d,rule:u})));l=(o?kT(c):$T(c)).then(u=>Promise.reject(u))}return l.catch(c=>c),l}async function $T(e){return Promise.all(e).then(t=>[].concat(...t))}async function kT(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(o=>{o.errors.length&&n([o]),t+=1,t===e.length&&n([])})})})}function bt(e){return wc(e)}function Bp(e,t){let n={};return t.forEach(r=>{const o=In(e,r);n=xn(n,r,o)}),n}function fo(e,t,n=!1){return e&&e.some(r=>Pa(t,r,n))}function Pa(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((r,o)=>e[o]===r)}function IT(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(i=>{const a=e[i],s=t[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function RT(e,...t){const n=t[0];return n&&n.target&&typeof n.target=="object"&&e in n.target?n.target[e]:n}function Hp(e,t,n){const{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;const o=e[t],i=t-n;return i>0?[...e.slice(0,n),o,...e.slice(n,t),...e.slice(t+1,r)]:i<0?[...e.slice(0,t),...e.slice(t+1,n+1),o,...e.slice(n+1,r)]:e}const tx=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)};class PT{constructor(t){J(this,"namePathList",[]);J(this,"taskId",0);J(this,"watcherList",new Set);J(this,"form");this.form=t}register(t){return this.watcherList.add(t),()=>{this.watcherList.delete(t)}}notify(t){t.forEach(n=>{this.namePathList.every(r=>!Pa(r,n))&&this.namePathList.push(n)}),this.doBatch()}doBatch(){this.taskId+=1;const t=this.taskId;tx(()=>{if(t===this.taskId&&this.watcherList.size){const n=this.form.getForm(),r=n.getFieldsValue(),o=n.getFieldsValue(!0);this.watcherList.forEach(i=>{i(r,o,this.namePathList)}),this.namePathList=[]}})}}async function TT(){return new Promise(e=>{tx(()=>{xt(()=>{e()})})})}function $c(){return $c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$c.apply(this,arguments)}const Ir=[],Bo=[];function rl(e,t,n,r,o,i){return typeof e=="function"?e(t,n,"source"in i?{source:i.source}:{}):r!==o}class nx extends g.PureComponent{constructor(n){super(n);J(this,"state",{resetCount:0});J(this,"cancelRegisterFunc",null);J(this,"mounted",!1);J(this,"touched",!1);J(this,"dirty",!1);J(this,"validatePromise");J(this,"prevValidating");J(this,"errors",Ir);J(this,"warnings",Bo);J(this,"cancelRegister",()=>{const{preserve:n,isListField:r,name:o}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(r,n,bt(o)),this.cancelRegisterFunc=null});J(this,"getNamePath",()=>{const{name:n,fieldContext:r}=this.props,{prefixName:o=[]}=r;return n!==void 0?[...o,...n]:[]});J(this,"getRules",()=>{const{rules:n=[],fieldContext:r}=this.props;return n.map(o=>typeof o=="function"?o(r):o)});J(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:n})=>({resetCount:n+1}))});J(this,"metaCache",null);J(this,"triggerMetaEvent",n=>{const{onMetaChange:r}=this.props;if(r){const o={...this.getMeta(),destroy:n};ai(this.metaCache,o)||r(o),this.metaCache=o}else this.metaCache=null});J(this,"onStoreChange",(n,r,o)=>{const{shouldUpdate:i,dependencies:a=[],onReset:s}=this.props,{store:l}=o,c=this.getNamePath(),u=this.getValue(n),d=this.getValue(l),f=r&&fo(r,c);switch(o.type==="valueUpdate"&&o.source==="external"&&!ai(u,d)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=Ir,this.warnings=Bo,this.triggerMetaEvent()),o.type){case"reset":if(!r||f){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=Ir,this.warnings=Bo,this.triggerMetaEvent(),s==null||s(),this.refresh();return}break;case"remove":{if(i&&rl(i,n,l,u,d,o)){this.reRender();return}break}case"setField":{const{data:p}=o;if(f){"touched"in p&&(this.touched=p.touched),"validating"in p&&!("originRCField"in p)&&(this.validatePromise=p.validating?Promise.resolve([]):null),"errors"in p&&(this.errors=p.errors||Ir),"warnings"in p&&(this.warnings=p.warnings||Bo),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in p&&fo(r,c,!0)){this.reRender();return}if(i&&!c.length&&rl(i,n,l,u,d,o)){this.reRender();return}break}case"dependenciesUpdate":{if(a.map(bt).some(h=>fo(o.relatedFields,h))){this.reRender();return}break}default:if(f||(!a.length||c.length||i)&&rl(i,n,l,u,d,o)){this.reRender();return}break}i===!0&&this.reRender()});J(this,"validateRules",n=>{const r=this.getNamePath(),o=this.getValue(),{triggerName:i,validateOnly:a=!1,delayFrame:s}=n||{},l=Promise.resolve().then(async()=>{if(!this.mounted)return[];const{validateFirst:c=!1,messageVariables:u,validateDebounce:d}=this.props;s&&await TT();let f=this.getRules();if(i&&(f=f.filter(h=>h).filter(h=>{const{validateTrigger:m}=h;return m?wc(m).includes(i):!0})),d&&i&&(await new Promise(h=>{setTimeout(h,d)}),this.validatePromise!==l))return[];const p=ET(r,o,f,n,c,u);return p.catch(h=>h).then((h=Ir)=>{var m;if(this.validatePromise===l){this.validatePromise=null;const w=[],y=[];(m=h.forEach)==null||m.call(h,({rule:{warningOnly:$},errors:x=Ir})=>{$?y.push(...x):w.push(...x)}),this.errors=w,this.warnings=y,this.triggerMetaEvent(),this.reRender()}}),p});return a||(this.validatePromise=l,this.dirty=!0,this.errors=Ir,this.warnings=Bo,this.triggerMetaEvent(),this.reRender()),l});J(this,"isFieldValidating",()=>!!this.validatePromise);J(this,"isFieldTouched",()=>this.touched);J(this,"isFieldDirty",()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;const{fieldContext:n}=this.props,{getInitialValue:r}=n.getInternalHooks(zr);return r(this.getNamePath())!==void 0});J(this,"getErrors",()=>this.errors);J(this,"getWarnings",()=>this.warnings);J(this,"isListField",()=>this.props.isListField);J(this,"isList",()=>this.props.isList);J(this,"isPreserve",()=>this.props.preserve);J(this,"getMeta",()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null}));J(this,"getOnlyChild",n=>{if(typeof n=="function"){const o=this.getMeta();return{...this.getOnlyChild(n(this.getControlled(),o,this.props.fieldContext)),isFunction:!0}}const r=or(n);return r.length!==1||!g.isValidElement(r[0])?{child:r,isFunction:!1}:{child:r[0],isFunction:!1}});J(this,"getValue",n=>{const{getFieldsValue:r}=this.props.fieldContext,o=this.getNamePath();return In(n||r(!0),o)});J(this,"getControlled",(n={})=>{const{name:r,trigger:o="onChange",validateTrigger:i,getValueFromEvent:a,normalize:s,valuePropName:l="value",getValueProps:c,fieldContext:u}=this.props,d=i!==void 0?i:u.validateTrigger,f=this.getNamePath(),{getInternalHooks:p,getFieldsValue:h}=u,{dispatch:m}=p(zr),w=this.getValue(),y=c||(C=>({[l]:C})),$=n[o],x=r!==void 0?y(w):{};process.env.NODE_ENV!=="production"&&x&&Object.keys(x).forEach(C=>{tt(typeof x[C]!="function",`It's not recommended to generate dynamic function prop by \`getValueProps\`. Please pass it to child component directly (prop: ${C})`)});const E={...n,...x};return E[o]=(...C)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();const I=this.getValue();let N;a?N=a(...C):N=RT(l,...C),s&&(N=s(N,I,h(!0))),N!==I&&m({type:"updateValue",namePath:f,value:N}),$&&$(...C)},wc(d||[]).forEach(C=>{const I=E[C];E[C]=(...N)=>{I&&I(...N);const{rules:A}=this.props;A&&A.length&&m({type:"validateField",namePath:f,triggerName:C})}}),E});if(n.fieldContext){const{getInternalHooks:r}=n.fieldContext,{initEntityValue:o}=r(zr);o(this)}}componentDidMount(){const{shouldUpdate:n,fieldContext:r}=this.props;if(this.mounted=!0,r){const{getInternalHooks:o}=r,{registerField:i}=o(zr);this.cancelRegisterFunc=i(this)}n===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}reRender(){this.mounted&&this.forceUpdate()}render(){const{resetCount:n}=this.state,{children:r}=this.props,{child:o,isFunction:i}=this.getOnlyChild(r);let a;return i?a=o:g.isValidElement(o)?a=g.cloneElement(o,this.getControlled(o.props)):(tt(!o,"`children` of Field is not validate ReactElement."),a=o),g.createElement(g.Fragment,{key:n},a)}}J(nx,"contextType",yo);function rx({name:e,...t}){const n=g.useContext(yo),r=g.useContext(Ra),o=e!==void 0?bt(e):void 0,i=t.isListField??!!r;let a="keep";return i||(a=`_${(o||[]).join("_")}`),process.env.NODE_ENV!=="production"&&t.preserve===!1&&i&&o.length<=1&&tt(!1,"`preserve` should not apply on Form.List fields."),g.createElement(nx,$c({key:a,name:o,isListField:i},t,{fieldContext:n}))}function NT({name:e,initialValue:t,children:n,rules:r,validateTrigger:o,isListField:i}){const a=g.useContext(yo),s=g.useContext(Ra),c=g.useRef({keys:[],id:0}).current,u=g.useMemo(()=>[...bt(a.prefixName)||[],...bt(e)],[a.prefixName,e]),d=g.useMemo(()=>({...a,prefixName:u}),[a,u]),f=g.useMemo(()=>({getKey:h=>{const m=u.length,w=h[m];return[c.keys[w],h.slice(m+1)]}}),[c,u]);if(typeof n!="function")return tt(!1,"Form.List only accepts function as children."),null;const p=(h,m,{source:w})=>w==="internal"?!1:h!==m;return g.createElement(Ra.Provider,{value:f},g.createElement(yo.Provider,{value:d},g.createElement(rx,{name:[],shouldUpdate:p,rules:r,validateTrigger:o,initialValue:t,isList:!0,isListField:i??!!s},({value:h=[],onChange:m},w)=>{const{getFieldValue:y}=a,$=()=>y(u||[])||[],x={add:(v,C)=>{const I=$();C>=0&&C<=I.length?(c.keys=[...c.keys.slice(0,C),c.id,...c.keys.slice(C)],m([...I.slice(0,C),v,...I.slice(C)])):(process.env.NODE_ENV!=="production"&&(C<0||C>I.length)&&tt(!1,"The second parameter of the add function should be a valid positive number."),c.keys=[...c.keys,c.id],m([...I,v])),c.id+=1},remove:v=>{const C=$(),I=new Set(Array.isArray(v)?v:[v]);I.size<=0||(c.keys=c.keys.filter((N,A)=>!I.has(A)),m(C.filter((N,A)=>!I.has(A))))},move(v,C){if(v===C)return;const I=$();v<0||v>=I.length||C<0||C>=I.length||(c.keys=Hp(c.keys,v,C),m(Hp(I,v,C)))}};let E=h||[];return Array.isArray(E)||(E=[],process.env.NODE_ENV!=="production"&&tt(!1,`Current value of '${u.join(" > ")}' is not an array type.`)),n(E.map((v,C)=>{let I=c.keys[C];return I===void 0&&(c.keys[C]=c.id,I=c.keys[C],c.id+=1),{name:C,key:I,isListField:!0}}),x,w)})))}function MT(e){let t=!1,n=e.length;const r=[];return e.length?new Promise((o,i)=>{e.forEach((a,s)=>{a.catch(l=>(t=!0,l)).then(l=>{n-=1,r[s]=l,!(n>0)&&(t&&i(r),o(r))})})}):Promise.resolve([])}const kc="__@field_split__";function Yi(e){return e.map(t=>`${typeof t}:${t}`).join(kc)}class Yr{constructor(){J(this,"kvs",new Map)}set(t,n){this.kvs.set(Yi(t),n)}get(t){return this.kvs.get(Yi(t))}getAsPrefix(t){const n=Yi(t),r=n+kc,o=[],i=this.kvs.get(n);return i!==void 0&&o.push(i),this.kvs.forEach((a,s)=>{s.startsWith(r)&&o.push(a)}),o}update(t,n){const r=this.get(t),o=n(r);o?this.set(t,o):this.delete(t)}delete(t){this.kvs.delete(Yi(t))}map(t){return[...this.kvs.entries()].map(([n,r])=>{const o=n.split(kc);return t({key:o.map(i=>{const[,a,s]=i.match(/^([^:]*):(.*)$/);return a==="number"?Number(s):s}),value:r})})}toJSON(){const t={};return this.map(({key:n,value:r})=>(t[n.join(".")]=r,null)),t}}class AT{constructor(t){J(this,"formHooked",!1);J(this,"forceRootUpdate");J(this,"subscribable",!0);J(this,"store",{});J(this,"fieldEntities",[]);J(this,"initialValues",{});J(this,"callbacks",{});J(this,"validateMessages",null);J(this,"preserve",null);J(this,"lastValidatePromise",null);J(this,"watcherCenter",new PT(this));J(this,"getForm",()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks}));J(this,"getInternalHooks",t=>t===zr?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(tt(!1,"`getInternalHooks` is internal usage. Should not call directly."),null));J(this,"useSubscribe",t=>{this.subscribable=t});J(this,"prevWithoutPreserves",null);J(this,"setInitialValues",(t,n)=>{var r;if(this.initialValues=t||{},n){let o=oo(t,this.store);(r=this.prevWithoutPreserves)==null||r.map(({key:i})=>{o=xn(o,i,In(t,i))}),this.prevWithoutPreserves=null,this.updateStore(o)}});J(this,"destroyForm",t=>{if(t)this.updateStore({});else{const n=new Yr;this.getFieldEntities(!0).forEach(r=>{this.isMergedPreserve(r.isPreserve())||n.set(r.getNamePath(),!0)}),this.prevWithoutPreserves=n}});J(this,"getInitialValue",t=>{const n=In(this.initialValues,t);return t.length?oo(n):n});J(this,"setCallbacks",t=>{this.callbacks=t});J(this,"setValidateMessages",t=>{this.validateMessages=t});J(this,"setPreserve",t=>{this.preserve=t});J(this,"registerWatch",t=>this.watcherCenter.register(t));J(this,"notifyWatch",(t=[])=>{this.watcherCenter.notify(t)});J(this,"timeoutId",null);J(this,"warningUnhooked",()=>{process.env.NODE_ENV!=="production"&&!this.timeoutId&&typeof window<"u"&&(this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.formHooked||tt(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))});J(this,"updateStore",t=>{this.store=t});J(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(n=>n.getNamePath().length):this.fieldEntities);J(this,"getFieldsMap",(t=!1)=>{const n=new Yr;return this.getFieldEntities(t).forEach(r=>{const o=r.getNamePath();n.set(o,r)}),n});J(this,"getFieldEntitiesForNamePathList",(t,n=!1)=>{if(!t)return this.getFieldEntities(!0);const r=this.getFieldsMap(!0);return n?t.flatMap(o=>{const i=bt(o),a=r.getAsPrefix(i);return a.length?a:[{INVALIDATE_NAME_PATH:i}]}):t.map(o=>{const i=bt(o);return r.get(i)||{INVALIDATE_NAME_PATH:bt(o)}})});J(this,"getFieldsValue",(t,n)=>{this.warningUnhooked();let r,o;if(t===!0||Array.isArray(t)?(r=t,o=n):t&&typeof t=="object"&&(o=t.filter),r===!0&&!o)return this.store;const i=this.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null,!0),a=[],s=[];i.forEach(c=>{var d;const u=c.INVALIDATE_NAME_PATH||c.getNamePath();if((d=c.isList)!=null&&d.call(c)){s.push(u);return}if(!o)a.push(u);else{const f="getMeta"in c?c.getMeta():null;o(f)&&a.push(u)}});let l=Bp(this.store,a.map(bt));return s.forEach(c=>{In(l,c)||(l=xn(l,c,[]))}),l});J(this,"getFieldValue",t=>{this.warningUnhooked();const n=bt(t);return In(this.store,n)});J(this,"getFieldsError",t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((r,o)=>r&&!r.INVALIDATE_NAME_PATH?{name:r.getNamePath(),errors:r.getErrors(),warnings:r.getWarnings()}:{name:bt(t[o]),errors:[],warnings:[]})));J(this,"getFieldError",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].errors});J(this,"getFieldWarning",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].warnings});J(this,"isFieldsTouched",(...t)=>{this.warningUnhooked();const[n,r]=t;let o,i=!1;t.length===0?o=null:t.length===1?Array.isArray(n)?(o=n.map(bt),i=!1):(o=null,i=n):(o=n.map(bt),i=r);const a=this.getFieldEntities(!0),s=d=>d.isFieldTouched();if(!o)return i?a.every(d=>s(d)||d.isList()):a.some(s);const l=new Yr;o.forEach(d=>{l.set(d,[])}),a.forEach(d=>{const f=d.getNamePath();o.forEach(p=>{p.every((h,m)=>f[m]===h)&&l.update(p,h=>[...h,d])})});const c=d=>d.some(s),u=l.map(({value:d})=>d);return i?u.every(c):u.some(c)});J(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t])));J(this,"isFieldsValidating",t=>{this.warningUnhooked();const n=this.getFieldEntities();if(!t)return n.some(o=>o.isFieldValidating());const r=t.map(bt);return n.some(o=>{const i=o.getNamePath();return fo(r,i)&&o.isFieldValidating()})});J(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t])));J(this,"resetWithFieldInitialValue",(t={})=>{const n=new Yr,r=this.getFieldEntities(!0);r.forEach(a=>{const{initialValue:s}=a.props,l=a.getNamePath();if(s!==void 0){const c=n.get(l)||new Set;c.add({entity:a,value:s}),n.set(l,c)}});const o=a=>{a.forEach(s=>{const{initialValue:l}=s.props;if(l!==void 0){const c=s.getNamePath();if(this.getInitialValue(c)!==void 0)tt(!1,`Form already set 'initialValues' with path '${c.join(".")}'. Field can not overwrite it.`);else{const d=n.get(c);if(d&&d.size>1)tt(!1,`Multiple Field with path '${c.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(d){const f=this.getFieldValue(c);!s.isListField()&&(!t.skipExist||f===void 0)&&this.updateStore(xn(this.store,c,[...d][0].value))}}}})};let i;t.entities?i=t.entities:t.namePathList?(i=[],t.namePathList.forEach(a=>{const s=n.get(a);s&&i.push(...[...s].map(l=>l.entity))})):i=r,o(i)});J(this,"resetFields",t=>{this.warningUnhooked();const n=this.store;if(!t){this.updateStore(oo(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(n,null,{type:"reset"}),this.notifyWatch();return}const r=t.map(bt);r.forEach(o=>{const i=this.getInitialValue(o);this.updateStore(xn(this.store,o,i))}),this.resetWithFieldInitialValue({namePathList:r}),this.notifyObservers(n,r,{type:"reset"}),this.notifyWatch(r)});J(this,"setFields",t=>{this.warningUnhooked();const n=this.store,r=[];t.forEach(o=>{const{name:i,...a}=o,s=bt(i);r.push(s),"value"in a&&this.updateStore(xn(this.store,s,a.value)),this.notifyObservers(n,[s],{type:"setField",data:o})}),this.notifyWatch(r)});J(this,"getFields",()=>this.getFieldEntities(!0).map(r=>{const o=r.getNamePath(),a={...r.getMeta(),name:o,value:this.getFieldValue(o)};return Object.defineProperty(a,"originRCField",{value:!0}),a}));J(this,"initEntityValue",t=>{const{initialValue:n}=t.props;if(n!==void 0){const r=t.getNamePath();In(this.store,r)===void 0&&this.updateStore(xn(this.store,r,n))}});J(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0);J(this,"registerField",t=>{this.fieldEntities.push(t);const n=t.getNamePath();if(this.notifyWatch([n]),t.props.initialValue!==void 0){const r=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:!0}),this.notifyObservers(r,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return(r,o,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(a=>a!==t),!this.isMergedPreserve(o)&&(!r||i.length>1)){const a=r?void 0:this.getInitialValue(n);if(n.length&&this.getFieldValue(n)!==a&&this.fieldEntities.every(s=>!Pa(s.getNamePath(),n))){const s=this.store;this.updateStore(xn(s,n,a,!0)),this.notifyObservers(s,[n],{type:"remove"}),this.triggerDependenciesUpdate(s,n)}}this.notifyWatch([n])}});J(this,"dispatch",t=>{switch(t.type){case"updateValue":{const{namePath:n,value:r}=t;this.updateValue(n,r);break}case"validateField":{const{namePath:n,triggerName:r}=t;this.validateFields([n],{triggerName:r});break}}});J(this,"notifyObservers",(t,n,r)=>{if(this.subscribable){const o={...r,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:i})=>{i(t,n,o)})}else this.forceRootUpdate()});J(this,"triggerDependenciesUpdate",(t,n)=>{const r=this.getDependencyChildrenFields(n);return r.length&&this.validateFields(r,{delayFrame:!0}),this.notifyObservers(t,r,{type:"dependenciesUpdate",relatedFields:[n,...r]}),r});J(this,"updateValue",(t,n)=>{const r=bt(t),o=this.store;this.updateStore(xn(this.store,r,n)),this.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),this.notifyWatch([r]);const i=this.triggerDependenciesUpdate(o,r),{onValuesChange:a}=this.callbacks;if(a){const s=Bp(this.store,[r]),l=this.getFieldsValue(),c=xn(l,r,In(s,r));a(s,c)}this.triggerOnFieldsChange([r,...i])});J(this,"setFieldsValue",t=>{this.warningUnhooked();const n=this.store;if(t){const r=oo(this.store,t);this.updateStore(r)}this.notifyObservers(n,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()});J(this,"setFieldValue",(t,n)=>{this.setFields([{name:t,value:n,errors:[],warnings:[],touched:!0}])});J(this,"getDependencyChildrenFields",t=>{const n=new Set,r=[],o=new Yr;this.getFieldEntities().forEach(a=>{const{dependencies:s}=a.props;(s||[]).forEach(l=>{const c=bt(l);o.update(c,(u=new Set)=>(u.add(a),u))})});const i=a=>{(o.get(a)||new Set).forEach(l=>{if(!n.has(l)){n.add(l);const c=l.getNamePath();l.isFieldDirty()&&c.length&&(r.push(c),i(c))}})};return i(t),r});J(this,"triggerOnFieldsChange",(t,n)=>{const{onFieldsChange:r}=this.callbacks;if(r){const o=this.getFields();if(n){const a=new Yr;n.forEach(({name:s,errors:l})=>{a.set(s,l)}),o.forEach(s=>{s.errors=a.get(s.name)||s.errors})}const i=o.filter(({name:a})=>fo(t,a));i.length&&r(i,o)}});J(this,"validateFields",(t,n)=>{this.warningUnhooked();let r,o;Array.isArray(t)||typeof t=="string"||typeof n=="string"?(r=t,o=n):o=t;const i=!!r,a=i?r.map(bt):[],s=[...a],l=[],c=String(Date.now()),u=new Set,{recursive:d,dirty:f}=o||{};this.getFieldEntities(!0).forEach(w=>{const y=w.getNamePath();if(i||((!w.isList()||!a.some($=>Pa($,y,!0)))&&s.push(y),a.push(y)),!(!w.props.rules||!w.props.rules.length)&&!(f&&!w.isFieldDirty())&&(u.add(y.join(c)),!i||fo(a,y,d))){const $=w.validateRules({validateMessages:{...ex,...this.validateMessages},...o});l.push($.then(()=>({name:y,errors:[],warnings:[]})).catch(x=>{var C;const E=[],v=[];return(C=x.forEach)==null||C.call(x,({rule:{warningOnly:I},errors:N})=>{I?v.push(...N):E.push(...N)}),E.length?Promise.reject({name:y,errors:E,warnings:v}):{name:y,errors:E,warnings:v}}))}});const p=MT(l);this.lastValidatePromise=p,p.catch(w=>w).then(w=>{const y=w.map(({name:$})=>$);this.notifyObservers(this.store,y,{type:"validateFinish"}),this.triggerOnFieldsChange(y,w)});const h=p.then(()=>this.lastValidatePromise===p?Promise.resolve(this.getFieldsValue(s)):Promise.reject([])).catch(w=>{var x,E;const y=w.filter(v=>v&&v.errors.length),$=(E=(x=y[0])==null?void 0:x.errors)==null?void 0:E[0];return Promise.reject({message:$,values:this.getFieldsValue(a),errorFields:y,outOfDate:this.lastValidatePromise!==p})});h.catch(w=>w);const m=a.filter(w=>u.has(w.join(c)));return this.triggerOnFieldsChange(m),h});J(this,"submit",()=>{this.warningUnhooked(),this.validateFields().then(t=>{const{onFinish:n}=this.callbacks;if(n)try{n(t)}catch(r){console.error(r)}}).catch(t=>{const{onFinishFailed:n}=this.callbacks;n&&n(t)})});this.forceRootUpdate=t}}function ox(e){const t=g.useRef(null),[,n]=g.useState({});if(!t.current)if(e)t.current=e;else{const r=()=>{n({})},o=new AT(r);t.current=o.getForm()}return[t.current]}const Ic=g.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),zT=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{const o=g.useContext(Ic),i=g.useRef({});return g.createElement(Ic.Provider,{value:{...o,validateMessages:{...o.validateMessages,...e},triggerFormChange:(a,s)=>{t&&t(a,{changedFields:s,forms:i.current}),o.triggerFormChange(a,s)},triggerFormFinish:(a,s)=>{n&&n(a,{values:s,forms:i.current}),o.triggerFormFinish(a,s)},registerForm:(a,s)=>{a&&(i.current={...i.current,[a]:s}),o.registerForm(a,s)},unregisterForm:a=>{const s={...i.current};delete s[a],i.current=s,o.unregisterForm(a)}}},r)};function Rc(){return Rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rc.apply(this,arguments)}const OT=(e,t)=>{const{name:n,initialValues:r,fields:o,form:i,preserve:a,children:s,component:l="form",validateMessages:c,validateTrigger:u="onChange",onValuesChange:d,onFieldsChange:f,onFinish:p,onFinishFailed:h,clearOnDestroy:m,...w}=e,y=g.useRef(null),$=g.useContext(Ic),[x]=ox(i),{useSubscribe:E,setInitialValues:v,setCallbacks:C,setValidateMessages:I,setPreserve:N,destroyForm:A}=x.getInternalHooks(zr);g.useImperativeHandle(t,()=>({...x,nativeElement:y.current})),g.useEffect(()=>($.registerForm(n,x),()=>{$.unregisterForm(n)}),[$,x,n]),I({...$.validateMessages,...c}),C({onValuesChange:d,onFieldsChange:(L,..._)=>{$.triggerFormChange(n,L),f&&f(L,..._)},onFinish:L=>{$.triggerFormFinish(n,L),p&&p(L)},onFinishFailed:h}),N(a);const k=g.useRef(null);v(r,!k.current),k.current||(k.current=!0),g.useEffect(()=>()=>A(m),[]);let R;const O=typeof s=="function";if(O){const L=x.getFieldsValue(!0);R=s(L,x)}else R=s;E(!O);const z=g.useRef(null);g.useEffect(()=>{IT(z.current||[],o||[])||x.setFields(o||[]),z.current=o},[o,x]);const D=g.useMemo(()=>({...x,validateTrigger:u}),[x,u]),M=g.createElement(Ra.Provider,{value:null},g.createElement(yo.Provider,{value:D},R));return l===!1?M:g.createElement(l,Rc({},w,{ref:y,onSubmit:L=>{L.preventDefault(),L.stopPropagation(),x.submit()},onReset:L=>{var _;L.preventDefault(),x.resetFields(),(_=w.onReset)==null||_.call(w,L)}}),M)};function ol(e){try{return JSON.stringify(e)}catch{return Math.random()}}function DT(...e){const[t,n={}]=e,r=GP(n)?{form:n}:n,o=r.form,[i,a]=b.useState(()=>typeof t=="function"?t({}):void 0),s=b.useMemo(()=>ol(i),[i]),l=b.useRef(s);l.current=s;const c=b.useContext(yo),u=o||c,d=u&&u._init;process.env.NODE_ENV!=="production"&&tt(e.length===2?o?d:!0:d,"useWatch requires a form instance since it can not auto detect from context.");const{getFieldsValue:f,getInternalHooks:p}=u,{registerWatch:h}=p(zr),m=Ge((y,$)=>{const x=r.preserve?$??f(!0):y??f(),E=typeof t=="function"?t(x):In(x,bt(t));ol(i)!==ol(E)&&a(E)}),w=typeof t=="function"?t:JSON.stringify(t);return b.useEffect(()=>{d&&m()},[d,w]),b.useEffect(()=>d?h(($,x)=>{m($,x)}):void 0,[d]),i}const LT=g.forwardRef(OT),Ci=LT;Ci.FormProvider=zT;Ci.Field=rx;Ci.List=NT;Ci.useForm=ox;Ci.useWatch=DT;const sr=g.createContext({});process.env.NODE_ENV!=="production"&&(sr.displayName="FormItemInputContext");const FT=({children:e,status:t,override:n})=>{const r=g.useContext(sr),o=g.useMemo(()=>{const i={...r};return n&&delete i.isFormItemInput,t&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[t,n,r]);return g.createElement(sr.Provider,{value:o},e)},_T=g.createContext(void 0),Ta=e=>{const{space:t,form:n,children:r}=e;if(!yi(r))return null;let o=r;return n&&(o=b.createElement(FT,{override:!0,status:!0},o)),t&&(o=b.createElement(AR,null,o)),o};function jT(e){return t=>g.createElement(Sr,{theme:{token:{motion:!1,zIndexPopupBase:0}}},g.createElement(e,{...t}))}const BT=(e,t,n,r,o)=>jT(a=>{const{prefixCls:s,style:l}=a,c=g.useRef(null),[u,d]=g.useState(0),[f,p]=g.useState(0),[h,m]=un(!1,a.open),{getPrefixCls:w}=g.useContext(dt),y=w(r,s);g.useEffect(()=>{if(m(!0),typeof ResizeObserver<"u"){const E=new ResizeObserver(C=>{const I=C[0].target;d(I.offsetHeight+8),p(I.offsetWidth)}),v=setInterval(()=>{var N;const C=o?`.${o(y)}`:`.${y}-dropdown`,I=(N=c.current)==null?void 0:N.querySelector(C);I&&(clearInterval(v),E.observe(I))},10);return()=>{clearInterval(v),E.disconnect()}}},[y]);let $={...a,style:{...l,margin:0},open:h,getPopupContainer:()=>c.current};$={...$,[t]:{overflow:{adjustX:!1,adjustY:!1}}};const x={paddingBottom:u,position:"relative",minWidth:f};return g.createElement("div",{ref:c,style:x},g.createElement(e,{...$}))}),Qr=void 0;function HT(e,t){const{prefixCls:n,invalidate:r,item:o,renderItem:i,responsive:a,responsiveDisabled:s,registerSize:l,itemKey:c,className:u,style:d,children:f,display:p,order:h,component:m="div",...w}=e,y=a&&!p;function $(I){l(c,I)}g.useEffect(()=>()=>{$(null)},[]);const x=i&&o!==Qr?i(o,{index:h}):f;let E;r||(E={opacity:y?0:1,height:y?0:Qr,overflowY:y?"hidden":Qr,order:a?h:Qr,pointerEvents:y?"none":Qr,position:y?"absolute":Qr});const v={};y&&(v["aria-hidden"]=!0);let C=g.createElement(m,$t({className:Z(!r&&n,u),style:{...E,...d}},v,w,{ref:t}),x);return a&&(C=g.createElement(Io,{onResize:({offsetWidth:I})=>{$(I)},disabled:s},C)),C}const ao=g.forwardRef(HT);process.env.NODE_ENV!=="production"&&(ao.displayName="Item");function VT(e){if(typeof MessageChannel>"u")xt(e);else{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function WT(){const e=g.useRef(null);return n=>{e.current||(e.current=[],VT(()=>{po.unstable_batchedUpdates(()=>{e.current.forEach(r=>{r()}),e.current=null})})),e.current.push(n)}}function Zr(e,t){const[n,r]=g.useState(t),o=Ge(i=>{e(()=>{r(i)})});return[n,o]}const Na=b.createContext(null),qT=(e,t)=>{const n=g.useContext(Na);if(!n){const{component:s="div",...l}=e;return g.createElement(s,$t({},l,{ref:t}))}const{className:r,...o}=n,{className:i,...a}=e;return g.createElement(Na.Provider,{value:null},g.createElement(ao,$t({ref:t,className:Z(r,i)},o,a)))},ix=g.forwardRef(qT);process.env.NODE_ENV!=="production"&&(ix.displayName="RawItem");const ax="responsive",sx="invalidate";function XT(e){return`+ ${e.length} ...`}function UT(e,t){const{prefixCls:n="rc-overflow",data:r=[],renderItem:o,renderRawItem:i,itemKey:a,itemWidth:s=10,ssr:l,style:c,className:u,maxCount:d,renderRest:f,renderRawRest:p,prefix:h,suffix:m,component:w="div",itemComponent:y,onVisibleChange:$,...x}=e,E=l==="full",v=WT(),[C,I]=Zr(v,null),N=C||0,[A,k]=Zr(v,new Map),[R,O]=Zr(v,0),[z,D]=Zr(v,0),[M,L]=Zr(v,0),[_,V]=Zr(v,0),[X,P]=b.useState(null),[Y,K]=b.useState(null),T=g.useMemo(()=>Y===null&&E?Number.MAX_SAFE_INTEGER:Y||0,[Y,C]),[ne,F]=b.useState(!1),U=`${n}-item`,re=Math.max(R,z),j=d===ax,H=r.length&&j,ee=d===sx,oe=H||typeof d=="number"&&r.length>d,B=b.useMemo(()=>{let ce=r;return H?C===null&&E?ce=r:ce=r.slice(0,Math.min(r.length,N/s)):typeof d=="number"&&(ce=r.slice(0,d)),ce},[r,s,C,d,H]),ie=b.useMemo(()=>H?r.slice(T+1):r.slice(B.length),[r,B,H,T]),ae=b.useCallback((ce,te)=>typeof a=="function"?a(ce):(a&&(ce==null?void 0:ce[a]))??te,[a]),Se=b.useCallback(o||(ce=>ce),[o]);function ye(ce,te,ve){Y===ce&&(te===void 0||te===X)||(K(ce),ve||(F(ce<r.length-1),$==null||$(ce)),te!==void 0&&P(te))}function q(ce,te){I(te.clientWidth)}function me(ce,te){k(ve=>{const Re=new Map(ve);return te===null?Re.delete(ce):Re.set(ce,te),Re})}function he(ce,te){D(te),O(z)}function se(ce,te){L(te)}function ue(ce,te){V(te)}function pe(ce){return A.get(ae(B[ce],ce))}Bt(()=>{if(N&&typeof re=="number"&&B){let ce=M+_;const te=B.length,ve=te-1;if(!te){ye(0,null);return}for(let Re=0;Re<te;Re+=1){let Ue=pe(Re);if(E&&(Ue=Ue||0),Ue===void 0){ye(Re-1,void 0,!0);break}if(ce+=Ue,ve===0&&ce<=N||Re===ve-1&&ce+pe(ve)<=N){ye(ve,null);break}else if(ce+re>N){ye(Re-1,ce-Ue-_+z);break}}m&&pe(0)+_>N&&P(null)}},[N,A,z,M,_,ae,B]);const Ne=ne&&!!ie.length;let Ee={};X!==null&&H&&(Ee={position:"absolute",top:0,insetInlineStart:X});const Ie={prefixCls:U,responsive:H,component:y,invalidate:ee},W=i?(ce,te)=>{const ve=ae(ce,te);return g.createElement(Na.Provider,{key:ve,value:{...Ie,order:te,item:ce,itemKey:ve,registerSize:me,display:te<=T}},i(ce,te))}:(ce,te)=>{const ve=ae(ce,te);return g.createElement(ao,$t({},Ie,{order:te,key:ve,item:ce,renderItem:Se,itemKey:ve,registerSize:me,display:te<=T}))},Q={order:Ne?T:Number.MAX_SAFE_INTEGER,className:`${U}-rest`,registerSize:he,display:Ne},le=f||XT,be=p?g.createElement(Na.Provider,{value:{...Ie,...Q}},p(ie)):g.createElement(ao,$t({},Ie,Q),typeof le=="function"?le(ie):le),$e=g.createElement(w,$t({className:Z(!ee&&n,u),style:c,ref:t},x),h&&g.createElement(ao,$t({},Ie,{responsive:j,responsiveDisabled:!H,order:-1,className:`${U}-prefix`,registerSize:se,display:!0}),h),B.map(W),oe?be:null,m&&g.createElement(ao,$t({},Ie,{responsive:j,responsiveDisabled:!H,order:T,className:`${U}-suffix`,registerSize:ue,display:!0,style:Ee}),m));return j?g.createElement(Io,{onResize:q,disabled:!H},$e):$e}const rr=g.forwardRef(UT);rr.Item=ix;rr.RESPONSIVE=ax;rr.INVALIDATE=sx;process.env.NODE_ENV!=="production"&&(rr.displayName="Overflow");const Ma=(e,t,n)=>Z({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n}),nd=(e,t)=>t||e,wo=(e,t,n,r)=>{const o=g.useContext(dt),{variant:i,[e]:a}=o,s=g.useContext(_T),l=r?o[r]:void 0,c=(a==null?void 0:a.variant)??(l==null?void 0:l.variant),u=typeof t<"u"||n===!1||typeof s<"u"||typeof c<"u"||typeof i<"u";let d;typeof t<"u"?d=t:n===!1?d="borderless":d=s??c??i??"outlined";const f=x2.includes(d);return[d,f,u]};var GT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};function Pc(){return Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pc.apply(this,arguments)}const KT=(e,t)=>g.createElement(Jt,Pc({},e,{ref:t,icon:GT})),lx=g.forwardRef(KT);process.env.NODE_ENV!=="production"&&(lx.displayName="SearchOutlined");const cx=e=>{const{children:t,prefixCls:n,id:r,classNames:o,styles:i,className:a,style:s}=e;return g.createElement("div",{id:r,className:Z(`${n}-container`,o==null?void 0:o.container,a),style:{...i==null?void 0:i.container,...s},role:"tooltip"},typeof t=="function"?t():t)},Jr={shiftX:64,adjustY:1},eo={adjustX:1,shiftY:!0},$n=[0,0],YT={left:{points:["cr","cl"],overflow:eo,offset:[-4,0],targetOffset:$n},right:{points:["cl","cr"],overflow:eo,offset:[4,0],targetOffset:$n},top:{points:["bc","tc"],overflow:Jr,offset:[0,-4],targetOffset:$n},bottom:{points:["tc","bc"],overflow:Jr,offset:[0,4],targetOffset:$n},topLeft:{points:["bl","tl"],overflow:Jr,offset:[0,-4],targetOffset:$n},leftTop:{points:["tr","tl"],overflow:eo,offset:[-4,0],targetOffset:$n},topRight:{points:["br","tr"],overflow:Jr,offset:[0,-4],targetOffset:$n},rightTop:{points:["tl","tr"],overflow:eo,offset:[4,0],targetOffset:$n},bottomRight:{points:["tr","br"],overflow:Jr,offset:[0,4],targetOffset:$n},rightBottom:{points:["bl","br"],overflow:eo,offset:[4,0],targetOffset:$n},bottomLeft:{points:["tl","bl"],overflow:Jr,offset:[0,4],targetOffset:$n},leftBottom:{points:["br","bl"],overflow:eo,offset:[-4,0],targetOffset:$n}};function Tc(){return Tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tc.apply(this,arguments)}const QT=g.forwardRef((e,t)=>{const{trigger:n=["hover","focus"],mouseEnterDelay:r=0,mouseLeaveDelay:o=.1,prefixCls:i="rc-tooltip",children:a,onVisibleChange:s,afterVisibleChange:l,motion:c,placement:u="right",align:d={},destroyOnHidden:f=!1,defaultVisible:p,getTooltipContainer:h,arrowContent:m,overlay:w,id:y,showArrow:$=!0,classNames:x,styles:E,...v}=e,C=Ka(y),I=b.useRef(null);b.useImperativeHandle(t,()=>I.current);const N={...v};"visible"in e&&(N.popupVisible=e.visible);const A=g.useMemo(()=>{if(!$)return!1;const R=$===!0?{}:$;return{...R,className:Z(R.className,x==null?void 0:x.arrow),style:{...R.style,...E==null?void 0:E.arrow},content:R.content??m}},[$,x==null?void 0:x.arrow,E==null?void 0:E.arrow,m]),k=({open:R})=>{const O=g.Children.only(a),M={"aria-describedby":[O.props["aria-describedby"],w&&R?C:void 0].filter(Boolean).join(" ")||void 0};return g.cloneElement(O,M)};return g.createElement(Yu,Tc({popupClassName:x==null?void 0:x.root,prefixCls:i,popup:g.createElement(cx,{key:"content",prefixCls:i,id:C,classNames:x,styles:E},w),action:n,builtinPlacements:YT,popupPlacement:u,ref:I,popupAlign:d,getPopupContainer:h,onOpenChange:s,afterOpenChange:l,popupMotion:c,defaultPopupVisible:p,autoDestroy:f,mouseLeaveDelay:o,popupStyle:E==null?void 0:E.root,mouseEnterDelay:r,arrow:A,uniqueContainerClassName:x==null?void 0:x.uniqueContainer,uniqueContainerStyle:E==null?void 0:E.uniqueContainer},N),k)});function ux(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=0,a=o,s=r*1/Math.sqrt(2),l=o-r*(1-1/Math.sqrt(2)),c=o-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*o-c,f=u,p=2*o-s,h=l,m=2*o-i,w=a,y=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),$=r*(Math.sqrt(2)-1),x=`polygon(${$}px 100%, 50% ${$}px, ${2*o-$}px 100%, ${$}px 100%)`,E=`path('M ${i} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${p} ${h} A ${r} ${r} 0 0 0 ${m} ${w} Z')`;return{arrowShadowWidth:y,arrowPath:E,arrowPolygon:x}}const ZT=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e,c={content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${xe(s)} 0`},transform:"translateY(50%) rotate(-135deg)",zIndex:0,background:"transparent"};return n&&(c.boxShadow=n),{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":c}},dx=8;function rd(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?dx:r}}const fx=(e,t,n)=>{const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a,antCls:s}=e,[l]=ur(s,"tooltip"),{arrowDistance:c=0,arrowShadow:u=!0}=n||{};return{[r]:{[`${r}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...ZT(e,t,u?o:!1),"&:before":{background:t}}],[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:c,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[l("arrow-offset-x")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{[l("arrow-offset-x")]:`calc(100% - ${xe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}},[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:c,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[l("arrow-offset-x")]:a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{[l("arrow-offset-x")]:`calc(100% - ${xe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}},[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:c},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i},[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:c},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}}}};function JT(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const o=rn(r)?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=t.arrowOffsetHorizontal*2+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=t.arrowOffsetVertical*2+n,i.shiftX=!0,i.adjustX=!0;break}const a={...i,...o};return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const Vp={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},eN={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},tN=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function px(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,s=t/2,l={},c=rd({contentRadius:i,limitVerticalRadius:!0});return Object.keys(Vp).forEach(u=>{const f={...r&&eN[u]||Vp[u],offset:[0,0],dynamicInset:!0};switch(l[u]=f,tN.has(u)&&(f.autoArrow=!1),u){case"top":case"topLeft":case"topRight":f.offset[1]=-s-o;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+o;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-o;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+o;break}if(r)switch(u){case"topLeft":case"bottomLeft":f.offset[0]=-c.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=c.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-c.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=c.arrowOffsetHorizontal*2-s;break}f.overflow=JT(u,c,t,n),a&&(f.htmlRegion="visibleFirst")}),l}const nN=b.createContext(!1),rN=(e,t)=>{const n=r=>typeof r=="boolean"?{show:r}:r||{};return b.useMemo(()=>{const r=n(e),o=n(t);return{...o,...r,show:r.show??o.show??!0}},[e,t])},Wp="50%",oN=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,dropShadowPopover:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p,antCls:h}=e,[m,w]=ur(h,"tooltip"),y=t(a).add(p).add(f).equal(),x={minWidth:t(a).mul(2).add(p).equal(),minHeight:l,padding:`${xe(e.calc(u).div(2).equal())} ${xe(d)}`,color:w("overlay-color",o),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxSizing:"border-box"},E={[m("valid-offset-x")]:w("arrow-offset-x","var(--arrow-x)"),transformOrigin:[w("valid-offset-x",Wp),`var(--arrow-y, ${Wp})`].join(" ")};return[{[n]:{...Ro(e),position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible",filter:c,...E,"&-hidden":{display:"none"},[m("arrow-background-color")]:i,[`${n}-container`]:[x,HR(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:"none",background:"transparent"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:y},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,dx)}},[`${n}-content`]:{position:"relative"},...lI(e,(v,{darkColor:C})=>({[`&${n}-${v}`]:{[`${n}-container`]:{backgroundColor:C},[`${n}-arrow`]:{[m("arrow-background-color")]:C}}})),"&-rtl":{direction:"rtl"}}},fx(e,w("arrow-background-color"),{arrowShadow:!1}),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...x,...E,position:"absolute",zIndex:t(s).sub(1).equal(),filter:c,"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},iN=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...rd({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...ux(yt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),mx=(e,t,n=!0)=>on("Tooltip",o=>{const{borderRadius:i,colorTextLightSolid:a,colorBgSpotlight:s,maxWidth:l}=o,c=yt(o,{tooltipMaxWidth:l,tooltipColor:a,tooltipBorderRadius:i,tooltipBg:s});return[oN(c),Ju(o,"zoom-big-fast")]},iN,{resetStyle:!1,injectStyle:n})(e,t),aN=xr.map(e=>`${e}-inverse`);function sN(e,t=!0){return t?[].concat(jr(aN),jr(xr)).includes(e):xr.includes(e)}const gx=(e,t,n)=>{const r=sN(n),[o]=ur(e,"tooltip"),i=Z({[`${t}-${n}`]:n&&r}),a={},s={},l=RP(n).toRgb(),u=(.299*l.r+.587*l.g+.114*l.b)/255<.5?"#FFF":"#000";return n&&!r&&(a.background=n,a[o("overlay-color")]=u,s[o("arrow-background-color")]=n),{className:i,overlayStyle:a,arrowStyle:s}},lN=e=>{const{prefixCls:t,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a,classNames:s,styles:l}=e,{getPrefixCls:c}=g.useContext(dt),u=c("tooltip",t),d=c(),f=Po(u),[p,h]=mx(u,f),m=gx(d,u,i),w=m.arrowStyle,y=g.useMemo(()=>({container:{...a,...m.overlayStyle}}),[a,m.overlayStyle]),$={...e,placement:r},[x,E]=Pn([s],[y,l],{props:$}),v=Z(f,p,h,u,`${u}-pure`,`${u}-placement-${r}`,n,m.className);return g.createElement("div",{className:v,style:w},g.createElement("div",{className:`${u}-arrow`}),g.createElement(cx,{...e,className:p,prefixCls:u,classNames:x,styles:E},o))},cN=g.forwardRef((e,t)=>{const{prefixCls:n,openClassName:r,getTooltipContainer:o,color:i,children:a,afterOpenChange:s,arrow:l,destroyTooltipOnHide:c,destroyOnHidden:u,title:d,overlay:f,trigger:p,builtinPlacements:h,autoAdjustOverflow:m=!0,motion:w,getPopupContainer:y,placement:$="top",mouseEnterDelay:x,mouseLeaveDelay:E,rootClassName:v,styles:C,classNames:I,onOpenChange:N,overlayInnerStyle:A,overlayStyle:k,overlayClassName:R,...O}=e,[,z]=Cr(),D=e["data-popover-inject"],{getPopupContainer:M,getPrefixCls:L,direction:_,...V}=Kn("tooltip"),{className:X,style:P,classNames:Y,styles:K,arrow:T,trigger:ne,mouseEnterDelay:F,mouseLeaveDelay:U}=D?{}:V,re=x??F??.1,j=E??U??.1,H=rN(l,T),ee=H.show,oe=p||ne||"hover",B=y||M,ie=u??!!c,ae=g.useContext(nN),Se=At("Tooltip"),ye=g.useRef(null),q=()=>{var _e;(_e=ye.current)==null||_e.forceAlign()};g.useImperativeHandle(t,()=>{var _e,pt;return{forceAlign:q,nativeElement:(_e=ye.current)==null?void 0:_e.nativeElement,popupElement:(pt=ye.current)==null?void 0:pt.popupElement}}),process.env.NODE_ENV!=="production"&&([["overlayStyle","styles.root"],["overlayInnerStyle","styles.container"],["overlayClassName","classNames.root"],["destroyTooltipOnHide","destroyOnHidden"]].forEach(([_e,pt])=>{Se.deprecated(!(_e in e),_e,pt)}),process.env.NODE_ENV!=="production"&&Se(!c||typeof c=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."));const[me,he]=un(e.defaultOpen??!1,e.open),se=!d&&!f&&d!==0,ue=_e=>{he(se?!1:_e),!se&&N&&N(_e)},pe=g.useMemo(()=>h||px({arrowPointAtCenter:(H==null?void 0:H.pointAtCenter)??!1,autoAdjustOverflow:m,arrowWidth:ee?z.sizePopupArrow:0,borderRadius:z.borderRadius,offset:z.marginXXS,visibleFirst:!0}),[H,h,z,ee,m]),Ne=g.useMemo(()=>d===0?d:f||d||"",[f,d]),Ee=g.createElement(Ta,{space:!0,form:!0},Qt(Ne)?Ne():Ne),Ie={...e,trigger:oe,builtinPlacements:pe,getPopupContainer:B,destroyOnHidden:ie,mouseEnterDelay:re,mouseLeaveDelay:j},W=kt(P),Q=kt(k),[le,be]=Pn([Y,I],[K,W,C,Q],{props:Ie}),$e=L("tooltip",n),ce=L();let te=me;(!("open"in e)&&se||ae)&&(te=!1);const ve=g.isValidElement(a)&&!Eb(a)?a:g.createElement("span",null,a),Re=ve.props,Ue=!Re.className||typeof Re.className=="string"?Z(Re.className,r||`${$e}-open`):Re.className,Pe=Po($e),[ze,Me]=mx($e,Pe,!D),it=gx(ce,$e,i),Ye=it.arrowStyle,It=Z(Pe,ze,Me),wt=Z(R,{[`${$e}-rtl`]:_==="rtl"},it.className,v,It,X,le.root),[Ot,gt]=Zu("Tooltip",O.zIndex),_t={...be.container,...A,...it.overlayStyle},jt=g.createElement(QT,{unique:!0,...O,zIndex:Ot,showArrow:ee,placement:$,mouseEnterDelay:re,mouseLeaveDelay:j,prefixCls:$e,classNames:{root:wt,container:le.container,arrow:le.arrow,uniqueContainer:Z(It,le.container)},styles:{root:{...Ye,...be.root},container:_t,uniqueContainer:_t,arrow:be.arrow},ref:ye,overlay:Ee,visible:te,onVisibleChange:ue,afterVisibleChange:s,arrowContent:g.createElement("span",{className:`${$e}-arrow-content`}),motion:{motionName:ER(ce,"zoom-big-fast",typeof(w==null?void 0:w.motionName)=="string"?w==null?void 0:w.motionName:void 0),motionDeadline:1e3},trigger:oe,builtinPlacements:pe,getTooltipContainer:B,destroyOnHidden:ie},te&&!O.disabled?Dn(ve,{className:Ue}):ve);return g.createElement(as.Provider,{value:gt},jt)}),Si=cN;process.env.NODE_ENV!=="production"&&(Si.displayName="Tooltip");Si._InternalPanelDoNotUseOrYouWillBeFired=lN;Si.UniqueProvider=$b;var uN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nc.apply(this,arguments)}const dN=(e,t)=>g.createElement(Jt,Nc({},e,{ref:t,icon:uN})),Aa=g.forwardRef(dN);process.env.NODE_ENV!=="production"&&(Aa.displayName="LeftOutlined");const{ESC:fN,TAB:pN}=Iu;function mN({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:o}){const i=g.useRef(!1),a=()=>{var c,u;e&&((u=(c=t.current)==null?void 0:c.focus)==null||u.call(c),n==null||n(!1))},s=()=>{var c;return(c=o.current)!=null&&c.focus?(o.current.focus(),i.current=!0,!0):!1},l=c=>{switch(c.keyCode){case fN:a();break;case pN:{let u=!1;i.current||(u=s()),u?c.preventDefault():a();break}}};g.useEffect(()=>e?(window.addEventListener("keydown",l),r&&xt(s,3),()=>{window.removeEventListener("keydown",l),i.current=!1}):()=>{i.current=!1},[e])}const gN=b.forwardRef((e,t)=>{const{overlay:n,arrow:r,prefixCls:o}=e,i=b.useMemo(()=>{let s;return typeof n=="function"?s=n():s=n,s},[n]),a=Gn(t,cr(i));return b.createElement(b.Fragment,null,r&&b.createElement("div",{className:`${o}-arrow`}),b.cloneElement(i,{ref:$o(i)?a:void 0}))}),to={adjustX:1,adjustY:1},no=[0,0],hN={topLeft:{points:["bl","tl"],overflow:to,offset:[0,-4],targetOffset:no},top:{points:["bc","tc"],overflow:to,offset:[0,-4],targetOffset:no},topRight:{points:["br","tr"],overflow:to,offset:[0,-4],targetOffset:no},bottomLeft:{points:["tl","bl"],overflow:to,offset:[0,4],targetOffset:no},bottom:{points:["tc","bc"],overflow:to,offset:[0,4],targetOffset:no},bottomRight:{points:["tr","br"],overflow:to,offset:[0,4],targetOffset:no}};function Mc(){return Mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mc.apply(this,arguments)}const bN=b.forwardRef((e,t)=>{var ne;const{arrow:n=!1,prefixCls:r="rc-dropdown",transitionName:o,animation:i,align:a,placement:s="bottomLeft",placements:l=hN,getPopupContainer:c,showAction:u,hideAction:d,overlayClassName:f,overlayStyle:p,visible:h,trigger:m=["hover"],autoFocus:w,overlay:y,children:$,onVisibleChange:x,disabled:E,...v}=e,[C,I]=b.useState(),N="visible"in e?h:C,A=i?`${r}-${i}`:o,k=b.useRef(null),R=b.useRef(null),O=b.useRef(null);b.useImperativeHandle(t,()=>k.current);const z=F=>{I(F),x==null||x(F)};mN({visible:N,triggerRef:O,onVisibleChange:z,autoFocus:w,overlayRef:R});const D=F=>{const{onOverlayClick:U}=e;I(!1),U&&U(F)},M=()=>b.createElement(gN,{ref:R,overlay:y,prefixCls:r,arrow:n}),L=()=>typeof y=="function"?M:M(),_=()=>{const{minOverlayWidthMatchTrigger:F,alignPoint:U}=e;return"minOverlayWidthMatchTrigger"in e?F:!U},V=()=>{const{openClassName:F}=e;return F!==void 0?F:`${r}-open`},X=$,P=Z((ne=X.props)==null?void 0:ne.className,N&&V()),Y={className:P,ref:Gn(O,cr(X))},K=$o(X)?b.cloneElement(X,Y):b.createElement("span",{className:P,ref:O},b.cloneElement(X,{className:P}));let T=d;return!T&&m.indexOf("contextMenu")!==-1&&(T=["click"]),b.createElement(Yu,Mc({builtinPlacements:l},v,{prefixCls:r,ref:k,popupClassName:Z(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:m,showAction:u,hideAction:T,popupPlacement:s,popupAlign:a,popupMotion:{motionName:A},popupVisible:N,stretch:_()?"minWidth":"",popup:L(),onOpenChange:z,onPopupClick:D,getPopupContainer:c}),K)}),hx=g.createContext(null);function bx(e,t){return`${e}-${t}`}function xx(e){const t=g.useContext(hx);return bx(t,e)}const Ln=g.createContext(null);function xN(e,t){const n={...e};return Object.keys(t).forEach(r=>{const o=t[r];o!==void 0&&(n[r]=o)}),n}function fi({children:e,locked:t,...n}){const r=g.useContext(Ln),o=Ya(()=>xN(r,n),[r,n],(i,a)=>!t&&(i[0]!==a[0]||!ai(i[1],a[1],!0)));return g.createElement(Ln.Provider,{value:o},e)}const yN=[],yx=g.createContext(null);function cs(){return g.useContext(yx)}const wx=g.createContext(yN);function Mo(e){const t=g.useContext(wx);return g.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const vx=g.createContext(null),od=g.createContext({}),{LEFT:Ac,RIGHT:zc,UP:Oc,DOWN:ua,ENTER:da,ESC:Cx,HOME:Ho,END:Vo}=Iu,qp=[Oc,ua,Ac,zc];function wN(e,t,n,r){var p;const o="prev",i="next",a="children",s="parent";if(e==="inline"&&r===da)return{inlineTrigger:!0};const l={[Oc]:o,[ua]:i},c={[Ac]:n?i:o,[zc]:n?o:i,[ua]:a,[da]:a},u={[Oc]:o,[ua]:i,[da]:a,[Cx]:s,[Ac]:n?a:s,[zc]:n?s:a};switch((p={inline:l,horizontal:c,vertical:u,inlineSub:l,horizontalSub:u,verticalSub:u}[`${e}${t?"":"Sub"}`])==null?void 0:p[r]){case o:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case a:return{offset:1,sibling:!1};default:return null}}function vN(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function CN(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function id(e,t){return E$(e,!0).filter(r=>t.has(r))}function Xp(e,t,n,r=1){if(!e)return null;const o=id(e,t),i=o.length;let a=o.findIndex(s=>n===s);return r<0?a===-1?a=i-1:a-=1:r>0&&(a+=1),a=(a+i)%i,o[a]}const za=(e,t)=>{const n=new Set,r=new Map,o=new Map;return e.forEach(i=>{const a=document.querySelector(`[data-menu-id='${bx(t,i)}']`);a&&(n.add(a),o.set(a,i),r.set(i,a))}),{elements:n,key2element:r,element2key:o}};function SN(e,t,n,r,o,i,a,s,l,c){const u=g.useRef(void 0),d=g.useRef(void 0);d.current=t;const f=()=>{xt.cancel(u.current)};return g.useEffect(()=>()=>{f()},[]),p=>{const{which:h}=p;if([...qp,da,Cx,Ho,Vo].includes(h)){const m=i();let w=za(m,r);const{elements:y,key2element:$,element2key:x}=w,E=$.get(t),v=CN(E,y),C=x.get(v),I=wN(e,a(C,!0).length===1,n,h);if(!I&&h!==Ho&&h!==Vo)return;(qp.includes(h)||[Ho,Vo].includes(h))&&p.preventDefault();const N=A=>{if(A){let k=A;const R=A.querySelector("a");R!=null&&R.getAttribute("href")&&(k=R);const O=x.get(A);s(O),f(),u.current=xt(()=>{d.current===O&&k.focus()})}};if([Ho,Vo].includes(h)||I.sibling||!v){let A;!v||e==="inline"?A=o.current:A=vN(v);let k;const R=id(A,y);h===Ho?k=R[0]:h===Vo?k=R[R.length-1]:k=Xp(A,y,v,I.offset),N(k)}else if(I.inlineTrigger)l(C);else if(I.offset>0)l(C,!0),f(),u.current=xt(()=>{w=za(m,r);const A=v.getAttribute("aria-controls"),k=document.getElementById(A),R=Xp(k,w.elements);N(R)},5);else if(I.offset<0){const A=a(C,!0),k=A[A.length-2],R=$.get(k);l(k,!1),N(R)}}c==null||c(p)}}function EN(e){Promise.resolve().then(e)}const ad="__RC_UTIL_PATH_SPLIT__",Up=e=>e.join(ad),$N=e=>e.split(ad),Dc="rc-menu-more";function kN(){const[,e]=g.useState({}),t=b.useRef(new Map),n=b.useRef(new Map),[r,o]=g.useState([]),i=b.useRef(0),a=b.useRef(!1),s=()=>{a.current||e({})},l=b.useCallback((m,w)=>{process.env.NODE_ENV!=="production"&&tt(!t.current.has(m),`Duplicated key '${m}' used in Menu by path [${w.join(" > ")}]`);const y=Up(w);n.current.set(y,m),t.current.set(m,y),i.current+=1;const $=i.current;EN(()=>{$===i.current&&s()})},[]),c=b.useCallback((m,w)=>{const y=Up(w);n.current.delete(y),t.current.delete(m)},[]),u=b.useCallback(m=>{o(m)},[]),d=b.useCallback((m,w)=>{const y=t.current.get(m)||"",$=$N(y);return w&&r.includes($[0])&&$.unshift(Dc),$},[r]),f=b.useCallback((m,w)=>m.filter(y=>y!==void 0).some(y=>d(y,!0).includes(w)),[d]),p=()=>{const m=[...t.current.keys()];return r.length&&m.push(Dc),m},h=b.useCallback(m=>{const w=`${t.current.get(m)}${ad}`,y=new Set;return[...n.current.keys()].forEach($=>{$.startsWith(w)&&y.add(n.current.get($))}),y},[]);return g.useEffect(()=>()=>{a.current=!0},[]),{registerPath:l,unregisterPath:c,refreshOverflowKeys:u,isSubPathKey:f,getKeyPath:d,getKeys:p,getSubPathKeys:h}}function Ko(e){const t=g.useRef(e);t.current=e;const n=g.useCallback((...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[]);return e?n:void 0}function Sx(e,t,n,r){const{activeKey:o,onActive:i,onInactive:a}=g.useContext(Ln),s={active:o===e};return t||(s.onMouseEnter=l=>{n==null||n({key:e,domEvent:l}),i(e)},s.onMouseLeave=l=>{r==null||r({key:e,domEvent:l}),a(e)}),s}function Ex(e){const{mode:t,rtl:n,inlineIndent:r}=g.useContext(Ln);if(t!=="inline")return null;const o=e;return n?{paddingRight:o*r}:{paddingLeft:o*r}}function $x({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e=="function"?r=g.createElement(e,{...t}):typeof e!="boolean"&&(r=e),r||n||null)}function Oa({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(tt(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function pi(){return pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pi.apply(this,arguments)}class IN extends g.Component{render(){const{title:t,attribute:n,elementRef:r,...o}=this.props,i=Yt(o,["eventKey","popupClassName","popupOffset","onTitleClick"]);return tt(!n,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),g.createElement(rr.Item,pi({},n,{title:typeof t=="string"?t:void 0},i,{ref:r}))}}const RN=g.forwardRef((e,t)=>{const{style:n,className:r,eventKey:o,warnKey:i,disabled:a,itemIcon:s,children:l,itemData:c,role:u,onMouseEnter:d,onMouseLeave:f,onClick:p,onKeyDown:h,onFocus:m,...w}=e,y=xx(o),{prefixCls:$,onItemClick:x,disabled:E,overflowDisabled:v,itemIcon:C,selectedKeys:I,onActive:N}=g.useContext(Ln),{_internalRenderMenuItem:A}=g.useContext(od),k=`${$}-item`,R=g.useRef(null),O=g.useRef(null),z=E||a,D=Hr(t,O),M=Mo(o);process.env.NODE_ENV!=="production"&&i&&tt(!1,"MenuItem should not leave undefined `key`.");const L=re=>{const j=c||{key:o||"",label:l,itemIcon:s,extra:e.extra,title:e.title};return{key:o,keyPath:[...M].reverse(),item:R.current,domEvent:re,itemData:c||j}},_=s||C,{active:V,...X}=Sx(o,z,d,f),P=I.includes(o),Y=Ex(M.length),K=re=>{if(z)return;const j=L(re);p==null||p(Oa(j)),x(j)},T=re=>{if(h==null||h(re),re.which===Iu.ENTER){const j=L(re);p==null||p(Oa(j)),x(j)}},ne=re=>{N(o),m==null||m(re)},F={};e.role==="option"&&(F["aria-selected"]=P);let U=g.createElement(IN,pi({ref:R,elementRef:D,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":v&&y?null:y},Yt(w,["extra"]),X,F,{component:"li","aria-disabled":a,style:{...Y,...n},className:Z(k,{[`${k}-active`]:V,[`${k}-selected`]:P,[`${k}-disabled`]:z},r),onClick:K,onKeyDown:T,onFocus:ne}),l,g.createElement($x,{props:{...e,isSelected:P},icon:_}));return A&&(U=A(U,e,{selected:P})),U});function PN(e,t){const{eventKey:n}=e,r=cs(),o=Mo(n);return g.useEffect(()=>{if(r)return r.registerPath(n,o),()=>{r.unregisterPath(n,o)}},[o]),r?null:g.createElement(RN,pi({},e,{ref:t}))}const us=g.forwardRef(PN);function Lc(){return Lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lc.apply(this,arguments)}const TN=({className:e,children:t,...n},r)=>{const{prefixCls:o,mode:i,rtl:a}=g.useContext(Ln);return g.createElement("ul",Lc({className:Z(o,a&&`${o}-rtl`,`${o}-sub`,`${o}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},n,{"data-menu-list":!0,ref:r}),t)},sd=g.forwardRef(TN);process.env.NODE_ENV!=="production"&&(sd.displayName="SubMenuList");function ld(e,t){return or(e).map((n,r)=>{var o;if(g.isValidElement(n)){const{key:i}=n;let a=((o=n.props)==null?void 0:o.eventKey)??i;const s=a==null;s&&(a=`tmp_key-${[...t,r].join("-")}`);const l={key:a,eventKey:a};return process.env.NODE_ENV!=="production"&&s&&(l.warnKey=!0),g.cloneElement(n,l)}return n})}const Xt={adjustX:1,adjustY:1},NN={topLeft:{points:["bl","tl"],overflow:Xt},topRight:{points:["br","tr"],overflow:Xt},bottomLeft:{points:["tl","bl"],overflow:Xt},bottomRight:{points:["tr","br"],overflow:Xt},leftTop:{points:["tr","tl"],overflow:Xt},leftBottom:{points:["br","bl"],overflow:Xt},rightTop:{points:["tl","tr"],overflow:Xt},rightBottom:{points:["bl","br"],overflow:Xt}},MN={topLeft:{points:["bl","tl"],overflow:Xt},topRight:{points:["br","tr"],overflow:Xt},bottomLeft:{points:["tl","bl"],overflow:Xt},bottomRight:{points:["tr","br"],overflow:Xt},rightTop:{points:["tr","tl"],overflow:Xt},rightBottom:{points:["br","bl"],overflow:Xt},leftTop:{points:["tl","tr"],overflow:Xt},leftBottom:{points:["bl","br"],overflow:Xt}};function kx(e,t,n){if(t)return t;if(n)return n[e]||n.other}const AN={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function zN({prefixCls:e,visible:t,children:n,popup:r,popupStyle:o,popupClassName:i,popupOffset:a,disabled:s,mode:l,onVisibleChange:c}){const{getPopupContainer:u,rtl:d,subMenuOpenDelay:f,subMenuCloseDelay:p,builtinPlacements:h,triggerSubMenuAction:m,forceSubMenuRender:w,rootClassName:y,motion:$,defaultMotions:x}=g.useContext(Ln),[E,v]=g.useState(!1),C=d?{...MN,...h}:{...NN,...h},I=AN[l],N=kx(l,$,x),A=g.useRef(N);l!=="inline"&&(A.current=N);const k={...A.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},R=g.useRef(void 0);return g.useEffect(()=>(R.current=xt(()=>{v(t)}),()=>{xt.cancel(R.current)}),[t]),g.createElement(Yu,{prefixCls:e,popupClassName:Z(`${e}-popup`,{[`${e}-rtl`]:d},i,y),stretch:l==="horizontal"?"minWidth":null,getPopupContainer:u,builtinPlacements:C,popupPlacement:I,popupVisible:E,popup:r,popupStyle:o,popupAlign:a&&{offset:a},action:s?[]:[m],mouseEnterDelay:f,mouseLeaveDelay:p,onPopupVisibleChange:c,forceRender:w,popupMotion:k,fresh:!0},n)}function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fc.apply(this,arguments)}function ON({id:e,open:t,keyPath:n,children:r}){const o="inline",{prefixCls:i,forceSubMenuRender:a,motion:s,defaultMotions:l,mode:c}=g.useContext(Ln),u=g.useRef(!1);u.current=c===o;const[d,f]=g.useState(!u.current),p=u.current?t:!1;g.useEffect(()=>{u.current&&f(!1)},[c]);const h={...kx(o,s,l)};n.length>1&&(h.motionAppear=!1);const m=h.onVisibleChanged;return h.onVisibleChanged=w=>(!u.current&&!w&&f(!0),m==null?void 0:m(w)),d?null:g.createElement(fi,{mode:o,locked:!u.current},g.createElement(vr,Fc({visible:p},h,{forceRender:a,removeOnLeave:!1,leavedClassName:`${i}-hidden`}),({className:w,style:y})=>g.createElement(sd,{id:e,className:w,style:y},r)))}function mi(){return mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mi.apply(this,arguments)}const DN=g.forwardRef((e,t)=>{const{style:n,className:r,styles:o,classNames:i,title:a,itemTitle:s,eventKey:l,warnKey:c,disabled:u,internalPopupClose:d,children:f,itemIcon:p,expandIcon:h,popupClassName:m,popupOffset:w,popupStyle:y,onClick:$,onMouseEnter:x,onMouseLeave:E,onTitleClick:v,onTitleMouseEnter:C,onTitleMouseLeave:I,popupRender:N,...A}=e,k=xx(l),{prefixCls:R,mode:O,openKeys:z,disabled:D,overflowDisabled:M,activeKey:L,selectedKeys:_,itemIcon:V,expandIcon:X,onItemClick:P,onOpenChange:Y,onActive:K,popupRender:T}=g.useContext(Ln),{_internalRenderSubMenuItem:ne}=g.useContext(od),{isSubPathKey:F}=g.useContext(vx),U=Mo(),re=`${R}-submenu`,j=D||u,H=g.useRef(null),ee=g.useRef(null);process.env.NODE_ENV!=="production"&&c&&tt(!1,"SubMenu should not leave undefined `key`.");const oe=p??V,B=h??X,ie=z.includes(l),ae=!M&&ie,Se=F(_,l),{active:ye,...q}=Sx(l,j,C,I),[me,he]=g.useState(!1),se=Pe=>{j||he(Pe)},ue=Pe=>{se(!0),x==null||x({key:l,domEvent:Pe})},pe=Pe=>{se(!1),E==null||E({key:l,domEvent:Pe})},Ne=g.useMemo(()=>ye||(O!=="inline"?me||F([L],l):!1),[O,ye,L,me,l,F]),Ee=Ex(U.length),Ie=Pe=>{j||(v==null||v({key:l,domEvent:Pe}),O==="inline"&&Y(l,!ie))},W=Ko(Pe=>{$==null||$(Oa(Pe)),P(Pe)}),Q=Pe=>{O!=="inline"&&Y(l,Pe)},le=()=>{K(l)},be=k&&`${k}-popup`,$e=g.useMemo(()=>g.createElement($x,{icon:O!=="horizontal"?B:void 0,props:{...e,isOpen:ae,isSubMenu:!0}},g.createElement("i",{className:`${re}-arrow`})),[O,B,e,ae,re]);let ce=g.createElement("div",mi({role:"menuitem",style:Ee,className:`${re}-title`,tabIndex:j?null:-1,ref:H,title:s??(typeof a=="string"?a:null),"data-menu-id":M&&k?null:k,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":be,"aria-disabled":j,onClick:Ie,onFocus:le},q),a,$e);const te=g.useRef(O);O!=="inline"&&U.length>1?te.current="vertical":te.current=O;const ve=te.current,Re=g.useMemo(()=>{const Pe=g.createElement(fi,{classNames:i,styles:o,mode:ve==="horizontal"?"vertical":ve},g.createElement(sd,{id:be,ref:ee},f)),ze=N||T;return ze?ze(Pe,{item:e,keys:U}):Pe},[N,T,U,be,f,e,ve]);if(!M){const Pe=te.current;ce=g.createElement(zN,{mode:Pe,prefixCls:re,visible:!d&&ae&&O!=="inline",popupClassName:m,popupOffset:w,popupStyle:y,popup:Re,disabled:j,onVisibleChange:Q},ce)}let Ue=g.createElement(rr.Item,mi({ref:t,role:"none"},A,{component:"li",style:n,className:Z(re,`${re}-${O}`,r,{[`${re}-open`]:ae,[`${re}-active`]:Ne,[`${re}-selected`]:Se,[`${re}-disabled`]:j}),onMouseEnter:ue,onMouseLeave:pe}),ce,!M&&g.createElement(ON,{id:be,open:ae,keyPath:U},f));return ne&&(Ue=ne(Ue,e,{selected:Se,active:Ne,open:ae,disabled:j})),g.createElement(fi,{classNames:i,styles:o,onItemClick:W,mode:O==="horizontal"?"vertical":O,itemIcon:oe,expandIcon:B},Ue)}),Ei=g.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=Mo(n),i=ld(r,o),a=cs();g.useEffect(()=>{if(a)return a.registerPath(n,o),()=>{a.unregisterPath(n,o)}},[o]);let s;return a?s=i:s=g.createElement(DN,mi({ref:t},e),i),g.createElement(wx.Provider,{value:o},s)});process.env.NODE_ENV!=="production"&&(Ei.displayName="SubMenu");function cd({className:e,style:t}){const{prefixCls:n}=g.useContext(Ln);return cs()?null:g.createElement("li",{role:"separator",className:Z(`${n}-item-divider`,e),style:t})}function Da(){return Da=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Da.apply(this,arguments)}const LN=g.forwardRef((e,t)=>{const{className:n,title:r,eventKey:o,children:i,...a}=e,{prefixCls:s,classNames:l,styles:c}=g.useContext(Ln),u=`${s}-item-group`;return g.createElement("li",Da({ref:t,role:"presentation"},a,{onClick:d=>d.stopPropagation(),className:Z(u,n)}),g.createElement("div",{role:"presentation",className:Z(`${u}-title`,l==null?void 0:l.listTitle),style:c==null?void 0:c.listTitle,title:typeof r=="string"?r:void 0},r),g.createElement("ul",{role:"group",className:Z(`${u}-list`,l==null?void 0:l.list),style:c==null?void 0:c.list},i))}),ds=g.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=Mo(n),i=ld(r,o);return cs()?i:g.createElement(LN,Da({ref:t},Yt(e,["warnKey"])),i)});process.env.NODE_ENV!=="production"&&(ds.displayName="MenuItemGroup");function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},so.apply(this,arguments)}function _c(e,t,n){const{item:r,group:o,submenu:i,divider:a}=t;return(e||[]).map((s,l)=>{if(s&&typeof s=="object"){const{label:c,children:u,key:d,type:f,extra:p,...h}=s,m=d??`tmp-${l}`;if(u||f==="group"){if(f==="group")return g.createElement(o,so({key:m},h,{title:c}),_c(u,t,n));const{title:y,...$}=h;return g.createElement(i,so({key:m},$,{title:c,itemTitle:typeof y=="string"?y:void 0}),_c(u,t,n))}if(f==="divider")return g.createElement(a,so({key:m},h));const w=!!p||p===0;return g.createElement(r,so({key:m},h,{extra:p,itemData:{...s,key:m}}),w?g.createElement(g.Fragment,null,g.createElement("span",{className:`${n}-item-label`},c),g.createElement("span",{className:`${n}-item-extra`},p)):c)}return null}).filter(s=>s)}function Gp(e,t,n,r,o){let i=e;const a={divider:cd,item:us,group:ds,submenu:Ei,...r};return t&&(i=_c(t,a,o)),ld(i,n)}function jc(){return jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jc.apply(this,arguments)}const Rr=[],FN=g.forwardRef((e,t)=>{var vt;const{prefixCls:n="rc-menu",rootClassName:r,style:o,className:i,styles:a,classNames:s,tabIndex:l=0,items:c,children:u,direction:d,id:f,mode:p="vertical",inlineCollapsed:h,disabled:m,disabledOverflow:w,subMenuOpenDelay:y=.1,subMenuCloseDelay:$=.1,forceSubMenuRender:x,defaultOpenKeys:E,openKeys:v,activeKey:C,defaultActiveFirst:I,selectable:N=!0,multiple:A=!1,defaultSelectedKeys:k,selectedKeys:R,onSelect:O,onDeselect:z,inlineIndent:D=24,motion:M,defaultMotions:L,triggerSubMenuAction:_="hover",builtinPlacements:V,itemIcon:X,expandIcon:P,overflowedIndicator:Y="...",overflowedIndicatorPopupClassName:K,getPopupContainer:T,onClick:ne,onOpenChange:F,onKeyDown:U,openAnimation:re,openTransitionName:j,_internalRenderMenuItem:H,_internalRenderSubMenuItem:ee,_internalComponents:oe,popupRender:B,...ie}=e,[ae,Se]=g.useMemo(()=>[Gp(u,c,Rr,oe,n),Gp(u,c,Rr,{},n)],[u,c,oe]),[ye,q]=g.useState(!1),me=g.useRef(null),he=Ka(),se=f??`rc-menu-uuid-${he}`,ue=d==="rtl";process.env.NODE_ENV!=="production"&&tt(!re&&!j,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");const[pe,Ne]=un(E,v),Ee=pe||Rr,Ie=(Oe,Qe=!1)=>{function st(){Ne(Oe),F==null||F(Oe)}Qe?po.flushSync(st):st()},[W,Q]=g.useState(Ee),le=g.useRef(!1),[be,$e]=g.useMemo(()=>(p==="inline"||p==="vertical")&&h?["vertical",h]:[p,!1],[p,h]),ce=be==="inline",[te,ve]=g.useState(be),[Re,Ue]=g.useState($e);g.useEffect(()=>{ve(be),Ue($e),le.current&&(ce?Ne(W):Ie(Rr))},[be,$e]);const[Pe,ze]=g.useState(0),Me=Pe>=ae.length-1||te!=="horizontal"||w;g.useEffect(()=>{ce&&Q(Ee)},[Ee]),g.useEffect(()=>(le.current=!0,()=>{le.current=!1}),[]);const{registerPath:it,unregisterPath:Ye,refreshOverflowKeys:It,isSubPathKey:wt,getKeyPath:Ot,getKeys:gt,getSubPathKeys:_t}=kN(),jt=g.useMemo(()=>({registerPath:it,unregisterPath:Ye}),[it,Ye]),_e=g.useMemo(()=>({isSubPathKey:wt}),[wt]);g.useEffect(()=>{It(Me?Rr:ae.slice(Pe+1).map(Oe=>Oe.key))},[Pe,Me]);const[pt,Cn]=un(C||I&&((vt=ae[0])==null?void 0:vt.key),C),jn=Ko(Oe=>{Cn(Oe)}),Bn=Ko(()=>{Cn(void 0)});b.useImperativeHandle(t,()=>({list:me.current,focus:Oe=>{var Te,ke;const Qe=gt(),{elements:st,key2element:Be,element2key:G}=za(Qe,se),ge=id(me.current,st);let de;pt&&Qe.includes(pt)?de=pt:de=ge[0]?G.get(ge[0]):(Te=ae.find(Fe=>!Fe.props.disabled))==null?void 0:Te.key;const we=Be.get(de);de&&we&&((ke=we==null?void 0:we.focus)==null||ke.call(we,Oe))},findItem:({key:Oe})=>{const Qe=gt(),{key2element:st}=za(Qe,se);return st.get(Oe)||null}}));const[Rt,Sn]=un(k||[],R),Ht=g.useMemo(()=>Array.isArray(Rt)?Rt:Rt==null?Rr:[Rt],[Rt]),an=Oe=>{if(N){const{key:Qe}=Oe,st=Ht.includes(Qe);let Be;A?st?Be=Ht.filter(ge=>ge!==Qe):Be=[...Ht,Qe]:Be=[Qe],Sn(Be);const G={...Oe,selectedKeys:Be};st?z==null||z(G):O==null||O(G)}!A&&Ee.length&&te!=="inline"&&Ie(Rr)},Hn=Ko(Oe=>{ne==null||ne(Oa(Oe)),an(Oe)}),fn=Ko((Oe,Qe)=>{let st=Ee.filter(Be=>Be!==Oe);if(Qe)st.push(Oe);else if(te!=="inline"){const Be=_t(Oe);st=st.filter(G=>!Be.has(G))}ai(Ee,st,!0)||Ie(st,!0)}),en=SN(te,pt,ue,se,me,gt,Ot,Cn,(Oe,Qe)=>{const st=Qe??!Ee.includes(Oe);fn(Oe,st)},U);g.useEffect(()=>{q(!0)},[]);const Dt=g.useMemo(()=>({_internalRenderMenuItem:H,_internalRenderSubMenuItem:ee}),[H,ee]),at=te!=="horizontal"||w?ae:ae.map((Oe,Qe)=>g.createElement(fi,{key:Oe.key,overflowDisabled:Qe>Pe,classNames:s,styles:a},Oe)),Vt=g.createElement(rr,jc({id:f,ref:me,prefixCls:`${n}-overflow`,component:"ul",itemComponent:us,className:Z(n,`${n}-root`,`${n}-${te}`,i,{[`${n}-inline-collapsed`]:Re,[`${n}-rtl`]:ue},r),dir:d,style:o,role:"menu",tabIndex:l,data:at,renderRawItem:Oe=>Oe,renderRawRest:Oe=>{const Qe=Oe.length,st=Qe?ae.slice(-Qe):null;return g.createElement(Ei,{eventKey:Dc,title:Y,disabled:Me,internalPopupClose:Qe===0,popupClassName:K},st)},maxCount:te!=="horizontal"||w?rr.INVALIDATE:rr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:Oe=>{ze(Oe)},onKeyDown:en},ie));return g.createElement(od.Provider,{value:Dt},g.createElement(hx.Provider,{value:se},g.createElement(fi,{prefixCls:n,rootClassName:r,classNames:s,styles:a,mode:te,openKeys:Ee,rtl:ue,disabled:m,motion:ye?M:null,defaultMotions:ye?L:null,activeKey:pt,onActive:jn,onInactive:Bn,selectedKeys:Ht,inlineIndent:D,subMenuOpenDelay:y,subMenuCloseDelay:$,forceSubMenuRender:x,builtinPlacements:V,triggerSubMenuAction:_,getPopupContainer:T,itemIcon:X,expandIcon:P,onItemClick:Hn,onOpenChange:fn,popupRender:B},g.createElement(vx.Provider,{value:_e},Vt),g.createElement("div",{style:{display:"none"},"aria-hidden":!0},g.createElement(yx.Provider,{value:jt},Se)))))}),$i=FN;$i.Item=us;$i.SubMenu=Ei;$i.ItemGroup=ds;$i.Divider=cd;var _N={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};function Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bc.apply(this,arguments)}const jN=(e,t)=>g.createElement(Jt,Bc({},e,{ref:t,icon:_N})),Ix=g.forwardRef(jN);process.env.NODE_ENV!=="production"&&(Ix.displayName="BarsOutlined");const BN=g.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),HN=e=>{const{antCls:t,componentCls:n,colorText:r,footerBg:o,headerHeight:i,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=e;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:i,padding:a,color:s,lineHeight:xe(i),background:d,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:o},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},Rx=e=>{const{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:i,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=e,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:o,footerPadding:`${i}px ${c}px`,footerBg:t,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:o}},Px=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];on("Layout",HN,Rx,{deprecatedTokens:Px});const VN=e=>{const{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:o,antCls:i,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:p,lightTriggerColor:h,lightTriggerBg:m,bodyBg:w}=e;return{[t]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${i}-menu${i}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:xe(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:c,insetInlineEnd:e.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${xe(f)} ${xe(f)} 0`,cursor:"pointer",transition:`background-color ${o} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${o}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${xe(f)} 0 0 ${xe(f)}`}},"&-light":{background:p,[`${t}-trigger`]:{color:h,background:m},[`${t}-zero-width-trigger`]:{color:h,background:m,border:`${xe(e.lineWidth)} ${e.lineType} ${w}`,borderInlineStart:0}}}}},WN=on(["Layout","Sider"],VN,Rx,{deprecatedTokens:Px}),Kp={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1839.98px"},qN=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),ud=g.createContext({}),XN=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),UN=g.forwardRef((e,t)=>{const{prefixCls:n,className:r,trigger:o,children:i,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:p,breakpoint:h,onCollapse:m,onBreakpoint:w,classNames:y,styles:$,...x}=e,{siderHook:E}=b.useContext(BN),[v,C]=un(a,e.collapsed),[I,N]=b.useState(!1),A=(B,ie)=>{C(B),m==null||m(B,ie)},k={...e,collapsed:v,defaultCollapsed:a,theme:s,style:l,collapsible:c,reverseArrow:u,width:d,collapsedWidth:f,zeroWidthTriggerStyle:p,breakpoint:h,onCollapse:m,onBreakpoint:w},[R,O]=Pn([y],[$],{props:k}),{getPrefixCls:z,direction:D}=b.useContext(dt),M=z("layout-sider",n),[L,_]=WN(M),V=b.useRef(null);V.current=B=>{N(B.matches),w==null||w(B.matches),v!==B.matches&&A(B.matches,"responsive")},b.useEffect(()=>{function B(ae){var Se;return(Se=V.current)==null?void 0:Se.call(V,ae)}let ie;return typeof(window==null?void 0:window.matchMedia)<"u"&&h&&h in Kp&&(ie=window.matchMedia(`screen and (max-width: ${Kp[h]})`),Qt(ie==null?void 0:ie.addEventListener)&&ie.addEventListener("change",B),B(ie)),()=>{Qt(ie==null?void 0:ie.removeEventListener)&&ie.removeEventListener("change",B)}},[h]),b.useEffect(()=>{const B=XN("ant-sider-");return E.addSider(B),()=>E.removeSider(B)},[]);const X=()=>{A(!v,"clickTrigger")},P=Yt(x,["collapsed"]),Y=v?f:d,K=qN(Y)?`${Y}px`:String(Y),T=Number.parseFloat(String(f||0))===0?g.createElement("span",{onClick:X,className:Z(`${M}-zero-width-trigger`,`${M}-zero-width-trigger-${u?"right":"left"}`),style:p},o||g.createElement(Ix,null)):null,ne=D==="rtl"==!u,re={expanded:ne?g.createElement(Ia,null):g.createElement(Aa,null),collapsed:ne?g.createElement(Aa,null):g.createElement(Ia,null)}[v?"collapsed":"expanded"],j=o!==null?T||g.createElement("div",{className:`${M}-trigger`,onClick:X,style:{width:K}},o||re):null,H={...l,flex:`0 0 ${K}`,maxWidth:K,minWidth:K,width:K},ee=Z(M,`${M}-${s}`,{[`${M}-collapsed`]:!!v,[`${M}-has-trigger`]:c&&o!==null&&!T,[`${M}-below`]:!!I,[`${M}-zero-width`]:Number.parseFloat(K)===0},r,R.root,L,_),oe=g.useMemo(()=>({siderCollapsed:v}),[v]);return g.createElement(ud.Provider,{value:oe},g.createElement("aside",{className:ee,...P,style:{...O.root,...H},ref:t},g.createElement("div",{className:Z(`${M}-children`,R.body),style:O.body},i),c||I&&T?j:null))});process.env.NODE_ENV!=="production"&&(UN.displayName="Sider");var GN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hc.apply(this,arguments)}const KN=(e,t)=>g.createElement(Jt,Hc({},e,{ref:t,icon:GN})),dd=g.forwardRef(KN);process.env.NODE_ENV!=="production"&&(dd.displayName="EllipsisOutlined");const La=b.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),Tx=e=>{const{prefixCls:t,className:n,dashed:r,...o}=e,{getPrefixCls:i}=g.useContext(dt),a=i("menu",t),s=Z({[`${a}-item-divider-dashed`]:!!r},n);return g.createElement(cd,{className:s,...o})},Nx=e=>{var k,R;const{className:t,children:n,icon:r,title:o,danger:i,extra:a}=e,{prefixCls:s,firstLevel:l,direction:c,disableMenuItemTitleTooltip:u,tooltip:d,inlineCollapsed:f,styles:p,classNames:h}=g.useContext(La),{siderCollapsed:m}=g.useContext(ud),w=!!(m||f),[y,$]=g.useState(!1);g.useEffect(()=>{$(!1)},[w]);const x=O=>{var M,L;const z=n==null?void 0:n[0],D=g.createElement("span",{className:Z(`${s}-title-content`,l?h==null?void 0:h.itemContent:(M=h==null?void 0:h.subMenu)==null?void 0:M.itemContent,{[`${s}-title-content-with-extra`]:!!a||a===0}),style:l?p==null?void 0:p.itemContent:(L=p==null?void 0:p.subMenu)==null?void 0:L.itemContent},n);return(!r||g.isValidElement(n)&&n.type==="span")&&n&&O&&l&&typeof z=="string"?g.createElement("div",{className:`${s}-inline-collapsed-noicon`},z.charAt(0)):D};let E=o;typeof o>"u"?E=l?n:"":o===!1&&(E="");const v=d===!1?void 0:d,C=v&&v.title!==void 0?v.title:E,I={...v??null,title:C};w?(I.open=(v==null?void 0:v.open)??y,I.onOpenChange=O=>{var z;$(O),(z=v==null?void 0:v.onOpenChange)==null||z.call(v,O)}):(I.title=null,I.open=!1);const N=or(n).length;let A=g.createElement(us,{...Yt(e,["title","icon","danger"]),className:Z(l?h==null?void 0:h.item:(k=h==null?void 0:h.subMenu)==null?void 0:k.item,{[`${s}-item-danger`]:i,[`${s}-item-only-child`]:(r?N+1:N)===1},t),style:{...l?p==null?void 0:p.item:(R=p==null?void 0:p.subMenu)==null?void 0:R.item,...e.style},title:typeof o=="string"?o:void 0,itemData:(e==null?void 0:e.itemData)??{...e,key:e.eventKey}},Dn(r,O=>{var z,D;return{className:Z(`${s}-item-icon`,l?h==null?void 0:h.itemIcon:(z=h==null?void 0:h.subMenu)==null?void 0:z.itemIcon,O.className),style:{...l?p==null?void 0:p.itemIcon:(D=p==null?void 0:p.subMenu)==null?void 0:D.itemIcon,...O.style}}}),x(f));if(!u&&d!==!1){const O=v&&v.placement?v.placement:c==="rtl"?"left":"right",z=`${s}-inline-collapsed-tooltip`,D=L=>({...L,root:Z(z,L==null?void 0:L.root)}),M=Qt(v==null?void 0:v.classNames)?L=>{const _=v.classNames(L);return D(_)}:D(v==null?void 0:v.classNames);A=g.createElement(Si,{...I,placement:O,classNames:M},A)}return A},Fa=g.createContext(null),YN=g.forwardRef((e,t)=>{const{children:n,...r}=e,o=g.useContext(Fa),i=g.useMemo(()=>({...o,...r}),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=Kg(n),s=Hr(t,a?cr(n):null);return g.createElement(Fa.Provider,{value:i},g.createElement(Ta,{space:!0},a?g.cloneElement(n,{ref:s}):n))}),QN=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${xe(i)} ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${t}-item:hover,
|
|
211
211
|
> ${t}-item-active,
|
|
212
|
-
> ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:["border-color","background-color"].map(l=>`${l} ${n}`).join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},
|
|
213
|
-
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${xe(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${xe(t)})`}}}}),
|
|
212
|
+
> ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:["border-color","background-color"].map(l=>`${l} ${n}`).join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},ZN=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
|
|
213
|
+
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${xe(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${xe(t)})`}}}}),Yp=e=>Vu(e),Qp=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,subMenuItemSelectedColor:i,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:p,motionEaseInOut:h,motionEaseOut:m,itemPaddingInline:w,motionDurationMid:y,itemHoverColor:$,lineType:x,colorSplit:E,itemDisabledColor:v,dangerItemColor:C,dangerItemHoverColor:I,dangerItemSelectedColor:N,dangerItemActiveBg:A,dangerItemSelectedBg:k,popupBg:R,itemHoverBg:O,itemActiveBg:z,menuSubMenuBg:D,horizontalItemSelectedColor:M,horizontalItemSelectedBg:L,horizontalItemBorderRadius:_,horizontalItemHoverBg:V}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:{...Yp(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:i},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...Yp(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${v} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:$}},[`${n}-submenu:not(${n}-submenu-selected)`]:{[`> ${n}-submenu-title:hover`]:{color:$}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:z}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:z}}},[`${n}-item-danger`]:{color:C,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:I}},[`&${n}-item:active`]:{background:A}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:N},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:k}},[`&${n}-submenu > ${n}`]:{backgroundColor:D},[`&${n}-popup > ${n}`]:{backgroundColor:R},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:R},[`&${n}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:_,"&::after":{position:"absolute",insetInline:w,bottom:0,pointerEvents:"none",borderBottom:`${xe(u)} solid transparent`,transition:`border-color ${p} ${h}`,content:'""'},"&:hover, &-active, &-open":{background:V,"&::after":{borderBottomWidth:u,borderBottomColor:M}},"&-selected":{color:M,backgroundColor:L,"&:hover":{backgroundColor:L},"&::after":{borderBottomWidth:u,borderBottomColor:M}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${xe(f)} ${x} ${E}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${xe(d)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:["transform","opacity"].map(X=>`${X} ${y} ${m}`).join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:N}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform","opacity"].map(X=>`${X} ${y} ${h}`).join(",")}}}}}},Zp=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=e,u=e.calc(i).add(o).add(a).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:xe(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${t}-item,
|
|
214
214
|
> ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:xe(n)},[`${t}-item-group-list ${t}-submenu-title,
|
|
215
|
-
${t}-submenu-title`]:{paddingInlineEnd:u}}},
|
|
215
|
+
${t}-submenu-title`]:{paddingInlineEnd:u}}},JN=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,padding:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationSlow:d,paddingXS:f,boxShadowSecondary:p,collapsedWidth:h,collapsedIconSize:m}=e,w={height:r,lineHeight:xe(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...Zp(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...Zp(e),boxShadow:p}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${xe(e.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${d}`,`background-color ${d}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:w,[`& ${t}-item-group-title`]:{paddingInlineStart:l}},[`${t}-item`]:w}},{[`${t}-inline-collapsed`]:{width:h,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{transition:["border-color","background-color"].map(y=>`${y} ${d}`).join(","),[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center",width:"100%"}}},[`> ${t}-item,
|
|
216
216
|
> ${t}-item-group > ${t}-item-group-list > ${t}-item,
|
|
217
217
|
> ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
|
|
218
218
|
> ${t}-submenu > ${t}-submenu-title`]:{display:"flex",alignItems:"center",justifyContent:"flex-start",insetInlineStart:0,paddingInline:`calc(50% - ${xe(e.calc(m).div(2).equal())} - ${xe(c)})`,textOverflow:"clip",[`
|
|
219
219
|
${t}-submenu-arrow,
|
|
220
220
|
${t}-submenu-expand-icon
|
|
221
|
-
`]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:"hidden"},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:m,lineHeight:xe(r),"+ span":{display:"inline-block",width:0,opacity:0,overflow:"hidden",marginInlineStart:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},[`${t}-item-extra`]:{paddingInlineStart:s},"a, a:hover":{color:o}},[`${t}-item-group-title`]:{...
|
|
222
|
-
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${xe(m)})`},"&::after":{transform:`rotate(45deg) translateX(${xe(e.calc(m).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${xe(e.calc(h).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${xe(e.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${xe(m)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},eM=e=>{const{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:o,colorText:i,colorTextDescription:a,colorBgContainer:s,colorFillAlter:l,colorFillContent:c,lineWidth:u,lineWidthBold:d,controlItemBgActive:f,colorBgTextHover:p,controlHeightLG:h,lineHeight:m,colorBgElevated:w,marginXXS:y,padding:$,fontSize:x,controlHeightSM:E,fontSizeLG:v,colorTextLightSolid:C,colorErrorHover:I}=e,N=e.activeBarWidth??0,M=e.activeBarBorderWidth??u,k=e.itemMarginInline??e.marginXXS,R=new Ve(C).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:a,groupTitleColor:a,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:s,itemBg:s,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:c,itemActiveBg:f,colorSubItemBg:l,subMenuItemBg:l,colorItemBgSelected:f,itemSelectedBg:f,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:N,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:M,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:o,dangerItemActiveBg:o,colorDangerItemBgSelected:o,dangerItemSelectedBg:o,itemMarginInline:k,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:h,groupTitleLineHeight:m,collapsedWidth:h*2,popupBg:w,itemMarginBlock:y,itemPaddingInline:$,horizontalLineHeight:`${h*1.15}px`,iconSize:x,iconMarginInlineEnd:E-x,collapsedIconSize:v,groupTitleFontSize:x,darkItemDisabledColor:new Ve(C).setA(.25).toRgbString(),darkItemColor:R,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:C,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:R,darkItemHoverColor:C,darkDangerItemHoverColor:I,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:n,itemWidth:N?`calc(100% + ${M}px)`:`calc(100% - ${k*2}px)`}},tM=(e,t=e,n=!0)=>on("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:p,darkDangerItemSelectedBg:h,darkItemHoverBg:m,darkGroupTitleColor:w,darkItemHoverColor:y,darkItemDisabledColor:$,darkDangerItemHoverColor:x,darkDangerItemSelectedColor:E,darkDangerItemActiveBg:v,popupBg:C,darkPopupBg:I}=o,N=o.calc(s).div(7).mul(5).equal(),M=yt(o,{menuArrowSize:N,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(N).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:C}),k=yt(M,{itemColor:l,itemHoverColor:y,groupTitleColor:w,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:I,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:m,itemDisabledColor:$,dangerItemColor:c,dangerItemHoverColor:x,dangerItemSelectedColor:E,dangerItemActiveBg:v,dangerItemSelectedBg:h,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:p});return[JN(M),YN(M),ZN(M),Gp(M,"light"),Gp(k,"dark"),QN(M),FR(M),io(M,"slide-up"),io(M,"slide-down"),Yu(M,"zoom-big")]},eM,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),Nx=e=>{var m,w,y,$,x,E;const{popupClassName:t,icon:n,title:r,theme:o}=e,i=g.useContext(Da),{prefixCls:a,inlineCollapsed:s,theme:l,classNames:c,styles:u}=i,d=No();let f;if(!n)f=s&&!d.length&&r&&typeof r=="string"?g.createElement("div",{className:`${a}-inline-collapsed-noicon`},r.charAt(0)):g.createElement("span",{className:`${a}-title-content`},r);else{const v=g.isValidElement(r)&&r.type==="span";f=g.createElement(g.Fragment,null,Dn(n,C=>({className:Z(C.className,`${a}-item-icon`,c==null?void 0:c.itemIcon),style:{...C.style,...u==null?void 0:u.itemIcon}})),v?r:g.createElement("span",{className:`${a}-title-content`},r))}const p=g.useMemo(()=>({...i,firstLevel:!1}),[i]),[h]=Ku("Menu");return g.createElement(Da.Provider,{value:p},g.createElement(Si,{...Yt(e,["icon"]),title:f,classNames:{list:(m=c==null?void 0:c.subMenu)==null?void 0:m.list,listTitle:(w=c==null?void 0:c.subMenu)==null?void 0:w.itemTitle},styles:{list:(y=u==null?void 0:u.subMenu)==null?void 0:y.list,listTitle:($=u==null?void 0:u.subMenu)==null?void 0:$.itemTitle},popupClassName:Z(a,t,(x=c==null?void 0:c.popup)==null?void 0:x.root,`${a}-${o||l}`),popupStyle:{zIndex:h,...e.popupStyle,...(E=u==null?void 0:u.popup)==null?void 0:E.root}}))};function ol(e){return e===null||e===!1}const nM={item:Tx,submenu:Nx,divider:Px},rM=b.forwardRef((e,t)=>{var B;const n=g.useContext(La),r=n||{},{prefixCls:o,className:i,style:a,theme:s="light",expandIcon:l,_internalDisableMenuItemTitleTooltip:c,tooltip:u,inlineCollapsed:d,siderCollapsed:f,rootClassName:p,mode:h,selectable:m,onClick:w,overflowedIndicatorPopupClassName:y,classNames:$,styles:x,...E}=e,{menu:v}=g.useContext(dt),{getPrefixCls:C,getPopupContainer:I,direction:N,className:M,style:k,classNames:R,styles:O}=Kn("menu"),A=C(),z=Yt(E,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const ie=At("Menu");process.env.NODE_ENV!=="production"&&ie(!("inlineCollapsed"in e&&h!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),ie.deprecated("items"in e&&!e.children,"children","items")}(B=r.validator)==null||B.call(r,{mode:h});const D=Ke((...ie)=>{var ae;w==null||w(...ie),(ae=r.onClick)==null||ae.call(r)}),L=r.mode||h,j=m??r.selectable,V=d??f,q={...e,mode:L,inlineCollapsed:V,selectable:j,theme:s},P=kt(k),Q=kt(a),[X,T]=Pn([R,$],[O,P,x,Q],{props:q},{popup:{_default:"root"},subMenu:{_default:"item"}}),J={horizontal:{motionName:`${A}-slide-up`},inline:CR(A),other:{motionName:`${A}-zoom-big`}},F=C("menu",o||r.prefixCls),G=Ro(F),[re,_]=tM(F,G,!n),H=Z(`${F}-${s}`,M,i),te=g.useMemo(()=>{var ae;if(Qt(l)||ol(l))return l||null;if(Qt(r.expandIcon)||ol(r.expandIcon))return r.expandIcon||null;if(Qt(v==null?void 0:v.expandIcon)||ol(v==null?void 0:v.expandIcon))return(v==null?void 0:v.expandIcon)||null;const ie=l??(r==null?void 0:r.expandIcon)??(v==null?void 0:v.expandIcon);return Dn(ie,{className:Z(`${F}-submenu-expand-icon`,g.isValidElement(ie)?(ae=ie.props)==null?void 0:ae.className:void 0)})},[l,r==null?void 0:r.expandIcon,v==null?void 0:v.expandIcon,F]),oe=g.useMemo(()=>({prefixCls:F,inlineCollapsed:V||!1,direction:N,firstLevel:!0,theme:s,mode:L,disableMenuItemTitleTooltip:c,tooltip:u,classNames:X,styles:T}),[F,V,N,c,s,L,X,T,u]);return g.createElement(La.Provider,{value:null},g.createElement(Da.Provider,{value:oe},g.createElement(Ei,{getPopupContainer:I,overflowedIndicator:g.createElement(ld,null),overflowedIndicatorPopupClassName:Z(F,`${F}-${s}`,y),classNames:{list:X.list,listTitle:X.itemTitle},styles:{list:T.list,listTitle:T.itemTitle},mode:L,selectable:j,onClick:D,...z,inlineCollapsed:V,style:T.root,className:H,prefixCls:F,direction:N,defaultMotions:J,expandIcon:te,ref:t,rootClassName:Z(p,re,r.rootClassName,_,G,X.root),_internalComponents:nM})))}),Mo=b.forwardRef((e,t)=>{const n=b.useRef(null),r=g.useContext(sd);return b.useImperativeHandle(t,()=>({menu:n.current,focus:o=>{var i;(i=n.current)==null||i.focus(o)}})),g.createElement(rM,{ref:n,...e,...r})});Mo.Item=Tx;Mo.SubMenu=Nx;Mo.Divider=Px;Mo.ItemGroup=us;process.env.NODE_ENV!=="production"&&(Mo.displayName="Menu");const oM=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},iM=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:h,colorBgElevated:m,controlHeightLG:w}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:`calc(100vh - ${xe(e.calc(w).mul(2.5).equal())})`,overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft,
|
|
221
|
+
`]:{opacity:0},[`> ${t}-title-content`]:{width:0,opacity:0,overflow:"hidden"},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:m,lineHeight:xe(r),"+ span":{display:"inline-block",width:0,opacity:0,overflow:"hidden",marginInlineStart:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},[`${t}-item-extra`]:{paddingInlineStart:s},"a, a:hover":{color:o}},[`${t}-item-group-title`]:{...eb,paddingInline:f}}}]},Jp=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background-color ${n}`,`padding calc(${n} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${i}`,`margin ${n} ${o}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${o}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:{...Hu()},[`&${t}-item-only-child`]:{[`> ${a}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},em=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:["transform","opacity"].map(s=>`${s} ${n}`).join(",")},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:["background-color","transform","top","color"].map(s=>`${s} ${n} ${r}`).join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${xe(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${xe(a)})`}}}}},eM=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:h,menuArrowOffset:m,lineType:w,groupTitleLineHeight:y,groupTitleFontSize:$,iconSize:x,iconMarginInlineEnd:E}=e,v=[`> ${t}-typography-ellipsis-single-line`,`> ${n}-item-label > ${t}-typography-ellipsis-single-line`].join(",");return[{"":{[n]:{...rc(),"&-hidden":{display:"none"}}},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:{...Ro(e),...rc(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${xe(s)} ${xe(l)}`,fontSize:$,lineHeight:y,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:["border-color","background-color"].map(C=>`${C} ${o} ${a}`).join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o}`,`background-color ${o}`,`padding ${i}`].map(C=>`${C} ${a}`).join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:["background-color","padding"].map(C=>`${C} ${o} ${a}`).join(",")},[`${n}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%",minWidth:0},[`${n}-item-label`]:{flex:"auto",minWidth:0,...eb},[v]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{flex:"none",marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item-icon + ${n}-title-content-with-extra`]:{width:`calc(100% - ${xe(e.calc(x).add(E??0).equal())})`},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:w,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}},...Jp(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${xe(e.calc(r).mul(2).equal())} ${xe(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:f,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:{borderRadius:f,...Jp(e),...em(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${a}`}}},"&-placement-leftTop, &-placement-bottomRight":{transformOrigin:"100% 0"},"&-placement-leftBottom, &-placement-topRight":{transformOrigin:"100% 100%"},"&-placement-rightBottom, &-placement-topLeft":{transformOrigin:"0 100%"},"&-placement-bottomLeft, &-placement-rightTop":{transformOrigin:"0 0"},"&-placement-leftTop, &-placement-leftBottom":{paddingInlineEnd:e.paddingXS},"&-placement-rightTop, &-placement-rightBottom":{paddingInlineStart:e.paddingXS},"&-placement-topRight, &-placement-topLeft":{paddingBottom:e.paddingXS},"&-placement-bottomRight, &-placement-bottomLeft":{paddingTop:e.paddingXS}},...em(e),[`&-inline-collapsed ${n}-submenu-arrow,
|
|
222
|
+
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${xe(m)})`},"&::after":{transform:`rotate(45deg) translateX(${xe(e.calc(m).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${xe(e.calc(h).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${xe(e.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${xe(m)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},tM=e=>{const{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:o,colorText:i,colorTextDescription:a,colorBgContainer:s,colorFillAlter:l,colorFillContent:c,lineWidth:u,lineWidthBold:d,controlItemBgActive:f,colorBgTextHover:p,controlHeightLG:h,lineHeight:m,colorBgElevated:w,marginXXS:y,padding:$,fontSize:x,controlHeightSM:E,fontSizeLG:v,colorTextLightSolid:C,colorErrorHover:I}=e,N=e.activeBarWidth??0,A=e.activeBarBorderWidth??u,k=e.itemMarginInline??e.marginXXS,R=new Ve(C).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:a,groupTitleColor:a,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:s,itemBg:s,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:c,itemActiveBg:f,colorSubItemBg:l,subMenuItemBg:l,colorItemBgSelected:f,itemSelectedBg:f,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:N,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:A,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:o,dangerItemActiveBg:o,colorDangerItemBgSelected:o,dangerItemSelectedBg:o,itemMarginInline:k,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:h,groupTitleLineHeight:m,collapsedWidth:h*2,popupBg:w,itemMarginBlock:y,itemPaddingInline:$,horizontalLineHeight:`${h*1.15}px`,iconSize:x,iconMarginInlineEnd:E-x,collapsedIconSize:v,groupTitleFontSize:x,darkItemDisabledColor:new Ve(C).setA(.25).toRgbString(),darkItemColor:R,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:C,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:R,darkItemHoverColor:C,darkDangerItemHoverColor:I,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:n,itemWidth:N?`calc(100% + ${A}px)`:`calc(100% - ${k*2}px)`}},nM=(e,t=e,n=!0)=>on("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:p,darkDangerItemSelectedBg:h,darkItemHoverBg:m,darkGroupTitleColor:w,darkItemHoverColor:y,darkItemDisabledColor:$,darkDangerItemHoverColor:x,darkDangerItemSelectedColor:E,darkDangerItemActiveBg:v,popupBg:C,darkPopupBg:I}=o,N=o.calc(s).div(7).mul(5).equal(),A=yt(o,{menuArrowSize:N,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(N).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:C}),k=yt(A,{itemColor:l,itemHoverColor:y,groupTitleColor:w,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:I,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:m,itemDisabledColor:$,dangerItemColor:c,dangerItemHoverColor:x,dangerItemSelectedColor:E,dangerItemActiveBg:v,dangerItemSelectedBg:h,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:p});return[eM(A),QN(A),JN(A),Qp(A,"light"),Qp(k,"dark"),ZN(A),_R(A),io(A,"slide-up"),io(A,"slide-down"),Ju(A,"zoom-big")]},tM,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),Mx=e=>{var m,w,y,$,x,E;const{popupClassName:t,icon:n,title:r,theme:o}=e,i=g.useContext(La),{prefixCls:a,inlineCollapsed:s,theme:l,classNames:c,styles:u}=i,d=Mo();let f;if(!n)f=s&&!d.length&&r&&typeof r=="string"?g.createElement("div",{className:`${a}-inline-collapsed-noicon`},r.charAt(0)):g.createElement("span",{className:`${a}-title-content`},r);else{const v=g.isValidElement(r)&&r.type==="span";f=g.createElement(g.Fragment,null,Dn(n,C=>({className:Z(C.className,`${a}-item-icon`,c==null?void 0:c.itemIcon),style:{...C.style,...u==null?void 0:u.itemIcon}})),v?r:g.createElement("span",{className:`${a}-title-content`},r))}const p=g.useMemo(()=>({...i,firstLevel:!1}),[i]),[h]=Zu("Menu");return g.createElement(La.Provider,{value:p},g.createElement(Ei,{...Yt(e,["icon"]),title:f,classNames:{list:(m=c==null?void 0:c.subMenu)==null?void 0:m.list,listTitle:(w=c==null?void 0:c.subMenu)==null?void 0:w.itemTitle},styles:{list:(y=u==null?void 0:u.subMenu)==null?void 0:y.list,listTitle:($=u==null?void 0:u.subMenu)==null?void 0:$.itemTitle},popupClassName:Z(a,t,(x=c==null?void 0:c.popup)==null?void 0:x.root,`${a}-${o||l}`),popupStyle:{zIndex:h,...e.popupStyle,...(E=u==null?void 0:u.popup)==null?void 0:E.root}}))};function il(e){return e===null||e===!1}const rM={item:Nx,submenu:Mx,divider:Tx},oM=b.forwardRef((e,t)=>{var B;const n=g.useContext(Fa),r=n||{},{prefixCls:o,className:i,style:a,theme:s="light",expandIcon:l,_internalDisableMenuItemTitleTooltip:c,tooltip:u,inlineCollapsed:d,siderCollapsed:f,rootClassName:p,mode:h,selectable:m,onClick:w,overflowedIndicatorPopupClassName:y,classNames:$,styles:x,...E}=e,{menu:v}=g.useContext(dt),{getPrefixCls:C,getPopupContainer:I,direction:N,className:A,style:k,classNames:R,styles:O}=Kn("menu"),z=C(),D=Yt(E,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const ie=At("Menu");process.env.NODE_ENV!=="production"&&ie(!("inlineCollapsed"in e&&h!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),ie.deprecated("items"in e&&!e.children,"children","items")}(B=r.validator)==null||B.call(r,{mode:h});const M=Ge((...ie)=>{var ae;w==null||w(...ie),(ae=r.onClick)==null||ae.call(r)}),L=r.mode||h,_=m??r.selectable,V=d??f,X={...e,mode:L,inlineCollapsed:V,selectable:_,theme:s},P=kt(k),Y=kt(a),[K,T]=Pn([R,$],[O,P,x,Y],{props:X},{popup:{_default:"root"},subMenu:{_default:"item"}}),ne={horizontal:{motionName:`${z}-slide-up`},inline:SR(z),other:{motionName:`${z}-zoom-big`}},F=C("menu",o||r.prefixCls),U=Po(F),[re,j]=nM(F,U,!n),H=Z(`${F}-${s}`,A,i),ee=g.useMemo(()=>{var ae;if(Qt(l)||il(l))return l||null;if(Qt(r.expandIcon)||il(r.expandIcon))return r.expandIcon||null;if(Qt(v==null?void 0:v.expandIcon)||il(v==null?void 0:v.expandIcon))return(v==null?void 0:v.expandIcon)||null;const ie=l??(r==null?void 0:r.expandIcon)??(v==null?void 0:v.expandIcon);return Dn(ie,{className:Z(`${F}-submenu-expand-icon`,g.isValidElement(ie)?(ae=ie.props)==null?void 0:ae.className:void 0)})},[l,r==null?void 0:r.expandIcon,v==null?void 0:v.expandIcon,F]),oe=g.useMemo(()=>({prefixCls:F,inlineCollapsed:V||!1,direction:N,firstLevel:!0,theme:s,mode:L,disableMenuItemTitleTooltip:c,tooltip:u,classNames:K,styles:T}),[F,V,N,c,s,L,K,T,u]);return g.createElement(Fa.Provider,{value:null},g.createElement(La.Provider,{value:oe},g.createElement($i,{getPopupContainer:I,overflowedIndicator:g.createElement(dd,null),overflowedIndicatorPopupClassName:Z(F,`${F}-${s}`,y),classNames:{list:K.list,listTitle:K.itemTitle},styles:{list:T.list,listTitle:T.itemTitle},mode:L,selectable:_,onClick:M,...D,inlineCollapsed:V,style:T.root,className:H,prefixCls:F,direction:N,defaultMotions:ne,expandIcon:ee,ref:t,rootClassName:Z(p,re,r.rootClassName,j,U,K.root),_internalComponents:rM})))}),Ao=b.forwardRef((e,t)=>{const n=b.useRef(null),r=g.useContext(ud);return b.useImperativeHandle(t,()=>({menu:n.current,focus:o=>{var i;(i=n.current)==null||i.focus(o)}})),g.createElement(oM,{ref:n,...e,...r})});Ao.Item=Nx;Ao.SubMenu=Mx;Ao.Divider=Tx;Ao.ItemGroup=ds;process.env.NODE_ENV!=="production"&&(Ao.displayName="Menu");const iM=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},aM=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:h,colorBgElevated:m,controlHeightLG:w}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:`calc(100vh - ${xe(e.calc(w).mul(2.5).equal())})`,overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:p},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"&-hidden, &-menu-hidden, &-menu-submenu-hidden":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft,
|
|
223
223
|
&${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft,
|
|
224
224
|
&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom,
|
|
225
225
|
&${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom,
|
|
226
226
|
&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight,
|
|
227
|
-
&${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:
|
|
227
|
+
&${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Db},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft,
|
|
228
228
|
&${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft,
|
|
229
229
|
&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top,
|
|
230
230
|
&${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top,
|
|
231
231
|
&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight,
|
|
232
|
-
&${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:
|
|
232
|
+
&${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Fb},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft,
|
|
233
233
|
&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom,
|
|
234
|
-
&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:
|
|
234
|
+
&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Lb},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft,
|
|
235
235
|
&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top,
|
|
236
|
-
&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:
|
|
236
|
+
&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:_b},[`&${a}-slide-right-enter${a}-slide-right-enter-active${t}-placement-right,
|
|
237
237
|
&${a}-slide-right-appear${a}-slide-right-appear-active${t}-placement-right,
|
|
238
238
|
&${a}-slide-right-enter${a}-slide-right-enter-active${t}-placement-rightTop,
|
|
239
239
|
&${a}-slide-right-appear${a}-slide-right-appear-active${t}-placement-rightTop,
|
|
240
240
|
&${a}-slide-right-enter${a}-slide-right-enter-active${t}-placement-rightBottom,
|
|
241
|
-
&${a}-slide-right-appear${a}-slide-right-appear-active${t}-placement-rightBottom`]:{animationName:
|
|
241
|
+
&${a}-slide-right-appear${a}-slide-right-appear-active${t}-placement-rightBottom`]:{animationName:jb},[`&${a}-slide-left-enter${a}-slide-left-enter-active${t}-placement-left,
|
|
242
242
|
&${a}-slide-left-appear${a}-slide-left-appear-active${t}-placement-left,
|
|
243
243
|
&${a}-slide-left-enter${a}-slide-left-enter-active${t}-placement-leftTop,
|
|
244
244
|
&${a}-slide-left-appear${a}-slide-left-appear-active${t}-placement-leftTop,
|
|
245
245
|
&${a}-slide-left-enter${a}-slide-left-enter-active${t}-placement-leftBottom,
|
|
246
|
-
&${a}-slide-left-appear${a}-slide-left-appear-active${t}-placement-leftBottom`]:{animationName:
|
|
246
|
+
&${a}-slide-left-appear${a}-slide-left-appear-active${t}-placement-leftBottom`]:{animationName:Hb},[`&${a}-slide-right-leave${a}-slide-right-leave-active${t}-placement-right,
|
|
247
247
|
&${a}-slide-right-leave${a}-slide-right-leave-active${t}-placement-rightTop,
|
|
248
|
-
&${a}-slide-right-leave${a}-slide-right-leave-active${t}-placement-rightBottom`]:{animationName:
|
|
248
|
+
&${a}-slide-right-leave${a}-slide-right-leave-active${t}-placement-rightBottom`]:{animationName:Bb},[`&${a}-slide-left-leave${a}-slide-left-leave-active${t}-placement-left,
|
|
249
249
|
&${a}-slide-left-leave${a}-slide-left-leave-active${t}-placement-leftTop,
|
|
250
|
-
&${a}-slide-left-leave${a}-slide-left-leave-active${t}-placement-leftBottom`]:{animationName:Hb}}},dx(e,m),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{...Io(e),[n]:{padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...Sa(e),"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${xe(c)} ${xe(h)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> a, > ${n}-item-label > a`]:{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:"flex",margin:0,padding:`${xe(c)} ${xe(h)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Sa(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${xe(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:p,fontStyle:"normal"}}},[`${n}-item-group-list`]:{margin:`0 ${xe(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(h).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[io(e,"slide-up"),io(e,"slide-down"),io(e,"slide-left"),io(e,"slide-right"),Rp(e,"move-up"),Rp(e,"move-down"),Yu(e,"zoom-big")]]},aM=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...ed({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...cx(e)}),sM=on("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=yt(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[iM(i),oM(i)]},aM,{resetStyle:!1}),$i=g.forwardRef((e,t)=>{const{menu:n,arrow:r,prefixCls:o,children:i,trigger:a,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:p,open:h,onOpenChange:m,mouseEnterDelay:w=.15,mouseLeaveDelay:y=.1,autoAdjustOverflow:$=!0,placement:x="",transitionName:E,classNames:v,styles:C,destroyPopupOnHide:I,destroyOnHidden:N}=e,{getPrefixCls:M,direction:k,getPopupContainer:R,className:O,style:A,classNames:z,styles:D}=Kn("dropdown"),L={...e,mouseEnterDelay:w,mouseLeaveDelay:y,autoAdjustOverflow:$},j=kt(A),V=kt(p),[q,P]=Pn([z,v],[D,j,C,V],{props:L}),Q={...P.root},X=c||l,T=At("Dropdown");process.env.NODE_ENV!=="production"&&(Object.entries({dropdownRender:"popupRender",destroyPopupOnHide:"destroyOnHidden",overlayClassName:"classNames.root",overlayStyle:"styles.root"}).forEach(([Y,le])=>{T.deprecated(!(Y in e),Y,le)}),x.includes("Center")&&T.deprecated(!x.includes("Center"),`placement: ${x}`,`placement: ${x.slice(0,x.indexOf("Center"))}`));const J=g.useMemo(()=>{const W=M();return E!==void 0?E:x.startsWith("top")?`${W}-slide-down`:x.startsWith("left")?`${W}-slide-right`:x.startsWith("right")?`${W}-slide-left`:`${W}-slide-up`},[M,x,E]),F=g.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:k==="rtl"?"bottomRight":"bottomLeft",[x,k]),G=M("dropdown",o),re=Ro(G),[_,H]=sM(G,re),[,te]=Cr(),oe=g.Children.only($I(i)?g.createElement("span",null,i):i),B=Hr(t,cr(oe)),ie=Dn(oe,{className:Z(`${G}-trigger`,{[`${G}-rtl`]:k==="rtl"},oe.props.className),disabled:oe.props.disabled??s,ref:B}),ae=s?[]:a,Se=!!(ae!=null&&ae.includes("contextMenu")),[ye,U]=un(!1,h),me=Ke(W=>{m==null||m(W,{source:"trigger"}),U(W)}),he=Z(d,f,_,H,re,O,q.root,{[`${G}-rtl`]:k==="rtl"}),se=fx({arrowPointAtCenter:rn(r)&&r.pointAtCenter,autoAdjustOverflow:$,offset:te.marginXXS,arrowWidth:r?te.sizePopupArrow:0,borderRadius:te.borderRadius}),ue=Ke(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),U(!1))}),pe=()=>{const W=Yt(q,["root"]),Y=Yt(P,["root"]);let le;return n!=null&&n.items&&(le=g.createElement(Mo,{...n,classNames:{...W,subMenu:{...W}},styles:{...Y,subMenu:{...Y}}})),X&&(le=X(le)),br(le)?le=g.createElement("span",null,le):g.isValidElement(le)||(le=g.createElement(g.Fragment,null,le)),g.createElement(KN,{prefixCls:`${G}-menu`,rootClassName:Z(H,re),expandIcon:g.createElement("span",{className:`${G}-menu-submenu-arrow`},k==="rtl"?g.createElement(Ma,{className:`${G}-menu-submenu-arrow-icon`}):g.createElement(ka,{className:`${G}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ue,validator:({mode:be})=>{process.env.NODE_ENV!=="production"&&T(!be||be==="vertical","usage",`mode="${be}" is not supported for Dropdown's Menu.`)}},le)},[Ne,Ee]=Ku("Dropdown",Q.zIndex);let Ie=g.createElement(hN,{alignPoint:Se,...Yt(e,["rootClassName","onOpenChange"]),mouseEnterDelay:w,mouseLeaveDelay:y,visible:ye,builtinPlacements:se,arrow:!!r,overlayClassName:he,prefixCls:G,getPopupContainer:u||R,transitionName:J,trigger:ae,overlay:pe,placement:F,onVisibleChange:me,overlayStyle:{...Q,zIndex:Ne},autoDestroy:N??I},ie);return Ne&&(Ie=g.createElement(is.Provider,{value:Ee},Ie)),Ie}),lM=jT($i,"align",void 0,"dropdown",e=>e),cM=e=>g.createElement(lM,{...e},g.createElement("span",null));$i._InternalPanelDoNotUseOrYouWillBeFired=cM;process.env.NODE_ENV!=="production"&&($i.displayName="Dropdown");function ki(e){return yt(e,{inputAffixPadding:e.paddingXXS})}const Ii=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,lineWidthFocus:i,controlHeightSM:a,controlHeightLG:s,fontSizeLG:l,lineHeightLG:c,paddingSM:u,controlPaddingHorizontalSM:d,controlPaddingHorizontal:f,colorFillAlter:p,colorPrimaryHover:h,colorPrimary:m,controlOutlineWidth:w,controlOutline:y,colorErrorOutline:$,colorWarningOutline:x,colorBgContainer:E,inputFontSize:v,inputFontSizeLG:C,inputFontSizeSM:I}=e,N=v||n,M=I||N,k=C||l,R=Math.round((t-N*r)/2*10)/10-o,O=Math.round((a-M*r)/2*10)/10-o,A=Math.ceil((s-k*c)/2*10)/10-o;return{lineWidthFocus:i===0?0:o,paddingBlock:Math.max(R,0),paddingBlockSM:Math.max(O,0),paddingBlockLG:Math.max(A,0),paddingInline:u-o,paddingInlineSM:d-o,paddingInlineLG:f-o,addonBg:p,activeBorderColor:m,hoverBorderColor:h,activeShadow:`0 0 0 ${w}px ${y}`,errorActiveShadow:`0 0 0 ${w}px ${$}`,warningActiveShadow:`0 0 0 ${w}px ${x}`,hoverBg:E,activeBg:E,inputFontSize:N,inputFontSizeLG:k,inputFontSizeSM:M}},uM=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),cd=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":{...uM(yt(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),Mx=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),Zp=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Mx(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),dM=(e,t)=>({"&-outlined":{...Mx(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...cd(e)},...Zp(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...Zp(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),Jp=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),fM=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...Jp(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...Jp(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...cd(e)}}}}),Ax="&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)",zx=(e,t)=>({outline:`${xe(e.lineWidthFocus)} ${e.lineType} ${t}`,outlineOffset:xe(e.calc(e.lineWidth).mul(-1).equal()),transition:["outline-offset","outline"].map(n=>`${n} 0s`).join(", ")}),em=(e,t)=>({"&, & input, & textarea":{color:t.color},[Ax]:zx(e,t.color),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),pM=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":{background:"transparent",border:"none",paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:"none"},[Ax]:zx(e,e.activeBorderColor),[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:em(e,{color:e.colorError,affixColor:e.colorErrorAffix}),[`&${n}-status-warning`]:em(e,{color:e.colorWarning,affixColor:e.colorWarningAffix}),...t}}},Ox=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(t==null?void 0:t.inputColor)??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),tm=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Ox(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),mM=(e,t)=>({"&-filled":{...Ox(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...cd(e)},...tm(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorErrorAffix}),...tm(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarningAffix}),...t}}),nm=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),gM=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...nm(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...nm(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),Dx=(e,t)=>({background:e.colorBgContainer,borderWidth:`${xe(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),rm=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Dx(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),hM=(e,t)=>({"&-underlined":{...Dx(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"},...rm(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...rm(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),bM=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Lx=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:`${xe(t)} ${xe(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},Fx=e=>({padding:`${xe(e.paddingBlockSM)} ${xe(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),_x=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${xe(e.paddingBlock)} ${xe(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...bM(e.colorTextPlaceholder),"&-lg":{...Lx(e),...t.largeStyle},"&-sm":{...Fx(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),xM=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...Lx(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...Fx(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${xe(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${xe(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${xe(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${xe(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${n}-cascader-picker`]:{margin:`-9px ${xe(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",...nc(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
250
|
+
&${a}-slide-left-leave${a}-slide-left-leave-active${t}-placement-leftBottom`]:{animationName:Vb}}},fx(e,m),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{...Ro(e),[n]:{padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...Ea(e),"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${xe(c)} ${xe(h)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> a, > ${n}-item-label > a`]:{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:"flex",margin:0,padding:`${xe(c)} ${xe(h)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Ea(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${xe(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:p,fontStyle:"normal"}}},[`${n}-item-group-list`]:{margin:`0 ${xe(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(h).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[io(e,"slide-up"),io(e,"slide-down"),io(e,"slide-left"),io(e,"slide-right"),Np(e,"move-up"),Np(e,"move-down"),Ju(e,"zoom-big")]]},sM=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...rd({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...ux(e)}),lM=on("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=yt(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[aM(i),iM(i)]},sM,{resetStyle:!1}),ki=g.forwardRef((e,t)=>{const{menu:n,arrow:r,prefixCls:o,children:i,trigger:a,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:p,open:h,onOpenChange:m,mouseEnterDelay:w=.15,mouseLeaveDelay:y=.1,autoAdjustOverflow:$=!0,placement:x="",transitionName:E,classNames:v,styles:C,destroyPopupOnHide:I,destroyOnHidden:N}=e,{getPrefixCls:A,direction:k,getPopupContainer:R,className:O,style:z,classNames:D,styles:M}=Kn("dropdown"),L={...e,mouseEnterDelay:w,mouseLeaveDelay:y,autoAdjustOverflow:$},_=kt(z),V=kt(p),[X,P]=Pn([D,v],[M,_,C,V],{props:L}),Y={...P.root},K=c||l,T=At("Dropdown");process.env.NODE_ENV!=="production"&&(Object.entries({dropdownRender:"popupRender",destroyPopupOnHide:"destroyOnHidden",overlayClassName:"classNames.root",overlayStyle:"styles.root"}).forEach(([Q,le])=>{T.deprecated(!(Q in e),Q,le)}),x.includes("Center")&&T.deprecated(!x.includes("Center"),`placement: ${x}`,`placement: ${x.slice(0,x.indexOf("Center"))}`));const ne=g.useMemo(()=>{const W=A();return E!==void 0?E:x.startsWith("top")?`${W}-slide-down`:x.startsWith("left")?`${W}-slide-right`:x.startsWith("right")?`${W}-slide-left`:`${W}-slide-up`},[A,x,E]),F=g.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:k==="rtl"?"bottomRight":"bottomLeft",[x,k]),U=A("dropdown",o),re=Po(U),[j,H]=lM(U,re),[,ee]=Cr(),oe=g.Children.only(kI(i)?g.createElement("span",null,i):i),B=Hr(t,cr(oe)),ie=Dn(oe,{className:Z(`${U}-trigger`,{[`${U}-rtl`]:k==="rtl"},oe.props.className),disabled:oe.props.disabled??s,ref:B}),ae=s?[]:a,Se=!!(ae!=null&&ae.includes("contextMenu")),[ye,q]=un(!1,h),me=Ge(W=>{m==null||m(W,{source:"trigger"}),q(W)}),he=Z(d,f,j,H,re,O,X.root,{[`${U}-rtl`]:k==="rtl"}),se=px({arrowPointAtCenter:rn(r)&&r.pointAtCenter,autoAdjustOverflow:$,offset:ee.marginXXS,arrowWidth:r?ee.sizePopupArrow:0,borderRadius:ee.borderRadius}),ue=Ge(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),q(!1))}),pe=()=>{const W=Yt(X,["root"]),Q=Yt(P,["root"]);let le;return n!=null&&n.items&&(le=g.createElement(Ao,{...n,classNames:{...W,subMenu:{...W}},styles:{...Q,subMenu:{...Q}}})),K&&(le=K(le)),br(le)?le=g.createElement("span",null,le):g.isValidElement(le)||(le=g.createElement(g.Fragment,null,le)),g.createElement(YN,{prefixCls:`${U}-menu`,rootClassName:Z(H,re),expandIcon:g.createElement("span",{className:`${U}-menu-submenu-arrow`},k==="rtl"?g.createElement(Aa,{className:`${U}-menu-submenu-arrow-icon`}):g.createElement(Ia,{className:`${U}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ue,validator:({mode:be})=>{process.env.NODE_ENV!=="production"&&T(!be||be==="vertical","usage",`mode="${be}" is not supported for Dropdown's Menu.`)}},le)},[Ne,Ee]=Zu("Dropdown",Y.zIndex);let Ie=g.createElement(bN,{alignPoint:Se,...Yt(e,["rootClassName","onOpenChange"]),mouseEnterDelay:w,mouseLeaveDelay:y,visible:ye,builtinPlacements:se,arrow:!!r,overlayClassName:he,prefixCls:U,getPopupContainer:u||R,transitionName:ne,trigger:ae,overlay:pe,placement:F,onVisibleChange:me,overlayStyle:{...Y,zIndex:Ne},autoDestroy:N??I},ie);return Ne&&(Ie=g.createElement(as.Provider,{value:Ee},Ie)),Ie}),cM=BT(ki,"align",void 0,"dropdown",e=>e),uM=e=>g.createElement(cM,{...e},g.createElement("span",null));ki._InternalPanelDoNotUseOrYouWillBeFired=uM;process.env.NODE_ENV!=="production"&&(ki.displayName="Dropdown");function Ii(e){return yt(e,{inputAffixPadding:e.paddingXXS})}const Ri=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,lineWidthFocus:i,controlHeightSM:a,controlHeightLG:s,fontSizeLG:l,lineHeightLG:c,paddingSM:u,controlPaddingHorizontalSM:d,controlPaddingHorizontal:f,colorFillAlter:p,colorPrimaryHover:h,colorPrimary:m,controlOutlineWidth:w,controlOutline:y,colorErrorOutline:$,colorWarningOutline:x,colorBgContainer:E,inputFontSize:v,inputFontSizeLG:C,inputFontSizeSM:I}=e,N=v||n,A=I||N,k=C||l,R=Math.round((t-N*r)/2*10)/10-o,O=Math.round((a-A*r)/2*10)/10-o,z=Math.ceil((s-k*c)/2*10)/10-o;return{lineWidthFocus:i===0?0:o,paddingBlock:Math.max(R,0),paddingBlockSM:Math.max(O,0),paddingBlockLG:Math.max(z,0),paddingInline:u-o,paddingInlineSM:d-o,paddingInlineLG:f-o,addonBg:p,activeBorderColor:m,hoverBorderColor:h,activeShadow:`0 0 0 ${w}px ${y}`,errorActiveShadow:`0 0 0 ${w}px ${$}`,warningActiveShadow:`0 0 0 ${w}px ${x}`,hoverBg:E,activeBg:E,inputFontSize:N,inputFontSizeLG:k,inputFontSizeSM:A}},dM=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),fd=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorderDisabled,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":{...dM(yt(e,{hoverBorderColor:e.colorBorderDisabled,hoverBg:e.colorBgContainerDisabled}))}}),Ax=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),tm=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Ax(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),fM=(e,t)=>({"&-outlined":{...Ax(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...fd(e)},...tm(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...tm(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),nm=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),pM=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...nm(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...nm(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...fd(e)}}}}),zx="&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)",Ox=(e,t)=>({outline:`${xe(e.lineWidthFocus)} ${e.lineType} ${t}`,outlineOffset:xe(e.calc(e.lineWidth).mul(-1).equal()),transition:["outline-offset","outline"].map(n=>`${n} 0s`).join(", ")}),rm=(e,t)=>({"&, & input, & textarea":{color:t.color},[zx]:Ox(e,t.color),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),mM=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":{background:"transparent",border:"none",paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${n}-sm, &${n}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${n}-lg, &${n}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&:focus, &:focus-within":{outline:"none"},[zx]:Ox(e,e.activeBorderColor),[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:rm(e,{color:e.colorError,affixColor:e.colorErrorAffix}),[`&${n}-status-warning`]:rm(e,{color:e.colorWarning,affixColor:e.colorWarningAffix}),...t}}},Dx=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(t==null?void 0:t.inputColor)??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),om=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Dx(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),gM=(e,t)=>({"&-filled":{...Dx(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...fd(e)},...om(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorErrorAffix}),...om(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarningAffix}),...t}}),im=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),hM=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...im(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...im(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${xe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),Lx=(e,t)=>({background:e.colorBgContainer,borderWidth:`${xe(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),am=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Lx(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),bM=(e,t)=>({"&-underlined":{...Lx(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"},...am(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...am(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),xM=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Fx=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:`${xe(t)} ${xe(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},_x=e=>({padding:`${xe(e.paddingBlockSM)} ${xe(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),jx=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${xe(e.paddingBlock)} ${xe(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...xM(e.colorTextPlaceholder),"&-lg":{...Fx(e),...t.largeStyle},"&-sm":{..._x(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),yM=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:{...Fx(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{..._x(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${xe(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${xe(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${xe(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${xe(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${n}-cascader-picker`]:{margin:`-9px ${xe(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",...rc(),[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
251
251
|
& > ${t}-affix-wrapper,
|
|
252
252
|
& > ${t}-number-affix-wrapper,
|
|
253
253
|
& > ${n}-picker-range
|
|
@@ -260,7 +260,7 @@ html body {
|
|
|
260
260
|
& > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
|
|
261
261
|
& > ${n}-select:last-child,
|
|
262
262
|
& > ${n}-cascader-picker:last-child ${t},
|
|
263
|
-
& > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},yM=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return{[t]:{...Io(e),..._x(e),...dM(e),...mM(e),...pM(e),...hM(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},wM=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...ju(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${xe(e.inputAffixPadding)}`}}}},vM=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a}=e,s=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[s]:{..._x(e),display:"inline-flex","&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n},"&-password-icon":{display:"inline-flex",color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}},...wM(e)},[`${t}-underlined`]:{borderRadius:0},[l]:{[`${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},CM=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...Io(e),...xM(e),"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}},...fM(e),...gM(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},SM=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},jx=on(["Input","Shared"],e=>{const t=yt(e,ki(e));return[yM(t),vM(t)]},Ii,{resetFont:!1}),Bx=on(["Input","Component"],e=>{const t=yt(e,ki(e));return[CM(t),SM(t),Zu(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},Ii,{resetFont:!1}),EM=e=>{const{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:o,paddingXS:i,fontSizeLG:a,fontSizeSM:s,borderRadiusLG:l,borderRadiusSM:c,colorBgContainerDisabled:u,lineWidth:d,lineType:f,antCls:p}=e,[h,m]=ur(p,"space-addon");return{[t]:[{...Io(e),display:"inline-flex",alignItems:"center",gap:0,whiteSpace:"nowrap",paddingInline:r,margin:0,borderWidth:d,borderStyle:f,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:a,borderRadius:l},"&-small":{paddingInline:i,borderRadius:c,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[h("addon-border-color")]:o,[h("addon-background")]:u,[h("addon-border-color-outlined")]:o,[h("addon-background-filled")]:u,borderColor:m("addon-border-color"),background:m("addon-background"),"&-variant-outlined":{[h("addon-border-color")]:m("addon-border-color-outlined")},"&-variant-filled":{[h("addon-border-color")]:"transparent",[h("addon-background")]:m("addon-background-filled"),[`&${t}-disabled`]:{[h("addon-border-color")]:o,[h("addon-background")]:u}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[h("addon-border-color-outlined")]:e.colorError,[h("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[h("addon-border-color-outlined")]:e.colorWarning,[h("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},$M=on("Addon",e=>[EM(e),Zu(e,{focus:!1})]),kM=b.forwardRef((e,t)=>{const{className:n,children:r,style:o,prefixCls:i,variant:a="outlined",disabled:s,status:l,...c}=e,{getPrefixCls:u,direction:d}=b.useContext(dt),f=u("space-addon",i),[p,h]=$M(f),{compactItemClassnames:m,compactSize:w}=To(f,d),y=Na(f,l),$=Z(f,p,m,h,`${f}-variant-${a}`,y,{[`${f}-${w}`]:w,[`${f}-disabled`]:s},n);return b.createElement("div",{ref:t,className:$,style:o,...c},r)});function IM(e){return!!(e.addonBefore||e.addonAfter)}function RM(e){return!!(e.prefix||e.suffix||e.allowClear)}function om(e,t,n){const r=t.cloneNode(!0),o=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...i)=>{t.setSelectionRange(...i)},o}function Fa(e,t,n,r){if(!n)return;let o=t;if(t.type==="click"){o=om(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=om(t,e,r),n(o);return}n(o)}function Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hc.apply(this,arguments)}const Hx=b.forwardRef((e,t)=>{var q,P,Q;const{inputElement:n,children:r,prefixCls:o,prefix:i,suffix:a,addonBefore:s,addonAfter:l,className:c,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:h,allowClear:m,value:w,handleReset:y,hidden:$,classes:x,classNames:E,dataAttrs:v,styles:C,components:I,onClear:N}=e,M=r??n,k=(I==null?void 0:I.affixWrapper)||"span",R=(I==null?void 0:I.groupWrapper)||"span",O=(I==null?void 0:I.wrapper)||"span",A=(I==null?void 0:I.groupAddon)||"span",z=b.useRef(null),D=X=>{var T;(T=z.current)!=null&&T.contains(X.target)&&(h==null||h())},L=RM(e);let j=b.cloneElement(M,{value:w,className:Z((q=M.props)==null?void 0:q.className,!L&&(E==null?void 0:E.variant))||null});const V=b.useRef(null);if(b.useImperativeHandle(t,()=>({nativeElement:V.current||z.current})),L){let X=null;if(m){const G=!d&&!f&&w&&!(typeof m=="object"&&m.disabled),re=`${o}-clear-icon`,_=typeof m=="object"&&(m!=null&&m.clearIcon)?m.clearIcon:"✖";X=b.createElement("button",{type:"button",onClick:H=>{y==null||y(H),N==null||N()},onMouseDown:H=>H.preventDefault(),className:Z(re,{[`${re}-hidden`]:!G,[`${re}-has-suffix`]:!!a},E==null?void 0:E.clear),style:C==null?void 0:C.clear},_)}const T=`${o}-affix-wrapper`,J=Z(T,{[`${o}-disabled`]:d,[`${T}-disabled`]:d,[`${T}-focused`]:p,[`${T}-readonly`]:f,[`${T}-input-with-clear-btn`]:a&&m&&w},x==null?void 0:x.affixWrapper,E==null?void 0:E.affixWrapper,E==null?void 0:E.variant),F=(a||m)&&b.createElement("span",{className:Z(`${o}-suffix`,E==null?void 0:E.suffix),style:C==null?void 0:C.suffix},X,a);j=b.createElement(k,Hc({className:J,style:C==null?void 0:C.affixWrapper,onClick:D},v==null?void 0:v.affixWrapper,{ref:z}),i&&b.createElement("span",{className:Z(`${o}-prefix`,E==null?void 0:E.prefix),style:C==null?void 0:C.prefix},i),j,F)}if(IM(e)){const X=`${o}-group`,T=`${X}-addon`,J=`${X}-wrapper`,F=Z(`${o}-wrapper`,X,x==null?void 0:x.wrapper,E==null?void 0:E.wrapper),G=Z(J,{[`${J}-disabled`]:d},x==null?void 0:x.group,E==null?void 0:E.groupWrapper);j=b.createElement(R,{className:G,ref:V},b.createElement(O,{className:F},s&&b.createElement(A,{className:T},s),j,l&&b.createElement(A,{className:T},l)))}return b.cloneElement(j,{className:Z((P=j.props)==null?void 0:P.className,c)||null,style:{...(Q=j.props)==null?void 0:Q.style,...u},hidden:$})});function Vx(e,t){return g.useMemo(()=>{let n={};t&&(n.show=typeof t=="object"&&t.formatter?t.formatter:!!t),n={...n,...e};const{show:r,...o}=n;return{...o,show:!!r,showFormatter:typeof r=="function"?r:void 0,strategy:o.strategy||(i=>i.length)}},[e,t])}function Wx({countConfig:e,value:t,maxLength:n}){return g.useMemo(()=>{const r=e.max??n,o=e.strategy(t),i=!!r&&o>r,a=Number(r)>0,s=e.show?e.showFormatter?e.showFormatter({value:t,count:o,maxLength:r}):`${o}${a?` / ${r}`:""}`:void 0;return{mergedMax:r,isOutOfRange:i,dataCount:s}},[e,n,t])}function qx({countConfig:e,getTarget:t}){const[n,r]=g.useState(null),o=g.useRef(t);return g.useEffect(()=>{o.current=t},[t]),g.useEffect(()=>{var a;n&&((a=o.current())==null||a.setSelectionRange(...n),r(null))},[n]),g.useCallback((a,s)=>{var c,u;let l=a;return!s&&e.exceedFormatter&&e.max&&e.strategy(a)>e.max&&(l=e.exceedFormatter(a,{max:e.max}),a!==l&&r([((c=o.current())==null?void 0:c.selectionStart)||0,((u=o.current())==null?void 0:u.selectionEnd)||0])),l},[e])}function Xx(e,t){const[n,r]=un(e,t),o=n==null?"":String(n);return{value:n,setValue:r,formatValue:o}}function _a(){return _a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_a.apply(this,arguments)}const PM=b.forwardRef((e,t)=>{const{autoComplete:n,onChange:r,onFocus:o,onBlur:i,onPressEnter:a,onKeyDown:s,onKeyUp:l,prefixCls:c="rc-input",disabled:u,htmlSize:d,className:f,maxLength:p,suffix:h,showCount:m,count:w,type:y="text",classes:$,classNames:x,styles:E,onCompositionStart:v,onCompositionEnd:C,...I}=e,[N,M]=b.useState(!1),k=b.useRef(!1),R=b.useRef(!1),O=b.useRef(null),A=b.useRef(null),z=B=>{O.current&&Zg(O.current,B)},{setValue:D,formatValue:L}=Xx(e.defaultValue,e.value),j=Vx(w,m),{isOutOfRange:V,dataCount:q}=Wx({countConfig:j,value:L,maxLength:p}),P=qx({countConfig:j,getTarget:()=>O.current});b.useImperativeHandle(t,()=>{var B;return{focus:z,blur:()=>{var ie;(ie=O.current)==null||ie.blur()},setSelectionRange:(ie,ae,Se)=>{var ye;(ye=O.current)==null||ye.setSelectionRange(ie,ae,Se)},select:()=>{var ie;(ie=O.current)==null||ie.select()},input:O.current,nativeElement:((B=A.current)==null?void 0:B.nativeElement)||O.current}}),b.useEffect(()=>{R.current&&(R.current=!1),M(B=>B&&u?!1:B)},[u]);const Q=(B,ie,ae)=>{const Se=P(ie,k.current);ae.source==="compositionEnd"&&ie===Se||(D(Se),O.current&&Fa(O.current,B,r,Se))},X=B=>{Q(B,B.target.value,{source:"change"})},T=B=>{k.current=!1,Q(B,B.currentTarget.value,{source:"compositionEnd"}),C==null||C(B)},J=B=>{a&&B.key==="Enter"&&!R.current&&!B.nativeEvent.isComposing&&(R.current=!0,a(B)),s==null||s(B)},F=B=>{B.key==="Enter"&&(R.current=!1),l==null||l(B)},G=B=>{M(!0),o==null||o(B)},re=B=>{R.current&&(R.current=!1),M(!1),i==null||i(B)},_=B=>{D(""),z(),O.current&&Fa(O.current,B,r)},H=V&&`${c}-out-of-range`,te=()=>{const B=Yt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return b.createElement("input",_a({autoComplete:n},B,{onChange:X,onFocus:G,onBlur:re,onKeyDown:J,onKeyUp:F,className:Z(c,{[`${c}-disabled`]:u},x==null?void 0:x.input),style:E==null?void 0:E.input,ref:O,size:d,type:y,onCompositionStart:ie=>{k.current=!0,v==null||v(ie)},onCompositionEnd:T}))},oe=()=>h||j.show?b.createElement(b.Fragment,null,j.show&&b.createElement("span",{className:Z(`${c}-show-count-suffix`,{[`${c}-show-count-has-suffix`]:!!h},x==null?void 0:x.count),style:{...E==null?void 0:E.count}},q),h):null;return b.createElement(Hx,_a({},I,{prefixCls:c,className:Z(f,H),handleReset:_,value:L,focused:N,triggerFocus:z,suffix:oe(),disabled:u,classes:$,classNames:x,styles:E,ref:A}),te())}),TM=`
|
|
263
|
+
& > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{}}}}},wM=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return{[t]:{...Ro(e),...jx(e),...fM(e),...gM(e),...mM(e),...bM(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},vM=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:focus-visible":{color:e.colorIcon,borderRadius:e.borderRadiusSM,...Vu(e)},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${xe(e.inputAffixPadding)}`}}}},CM=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a}=e,s=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[s]:{...jx(e),display:"inline-flex","&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n},"&-password-icon":{display:"inline-flex",color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}},...vM(e)},[`${t}-underlined`]:{borderRadius:0},[l]:{[`${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},SM=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...Ro(e),...yM(e),"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}},...pM(e),...hM(e),[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}}},EM=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Bx=on(["Input","Shared"],e=>{const t=yt(e,Ii(e));return[wM(t),CM(t)]},Ri,{resetFont:!1}),Hx=on(["Input","Component"],e=>{const t=yt(e,Ii(e));return[SM(t),EM(t),td(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},Ri,{resetFont:!1}),$M=e=>{const{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:o,paddingXS:i,fontSizeLG:a,fontSizeSM:s,borderRadiusLG:l,borderRadiusSM:c,colorBgContainerDisabled:u,lineWidth:d,lineType:f,antCls:p}=e,[h,m]=ur(p,"space-addon");return{[t]:[{...Ro(e),display:"inline-flex",alignItems:"center",gap:0,whiteSpace:"nowrap",paddingInline:r,margin:0,borderWidth:d,borderStyle:f,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:a,borderRadius:l},"&-small":{paddingInline:i,borderRadius:c,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[h("addon-border-color")]:o,[h("addon-background")]:u,[h("addon-border-color-outlined")]:o,[h("addon-background-filled")]:u,borderColor:m("addon-border-color"),background:m("addon-background"),"&-variant-outlined":{[h("addon-border-color")]:m("addon-border-color-outlined")},"&-variant-filled":{[h("addon-border-color")]:"transparent",[h("addon-background")]:m("addon-background-filled"),[`&${t}-disabled`]:{[h("addon-border-color")]:o,[h("addon-background")]:u}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[h("addon-border-color-outlined")]:e.colorError,[h("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[h("addon-border-color-outlined")]:e.colorWarning,[h("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},kM=on("Addon",e=>[$M(e),td(e,{focus:!1})]),IM=b.forwardRef((e,t)=>{const{className:n,children:r,style:o,prefixCls:i,variant:a="outlined",disabled:s,status:l,...c}=e,{getPrefixCls:u,direction:d}=b.useContext(dt),f=u("space-addon",i),[p,h]=kM(f),{compactItemClassnames:m,compactSize:w}=No(f,d),y=Ma(f,l),$=Z(f,p,m,h,`${f}-variant-${a}`,y,{[`${f}-${w}`]:w,[`${f}-disabled`]:s},n);return b.createElement("div",{ref:t,className:$,style:o,...c},r)});function RM(e){return!!(e.addonBefore||e.addonAfter)}function PM(e){return!!(e.prefix||e.suffix||e.allowClear)}function sm(e,t,n){const r=t.cloneNode(!0),o=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=(...i)=>{t.setSelectionRange(...i)},o}function _a(e,t,n,r){if(!n)return;let o=t;if(t.type==="click"){o=sm(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=sm(t,e,r),n(o);return}n(o)}function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vc.apply(this,arguments)}const Vx=b.forwardRef((e,t)=>{var X,P,Y;const{inputElement:n,children:r,prefixCls:o,prefix:i,suffix:a,addonBefore:s,addonAfter:l,className:c,style:u,disabled:d,readOnly:f,focused:p,triggerFocus:h,allowClear:m,value:w,handleReset:y,hidden:$,classes:x,classNames:E,dataAttrs:v,styles:C,components:I,onClear:N}=e,A=r??n,k=(I==null?void 0:I.affixWrapper)||"span",R=(I==null?void 0:I.groupWrapper)||"span",O=(I==null?void 0:I.wrapper)||"span",z=(I==null?void 0:I.groupAddon)||"span",D=b.useRef(null),M=K=>{var T;(T=D.current)!=null&&T.contains(K.target)&&(h==null||h())},L=PM(e);let _=b.cloneElement(A,{value:w,className:Z((X=A.props)==null?void 0:X.className,!L&&(E==null?void 0:E.variant))||null});const V=b.useRef(null);if(b.useImperativeHandle(t,()=>({nativeElement:V.current||D.current})),L){let K=null;if(m){const U=!d&&!f&&w&&!(typeof m=="object"&&m.disabled),re=`${o}-clear-icon`,j=typeof m=="object"&&(m!=null&&m.clearIcon)?m.clearIcon:"✖";K=b.createElement("button",{type:"button",onClick:H=>{y==null||y(H),N==null||N()},onMouseDown:H=>H.preventDefault(),className:Z(re,{[`${re}-hidden`]:!U,[`${re}-has-suffix`]:!!a},E==null?void 0:E.clear),style:C==null?void 0:C.clear},j)}const T=`${o}-affix-wrapper`,ne=Z(T,{[`${o}-disabled`]:d,[`${T}-disabled`]:d,[`${T}-focused`]:p,[`${T}-readonly`]:f,[`${T}-input-with-clear-btn`]:a&&m&&w},x==null?void 0:x.affixWrapper,E==null?void 0:E.affixWrapper,E==null?void 0:E.variant),F=(a||m)&&b.createElement("span",{className:Z(`${o}-suffix`,E==null?void 0:E.suffix),style:C==null?void 0:C.suffix},K,a);_=b.createElement(k,Vc({className:ne,style:C==null?void 0:C.affixWrapper,onClick:M},v==null?void 0:v.affixWrapper,{ref:D}),i&&b.createElement("span",{className:Z(`${o}-prefix`,E==null?void 0:E.prefix),style:C==null?void 0:C.prefix},i),_,F)}if(RM(e)){const K=`${o}-group`,T=`${K}-addon`,ne=`${K}-wrapper`,F=Z(`${o}-wrapper`,K,x==null?void 0:x.wrapper,E==null?void 0:E.wrapper),U=Z(ne,{[`${ne}-disabled`]:d},x==null?void 0:x.group,E==null?void 0:E.groupWrapper);_=b.createElement(R,{className:U,ref:V},b.createElement(O,{className:F},s&&b.createElement(z,{className:T},s),_,l&&b.createElement(z,{className:T},l)))}return b.cloneElement(_,{className:Z((P=_.props)==null?void 0:P.className,c)||null,style:{...(Y=_.props)==null?void 0:Y.style,...u},hidden:$})});function Wx(e,t){return g.useMemo(()=>{let n={};t&&(n.show=typeof t=="object"&&t.formatter?t.formatter:!!t),n={...n,...e};const{show:r,...o}=n;return{...o,show:!!r,showFormatter:typeof r=="function"?r:void 0,strategy:o.strategy||(i=>i.length)}},[e,t])}function qx({countConfig:e,value:t,maxLength:n}){return g.useMemo(()=>{const r=e.max??n,o=e.strategy(t),i=!!r&&o>r,a=Number(r)>0,s=e.show?e.showFormatter?e.showFormatter({value:t,count:o,maxLength:r}):`${o}${a?` / ${r}`:""}`:void 0;return{mergedMax:r,isOutOfRange:i,dataCount:s}},[e,n,t])}function Xx({countConfig:e,getTarget:t}){const[n,r]=g.useState(null),o=g.useRef(t);return g.useEffect(()=>{o.current=t},[t]),g.useEffect(()=>{var a;n&&((a=o.current())==null||a.setSelectionRange(...n),r(null))},[n]),g.useCallback((a,s)=>{var c,u;let l=a;return!s&&e.exceedFormatter&&e.max&&e.strategy(a)>e.max&&(l=e.exceedFormatter(a,{max:e.max}),a!==l&&r([((c=o.current())==null?void 0:c.selectionStart)||0,((u=o.current())==null?void 0:u.selectionEnd)||0])),l},[e])}function Ux(e,t){const[n,r]=un(e,t),o=n==null?"":String(n);return{value:n,setValue:r,formatValue:o}}function ja(){return ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ja.apply(this,arguments)}const TM=b.forwardRef((e,t)=>{const{autoComplete:n,onChange:r,onFocus:o,onBlur:i,onPressEnter:a,onKeyDown:s,onKeyUp:l,prefixCls:c="rc-input",disabled:u,htmlSize:d,className:f,maxLength:p,suffix:h,showCount:m,count:w,type:y="text",classes:$,classNames:x,styles:E,onCompositionStart:v,onCompositionEnd:C,...I}=e,[N,A]=b.useState(!1),k=b.useRef(!1),R=b.useRef(!1),O=b.useRef(null),z=b.useRef(null),D=B=>{O.current&&Jg(O.current,B)},{setValue:M,formatValue:L}=Ux(e.defaultValue,e.value),_=Wx(w,m),{isOutOfRange:V,dataCount:X}=qx({countConfig:_,value:L,maxLength:p}),P=Xx({countConfig:_,getTarget:()=>O.current});b.useImperativeHandle(t,()=>{var B;return{focus:D,blur:()=>{var ie;(ie=O.current)==null||ie.blur()},setSelectionRange:(ie,ae,Se)=>{var ye;(ye=O.current)==null||ye.setSelectionRange(ie,ae,Se)},select:()=>{var ie;(ie=O.current)==null||ie.select()},input:O.current,nativeElement:((B=z.current)==null?void 0:B.nativeElement)||O.current}}),b.useEffect(()=>{R.current&&(R.current=!1),A(B=>B&&u?!1:B)},[u]);const Y=(B,ie,ae)=>{const Se=P(ie,k.current);ae.source==="compositionEnd"&&ie===Se||(M(Se),O.current&&_a(O.current,B,r,Se))},K=B=>{Y(B,B.target.value,{source:"change"})},T=B=>{k.current=!1,Y(B,B.currentTarget.value,{source:"compositionEnd"}),C==null||C(B)},ne=B=>{a&&B.key==="Enter"&&!R.current&&!B.nativeEvent.isComposing&&(R.current=!0,a(B)),s==null||s(B)},F=B=>{B.key==="Enter"&&(R.current=!1),l==null||l(B)},U=B=>{A(!0),o==null||o(B)},re=B=>{R.current&&(R.current=!1),A(!1),i==null||i(B)},j=B=>{M(""),D(),O.current&&_a(O.current,B,r)},H=V&&`${c}-out-of-range`,ee=()=>{const B=Yt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return b.createElement("input",ja({autoComplete:n},B,{onChange:K,onFocus:U,onBlur:re,onKeyDown:ne,onKeyUp:F,className:Z(c,{[`${c}-disabled`]:u},x==null?void 0:x.input),style:E==null?void 0:E.input,ref:O,size:d,type:y,onCompositionStart:ie=>{k.current=!0,v==null||v(ie)},onCompositionEnd:T}))},oe=()=>h||_.show?b.createElement(b.Fragment,null,_.show&&b.createElement("span",{className:Z(`${c}-show-count-suffix`,{[`${c}-show-count-has-suffix`]:!!h},x==null?void 0:x.count),style:{...E==null?void 0:E.count}},X),h):null;return b.createElement(Vx,ja({},I,{prefixCls:c,className:Z(f,H),handleReset:j,value:L,focused:N,triggerFocus:D,suffix:oe(),disabled:u,classes:$,classNames:x,styles:E,ref:z}),ee())}),NM=`
|
|
264
264
|
min-height:0 !important;
|
|
265
265
|
max-height:none !important;
|
|
266
266
|
height:0 !important;
|
|
@@ -271,12 +271,12 @@ html body {
|
|
|
271
271
|
top:0 !important;
|
|
272
272
|
right:0 !important;
|
|
273
273
|
pointer-events: none !important;
|
|
274
|
-
`,NM=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],il={};let gn;function MM(e,t=!1){const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&il[n])return il[n];const r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),l={sizingStyle:NM.map(c=>`${c}:${r.getPropertyValue(c)}`).join(";"),paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(il[n]=l),l}function AM(e,t=!1,n=null,r=null){gn||(gn=document.createElement("textarea"),gn.setAttribute("tab-index","-1"),gn.setAttribute("aria-hidden","true"),gn.setAttribute("name","hiddenTextarea"),document.body.appendChild(gn)),e.getAttribute("wrap")?gn.setAttribute("wrap",e.getAttribute("wrap")):gn.removeAttribute("wrap");const{paddingSize:o,borderSize:i,boxSizing:a,sizingStyle:s}=MM(e,t);gn.setAttribute("style",`${s};${TM}`),gn.value=e.value||e.placeholder||"";let l,c,u,d=gn.scrollHeight;if(a==="border-box"?d+=i:a==="content-box"&&(d-=o),n!==null||r!==null){gn.value=" ";const p=gn.scrollHeight-o;n!==null&&(l=p*n,a==="border-box"&&(l=l+o+i),d=Math.max(l,d)),r!==null&&(c=p*r,a==="border-box"&&(c=c+o+i),u=d>c?void 0:"hidden",d=Math.min(c,d))}const f={height:d,overflowY:u,resize:"none"};return l&&(f.minHeight=l),c&&(f.maxHeight=c),f}function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vc.apply(this,arguments)}const al=0,sl=1,ll=2,zM=g.forwardRef((e,t)=>{const{prefixCls:n,defaultValue:r,value:o,autoSize:i,onResize:a,className:s,style:l,disabled:c,onChange:u,onInternalAutoSize:d,...f}=e,[p,h]=un(r,o),m=p??"",w=D=>{h(D.target.value),u==null||u(D)},y=g.useRef(null);g.useImperativeHandle(t,()=>({textArea:y.current}));const[$,x]=g.useMemo(()=>i&&typeof i=="object"?[i.minRows,i.maxRows]:[],[i]),E=!!i,[v,C]=g.useState(ll),[I,N]=g.useState(),M=()=>{C(al),process.env.NODE_ENV==="test"&&(d==null||d())};Bt(()=>{E&&M()},[o,$,x,E]),Bt(()=>{if(v===al)C(sl);else if(v===sl){const D=AM(y.current,!1,$,x);C(ll),N(D)}},[v]);const k=g.useRef(void 0),R=()=>{k.current!==void 0&&xt.cancel(k.current)},O=D=>{v===ll&&(a==null||a(D),i&&(R(),k.current=xt(()=>{M()})))};g.useEffect(()=>R,[]);const z={...l,...E?I:null};return(v===al||v===sl)&&(z.overflowY="hidden",z.overflowX="hidden"),g.createElement(ko,{onResize:O,disabled:!(i||a)},g.createElement("textarea",Vc({},f,{ref:y,style:z,className:Z(n,s,{[`${n}-disabled`]:c}),disabled:c,value:m,onChange:w})))});function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wc.apply(this,arguments)}const OM=b.forwardRef(({defaultValue:e,value:t,onFocus:n,onBlur:r,onChange:o,allowClear:i,maxLength:a,onCompositionStart:s,onCompositionEnd:l,suffix:c,prefixCls:u="rc-textarea",showCount:d,count:f,className:p,style:h,disabled:m,hidden:w,classNames:y,styles:$,onResize:x,onClear:E,onPressEnter:v,readOnly:C,autoSize:I,onKeyDown:N,...M},k)=>{const[R,O]=b.useState(!1),A=b.useRef(!1),[z,D]=b.useState(null),L=b.useRef(null),j=b.useRef(null),V=()=>{var U;return((U=j.current)==null?void 0:U.textArea)||null},{setValue:q,formatValue:P}=Xx(e,t),Q=Vx(f,d),{isOutOfRange:X,dataCount:T}=Wx({countConfig:Q,value:P,maxLength:a}),J=qx({countConfig:Q,getTarget:()=>{var U;return((U=j.current)==null?void 0:U.textArea)||null}}),F=()=>{var U;(U=V())==null||U.focus()};b.useImperativeHandle(k,()=>{var U;return{resizableTextArea:j.current,focus:F,blur:()=>{var me;(me=V())==null||me.blur()},nativeElement:((U=L.current)==null?void 0:U.nativeElement)||V()}}),b.useEffect(()=>{O(U=>!m&&U)},[m]);const G=(U,me)=>{const he=J(me,A.current);q(he),Fa(U.currentTarget,U,o,he)},re=U=>{A.current=!0,s==null||s(U)},_=U=>{A.current=!1,G(U,U.currentTarget.value),l==null||l(U)},H=U=>{G(U,U.target.value)},te=U=>{U.key==="Enter"&&v&&!U.nativeEvent.isComposing&&v(U),N==null||N(U)},oe=U=>{O(!0),n==null||n(U)},B=U=>{O(!1),r==null||r(U)},ie=U=>{q(""),F();const me=V();me&&Fa(me,U,o)};let ae=c;Q.show&&(ae=b.createElement(b.Fragment,null,ae,b.createElement("span",{className:Z(`${u}-data-count`,y==null?void 0:y.count),style:$==null?void 0:$.count},T)));const Se=U=>{var me;x==null||x(U),(me=V())!=null&&me.style.height&&D(!0)},ye=!I&&!d&&!i;return b.createElement(Hx,{ref:L,value:P,allowClear:i,handleReset:ie,suffix:ae,prefixCls:u,classNames:{...y,affixWrapper:Z(y==null?void 0:y.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:i})},disabled:m,focused:R,className:Z(p,X&&`${u}-out-of-range`),style:{...h,...z&&!ye?{height:"auto"}:{}},dataAttrs:typeof T=="string"?{affixWrapper:{"data-count":T}}:void 0,styles:$,hidden:w,readOnly:C,onClear:E},b.createElement(zM,Wc({},M,{autoSize:I,maxLength:a,onKeyDown:te,onChange:H,onFocus:oe,onBlur:B,onCompositionStart:re,onCompositionEnd:_,className:Z(y==null?void 0:y.textarea),style:{resize:h==null?void 0:h.resize,...$==null?void 0:$.textarea},disabled:m,prefixCls:u,onResize:Se,ref:j,readOnly:C})))});function Ux(e,t){const n=b.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var o,i,a,s;(o=e.current)!=null&&o.input&&((i=e.current)==null?void 0:i.input.getAttribute("type"))==="password"&&((a=e.current)!=null&&a.input.hasAttribute("value"))&&((s=e.current)==null||s.input.removeAttribute("value"))}))};return b.useEffect(()=>(t&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[t]),r}function DM(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}const Ri=b.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=!0,status:o,size:i,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:h,styles:m,rootClassName:w,onChange:y,classNames:$,variant:x,...E}=e;if(process.env.NODE_ENV!=="production"){const{deprecated:pe}=At("Input");[["bordered","variant"],["addonAfter","Space.Compact"],["addonBefore","Space.Compact"]].forEach(([Ne,Ee])=>{pe(!(Ne in e),Ne,Ee)})}const{getPrefixCls:v,direction:C,allowClear:I,autoComplete:N,className:M,style:k,classNames:R,styles:O}=Kn("input"),A=v("input",n),z=b.useRef(null),D=Ro(A),[L,j]=jx(A,w);Bx(A,D);const{compactSize:V,compactItemClassnames:q}=To(A,C),P=Po(pe=>i??V??pe),Q=b.useContext(yr),X=a??Q,T={...e,size:P,disabled:X},J=kt(k),F=kt(h),[G,re]=Pn([R,$],[O,J,m,F],{props:T}),{status:_,hasFeedback:H,feedbackIcon:te}=b.useContext(sr),oe=Ju(_,o),B=DM(e)||!!H,ie=b.useRef(B);if(process.env.NODE_ENV!=="production"){const pe=At("Input");b.useEffect(()=>{var Ne;B&&!ie.current&&process.env.NODE_ENV!=="production"&&pe(document.activeElement===((Ne=z.current)==null?void 0:Ne.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),ie.current=B},[B])}const ae=Ux(z,!0),Se=pe=>{ae(),s==null||s(pe)},ye=pe=>{ae(),l==null||l(pe)},U=pe=>{ae(),y==null||y(pe)},me=(H||c)&&b.createElement(b.Fragment,null,c,H&&te),he=Rb({allowClear:u,contextAllowClear:I,componentName:"Input"}),[se,ue]=wo("input",x,r);return b.createElement(PM,{ref:Gn(t,z),prefixCls:A,autoComplete:N,...E,disabled:X,onBlur:Se,onFocus:ye,style:re.root,styles:re,suffix:me,allowClear:he,className:Z(p,w,j,D,q,M,G.root),onChange:U,addonBefore:f&&b.createElement(Pa,{form:!0,space:!0},f),addonAfter:d&&b.createElement(Pa,{form:!0,space:!0},d),classNames:{...G,input:Z({[`${A}-sm`]:P==="small",[`${A}-lg`]:P==="large",[`${A}-rtl`]:C==="rtl"},G.input,L),variant:Z({[`${A}-${se}`]:ue},Na(A,oe)),affixWrapper:Z({[`${A}-affix-wrapper-sm`]:P==="small",[`${A}-affix-wrapper-lg`]:P==="large",[`${A}-affix-wrapper-rtl`]:C==="rtl"},L),wrapper:Z({[`${A}-group-rtl`]:C==="rtl"},L),groupWrapper:Z({[`${A}-group-wrapper-sm`]:P==="small",[`${A}-group-wrapper-lg`]:P==="large",[`${A}-group-wrapper-rtl`]:C==="rtl",[`${A}-group-wrapper-${se}`]:ue},Na(`${A}-group-wrapper`,oe,H),L)}})});process.env.NODE_ENV!=="production"&&(Ri.displayName="Input");function ja(e){return["small","middle","medium","large"].includes(e)}function im(e){return e?rs(e):!1}const Gx=b.createContext({latestIndex:0}),LM=Gx.Provider,FM=e=>{const{className:t,prefix:n,index:r,children:o,separator:i,style:a,classNames:s,styles:l}=e,{latestIndex:c}=g.useContext(Gx);return xi(o)?g.createElement(g.Fragment,null,g.createElement("div",{className:t,style:a},o),r<c&&i&&g.createElement("span",{className:Z(`${n}-item-separator`,s==null?void 0:s.separator),style:l==null?void 0:l.separator},i)):null},_M=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},jM=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},BM=on("Space",e=>{const t=yt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[_M(t),jM(t)]},()=>({}),{resetStyle:!1}),HM=g.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,size:o,className:i,style:a,classNames:s,styles:l}=Kn("space"),{size:c=o??"small",align:u,className:d,rootClassName:f,children:p,direction:h,orientation:m,prefixCls:w,split:y,separator:$,style:x,vertical:E,wrap:v=!1,classNames:C,styles:I,...N}=e,[M,k]=Array.isArray(c)?c:[c,c],R=ja(k),O=ja(M),A=im(k),z=im(M),D=or(p,{keepEmpty:!0}),[L,j]=Gu(m,E,h),V=u===void 0&&!j?"center":u,q=$??y,P=n("space",w),[Q,X]=BM(P),T={...e,size:c,orientation:L,align:V},J=kt(a),F=kt(x),[G,re]=Pn([s,C],[l,J,I,F],{props:T}),_=Z(P,i,Q,`${P}-${L}`,{[`${P}-rtl`]:r==="rtl",[`${P}-align-${V}`]:V,[`${P}-gap-row-${k}`]:R,[`${P}-gap-col-${M}`]:O},d,f,X,G.root),H=Z(`${P}-item`,G.item),te=D.map((ie,ae)=>{const Se=(ie==null?void 0:ie.key)||`${H}-${ae}`;return g.createElement(FM,{prefix:P,classNames:G,styles:re,className:H,key:Se,index:ae,separator:q,style:re.item},ie)});if(process.env.NODE_ENV!=="production"){const ie=At("Space");[["direction","orientation"],["split","separator"]].forEach(([ae,Se])=>{ie.deprecated(!(ae in e),ae,Se)})}const oe=g.useMemo(()=>({latestIndex:D.reduce((ae,Se,ye)=>xi(Se)?ye:ae,0)}),[D]);if(D.length===0)return null;const B={};return v&&(B.flexWrap="wrap"),!O&&z&&(B.columnGap=M),!R&&A&&(B.rowGap=k),g.createElement("div",{ref:t,className:_,style:{...B,...re.root},...N},g.createElement(LM,{value:oe},te))}),Pi=HM;Pi.Compact=Mb;Pi.Addon=kM;process.env.NODE_ENV!=="production"&&(Pi.displayName="Space");const Kx=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=g.useContext(dt),{prefixCls:o,type:i="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:p,arrow:h,autoFocus:m,trigger:w,align:y,open:$,onOpenChange:x,placement:E,getPopupContainer:v,href:C,icon:I=g.createElement(ld,null),title:N,buttonsRender:M=te=>te,mouseEnterDelay:k,mouseLeaveDelay:R,overlayClassName:O,overlayStyle:A,destroyOnHidden:z,destroyPopupOnHide:D,dropdownRender:L,popupRender:j,...V}=e,q=n("dropdown",o),P=`${q}-button`,X={menu:p,arrow:h,autoFocus:m,align:y,disabled:s,trigger:s?[]:w,onOpenChange:x,getPopupContainer:v||t,mouseEnterDelay:k,mouseLeaveDelay:R,classNames:{root:O},styles:{root:A},destroyOnHidden:z,popupRender:j||L},{compactSize:T,compactItemClassnames:J}=To(q,r),F=Z(P,J,f);"destroyPopupOnHide"in e&&(X.destroyPopupOnHide=D),"open"in e&&(X.open=$),"placement"in e?X.placement=E:X.placement=r==="rtl"?"bottomLeft":"bottomRight",process.env.NODE_ENV!=="production"&&At("Dropdown.Button").deprecated(!1,"Dropdown.Button","Space.Compact + Dropdown + Button");const G=g.createElement(ar,{type:i,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:C,title:N},d),re=g.createElement(ar,{type:i,danger:a,icon:I}),[_,H]=M([G,re]);return g.createElement(Pi.Compact,{className:F,size:T,block:!0,...V},_,g.createElement($i,{...X},H))};Kx.__ANT_BUTTON=!0;const Yx=$i;Yx.Button=Kx;const Qx=["wrap","nowrap","wrap-reverse"],Zx=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],Jx=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],VM=(e,t)=>{const n=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${n}`]:n&&Qx.includes(n)}},WM=(e,t)=>{const n={};return Jx.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},qM=(e,t)=>{const n={};return Zx.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n},XM=(e,t)=>Z({...VM(e,t),...WM(e,t),...qM(e,t)}),UM=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},GM=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},KM=e=>{const{componentCls:t}=e,n={};return Qx.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r}}),n},YM=e=>{const{componentCls:t}=e,n={};return Jx.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r}}),n},QM=e=>{const{componentCls:t}=e,n={};return Zx.forEach(r=>{n[`${t}-justify-${r}`]={justifyContent:r}}),n},ZM=()=>({}),JM=on("Flex",e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,o=yt(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return[UM(o),GM(o),KM(o),YM(o),QM(o)]},ZM,{resetStyle:!1}),e0=b.forwardRef((e,t)=>{const{prefixCls:n,rootClassName:r,className:o,style:i,flex:a,gap:s,vertical:l,orientation:c,component:u="div",children:d,...f}=e,{flex:p,direction:h,getPrefixCls:m}=b.useContext(dt),w=m("flex",n),[y,$]=JM(w),[,x]=Gu(c,l??(p==null?void 0:p.vertical)),E=Z(o,r,p==null?void 0:p.className,w,y,$,XM(w,{...e,vertical:x}),{[`${w}-rtl`]:h==="rtl",[`${w}-gap-${s}`]:ja(s),[`${w}-vertical`]:x}),v={...p==null?void 0:p.style,...i};return Pl(a)&&(v.flex=a),Pl(s)&&!ja(s)&&(v.gap=s),b.createElement(u,{ref:t,className:E,style:v,...Yt(f,["justify","wrap","align"])},d)});process.env.NODE_ENV!=="production"&&(e0.displayName="Flex");const eA=e=>{const{getPrefixCls:t,direction:n}=b.useContext(dt),{prefixCls:r,className:o}=e,i=t("input-group",r),a=t("input"),[s,l]=Bx(a),c=Z(i,l,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:n==="rtl"},s,o),u=b.useContext(sr),d=b.useMemo(()=>({...u,isFormItemInput:!1}),[u]);return process.env.NODE_ENV!=="production"&&At("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),g.createElement(sr.Provider,{value:d},g.createElement(Pi.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},tA=e=>{const{componentCls:t,paddingXS:n}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText,"&::selection":{color:"transparent"}},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},nA=on(["Input","OTP"],e=>{const t=yt(e,ki(e));return tA(t)},Ii),rA="•",oA=g.forwardRef((e,t)=>{const{className:n,value:r,onChange:o,onActiveChange:i,index:a,mask:s,onFocus:l,type:c,...u}=e,{getPrefixCls:d}=g.useContext(dt),f=d("otp"),p=typeof s=="string"?s:rA,h=g.useRef(null);g.useImperativeHandle(t,()=>h.current);const m=x=>{o(a,x.target.value)},w=()=>{xt(()=>{var E;const x=(E=h.current)==null?void 0:E.input;document.activeElement===x&&x&&x.select()})},y=x=>{l==null||l(x),w()},$=x=>{const{key:E,ctrlKey:v,metaKey:C}=x;E==="ArrowLeft"?i(a-1):E==="ArrowRight"?i(a+1):E==="z"&&(v||C)?x.preventDefault():E==="Backspace"&&!r&&i(a-1),w()};return g.createElement("span",{className:`${f}-input-wrapper`,role:"presentation"},s&&r!==""&&r!==void 0&&g.createElement("span",{className:`${f}-mask-icon`,"aria-hidden":"true"},p),g.createElement(Ri,{"aria-label":`OTP Input ${a+1}`,...u,type:c??(s?"password":"text"),ref:h,value:r,onInput:m,onFocus:y,onKeyDown:$,onMouseDown:w,onMouseUp:w,className:Z(n,{[`${f}-mask-input`]:s})}))});function Yi(e){return(e||"").split("")}const iA=e=>{const{index:t,prefixCls:n,separator:r,className:o,style:i}=e,a=Qt(r)?r(t):r;return a?g.createElement("span",{className:Z(`${n}-separator`,o),style:i},a):null},aA=g.forwardRef((e,t)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:p,mask:h,type:m,autoComplete:w,onInput:y,onFocus:$,inputMode:x,classNames:E,styles:v,className:C,style:I,...N}=e;if(process.env.NODE_ENV!=="production"){const se=At("Input.OTP");process.env.NODE_ENV!=="production"&&se(!(typeof h=="string"&&h.length>1),"usage","`mask` prop should be a single character.")}const{classNames:M,styles:k,getPrefixCls:R,direction:O,style:A,className:z}=Kn("otp"),D=R("otp",n),[L]=wo("otp",u,void 0,"input"),j={...e,length:r,variant:L},V=kt(A),q=kt(I),[P,Q]=Pn([M,E],[k,V,v,q],{props:j}),X=th(N,{aria:!0,data:!0,attr:!0}),[T,J]=nA(D),F=Po(se=>o??se),G=g.useContext(sr),re=Ju(G.status,f),_=g.useMemo(()=>({...G,status:re,hasFeedback:!1,feedbackIcon:null}),[G,re]),H=g.useRef(null),te=g.useRef({});g.useImperativeHandle(t,()=>({focus:()=>{var se;(se=te.current[0])==null||se.focus()},blur:()=>{var se;for(let ue=0;ue<r;ue+=1)(se=te.current[ue])==null||se.blur()},nativeElement:H.current}));const oe=se=>l?l(se):se,[B,ie]=g.useState(()=>Yi(oe(i||"")));g.useEffect(()=>{a!==void 0&&ie(Yi(a))},[a]);const ae=Ke(se=>{ie(se),y&&y(se),s&&se.length===r&&se.every(ue=>ue)&&se.some((ue,pe)=>B[pe]!==ue)&&s(se.join(""))}),Se=Ke((se,ue)=>{let pe=jr(B);for(let Ee=0;Ee<se;Ee+=1)pe[Ee]||(pe[Ee]="");ue.length<=1?pe[se]=ue:pe=pe.slice(0,se).concat(Yi(ue)),pe=pe.slice(0,r);for(let Ee=pe.length-1;Ee>=0&&!pe[Ee];Ee-=1)pe.pop();const Ne=oe(pe.map(Ee=>Ee||" ").join(""));return pe=Yi(Ne).map((Ee,Ie)=>Ee===" "&&!pe[Ie]?pe[Ie]:Ee),pe}),ye=(se,ue)=>{var Ee;const pe=Se(se,ue),Ne=Math.min(se+ue.length,r-1);Ne!==se&&pe[se]!==void 0&&((Ee=te.current[Ne])==null||Ee.focus()),ae(pe)},U=se=>{var ue;(ue=te.current[se])==null||ue.focus()},me=(se,ue)=>{var pe,Ne,Ee;for(let Ie=0;Ie<ue;Ie+=1)if(!((Ne=(pe=te.current[Ie])==null?void 0:pe.input)!=null&&Ne.value)){(Ee=te.current[Ie])==null||Ee.focus();break}$==null||$(se)},he={variant:L,disabled:d,status:re,mask:h,type:m,inputMode:x,autoComplete:w};return g.createElement("div",{...X,ref:H,className:Z(C,D,{[`${D}-sm`]:F==="small",[`${D}-lg`]:F==="large",[`${D}-rtl`]:O==="rtl"},J,T,z,P.root),style:Q.root,role:"group"},g.createElement(sr.Provider,{value:_},Array.from({length:r}).map((se,ue)=>{const pe=`otp-${ue}`,Ne=B[ue]||"";return g.createElement(g.Fragment,{key:pe},g.createElement(oA,{ref:Ee=>{te.current[ue]=Ee},index:ue,size:F,htmlSize:1,className:Z(P.input,`${D}-input`),style:Q.input,onChange:ye,value:Ne,onActiveChange:U,autoFocus:ue===0&&p,onFocus:Ee=>me(Ee,ue),...he}),ue<r-1&&g.createElement(iA,{separator:c,index:ue,prefixCls:D,className:Z(P.separator),style:Q.separator}))})))});var sA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};function qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qc.apply(this,arguments)}const lA=(e,t)=>g.createElement(Jt,qc({},e,{ref:t,icon:sA})),t0=g.forwardRef(lA);process.env.NODE_ENV!=="production"&&(t0.displayName="EyeInvisibleOutlined");var cA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function Xc(){return Xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xc.apply(this,arguments)}const uA=(e,t)=>g.createElement(Jt,Xc({},e,{ref:t,icon:cA})),n0=g.forwardRef(uA);process.env.NODE_ENV!=="production"&&(n0.displayName="EyeOutlined");const dA=e=>e?g.createElement(n0,null):g.createElement(t0,null),fA={click:"onClick",hover:"onMouseOver"},r0=g.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:o=!0,iconRender:i,prefixCls:a,inputPrefixCls:s,suffix:l,className:c,style:u,classNames:d,styles:f,variant:p,...h}=e,{getPrefixCls:m,className:w,style:y,classNames:$,styles:x,iconRender:E}=Kn("inputPassword"),[v]=wo("inputPassword",p,e.bordered,"input"),[C]=zI("global"),I=g.useContext(yr),N=n??I,M={...e,disabled:N,variant:v},k=kt(y),R=kt(u),[O,A]=Pn([$,d],[x,k,f,R],{props:M}),z=rn(o)&&o.visible!==void 0,[D,L]=b.useState(()=>z?o.visible:!1),j=b.useRef(null);g.useEffect(()=>{z&&L(o.visible)},[z,o]);const V=Ux(j),q=()=>{var re;if(N)return;D&&V();const G=!D;z||L(G),rn(o)&&((re=o.onVisibleChange)==null||re.call(o,G))},P=G=>{const re=fA[r]||"",H=(i||E||dA)(D),te=rn(o)?o.tabIndex:void 0;return g.createElement("span",{key:"passwordIcon",role:"button",tabIndex:N?-1:te??0,className:`${G}-icon`,"aria-disabled":N,"aria-pressed":D,"aria-label":D?C.hide:C.show,onMouseDown:oe=>{oe.preventDefault()},onMouseUp:oe=>{oe.preventDefault()},onKeyDown:oe=>{(oe.key==="Enter"||oe.key===" ")&&(oe.preventDefault(),oe.repeat||q())},[re]:q},H)},Q=m("input",s),X=m("input-password",a),T=o&&P(X),J=Z(X,w,c,{[`${X}-${e.size}`]:!!e.size}),F={...h,type:D?"text":"password",prefixCls:Q,suffix:g.createElement(g.Fragment,null,T,l),disabled:N,className:J,classNames:O,styles:A,variant:v};return g.createElement(Ri,{ref:Gn(t,j),...F})});process.env.NODE_ENV!=="production"&&(r0.displayName="Input.Password");const pA=e=>{const{componentCls:t,antCls:n,calc:r,max:o}=e,i=`${t}-btn`,[a,s]=ur(n,"input-search"),l=e.inputFontSizeSM??e.fontSize,c=o(e.controlHeightSM,r(l).mul(e.lineHeight).add(r(e.paddingBlockSM).mul(2)).add(r(e.lineWidth).mul(2)).equal());return{[t]:{[a("btn-height")]:xe(e.controlHeight),width:"100%",[i]:{height:s("btn-height"),"&:focus-visible":{zIndex:5},[`&${n}-btn-icon-only`]:{width:s("btn-height")},"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}},[`&${t}-large`]:{[a("btn-height")]:xe(e.controlHeightLG)},[`&${t}-small`]:{[a("btn-height")]:xe(e.controlHeightSM)},[`&${t}-small ${i}`]:{minHeight:c,[`&${e.antCls}-btn-icon-only`]:{minWidth:c}}}}},mA=on(["Input","Search"],e=>{const t=yt(e,ki(e));return pA(t)},Ii),o0=g.forwardRef((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,style:a,enterButton:s=!1,searchIcon:l,addonAfter:c,loading:u,disabled:d,onSearch:f,onChange:p,onCompositionStart:h,onCompositionEnd:m,variant:w,onPressEnter:y,classNames:$,styles:x,hidden:E,...v}=e,{direction:C,getPrefixCls:I,className:N,style:M,classNames:k,styles:R,searchIcon:O}=Kn("inputSearch"),A=g.useContext(yr),z=d??A,[D,,L]=wo("inputSearch",w,e.bordered),j=L?D:void 0,[V]=wo("inputSearch",w,e.bordered,"input"),q={...e,enterButton:s,variant:j},P=kt(M),Q=kt(a),[X,T]=Pn([k,$],[R,P,x,Q],{props:q},{button:{_default:"root"}}),J=g.useRef(!1),F=I("input-search",n),G=I("input",r),[re,_]=mA(F),{compactSize:H}=To(F,C),te=Po(Y=>i??H??Y),oe=g.useRef(null),B=Y=>{Y!=null&&Y.target&&Y.type==="click"&&f&&f(Y.target.value,Y,{source:"clear"}),p==null||p(Y)},ie=Y=>{var le;document.activeElement===((le=oe.current)==null?void 0:le.input)&&Y.preventDefault()},ae=Y=>{var le,be;f&&f((be=(le=oe.current)==null?void 0:le.input)==null?void 0:be.value,Y,{source:"input"})},Se=Y=>{J.current||u||(y==null||y(Y),ae(Y))},ye=typeof s=="boolean"?Ib(l,O,g.createElement(sx,null)):null,U=`${F}-btn`,me=Z(U,{[`${U}-${j}`]:j});let he;const se=s||{},ue=se.type&&se.type.__ANT_BUTTON===!0;if(ue||se.type==="button"){const Y=se.props;he=Dn(se,{disabled:z||Y.disabled||!ue&&u,onMouseDown:le=>{var be;(be=Y.onMouseDown)==null||be.call(Y,le),ie(le)},onClick:le=>{var be,$e;($e=(be=se==null?void 0:se.props)==null?void 0:be.onClick)==null||$e.call(be,le),ae(le)},key:"enterButton",...ue?{className:Z(me,Y.className),loading:u||Y.loading,size:te}:{}})}else he=g.createElement(ar,{classNames:X.button,styles:T.button,className:me,color:s?"primary":"default",size:te,disabled:d,key:"enterButton",onMouseDown:ie,onClick:ae,loading:u,icon:ye,variant:j==="borderless"||j==="filled"||j==="underlined"?"text":s?"solid":void 0},s);c&&(he=[he,Dn(c,{key:"addonAfter"})]);const pe=Z(F,_,{[`${F}-rtl`]:C==="rtl",[`${F}-${te}`]:!!te,[`${F}-with-button`]:!!s},o,N,re,X.root),Ne=Y=>{J.current=!0,h==null||h(Y)},Ee=Y=>{J.current=!1,m==null||m(Y)},Ie=th(v,{data:!0}),W=Yt({...v,classNames:Yt(X,["button","root"]),styles:Yt(T,["button","root"]),prefixCls:G,type:"search",size:te,variant:V,onPressEnter:Se,onCompositionStart:Ne,onCompositionEnd:Ee,onChange:B,disabled:d},Object.keys(Ie));return g.createElement(Mb,{className:pe,style:T.root,...Ie,hidden:E},g.createElement(Ri,{ref:Gn(oe,t),...W}),he)});process.env.NODE_ENV!=="production"&&(o0.displayName="Search");const gA=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical","@media (hover: none) and (pointer: coarse)":{resize:"none"},[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
274
|
+
`,MM=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],al={};let gn;function AM(e,t=!1){const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&al[n])return al[n];const r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),l={sizingStyle:MM.map(c=>`${c}:${r.getPropertyValue(c)}`).join(";"),paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(al[n]=l),l}function zM(e,t=!1,n=null,r=null){gn||(gn=document.createElement("textarea"),gn.setAttribute("tab-index","-1"),gn.setAttribute("aria-hidden","true"),gn.setAttribute("name","hiddenTextarea"),document.body.appendChild(gn)),e.getAttribute("wrap")?gn.setAttribute("wrap",e.getAttribute("wrap")):gn.removeAttribute("wrap");const{paddingSize:o,borderSize:i,boxSizing:a,sizingStyle:s}=AM(e,t);gn.setAttribute("style",`${s};${NM}`),gn.value=e.value||e.placeholder||"";let l,c,u,d=gn.scrollHeight;if(a==="border-box"?d+=i:a==="content-box"&&(d-=o),n!==null||r!==null){gn.value=" ";const p=gn.scrollHeight-o;n!==null&&(l=p*n,a==="border-box"&&(l=l+o+i),d=Math.max(l,d)),r!==null&&(c=p*r,a==="border-box"&&(c=c+o+i),u=d>c?void 0:"hidden",d=Math.min(c,d))}const f={height:d,overflowY:u,resize:"none"};return l&&(f.minHeight=l),c&&(f.maxHeight=c),f}function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wc.apply(this,arguments)}const sl=0,ll=1,cl=2,OM=g.forwardRef((e,t)=>{const{prefixCls:n,defaultValue:r,value:o,autoSize:i,onResize:a,className:s,style:l,disabled:c,onChange:u,onInternalAutoSize:d,...f}=e,[p,h]=un(r,o),m=p??"",w=M=>{h(M.target.value),u==null||u(M)},y=g.useRef(null);g.useImperativeHandle(t,()=>({textArea:y.current}));const[$,x]=g.useMemo(()=>i&&typeof i=="object"?[i.minRows,i.maxRows]:[],[i]),E=!!i,[v,C]=g.useState(cl),[I,N]=g.useState(),A=()=>{C(sl),process.env.NODE_ENV==="test"&&(d==null||d())};Bt(()=>{E&&A()},[o,$,x,E]),Bt(()=>{if(v===sl)C(ll);else if(v===ll){const M=zM(y.current,!1,$,x);C(cl),N(M)}},[v]);const k=g.useRef(void 0),R=()=>{k.current!==void 0&&xt.cancel(k.current)},O=M=>{v===cl&&(a==null||a(M),i&&(R(),k.current=xt(()=>{A()})))};g.useEffect(()=>R,[]);const D={...l,...E?I:null};return(v===sl||v===ll)&&(D.overflowY="hidden",D.overflowX="hidden"),g.createElement(Io,{onResize:O,disabled:!(i||a)},g.createElement("textarea",Wc({},f,{ref:y,style:D,className:Z(n,s,{[`${n}-disabled`]:c}),disabled:c,value:m,onChange:w})))});function qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qc.apply(this,arguments)}const DM=b.forwardRef(({defaultValue:e,value:t,onFocus:n,onBlur:r,onChange:o,allowClear:i,maxLength:a,onCompositionStart:s,onCompositionEnd:l,suffix:c,prefixCls:u="rc-textarea",showCount:d,count:f,className:p,style:h,disabled:m,hidden:w,classNames:y,styles:$,onResize:x,onClear:E,onPressEnter:v,readOnly:C,autoSize:I,onKeyDown:N,...A},k)=>{const[R,O]=b.useState(!1),z=b.useRef(!1),[D,M]=b.useState(null),L=b.useRef(null),_=b.useRef(null),V=()=>{var q;return((q=_.current)==null?void 0:q.textArea)||null},{setValue:X,formatValue:P}=Ux(e,t),Y=Wx(f,d),{isOutOfRange:K,dataCount:T}=qx({countConfig:Y,value:P,maxLength:a}),ne=Xx({countConfig:Y,getTarget:()=>{var q;return((q=_.current)==null?void 0:q.textArea)||null}}),F=()=>{var q;(q=V())==null||q.focus()};b.useImperativeHandle(k,()=>{var q;return{resizableTextArea:_.current,focus:F,blur:()=>{var me;(me=V())==null||me.blur()},nativeElement:((q=L.current)==null?void 0:q.nativeElement)||V()}}),b.useEffect(()=>{O(q=>!m&&q)},[m]);const U=(q,me)=>{const he=ne(me,z.current);X(he),_a(q.currentTarget,q,o,he)},re=q=>{z.current=!0,s==null||s(q)},j=q=>{z.current=!1,U(q,q.currentTarget.value),l==null||l(q)},H=q=>{U(q,q.target.value)},ee=q=>{q.key==="Enter"&&v&&!q.nativeEvent.isComposing&&v(q),N==null||N(q)},oe=q=>{O(!0),n==null||n(q)},B=q=>{O(!1),r==null||r(q)},ie=q=>{X(""),F();const me=V();me&&_a(me,q,o)};let ae=c;Y.show&&(ae=b.createElement(b.Fragment,null,ae,b.createElement("span",{className:Z(`${u}-data-count`,y==null?void 0:y.count),style:$==null?void 0:$.count},T)));const Se=q=>{var me;x==null||x(q),(me=V())!=null&&me.style.height&&M(!0)},ye=!I&&!d&&!i;return b.createElement(Vx,{ref:L,value:P,allowClear:i,handleReset:ie,suffix:ae,prefixCls:u,classNames:{...y,affixWrapper:Z(y==null?void 0:y.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:i})},disabled:m,focused:R,className:Z(p,K&&`${u}-out-of-range`),style:{...h,...D&&!ye?{height:"auto"}:{}},dataAttrs:typeof T=="string"?{affixWrapper:{"data-count":T}}:void 0,styles:$,hidden:w,readOnly:C,onClear:E},b.createElement(OM,qc({},A,{autoSize:I,maxLength:a,onKeyDown:ee,onChange:H,onFocus:oe,onBlur:B,onCompositionStart:re,onCompositionEnd:j,className:Z(y==null?void 0:y.textarea),style:{resize:h==null?void 0:h.resize,...$==null?void 0:$.textarea},disabled:m,prefixCls:u,onResize:Se,ref:_,readOnly:C})))});function Gx(e,t){const n=b.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var o,i,a,s;(o=e.current)!=null&&o.input&&((i=e.current)==null?void 0:i.input.getAttribute("type"))==="password"&&((a=e.current)!=null&&a.input.hasAttribute("value"))&&((s=e.current)==null||s.input.removeAttribute("value"))}))};return b.useEffect(()=>(t&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[t]),r}function LM(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}const Pi=b.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=!0,status:o,size:i,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:p,style:h,styles:m,rootClassName:w,onChange:y,classNames:$,variant:x,...E}=e;if(process.env.NODE_ENV!=="production"){const{deprecated:pe}=At("Input");[["bordered","variant"],["addonAfter","Space.Compact"],["addonBefore","Space.Compact"]].forEach(([Ne,Ee])=>{pe(!(Ne in e),Ne,Ee)})}const{getPrefixCls:v,direction:C,allowClear:I,autoComplete:N,className:A,style:k,classNames:R,styles:O}=Kn("input"),z=v("input",n),D=b.useRef(null),M=Po(z),[L,_]=Bx(z,w);Hx(z,M);const{compactSize:V,compactItemClassnames:X}=No(z,C),P=To(pe=>i??V??pe),Y=b.useContext(yr),K=a??Y,T={...e,size:P,disabled:K},ne=kt(k),F=kt(h),[U,re]=Pn([R,$],[O,ne,m,F],{props:T}),{status:j,hasFeedback:H,feedbackIcon:ee}=b.useContext(sr),oe=nd(j,o),B=LM(e)||!!H,ie=b.useRef(B);if(process.env.NODE_ENV!=="production"){const pe=At("Input");b.useEffect(()=>{var Ne;B&&!ie.current&&process.env.NODE_ENV!=="production"&&pe(document.activeElement===((Ne=D.current)==null?void 0:Ne.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),ie.current=B},[B])}const ae=Gx(D,!0),Se=pe=>{ae(),s==null||s(pe)},ye=pe=>{ae(),l==null||l(pe)},q=pe=>{ae(),y==null||y(pe)},me=(H||c)&&b.createElement(b.Fragment,null,c,H&&ee),he=Pb({allowClear:u,contextAllowClear:I,componentName:"Input"}),[se,ue]=wo("input",x,r);return b.createElement(TM,{ref:Gn(t,D),prefixCls:z,autoComplete:N,...E,disabled:K,onBlur:Se,onFocus:ye,style:re.root,styles:re,suffix:me,allowClear:he,className:Z(p,w,_,M,X,A,U.root),onChange:q,addonBefore:f&&b.createElement(Ta,{form:!0,space:!0},f),addonAfter:d&&b.createElement(Ta,{form:!0,space:!0},d),classNames:{...U,input:Z({[`${z}-sm`]:P==="small",[`${z}-lg`]:P==="large",[`${z}-rtl`]:C==="rtl"},U.input,L),variant:Z({[`${z}-${se}`]:ue},Ma(z,oe)),affixWrapper:Z({[`${z}-affix-wrapper-sm`]:P==="small",[`${z}-affix-wrapper-lg`]:P==="large",[`${z}-affix-wrapper-rtl`]:C==="rtl"},L),wrapper:Z({[`${z}-group-rtl`]:C==="rtl"},L),groupWrapper:Z({[`${z}-group-wrapper-sm`]:P==="small",[`${z}-group-wrapper-lg`]:P==="large",[`${z}-group-wrapper-rtl`]:C==="rtl",[`${z}-group-wrapper-${se}`]:ue},Ma(`${z}-group-wrapper`,oe,H),L)}})});process.env.NODE_ENV!=="production"&&(Pi.displayName="Input");function Ba(e){return["small","middle","medium","large"].includes(e)}function lm(e){return e?os(e):!1}const Kx=b.createContext({latestIndex:0}),FM=Kx.Provider,_M=e=>{const{className:t,prefix:n,index:r,children:o,separator:i,style:a,classNames:s,styles:l}=e,{latestIndex:c}=g.useContext(Kx);return yi(o)?g.createElement(g.Fragment,null,g.createElement("div",{className:t,style:a},o),r<c&&i&&g.createElement("span",{className:Z(`${n}-item-separator`,s==null?void 0:s.separator),style:l==null?void 0:l.separator},i)):null},jM=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},BM=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},HM=on("Space",e=>{const t=yt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[jM(t),BM(t)]},()=>({}),{resetStyle:!1}),VM=g.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,size:o,className:i,style:a,classNames:s,styles:l}=Kn("space"),{size:c=o??"small",align:u,className:d,rootClassName:f,children:p,direction:h,orientation:m,prefixCls:w,split:y,separator:$,style:x,vertical:E,wrap:v=!1,classNames:C,styles:I,...N}=e,[A,k]=Array.isArray(c)?c:[c,c],R=Ba(k),O=Ba(A),z=lm(k),D=lm(A),M=or(p,{keepEmpty:!0}),[L,_]=Qu(m,E,h),V=u===void 0&&!_?"center":u,X=$??y,P=n("space",w),[Y,K]=HM(P),T={...e,size:c,orientation:L,align:V},ne=kt(a),F=kt(x),[U,re]=Pn([s,C],[l,ne,I,F],{props:T}),j=Z(P,i,Y,`${P}-${L}`,{[`${P}-rtl`]:r==="rtl",[`${P}-align-${V}`]:V,[`${P}-gap-row-${k}`]:R,[`${P}-gap-col-${A}`]:O},d,f,K,U.root),H=Z(`${P}-item`,U.item),ee=M.map((ie,ae)=>{const Se=(ie==null?void 0:ie.key)||`${H}-${ae}`;return g.createElement(_M,{prefix:P,classNames:U,styles:re,className:H,key:Se,index:ae,separator:X,style:re.item},ie)});if(process.env.NODE_ENV!=="production"){const ie=At("Space");[["direction","orientation"],["split","separator"]].forEach(([ae,Se])=>{ie.deprecated(!(ae in e),ae,Se)})}const oe=g.useMemo(()=>({latestIndex:M.reduce((ae,Se,ye)=>yi(Se)?ye:ae,0)}),[M]);if(M.length===0)return null;const B={};return v&&(B.flexWrap="wrap"),!O&&D&&(B.columnGap=A),!R&&z&&(B.rowGap=k),g.createElement("div",{ref:t,className:j,style:{...B,...re.root},...N},g.createElement(FM,{value:oe},ee))}),Ti=VM;Ti.Compact=Ab;Ti.Addon=IM;process.env.NODE_ENV!=="production"&&(Ti.displayName="Space");const Yx=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=g.useContext(dt),{prefixCls:o,type:i="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:p,arrow:h,autoFocus:m,trigger:w,align:y,open:$,onOpenChange:x,placement:E,getPopupContainer:v,href:C,icon:I=g.createElement(dd,null),title:N,buttonsRender:A=ee=>ee,mouseEnterDelay:k,mouseLeaveDelay:R,overlayClassName:O,overlayStyle:z,destroyOnHidden:D,destroyPopupOnHide:M,dropdownRender:L,popupRender:_,...V}=e,X=n("dropdown",o),P=`${X}-button`,K={menu:p,arrow:h,autoFocus:m,align:y,disabled:s,trigger:s?[]:w,onOpenChange:x,getPopupContainer:v||t,mouseEnterDelay:k,mouseLeaveDelay:R,classNames:{root:O},styles:{root:z},destroyOnHidden:D,popupRender:_||L},{compactSize:T,compactItemClassnames:ne}=No(X,r),F=Z(P,ne,f);"destroyPopupOnHide"in e&&(K.destroyPopupOnHide=M),"open"in e&&(K.open=$),"placement"in e?K.placement=E:K.placement=r==="rtl"?"bottomLeft":"bottomRight",process.env.NODE_ENV!=="production"&&At("Dropdown.Button").deprecated(!1,"Dropdown.Button","Space.Compact + Dropdown + Button");const U=g.createElement(ar,{type:i,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:C,title:N},d),re=g.createElement(ar,{type:i,danger:a,icon:I}),[j,H]=A([U,re]);return g.createElement(Ti.Compact,{className:F,size:T,block:!0,...V},j,g.createElement(ki,{...K},H))};Yx.__ANT_BUTTON=!0;const Qx=ki;Qx.Button=Yx;const Zx=["wrap","nowrap","wrap-reverse"],Jx=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],e0=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],WM=(e,t)=>{const n=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${n}`]:n&&Zx.includes(n)}},qM=(e,t)=>{const n={};return e0.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},XM=(e,t)=>{const n={};return Jx.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n},UM=(e,t)=>Z({...WM(e,t),...qM(e,t),...XM(e,t)}),GM=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},KM=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},YM=e=>{const{componentCls:t}=e,n={};return Zx.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r}}),n},QM=e=>{const{componentCls:t}=e,n={};return e0.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r}}),n},ZM=e=>{const{componentCls:t}=e,n={};return Jx.forEach(r=>{n[`${t}-justify-${r}`]={justifyContent:r}}),n},JM=()=>({}),eA=on("Flex",e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,o=yt(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return[GM(o),KM(o),YM(o),QM(o),ZM(o)]},JM,{resetStyle:!1}),t0=b.forwardRef((e,t)=>{const{prefixCls:n,rootClassName:r,className:o,style:i,flex:a,gap:s,vertical:l,orientation:c,component:u="div",children:d,...f}=e,{flex:p,direction:h,getPrefixCls:m}=b.useContext(dt),w=m("flex",n),[y,$]=eA(w),[,x]=Qu(c,l??(p==null?void 0:p.vertical)),E=Z(o,r,p==null?void 0:p.className,w,y,$,UM(w,{...e,vertical:x}),{[`${w}-rtl`]:h==="rtl",[`${w}-gap-${s}`]:Ba(s),[`${w}-vertical`]:x}),v={...p==null?void 0:p.style,...i};return Tl(a)&&(v.flex=a),Tl(s)&&!Ba(s)&&(v.gap=s),b.createElement(u,{ref:t,className:E,style:v,...Yt(f,["justify","wrap","align"])},d)});process.env.NODE_ENV!=="production"&&(t0.displayName="Flex");const tA=e=>{const{getPrefixCls:t,direction:n}=b.useContext(dt),{prefixCls:r,className:o}=e,i=t("input-group",r),a=t("input"),[s,l]=Hx(a),c=Z(i,l,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:n==="rtl"},s,o),u=b.useContext(sr),d=b.useMemo(()=>({...u,isFormItemInput:!1}),[u]);return process.env.NODE_ENV!=="production"&&At("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),g.createElement(sr.Provider,{value:d},g.createElement(Ti.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},nA=e=>{const{componentCls:t,paddingXS:n}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText,"&::selection":{color:"transparent"}},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},rA=on(["Input","OTP"],e=>{const t=yt(e,Ii(e));return nA(t)},Ri),oA="•",iA=g.forwardRef((e,t)=>{const{className:n,value:r,onChange:o,onActiveChange:i,index:a,mask:s,onFocus:l,type:c,...u}=e,{getPrefixCls:d}=g.useContext(dt),f=d("otp"),p=typeof s=="string"?s:oA,h=g.useRef(null);g.useImperativeHandle(t,()=>h.current);const m=x=>{o(a,x.target.value)},w=()=>{xt(()=>{var E;const x=(E=h.current)==null?void 0:E.input;document.activeElement===x&&x&&x.select()})},y=x=>{l==null||l(x),w()},$=x=>{const{key:E,ctrlKey:v,metaKey:C}=x;E==="ArrowLeft"?i(a-1):E==="ArrowRight"?i(a+1):E==="z"&&(v||C)?x.preventDefault():E==="Backspace"&&!r&&i(a-1),w()};return g.createElement("span",{className:`${f}-input-wrapper`,role:"presentation"},s&&r!==""&&r!==void 0&&g.createElement("span",{className:`${f}-mask-icon`,"aria-hidden":"true"},p),g.createElement(Pi,{"aria-label":`OTP Input ${a+1}`,...u,type:c??(s?"password":"text"),ref:h,value:r,onInput:m,onFocus:y,onKeyDown:$,onMouseDown:w,onMouseUp:w,className:Z(n,{[`${f}-mask-input`]:s})}))});function Qi(e){return(e||"").split("")}const aA=e=>{const{index:t,prefixCls:n,separator:r,className:o,style:i}=e,a=Qt(r)?r(t):r;return a?g.createElement("span",{className:Z(`${n}-separator`,o),style:i},a):null},sA=g.forwardRef((e,t)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:p,mask:h,type:m,autoComplete:w,onInput:y,onFocus:$,inputMode:x,classNames:E,styles:v,className:C,style:I,...N}=e;if(process.env.NODE_ENV!=="production"){const se=At("Input.OTP");process.env.NODE_ENV!=="production"&&se(!(typeof h=="string"&&h.length>1),"usage","`mask` prop should be a single character.")}const{classNames:A,styles:k,getPrefixCls:R,direction:O,style:z,className:D}=Kn("otp"),M=R("otp",n),[L]=wo("otp",u,void 0,"input"),_={...e,length:r,variant:L},V=kt(z),X=kt(I),[P,Y]=Pn([A,E],[k,V,v,X],{props:_}),K=nh(N,{aria:!0,data:!0,attr:!0}),[T,ne]=rA(M),F=To(se=>o??se),U=g.useContext(sr),re=nd(U.status,f),j=g.useMemo(()=>({...U,status:re,hasFeedback:!1,feedbackIcon:null}),[U,re]),H=g.useRef(null),ee=g.useRef({});g.useImperativeHandle(t,()=>({focus:()=>{var se;(se=ee.current[0])==null||se.focus()},blur:()=>{var se;for(let ue=0;ue<r;ue+=1)(se=ee.current[ue])==null||se.blur()},nativeElement:H.current}));const oe=se=>l?l(se):se,[B,ie]=g.useState(()=>Qi(oe(i||"")));g.useEffect(()=>{a!==void 0&&ie(Qi(a))},[a]);const ae=Ge(se=>{ie(se),y&&y(se),s&&se.length===r&&se.every(ue=>ue)&&se.some((ue,pe)=>B[pe]!==ue)&&s(se.join(""))}),Se=Ge((se,ue)=>{let pe=jr(B);for(let Ee=0;Ee<se;Ee+=1)pe[Ee]||(pe[Ee]="");ue.length<=1?pe[se]=ue:pe=pe.slice(0,se).concat(Qi(ue)),pe=pe.slice(0,r);for(let Ee=pe.length-1;Ee>=0&&!pe[Ee];Ee-=1)pe.pop();const Ne=oe(pe.map(Ee=>Ee||" ").join(""));return pe=Qi(Ne).map((Ee,Ie)=>Ee===" "&&!pe[Ie]?pe[Ie]:Ee),pe}),ye=(se,ue)=>{var Ee;const pe=Se(se,ue),Ne=Math.min(se+ue.length,r-1);Ne!==se&&pe[se]!==void 0&&((Ee=ee.current[Ne])==null||Ee.focus()),ae(pe)},q=se=>{var ue;(ue=ee.current[se])==null||ue.focus()},me=(se,ue)=>{var pe,Ne,Ee;for(let Ie=0;Ie<ue;Ie+=1)if(!((Ne=(pe=ee.current[Ie])==null?void 0:pe.input)!=null&&Ne.value)){(Ee=ee.current[Ie])==null||Ee.focus();break}$==null||$(se)},he={variant:L,disabled:d,status:re,mask:h,type:m,inputMode:x,autoComplete:w};return g.createElement("div",{...K,ref:H,className:Z(C,M,{[`${M}-sm`]:F==="small",[`${M}-lg`]:F==="large",[`${M}-rtl`]:O==="rtl"},ne,T,D,P.root),style:Y.root,role:"group"},g.createElement(sr.Provider,{value:j},Array.from({length:r}).map((se,ue)=>{const pe=`otp-${ue}`,Ne=B[ue]||"";return g.createElement(g.Fragment,{key:pe},g.createElement(iA,{ref:Ee=>{ee.current[ue]=Ee},index:ue,size:F,htmlSize:1,className:Z(P.input,`${M}-input`),style:Y.input,onChange:ye,value:Ne,onActiveChange:q,autoFocus:ue===0&&p,onFocus:Ee=>me(Ee,ue),...he}),ue<r-1&&g.createElement(aA,{separator:c,index:ue,prefixCls:M,className:Z(P.separator),style:Y.separator}))})))});var lA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};function Xc(){return Xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xc.apply(this,arguments)}const cA=(e,t)=>g.createElement(Jt,Xc({},e,{ref:t,icon:lA})),n0=g.forwardRef(cA);process.env.NODE_ENV!=="production"&&(n0.displayName="EyeInvisibleOutlined");var uA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uc.apply(this,arguments)}const dA=(e,t)=>g.createElement(Jt,Uc({},e,{ref:t,icon:uA})),r0=g.forwardRef(dA);process.env.NODE_ENV!=="production"&&(r0.displayName="EyeOutlined");const fA=e=>e?g.createElement(r0,null):g.createElement(n0,null),pA={click:"onClick",hover:"onMouseOver"},o0=g.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:o=!0,iconRender:i,prefixCls:a,inputPrefixCls:s,suffix:l,className:c,style:u,classNames:d,styles:f,variant:p,...h}=e,{getPrefixCls:m,className:w,style:y,classNames:$,styles:x,iconRender:E}=Kn("inputPassword"),[v]=wo("inputPassword",p,e.bordered,"input"),[C]=OI("global"),I=g.useContext(yr),N=n??I,A={...e,disabled:N,variant:v},k=kt(y),R=kt(u),[O,z]=Pn([$,d],[x,k,f,R],{props:A}),D=rn(o)&&o.visible!==void 0,[M,L]=b.useState(()=>D?o.visible:!1),_=b.useRef(null);g.useEffect(()=>{D&&L(o.visible)},[D,o]);const V=Gx(_),X=()=>{var re;if(N)return;M&&V();const U=!M;D||L(U),rn(o)&&((re=o.onVisibleChange)==null||re.call(o,U))},P=U=>{const re=pA[r]||"",H=(i||E||fA)(M),ee=rn(o)?o.tabIndex:void 0;return g.createElement("span",{key:"passwordIcon",role:"button",tabIndex:N?-1:ee??0,className:`${U}-icon`,"aria-disabled":N,"aria-pressed":M,"aria-label":M?C.hide:C.show,onMouseDown:oe=>{oe.preventDefault()},onMouseUp:oe=>{oe.preventDefault()},onKeyDown:oe=>{(oe.key==="Enter"||oe.key===" ")&&(oe.preventDefault(),oe.repeat||X())},[re]:X},H)},Y=m("input",s),K=m("input-password",a),T=o&&P(K),ne=Z(K,w,c,{[`${K}-${e.size}`]:!!e.size}),F={...h,type:M?"text":"password",prefixCls:Y,suffix:g.createElement(g.Fragment,null,T,l),disabled:N,className:ne,classNames:O,styles:z,variant:v};return g.createElement(Pi,{ref:Gn(t,_),...F})});process.env.NODE_ENV!=="production"&&(o0.displayName="Input.Password");const mA=e=>{const{componentCls:t,antCls:n,calc:r,max:o}=e,i=`${t}-btn`,[a,s]=ur(n,"input-search"),l=e.inputFontSizeSM??e.fontSize,c=o(e.controlHeightSM,r(l).mul(e.lineHeight).add(r(e.paddingBlockSM).mul(2)).add(r(e.lineWidth).mul(2)).equal());return{[t]:{[a("btn-height")]:xe(e.controlHeight),width:"100%",[i]:{height:s("btn-height"),"&:focus-visible":{zIndex:5},[`&${n}-btn-icon-only`]:{width:s("btn-height")},"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}},[`&${t}-large`]:{[a("btn-height")]:xe(e.controlHeightLG)},[`&${t}-small`]:{[a("btn-height")]:xe(e.controlHeightSM)},[`&${t}-small ${i}`]:{minHeight:c,[`&${e.antCls}-btn-icon-only`]:{minWidth:c}}}}},gA=on(["Input","Search"],e=>{const t=yt(e,Ii(e));return mA(t)},Ri),i0=g.forwardRef((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,style:a,enterButton:s=!1,searchIcon:l,addonAfter:c,loading:u,disabled:d,onSearch:f,onChange:p,onCompositionStart:h,onCompositionEnd:m,variant:w,onPressEnter:y,classNames:$,styles:x,hidden:E,...v}=e,{direction:C,getPrefixCls:I,className:N,style:A,classNames:k,styles:R,searchIcon:O}=Kn("inputSearch"),z=g.useContext(yr),D=d??z,[M,,L]=wo("inputSearch",w,e.bordered),_=L?M:void 0,[V]=wo("inputSearch",w,e.bordered,"input"),X={...e,enterButton:s,variant:_},P=kt(A),Y=kt(a),[K,T]=Pn([k,$],[R,P,x,Y],{props:X},{button:{_default:"root"}}),ne=g.useRef(!1),F=I("input-search",n),U=I("input",r),[re,j]=gA(F),{compactSize:H}=No(F,C),ee=To(Q=>i??H??Q),oe=g.useRef(null),B=Q=>{Q!=null&&Q.target&&Q.type==="click"&&f&&f(Q.target.value,Q,{source:"clear"}),p==null||p(Q)},ie=Q=>{var le;document.activeElement===((le=oe.current)==null?void 0:le.input)&&Q.preventDefault()},ae=Q=>{var le,be;f&&f((be=(le=oe.current)==null?void 0:le.input)==null?void 0:be.value,Q,{source:"input"})},Se=Q=>{ne.current||u||(y==null||y(Q),ae(Q))},ye=typeof s=="boolean"?Rb(l,O,g.createElement(lx,null)):null,q=`${F}-btn`,me=Z(q,{[`${q}-${_}`]:_});let he;const se=s||{},ue=se.type&&se.type.__ANT_BUTTON===!0;if(ue||se.type==="button"){const Q=se.props;he=Dn(se,{disabled:D||Q.disabled||!ue&&u,onMouseDown:le=>{var be;(be=Q.onMouseDown)==null||be.call(Q,le),ie(le)},onClick:le=>{var be,$e;($e=(be=se==null?void 0:se.props)==null?void 0:be.onClick)==null||$e.call(be,le),ae(le)},key:"enterButton",...ue?{className:Z(me,Q.className),loading:u||Q.loading,size:ee}:{}})}else he=g.createElement(ar,{classNames:K.button,styles:T.button,className:me,color:s?"primary":"default",size:ee,disabled:d,key:"enterButton",onMouseDown:ie,onClick:ae,loading:u,icon:ye,variant:_==="borderless"||_==="filled"||_==="underlined"?"text":s?"solid":void 0},s);c&&(he=[he,Dn(c,{key:"addonAfter"})]);const pe=Z(F,j,{[`${F}-rtl`]:C==="rtl",[`${F}-${ee}`]:!!ee,[`${F}-with-button`]:!!s},o,N,re,K.root),Ne=Q=>{ne.current=!0,h==null||h(Q)},Ee=Q=>{ne.current=!1,m==null||m(Q)},Ie=nh(v,{data:!0}),W=Yt({...v,classNames:Yt(K,["button","root"]),styles:Yt(T,["button","root"]),prefixCls:U,type:"search",size:ee,variant:V,onPressEnter:Se,onCompositionStart:Ne,onCompositionEnd:Ee,onChange:B,disabled:d},Object.keys(Ie));return g.createElement(Ab,{className:pe,style:T.root,...Ie,hidden:E},g.createElement(Pi,{ref:Gn(oe,t),...W}),he)});process.env.NODE_ENV!=="production"&&(i0.displayName="Search");const hA=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical","@media (hover: none) and (pointer: coarse)":{resize:"none"},[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
275
275
|
&-allow-clear > ${t},
|
|
276
276
|
&-affix-wrapper${r}-has-feedback ${t}
|
|
277
|
-
`]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},hA=on(["Input","TextArea"],e=>{const t=yt(e,ki(e));return gA(t)},Ii,{resetFont:!1}),bA=b.forwardRef((e,t)=>{var U;const{prefixCls:n,bordered:r=!0,size:o,disabled:i,status:a,allowClear:s,classNames:l,rootClassName:c,className:u,style:d,styles:f,variant:p,showCount:h,onMouseDown:m,onResize:w,...y}=e;if(process.env.NODE_ENV!=="production"){const{deprecated:me}=At("TextArea");me(!("bordered"in e),"bordered","variant")}const{getPrefixCls:$,direction:x,allowClear:E,autoComplete:v,className:C,style:I,classNames:N,styles:M}=Kn("textArea"),k=g.useContext(yr),R=i??k,{status:O,hasFeedback:A,feedbackIcon:z}=g.useContext(sr),D=Ju(O,a),L=kt(I),j=kt(d),[V,q]=Pn([N,l],[M,L,f,j],{props:e}),P=g.useRef(null);g.useImperativeHandle(t,()=>{var me,he;return{resizableTextArea:(me=P.current)==null?void 0:me.resizableTextArea,focus:se=>{var ue,pe;Zg((pe=(ue=P.current)==null?void 0:ue.resizableTextArea)==null?void 0:pe.textArea,se)},blur:()=>{var se;return(se=P.current)==null?void 0:se.blur()},nativeElement:((he=P.current)==null?void 0:he.nativeElement)||null}});const Q=$("input",n),X=Ro(Q),[T,J]=jx(Q,c);hA(Q,X);const{compactSize:F,compactItemClassnames:G}=To(Q,x),re=Po(me=>o??F??me),[_,H]=wo("textArea",p,r),te=Rb({allowClear:s,contextAllowClear:E,componentName:"TextArea"}),[oe,B]=g.useState(!1),[ie,ae]=g.useState(!1),Se=me=>{B(!0),m==null||m(me);const he=()=>{B(!1),document.removeEventListener("mouseup",he)};document.addEventListener("mouseup",he)},ye=me=>{var he,se;if(w==null||w(me),oe&&Qt(getComputedStyle)){const ue=(se=(he=P.current)==null?void 0:he.nativeElement)==null?void 0:se.querySelector("textarea");ue&&getComputedStyle(ue).resize==="both"&&ae(!0)}};return g.createElement(OM,{autoComplete:v,...y,style:q.root,styles:q,disabled:R,allowClear:te,className:Z(J,X,u,c,G,C,V.root,{[`${Q}-textarea-affix-wrapper-resize-dirty`]:ie}),classNames:{...V,textarea:Z({[`${Q}-sm`]:re==="small",[`${Q}-lg`]:re==="large"},T,V.textarea,oe&&`${Q}-mouse-active`),variant:Z({[`${Q}-${_}`]:H},Na(Q,D)),affixWrapper:Z(`${Q}-textarea-affix-wrapper`,{[`${Q}-affix-wrapper-rtl`]:x==="rtl",[`${Q}-affix-wrapper-sm`]:re==="small",[`${Q}-affix-wrapper-lg`]:re==="large",[`${Q}-textarea-show-count`]:h||((U=e.count)==null?void 0:U.show)},T)},prefixCls:Q,suffix:A&&g.createElement("span",{className:`${Q}-textarea-suffix`},z),showCount:h,ref:P,onResize:ye,onMouseDown:Se})}),Vr=Ri;Vr.Group=eA;Vr.Search=o0;Vr.TextArea=bA;Vr.Password=r0;Vr.OTP=aA;var xA={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};function Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uc.apply(this,arguments)}const yA=(e,t)=>g.createElement(Jt,Uc({},e,{ref:t,icon:xA})),i0=g.forwardRef(yA);process.env.NODE_ENV!=="production"&&(i0.displayName="CaretDownFilled");const Gc={defaultSeed:Ca.token,defaultAlgorithm:Kh,_internalContext:Fu};var _n={};Object.defineProperty(_n,"__esModule",{value:!0});_n.call=dd;var a0=_n.default=void 0;_n.note=c0;_n.noteOnce=d0;_n.preMessage=void 0;var wA=_n.resetWarned=u0;_n.warning=l0;_n.warningOnce=Ti;let Kc={};const ud=[],s0=e=>{ud.push(e)};_n.preMessage=s0;function l0(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=ud.reduce((r,o)=>o(r??"","warning"),t);n&&console.error(`Warning: ${n}`)}}function c0(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=ud.reduce((r,o)=>o(r??"","note"),t);n&&console.warn(`Note: ${n}`)}}function u0(){Kc={}}function dd(e,t,n){!t&&!Kc[n]&&(e(!1,n),Kc[n]=!0)}function Ti(e,t){dd(l0,e,t)}function d0(e,t){dd(c0,e,t)}Ti.preMessage=s0;Ti.resetWarned=u0;Ti.noteOnce=d0;a0=_n.default=Ti;function f0(){}let Qn=null;function vA(){Qn=null,wA()}let tn=f0;process.env.NODE_ENV!=="production"&&(tn=(e,t,n)=>{a0(e,`[antdx: ${t}] ${n}`),process.env.NODE_ENV==="test"&&vA()});const CA=g.createContext({});process.env.NODE_ENV;const SA=b.createContext(void 0);var ds={},p0={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(p0);var fd=p0.exports;const EA=zn.getAugmentedNamespace(TI);var fs={},Ni={};const $A=zn.getAugmentedNamespace(MI);var Mi={};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.default=void 0;const kA={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};Mi.default=kA;var m0=fd.default;Object.defineProperty(Ni,"__esModule",{value:!0});Ni.default=void 0;var IA=m0($A),RA=m0(Mi);const PA={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...IA.default},timePickerLocale:{...RA.default}};Ni.default=PA;var TA=fd.default;Object.defineProperty(fs,"__esModule",{value:!0});fs.default=void 0;var NA=TA(Ni);fs.default=NA.default;var ps=fd.default;Object.defineProperty(ds,"__esModule",{value:!0});ds.default=void 0;var MA=ps(EA),AA=ps(fs),zA=ps(Ni),OA=ps(Mi);const hn="${label} is not a valid ${type}",DA={locale:"en",Pagination:MA.default,DatePicker:zA.default,TimePicker:OA.default,Calendar:AA.default,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:hn,method:hn,array:hn,object:hn,number:hn,date:hn,boolean:hn,integer:hn,float:hn,regexp:hn,email:hn,url:hn,hex:hn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};ds.default=DA;var LA=ds;const cl=zn.getDefaultExportFromCjs(LA),lo={locale:"en",Conversations:{create:"New chat"},Sender:{stopLoading:"Stop loading",speechRecording:"Speech recording"},Actions:{feedbackLike:"Like",feedbackDislike:"Dislike",audio:"Play audio",audioRunning:"Audio playing",audioError:"Playback error",audioLoading:"Loading audio"},Bubble:{editableOk:"OK",editableCancel:"Cancel"},Mermaid:{zoomIn:"Zoom in",zoomOut:"Zoom out",zoomReset:"Reset",download:"Download",code:"Code",image:"Image"},Folder:{selectFile:"Please select a file",loadError:"Failed to load file",noService:"File content service not configured",loadFailed:"Failed to load file"}},g0=(e,t)=>{const n=g.useContext(SA),r=g.useMemo(()=>{const i=t||(lo==null?void 0:lo[e])||(cl==null?void 0:cl[e]),a=(n==null?void 0:n[e])??{};return{...typeof i=="function"?i():i,...a||{}}},[e,t,n]),o=g.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?lo.locale:i},[n]);return[r,o]};function vo(){const{getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r,theme:o}=b.useContext(Sr.ConfigContext);return{theme:o,getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r}}process.env.NODE_ENV;var FA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};function Yc(){return Yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yc.apply(this,arguments)}const _A=(e,t)=>g.createElement(Jt,Yc({},e,{ref:t,icon:FA})),h0=g.forwardRef(_A);process.env.NODE_ENV!=="production"&&(h0.displayName="ArrowUpOutlined");var jA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M682 455V311l-76 76v68c-.1 50.7-42 92.1-94 92a95.8 95.8 0 01-52-15l-54 55c29.1 22.4 65.9 36 106 36 93.8 0 170-75.1 170-168z"}},{tag:"path",attrs:{d:"M833 446h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254-63 0-120.7-23-165-61l-54 54a334.01 334.01 0 00179 81v102H326c-13.9 0-24.9 14.3-25 32v36c.1 4.4 2.9 8 6 8h408c3.2 0 6-3.6 6-8v-36c0-17.7-11-32-25-32H547V782c165.3-17.9 294-157.9 294-328 0-4.4-3.6-8-8-8zm13.1-377.7l-43.5-41.9a8 8 0 00-11.2.1l-129 129C634.3 101.2 577 64 511 64c-93.9 0-170 75.3-170 168v224c0 6.7.4 13.3 1.2 19.8l-68 68A252.33 252.33 0 01258 454c-.2-4.4-3.8-8-8-8h-60c-4.4 0-8 3.6-8 8 0 53 12.5 103 34.6 147.4l-137 137a8.03 8.03 0 000 11.3l42.7 42.7c3.1 3.1 8.2 3.1 11.3 0L846.2 79.8l.1-.1c3.1-3.2 3-8.3-.2-11.4zM417 401V232c0-50.6 41.9-92 94-92 46 0 84.1 32.3 92.3 74.7L417 401z"}}]},name:"audio-muted",theme:"outlined"};function Qc(){return Qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qc.apply(this,arguments)}const BA=(e,t)=>g.createElement(Jt,Qc({},e,{ref:t,icon:jA})),b0=g.forwardRef(BA);process.env.NODE_ENV!=="production"&&(b0.displayName="AudioMutedOutlined");var HA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};function Zc(){return Zc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zc.apply(this,arguments)}const VA=(e,t)=>g.createElement(Jt,Zc({},e,{ref:t,icon:HA})),x0=g.forwardRef(VA);process.env.NODE_ENV!=="production"&&(x0.displayName="AudioOutlined");var WA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"};function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jc.apply(this,arguments)}const qA=(e,t)=>g.createElement(Jt,Jc({},e,{ref:t,icon:WA})),y0=g.forwardRef(qA);process.env.NODE_ENV!=="production"&&(y0.displayName="ClearOutlined");const Vo=1e3,Wo=4,da=140,am=da/2,Qi=250,sm=500,Zi=.8;function XA({className:e}){const[t]=g0("Sender",lo.Sender);return b.createElement("svg",{color:"currentColor",viewBox:`0 0 ${Vo} ${Vo}`,xmlns:"http://www.w3.org/2000/svg",className:e},b.createElement("title",null,t.speechRecording),Array.from({length:Wo}).map((n,r)=>{const o=(Vo-da*Wo)/(Wo-1),i=r*(o+da),a=Vo/2-Qi/2,s=Vo/2-sm/2;return b.createElement("rect",{fill:"currentColor",rx:am,ry:am,height:Qi,width:da,x:i,y:a,key:r},b.createElement("animate",{attributeName:"height",values:`${Qi}; ${sm}; ${Qi}`,keyTimes:"0; 0.5; 1",dur:`${Zi}s`,begin:`${Zi/Wo*r}s`,repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"y",values:`${a}; ${s}; ${a}`,keyTimes:"0; 0.5; 1",dur:`${Zi}s`,begin:`${Zi/Wo*r}s`,repeatCount:"indefinite"}))}))}const UA="2.9.0",GA={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},KA={...GA,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
277
|
+
`]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},bA=on(["Input","TextArea"],e=>{const t=yt(e,Ii(e));return hA(t)},Ri,{resetFont:!1}),xA=b.forwardRef((e,t)=>{var q;const{prefixCls:n,bordered:r=!0,size:o,disabled:i,status:a,allowClear:s,classNames:l,rootClassName:c,className:u,style:d,styles:f,variant:p,showCount:h,onMouseDown:m,onResize:w,...y}=e;if(process.env.NODE_ENV!=="production"){const{deprecated:me}=At("TextArea");me(!("bordered"in e),"bordered","variant")}const{getPrefixCls:$,direction:x,allowClear:E,autoComplete:v,className:C,style:I,classNames:N,styles:A}=Kn("textArea"),k=g.useContext(yr),R=i??k,{status:O,hasFeedback:z,feedbackIcon:D}=g.useContext(sr),M=nd(O,a),L=kt(I),_=kt(d),[V,X]=Pn([N,l],[A,L,f,_],{props:e}),P=g.useRef(null);g.useImperativeHandle(t,()=>{var me,he;return{resizableTextArea:(me=P.current)==null?void 0:me.resizableTextArea,focus:se=>{var ue,pe;Jg((pe=(ue=P.current)==null?void 0:ue.resizableTextArea)==null?void 0:pe.textArea,se)},blur:()=>{var se;return(se=P.current)==null?void 0:se.blur()},nativeElement:((he=P.current)==null?void 0:he.nativeElement)||null}});const Y=$("input",n),K=Po(Y),[T,ne]=Bx(Y,c);bA(Y,K);const{compactSize:F,compactItemClassnames:U}=No(Y,x),re=To(me=>o??F??me),[j,H]=wo("textArea",p,r),ee=Pb({allowClear:s,contextAllowClear:E,componentName:"TextArea"}),[oe,B]=g.useState(!1),[ie,ae]=g.useState(!1),Se=me=>{B(!0),m==null||m(me);const he=()=>{B(!1),document.removeEventListener("mouseup",he)};document.addEventListener("mouseup",he)},ye=me=>{var he,se;if(w==null||w(me),oe&&Qt(getComputedStyle)){const ue=(se=(he=P.current)==null?void 0:he.nativeElement)==null?void 0:se.querySelector("textarea");ue&&getComputedStyle(ue).resize==="both"&&ae(!0)}};return g.createElement(DM,{autoComplete:v,...y,style:X.root,styles:X,disabled:R,allowClear:ee,className:Z(ne,K,u,c,U,C,V.root,{[`${Y}-textarea-affix-wrapper-resize-dirty`]:ie}),classNames:{...V,textarea:Z({[`${Y}-sm`]:re==="small",[`${Y}-lg`]:re==="large"},T,V.textarea,oe&&`${Y}-mouse-active`),variant:Z({[`${Y}-${j}`]:H},Ma(Y,M)),affixWrapper:Z(`${Y}-textarea-affix-wrapper`,{[`${Y}-affix-wrapper-rtl`]:x==="rtl",[`${Y}-affix-wrapper-sm`]:re==="small",[`${Y}-affix-wrapper-lg`]:re==="large",[`${Y}-textarea-show-count`]:h||((q=e.count)==null?void 0:q.show)},T)},prefixCls:Y,suffix:z&&g.createElement("span",{className:`${Y}-textarea-suffix`},D),showCount:h,ref:P,onResize:ye,onMouseDown:Se})}),Vr=Pi;Vr.Group=tA;Vr.Search=i0;Vr.TextArea=xA;Vr.Password=o0;Vr.OTP=sA;var yA={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};function Gc(){return Gc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gc.apply(this,arguments)}const wA=(e,t)=>g.createElement(Jt,Gc({},e,{ref:t,icon:yA})),a0=g.forwardRef(wA);process.env.NODE_ENV!=="production"&&(a0.displayName="CaretDownFilled");const Kc={defaultSeed:Sa.token,defaultAlgorithm:Yh,_internalContext:Bu};var _n={};Object.defineProperty(_n,"__esModule",{value:!0});_n.call=md;var s0=_n.default=void 0;_n.note=u0;_n.noteOnce=f0;_n.preMessage=void 0;var vA=_n.resetWarned=d0;_n.warning=c0;_n.warningOnce=Ni;let Yc={};const pd=[],l0=e=>{pd.push(e)};_n.preMessage=l0;function c0(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=pd.reduce((r,o)=>o(r??"","warning"),t);n&&console.error(`Warning: ${n}`)}}function u0(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=pd.reduce((r,o)=>o(r??"","note"),t);n&&console.warn(`Note: ${n}`)}}function d0(){Yc={}}function md(e,t,n){!t&&!Yc[n]&&(e(!1,n),Yc[n]=!0)}function Ni(e,t){md(c0,e,t)}function f0(e,t){md(u0,e,t)}Ni.preMessage=l0;Ni.resetWarned=d0;Ni.noteOnce=f0;s0=_n.default=Ni;function p0(){}let Qn=null;function CA(){Qn=null,vA()}let tn=p0;process.env.NODE_ENV!=="production"&&(tn=(e,t,n)=>{s0(e,`[antdx: ${t}] ${n}`),process.env.NODE_ENV==="test"&&CA()});const SA=g.createContext({});process.env.NODE_ENV;const EA=b.createContext(void 0);var fs={},m0={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(m0);var gd=m0.exports;const $A=zn.getAugmentedNamespace(NI);var ps={},Mi={};const kA=zn.getAugmentedNamespace(AI);var Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.default=void 0;const IA={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};Ai.default=IA;var g0=gd.default;Object.defineProperty(Mi,"__esModule",{value:!0});Mi.default=void 0;var RA=g0(kA),PA=g0(Ai);const TA={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...RA.default},timePickerLocale:{...PA.default}};Mi.default=TA;var NA=gd.default;Object.defineProperty(ps,"__esModule",{value:!0});ps.default=void 0;var MA=NA(Mi);ps.default=MA.default;var ms=gd.default;Object.defineProperty(fs,"__esModule",{value:!0});fs.default=void 0;var AA=ms($A),zA=ms(ps),OA=ms(Mi),DA=ms(Ai);const hn="${label} is not a valid ${type}",LA={locale:"en",Pagination:AA.default,DatePicker:OA.default,TimePicker:DA.default,Calendar:zA.default,global:{placeholder:"Please select",close:"Close",sortable:"sortable",show:"Show",hide:"Hide"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Carousel:{prevSlide:"Previous slide",nextSlide:"Next slide"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:hn,method:hn,array:hn,object:hn,number:hn,date:hn,boolean:hn,integer:hn,float:hn,regexp:hn,email:hn,url:hn,hex:hn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};fs.default=LA;var FA=fs;const ul=zn.getDefaultExportFromCjs(FA),lo={locale:"en",Conversations:{create:"New chat"},Sender:{stopLoading:"Stop loading",speechRecording:"Speech recording"},Actions:{feedbackLike:"Like",feedbackDislike:"Dislike",audio:"Play audio",audioRunning:"Audio playing",audioError:"Playback error",audioLoading:"Loading audio"},Bubble:{editableOk:"OK",editableCancel:"Cancel"},Mermaid:{zoomIn:"Zoom in",zoomOut:"Zoom out",zoomReset:"Reset",download:"Download",code:"Code",image:"Image"},Folder:{selectFile:"Please select a file",loadError:"Failed to load file",noService:"File content service not configured",loadFailed:"Failed to load file"}},h0=(e,t)=>{const n=g.useContext(EA),r=g.useMemo(()=>{const i=t||(lo==null?void 0:lo[e])||(ul==null?void 0:ul[e]),a=(n==null?void 0:n[e])??{};return{...typeof i=="function"?i():i,...a||{}}},[e,t,n]),o=g.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?lo.locale:i},[n]);return[r,o]};function vo(){const{getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r,theme:o}=b.useContext(Sr.ConfigContext);return{theme:o,getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r}}process.env.NODE_ENV;var _A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};function Qc(){return Qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qc.apply(this,arguments)}const jA=(e,t)=>g.createElement(Jt,Qc({},e,{ref:t,icon:_A})),b0=g.forwardRef(jA);process.env.NODE_ENV!=="production"&&(b0.displayName="ArrowUpOutlined");var BA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M682 455V311l-76 76v68c-.1 50.7-42 92.1-94 92a95.8 95.8 0 01-52-15l-54 55c29.1 22.4 65.9 36 106 36 93.8 0 170-75.1 170-168z"}},{tag:"path",attrs:{d:"M833 446h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254-63 0-120.7-23-165-61l-54 54a334.01 334.01 0 00179 81v102H326c-13.9 0-24.9 14.3-25 32v36c.1 4.4 2.9 8 6 8h408c3.2 0 6-3.6 6-8v-36c0-17.7-11-32-25-32H547V782c165.3-17.9 294-157.9 294-328 0-4.4-3.6-8-8-8zm13.1-377.7l-43.5-41.9a8 8 0 00-11.2.1l-129 129C634.3 101.2 577 64 511 64c-93.9 0-170 75.3-170 168v224c0 6.7.4 13.3 1.2 19.8l-68 68A252.33 252.33 0 01258 454c-.2-4.4-3.8-8-8-8h-60c-4.4 0-8 3.6-8 8 0 53 12.5 103 34.6 147.4l-137 137a8.03 8.03 0 000 11.3l42.7 42.7c3.1 3.1 8.2 3.1 11.3 0L846.2 79.8l.1-.1c3.1-3.2 3-8.3-.2-11.4zM417 401V232c0-50.6 41.9-92 94-92 46 0 84.1 32.3 92.3 74.7L417 401z"}}]},name:"audio-muted",theme:"outlined"};function Zc(){return Zc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zc.apply(this,arguments)}const HA=(e,t)=>g.createElement(Jt,Zc({},e,{ref:t,icon:BA})),x0=g.forwardRef(HA);process.env.NODE_ENV!=="production"&&(x0.displayName="AudioMutedOutlined");var VA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jc.apply(this,arguments)}const WA=(e,t)=>g.createElement(Jt,Jc({},e,{ref:t,icon:VA})),y0=g.forwardRef(WA);process.env.NODE_ENV!=="production"&&(y0.displayName="AudioOutlined");var qA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"};function eu(){return eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eu.apply(this,arguments)}const XA=(e,t)=>g.createElement(Jt,eu({},e,{ref:t,icon:qA})),w0=g.forwardRef(XA);process.env.NODE_ENV!=="production"&&(w0.displayName="ClearOutlined");const Wo=1e3,qo=4,fa=140,cm=fa/2,Zi=250,um=500,Ji=.8;function UA({className:e}){const[t]=h0("Sender",lo.Sender);return b.createElement("svg",{color:"currentColor",viewBox:`0 0 ${Wo} ${Wo}`,xmlns:"http://www.w3.org/2000/svg",className:e},b.createElement("title",null,t.speechRecording),Array.from({length:qo}).map((n,r)=>{const o=(Wo-fa*qo)/(qo-1),i=r*(o+fa),a=Wo/2-Zi/2,s=Wo/2-um/2;return b.createElement("rect",{fill:"currentColor",rx:cm,ry:cm,height:Zi,width:fa,x:i,y:a,key:r},b.createElement("animate",{attributeName:"height",values:`${Zi}; ${um}; ${Zi}`,keyTimes:"0; 0.5; 1",dur:`${Ji}s`,begin:`${Ji/qo*r}s`,repeatCount:"indefinite"}),b.createElement("animate",{attributeName:"y",values:`${a}; ${s}; ${a}`,keyTimes:"0; 0.5; 1",dur:`${Ji}s`,begin:`${Ji/qo*r}s`,repeatCount:"indefinite"}))}))}const GA="2.9.0",KA={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},YA={...KA,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
278
278
|
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
279
|
-
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0};function
|
|
279
|
+
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0};function dl(e){return e>=0&&e<=255}function ea(e,t){const{r:n,g:r,b:o,a:i}=new Ve(e).toRgb();if(i<1)return e;const{r:a,g:s,b:l}=new Ve(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(dl(u)&&dl(d)&&dl(f))return new Ve({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Ve({r:n,g:r,b:o,a:1}).toRgbString()}function QA(e){const{override:t,...n}=e,r={...t};Object.keys(YA).forEach(f=>{delete r[f]});const o={...n,...r},i=480,a=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){const f="0s";o.motionDurationFast=f,o.motionDurationMid=f,o.motionDurationSlow=f}return{...o,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:ea(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:ea(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:ea(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:ea(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
|
|
280
280
|
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
281
281
|
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
282
282
|
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
@@ -308,8 +308,8 @@ html body {
|
|
|
308
308
|
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
309
309
|
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
310
310
|
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
311
|
-
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)",...r}}const
|
|
312
|
-
`?x.childNodes.length-1:x.childNodes.length;return u(x,x,v).range||document.createRange()},[u]),w=b.useCallback(x=>{var C;const E=(C=e==null?void 0:e.getEditorValue)!=null&&C.call(e).skill?1:0;return u(x,x,E).range||document.createRange()},[u,e]),y=b.useCallback(x=>x.replace(/\u200B/g,"").replace(/\n/g,"").replace(/^\n+|\n+$/g,""),[]),$=b.useCallback(async()=>{try{const x=t();if(!x)return!1;const E=x.toString();if(!E)return!1;const v=y(E);return await navigator.clipboard.writeText(v),!0}catch(x){return tn(!1,"Sender",`Failed to copy selection: ${x}`),!1}},[t,y]);return{setEndCursor:s,setStartCursor:l,setAllSelectCursor:c,setCursorPosition:u,setAfterNodeFocus:f,setSlotFocus:d,getTextBeforeCursor:p,getSelection:t,removeAllRanges:i,getRange:r,getInsertPosition:h,getEndRange:m,getStartRange:w,copySelectionString:$,getCleanedText:y}},lm=4.35,l5=(e,t,n)=>{const{token:r}=t5(),o=n.current?window.getComputedStyle(n.current):{},i=parseFloat(`${e.lineHeight||r.lineHeight}`),a=parseFloat(`${(o==null?void 0:o.fontSize)||e.fontSize||r.fontSize}`),s=o!=null&&o.lineHeight?parseFloat(`${o==null?void 0:o.lineHeight}`):i*a;return t===!1||!t?{}:t===!0?{height:"auto"}:{minHeight:t.minRows?(s+lm)*t.minRows:"auto",maxHeight:t.maxRows?(s+lm)*t.maxRows:"auto",overflowY:"auto"}},c5=e=>{const{prefixCls:t,placeholder:n,slotDomMap:r,slotConfigMap:o}=e,i=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","false"),p.dataset.skillKey=f,p.dataset.placeholder=n||"",p.className=`${t}-skill`,p},[t,n]),a=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","true"),p.dataset.slotKey=f.key,p.className=Z(`${t}-slot`,`${t}-slot-content`),p},[t]),s=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","false"),p.dataset.slotKey=f,p.className=`${t}-slot`,p},[t]),l=b.useCallback((f,p)=>{const h=document.createElement("span");return h.setAttribute("contenteditable","false"),h.dataset.slotKey=f,h.dataset.nodeType="nbsp",h.className=Z(`${t}-slot-${p}`,`${t}-slot-no-width`),h.textContent=" ",h},[t]),c=(f,p)=>{r.current.set(f,p)},u=f=>r.current.get(f);return{buildSkillSpan:i,buildEditSlotSpan:a,buildSlotSpan:s,buildSpaceSpan:l,saveSlotDom:c,getSlotDom:u,getSlotLastDom:(f,p)=>{var m;return(p??((m=o.get(f))==null?void 0:m.type))==="content"?u(`${f}_after`):u(f)}}},u5=new Set(["input","select","custom","content"]),cm=e=>(e==null?void 0:e.reduce((t,n)=>{const{key:r,type:o}=n;if(!r)return t;const i=n.props||{},a=u5.has(o)?i.defaultValue:i.value??i.label;return t[r]=a??"",t},{}))??{},d5=(e,t)=>{e==null||e.forEach(n=>{n.key&&t.set(n.key,n)})},f5=(e,t)=>{if(!(e!=null&&e.dataset))return null;const{dataset:n}=e;return{slotKey:n.slotKey,placeholder:n.placeholder,nodeType:n.nodeType,skillKey:n.skillKey,slotConfig:n.slotKey?t.get(n.slotKey):void 0,targetNode:e}},p5=e=>{const[t,n]=b.useState({}),r=b.useRef(t),o=b.useRef(new Map),i=b.useRef(new Set);b.useEffect(()=>{if(!e)return;o.current.forEach((f,p)=>{i.current.has(p)||o.current.delete(p)}),d5(e,o.current);const d=cm(e);i.current.forEach(f=>{f in r.current&&(d[f]=r.current[f])}),n(d),r.current=d},[e]);const a=b.useCallback(d=>{const f=typeof d=="function"?d(r.current):d;n(f),r.current=f},[]),s=b.useCallback(d=>{const f=cm(d);d.forEach(p=>{p.key&&(o.current.set(p.key,p),i.current.add(p.key))}),n(p=>({...p,...f})),r.current={...r.current,...f}},[]),l=b.useCallback(()=>{o.current.clear(),i.current.clear(),n({}),r.current={}},[]),c=b.useCallback(d=>f5(d,o.current),[]),u=d=>{var E;const f=d.nodeType;if(f===Node.TEXT_NODE)return d.textContent||"";if(f!==Node.ELEMENT_NODE)return"";const p=d,h=c(p);if(!h)return p.innerText||"";const{slotKey:m,skillKey:w,nodeType:y,slotConfig:$}=h;if(w)return"";const x=p.innerText||"";if(m){if(y==="nbsp")return" ";if(!$)return x;const v=$.type==="content"?x:r.current[m]??"";return((E=$.formatResult)==null?void 0:E.call($,v))??v}return x};return[o.current,{getSlotValues:()=>r.current,setSlotValues:a,mergeSlotConfig:s,getNodeInfo:c,getNodeTextValue:u,clear:l}]},E0=({removeSkill:e,prefixCls:t,toolTip:n,closable:r,title:o,value:i})=>{const a=`${t}-skill`,s=b.useMemo(()=>{if(!r)return[null];const u=typeof r=="boolean"?{}:r,d=h=>{var m;u.disabled||(h.stopPropagation(),e(),(m=u.onClose)==null||m.call(u,h))},f=u.closeIcon||b.createElement(Vu,{className:`${a}-close-icon`});return b.createElement("div",{className:Z(`${a}-close`,{[`${a}-close-disabled`]:u.disabled}),onClick:d,role:"button","aria-label":"Close skill",tabIndex:0},f)},[r,e]),l=o||i,c=n?b.createElement(Ci,n,l):l;return b.createElement("div",{className:`${a}-wrapper`,contentEditable:!1},b.createElement("div",{className:`${a}-tag`,contentEditable:!1,role:"button",tabIndex:0},b.createElement("span",{className:`${a}-tag-text`},c),s),b.createElement("div",{className:`${a}-holder`}))};E0.displayName="Skill";const $0=b.forwardRef((e,t)=>{var Be;const{onChange:n,onKeyUp:r,onKeyDown:o,onPaste:i,onPasteFile:a,disabled:s,readOnly:l,submitType:c="enter",prefixCls:u,styles:d={},classNames:f={},autoSize:p,triggerSend:h,placeholder:m,onFocus:w,onBlur:y,slotConfig:$,skill:x,...E}=b.useContext(hs),{direction:v,getPrefixCls:C}=vo(),I=`${C("sender",u)}`,N=Pu("sender"),M=`${I}-input`,k=b.useRef(null),R=b.useRef(new Map),O=b.useRef(!1),A=b.useRef(!1),z=b.useRef(null),D=b.useRef(null),L=b.useRef(null),j={...(Be=N.styles)==null?void 0:Be.input,...d.input},V=l5(j,p,k),P={...Qa(E,{attr:!0,aria:!0,data:!0}),ref:k},[Q,{getSlotValues:X,setSlotValues:T,getNodeInfo:J,mergeSlotConfig:F,getNodeTextValue:G,clear:re}]=p5($),[_,H]=b.useState(new Map),[te,oe]=b.useState(null),{setEndCursor:B,setStartCursor:ie,setAllSelectCursor:ae,setCursorPosition:Se,setSlotFocus:ye,setAfterNodeFocus:U,getTextBeforeCursor:me,removeAllRanges:he,getRange:se,getInsertPosition:ue,getEndRange:pe,getStartRange:Ne,getSelection:Ee,copySelectionString:Ie,getCleanedText:W}=s5({prefixCls:I,getSlotDom:K=>R.current.get(K),slotConfigMap:Q,getNodeInfo:J,getEditorValue:()=>Me()}),{buildSkillSpan:Y,buildEditSlotSpan:le,buildSlotSpan:be,buildSpaceSpan:$e,getSlotDom:ce,saveSlotDom:ne,getSlotLastDom:ve}=c5({prefixCls:I,placeholder:m,slotDomMap:R,slotConfigMap:Q}),Re=K=>{const ge=Me();D.current&&(!(ge!=null&&ge.value)&&ge.slotConfig.length===0&&m?(D.current.setAttribute("contenteditable","true"),D.current.classList.add(`${I}-skill-empty`)):(D.current.setAttribute("contenteditable","false"),D.current.classList.remove(`${I}-skill-empty`))),n==null||n(ge.value,K,ge.slotConfig,ge.skill)},Ge=(K,ge,de)=>{const we=ce(K),Te=Q.get(K);if(T(ke=>({...ke,[K]:ge})),we&&Te){const ke=Pe(Te,we);H(Fe=>{const De=new Map(Fe);return De.set(K,ke),De}),Re(de)}},Pe=(K,ge)=>{if(!K.key)return null;const de=X()[K.key],we=()=>{var Te,ke,Fe,De,ft,Pt,ht,Ct,mt;switch(K.type){case"content":return ge.innerHTML=de||"",ge.setAttribute("data-placeholder",((Te=K.props)==null?void 0:Te.placeholder)||""),null;case"input":return b.createElement(Vr,{readOnly:l,className:`${I}-slot-input`,placeholder:((ke=K.props)==null?void 0:ke.placeholder)||"","data-slot-input":K.key,size:"small",variant:"borderless",value:de||"",tabIndex:0,onKeyDown:Rt,onChange:Lt=>{Ge(K.key,Lt.target.value,Lt)},spellCheck:!1});case"select":return b.createElement(Yx,{disabled:l,menu:{items:(De=(Fe=K.props)==null?void 0:Fe.options)==null?void 0:De.map(Lt=>({label:Lt,key:Lt})),defaultSelectedKeys:(ft=K.props)!=null&&ft.defaultValue?[K.props.defaultValue]:[],selectable:!0,onSelect:({key:Lt,domEvent:Le})=>{Ge(K.key,Lt,Le)}},trigger:["click"]},b.createElement("span",{className:Z(`${I}-slot-select`,{placeholder:!de,[`${I}-slot-select-selector-value`]:de})},b.createElement("span",{"data-placeholder":(Pt=K.props)==null?void 0:Pt.placeholder,className:`${I}-slot-select-value`},de||""),b.createElement("span",{className:`${I}-slot-select-arrow`},b.createElement(i0,null))));case"tag":return b.createElement("span",{className:`${I}-slot-tag`},((ht=K.props)==null?void 0:ht.label)||((Ct=K.props)==null?void 0:Ct.value)||"");case"custom":return(mt=K.customRender)==null?void 0:mt.call(K,de,Lt=>{Ge(K.key,Lt)},{disabled:s,readOnly:l},K);default:return null}};return po.createPortal(we(),ge)},ze=K=>K.reduce((ge,de)=>{if(de.type==="text")return ge.push(document.createTextNode(de.value||"")),ge;const we=de.key;if(tn(!!we,"Sender",`Slot key is missing: ${we}`),we){let Te,ke;if(de.type==="content"){ke=le(de);const Fe=$e(we,"before"),De=$e(we,"after");Te=[Fe,ke,De],ne(`${we}_before`,Fe),ne(we,ke),ne(`${we}_after`,De)}else ke=be(we),Te=[ke],ne(we,ke);if(ke){const Fe=Pe(de,ke);Fe&&(H(De=>{const ft=new Map(De);return ft.set(we,Fe),ft}),ge.push(...Te))}}return ge},[]),Me=()=>{const K=k.current,ge={value:"",slotConfig:[],skill:void 0};if(!K)return ge;const de=K.childNodes;if(de.length===0)return K.innerHTML="",D.current=null,ge;const we=!!x,Te=new Array(de.length),ke=[];let Fe,De=0;for(let Pt=0;Pt<de.length;Pt++){const ht=de[Pt],Ct=G(ht);if(Te[De++]=Ct,ht.nodeType===Node.TEXT_NODE)Ct&&ke.push({type:"text",value:Ct});else if(ht.nodeType===Node.ELEMENT_NODE){const Lt=J(ht);if(Lt){const{skillKey:Le,slotKey:Tt,nodeType:Nt}=Lt;if(Le&&we&&(Fe=x),Tt&&Nt!=="nbsp"){const Vn=Q.get(Tt);Vn&&ke.push({...Vn,value:Ct})}}}}const ft=Te.slice(0,De).join("");return Fe||(D.current=null),{value:ft,slotConfig:ke,skill:Fe}},it=()=>{var ge;const K=k.current;K&&(K.innerHTML="",D.current=null,L.current=null,z.current=null,he(),(ge=R==null?void 0:R.current)==null||ge.clear())},Qe=K=>{K.forEach(ge=>{var de;(de=k.current)==null||de.appendChild(ge)})},It=(K,ge)=>{const de=k.current;de&&(de.querySelectorAll(`[data-slot-key="${K}"]`).forEach(we=>{we.remove()}),R.current.delete(K),T(we=>{const{[K]:Te,...ke}=we;return ke}),H(we=>{const Te=new Map(we);return Te.delete(K),Te}),Re(ge))},wt=()=>{if(x&&L.current!==x){Ot(!1),L.current=x;const K=Y(x.value),ge=po.createPortal(b.createElement(E0,$t({removeSkill:Ot},x,{prefixCls:I})),K);oe(ge);const de=document.createRange(),we=k.current;if(!we)return;de.setStart(we,0),de.insertNode(K),D.current=K,Re()}},Ot=(K=!0)=>{var de;!k.current||!D.current||((de=D.current)==null||de.remove(),D.current=null,L.current=null,K&&Re())},gt=K=>{c!=="enter"||!K||K.querySelectorAll("br").forEach(ge=>{ge.remove()})},_t=()=>{$&&$.length>0&&k.current&&(it(),Qe(ze($)))},jt=K=>{const ge=o==null?void 0:o(K);return A.current||O.current||ge===!1},_e=(K,ge)=>{var Fe,De,ft;if(!k.current)return!1;const{range:de,selection:we}=se();if(!we||we.rangeCount===0)return!1;const{focusOffset:Te,anchorNode:ke}=we;if(!ke||!k.current.contains(ke))return!1;if(ke.nodeType===Node.TEXT_NODE&&de){const Pt=ke.parentNode,ht=J(Pt),Ct=de.toString(),mt=((Fe=ke.textContent)==null?void 0:Fe.length)===Ct.length,Lt=((De=ke.textContent)==null?void 0:De.length)===1&&Te===1;if(((ft=ht==null?void 0:ht.slotConfig)==null?void 0:ft.type)==="content"&&(mt||Lt))return K.preventDefault(),ge==="cut"&&Ie(),ke.parentNode.innerHTML="",!0}if(ge==="backspace"&&Te===0){const Pt=ke.previousSibling;if(Pt){const ht=J(Pt);if(ht){const{slotKey:Ct,skillKey:mt}=ht;if(Ct)return K.preventDefault(),It(Ct,K),!0;if(mt)return K.preventDefault(),Ot(),!0}}}return!1},pt=K=>{const{key:ge,shiftKey:de,ctrlKey:we,altKey:Te,metaKey:ke}=K;if(ge!=="Enter")return!1;const Fe=we||Te||ke;return c==="enter"&&!de&&!Fe||c==="shiftEnter"&&de&&!Fe},Cn=()=>{if(!D.current||!k.current||D.current.getAttribute("contenteditable")==="false")return;const K=Ee();!(K!=null&&K.anchorNode)||!D.current.contains(K.anchorNode)||!k.current.contains(K.anchorNode)||(D.current.setAttribute("contenteditable","false"),D.current.classList.remove(`${I}-skill-empty`),Ze({cursor:"end"}))},jn=()=>{O.current=!0},Bn=()=>{O.current=!1,A.current=!1},Rt=K=>{if(!jt(K)&&!(K.key==="Backspace"&&_e(K,"backspace"))){if(pt(K)){K.preventDefault(),A.current=!0,h==null||h();return}if((K.key==="a"||K.key==="A")&&(K.ctrlKey||K.metaKey)&&!K.shiftKey&&!K.altKey){ae(k.current,D.current),K.preventDefault();return}Cn()}},Sn=K=>{w==null||w(K)},Ht=K=>{A.current&&(A.current=!1);const{range:ge}=se();z.current=ge;const de=setTimeout(()=>{z.current=null,clearTimeout(de)},200);y==null||y(K)},an=K=>{gt(k==null?void 0:k.current),Re(K)},Hn=K=>{_e(K,"cut")},fn=K=>{var we,Te;K.preventDefault();const ge=(we=K.clipboardData)==null?void 0:we.files,de=(Te=K.clipboardData)==null?void 0:Te.getData("text/plain");if(!de&&(ge!=null&&ge.length)&&a){a(ge);return}if(de){let ke=!1;const Fe=W(de);try{ke=document.execCommand("insertText",!1,Fe)}catch(De){tn(!1,"Sender",`insertText command failed: ${De}`)}ke||Dt([{type:"text",value:Fe}])}i==null||i(K)},pn=K=>{K.key==="Enter"&&(A.current=!1),r==null||r(K)},en=()=>{const K=k.current,ge=Ee();K&&(ge==null?void 0:ge.focusNode)===K&&ge.focusOffset===0&&Me().skill&&Se(K,k.current,1)},Dt=(K,ge,de,we)=>{const Te=k.current;if(Te)try{F(K);const ke=ze(K);if(ke.length===0)return;const Fe=at(ge,Te);if(!Fe.range||!Fe.selection)return;const{range:De,selection:ft}=Fe;de!=null&&de.length&&Vt(De,de,Te),De.deleteContents(),vt(ke,De,Fe),Oe(ke,De,ft,we)}catch(ke){tn(!1,"Sender",`Insert operation failed: ${ke}`)}},at=(K,ge)=>{const{type:de,slotKey:we,slotType:Te,range:ke,selection:Fe}=ue(K,k,z);if(!Fe)return{range:null,selection:null,type:de};let De=null;switch(de){case"end":De=pe(ge);break;case"start":De=Ne(ge);break;case"slot":De=se().range;break;case"box":De=ke||null,De&&D.current&&De.collapsed&&De.startOffset===0&&De.setStartAfter(D.current);break}return{range:De,selection:Fe,type:de,slotKey:we,slotType:Te}},Vt=(K,ge,de)=>{const{value:we,startContainer:Te,startOffset:ke}=me(de);we.length>=ge.length&&we.endsWith(ge)&&Te&&ke>=0&&(K.setStart(Te,ke-ge.length),K.setEnd(Te,ke),K.deleteContents())},vt=(K,ge,de)=>{const{type:we,slotKey:Te,slotType:ke}=de;let Fe=!0;K.forEach(De=>{if(Fe&&we==="slot"&&(ke!=="content"||De.nodeType!==Node.TEXT_NODE)&&Te){Fe=!1;const ft=ve(Te);ft&&ge.setStartAfter(ft)}ge.insertNode(De),ge.setStartAfter(De)})},Oe=(K,ge,de,we)=>{const Te=K[K.length-1];U(Te,k.current,ge,de,we),setTimeout(()=>{an(null)},0)},Ze=K=>{const ge={preventScroll:(K==null?void 0:K.preventScroll)??!1,cursor:(K==null?void 0:K.cursor)??"end",key:K==null?void 0:K.key};switch(ge.cursor){case"slot":ye(k,K==null?void 0:K.key,ge.preventScroll);break;case"start":ie(k.current,ge.preventScroll);break;case"all":ae(k.current,D.current,ge.preventScroll);break;case"end":B(k.current,ge.preventScroll);break}},st=()=>{var ge;const K=k.current;K&&(K.innerHTML="",L.current=null,D.current=null,re(),wt(),z.current=null,(ge=R==null?void 0:R.current)==null||ge.clear(),an(null))};return b.useEffect(()=>{_t(),x?wt():Re()},[$]),b.useEffect(()=>{wt()},[x]),b.useImperativeHandle(t,()=>({nativeElement:k.current,focus:Ze,blur:()=>{var K;return(K=k.current)==null?void 0:K.blur()},insert:Dt,clear:st,getValue:Me})),b.createElement(b.Fragment,null,b.createElement("div",$t({},P,{role:"textbox",tabIndex:0,style:{...j,...V},className:Z(M,`${M}-slot`,N.classNames.input,f.input,{[`${I}-rtl`]:v==="rtl"}),"data-placeholder":m,contentEditable:!l,suppressContentEditableWarning:!0,spellCheck:!1,onCut:Hn,onKeyDown:Rt,onKeyUp:pn,onPaste:fn,onCompositionStart:jn,onCompositionEnd:Bn,onFocus:Sn,onBlur:Ht,onSelect:en,onInput:an},E)),b.createElement("div",{style:{display:"none"},id:`${I}-slot-placeholders`},Array.from(_.values()),te))});process.env.NODE_ENV!=="production"&&($0.displayName="SlotTextArea");const k0=g.forwardRef((e,t)=>{const{speechRecording:n,disabled:r,onSpeechDisabled:o,prefixCls:i}=g.useContext(ms),a=e.disabled??r??o;let s=null;return n?s=g.createElement(XA,{className:`${i}-recording-icon`}):a?s=g.createElement(b0,null):s=g.createElement(x0,null),g.createElement(gs,$t({icon:s,variant:"text",color:"primary"},e,{action:"onSpeech",ref:t}))});var I0={};Object.defineProperty(I0,"__esModule",{value:!0});var m5=I0.default=g5;function g5(e,t){let n=e;for(let r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function h5(e,t,n){return m5(e,t)||n}const R0=b.forwardRef((e,t)=>{const{value:n,onChange:r,onKeyUp:o,onKeyDown:i,onPaste:a,onPasteFile:s,disabled:l,readOnly:c,submitType:u="enter",prefixCls:d,styles:f={},classNames:p={},autoSize:h,components:m,triggerSend:w,placeholder:y,onFocus:$,onBlur:x,...E}=b.useContext(hs),v=b.useRef(null),C=(V,q="cursor")=>{var J,F;const P=(F=(J=v.current)==null?void 0:J.resizableTextArea)==null?void 0:F.textArea,Q=P.value;let X=Q.length,T=Q.length;q==="cursor"&&(X=P==null?void 0:P.selectionStart,T=P==null?void 0:P.selectionEnd),q==="start"&&(X=0,T=0),P.value=Q.substring(0,X)+V+Q.substring(T,Q.length),P.selectionStart=X+V.length,P.selectionEnd=X+V.length,P.focus(),r==null||r(P.value)},I=()=>{r==null||r("")},N=()=>({value:n||"",slotConfig:[]});b.useImperativeHandle(t,()=>{var V,q,P,Q;return{nativeElement:(q=(V=v.current)==null?void 0:V.resizableTextArea)==null?void 0:q.textArea,focus:(P=v.current)==null?void 0:P.focus,blur:(Q=v.current)==null?void 0:Q.blur,insert:C,clear:I,getValue:N}});const M=b.useRef(!1),k=()=>{M.current=!0},R=()=>{M.current=!1},O=V=>{const q=i==null?void 0:i(V),{key:P,shiftKey:Q,ctrlKey:X,altKey:T,metaKey:J}=V;if(!(M.current||P!=="Enter"||q===!1)&&P==="Enter"){const F=X||T||J;if(u==="enter"&&!Q&&!F||u==="shiftEnter"&&Q&&!F){V.preventDefault(),w==null||w();return}}},A=V=>{var Q,X;const q=(Q=V.clipboardData)==null?void 0:Q.files;!((X=V.clipboardData)==null?void 0:X.getData("text/plain"))&&(q!=null&&q.length)&&s&&(s(q),V.preventDefault()),a==null||a(V)},z=h5(m,["input"],Vr.TextArea),L={...Qa(E,{attr:!0,aria:!0,data:!0}),ref:v},j=V=>{r==null||r(V.target.value,V)};return b.createElement(z,$t({},L,{disabled:l,style:f.input,className:Z(`${d}-input`,p.input),autoSize:h,value:n,onChange:j,onKeyUp:o,onCompositionStart:k,onCompositionEnd:R,onKeyDown:O,onPaste:A,variant:"borderless",readOnly:c,placeholder:y,onFocus:$,onBlur:x}))});process.env.NODE_ENV!=="production"&&(R0.displayName="TextArea");function b5(e,t){const n=Ke(e),[r,o,i]=b.useMemo(()=>typeof t=="object"?[t.recording,t.onRecordingChange,typeof t.recording=="boolean"]:[void 0,void 0,!1],[t]),[a,s]=b.useState(null);b.useEffect(()=>{if(!i&&"permissions"in navigator){let w=null;return navigator.permissions.query({name:"microphone"}).then(y=>{s(y.state),y.onchange=function(){s(this.state)},w=y}).catch(y=>{const $=y instanceof Error?y.message:String(y);tn(!1,"Sender",`Browser does not support querying microphone permission. ${$}`)}),()=>{w&&(w.onchange=null)}}},[i]);let l;!l&&typeof window<"u"&&(l=window.SpeechRecognition||window.webkitSpeechRecognition);const c=!!(i||l&&a!=="denied"),u=b.useRef(null),[d,f]=un(!1,r),p=b.useRef(!1),h=()=>{if(c&&!u.current){const w=new l;w.onstart=()=>{f(!0)},w.onend=()=>{f(!1)},w.onresult=y=>{var $,x,E;if(!p.current){const v=(E=(x=($=y.results)==null?void 0:$[0])==null?void 0:x[0])==null?void 0:E.transcript;n(v)}p.current=!1},u.current=w}},m=Ke(w=>{w&&!d||(p.current=w,i?o==null||o(!d):(h(),u.current&&(d?(u.current.stop(),o==null||o(!1)):(u.current.start(),o==null||o(!0)))))});return b.useEffect(()=>()=>{const w=u.current;if(w){w.onstart=null,w.onend=null,w.onresult=null;try{w.stop()}catch{}u.current=null}},[]),[c,m,d]}const P0=g.createContext({}),um=()=>({height:0}),dm=e=>({height:e.scrollHeight});function x5(e){const{title:t,onOpenChange:n,open:r,children:o,className:i,style:a,classNames:s={},styles:l={},prefixCls:c,closable:u,forceRender:d}=e,{prefixCls:f}=g.useContext(P0),{direction:p,getPrefixCls:h}=vo(),m=h("sender",c||f),w=`${m}-header`,y=()=>{n==null||n(!r)};return g.createElement(vr,{motionEnter:!0,motionLeave:!0,motionName:`${w}-motion`,leavedClassName:`${w}-motion-hidden`,onEnterStart:um,onEnterActive:dm,onLeaveStart:dm,onLeaveActive:um,visible:r,forceRender:d},({className:$,style:x})=>g.createElement("div",{className:Z(m,w,$,i,{[`${w}-rtl`]:p==="rtl"}),style:{...x,...a}},(u!==!1||t)&&g.createElement("div",{className:Z(`${w}-header`,s.header),style:{...l.header}},g.createElement("div",{className:`${w}-title`},t),u!==!1&&g.createElement("div",{className:`${w}-close`},g.createElement(ar,{type:"text",icon:g.createElement(Vu,null),size:"small",onClick:y}))),o&&g.createElement("div",{className:Z(`${w}-content`,s.content),style:{...l.content}},o)))}const y5=e=>{const{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[`&${r}-rtl`]:{direction:"rtl"},[`${r}`]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorderInput,[`${r}-header`]:{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:"flex",borderRadius:{_skip_check_:!0,value:n(e.borderRadius).mul(2).equal()},borderEndStartRadius:0,borderEndEndRadius:0,[`${r}-title`]:{flex:"auto"}},[`${r}-content`]:{padding:e.padding}},[`${r}-motion`]:{transition:["height","border"].map(o=>`${o} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}}}}},w5=e=>{const{componentCls:t,antCls:n,calc:r}=e,o=`${t}-slot`,i=`${n}-input`,a=`${i}-borderless`,s=`${n}-dropdown-trigger`,l=`${t}-slot-input`,c=`${t}-slot-select`,u=`${t}-slot-tag`,d=`${t}-slot-content`,f=`${t}-skill`;return{[t]:{[`${t}-input-slot`]:{outline:"none",cursor:"text",whiteSpace:"pre-wrap",width:"100%",caretColor:e.colorPrimary,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:"attr(data-placeholder)",color:e.colorTextPlaceholder}},[`${o}:not(${d})`]:{display:"inline-block",verticalAlign:"middle",alignItems:"center",marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:"break-all",marginInline:e.marginXXS},[`${i}${l}`]:{height:"100%",background:e.colorBgSlot,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,fontSize:"inherit",lineHeight:"inherit",position:"relative",[`&${a}`]:{"&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)":{outline:"none"}},"&::placeholder":{color:e.colorTextSlotPlaceholder,fontSize:"inherit",lineHeight:"inherit"},[o]:{display:"inline-flex",margin:`0 ${xe(e.marginXXS)}`,verticalAlign:"bottom",alignItems:"center",marginBlock:xe(r(e.marginXXS).div(2).equal()),minHeight:e.controlHeightSM,wordBreak:"break-all"}},[c]:{fontSize:e.fontSize,lineHeight:e.lineHeight,paddingInline:e.paddingXXS,transition:`border-color ${e.motionDurationMid}`,position:"relative",display:"inline-flex",alignItems:"center",cursor:"pointer",background:e.colorBgSlot,height:"100%",boxSizing:"border-box",borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`${c}`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,padding:`0 ${xe(e.paddingXXS)}`,transition:`border-color ${e.motionDurationMid}`,position:"relative",display:"inline",cursor:"pointer",background:e.colorBgSlot,alignItems:"center",justifyContent:"center",borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`&${s}-open`]:{borderColor:e.colorBorderSlotHover}},[`${c}-value`]:{flex:1,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:"attr(data-placeholder)"}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:"inline-flex",alignItems:"center",justifyContent:"center"},[`${u}`]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${xe(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"relative",cursor:"default"}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:"inline-flex",alignItems:"center",justifyContent:"center"},[u]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${xe(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,height:"100%",boxSizing:"border-box",position:"relative",cursor:"default"},[d]:{height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),caretColor:e.colorPrimary,background:e.colorBgSlot,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,boxSizing:"border-box",verticalAlign:"middle",fontSize:e.fontSize,marginBlock:1,lineHeight:e.lineHeight,display:"inline-block",position:"relative",cursor:"text","&:empty":{width:"fit-content","&::after":{display:"inline-block",height:"inherit",content:"attr(data-placeholder)",color:e.colorTextSlotPlaceholder}}},[`${o}-no-width`]:{userSelect:"none",width:"3px",display:"inline-block",lineHeight:"inherit"},[f]:{display:"inline-block",verticalAlign:"baseline",alignItems:"center",marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:"break-all",paddingInlineEnd:0,paddingInlineStart:0,marginInlineEnd:0,marginInlineStart:-1,[`&${f}-empty`]:{"&::after":{display:"inline-block",pointerEvents:"none",height:"inherit",content:"attr(data-placeholder)",color:e.colorTextPlaceholder}}},[`${f}-wrapper`]:{height:"100%",display:"inline-flex"},[`${f}-tag`]:{paddingInline:e.paddingXS,height:"100%",backgroundColor:e.colorBgSkill,borderRadius:e.borderRadius,color:e.colorPrimary,alignItems:"center",fontWeight:500,display:"inline-flex",cursor:"pointer",gap:e.marginXXS,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorBgSkillHover,[`${f}-tag-close:not(${f}-tag-close-disabled)`]:{color:e.colorPrimaryHover}},"&-close":{fontSize:e.fontSizeSM,display:"inline-flex",transition:`color ${e.motionDurationMid}`,color:e.colorPrimary},"&-close-disabled":{cursor:"not-allowed",color:e.colorTextDisabled}},[`${f}-holder`]:{width:e.marginXS,height:"100%"}}}},v5=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-switch`;return{[t]:{[`&${r}-rtl`]:{direction:"rtl"},[`&${r}`]:{display:"inline-block",[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchUncheckedHoverBg,borderColor:e.colorBorder,color:e.colorText},[`&${r}-checked`]:{[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchCheckedHoverBg,borderColor:e.colorPrimary,color:e.colorPrimaryText},[`${r}-content`]:{background:e.switchCheckedBg}}}}}},C5=e=>{const{antCls:t,componentCls:n,paddingSM:r,paddingXS:o,paddingXXS:i,lineWidth:a,calc:s}=e;return{[n]:{[`&${n}-main`]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,borderRadius:{_skip_check_:!0,value:s(e.borderRadius).mul(2).equal()},borderColor:e.colorBorderInput,borderWidth:a,borderStyle:"solid"},[`&${n}-disabled`]:{background:e.colorBgContainerDisabled,borderColor:"transparent"},[`&${n}-rtl`]:{direction:"rtl"},[`${n}-content`]:{display:"flex",gap:o,width:"100%",paddingBlock:r,paddingInlineStart:r,paddingInlineEnd:r,boxSizing:"border-box",alignItems:"flex-end"},[`${n}-prefix`]:{flex:"none"},[`${n}-input`]:{paddingInline:0,borderRadius:0,flex:"auto",alignSelf:"center",caretColor:e.colorPrimary,fontSize:e.fontSize,[`&${t}-input-borderless`]:{"&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)":{outline:"none"}}},[`${n}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${n}-actions-btn`]:{[`&-disabled:where(${t}-btn-variant-text)`]:{color:e.colorTextActionsDisabled,borderColor:"transparent"},[`&-disabled:not(${t}-btn-variant-text)`]:{background:e.colorBgActionsDisabled,color:e.colorTextLightSolid,borderColor:"transparent"},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:"top"},"&-recording-icon":{height:"1.2em",width:"1.2em",verticalAlign:"top"}},[`${n}-footer`]:{paddingInlineStart:r,paddingInlineEnd:r,paddingBlockEnd:r,paddingBlockStart:i,boxSizing:"border-box"}}}},S5=e=>{const{colorPrimary:t,colorFillTertiary:n}=e,r=new Ve(t).setA(.06).toRgbString(),o=new Ve(t).setA(.08).toRgbString(),i=new Ve(t).setA(.15).toRgbString(),a=t,s=new Ve(t).setA(.25).toRgbString(),l=new Ve(t).setA(.1).toRgbString(),c=r,u=new Ve(t).setA(.08).toRgbString(),d=new Ve(n).setA(.04).toRgbString(),f=new Ve(t).setA(.1).toRgbString(),p=new Ve(n).setA(.1).toRgbString(),h=`0 4px 12px 0 ${new Ve(t).setA(.1).toRgbString()}`,m=new Ve(t).setA(.45).toRgbString();return{colorBgSlot:r,colorBgSkill:o,colorBgSkillHover:i,colorTextSlot:a,colorTextSlotPlaceholder:s,colorBorderSlotHover:l,colorBorderSlot:c,switchCheckedBg:u,switchCheckedHoverBg:f,switchUncheckedHoverBg:d,colorBorderInput:p,boxShadowInput:h,colorBgActionsDisabled:m,colorTextActionsDisabled:m}},T0=n5("Sender",e=>{const{paddingXS:t,calc:n}=e,r=yt(e,{SenderContentMaxWidth:`calc(100% - ${xe(n(t).add(32).equal())})`});return[C5(r),y5(r),v5(r),w5(r)]},S5),ea={SendButton:S0,ClearButton:o5,LoadingButton:C0,SpeechButton:k0},E5=b.forwardRef((e,t)=>{const{prefixCls:n,styles:r={},classNames:o={},className:i,rootClassName:a,style:s,defaultValue:l,value:c,slotConfig:u,readOnly:d,submitType:f="enter",onSubmit:p,loading:h,components:m,onCancel:w,onChange:y,suffix:$,onKeyUp:x,onKeyDown:E,disabled:v,allowSpeech:C,prefix:I,footer:N,header:M,onPaste:k,onPasteFile:R,autoSize:O={maxRows:8},placeholder:A,onFocus:z,onBlur:D,skill:L,...j}=e,V=Qa(j,{attr:!0,aria:!0,data:!0}),q=b.useId(),P=Array.isArray(u)||(L==null?void 0:L.value),{direction:Q,getPrefixCls:X}=vo(),T=X("sender",n),J=b.useRef(null),F=b.useRef(null);mh(t,()=>{var ce;return{nativeElement:J.current,inputElement:(ce=F.current)==null?void 0:ce.nativeElement,focus:ne=>{var ve;return(ve=F.current)==null?void 0:ve.focus(ne)},blur:()=>{var ne;return(ne=F.current)==null?void 0:ne.blur()},insert:(...ne)=>{var ve,Re;return(Re=(ve=F.current)==null?void 0:ve.insert)==null?void 0:Re.call(ve,...ne)},clear:()=>{var ne;return(ne=F.current)==null?void 0:ne.clear()},getValue:()=>{var ne;return((ne=F.current)==null?void 0:ne.getValue())??{value:"",slotConfig:[],skill:void 0}}}});const G=Pu("sender"),re=`${T}-input`,[_,H]=T0(T),te=Z(T,G.className,i,a,G.classNames.root,o.root,_,H,`${T}-main`,{[`${T}-rtl`]:Q==="rtl",[`${T}-disabled`]:v}),oe=`${T}-actions-btn`,B=`${T}-actions-list`,[ie,ae]=un(l||"",c),Se=(ce,ne,ve,Re)=>{ae(ce),y==null||y(ce,ne,ve??[],Re)},[ye,U,me]=b5(ce=>{var ne,ve;P?(ve=(ne=F.current)==null?void 0:ne.insert)==null||ve.call(ne,[{type:"text",value:ce}]):Se(`${ie} ${ce}`)},C),he=()=>{if(F!=null&&F.current&&p&&!h&&!W){const ce=F.current.getValue();p(ce.value,ce.slotConfig,ce.skill)}},se=()=>{var ce,ne;Se(""),P&&((ne=(ce=F.current)==null?void 0:ce.clear)==null||ne.call(ce))},ue=b.createElement(e0,{className:`${B}-presets`},C&&b.createElement(k0,null),h?b.createElement(C0,null):b.createElement(S0,null));let pe=ue;typeof $=="function"?pe=$(ue,{components:ea}):($||$===!1)&&(pe=$);const Ne=typeof I=="function"?I(ue,{components:ea}):I||null,Ee=typeof M=="function"?M(ue,{components:ea}):M||null,Ie=typeof N=="function"?N(ue,{components:ea}):N||null,[W,Y]=b.useState(!ie),le={prefixCls:oe,onSend:he,onSendDisabled:!ie,onClear:se,onClearDisabled:!ie,onCancel:w,onCancelDisabled:!h,onSpeech:()=>U(!1),onSpeechDisabled:!ye,speechRecording:me,disabled:v,setSubmitDisabled:Y},be=b.useMemo(()=>({value:ie,onChange:Se,slotConfig:u,onKeyUp:x,onKeyDown:E,onPaste:k,onPasteFile:R,disabled:v,readOnly:d,submitType:f,prefixCls:T,styles:r,classNames:o,autoSize:O,components:m,triggerSend:he,placeholder:A,onFocus:z,onBlur:D,skill:L,...j}),[ie,Se,u,x,E,k,R,v,d,f,T,r,o,O,m,he,A,z,D,L,j]),$e=ce=>{var ne,ve,Re;!P&&ce.target!==((ne=J.current)==null?void 0:ne.querySelector(`.${re}`))&&ce.preventDefault(),ce.target===((ve=J.current)==null?void 0:ve.querySelector(`.${re}`))&&((Re=F.current)==null||Re.focus())};return b.createElement("div",$t({key:q,ref:J,className:te,style:{...G.style,...s,...G.styles.root,...r.root}},V),b.createElement(hs.Provider,{value:be},b.createElement(ms.Provider,{value:le},Ee&&b.createElement(P0.Provider,{value:{prefixCls:T}},Ee),b.createElement("div",{className:Z(`${T}-content`,o.content),style:r.content,onMouseDown:$e},Ne&&b.createElement("div",{className:Z(`${T}-prefix`,G.classNames.prefix,o.prefix),style:{...G.styles.prefix,...r.prefix}},Ne),P?b.createElement($0,{ref:F}):b.createElement(R0,{ref:F}),pe&&b.createElement("div",{className:Z(B,G.classNames.suffix,o.suffix),style:{...G.styles.suffix,...r.suffix}},pe)),Ie&&b.createElement("div",{className:Z(`${T}-footer`,G.classNames.footer,o.footer),style:{...G.styles.footer,...r.footer}},Ie))))}),N0=E5;process.env.NODE_ENV!=="production"&&(N0.displayName="Sender");const $5=g.forwardRef((e,t)=>{const{children:n,className:r,classNames:o={},styles:i={},icon:a,style:s,onChange:l,rootClassName:c,loading:u,defaultValue:d,value:f,checkedChildren:p,unCheckedChildren:h,disabled:m,prefixCls:w,...y}=e,{styles:$={},classNames:x={},prefixCls:E}=g.useContext(hs),v=Qa(y,{attr:!0,aria:!0,data:!0}),C=g.useId(),{direction:I,getPrefixCls:N}=vo(),M=N("sender",w||E),k=`${M}-switch`,[R,O]=T0(M),A=g.useRef(null);mh(t,()=>({nativeElement:A.current}));const[z,D]=un(d,f),L=Pu("sender"),j=Z(M,k,r,c,L.classNames.switch,x.switch,o.root,R,O,{[`${k}-checked`]:z,[`${k}-rtl`]:I==="rtl"});return g.createElement("div",$t({ref:A,className:j,key:C,style:{...s,...L.styles.switch,...$.switch,...i.root}},v),g.createElement(ar,{disabled:m,loading:u,className:Z(`${k}-content`,o.content),style:i.content,styles:{icon:i.icon,content:i.title},classNames:{icon:o.icon,content:o.title},variant:"outlined",color:z?"primary":"default",icon:a,onClick:()=>{const V=!z;D(V),l==null||l(V)}},z?p:h,n))}),pd=N0;pd.Header=x5;pd.Switch=$5;function M0({size:e=12}){return S.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:S.jsx("path",{d:"M12 2.5l1.8 5.2a3 3 0 0 0 1.9 1.9l5.2 1.8-5.2 1.8a3 3 0 0 0-1.9 1.9L12 20.3l-1.8-5.2a3 3 0 0 0-1.9-1.9L3.1 11.4l5.2-1.8a3 3 0 0 0 1.9-1.9z"})})}function k5({items:e,activeIndex:t,onSelect:n}){const r=b.useRef(null);return b.useEffect(()=>{var i;const o=(i=r.current)==null?void 0:i.children[t];o==null||o.scrollIntoView({block:"nearest"})},[t]),S.jsxs("div",{className:"sa-slash-menu",children:[S.jsxs("div",{className:"sa-slash-menu-header",children:["技能 (",e.length,")"]}),S.jsx("div",{className:"sa-slash-menu-body",ref:r,children:e.length===0?S.jsx("div",{className:"sa-slash-menu-empty",children:"没有匹配的技能"}):e.map((o,i)=>{const a=o.displayName||o.name,s=o.owner==="member"&&o.memberName?o.memberName:null,l=!o.selectable;return S.jsxs("div",{className:"sa-slash-menu-item"+(i===t?" sa-slash-menu-item--active":"")+(l?" sa-slash-menu-item--disabled":""),"aria-disabled":l||void 0,title:l?o.disabledReason??void 0:void 0,onMouseDown:c=>{c.preventDefault(),!l&&n(o)},children:[S.jsx("span",{className:"sa-slash-menu-item-icon",children:S.jsx(M0,{size:13})}),S.jsx("span",{className:"sa-slash-menu-item-name",children:a}),s&&S.jsx("span",{className:"sa-slash-menu-item-owner",children:s}),l&&o.disabledReason?S.jsx("span",{className:"sa-slash-menu-item-desc",children:o.disabledReason}):o.description&&S.jsx("span",{className:"sa-slash-menu-item-desc",children:o.description})]},o.code)})})]})}function I5({sdk:e,input:t,onSelect:n}){const[r,o]=b.useState([]),[i,a]=b.useState(!1),[s,l]=b.useState(0),c=b.useRef(!1);b.useEffect(()=>{c.current||(c.current=!0,e.listSkills().then(o).catch(()=>o([])))},[e]);const u=/^\/\S*$/.test(t);b.useEffect(()=>{a(u)},[u]);const d=t.startsWith("/")?t.slice(1).toLowerCase():"",f=b.useMemo(()=>r.filter(v=>!d||v.code.toLowerCase().includes(d)||v.name.toLowerCase().includes(d)||v.displayName&&v.displayName.toLowerCase().includes(d)),[r,d]),p=b.useMemo(()=>f.reduce((v,C,I)=>C.selectable?[...v,I]:v,[]),[f]);b.useEffect(()=>{u&&l(p[0]??0)},[t,u,p]);const h=b.useRef(i),m=b.useRef(f),w=b.useRef(p),y=b.useRef(s),$=b.useRef(n);h.current=i,m.current=f,w.current=p,y.current=s,$.current=n;const x=b.useCallback(v=>{if(!h.current)return!1;const C=w.current;if(C.length===0)return!1;const I=N=>{const M=C.indexOf(y.current),k=M===-1?C[0]:C[(M+N+C.length)%C.length];l(k)};switch(v.key){case"ArrowDown":return v.preventDefault(),I(1),!0;case"ArrowUp":return v.preventDefault(),I(-1),!0;case"Enter":case"Tab":{const N=m.current[y.current];return!N||!N.selectable?!1:(v.preventDefault(),$.current(N),a(!1),!0)}case"Escape":return v.preventDefault(),a(!1),!0;default:return!1}},[]),E=b.useCallback(()=>a(!1),[]);return{isOpen:i,items:f,activeIndex:s,handleKeyDown:x,close:E}}const R5=10,P5="sa-sender",T5=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);function N5({size:e=16}){return S.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"})})}function md(){const{status:e,sendMessage:t,stop:n,sdk:r,attachmentUploader:o,nosUpload:i}=Fn(),[a,s]=b.useState(""),[l,c]=b.useState(null),[u,d]=b.useState([]),f=b.useRef(null),p=b.useRef(null),h=!!o||!!i,m=e==="streaming"||e==="submitted",w=u.filter(z=>z.attachment),y=u.some(z=>!z.attachment&&z.status==="uploading"),$=!!a.trim()||!!l||u.length>0||m,x=!m&&!y&&(a.trim().length>0||!!l||w.length>0),E=b.useMemo(()=>l?{title:S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"sa-skill-inline-icon",children:S.jsx(M0,{})}),l.displayName||l.name]}),value:l.code,closable:!0,...l.owner==="member"&&l.memberName?{toolTip:{title:`${l.displayName||l.name}(成员 ${l.memberName} 的技能)`}}:{}}:void 0,[l]),v=b.useCallback((z,D,L,j)=>{s(z),j||c(V=>V&&null)},[]),C=b.useCallback(z=>{c(z),setTimeout(()=>{var D;return(D=f.current)==null?void 0:D.focus()},0)},[]),I=I5({sdk:r,input:a,onSelect:C}),N=b.useCallback(z=>{const D=Array.from(z.target.files??[]);if(z.target.value="",!h||D.length===0)return;const L=R5-u.length,j=D.slice(0,Math.max(0,L));if(j.length===0)return;const V=j.map(q=>({key:`${q.name}_${q.size}_${Date.now()}_${Math.random().toString(36).slice(2,6)}`,file:q,status:"uploading"}));d(q=>[...q,...V]);for(const{key:q,file:P}of V)(o||zn.createNosUploader({baseURL:i.baseURL,headers:i.headers,trunkSize:i.trunkSize,onProgress:X=>d(T=>T.map(J=>J.key===q?{...J,percent:X}:J))}))(P).then(X=>{d(T=>T.map(J=>J.key===q?{...J,attachment:{...X,filename:X.filename||P.name,size:X.size??P.size,mime:X.mime??P.type}}:J))}).catch(X=>{d(T=>T.map(J=>J.key===q?{...J,status:"error",errorMsg:X instanceof Error?X.message:String(X)}:J))})},[o,i,u]),M=b.useCallback(z=>{d(D=>D.filter(L=>L.key!==z))},[]),k=b.useCallback(()=>{var V;if(!x)return;const z=a.trim(),D=w.map(q=>q.attachment),L=l?`/${l.code}${z?` ${z}`:""}`:z,j=l?`${l.displayName||l.name}${z?` ${z}`:""}`:void 0;t(L,D.length>0?D:void 0,j),(V=f.current)==null||V.clear(),s(""),c(null),d([])},[x,a,l,w,t]),R=b.useCallback(z=>{if(I.handleKeyDown(z))return!1;if(z.key==="Enter")return(z.metaKey||z.ctrlKey)&&(z.preventDefault(),k()),!1},[k,I.handleKeyDown]),O=b.useCallback(()=>{var z;m||(z=f.current)==null||z.focus()},[m]),A=S.jsxs("div",{className:"flex items-center justify-end gap-2",children:[h&&!m&&S.jsx("button",{type:"button",className:"sa-attach-btn mr-auto","aria-label":"添加附件",title:"添加附件",onClick:()=>{var z;return(z=p.current)==null?void 0:z.click()},children:S.jsx(N5,{size:15})}),S.jsx("input",{ref:p,type:"file",multiple:!0,className:"hidden",onChange:N,"aria-label":"选择附件"}),!m&&S.jsxs("span",{className:"sa-send-hint","aria-hidden":"true",children:[S.jsx("kbd",{className:"sa-send-kbd",children:T5?"⌘":"Ctrl"}),S.jsx("span",{children:"+"}),S.jsx("kbd",{className:"sa-send-kbd",children:"Enter"}),S.jsx("span",{children:"发送"})]}),m?S.jsx("button",{type:"button",className:"sa-send-btn sa-send-btn-active","aria-label":"停止生成",title:"停止生成",onClick:n,children:S.jsx("span",{className:"sa-stop-icon"})}):S.jsx("button",{type:"button",className:`sa-send-btn ${x?"sa-send-btn-active":""}`,"aria-label":"发送",title:"发送",onClick:k,disabled:!x,children:S.jsx("img",{src:Gt.sendSolid,alt:"发送",width:14,height:14,draggable:!1})})]});return S.jsxs("div",{className:"relative z-[2] shrink-0 px-[15px] pb-2.5",children:[I.isOpen&&S.jsx(k5,{items:I.items,activeIndex:I.activeIndex,onSelect:C}),u.length>0&&S.jsx("div",{className:"sa-attachment-tray mb-1.5",onClick:z=>z.stopPropagation(),children:u.map(z=>S.jsxs("span",{className:`sa-attachment-tray-chip ${z.status==="error"?"sa-attachment-tray-chip-error":""}`,title:z.status==="error"?`上传失败:${z.errorMsg??""}`:z.file.name,children:[S.jsx(We,{name:"file-text",size:13,color:z.status==="error"?"#ef4444":"#6366f1"}),S.jsx("span",{className:"sa-attachment-tray-chip-name",children:z.file.name}),S.jsx("span",{className:"sa-attachment-tray-chip-size",children:z.attachment?_g(z.file.size):z.status==="error"?"失败":z.percent!=null?`${Math.min(99,Math.round(z.percent))}%`:"上传中…"}),S.jsx("button",{type:"button",className:"sa-attachment-tray-chip-remove","aria-label":`移除附件 ${z.file.name}`,onClick:()=>M(z.key),children:"✕"})]},z.key))}),S.jsx("div",{className:"sa-composer-shell",onClick:O,children:S.jsx(b.Fragment,{children:S.jsx(pd,{ref:f,prefixCls:P5,rootClassName:`sa-input-form ${$?"sa-input-form-active":""} ${m?"sa-input-form-streaming":""}`,skill:E,onChange:v,onKeyDown:R,disabled:m,autoSize:{minRows:1,maxRows:5},placeholder:m?"回答生成中,请稍候…":l?"补充你的需求…":"发消息或创建任务... /使用技能",suffix:A})})}),S.jsx("div",{className:"mt-3 text-center text-[11px] leading-none text-[#B8B8B8]",children:"所有内容均由AI生成仅供参考"})]})}const M5=.3,A5=.7,z5=.5;function O5({artifact:e}){const[t,n]=b.useState(null),[r,o]=b.useState(null),[i,a]=b.useState(!0),[s,l]=b.useState(null);return b.useEffect(()=>{let c=!1;a(!0),l(null),n(null),o(null);async function u(){try{if(e.type==="pdf"){c||a(!1);return}if(e.type==="md"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.text();c||(o(f),a(!1));return}if(e.type==="html"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.text(),p=(await Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs"))).default;c||(n(p.sanitize(f,{FORCE_BODY:!0,ADD_ATTR:["target"]})),a(!1));return}if(e.type==="docx"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.arrayBuffer(),h=await(await Promise.resolve().then(()=>require("./mammoth.browser-CKp13R4W.cjs")).then(w=>w.mammoth_browser)).convertToHtml({arrayBuffer:f}),m=(await Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs"))).default;c||(n(m.sanitize(h.value,{FORCE_BODY:!0,ADD_ATTR:["target"]})),a(!1));return}c||(a(!1),l(`不支持预览「${e.type}」类型`))}catch(d){c||(a(!1),l(d instanceof Error?d.message:"加载失败"))}}return u(),()=>{c=!0}},[e]),i?S.jsx("div",{className:"sa-drawer-preview-loading",children:"加载中"}):s?S.jsxs("div",{className:"sa-drawer-preview-error",children:[s,S.jsx("button",{className:"sa-drawer-btn-sm",onClick:()=>void fa(e),children:"下载查看"})]}):e.type==="pdf"?S.jsx("iframe",{src:e.url,title:e.filename,className:"sa-drawer-preview-iframe",sandbox:"allow-scripts"}):r!==null?S.jsx("div",{className:"sa-drawer-preview-html-scroll",children:S.jsx("div",{className:"sa-drawer-preview-html sa-text-part",children:S.jsx(lg,{remarkPlugins:[Mg],children:r})})}):t!==null?S.jsx("div",{className:"sa-drawer-preview-html-scroll",children:S.jsx("div",{className:"sa-drawer-preview-html sa-text-part",dangerouslySetInnerHTML:{__html:t}})}):null}function D5({artifacts:e,initialArtifact:t,onClose:n}){const{previewLayoutMode:r,containerWidth:o,isDrawerFullscreen:i,setDrawerFullscreen:a}=Fn(),[s,l]=b.useState(t?{mode:"preview",artifact:t}:{mode:"list"}),[c,u]=b.useState(!1),d=b.useRef(null),[f,p]=b.useState(z5),h=b.useRef(null),m=i,w=!m&&r==="split",y=Math.round(o*f);b.useEffect(()=>{t&&(d.current&&(clearTimeout(d.current),d.current=null,u(!1)),l({mode:"preview",artifact:t}))},[t]);const $=b.useCallback(()=>{u(!0),d.current=setTimeout(()=>{d.current=null,n()},240)},[n]);b.useEffect(()=>()=>{var M;d.current&&clearTimeout(d.current),(M=h.current)==null||M.call(h)},[]);const x=b.useCallback(M=>{l({mode:"preview",artifact:M})},[]),E=b.useCallback(()=>{l({mode:"list"})},[]),v=b.useCallback(()=>a(!1),[a]);b.useEffect(()=>{const M=k=>{k.key==="Escape"&&(m?v():$())};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[m,v,$]);const C=b.useCallback(M=>{if(!w)return;M.preventDefault();const k=M.clientX,R=y,O=z=>{const D=k-z.clientX,L=Math.max(o*M5,Math.min(o*A5,R+D));p(L/o)},A=()=>{document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",A),document.body.style.cursor="",document.body.style.userSelect="",h.current=null};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",O),document.addEventListener("mouseup",A),h.current=A},[w,y,o]),I=["sa-artifact-drawer",c?"sa-drawer-closing":"",m?"sa-drawer-fullscreen":"",!m&&r==="cover"?"sa-drawer-cover":""].filter(Boolean).join(" "),N=w?{width:y}:void 0;return o===0?null:S.jsxs("div",{className:I,style:N,onClick:m?M=>{M.target===M.currentTarget&&v()}:void 0,children:[S.jsx("div",{className:`sa-drawer-resize-handle ${w?"":"sa-drawer-handle-hidden"}`,onMouseDown:C}),S.jsxs("div",{className:"sa-drawer-shell",children:[S.jsxs("div",{className:"sa-artifact-drawer-header",children:[s.mode==="preview"?S.jsx("button",{className:"sa-drawer-btn",onClick:E,title:"返回列表","aria-label":"返回列表",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M15 18l-6-6 6-6"})})}):S.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{flexShrink:0},children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),S.jsx("span",{className:"sa-artifact-drawer-title",children:s.mode==="preview"?s.artifact.filename:"会话产物"}),S.jsx("div",{style:{flex:1}}),m&&S.jsx("button",{className:"sa-drawer-btn",onClick:v,title:"退出全屏","aria-label":"退出全屏",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 21h3a2 2 0 0 0 2-2v-3M16 21v-3a2 2 0 0 1 2-2h3"})})}),s.mode==="preview"&&S.jsxs(S.Fragment,{children:[S.jsx("button",{className:"sa-drawer-btn",onClick:()=>void fa(s.artifact),title:"下载","aria-label":"下载",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})}),!m&&S.jsx("button",{className:"sa-drawer-btn",onClick:()=>a(!0),title:"全屏","aria-label":"全屏",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})})})]}),S.jsx("button",{className:"sa-drawer-btn",onClick:$,title:"关闭","aria-label":"关闭",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),S.jsx("div",{className:"sa-artifact-drawer-body",children:s.mode==="list"?e.length===0?S.jsx("div",{className:"sa-drawer-empty",children:"暂无产物"}):S.jsx("ul",{className:"sa-drawer-file-list",role:"list",children:e.map((M,k)=>S.jsxs("li",{className:"sa-drawer-file-card",onClick:()=>x(M),onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),x(M))},tabIndex:0,role:"button","aria-label":`预览 ${M.filename}`,children:[S.jsx("div",{className:"sa-drawer-file-icon",children:S.jsx("span",{className:"sa-artifact-chip-type",children:xm(M.type)})}),S.jsxs("div",{className:"sa-drawer-file-info",children:[S.jsx("span",{className:"sa-drawer-file-name",children:M.filename}),S.jsx("span",{className:"sa-drawer-file-size",children:bm(M.size)})]}),S.jsx("button",{className:"sa-drawer-btn",title:"下载","aria-label":`下载 ${M.filename}`,onClick:R=>{R.stopPropagation(),fa(M)},children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})})]},M.id||`artifact-${k}`))}):S.jsx("div",{className:"sa-drawer-view-enter",children:S.jsx(O5,{artifact:s.artifact})})})]})]})}function A0({page:e,onBack:t,centered:n}){b.useEffect(()=>{const o=i=>{i.key==="Escape"&&t()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[t]);const r=b.isValidElement(e.component)?b.cloneElement(e.component,{close:t}):b.createElement(e.component,{close:t});return S.jsx("div",{className:`sa-page-overlay ${n?"sa-page-overlay-centered":""}`,children:S.jsx("div",{className:"sa-page-overlay-body",children:r})})}const L5="mx-auto w-full max-w-[800px]";function z0({contentClassName:e,centered:t,composerClassName:n,thread:r,composer:o,artifactPreview:i}){const{activePanel:a,closePanel:s,messagesLoading:l,isArtifactDrawerOpen:c,allArtifacts:u,activePreviewArtifact:d,toggleArtifactDrawer:f,registerContentEl:p}=Fn();if(a)return S.jsx(A0,{page:a,onBack:s,centered:t});const h=t?L5:"";return S.jsxs(S.Fragment,{children:[S.jsxs("div",{ref:p,className:`relative ${e} ${h}`,children:[l?S.jsxs("div",{className:"sa-messages-loading",children:[S.jsx("span",{className:"sa-loading-spinner"}),"加载对话..."]}):r,i&&c&&S.jsx(D5,{artifacts:u,initialArtifact:d,onClose:f})]}),n?S.jsx("div",{className:`${n} ${h}`,children:o}):o]})}function F5({isOpen:e,onClose:t,title:n,slots:r,welcomeMessage:o,suggestedPrompts:i,avatar:a,artifactPreview:s,capabilities:l,quickLinks:c,logo:u,defaultWidth:d,defaultHeight:f,showTimestamp:p,collapse:h}){const{status:m,sendMessage:w,stop:y,toggleThreadList:$,setThreadListOpen:x,isThreadListOpen:E,toggleArtifactDrawer:v,isArtifactDrawerOpen:C,previewLayoutMode:I,isDrawerFullscreen:N,allArtifacts:M,activePanel:k,closePanel:R,messages:O,messagesLoading:A,conversations:z,activeConversationId:D,switchConversation:L,newConversation:j,deleteConversation:V,renameConversation:q,hasMore:P,loadMoreConversations:Q}=Fn(),{width:X,position:T,hasCustomPosition:J,isMaximized:F,totalWidth:G,windowHeight:re,startWindowDrag:_,startResize:H,toggleMaximize:te,reset:oe,setLockedHeight:B}=K0({defaultWidth:d??Ut.DEFAULT_WIDTH,defaultHeight:f??Ut.DEFAULT_HEIGHT,sidebarWidth:0}),ie=b.useRef(null),ae=b.useRef(null),Se=!A&&O.length===0,ye=!A&&O.length>0,U=!!k;b.useEffect(()=>{e||(oe(),R())},[e,oe,R]),b.useEffect(()=>{x(F?ie.current??!0:ae.current??!1)},[F,x]),b.useEffect(()=>{ye||B(null)},[ye,B]);const me=Y0({enabled:e&&ye&&!F&&!U&&!(C&&I==="cover"),contentSelector:".sa-panel-content",defaultHeight:f??Ut.DEFAULT_HEIGHT,onHeightChange:B});if(!e)return null;const he=r.Header,se=r.Composer,ue=r.ThreadList,pe=()=>{const ve=!E;$(),F?ie.current=ve:ae.current=ve},Ne=200,Ee=E&&!F,Ie="var(--sa-radius, 16px)",W=Ee?`0px ${Ie} ${Ie} 0px`:`${Ie} ${Ie} ${Ie} ${Ie}`,Y=J?T.x:window.innerWidth-G-20,le=Math.min(Ne,Math.max(0,Y-1)),be=J?{width:`${G}px`,height:`${re}px`,left:`${T.x}px`,top:`${T.y}px`}:{width:`${G}px`,height:`${re}px`,right:"20px",bottom:"20px"},$e={title:n,onClose:t,onToggleThreadList:pe,isMaximized:F,onToggleMaximize:te,showHome:ye||U,onHome:U?R:j,panelTitle:U?k==null?void 0:k.title:void 0,artifactCount:U||!s?0:M.length,onToggleArtifactDrawer:U||!s?void 0:v},ce={conversations:z,activeSessionId:D,onSwitch:L,onNew:j,onDelete:V,onRename:q,hasMore:P,onLoadMore:Q},ne=S.jsxs("div",{className:`relative z-20 flex min-w-0 flex-col bg-white ${F?"flex-1":"h-full shrink-0"}`,style:F?void 0:{width:`${X}px`,borderRadius:W,overflow:"hidden"},children:[Se&&!U&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"sa-home-gradient pointer-events-none absolute inset-x-0 top-0 z-0 h-[238px] opacity-10"}),S.jsx("div",{className:"sa-home-gradient-fade pointer-events-none absolute inset-x-0 top-0 z-[1] h-[238px]"})]}),S.jsx("div",{className:`relative z-20 ${Se||F?"":"bg-white"} ${F?"cursor-default":"cursor-grab active:cursor-grabbing"}`,onMouseDown:F?void 0:_,children:he?S.jsx(he,{...$e}):S.jsx(Cm,{...$e})}),S.jsx(z0,{contentClassName:`sa-panel-content relative ${N?"z-[30]":"z-[2]"} ${Se?"sa-home-view":""}`,centered:F,composerClassName:"shrink-0",artifactPreview:s,thread:S.jsx(yu,{slots:r,welcomeMessage:o,suggestedPrompts:i,avatar:a,artifactPreview:s,capabilities:l,quickLinks:c,logo:u,showTimestamp:p,collapse:h}),composer:se?S.jsx(se,{status:m,onSend:w,onStop:y}):S.jsx(md,{})})]});return F?S.jsx("div",{className:"fixed inset-0 z-[var(--sa-z-index,9999)] flex animate-sa-fade-in flex-col justify-end bg-black/30",children:S.jsxs("div",{className:"flex h-[calc(100%_-_48px)] w-full animate-sa-slide-up-full flex-row overflow-hidden bg-[#F5F5F5] shadow-[0_-12px_48px_rgba(0,0,0,0.25)]",style:{borderRadius:"var(--sa-radius, 16px) var(--sa-radius, 16px) 0px 0px"},children:[E&&(ue?S.jsx(ue,{...ce}):S.jsx(fl,{width:220})),ne]})}):S.jsxs("div",{ref:me,className:"fixed z-[var(--sa-z-index,9999)] flex animate-sa-window-in flex-row overflow-visible border border-[#DADADA] bg-white shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{...be,borderRadius:W},children:[S.jsx("div",{className:"sa-resize-handle absolute bottom-0 left-[-3px] top-0 z-20 w-[6px] cursor-col-resize",onMouseDown:ve=>H(ve)}),Ee&&(ue?S.jsx("div",{className:"absolute -top-px -bottom-px -left-px z-10 overflow-hidden border border-r-0 border-[#DADADA] bg-[#FAFAFA] shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{width:le,transform:`translateX(-${le}px)`,borderRadius:`${Ie} 0px 0px ${Ie}`},children:S.jsx(ue,{...ce})}):S.jsx("div",{className:"absolute -top-px -bottom-px -left-px z-10 overflow-hidden border border-r-0 border-[#DADADA] bg-[#FAFAFA] shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{width:le,transform:`translateX(-${le}px)`,borderRadius:`${Ie} 0px 0px ${Ie}`},children:S.jsx(fl,{width:Ne})})),ne]})}const fm=()=>{};function _5({conversations:e,activeSessionId:t,onSwitch:n,onNew:r,onDelete:o,onRename:i,isCollapsed:a,onToggleCollapse:s,hasMore:l,onLoadMore:c,conversationsLoading:u}){const[d,f]=b.useState(null),[p,h]=b.useState(null),[m,w]=b.useState(""),[y,$]=b.useState(null),x=b.useRef(null);b.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);const E=b.useCallback((k,R)=>{R.stopPropagation(),d===k?(o(k),f(null)):(f(k),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>f(null),3e3))},[d,o]),v=b.useCallback((k,R,O)=>{O.stopPropagation(),h(k),w(R??"")},[]),C=b.useCallback(k=>{m.trim()&&i(k,m.trim()),h(null)},[m,i]),I=b.useRef(null),N=b.useCallback(()=>{const k=I.current;!k||!l||!c||k.scrollHeight-k.scrollTop-k.clientHeight<50&&c()},[l,c]),M=b.useMemo(()=>Sm(e),[e]);return a?S.jsxs("div",{className:"flex w-12 shrink-0 flex-col items-center gap-1 border-r border-[#ECECEC] bg-[#FAFAFA] py-3",children:[S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"展开",onClick:s,children:S.jsx(We,{name:"panel-left",size:18})}),S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"新建对话",onClick:()=>{r(),s()},children:S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18})})]}):S.jsxs("div",{className:"relative flex w-[220px] shrink-0 flex-col border-r border-[#ECECEC] bg-[#FAFAFA] p-3",children:[S.jsxs("div",{className:"mb-4 flex shrink-0 items-center gap-1.5",children:[S.jsxs("button",{type:"button",className:"sa-new-chat flex h-8 flex-1 items-center justify-center gap-2 rounded-md text-[14px] font-medium transition-colors",onClick:r,children:[S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18}),S.jsx("span",{className:"sa-new-chat-text whitespace-nowrap",children:"新建对话"})]}),S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"收起侧边栏",onClick:s,children:S.jsx(We,{name:"panel-left-close",size:16})})]}),S.jsxs("div",{ref:I,className:"flex-1 overflow-y-auto",onScroll:N,children:[u&&e.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"加载中..."}),!u&&e.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"暂无记录"}),M.map(k=>S.jsxs("div",{className:"mb-1",children:[S.jsx("div",{className:"px-1 pb-1 pt-2 text-[11px] text-[#A0A0A0]",children:k.label}),k.items.map(R=>{const O=R.sessionId===t,A=d===R.sessionId;return S.jsx("div",{className:`group relative mb-0.5 flex h-8 w-full cursor-pointer items-center gap-1 rounded-md px-0.5 text-[13px] transition-colors ${O?"bg-[#E8F1FE]":"hover:bg-[#E8F1FE]"}`,onClick:()=>{p!==R.sessionId&&n(R.sessionId)},onMouseEnter:z=>{if(p===R.sessionId)return;const D=z.currentTarget.getBoundingClientRect();$({text:R.title||"新会话",x:D.right+8,y:D.top+D.height/2})},onMouseLeave:()=>$(null),children:p===R.sessionId?S.jsx("input",{className:"w-full rounded border border-[var(--sa-primary)] bg-white px-1.5 py-0.5 text-[12px] outline-none",value:m,onChange:z=>w(z.target.value),onBlur:()=>C(R.sessionId),onKeyDown:z=>{z.key==="Enter"&&C(R.sessionId),z.key==="Escape"&&h(null)},onClick:z=>z.stopPropagation(),autoFocus:!0}):S.jsxs(S.Fragment,{children:[S.jsx("img",{src:Gt.message,alt:"",width:16,height:16,className:"shrink-0 opacity-60"}),S.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-[#333]",children:R.title||"新会话"}),S.jsxs("span",{className:"hidden shrink-0 items-center gap-0.5 group-hover:flex",children:[S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[var(--sa-primary)]",onClick:z=>v(R.sessionId,R.title,z),title:"重命名",children:S.jsx(We,{name:"pen",size:12})}),S.jsx("button",{type:"button",className:`flex h-5 w-5 items-center justify-center rounded ${A?"bg-[#fee2e2] text-[#ef4444]":"text-[#999] hover:bg-white/70 hover:text-[#ef4444]"}`,onClick:z=>E(R.sessionId,z),title:A?"确认删除":"删除",children:S.jsx(We,{name:A?"x":"trash2",size:12})})]})]})},R.sessionId)})]},k.label)),l&&S.jsx("div",{className:"px-0.5 py-2 text-center text-[11px] text-[#C0C0C0]",children:"向下滚动加载更多"})]}),y&&S.jsx("div",{className:"pointer-events-none fixed z-[10001] whitespace-nowrap rounded border border-[#E8E8E8] bg-white px-2.5 py-1.5 text-[12px] leading-[1.4] text-[#333] shadow-[0_2px_8px_rgba(0,0,0,0.12)]",style:{left:y.x,top:y.y,transform:"translateY(-50%)"},children:y.text})]})}function O0({title:e,slots:t,welcomeMessage:n,suggestedPrompts:r,capabilities:o,quickLinks:i,logo:a,sidebarDefaultOpen:s=!0,onClose:l,avatar:c,artifactPreview:u,showTimestamp:d,collapse:f}){const{status:p,sendMessage:h,stop:m,conversations:w,activeConversationId:y,switchConversation:$,newConversation:x,deleteConversation:E,renameConversation:v,toggleArtifactDrawer:C,allArtifacts:I,activePanel:N,closePanel:M,hasMore:k,loadMoreConversations:R,conversationsLoading:O}=Fn(),[A,z]=b.useState(s),D=b.useCallback(()=>z(P=>!P),[]),L=!!N;b.useEffect(()=>()=>M(),[M]);const j=t.ThreadList,V=t.Composer,q=t.Header;return S.jsxs("div",{className:"sa-fullpage",children:[j?S.jsx("div",{className:`sa-fp-sidebar-wrapper ${A?"":"sa-fp-sidebar-wrapper-collapsed"}`,children:S.jsx(j,{conversations:w,activeSessionId:y,onSwitch:$,onNew:x,onDelete:E,onRename:v,hasMore:k,onLoadMore:R})}):S.jsx(_5,{conversations:w,activeSessionId:y,onSwitch:$,onNew:x,onDelete:E,onRename:v,isCollapsed:!A,onToggleCollapse:D,hasMore:k,onLoadMore:R,conversationsLoading:O}),S.jsxs("div",{className:"sa-fp-main",children:[q?S.jsx(q,{title:L?(N==null?void 0:N.title)??e:e,panelTitle:L?N==null?void 0:N.title:void 0,onClose:l??fm,onToggleThreadList:D,showHome:L,onHome:L?M:fm,artifactCount:L||!u?0:I.length,onToggleArtifactDrawer:L||!u?void 0:C}):S.jsxs("div",{className:"sa-fp-header",children:[S.jsx("div",{className:"sa-fp-header-title",children:L?(N==null?void 0:N.title)??e:e}),S.jsxs("div",{className:"sa-fp-header-actions",children:[L&&S.jsx("button",{className:"sa-fp-header-btn",onClick:M,title:"返回聊天","aria-label":"返回聊天",children:S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),S.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})}),!L&&u&&I.length>0&&S.jsxs("button",{className:"sa-fp-header-btn sa-header-btn-artifact",onClick:C,title:"会话产物",children:[S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),S.jsx("span",{children:"产物"})]})]})]}),S.jsx(z0,{contentClassName:"sa-fp-content-row",artifactPreview:u,thread:S.jsx(yu,{slots:t,welcomeMessage:n,suggestedPrompts:r,capabilities:o,quickLinks:i,logo:a,avatar:c,artifactPreview:u,showTimestamp:d,collapse:f}),composer:V?S.jsx(V,{status:p,onSend:h,onStop:m}):S.jsx(md,{})})]})]})}function D0(e){const{sdk:t,mode:n="floating",slots:r={},hooks:o={},welcomeMessage:i,suggestedPrompts:a,title:s="AI Assistant",initialOpen:l=!1,onOpenChange:c,sidebarDefaultOpen:u,avatar:d,artifactPreview:f,capabilities:p,quickLinks:h,logo:m,triggerLogo:w,theme:y,showTimestamp:$,attachmentUploader:x,nosUpload:E,collapse:v}=e,[C,I]=b.useState(l);b.useEffect(()=>{I(l)},[l]);const N=b.useCallback(()=>{var O,A;const R=!C;I(R),c==null||c(R),R?(O=o.onOpen)==null||O.call(o):(A=o.onClose)==null||A.call(o)},[C,o,c]),M=b.useCallback(()=>{var R;I(!1),c==null||c(!1),(R=o.onClose)==null||R.call(o)},[o,c]),k=r.Trigger??vm;return n==="fullpage"?C?S.jsx(dl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,mode:n,children:S.jsx(O0,{title:s,slots:r,welcomeMessage:i,suggestedPrompts:a,capabilities:p,quickLinks:h,logo:m,sidebarDefaultOpen:u,onClose:M,avatar:d,artifactPreview:f,showTimestamp:$,collapse:v})}):null:S.jsxs(dl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,mode:n,children:[S.jsx(k,{isOpen:C,onClick:N,triggerLogo:w}),S.jsx(F5,{isOpen:C,onClose:M,title:s,slots:r,welcomeMessage:i,suggestedPrompts:a,avatar:d,artifactPreview:f,capabilities:p,quickLinks:h,logo:m,defaultWidth:y==null?void 0:y.panelWidth,defaultHeight:y==null?void 0:y.panelHeight,showTimestamp:$,collapse:v})]})}const L0=`
|
|
311
|
+
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)",...r}}const ZA={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},JA={motionBase:!0,motionUnit:!0},e5=wa(Kc.defaultAlgorithm),t5={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},v0=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let a={...r,override:o};return a=QA(a),i&&Object.entries(i).forEach(([s,l])=>{const{theme:c,...u}=l;let d=u;c&&(d=v0({...a,...u},{override:u},c)),a[s]=d}),a};function C0(){const{token:e,hashed:t,theme:n,override:r,cssVar:o,zeroRuntime:i}=b.useContext(Kc._internalContext),a={prefix:(o==null?void 0:o.prefix)??"ant",key:(o==null?void 0:o.key)??"css-var-root"},s=n||e5,[l,c,u]=yh(s,[Kc.defaultSeed,e],{salt:`${GA}-${t||""}`,override:r,getComputedToken:v0,cssVar:{...a,unitless:ZA,ignore:JA,preserve:t5}});return[s,u,t?c:"",l,a,!!i]}function n5(){const[e,t,n]=C0();return{theme:e,token:t,hashId:n}}const{genStyleHooks:r5}=qh({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=vo();return{iconPrefixCls:t,rootPrefixCls:e()}},useToken:()=>{const[e,t,n,r,o,i]=C0();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{const{csp:e}=vo();return e??{}},layer:{name:"antdx"}}),gs=b.createContext(null),hs=b.forwardRef((e,t)=>{const{className:n,action:r,onClick:o,...i}=e,a=b.useContext(gs),{prefixCls:s,disabled:l,setSubmitDisabled:c}=a,u=i.disabled??l??a[`${r}Disabled`];return b.useEffect(()=>{r==="onSend"&&(c==null||c(u))},[u,r,c]),b.createElement(ar,$t({type:"text"},i,{ref:t,onClick:d=>{var f;u||((f=a[r])==null||f.call(a),o==null||o(d))},disabled:u,className:Z(s,n,{[`${s}-disabled`]:u})}))});function o5(e,t){return g.createElement(hs,$t({icon:g.createElement(w0,null)},e,{action:"onClear",ref:t}))}const i5=g.forwardRef(o5),a5=b.memo(e=>{const{className:t}=e,[n]=h0("Sender",lo.Sender);return b.createElement("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",className:t},b.createElement("title",null,n.stopLoading),b.createElement("rect",{fill:"currentColor",height:"250",rx:"24",ry:"24",width:"250",x:"375",y:"375"}),b.createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",opacity:"0.45"}),b.createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",strokeDasharray:"600 9999999"},b.createElement("animateTransform",{attributeName:"transform",dur:"1s",from:"0 500 500",repeatCount:"indefinite",to:"360 500 500",type:"rotate"})))}),S0=g.forwardRef((e,t)=>{const{prefixCls:n}=g.useContext(gs),{className:r}=e;return g.createElement(hs,$t({icon:g.createElement(a5,{className:`${n}-loading-icon`}),color:"primary",variant:"text",shape:"circle"},e,{className:Z(r,`${n}-loading-button`),action:"onCancel",ref:t}))});function s5(e,t){return g.createElement(hs,$t({icon:g.createElement(b0,null),type:"primary",shape:"circle"},e,{action:"onSend",ref:t}))}const E0=g.forwardRef(s5),bs=b.createContext({}),l5=e=>{const t=b.useCallback(()=>typeof window>"u"?null:window.getSelection(),[]),n=(x,E)=>{if(!x||!E)return E;let v=x,C=null;for(v.nodeType===Node.TEXT_NODE&&(v=v.parentElement);v&&v!==E;)v instanceof HTMLElement&&v.tagName==="SPAN"&&(C=v),v=v.parentElement;return C||E},r=b.useCallback(()=>{const x=t();if(!x)return{range:null,selection:x};try{return{range:x.getRangeAt(0)||document.createRange(),selection:x}}catch{return{range:document.createRange(),selection:x}}},[t]),o=b.useCallback((x,E)=>{if(!(!x||!E))try{E.removeAllRanges(),E.addRange(x)}catch(v){tn(!1,"Sender",`Failed to set range: ${v}`)}},[]),i=b.useCallback(()=>{const x=t();if(x)try{x.removeAllRanges()}catch(E){tn(!1,"Sender",`Failed to remove all ranges: ${E}`)}},[t]),a=b.useCallback((x,E=!1)=>{if(!(!x||typeof x.focus!="function"))try{x.focus({preventScroll:E})}catch(v){tn(!1,"Sender",`Failed to focus element: ${v}`)}},[]),s=b.useCallback((x,E)=>{if(!x)return;a(x,E);const{range:v,selection:C}=r();if(v&&C)try{v.selectNodeContents(x),v.collapse(!1),o(v,C)}catch(I){tn(!1,"Sender",`Failed to set end cursor: ${I}`)}},[a,r,o]),l=b.useCallback((x,E)=>{if(!x)return;a(x,E);const{range:v,selection:C}=r();if(v&&C)try{v.selectNodeContents(x),v.collapse(!0),o(v,C)}catch(I){tn(!1,"Sender",`Failed to set start cursor: ${I}`)}},[a,r,o]),c=b.useCallback((x,E,v)=>{if(!x)return;a(x,v);const{range:C,selection:I}=r();if(C&&I)try{C.selectNodeContents(x),E&&C.setStart(x,1),o(C,I)}catch(N){tn(!1,"Sender",`Failed to select all content: ${N}`)}},[a,r,o]),u=b.useCallback((x,E,v,C)=>{if(!x||typeof v!="number"||v<0||!E)return{range:null,selection:null};a(E,C);const{range:I,selection:N}=r();if(I&&N)try{const A=Math.min(v,x.childNodes.length);I.setStart(x,A),I.setEnd(x,A),I.collapse(!1),o(I,N)}catch(A){tn(!1,"Sender",`Failed to set cursor position:: ${A}`)}return{range:I,selection:N}},[a,r,o]),d=b.useCallback((x,E,v=!1)=>{if(!e||!(x!=null&&x.current))return;const{getSlotDom:C,slotConfigMap:I}=e,N=R=>{var M;const O=C(R);if(!O)return null;const z=I.get(R);if(!z)return null;if(z.type==="input")return O.querySelector("input");const D=((M=O==null?void 0:O.getAttribute)==null?void 0:M.call(O,"data-node-type"))||"";return z.type==="content"&&D!=="nbsp"?O:null},k=(R=>{var z;const O=x.current;if(!O)return null;if(R)return N(R);for(const D of Array.from(O.childNodes)){const M=(z=D==null?void 0:D.getAttribute)==null?void 0:z.call(D,"data-slot-key");if(M){const L=N(M);if(L)return L}}return null})(E);k&&(k.nodeName==="INPUT"?k.focus({preventScroll:v}):u(k,x.current,0,v))},[e,u]),f=b.useCallback((x,E,v,C,I)=>{!v||!C||(a(E,I),v==null||v.setStartAfter(x),v.collapse(!1),C.removeAllRanges(),C.addRange(v))},[a]),p=b.useCallback(x=>{var v;if(!x)return{value:"",startContainer:null,startOffset:0};const E=t();if(!E||E.rangeCount===0)return{value:"",startContainer:null,startOffset:0};try{let C=E.getRangeAt(0),I=C.cloneRange();if(!x.contains(C.startContainer))return{value:"",startContainer:null,startOffset:0};if(C.endContainer===x&&((v=C.endContainer.lastChild)==null?void 0:v.nodeType)===Node.TEXT_NODE){const A=C.endContainer.lastChild;C=document.createRange(),C.setStart(A,A.length),C.setEnd(A,A.length)}return I=C.cloneRange(),I.selectNodeContents(x),I.setEnd(C.startContainer,C.startOffset),{value:I.toString().replace(/\u200B/g,""),startContainer:C.startContainer,startOffset:C.startOffset}}catch(C){return tn(!1,"Sender",`Failed to get text before cursor: ${C}`),{value:"",startContainer:null,startOffset:0}}},[t]),h=b.useCallback((x,E,v)=>{if(x==="start"||x==="end")return{type:x,selection:t()};let C=null,I=null;if(v!=null&&v.current)C=v.current,I=t();else{const z=r();C=z.range,I=z.selection}if(!C||!I)return{type:"end",selection:I};const N=E==null?void 0:E.current;if(!N)return{type:"end",selection:I};const A=N.contains(C.endContainer),k=N.contains(C.startContainer);if(!A)return s(N,!0),{type:"end",selection:I};if(!k)return l(N,!0),{type:"start",selection:I};const R=n(C.endContainer,N),O=n(C.startContainer,N);if(R===O&&O!==N&&(e!=null&&e.getNodeInfo)){const{slotKey:z,slotConfig:D,skillKey:M}=e.getNodeInfo(R)||{};if(z)return{type:"slot",slotKey:D==null?void 0:D.key,slotType:D==null?void 0:D.type,range:C,selection:I};if(M)return{type:"start",selection:I}}return{type:"box",range:C,selection:I}},[e,r,t,s,l,n]),m=b.useCallback(x=>{const E=x.childNodes[x.childNodes.length-1],v=(E==null?void 0:E.nodeType)===Node.TEXT_NODE&&E.textContent===`
|
|
312
|
+
`?x.childNodes.length-1:x.childNodes.length;return u(x,x,v).range||document.createRange()},[u]),w=b.useCallback(x=>{var C;const E=(C=e==null?void 0:e.getEditorValue)!=null&&C.call(e).skill?1:0;return u(x,x,E).range||document.createRange()},[u,e]),y=b.useCallback(x=>x.replace(/\u200B/g,"").replace(/\n/g,"").replace(/^\n+|\n+$/g,""),[]),$=b.useCallback(async()=>{try{const x=t();if(!x)return!1;const E=x.toString();if(!E)return!1;const v=y(E);return await navigator.clipboard.writeText(v),!0}catch(x){return tn(!1,"Sender",`Failed to copy selection: ${x}`),!1}},[t,y]);return{setEndCursor:s,setStartCursor:l,setAllSelectCursor:c,setCursorPosition:u,setAfterNodeFocus:f,setSlotFocus:d,getTextBeforeCursor:p,getSelection:t,removeAllRanges:i,getRange:r,getInsertPosition:h,getEndRange:m,getStartRange:w,copySelectionString:$,getCleanedText:y}},dm=4.35,c5=(e,t,n)=>{const{token:r}=n5(),o=n.current?window.getComputedStyle(n.current):{},i=parseFloat(`${e.lineHeight||r.lineHeight}`),a=parseFloat(`${(o==null?void 0:o.fontSize)||e.fontSize||r.fontSize}`),s=o!=null&&o.lineHeight?parseFloat(`${o==null?void 0:o.lineHeight}`):i*a;return t===!1||!t?{}:t===!0?{height:"auto"}:{minHeight:t.minRows?(s+dm)*t.minRows:"auto",maxHeight:t.maxRows?(s+dm)*t.maxRows:"auto",overflowY:"auto"}},u5=e=>{const{prefixCls:t,placeholder:n,slotDomMap:r,slotConfigMap:o}=e,i=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","false"),p.dataset.skillKey=f,p.dataset.placeholder=n||"",p.className=`${t}-skill`,p},[t,n]),a=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","true"),p.dataset.slotKey=f.key,p.className=Z(`${t}-slot`,`${t}-slot-content`),p},[t]),s=b.useCallback(f=>{const p=document.createElement("span");return p.setAttribute("contenteditable","false"),p.dataset.slotKey=f,p.className=`${t}-slot`,p},[t]),l=b.useCallback((f,p)=>{const h=document.createElement("span");return h.setAttribute("contenteditable","false"),h.dataset.slotKey=f,h.dataset.nodeType="nbsp",h.className=Z(`${t}-slot-${p}`,`${t}-slot-no-width`),h.textContent=" ",h},[t]),c=(f,p)=>{r.current.set(f,p)},u=f=>r.current.get(f);return{buildSkillSpan:i,buildEditSlotSpan:a,buildSlotSpan:s,buildSpaceSpan:l,saveSlotDom:c,getSlotDom:u,getSlotLastDom:(f,p)=>{var m;return(p??((m=o.get(f))==null?void 0:m.type))==="content"?u(`${f}_after`):u(f)}}},d5=new Set(["input","select","custom","content"]),fm=e=>(e==null?void 0:e.reduce((t,n)=>{const{key:r,type:o}=n;if(!r)return t;const i=n.props||{},a=d5.has(o)?i.defaultValue:i.value??i.label;return t[r]=a??"",t},{}))??{},f5=(e,t)=>{e==null||e.forEach(n=>{n.key&&t.set(n.key,n)})},p5=(e,t)=>{if(!(e!=null&&e.dataset))return null;const{dataset:n}=e;return{slotKey:n.slotKey,placeholder:n.placeholder,nodeType:n.nodeType,skillKey:n.skillKey,slotConfig:n.slotKey?t.get(n.slotKey):void 0,targetNode:e}},m5=e=>{const[t,n]=b.useState({}),r=b.useRef(t),o=b.useRef(new Map),i=b.useRef(new Set);b.useEffect(()=>{if(!e)return;o.current.forEach((f,p)=>{i.current.has(p)||o.current.delete(p)}),f5(e,o.current);const d=fm(e);i.current.forEach(f=>{f in r.current&&(d[f]=r.current[f])}),n(d),r.current=d},[e]);const a=b.useCallback(d=>{const f=typeof d=="function"?d(r.current):d;n(f),r.current=f},[]),s=b.useCallback(d=>{const f=fm(d);d.forEach(p=>{p.key&&(o.current.set(p.key,p),i.current.add(p.key))}),n(p=>({...p,...f})),r.current={...r.current,...f}},[]),l=b.useCallback(()=>{o.current.clear(),i.current.clear(),n({}),r.current={}},[]),c=b.useCallback(d=>p5(d,o.current),[]),u=d=>{var E;const f=d.nodeType;if(f===Node.TEXT_NODE)return d.textContent||"";if(f!==Node.ELEMENT_NODE)return"";const p=d,h=c(p);if(!h)return p.innerText||"";const{slotKey:m,skillKey:w,nodeType:y,slotConfig:$}=h;if(w)return"";const x=p.innerText||"";if(m){if(y==="nbsp")return" ";if(!$)return x;const v=$.type==="content"?x:r.current[m]??"";return((E=$.formatResult)==null?void 0:E.call($,v))??v}return x};return[o.current,{getSlotValues:()=>r.current,setSlotValues:a,mergeSlotConfig:s,getNodeInfo:c,getNodeTextValue:u,clear:l}]},$0=({removeSkill:e,prefixCls:t,toolTip:n,closable:r,title:o,value:i})=>{const a=`${t}-skill`,s=b.useMemo(()=>{if(!r)return[null];const u=typeof r=="boolean"?{}:r,d=h=>{var m;u.disabled||(h.stopPropagation(),e(),(m=u.onClose)==null||m.call(u,h))},f=u.closeIcon||b.createElement(Xu,{className:`${a}-close-icon`});return b.createElement("div",{className:Z(`${a}-close`,{[`${a}-close-disabled`]:u.disabled}),onClick:d,role:"button","aria-label":"Close skill",tabIndex:0},f)},[r,e]),l=o||i,c=n?b.createElement(Si,n,l):l;return b.createElement("div",{className:`${a}-wrapper`,contentEditable:!1},b.createElement("div",{className:`${a}-tag`,contentEditable:!1,role:"button",tabIndex:0},b.createElement("span",{className:`${a}-tag-text`},c),s),b.createElement("div",{className:`${a}-holder`}))};$0.displayName="Skill";const k0=b.forwardRef((e,t)=>{var Be;const{onChange:n,onKeyUp:r,onKeyDown:o,onPaste:i,onPasteFile:a,disabled:s,readOnly:l,submitType:c="enter",prefixCls:u,styles:d={},classNames:f={},autoSize:p,triggerSend:h,placeholder:m,onFocus:w,onBlur:y,slotConfig:$,skill:x,...E}=b.useContext(bs),{direction:v,getPrefixCls:C}=vo(),I=`${C("sender",u)}`,N=Mu("sender"),A=`${I}-input`,k=b.useRef(null),R=b.useRef(new Map),O=b.useRef(!1),z=b.useRef(!1),D=b.useRef(null),M=b.useRef(null),L=b.useRef(null),_={...(Be=N.styles)==null?void 0:Be.input,...d.input},V=c5(_,p,k),P={...Za(E,{attr:!0,aria:!0,data:!0}),ref:k},[Y,{getSlotValues:K,setSlotValues:T,getNodeInfo:ne,mergeSlotConfig:F,getNodeTextValue:U,clear:re}]=m5($),[j,H]=b.useState(new Map),[ee,oe]=b.useState(null),{setEndCursor:B,setStartCursor:ie,setAllSelectCursor:ae,setCursorPosition:Se,setSlotFocus:ye,setAfterNodeFocus:q,getTextBeforeCursor:me,removeAllRanges:he,getRange:se,getInsertPosition:ue,getEndRange:pe,getStartRange:Ne,getSelection:Ee,copySelectionString:Ie,getCleanedText:W}=l5({prefixCls:I,getSlotDom:G=>R.current.get(G),slotConfigMap:Y,getNodeInfo:ne,getEditorValue:()=>Me()}),{buildSkillSpan:Q,buildEditSlotSpan:le,buildSlotSpan:be,buildSpaceSpan:$e,getSlotDom:ce,saveSlotDom:te,getSlotLastDom:ve}=u5({prefixCls:I,placeholder:m,slotDomMap:R,slotConfigMap:Y}),Re=G=>{const ge=Me();M.current&&(!(ge!=null&&ge.value)&&ge.slotConfig.length===0&&m?(M.current.setAttribute("contenteditable","true"),M.current.classList.add(`${I}-skill-empty`)):(M.current.setAttribute("contenteditable","false"),M.current.classList.remove(`${I}-skill-empty`))),n==null||n(ge.value,G,ge.slotConfig,ge.skill)},Ue=(G,ge,de)=>{const we=ce(G),Te=Y.get(G);if(T(ke=>({...ke,[G]:ge})),we&&Te){const ke=Pe(Te,we);H(Fe=>{const De=new Map(Fe);return De.set(G,ke),De}),Re(de)}},Pe=(G,ge)=>{if(!G.key)return null;const de=K()[G.key],we=()=>{var Te,ke,Fe,De,ft,Pt,ht,Ct,mt;switch(G.type){case"content":return ge.innerHTML=de||"",ge.setAttribute("data-placeholder",((Te=G.props)==null?void 0:Te.placeholder)||""),null;case"input":return b.createElement(Vr,{readOnly:l,className:`${I}-slot-input`,placeholder:((ke=G.props)==null?void 0:ke.placeholder)||"","data-slot-input":G.key,size:"small",variant:"borderless",value:de||"",tabIndex:0,onKeyDown:Rt,onChange:Lt=>{Ue(G.key,Lt.target.value,Lt)},spellCheck:!1});case"select":return b.createElement(Qx,{disabled:l,menu:{items:(De=(Fe=G.props)==null?void 0:Fe.options)==null?void 0:De.map(Lt=>({label:Lt,key:Lt})),defaultSelectedKeys:(ft=G.props)!=null&&ft.defaultValue?[G.props.defaultValue]:[],selectable:!0,onSelect:({key:Lt,domEvent:Le})=>{Ue(G.key,Lt,Le)}},trigger:["click"]},b.createElement("span",{className:Z(`${I}-slot-select`,{placeholder:!de,[`${I}-slot-select-selector-value`]:de})},b.createElement("span",{"data-placeholder":(Pt=G.props)==null?void 0:Pt.placeholder,className:`${I}-slot-select-value`},de||""),b.createElement("span",{className:`${I}-slot-select-arrow`},b.createElement(a0,null))));case"tag":return b.createElement("span",{className:`${I}-slot-tag`},((ht=G.props)==null?void 0:ht.label)||((Ct=G.props)==null?void 0:Ct.value)||"");case"custom":return(mt=G.customRender)==null?void 0:mt.call(G,de,Lt=>{Ue(G.key,Lt)},{disabled:s,readOnly:l},G);default:return null}};return po.createPortal(we(),ge)},ze=G=>G.reduce((ge,de)=>{if(de.type==="text")return ge.push(document.createTextNode(de.value||"")),ge;const we=de.key;if(tn(!!we,"Sender",`Slot key is missing: ${we}`),we){let Te,ke;if(de.type==="content"){ke=le(de);const Fe=$e(we,"before"),De=$e(we,"after");Te=[Fe,ke,De],te(`${we}_before`,Fe),te(we,ke),te(`${we}_after`,De)}else ke=be(we),Te=[ke],te(we,ke);if(ke){const Fe=Pe(de,ke);Fe&&(H(De=>{const ft=new Map(De);return ft.set(we,Fe),ft}),ge.push(...Te))}}return ge},[]),Me=()=>{const G=k.current,ge={value:"",slotConfig:[],skill:void 0};if(!G)return ge;const de=G.childNodes;if(de.length===0)return G.innerHTML="",M.current=null,ge;const we=!!x,Te=new Array(de.length),ke=[];let Fe,De=0;for(let Pt=0;Pt<de.length;Pt++){const ht=de[Pt],Ct=U(ht);if(Te[De++]=Ct,ht.nodeType===Node.TEXT_NODE)Ct&&ke.push({type:"text",value:Ct});else if(ht.nodeType===Node.ELEMENT_NODE){const Lt=ne(ht);if(Lt){const{skillKey:Le,slotKey:Tt,nodeType:Nt}=Lt;if(Le&&we&&(Fe=x),Tt&&Nt!=="nbsp"){const Vn=Y.get(Tt);Vn&&ke.push({...Vn,value:Ct})}}}}const ft=Te.slice(0,De).join("");return Fe||(M.current=null),{value:ft,slotConfig:ke,skill:Fe}},it=()=>{var ge;const G=k.current;G&&(G.innerHTML="",M.current=null,L.current=null,D.current=null,he(),(ge=R==null?void 0:R.current)==null||ge.clear())},Ye=G=>{G.forEach(ge=>{var de;(de=k.current)==null||de.appendChild(ge)})},It=(G,ge)=>{const de=k.current;de&&(de.querySelectorAll(`[data-slot-key="${G}"]`).forEach(we=>{we.remove()}),R.current.delete(G),T(we=>{const{[G]:Te,...ke}=we;return ke}),H(we=>{const Te=new Map(we);return Te.delete(G),Te}),Re(ge))},wt=()=>{if(x&&L.current!==x){Ot(!1),L.current=x;const G=Q(x.value),ge=po.createPortal(b.createElement($0,$t({removeSkill:Ot},x,{prefixCls:I})),G);oe(ge);const de=document.createRange(),we=k.current;if(!we)return;de.setStart(we,0),de.insertNode(G),M.current=G,Re()}},Ot=(G=!0)=>{var de;!k.current||!M.current||((de=M.current)==null||de.remove(),M.current=null,L.current=null,G&&Re())},gt=G=>{c!=="enter"||!G||G.querySelectorAll("br").forEach(ge=>{ge.remove()})},_t=()=>{$&&$.length>0&&k.current&&(it(),Ye(ze($)))},jt=G=>{const ge=o==null?void 0:o(G);return z.current||O.current||ge===!1},_e=(G,ge)=>{var Fe,De,ft;if(!k.current)return!1;const{range:de,selection:we}=se();if(!we||we.rangeCount===0)return!1;const{focusOffset:Te,anchorNode:ke}=we;if(!ke||!k.current.contains(ke))return!1;if(ke.nodeType===Node.TEXT_NODE&&de){const Pt=ke.parentNode,ht=ne(Pt),Ct=de.toString(),mt=((Fe=ke.textContent)==null?void 0:Fe.length)===Ct.length,Lt=((De=ke.textContent)==null?void 0:De.length)===1&&Te===1;if(((ft=ht==null?void 0:ht.slotConfig)==null?void 0:ft.type)==="content"&&(mt||Lt))return G.preventDefault(),ge==="cut"&&Ie(),ke.parentNode.innerHTML="",!0}if(ge==="backspace"&&Te===0){const Pt=ke.previousSibling;if(Pt){const ht=ne(Pt);if(ht){const{slotKey:Ct,skillKey:mt}=ht;if(Ct)return G.preventDefault(),It(Ct,G),!0;if(mt)return G.preventDefault(),Ot(),!0}}}return!1},pt=G=>{const{key:ge,shiftKey:de,ctrlKey:we,altKey:Te,metaKey:ke}=G;if(ge!=="Enter")return!1;const Fe=we||Te||ke;return c==="enter"&&!de&&!Fe||c==="shiftEnter"&&de&&!Fe},Cn=()=>{if(!M.current||!k.current||M.current.getAttribute("contenteditable")==="false")return;const G=Ee();!(G!=null&&G.anchorNode)||!M.current.contains(G.anchorNode)||!k.current.contains(G.anchorNode)||(M.current.setAttribute("contenteditable","false"),M.current.classList.remove(`${I}-skill-empty`),Qe({cursor:"end"}))},jn=()=>{O.current=!0},Bn=()=>{O.current=!1,z.current=!1},Rt=G=>{if(!jt(G)&&!(G.key==="Backspace"&&_e(G,"backspace"))){if(pt(G)){G.preventDefault(),z.current=!0,h==null||h();return}if((G.key==="a"||G.key==="A")&&(G.ctrlKey||G.metaKey)&&!G.shiftKey&&!G.altKey){ae(k.current,M.current),G.preventDefault();return}Cn()}},Sn=G=>{w==null||w(G)},Ht=G=>{z.current&&(z.current=!1);const{range:ge}=se();D.current=ge;const de=setTimeout(()=>{D.current=null,clearTimeout(de)},200);y==null||y(G)},an=G=>{gt(k==null?void 0:k.current),Re(G)},Hn=G=>{_e(G,"cut")},fn=G=>{var we,Te;G.preventDefault();const ge=(we=G.clipboardData)==null?void 0:we.files,de=(Te=G.clipboardData)==null?void 0:Te.getData("text/plain");if(!de&&(ge!=null&&ge.length)&&a){a(ge);return}if(de){let ke=!1;const Fe=W(de);try{ke=document.execCommand("insertText",!1,Fe)}catch(De){tn(!1,"Sender",`insertText command failed: ${De}`)}ke||Dt([{type:"text",value:Fe}])}i==null||i(G)},pn=G=>{G.key==="Enter"&&(z.current=!1),r==null||r(G)},en=()=>{const G=k.current,ge=Ee();G&&(ge==null?void 0:ge.focusNode)===G&&ge.focusOffset===0&&Me().skill&&Se(G,k.current,1)},Dt=(G,ge,de,we)=>{const Te=k.current;if(Te)try{F(G);const ke=ze(G);if(ke.length===0)return;const Fe=at(ge,Te);if(!Fe.range||!Fe.selection)return;const{range:De,selection:ft}=Fe;de!=null&&de.length&&Vt(De,de,Te),De.deleteContents(),vt(ke,De,Fe),Oe(ke,De,ft,we)}catch(ke){tn(!1,"Sender",`Insert operation failed: ${ke}`)}},at=(G,ge)=>{const{type:de,slotKey:we,slotType:Te,range:ke,selection:Fe}=ue(G,k,D);if(!Fe)return{range:null,selection:null,type:de};let De=null;switch(de){case"end":De=pe(ge);break;case"start":De=Ne(ge);break;case"slot":De=se().range;break;case"box":De=ke||null,De&&M.current&&De.collapsed&&De.startOffset===0&&De.setStartAfter(M.current);break}return{range:De,selection:Fe,type:de,slotKey:we,slotType:Te}},Vt=(G,ge,de)=>{const{value:we,startContainer:Te,startOffset:ke}=me(de);we.length>=ge.length&&we.endsWith(ge)&&Te&&ke>=0&&(G.setStart(Te,ke-ge.length),G.setEnd(Te,ke),G.deleteContents())},vt=(G,ge,de)=>{const{type:we,slotKey:Te,slotType:ke}=de;let Fe=!0;G.forEach(De=>{if(Fe&&we==="slot"&&(ke!=="content"||De.nodeType!==Node.TEXT_NODE)&&Te){Fe=!1;const ft=ve(Te);ft&&ge.setStartAfter(ft)}ge.insertNode(De),ge.setStartAfter(De)})},Oe=(G,ge,de,we)=>{const Te=G[G.length-1];q(Te,k.current,ge,de,we),setTimeout(()=>{an(null)},0)},Qe=G=>{const ge={preventScroll:(G==null?void 0:G.preventScroll)??!1,cursor:(G==null?void 0:G.cursor)??"end",key:G==null?void 0:G.key};switch(ge.cursor){case"slot":ye(k,G==null?void 0:G.key,ge.preventScroll);break;case"start":ie(k.current,ge.preventScroll);break;case"all":ae(k.current,M.current,ge.preventScroll);break;case"end":B(k.current,ge.preventScroll);break}},st=()=>{var ge;const G=k.current;G&&(G.innerHTML="",L.current=null,M.current=null,re(),wt(),D.current=null,(ge=R==null?void 0:R.current)==null||ge.clear(),an(null))};return b.useEffect(()=>{_t(),x?wt():Re()},[$]),b.useEffect(()=>{wt()},[x]),b.useImperativeHandle(t,()=>({nativeElement:k.current,focus:Qe,blur:()=>{var G;return(G=k.current)==null?void 0:G.blur()},insert:Dt,clear:st,getValue:Me})),b.createElement(b.Fragment,null,b.createElement("div",$t({},P,{role:"textbox",tabIndex:0,style:{..._,...V},className:Z(A,`${A}-slot`,N.classNames.input,f.input,{[`${I}-rtl`]:v==="rtl"}),"data-placeholder":m,contentEditable:!l,suppressContentEditableWarning:!0,spellCheck:!1,onCut:Hn,onKeyDown:Rt,onKeyUp:pn,onPaste:fn,onCompositionStart:jn,onCompositionEnd:Bn,onFocus:Sn,onBlur:Ht,onSelect:en,onInput:an},E)),b.createElement("div",{style:{display:"none"},id:`${I}-slot-placeholders`},Array.from(j.values()),ee))});process.env.NODE_ENV!=="production"&&(k0.displayName="SlotTextArea");const I0=g.forwardRef((e,t)=>{const{speechRecording:n,disabled:r,onSpeechDisabled:o,prefixCls:i}=g.useContext(gs),a=e.disabled??r??o;let s=null;return n?s=g.createElement(UA,{className:`${i}-recording-icon`}):a?s=g.createElement(x0,null):s=g.createElement(y0,null),g.createElement(hs,$t({icon:s,variant:"text",color:"primary"},e,{action:"onSpeech",ref:t}))});var R0={};Object.defineProperty(R0,"__esModule",{value:!0});var g5=R0.default=h5;function h5(e,t){let n=e;for(let r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function b5(e,t,n){return g5(e,t)||n}const P0=b.forwardRef((e,t)=>{const{value:n,onChange:r,onKeyUp:o,onKeyDown:i,onPaste:a,onPasteFile:s,disabled:l,readOnly:c,submitType:u="enter",prefixCls:d,styles:f={},classNames:p={},autoSize:h,components:m,triggerSend:w,placeholder:y,onFocus:$,onBlur:x,...E}=b.useContext(bs),v=b.useRef(null),C=(V,X="cursor")=>{var ne,F;const P=(F=(ne=v.current)==null?void 0:ne.resizableTextArea)==null?void 0:F.textArea,Y=P.value;let K=Y.length,T=Y.length;X==="cursor"&&(K=P==null?void 0:P.selectionStart,T=P==null?void 0:P.selectionEnd),X==="start"&&(K=0,T=0),P.value=Y.substring(0,K)+V+Y.substring(T,Y.length),P.selectionStart=K+V.length,P.selectionEnd=K+V.length,P.focus(),r==null||r(P.value)},I=()=>{r==null||r("")},N=()=>({value:n||"",slotConfig:[]});b.useImperativeHandle(t,()=>{var V,X,P,Y;return{nativeElement:(X=(V=v.current)==null?void 0:V.resizableTextArea)==null?void 0:X.textArea,focus:(P=v.current)==null?void 0:P.focus,blur:(Y=v.current)==null?void 0:Y.blur,insert:C,clear:I,getValue:N}});const A=b.useRef(!1),k=()=>{A.current=!0},R=()=>{A.current=!1},O=V=>{const X=i==null?void 0:i(V),{key:P,shiftKey:Y,ctrlKey:K,altKey:T,metaKey:ne}=V;if(!(A.current||P!=="Enter"||X===!1)&&P==="Enter"){const F=K||T||ne;if(u==="enter"&&!Y&&!F||u==="shiftEnter"&&Y&&!F){V.preventDefault(),w==null||w();return}}},z=V=>{var Y,K;const X=(Y=V.clipboardData)==null?void 0:Y.files;!((K=V.clipboardData)==null?void 0:K.getData("text/plain"))&&(X!=null&&X.length)&&s&&(s(X),V.preventDefault()),a==null||a(V)},D=b5(m,["input"],Vr.TextArea),L={...Za(E,{attr:!0,aria:!0,data:!0}),ref:v},_=V=>{r==null||r(V.target.value,V)};return b.createElement(D,$t({},L,{disabled:l,style:f.input,className:Z(`${d}-input`,p.input),autoSize:h,value:n,onChange:_,onKeyUp:o,onCompositionStart:k,onCompositionEnd:R,onKeyDown:O,onPaste:z,variant:"borderless",readOnly:c,placeholder:y,onFocus:$,onBlur:x}))});process.env.NODE_ENV!=="production"&&(P0.displayName="TextArea");function x5(e,t){const n=Ge(e),[r,o,i]=b.useMemo(()=>typeof t=="object"?[t.recording,t.onRecordingChange,typeof t.recording=="boolean"]:[void 0,void 0,!1],[t]),[a,s]=b.useState(null);b.useEffect(()=>{if(!i&&"permissions"in navigator){let w=null;return navigator.permissions.query({name:"microphone"}).then(y=>{s(y.state),y.onchange=function(){s(this.state)},w=y}).catch(y=>{const $=y instanceof Error?y.message:String(y);tn(!1,"Sender",`Browser does not support querying microphone permission. ${$}`)}),()=>{w&&(w.onchange=null)}}},[i]);let l;!l&&typeof window<"u"&&(l=window.SpeechRecognition||window.webkitSpeechRecognition);const c=!!(i||l&&a!=="denied"),u=b.useRef(null),[d,f]=un(!1,r),p=b.useRef(!1),h=()=>{if(c&&!u.current){const w=new l;w.onstart=()=>{f(!0)},w.onend=()=>{f(!1)},w.onresult=y=>{var $,x,E;if(!p.current){const v=(E=(x=($=y.results)==null?void 0:$[0])==null?void 0:x[0])==null?void 0:E.transcript;n(v)}p.current=!1},u.current=w}},m=Ge(w=>{w&&!d||(p.current=w,i?o==null||o(!d):(h(),u.current&&(d?(u.current.stop(),o==null||o(!1)):(u.current.start(),o==null||o(!0)))))});return b.useEffect(()=>()=>{const w=u.current;if(w){w.onstart=null,w.onend=null,w.onresult=null;try{w.stop()}catch{}u.current=null}},[]),[c,m,d]}const T0=g.createContext({}),pm=()=>({height:0}),mm=e=>({height:e.scrollHeight});function y5(e){const{title:t,onOpenChange:n,open:r,children:o,className:i,style:a,classNames:s={},styles:l={},prefixCls:c,closable:u,forceRender:d}=e,{prefixCls:f}=g.useContext(T0),{direction:p,getPrefixCls:h}=vo(),m=h("sender",c||f),w=`${m}-header`,y=()=>{n==null||n(!r)};return g.createElement(vr,{motionEnter:!0,motionLeave:!0,motionName:`${w}-motion`,leavedClassName:`${w}-motion-hidden`,onEnterStart:pm,onEnterActive:mm,onLeaveStart:mm,onLeaveActive:pm,visible:r,forceRender:d},({className:$,style:x})=>g.createElement("div",{className:Z(m,w,$,i,{[`${w}-rtl`]:p==="rtl"}),style:{...x,...a}},(u!==!1||t)&&g.createElement("div",{className:Z(`${w}-header`,s.header),style:{...l.header}},g.createElement("div",{className:`${w}-title`},t),u!==!1&&g.createElement("div",{className:`${w}-close`},g.createElement(ar,{type:"text",icon:g.createElement(Xu,null),size:"small",onClick:y}))),o&&g.createElement("div",{className:Z(`${w}-content`,s.content),style:{...l.content}},o)))}const w5=e=>{const{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[`&${r}-rtl`]:{direction:"rtl"},[`${r}`]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorderInput,[`${r}-header`]:{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:"flex",borderRadius:{_skip_check_:!0,value:n(e.borderRadius).mul(2).equal()},borderEndStartRadius:0,borderEndEndRadius:0,[`${r}-title`]:{flex:"auto"}},[`${r}-content`]:{padding:e.padding}},[`${r}-motion`]:{transition:["height","border"].map(o=>`${o} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}}}}},v5=e=>{const{componentCls:t,antCls:n,calc:r}=e,o=`${t}-slot`,i=`${n}-input`,a=`${i}-borderless`,s=`${n}-dropdown-trigger`,l=`${t}-slot-input`,c=`${t}-slot-select`,u=`${t}-slot-tag`,d=`${t}-slot-content`,f=`${t}-skill`;return{[t]:{[`${t}-input-slot`]:{outline:"none",cursor:"text",whiteSpace:"pre-wrap",width:"100%",caretColor:e.colorPrimary,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:"attr(data-placeholder)",color:e.colorTextPlaceholder}},[`${o}:not(${d})`]:{display:"inline-block",verticalAlign:"middle",alignItems:"center",marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:"break-all",marginInline:e.marginXXS},[`${i}${l}`]:{height:"100%",background:e.colorBgSlot,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,fontSize:"inherit",lineHeight:"inherit",position:"relative",[`&${a}`]:{"&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)":{outline:"none"}},"&::placeholder":{color:e.colorTextSlotPlaceholder,fontSize:"inherit",lineHeight:"inherit"},[o]:{display:"inline-flex",margin:`0 ${xe(e.marginXXS)}`,verticalAlign:"bottom",alignItems:"center",marginBlock:xe(r(e.marginXXS).div(2).equal()),minHeight:e.controlHeightSM,wordBreak:"break-all"}},[c]:{fontSize:e.fontSize,lineHeight:e.lineHeight,paddingInline:e.paddingXXS,transition:`border-color ${e.motionDurationMid}`,position:"relative",display:"inline-flex",alignItems:"center",cursor:"pointer",background:e.colorBgSlot,height:"100%",boxSizing:"border-box",borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`${c}`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,padding:`0 ${xe(e.paddingXXS)}`,transition:`border-color ${e.motionDurationMid}`,position:"relative",display:"inline",cursor:"pointer",background:e.colorBgSlot,alignItems:"center",justifyContent:"center",borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`&${s}-open`]:{borderColor:e.colorBorderSlotHover}},[`${c}-value`]:{flex:1,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:"attr(data-placeholder)"}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:"inline-flex",alignItems:"center",justifyContent:"center"},[`${u}`]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${xe(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"relative",cursor:"default"}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:"inline-flex",alignItems:"center",justifyContent:"center"},[u]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${xe(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,height:"100%",boxSizing:"border-box",position:"relative",cursor:"default"},[d]:{height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),caretColor:e.colorPrimary,background:e.colorBgSlot,outline:"none",color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,boxSizing:"border-box",verticalAlign:"middle",fontSize:e.fontSize,marginBlock:1,lineHeight:e.lineHeight,display:"inline-block",position:"relative",cursor:"text","&:empty":{width:"fit-content","&::after":{display:"inline-block",height:"inherit",content:"attr(data-placeholder)",color:e.colorTextSlotPlaceholder}}},[`${o}-no-width`]:{userSelect:"none",width:"3px",display:"inline-block",lineHeight:"inherit"},[f]:{display:"inline-block",verticalAlign:"baseline",alignItems:"center",marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:"break-all",paddingInlineEnd:0,paddingInlineStart:0,marginInlineEnd:0,marginInlineStart:-1,[`&${f}-empty`]:{"&::after":{display:"inline-block",pointerEvents:"none",height:"inherit",content:"attr(data-placeholder)",color:e.colorTextPlaceholder}}},[`${f}-wrapper`]:{height:"100%",display:"inline-flex"},[`${f}-tag`]:{paddingInline:e.paddingXS,height:"100%",backgroundColor:e.colorBgSkill,borderRadius:e.borderRadius,color:e.colorPrimary,alignItems:"center",fontWeight:500,display:"inline-flex",cursor:"pointer",gap:e.marginXXS,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorBgSkillHover,[`${f}-tag-close:not(${f}-tag-close-disabled)`]:{color:e.colorPrimaryHover}},"&-close":{fontSize:e.fontSizeSM,display:"inline-flex",transition:`color ${e.motionDurationMid}`,color:e.colorPrimary},"&-close-disabled":{cursor:"not-allowed",color:e.colorTextDisabled}},[`${f}-holder`]:{width:e.marginXS,height:"100%"}}}},C5=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-switch`;return{[t]:{[`&${r}-rtl`]:{direction:"rtl"},[`&${r}`]:{display:"inline-block",[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchUncheckedHoverBg,borderColor:e.colorBorder,color:e.colorText},[`&${r}-checked`]:{[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchCheckedHoverBg,borderColor:e.colorPrimary,color:e.colorPrimaryText},[`${r}-content`]:{background:e.switchCheckedBg}}}}}},S5=e=>{const{antCls:t,componentCls:n,paddingSM:r,paddingXS:o,paddingXXS:i,lineWidth:a,calc:s}=e;return{[n]:{[`&${n}-main`]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,borderRadius:{_skip_check_:!0,value:s(e.borderRadius).mul(2).equal()},borderColor:e.colorBorderInput,borderWidth:a,borderStyle:"solid"},[`&${n}-disabled`]:{background:e.colorBgContainerDisabled,borderColor:"transparent"},[`&${n}-rtl`]:{direction:"rtl"},[`${n}-content`]:{display:"flex",gap:o,width:"100%",paddingBlock:r,paddingInlineStart:r,paddingInlineEnd:r,boxSizing:"border-box",alignItems:"flex-end"},[`${n}-prefix`]:{flex:"none"},[`${n}-input`]:{paddingInline:0,borderRadius:0,flex:"auto",alignSelf:"center",caretColor:e.colorPrimary,fontSize:e.fontSize,[`&${t}-input-borderless`]:{"&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)":{outline:"none"}}},[`${n}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${n}-actions-btn`]:{[`&-disabled:where(${t}-btn-variant-text)`]:{color:e.colorTextActionsDisabled,borderColor:"transparent"},[`&-disabled:not(${t}-btn-variant-text)`]:{background:e.colorBgActionsDisabled,color:e.colorTextLightSolid,borderColor:"transparent"},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:"top"},"&-recording-icon":{height:"1.2em",width:"1.2em",verticalAlign:"top"}},[`${n}-footer`]:{paddingInlineStart:r,paddingInlineEnd:r,paddingBlockEnd:r,paddingBlockStart:i,boxSizing:"border-box"}}}},E5=e=>{const{colorPrimary:t,colorFillTertiary:n}=e,r=new Ve(t).setA(.06).toRgbString(),o=new Ve(t).setA(.08).toRgbString(),i=new Ve(t).setA(.15).toRgbString(),a=t,s=new Ve(t).setA(.25).toRgbString(),l=new Ve(t).setA(.1).toRgbString(),c=r,u=new Ve(t).setA(.08).toRgbString(),d=new Ve(n).setA(.04).toRgbString(),f=new Ve(t).setA(.1).toRgbString(),p=new Ve(n).setA(.1).toRgbString(),h=`0 4px 12px 0 ${new Ve(t).setA(.1).toRgbString()}`,m=new Ve(t).setA(.45).toRgbString();return{colorBgSlot:r,colorBgSkill:o,colorBgSkillHover:i,colorTextSlot:a,colorTextSlotPlaceholder:s,colorBorderSlotHover:l,colorBorderSlot:c,switchCheckedBg:u,switchCheckedHoverBg:f,switchUncheckedHoverBg:d,colorBorderInput:p,boxShadowInput:h,colorBgActionsDisabled:m,colorTextActionsDisabled:m}},N0=r5("Sender",e=>{const{paddingXS:t,calc:n}=e,r=yt(e,{SenderContentMaxWidth:`calc(100% - ${xe(n(t).add(32).equal())})`});return[S5(r),w5(r),C5(r),v5(r)]},E5),ta={SendButton:E0,ClearButton:i5,LoadingButton:S0,SpeechButton:I0},$5=b.forwardRef((e,t)=>{const{prefixCls:n,styles:r={},classNames:o={},className:i,rootClassName:a,style:s,defaultValue:l,value:c,slotConfig:u,readOnly:d,submitType:f="enter",onSubmit:p,loading:h,components:m,onCancel:w,onChange:y,suffix:$,onKeyUp:x,onKeyDown:E,disabled:v,allowSpeech:C,prefix:I,footer:N,header:A,onPaste:k,onPasteFile:R,autoSize:O={maxRows:8},placeholder:z,onFocus:D,onBlur:M,skill:L,..._}=e,V=Za(_,{attr:!0,aria:!0,data:!0}),X=b.useId(),P=Array.isArray(u)||(L==null?void 0:L.value),{direction:Y,getPrefixCls:K}=vo(),T=K("sender",n),ne=b.useRef(null),F=b.useRef(null);gh(t,()=>{var ce;return{nativeElement:ne.current,inputElement:(ce=F.current)==null?void 0:ce.nativeElement,focus:te=>{var ve;return(ve=F.current)==null?void 0:ve.focus(te)},blur:()=>{var te;return(te=F.current)==null?void 0:te.blur()},insert:(...te)=>{var ve,Re;return(Re=(ve=F.current)==null?void 0:ve.insert)==null?void 0:Re.call(ve,...te)},clear:()=>{var te;return(te=F.current)==null?void 0:te.clear()},getValue:()=>{var te;return((te=F.current)==null?void 0:te.getValue())??{value:"",slotConfig:[],skill:void 0}}}});const U=Mu("sender"),re=`${T}-input`,[j,H]=N0(T),ee=Z(T,U.className,i,a,U.classNames.root,o.root,j,H,`${T}-main`,{[`${T}-rtl`]:Y==="rtl",[`${T}-disabled`]:v}),oe=`${T}-actions-btn`,B=`${T}-actions-list`,[ie,ae]=un(l||"",c),Se=(ce,te,ve,Re)=>{ae(ce),y==null||y(ce,te,ve??[],Re)},[ye,q,me]=x5(ce=>{var te,ve;P?(ve=(te=F.current)==null?void 0:te.insert)==null||ve.call(te,[{type:"text",value:ce}]):Se(`${ie} ${ce}`)},C),he=()=>{if(F!=null&&F.current&&p&&!h&&!W){const ce=F.current.getValue();p(ce.value,ce.slotConfig,ce.skill)}},se=()=>{var ce,te;Se(""),P&&((te=(ce=F.current)==null?void 0:ce.clear)==null||te.call(ce))},ue=b.createElement(t0,{className:`${B}-presets`},C&&b.createElement(I0,null),h?b.createElement(S0,null):b.createElement(E0,null));let pe=ue;typeof $=="function"?pe=$(ue,{components:ta}):($||$===!1)&&(pe=$);const Ne=typeof I=="function"?I(ue,{components:ta}):I||null,Ee=typeof A=="function"?A(ue,{components:ta}):A||null,Ie=typeof N=="function"?N(ue,{components:ta}):N||null,[W,Q]=b.useState(!ie),le={prefixCls:oe,onSend:he,onSendDisabled:!ie,onClear:se,onClearDisabled:!ie,onCancel:w,onCancelDisabled:!h,onSpeech:()=>q(!1),onSpeechDisabled:!ye,speechRecording:me,disabled:v,setSubmitDisabled:Q},be=b.useMemo(()=>({value:ie,onChange:Se,slotConfig:u,onKeyUp:x,onKeyDown:E,onPaste:k,onPasteFile:R,disabled:v,readOnly:d,submitType:f,prefixCls:T,styles:r,classNames:o,autoSize:O,components:m,triggerSend:he,placeholder:z,onFocus:D,onBlur:M,skill:L,..._}),[ie,Se,u,x,E,k,R,v,d,f,T,r,o,O,m,he,z,D,M,L,_]),$e=ce=>{var te,ve,Re;!P&&ce.target!==((te=ne.current)==null?void 0:te.querySelector(`.${re}`))&&ce.preventDefault(),ce.target===((ve=ne.current)==null?void 0:ve.querySelector(`.${re}`))&&((Re=F.current)==null||Re.focus())};return b.createElement("div",$t({key:X,ref:ne,className:ee,style:{...U.style,...s,...U.styles.root,...r.root}},V),b.createElement(bs.Provider,{value:be},b.createElement(gs.Provider,{value:le},Ee&&b.createElement(T0.Provider,{value:{prefixCls:T}},Ee),b.createElement("div",{className:Z(`${T}-content`,o.content),style:r.content,onMouseDown:$e},Ne&&b.createElement("div",{className:Z(`${T}-prefix`,U.classNames.prefix,o.prefix),style:{...U.styles.prefix,...r.prefix}},Ne),P?b.createElement(k0,{ref:F}):b.createElement(P0,{ref:F}),pe&&b.createElement("div",{className:Z(B,U.classNames.suffix,o.suffix),style:{...U.styles.suffix,...r.suffix}},pe)),Ie&&b.createElement("div",{className:Z(`${T}-footer`,U.classNames.footer,o.footer),style:{...U.styles.footer,...r.footer}},Ie))))}),M0=$5;process.env.NODE_ENV!=="production"&&(M0.displayName="Sender");const k5=g.forwardRef((e,t)=>{const{children:n,className:r,classNames:o={},styles:i={},icon:a,style:s,onChange:l,rootClassName:c,loading:u,defaultValue:d,value:f,checkedChildren:p,unCheckedChildren:h,disabled:m,prefixCls:w,...y}=e,{styles:$={},classNames:x={},prefixCls:E}=g.useContext(bs),v=Za(y,{attr:!0,aria:!0,data:!0}),C=g.useId(),{direction:I,getPrefixCls:N}=vo(),A=N("sender",w||E),k=`${A}-switch`,[R,O]=N0(A),z=g.useRef(null);gh(t,()=>({nativeElement:z.current}));const[D,M]=un(d,f),L=Mu("sender"),_=Z(A,k,r,c,L.classNames.switch,x.switch,o.root,R,O,{[`${k}-checked`]:D,[`${k}-rtl`]:I==="rtl"});return g.createElement("div",$t({ref:z,className:_,key:C,style:{...s,...L.styles.switch,...$.switch,...i.root}},v),g.createElement(ar,{disabled:m,loading:u,className:Z(`${k}-content`,o.content),style:i.content,styles:{icon:i.icon,content:i.title},classNames:{icon:o.icon,content:o.title},variant:"outlined",color:D?"primary":"default",icon:a,onClick:()=>{const V=!D;M(V),l==null||l(V)}},D?p:h,n))}),hd=M0;hd.Header=y5;hd.Switch=k5;function A0({size:e=12}){return S.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:S.jsx("path",{d:"M12 2.5l1.8 5.2a3 3 0 0 0 1.9 1.9l5.2 1.8-5.2 1.8a3 3 0 0 0-1.9 1.9L12 20.3l-1.8-5.2a3 3 0 0 0-1.9-1.9L3.1 11.4l5.2-1.8a3 3 0 0 0 1.9-1.9z"})})}function I5({items:e,activeIndex:t,onSelect:n}){const r=b.useRef(null);return b.useEffect(()=>{var i;const o=(i=r.current)==null?void 0:i.children[t];o==null||o.scrollIntoView({block:"nearest"})},[t]),S.jsxs("div",{className:"sa-slash-menu",children:[S.jsxs("div",{className:"sa-slash-menu-header",children:["技能 (",e.length,")"]}),S.jsx("div",{className:"sa-slash-menu-body",ref:r,children:e.length===0?S.jsx("div",{className:"sa-slash-menu-empty",children:"没有匹配的技能"}):e.map((o,i)=>{const a=o.displayName||o.name,s=o.owner==="member"&&o.memberName?o.memberName:null,l=!o.selectable;return S.jsxs("div",{className:"sa-slash-menu-item"+(i===t?" sa-slash-menu-item--active":"")+(l?" sa-slash-menu-item--disabled":""),"aria-disabled":l||void 0,title:l?o.disabledReason??void 0:void 0,onMouseDown:c=>{c.preventDefault(),!l&&n(o)},children:[S.jsx("span",{className:"sa-slash-menu-item-icon",children:S.jsx(A0,{size:13})}),S.jsx("span",{className:"sa-slash-menu-item-name",children:a}),s&&S.jsx("span",{className:"sa-slash-menu-item-owner",children:s}),l&&o.disabledReason?S.jsx("span",{className:"sa-slash-menu-item-desc",children:o.disabledReason}):o.description&&S.jsx("span",{className:"sa-slash-menu-item-desc",children:o.description})]},o.code)})})]})}function R5({sdk:e,input:t,onSelect:n}){const[r,o]=b.useState([]),[i,a]=b.useState(!1),[s,l]=b.useState(0),c=b.useRef(!1);b.useEffect(()=>{c.current||(c.current=!0,e.listSkills().then(o).catch(()=>o([])))},[e]);const u=/^\/\S*$/.test(t);b.useEffect(()=>{a(u)},[u]);const d=t.startsWith("/")?t.slice(1).toLowerCase():"",f=b.useMemo(()=>r.filter(v=>!d||v.code.toLowerCase().includes(d)||v.name.toLowerCase().includes(d)||v.displayName&&v.displayName.toLowerCase().includes(d)),[r,d]),p=b.useMemo(()=>f.reduce((v,C,I)=>C.selectable?[...v,I]:v,[]),[f]);b.useEffect(()=>{u&&l(p[0]??0)},[t,u,p]);const h=b.useRef(i),m=b.useRef(f),w=b.useRef(p),y=b.useRef(s),$=b.useRef(n);h.current=i,m.current=f,w.current=p,y.current=s,$.current=n;const x=b.useCallback(v=>{if(!h.current)return!1;const C=w.current;if(C.length===0)return!1;const I=N=>{const A=C.indexOf(y.current),k=A===-1?C[0]:C[(A+N+C.length)%C.length];l(k)};switch(v.key){case"ArrowDown":return v.preventDefault(),I(1),!0;case"ArrowUp":return v.preventDefault(),I(-1),!0;case"Enter":case"Tab":{const N=m.current[y.current];return!N||!N.selectable?!1:(v.preventDefault(),$.current(N),a(!1),!0)}case"Escape":return v.preventDefault(),a(!1),!0;default:return!1}},[]),E=b.useCallback(()=>a(!1),[]);return{isOpen:i,items:f,activeIndex:s,handleKeyDown:x,close:E}}const P5=10,T5="sa-sender",N5=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);function M5({size:e=16}){return S.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"})})}function bd(){const{status:e,sendMessage:t,stop:n,sdk:r,attachmentUploader:o,nosUpload:i,activeConversationId:a}=Fn(),[s,l]=b.useState(""),[c,u]=b.useState(null),[d,f]=b.useState([]),p=b.useRef(null),h=b.useRef(null);b.useEffect(()=>{var L,_;if(!a||e!=="ready")return;const M=zn.popPendingChat();M&&M.sessionId===a&&M.message.trim()&&(l(M.message),(L=p.current)==null||L.insert(M.message,"end"),(_=p.current)==null||_.focus())},[a,e]);const m=!!o||!!i,w=e==="streaming"||e==="submitted",y=d.filter(M=>M.attachment),$=d.some(M=>!M.attachment&&M.status==="uploading"),x=!!s.trim()||!!c||d.length>0||w,E=!w&&!$&&(s.trim().length>0||!!c||y.length>0),v=b.useMemo(()=>c?{title:S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"sa-skill-inline-icon",children:S.jsx(A0,{})}),c.displayName||c.name]}),value:c.code,closable:!0,...c.owner==="member"&&c.memberName?{toolTip:{title:`${c.displayName||c.name}(成员 ${c.memberName} 的技能)`}}:{}}:void 0,[c]),C=b.useCallback((M,L,_,V)=>{l(M),V||u(X=>X&&null)},[]),I=b.useCallback(M=>{u(M),setTimeout(()=>{var L;return(L=p.current)==null?void 0:L.focus()},0)},[]),N=R5({sdk:r,input:s,onSelect:I}),A=b.useCallback(M=>{const L=Array.from(M.target.files??[]);if(M.target.value="",!m||L.length===0)return;const _=P5-d.length,V=L.slice(0,Math.max(0,_));if(V.length===0)return;const X=V.map(P=>({key:`${P.name}_${P.size}_${Date.now()}_${Math.random().toString(36).slice(2,6)}`,file:P,status:"uploading"}));f(P=>[...P,...X]);for(const{key:P,file:Y}of X)(o||zn.createNosUploader({baseURL:i.baseURL,headers:i.headers,trunkSize:i.trunkSize,onProgress:T=>f(ne=>ne.map(F=>F.key===P?{...F,percent:T}:F))}))(Y).then(T=>{f(ne=>ne.map(F=>F.key===P?{...F,attachment:{...T,filename:T.filename||Y.name,size:T.size??Y.size,mime:T.mime??Y.type}}:F))}).catch(T=>{f(ne=>ne.map(F=>F.key===P?{...F,status:"error",errorMsg:T instanceof Error?T.message:String(T)}:F))})},[o,i,d]),k=b.useCallback(M=>{f(L=>L.filter(_=>_.key!==M))},[]),R=b.useCallback(()=>{var X;if(!E)return;const M=s.trim(),L=y.map(P=>P.attachment),_=c?`/${c.code}${M?` ${M}`:""}`:M,V=c?`${c.displayName||c.name}${M?` ${M}`:""}`:void 0;t(_,L.length>0?L:void 0,V),(X=p.current)==null||X.clear(),l(""),u(null),f([])},[E,s,c,y,t]),O=b.useCallback(M=>{if(N.handleKeyDown(M))return!1;if(M.key==="Enter")return(M.metaKey||M.ctrlKey)&&(M.preventDefault(),R()),!1},[R,N.handleKeyDown]),z=b.useCallback(()=>{var M;w||(M=p.current)==null||M.focus()},[w]),D=S.jsxs("div",{className:"flex items-center justify-end gap-2",children:[m&&!w&&S.jsx("button",{type:"button",className:"sa-attach-btn mr-auto","aria-label":"添加附件",title:"添加附件",onClick:()=>{var M;return(M=h.current)==null?void 0:M.click()},children:S.jsx(M5,{size:15})}),S.jsx("input",{ref:h,type:"file",multiple:!0,className:"hidden",onChange:A,"aria-label":"选择附件"}),!w&&S.jsxs("span",{className:"sa-send-hint","aria-hidden":"true",children:[S.jsx("kbd",{className:"sa-send-kbd",children:N5?"⌘":"Ctrl"}),S.jsx("span",{children:"+"}),S.jsx("kbd",{className:"sa-send-kbd",children:"Enter"}),S.jsx("span",{children:"发送"})]}),w?S.jsx("button",{type:"button",className:"sa-send-btn sa-send-btn-active","aria-label":"停止生成",title:"停止生成",onClick:n,children:S.jsx("span",{className:"sa-stop-icon"})}):S.jsx("button",{type:"button",className:`sa-send-btn ${E?"sa-send-btn-active":""}`,"aria-label":"发送",title:"发送",onClick:R,disabled:!E,children:S.jsx("img",{src:Gt.sendSolid,alt:"发送",width:14,height:14,draggable:!1})})]});return S.jsxs("div",{className:"relative z-[2] shrink-0 px-[15px] pb-2.5",children:[N.isOpen&&S.jsx(I5,{items:N.items,activeIndex:N.activeIndex,onSelect:I}),d.length>0&&S.jsx("div",{className:"sa-attachment-tray mb-1.5",onClick:M=>M.stopPropagation(),children:d.map(M=>S.jsxs("span",{className:`sa-attachment-tray-chip ${M.status==="error"?"sa-attachment-tray-chip-error":""}`,title:M.status==="error"?`上传失败:${M.errorMsg??""}`:M.file.name,children:[S.jsx(Ze,{name:"file-text",size:13,color:M.status==="error"?"#ef4444":"#6366f1"}),S.jsx("span",{className:"sa-attachment-tray-chip-name",children:M.file.name}),S.jsx("span",{className:"sa-attachment-tray-chip-size",children:M.attachment?jg(M.file.size):M.status==="error"?"失败":M.percent!=null?`${Math.min(99,Math.round(M.percent))}%`:"上传中…"}),S.jsx("button",{type:"button",className:"sa-attachment-tray-chip-remove","aria-label":`移除附件 ${M.file.name}`,onClick:()=>k(M.key),children:"✕"})]},M.key))}),S.jsx("div",{className:"sa-composer-shell",onClick:z,children:S.jsx(b.Fragment,{children:S.jsx(hd,{ref:p,prefixCls:T5,rootClassName:`sa-input-form ${x?"sa-input-form-active":""} ${w?"sa-input-form-streaming":""}`,skill:v,onChange:C,onKeyDown:O,disabled:w,autoSize:{minRows:1,maxRows:5},placeholder:w?"回答生成中,请稍候…":c?"补充你的需求…":"发消息或创建任务... /使用技能",suffix:D})})}),S.jsx("div",{className:"mt-3 text-center text-[11px] leading-none text-[#B8B8B8]",children:"所有内容均由AI生成仅供参考"})]})}const A5=.3,z5=.7,O5=.5;function D5({artifact:e}){const[t,n]=b.useState(null),[r,o]=b.useState(null),[i,a]=b.useState(!0),[s,l]=b.useState(null);return b.useEffect(()=>{let c=!1;a(!0),l(null),n(null),o(null);async function u(){try{if(e.type==="pdf"){c||a(!1);return}if(e.type==="md"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.text();c||(o(f),a(!1));return}if(e.type==="html"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.text(),p=(await Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs"))).default;c||(n(p.sanitize(f,{FORCE_BODY:!0,ADD_ATTR:["target"]})),a(!1));return}if(e.type==="docx"){const d=await fetch(e.url);if(!d.ok)throw new Error(`HTTP ${d.status}`);const f=await d.arrayBuffer(),h=await(await Promise.resolve().then(()=>require("./mammoth.browser-DrqsE041.cjs")).then(w=>w.mammoth_browser)).convertToHtml({arrayBuffer:f}),m=(await Promise.resolve().then(()=>require("./purify.es-Dsdnkgrg.cjs"))).default;c||(n(m.sanitize(h.value,{FORCE_BODY:!0,ADD_ATTR:["target"]})),a(!1));return}c||(a(!1),l(`不支持预览「${e.type}」类型`))}catch(d){c||(a(!1),l(d instanceof Error?d.message:"加载失败"))}}return u(),()=>{c=!0}},[e]),i?S.jsx("div",{className:"sa-drawer-preview-loading",children:"加载中"}):s?S.jsxs("div",{className:"sa-drawer-preview-error",children:[s,S.jsx("button",{className:"sa-drawer-btn-sm",onClick:()=>void pa(e),children:"下载查看"})]}):e.type==="pdf"?S.jsx("iframe",{src:e.url,title:e.filename,className:"sa-drawer-preview-iframe",sandbox:"allow-scripts"}):r!==null?S.jsx("div",{className:"sa-drawer-preview-html-scroll",children:S.jsx("div",{className:"sa-drawer-preview-html sa-text-part",children:S.jsx(bu,{remarkPlugins:[vu],children:r})})}):t!==null?S.jsx("div",{className:"sa-drawer-preview-html-scroll",children:S.jsx("div",{className:"sa-drawer-preview-html sa-text-part",dangerouslySetInnerHTML:{__html:t}})}):null}function L5({artifacts:e,initialArtifact:t,onClose:n}){const{previewLayoutMode:r,containerWidth:o,isDrawerFullscreen:i,setDrawerFullscreen:a}=Fn(),[s,l]=b.useState(t?{mode:"preview",artifact:t}:{mode:"list"}),[c,u]=b.useState(!1),d=b.useRef(null),[f,p]=b.useState(O5),h=b.useRef(null),m=i,w=!m&&r==="split",y=Math.round(o*f);b.useEffect(()=>{t&&(d.current&&(clearTimeout(d.current),d.current=null,u(!1)),l({mode:"preview",artifact:t}))},[t]);const $=b.useCallback(()=>{u(!0),d.current=setTimeout(()=>{d.current=null,n()},240)},[n]);b.useEffect(()=>()=>{var A;d.current&&clearTimeout(d.current),(A=h.current)==null||A.call(h)},[]);const x=b.useCallback(A=>{l({mode:"preview",artifact:A})},[]),E=b.useCallback(()=>{l({mode:"list"})},[]),v=b.useCallback(()=>a(!1),[a]);b.useEffect(()=>{const A=k=>{k.key==="Escape"&&(m?v():$())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[m,v,$]);const C=b.useCallback(A=>{if(!w)return;A.preventDefault();const k=A.clientX,R=y,O=D=>{const M=k-D.clientX,L=Math.max(o*A5,Math.min(o*z5,R+M));p(L/o)},z=()=>{document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",z),document.body.style.cursor="",document.body.style.userSelect="",h.current=null};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",O),document.addEventListener("mouseup",z),h.current=z},[w,y,o]),I=["sa-artifact-drawer",c?"sa-drawer-closing":"",m?"sa-drawer-fullscreen":"",!m&&r==="cover"?"sa-drawer-cover":""].filter(Boolean).join(" "),N=w?{width:y}:void 0;return o===0?null:S.jsxs("div",{className:I,style:N,onClick:m?A=>{A.target===A.currentTarget&&v()}:void 0,children:[S.jsx("div",{className:`sa-drawer-resize-handle ${w?"":"sa-drawer-handle-hidden"}`,onMouseDown:C}),S.jsxs("div",{className:"sa-drawer-shell",children:[S.jsxs("div",{className:"sa-artifact-drawer-header",children:[s.mode==="preview"?S.jsx("button",{className:"sa-drawer-btn",onClick:E,title:"返回列表","aria-label":"返回列表",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M15 18l-6-6 6-6"})})}):S.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{flexShrink:0},children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),S.jsx("span",{className:"sa-artifact-drawer-title",children:s.mode==="preview"?s.artifact.filename:"会话产物"}),S.jsx("div",{style:{flex:1}}),m&&S.jsx("button",{className:"sa-drawer-btn",onClick:v,title:"退出全屏","aria-label":"退出全屏",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 21h3a2 2 0 0 0 2-2v-3M16 21v-3a2 2 0 0 1 2-2h3"})})}),s.mode==="preview"&&S.jsxs(S.Fragment,{children:[S.jsx("button",{className:"sa-drawer-btn",onClick:()=>void pa(s.artifact),title:"下载","aria-label":"下载",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})}),!m&&S.jsx("button",{className:"sa-drawer-btn",onClick:()=>a(!0),title:"全屏","aria-label":"全屏",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})})})]}),S.jsx("button",{className:"sa-drawer-btn",onClick:$,title:"关闭","aria-label":"关闭",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),S.jsx("div",{className:"sa-artifact-drawer-body",children:s.mode==="list"?e.length===0?S.jsx("div",{className:"sa-drawer-empty",children:"暂无产物"}):S.jsx("ul",{className:"sa-drawer-file-list",role:"list",children:e.map((A,k)=>S.jsxs("li",{className:"sa-drawer-file-card",onClick:()=>x(A),onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),x(A))},tabIndex:0,role:"button","aria-label":`预览 ${A.filename}`,children:[S.jsx("div",{className:"sa-drawer-file-icon",children:S.jsx("span",{className:"sa-artifact-chip-type",children:vm(A.type)})}),S.jsxs("div",{className:"sa-drawer-file-info",children:[S.jsx("span",{className:"sa-drawer-file-name",children:A.filename}),S.jsx("span",{className:"sa-drawer-file-size",children:wm(A.size)})]}),S.jsx("button",{className:"sa-drawer-btn",title:"下载","aria-label":`下载 ${A.filename}`,onClick:R=>{R.stopPropagation(),pa(A)},children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:S.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})})})]},A.id||`artifact-${k}`))}):S.jsx("div",{className:"sa-drawer-view-enter",children:S.jsx(D5,{artifact:s.artifact})})})]})]})}function z0({page:e,onBack:t,centered:n}){b.useEffect(()=>{const o=i=>{i.key==="Escape"&&t()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[t]);const r=b.isValidElement(e.component)?b.cloneElement(e.component,{close:t}):b.createElement(e.component,{close:t});return S.jsx("div",{className:`sa-page-overlay ${n?"sa-page-overlay-centered":""}`,children:S.jsx("div",{className:"sa-page-overlay-body",children:r})})}const F5="mx-auto w-full max-w-[800px]";function O0({contentClassName:e,centered:t,composerClassName:n,thread:r,composer:o,artifactPreview:i}){const{activePanel:a,closePanel:s,messagesLoading:l,isArtifactDrawerOpen:c,allArtifacts:u,activePreviewArtifact:d,toggleArtifactDrawer:f,registerContentEl:p}=Fn();if(a)return S.jsx(z0,{page:a,onBack:s,centered:t});const h=t?F5:"";return S.jsxs(S.Fragment,{children:[S.jsxs("div",{ref:p,className:`relative ${e} ${h}`,children:[l?S.jsxs("div",{className:"sa-messages-loading",children:[S.jsx("span",{className:"sa-loading-spinner"}),"加载对话..."]}):r,i&&c&&S.jsx(L5,{artifacts:u,initialArtifact:d,onClose:f})]}),n?S.jsx("div",{className:`${n} ${h}`,children:o}):o]})}function _5({isOpen:e,onClose:t,title:n,slots:r,welcomeMessage:o,suggestedPrompts:i,avatar:a,artifactPreview:s,capabilities:l,quickLinks:c,logo:u,defaultWidth:d,defaultHeight:f,showTimestamp:p,collapse:h}){const{status:m,sendMessage:w,stop:y,toggleThreadList:$,setThreadListOpen:x,isThreadListOpen:E,toggleArtifactDrawer:v,isArtifactDrawerOpen:C,previewLayoutMode:I,isDrawerFullscreen:N,allArtifacts:A,activePanel:k,closePanel:R,messages:O,messagesLoading:z,conversations:D,activeConversationId:M,switchConversation:L,newConversation:_,deleteConversation:V,renameConversation:X,hasMore:P,loadMoreConversations:Y}=Fn(),{width:K,position:T,hasCustomPosition:ne,isMaximized:F,totalWidth:U,windowHeight:re,startWindowDrag:j,startResize:H,toggleMaximize:ee,reset:oe,setLockedHeight:B}=Y0({defaultWidth:d??Ut.DEFAULT_WIDTH,defaultHeight:f??Ut.DEFAULT_HEIGHT,sidebarWidth:0}),ie=b.useRef(null),ae=b.useRef(null),Se=!z&&O.length===0,ye=!z&&O.length>0,q=!!k;b.useEffect(()=>{e||(oe(),R())},[e,oe,R]),b.useEffect(()=>{x(F?ie.current??!0:ae.current??!1)},[F,x]),b.useEffect(()=>{ye||B(null)},[ye,B]);const me=Q0({enabled:e&&ye&&!F&&!q&&!(C&&I==="cover"),contentSelector:".sa-panel-content",defaultHeight:f??Ut.DEFAULT_HEIGHT,onHeightChange:B});if(!e)return null;const he=r.Header,se=r.Composer,ue=r.ThreadList,pe=()=>{const ve=!E;$(),F?ie.current=ve:ae.current=ve},Ne=200,Ee=E&&!F,Ie="var(--sa-radius, 16px)",W=Ee?`0px ${Ie} ${Ie} 0px`:`${Ie} ${Ie} ${Ie} ${Ie}`,Q=ne?T.x:window.innerWidth-U-20,le=Math.min(Ne,Math.max(0,Q-1)),be=ne?{width:`${U}px`,height:`${re}px`,left:`${T.x}px`,top:`${T.y}px`}:{width:`${U}px`,height:`${re}px`,right:"20px",bottom:"20px"},$e={title:n,onClose:t,onToggleThreadList:pe,isMaximized:F,onToggleMaximize:ee,showHome:ye||q,onHome:q?R:_,panelTitle:q?k==null?void 0:k.title:void 0,artifactCount:q||!s?0:A.length,onToggleArtifactDrawer:q||!s?void 0:v},ce={conversations:D,activeSessionId:M,onSwitch:L,onNew:_,onDelete:V,onRename:X,hasMore:P,onLoadMore:Y},te=S.jsxs("div",{className:`relative z-20 flex min-w-0 flex-col bg-white ${F?"flex-1":"h-full shrink-0"}`,style:F?void 0:{width:`${K}px`,borderRadius:W,overflow:"hidden"},children:[Se&&!q&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"sa-home-gradient pointer-events-none absolute inset-x-0 top-0 z-0 h-[238px] opacity-10"}),S.jsx("div",{className:"sa-home-gradient-fade pointer-events-none absolute inset-x-0 top-0 z-[1] h-[238px]"})]}),S.jsx("div",{className:`relative z-20 ${Se||F?"":"bg-white"} ${F?"cursor-default":"cursor-grab active:cursor-grabbing"}`,onMouseDown:F?void 0:j,children:he?S.jsx(he,{...$e}):S.jsx($m,{...$e})}),S.jsx(O0,{contentClassName:`sa-panel-content relative ${N?"z-[30]":"z-[2]"} ${Se?"sa-home-view":""}`,centered:F,composerClassName:"shrink-0",artifactPreview:s,thread:S.jsx(Cu,{slots:r,welcomeMessage:o,suggestedPrompts:i,avatar:a,artifactPreview:s,capabilities:l,quickLinks:c,logo:u,showTimestamp:p,collapse:h}),composer:se?S.jsx(se,{status:m,onSend:w,onStop:y}):S.jsx(bd,{})})]});return F?S.jsx("div",{className:"fixed inset-0 z-[var(--sa-z-index,9999)] flex animate-sa-fade-in flex-col justify-end bg-black/30",children:S.jsxs("div",{className:"flex h-[calc(100%_-_48px)] w-full animate-sa-slide-up-full flex-row overflow-hidden bg-[#F5F5F5] shadow-[0_-12px_48px_rgba(0,0,0,0.25)]",style:{borderRadius:"var(--sa-radius, 16px) var(--sa-radius, 16px) 0px 0px"},children:[E&&(ue?S.jsx(ue,{...ce}):S.jsx(pl,{width:220})),te]})}):S.jsxs("div",{ref:me,className:"fixed z-[var(--sa-z-index,9999)] flex animate-sa-window-in flex-row overflow-visible border border-[#DADADA] bg-white shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{...be,borderRadius:W},children:[S.jsx("div",{className:"sa-resize-handle absolute bottom-0 left-[-3px] top-0 z-20 w-[6px] cursor-col-resize",onMouseDown:ve=>H(ve)}),Ee&&(ue?S.jsx("div",{className:"absolute -top-px -bottom-px -left-px z-10 overflow-hidden border border-r-0 border-[#DADADA] bg-[#FAFAFA] shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{width:le,transform:`translateX(-${le}px)`,borderRadius:`${Ie} 0px 0px ${Ie}`},children:S.jsx(ue,{...ce})}):S.jsx("div",{className:"absolute -top-px -bottom-px -left-px z-10 overflow-hidden border border-r-0 border-[#DADADA] bg-[#FAFAFA] shadow-[0_12px_36px_rgba(0,0,0,0.18)]",style:{width:le,transform:`translateX(-${le}px)`,borderRadius:`${Ie} 0px 0px ${Ie}`},children:S.jsx(pl,{width:Ne})})),te]})}const gm=()=>{};function j5({conversations:e,activeSessionId:t,onSwitch:n,onNew:r,onDelete:o,onRename:i,isCollapsed:a,onToggleCollapse:s,hasMore:l,onLoadMore:c,conversationsLoading:u}){const[d,f]=b.useState(null),[p,h]=b.useState(null),[m,w]=b.useState(""),[y,$]=b.useState(null),x=b.useRef(null);b.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);const E=b.useCallback((k,R)=>{R.stopPropagation(),d===k?(o(k),f(null)):(f(k),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>f(null),3e3))},[d,o]),v=b.useCallback((k,R,O)=>{O.stopPropagation(),h(k),w(R??"")},[]),C=b.useCallback(k=>{m.trim()&&i(k,m.trim()),h(null)},[m,i]),I=b.useRef(null),N=b.useCallback(()=>{const k=I.current;!k||!l||!c||k.scrollHeight-k.scrollTop-k.clientHeight<50&&c()},[l,c]),A=b.useMemo(()=>km(e),[e]);return a?S.jsxs("div",{className:"flex w-12 shrink-0 flex-col items-center gap-1 border-r border-[#ECECEC] bg-[#FAFAFA] py-3",children:[S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"展开",onClick:s,children:S.jsx(Ze,{name:"panel-left",size:18})}),S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"新建对话",onClick:()=>{r(),s()},children:S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18})})]}):S.jsxs("div",{className:"relative flex w-[220px] shrink-0 flex-col border-r border-[#ECECEC] bg-[#FAFAFA] p-3",children:[S.jsxs("div",{className:"mb-4 flex shrink-0 items-center gap-1.5",children:[S.jsxs("button",{type:"button",className:"sa-new-chat flex h-8 flex-1 items-center justify-center gap-2 rounded-md text-[14px] font-medium transition-colors",onClick:r,children:[S.jsx("img",{src:Gt.messageCreate,alt:"",width:18,height:18}),S.jsx("span",{className:"sa-new-chat-text whitespace-nowrap",children:"新建对话"})]}),S.jsx("button",{type:"button",className:"sa-tip relative flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-[#666] transition-colors hover:bg-white","data-tooltip":"收起侧边栏",onClick:s,children:S.jsx(Ze,{name:"panel-left-close",size:16})})]}),S.jsxs("div",{ref:I,className:"flex-1 overflow-y-auto",onScroll:N,children:[u&&e.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"加载中..."}),!u&&e.length===0&&S.jsx("div",{className:"px-0.5 py-2 text-[12px] text-[#999]",children:"暂无记录"}),A.map(k=>S.jsxs("div",{className:"mb-1",children:[S.jsx("div",{className:"px-1 pb-1 pt-2 text-[11px] text-[#A0A0A0]",children:k.label}),k.items.map(R=>{const O=R.sessionId===t,z=d===R.sessionId;return S.jsx("div",{className:`group relative mb-0.5 flex h-8 w-full cursor-pointer items-center gap-1 rounded-md px-0.5 text-[13px] transition-colors ${O?"bg-[#E8F1FE]":"hover:bg-[#E8F1FE]"}`,onClick:()=>{p!==R.sessionId&&n(R.sessionId)},onMouseEnter:D=>{if(p===R.sessionId)return;const M=D.currentTarget.getBoundingClientRect();$({text:R.title||"新会话",x:M.right+8,y:M.top+M.height/2})},onMouseLeave:()=>$(null),children:p===R.sessionId?S.jsx("input",{className:"w-full rounded border border-[var(--sa-primary)] bg-white px-1.5 py-0.5 text-[12px] outline-none",value:m,onChange:D=>w(D.target.value),onBlur:()=>C(R.sessionId),onKeyDown:D=>{D.key==="Enter"&&C(R.sessionId),D.key==="Escape"&&h(null)},onClick:D=>D.stopPropagation(),autoFocus:!0}):S.jsxs(S.Fragment,{children:[S.jsx("img",{src:Gt.message,alt:"",width:16,height:16,className:"shrink-0 opacity-60"}),S.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-[#333]",children:R.title||"新会话"}),S.jsxs("span",{className:"hidden shrink-0 items-center gap-0.5 group-hover:flex",children:[S.jsx("button",{type:"button",className:"flex h-5 w-5 items-center justify-center rounded text-[#999] hover:bg-white/70 hover:text-[var(--sa-primary)]",onClick:D=>v(R.sessionId,R.title,D),title:"重命名",children:S.jsx(Ze,{name:"pen",size:12})}),S.jsx("button",{type:"button",className:`flex h-5 w-5 items-center justify-center rounded ${z?"bg-[#fee2e2] text-[#ef4444]":"text-[#999] hover:bg-white/70 hover:text-[#ef4444]"}`,onClick:D=>E(R.sessionId,D),title:z?"确认删除":"删除",children:S.jsx(Ze,{name:z?"x":"trash2",size:12})})]})]})},R.sessionId)})]},k.label)),l&&S.jsx("div",{className:"px-0.5 py-2 text-center text-[11px] text-[#C0C0C0]",children:"向下滚动加载更多"})]}),y&&S.jsx("div",{className:"pointer-events-none fixed z-[10001] whitespace-nowrap rounded border border-[#E8E8E8] bg-white px-2.5 py-1.5 text-[12px] leading-[1.4] text-[#333] shadow-[0_2px_8px_rgba(0,0,0,0.12)]",style:{left:y.x,top:y.y,transform:"translateY(-50%)"},children:y.text})]})}function D0({title:e,slots:t,welcomeMessage:n,suggestedPrompts:r,capabilities:o,quickLinks:i,logo:a,sidebarDefaultOpen:s=!0,onClose:l,avatar:c,artifactPreview:u,showTimestamp:d,collapse:f}){const{status:p,sendMessage:h,stop:m,conversations:w,activeConversationId:y,switchConversation:$,newConversation:x,deleteConversation:E,renameConversation:v,toggleArtifactDrawer:C,allArtifacts:I,activePanel:N,closePanel:A,hasMore:k,loadMoreConversations:R,conversationsLoading:O}=Fn(),[z,D]=b.useState(s),M=b.useCallback(()=>D(P=>!P),[]),L=!!N;b.useEffect(()=>()=>A(),[A]);const _=t.ThreadList,V=t.Composer,X=t.Header;return S.jsxs("div",{className:"sa-fullpage",children:[_?S.jsx("div",{className:`sa-fp-sidebar-wrapper ${z?"":"sa-fp-sidebar-wrapper-collapsed"}`,children:S.jsx(_,{conversations:w,activeSessionId:y,onSwitch:$,onNew:x,onDelete:E,onRename:v,hasMore:k,onLoadMore:R})}):S.jsx(j5,{conversations:w,activeSessionId:y,onSwitch:$,onNew:x,onDelete:E,onRename:v,isCollapsed:!z,onToggleCollapse:M,hasMore:k,onLoadMore:R,conversationsLoading:O}),S.jsxs("div",{className:"sa-fp-main",children:[X?S.jsx(X,{title:L?(N==null?void 0:N.title)??e:e,panelTitle:L?N==null?void 0:N.title:void 0,onClose:l??gm,onToggleThreadList:M,showHome:L,onHome:L?A:gm,artifactCount:L||!u?0:I.length,onToggleArtifactDrawer:L||!u?void 0:C}):S.jsxs("div",{className:"sa-fp-header",children:[S.jsx("div",{className:"sa-fp-header-title",children:L?(N==null?void 0:N.title)??e:e}),S.jsxs("div",{className:"sa-fp-header-actions",children:[L&&S.jsx("button",{className:"sa-fp-header-btn",onClick:A,title:"返回聊天","aria-label":"返回聊天",children:S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),S.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})}),!L&&u&&I.length>0&&S.jsxs("button",{className:"sa-fp-header-btn sa-header-btn-artifact",onClick:C,title:"会话产物",children:[S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"})]}),S.jsx("span",{children:"产物"})]})]})]}),S.jsx(O0,{contentClassName:"sa-fp-content-row",artifactPreview:u,thread:S.jsx(Cu,{slots:t,welcomeMessage:n,suggestedPrompts:r,capabilities:o,quickLinks:i,logo:a,avatar:c,artifactPreview:u,showTimestamp:d,collapse:f}),composer:V?S.jsx(V,{status:p,onSend:h,onStop:m}):S.jsx(bd,{})})]})]})}function L0(e){const{sdk:t,mode:n="floating",slots:r={},hooks:o={},welcomeMessage:i,suggestedPrompts:a,title:s="AI Assistant",initialOpen:l=!1,onOpenChange:c,sidebarDefaultOpen:u,avatar:d,artifactPreview:f,capabilities:p,quickLinks:h,logo:m,triggerLogo:w,theme:y,showTimestamp:$,attachmentUploader:x,nosUpload:E,collapse:v}=e,[C,I]=b.useState(l);b.useEffect(()=>{I(l)},[l]);const N=b.useCallback(()=>{var O,z;const R=!C;I(R),c==null||c(R),R?(O=o.onOpen)==null||O.call(o):(z=o.onClose)==null||z.call(o)},[C,o,c]),A=b.useCallback(()=>{var R;I(!1),c==null||c(!1),(R=o.onClose)==null||R.call(o)},[o,c]),k=r.Trigger??Em;return n==="fullpage"?C?S.jsx(fl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,mode:n,children:S.jsx(D0,{title:s,slots:r,welcomeMessage:i,suggestedPrompts:a,capabilities:p,quickLinks:h,logo:m,sidebarDefaultOpen:u,onClose:A,avatar:d,artifactPreview:f,showTimestamp:$,collapse:v})}):null:S.jsxs(fl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,mode:n,children:[S.jsx(k,{isOpen:C,onClick:N,triggerLogo:w}),S.jsx(_5,{isOpen:C,onClose:A,title:s,slots:r,welcomeMessage:i,suggestedPrompts:a,avatar:d,artifactPreview:f,capabilities:p,quickLinks:h,logo:m,defaultWidth:y==null?void 0:y.panelWidth,defaultHeight:y==null?void 0:y.panelHeight,showTimestamp:$,collapse:v})]})}const F0=`
|
|
313
313
|
[data-super-agent-widget] {
|
|
314
314
|
--sa-primary-dark: color-mix(in srgb, var(--sa-primary) 82%, #000);
|
|
315
315
|
--sa-primary-light: color-mix(in srgb, var(--sa-primary) 10%, #fff);
|
|
@@ -331,8 +331,6 @@ html body {
|
|
|
331
331
|
[data-super-agent-widget] *::before,
|
|
332
332
|
[data-super-agent-widget] *::after {
|
|
333
333
|
box-sizing: border-box;
|
|
334
|
-
margin: 0;
|
|
335
|
-
padding: 0;
|
|
336
334
|
}
|
|
337
335
|
|
|
338
336
|
/* 宿主可能未启用 Tailwind preflight(浏览器 UA 默认给 button 加灰边框/底色),
|
|
@@ -1142,6 +1140,13 @@ html body {
|
|
|
1142
1140
|
margin-bottom: 12px;
|
|
1143
1141
|
}
|
|
1144
1142
|
|
|
1143
|
+
/* Markdown 正文占满图标右侧剩余宽度,长词/表格可换行不溢出卡片;字号跟随卡片 */
|
|
1144
|
+
.sa-interrupt-markdown {
|
|
1145
|
+
flex: 1;
|
|
1146
|
+
min-width: 0;
|
|
1147
|
+
font-size: 12px;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1145
1150
|
.sa-interrupt-actions {
|
|
1146
1151
|
display: flex;
|
|
1147
1152
|
gap: 8px;
|
|
@@ -1660,5 +1665,5 @@ html body {
|
|
|
1660
1665
|
from { opacity: 0; transform: translateY(10px); }
|
|
1661
1666
|
to { opacity: 1; transform: translateY(0); }
|
|
1662
1667
|
}
|
|
1663
|
-
`,j5='[data-super-agent-widget] .pointer-events-none{pointer-events:none}[data-super-agent-widget] .visible{visibility:visible}[data-super-agent-widget] .collapse{visibility:collapse}[data-super-agent-widget] .fixed{position:fixed}[data-super-agent-widget] .absolute{position:absolute}[data-super-agent-widget] .relative{position:relative}[data-super-agent-widget] .inset-0{top:0;right:0;bottom:0;left:0}[data-super-agent-widget] .inset-x-0{left:0;right:0}[data-super-agent-widget] .-bottom-px{bottom:-1px}[data-super-agent-widget] .-left-px{left:-1px}[data-super-agent-widget] .-right-2{right:-.5rem}[data-super-agent-widget] .-top-1\\.5{top:-.375rem}[data-super-agent-widget] .-top-px{top:-1px}[data-super-agent-widget] .bottom-0{bottom:0}[data-super-agent-widget] .left-\\[-3px\\]{left:-3px}[data-super-agent-widget] .top-0{top:0}[data-super-agent-widget] .z-0{z-index:0}[data-super-agent-widget] .z-10{z-index:10}[data-super-agent-widget] .z-20{z-index:20}[data-super-agent-widget] .z-\\[10000\\]{z-index:10000}[data-super-agent-widget] .z-\\[10001\\]{z-index:10001}[data-super-agent-widget] .z-\\[1\\]{z-index:1}[data-super-agent-widget] .z-\\[2\\]{z-index:2}[data-super-agent-widget] .z-\\[30\\]{z-index:30}[data-super-agent-widget] .z-\\[5\\]{z-index:5}[data-super-agent-widget] .z-\\[var\\(--sa-z-index\\,9999\\)\\]{z-index:var(--sa-z-index,9999)}[data-super-agent-widget] .m-0{margin:0}[data-super-agent-widget] .mx-auto{margin-left:auto;margin-right:auto}[data-super-agent-widget] .mb-0\\.5{margin-bottom:.125rem}[data-super-agent-widget] .mb-1{margin-bottom:.25rem}[data-super-agent-widget] .mb-1\\.5{margin-bottom:.375rem}[data-super-agent-widget] .mb-3{margin-bottom:.75rem}[data-super-agent-widget] .mb-4{margin-bottom:1rem}[data-super-agent-widget] .ml-auto{margin-left:auto}[data-super-agent-widget] .mr-auto{margin-right:auto}[data-super-agent-widget] .mt-3{margin-top:.75rem}[data-super-agent-widget] .block{display:block}[data-super-agent-widget] .inline{display:inline}[data-super-agent-widget] .flex{display:flex}[data-super-agent-widget] .inline-flex{display:inline-flex}[data-super-agent-widget] .table{display:table}[data-super-agent-widget] .hidden{display:none}[data-super-agent-widget] .h-5{height:1.25rem}[data-super-agent-widget] .h-7{height:1.75rem}[data-super-agent-widget] .h-8{height:2rem}[data-super-agent-widget] .h-9{height:2.25rem}[data-super-agent-widget] .h-\\[13px\\]{height:13px}[data-super-agent-widget] .h-\\[18px\\]{height:18px}[data-super-agent-widget] .h-\\[238px\\]{height:238px}[data-super-agent-widget] .h-\\[calc\\(100\\%_-_48px\\)\\]{height:calc(100% - 48px)}[data-super-agent-widget] .h-full{height:100%}[data-super-agent-widget] .w-12{width:3rem}[data-super-agent-widget] .w-5{width:1.25rem}[data-super-agent-widget] .w-7{width:1.75rem}[data-super-agent-widget] .w-\\[18px\\]{width:18px}[data-super-agent-widget] .w-\\[220px\\]{width:220px}[data-super-agent-widget] .w-\\[6px\\]{width:6px}[data-super-agent-widget] .w-full{width:100%}[data-super-agent-widget] .w-px{width:1px}[data-super-agent-widget] .min-w-0{min-width:0px}[data-super-agent-widget] .min-w-\\[14px\\]{min-width:14px}[data-super-agent-widget] .max-w-16{max-width:4rem}[data-super-agent-widget] .max-w-\\[50\\%\\]{max-width:50%}[data-super-agent-widget] .max-w-\\[800px\\]{max-width:800px}[data-super-agent-widget] .max-w-full{max-width:100%}[data-super-agent-widget] .flex-1{flex:1 1 0%}[data-super-agent-widget] .flex-shrink{flex-shrink:1}[data-super-agent-widget] .shrink-0{flex-shrink:0}[data-super-agent-widget] .border-collapse{border-collapse:collapse}[data-super-agent-widget] .scale-50{--tw-scale-x: .5;--tw-scale-y: .5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .cursor-col-resize{cursor:col-resize}[data-super-agent-widget] .cursor-default{cursor:default}[data-super-agent-widget] .cursor-grab{cursor:grab}[data-super-agent-widget] .cursor-pointer{cursor:pointer}[data-super-agent-widget] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-super-agent-widget] .resize{resize:both}[data-super-agent-widget] .flex-row{flex-direction:row}[data-super-agent-widget] .flex-col{flex-direction:column}[data-super-agent-widget] .flex-wrap{flex-wrap:wrap}[data-super-agent-widget] .items-start{align-items:flex-start}[data-super-agent-widget] .items-center{align-items:center}[data-super-agent-widget] .justify-end{justify-content:flex-end}[data-super-agent-widget] .justify-center{justify-content:center}[data-super-agent-widget] .gap-0\\.5{gap:.125rem}[data-super-agent-widget] .gap-1{gap:.25rem}[data-super-agent-widget] .gap-1\\.5{gap:.375rem}[data-super-agent-widget] .gap-2{gap:.5rem}[data-super-agent-widget] .gap-2\\.5{gap:.625rem}[data-super-agent-widget] .gap-3{gap:.75rem}[data-super-agent-widget] .gap-4{gap:1rem}[data-super-agent-widget] .gap-8{gap:2rem}[data-super-agent-widget] .gap-\\[22px\\]{gap:22px}[data-super-agent-widget] .gap-\\[7px\\]{gap:7px}[data-super-agent-widget] .overflow-hidden{overflow:hidden}[data-super-agent-widget] .overflow-visible{overflow:visible}[data-super-agent-widget] .overflow-y-auto{overflow-y:auto}[data-super-agent-widget] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-super-agent-widget] .text-ellipsis{text-overflow:ellipsis}[data-super-agent-widget] .whitespace-nowrap{white-space:nowrap}[data-super-agent-widget] .rounded{border-radius:.25rem}[data-super-agent-widget] .rounded-full{border-radius:9999px}[data-super-agent-widget] .rounded-md{border-radius:.375rem}[data-super-agent-widget] .border{border-width:1px}[data-super-agent-widget] .border-r{border-right-width:1px}[data-super-agent-widget] .border-r-0{border-right-width:0px}[data-super-agent-widget] .border-none{border-style:none}[data-super-agent-widget] .border-\\[\\#DADADA\\]{--tw-border-opacity: 1;border-color:rgb(218 218 218 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[\\#E8E8E8\\]{--tw-border-opacity: 1;border-color:rgb(232 232 232 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[\\#ECECEC\\]{--tw-border-opacity: 1;border-color:rgb(236 236 236 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[var\\(--sa-primary\\)\\]{border-color:var(--sa-primary)}[data-super-agent-widget] .bg-\\[\\#DCDCDC\\]{--tw-bg-opacity: 1;background-color:rgb(220 220 220 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#E8F1FE\\]{--tw-bg-opacity: 1;background-color:rgb(232 241 254 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#F5F5F5\\]{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#FAFAFA\\]{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#fee2e2\\]{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[var\\(--sa-primary\\)\\]{background-color:var(--sa-primary)}[data-super-agent-widget] .bg-black\\/30{background-color:#0000004d}[data-super-agent-widget] .bg-transparent{background-color:transparent}[data-super-agent-widget] .bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .object-contain{-o-object-fit:contain;object-fit:contain}[data-super-agent-widget] .p-0{padding:0}[data-super-agent-widget] .p-3{padding:.75rem}[data-super-agent-widget] .px-0\\.5{padding-left:.125rem;padding-right:.125rem}[data-super-agent-widget] .px-1{padding-left:.25rem;padding-right:.25rem}[data-super-agent-widget] .px-1\\.5{padding-left:.375rem;padding-right:.375rem}[data-super-agent-widget] .px-2\\.5{padding-left:.625rem;padding-right:.625rem}[data-super-agent-widget] .px-3{padding-left:.75rem;padding-right:.75rem}[data-super-agent-widget] .px-\\[15px\\]{padding-left:15px;padding-right:15px}[data-super-agent-widget] .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}[data-super-agent-widget] .py-1{padding-top:.25rem;padding-bottom:.25rem}[data-super-agent-widget] .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}[data-super-agent-widget] .py-2{padding-top:.5rem;padding-bottom:.5rem}[data-super-agent-widget] .py-3{padding-top:.75rem;padding-bottom:.75rem}[data-super-agent-widget] .pb-1{padding-bottom:.25rem}[data-super-agent-widget] .pb-2\\.5{padding-bottom:.625rem}[data-super-agent-widget] .pt-2{padding-top:.5rem}[data-super-agent-widget] .text-left{text-align:left}[data-super-agent-widget] .text-center{text-align:center}[data-super-agent-widget] .text-\\[11px\\]{font-size:11px}[data-super-agent-widget] .text-\\[12px\\]{font-size:12px}[data-super-agent-widget] .text-\\[13px\\]{font-size:13px}[data-super-agent-widget] .text-\\[14px\\]{font-size:14px}[data-super-agent-widget] .text-\\[15px\\]{font-size:15px}[data-super-agent-widget] .text-\\[18px\\]{font-size:18px}[data-super-agent-widget] .text-\\[9px\\]{font-size:9px}[data-super-agent-widget] .font-bold{font-weight:700}[data-super-agent-widget] .font-medium{font-weight:500}[data-super-agent-widget] .font-semibold{font-weight:600}[data-super-agent-widget] .italic{font-style:italic}[data-super-agent-widget] .leading-\\[1\\.3\\]{line-height:1.3}[data-super-agent-widget] .leading-\\[1\\.4\\]{line-height:1.4}[data-super-agent-widget] .leading-\\[14px\\]{line-height:14px}[data-super-agent-widget] .leading-none{line-height:1}[data-super-agent-widget] .text-\\[\\#18181b\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#666\\]{--tw-text-opacity: 1;color:rgb(102 102 102 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#999\\]{--tw-text-opacity: 1;color:rgb(153 153 153 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#9A9A9A\\]{--tw-text-opacity: 1;color:rgb(154 154 154 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#A0A0A0\\]{--tw-text-opacity: 1;color:rgb(160 160 160 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#B8B8B8\\]{--tw-text-opacity: 1;color:rgb(184 184 184 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#C0C0C0\\]{--tw-text-opacity: 1;color:rgb(192 192 192 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#ef4444\\]{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .underline{text-decoration-line:underline}[data-super-agent-widget] .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[data-super-agent-widget] .opacity-0{opacity:0}[data-super-agent-widget] .opacity-10{opacity:.1}[data-super-agent-widget] .opacity-100{opacity:1}[data-super-agent-widget] .opacity-60{opacity:.6}[data-super-agent-widget] .opacity-70{opacity:.7}[data-super-agent-widget] .shadow-\\[0_-12px_48px_rgba\\(0\\,0\\,0\\,0\\.25\\)\\]{--tw-shadow: 0 -12px 48px rgba(0,0,0,.25);--tw-shadow-colored: 0 -12px 48px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .shadow-\\[0_12px_36px_rgba\\(0\\,0\\,0\\,0\\.18\\)\\]{--tw-shadow: 0 12px 36px rgba(0,0,0,.18);--tw-shadow-colored: 0 12px 36px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.12\\)\\]{--tw-shadow: 0 2px 8px rgba(0,0,0,.12);--tw-shadow-colored: 0 2px 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-super-agent-widget] .outline{outline-style:solid}[data-super-agent-widget] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-super-agent-widget] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-super-agent-widget] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .duration-200{transition-duration:.2s}[data-super-agent-widget] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-super-agent-widget] .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes sa-window-in{0%{opacity:0;transform:translateY(20px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes sa-slide-up-full{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes sa-home-fade-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes sa-chip-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes sa-logo-float{0%,to{transform:translateY(0)}50%{transform:translateY(-3px)}}@keyframes sa-title-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}@keyframes sa-history-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}[data-super-agent-widget] .animate-sa-window-in{animation:sa-window-in .3s cubic-bezier(.16,1,.3,1)}[data-super-agent-widget] .animate-sa-slide-up-full{animation:sa-slide-up-full .3s cubic-bezier(.16,1,.3,1)}[data-super-agent-widget] .animate-sa-fade-in{animation:sa-fade-in .2s ease}[data-super-agent-widget] .animate-sa-home-fade-in{animation:sa-home-fade-in .4s ease forwards}[data-super-agent-widget] .animate-sa-chip-in{animation:sa-chip-in .4s cubic-bezier(.22,1,.36,1) forwards}[data-super-agent-widget] .animate-sa-logo-float{animation:sa-logo-float 3s ease-in-out infinite}[data-super-agent-widget] .animate-sa-title-shimmer{animation:sa-title-shimmer 2.5s ease forwards}[data-super-agent-widget] .animate-sa-history-in{animation:sa-history-in .2s ease}[data-super-agent-widget] .sa-tip{position:relative}[data-super-agent-widget] .sa-tip:before,[data-super-agent-widget] .sa-tip:after{position:absolute;top:100%;left:50%;pointer-events:none;opacity:0;transition:opacity .15s ease;z-index:100}[data-super-agent-widget] .sa-tip:before{content:attr(data-tooltip);transform:translate(-50%);margin-top:6px;padding:4px 8px;background:#fff;color:#333;font-size:12px;line-height:1.4;white-space:nowrap;border-radius:4px;box-shadow:0 2px 8px #0000001f;border:1px solid #e8e8e8}[data-super-agent-widget] .sa-tip:after{content:"";transform:translate(-50%);margin-top:2px;border:4px solid transparent;border-bottom-color:#fff;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.06))}[data-super-agent-widget] .sa-tip:hover:before,[data-super-agent-widget] .sa-tip:hover:after{opacity:1}[data-super-agent-widget] .sa-chip{background:linear-gradient(#fff,#fff) padding-box,linear-gradient(#e0e0e0,#e0e0e0) border-box;border:1px solid transparent}[data-super-agent-widget] .sa-chip:hover{background:linear-gradient(#fff,#fff) padding-box,linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7) border-box}[data-super-agent-widget] .sa-chip:hover .sa-chip-text{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-shimmer-text{background:linear-gradient(90deg,#333,#333 35%,#00d4ff 40%,#1881f0,#2b52ee,#d116ea,#ff2e7e 56%,#333 61%,#333);background-size:300% 100%;background-position:100% 0;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-new-chat{background:linear-gradient(258deg,#ff2e7e1a -4%,#d116ea1a 16%,#2b52ee1a 53%,#1881f01a 81%,#00d4ff1a 106%)}[data-super-agent-widget] .sa-new-chat:hover{background:linear-gradient(258deg,#ff2e7e29 -4%,#d116ea29 16%,#2b52ee29 53%,#1881f029 81%,#00d4ff29 106%)}[data-super-agent-widget] .sa-new-chat .sa-new-chat-text{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-home-gradient{background:linear-gradient(239deg,#ff2e7e -3%,#d116ea 17%,#2b52ee 54%,#1881f0 82%,#00d4ff 107%)}[data-super-agent-widget] .sa-home-gradient-fade{background:linear-gradient(180deg,#fff0,#fff)}[data-super-agent-widget] .sa-home-view .sa-thread{background:transparent}[data-super-agent-widget] .sa-resize-handle:hover{background:color-mix(in srgb,var(--sa-primary) 30%,transparent)}[data-super-agent-widget] .sa-sender.sa-input-form{display:flex;flex-direction:column;gap:4px;width:100%;min-height:70px;padding:8px;border:1px solid transparent;border-radius:5px;box-shadow:none;background-color:#fff;background-image:linear-gradient(#fff,#fff),linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);background-origin:border-box;background-clip:padding-box,border-box;transition:background .15s ease}[data-super-agent-widget] .sa-sender.sa-input-form-active,[data-super-agent-widget] .sa-sender.sa-input-form:focus-within{background-image:linear-gradient(#fff,#fff),linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7)}[data-super-agent-widget] .sa-sender.sa-input-form-streaming,[data-super-agent-widget] .sa-sender.sa-input-form-streaming:focus-within{background-image:linear-gradient(#f5f5f7,#f5f5f7),linear-gradient(#e5e7eb,#e5e7eb);cursor:not-allowed}[data-super-agent-widget] .sa-sender-content{display:flex;flex-direction:column;gap:4px;width:100%;padding:0;background:transparent}[data-super-agent-widget] .sa-sender-actions-list{position:static;display:block;width:100%;padding:0;margin:0}[data-super-agent-widget] .sa-sender-input{width:100%;min-height:34px!important;max-height:90px!important;overflow-y:auto!important;padding:0;border:none;border-radius:0;background:transparent;box-shadow:none;resize:none;font-size:14px;line-height:1.5;color:#333;outline:none}[data-super-agent-widget] .sa-sender-input::-moz-placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input::placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input:disabled,[data-super-agent-widget] .sa-sender-input:disabled:hover{background:transparent;border:none;box-shadow:none;color:#333;cursor:not-allowed}[data-super-agent-widget] .sa-sender-input:disabled::-moz-placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input:disabled::placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-send-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;border-radius:9999px;background:linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);cursor:pointer;flex-shrink:0;transition:background .15s ease,opacity .15s ease}[data-super-agent-widget] .sa-send-btn-active,[data-super-agent-widget] .sa-sender.sa-input-form:focus-within .sa-send-btn{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7)}[data-super-agent-widget] .sa-send-btn:hover{opacity:.9}[data-super-agent-widget] .sa-send-btn:active{opacity:.7}[data-super-agent-widget] .sa-send-btn img{display:block;width:14px;height:14px;filter:brightness(0) invert(1)}[data-super-agent-widget] .sa-stop-icon{display:block;width:8px;height:8px;border-radius:2px;background:#fff}[data-super-agent-widget] .sa-send-hint{display:flex;align-items:center;gap:3px;flex-shrink:0;font-size:11px;line-height:1;color:#9ca3af;-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-super-agent-widget] .sa-send-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;border:1px solid #e5e7eb;border-radius:4px;background:#f5f5f7;font-family:inherit;font-size:11px;line-height:1;color:#6b7280}[data-super-agent-widget] .sa-attach-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;border-radius:9999px;background:linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);color:#fff;cursor:pointer;flex-shrink:0;transition:background .15s ease,opacity .15s ease}[data-super-agent-widget] .sa-attach-btn:hover{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);opacity:.9}[data-super-agent-widget] .sa-attach-btn:active{opacity:.7}[data-super-agent-widget] .sa-attachment-tray{display:flex;flex-wrap:wrap;gap:6px;padding:2px 0}[data-super-agent-widget] .sa-attachment-tray-chip{display:inline-flex;align-items:center;gap:4px;max-width:220px;padding:4px 8px;border:1px solid rgba(40,92,255,.25);border-radius:6px;background:#285cff0d;font-size:12px;line-height:1;color:#333}[data-super-agent-widget] .sa-attachment-tray-chip-error{border-color:#ef444459;background:#ef44440f}[data-super-agent-widget] .sa-attachment-tray-chip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}[data-super-agent-widget] .sa-attachment-tray-chip-size{color:#b8b8b8;flex-shrink:0}[data-super-agent-widget] .sa-attachment-tray-chip-remove{display:flex;align-items:center;justify-content:center;width:14px;height:14px;border:none;border-radius:9999px;background:transparent;color:#b8b8b8;font-size:10px;line-height:1;cursor:pointer;flex-shrink:0;padding:0}[data-super-agent-widget] .sa-attachment-tray-chip-remove:hover{background:#00000014;color:#666}[data-super-agent-widget] .sa-sender-skill-tag{position:relative;top:1px;height:21px;padding:0 7px 0 5px;border-radius:5px;background:#f2f3f5;font-size:12px;line-height:1;color:#333;gap:0;-moz-user-select:none;user-select:none;-webkit-user-select:none;max-width:180px}[data-super-agent-widget] .sa-sender-skill-tag:hover,[data-super-agent-widget] .sa-sender-skill-tag:focus-within{background:#f2f3f5;color:#333}[data-super-agent-widget] .sa-sender-skill-tag-text{display:inline-flex;align-items:center;gap:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-super-agent-widget] .sa-skill-inline-icon,[data-super-agent-widget] .sa-sender-skill-close{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin:0;padding:0;color:#8a8f99}[data-super-agent-widget] .sa-sender-skill-close{position:absolute;left:5px;top:50%;transform:translateY(-50%)}[data-super-agent-widget] .sa-sender-skill-close:hover{color:#333}[data-super-agent-widget] .sa-sender-skill-close-icon{font-size:12px}[data-super-agent-widget] .sa-skill-inline-icon{visibility:hidden}@media (hover: hover){[data-super-agent-widget] .sa-skill-inline-icon{visibility:visible}[data-super-agent-widget] .sa-sender-skill-close{display:none}[data-super-agent-widget] .sa-sender-skill-tag:hover .sa-skill-inline-icon,[data-super-agent-widget] .sa-sender-skill-tag:focus-within .sa-skill-inline-icon{visibility:hidden}[data-super-agent-widget] .sa-sender-skill-tag:hover .sa-sender-skill-close,[data-super-agent-widget] .sa-sender-skill-tag:focus-within .sa-sender-skill-close{display:inline-flex}}[data-super-agent-widget] .sa-sender-skill-empty:after,[data-super-agent-widget] .sa-sender-input-slot:empty:before{color:#b8b8b8}[data-super-agent-widget] .sa-sender-content>div:not([class]):empty{display:none}[data-super-agent-widget] .sa-sender.sa-sender-main .sa-sender-input-slot{line-height:21px;caret-color:#285cff}[data-super-agent-widget] .sa-attachment-chip{display:inline-flex;align-items:center;gap:4px;max-width:240px;margin:2px 0;padding:5px 10px;border-radius:8px;background:#ffffff59;font-size:12px;line-height:1;color:inherit}[data-super-agent-widget] .sa-attachment-chip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}[data-super-agent-widget] .sa-attachment-chip-size{color:#00000073;flex-shrink:0}[data-super-agent-widget] .hover\\:scale-\\[1\\.08\\]:hover{--tw-scale-x: 1.08;--tw-scale-y: 1.08;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .hover\\:bg-\\[\\#E8F1FE\\]:hover{--tw-bg-opacity: 1;background-color:rgb(232 241 254 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-\\[\\#F5F5F5\\]:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-white\\/70:hover{background-color:#ffffffb3}[data-super-agent-widget] .hover\\:text-\\[\\#1881F0\\]:hover{--tw-text-opacity: 1;color:rgb(24 129 240 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .hover\\:text-\\[\\#ef4444\\]:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .hover\\:text-\\[var\\(--sa-primary\\)\\]:hover{color:var(--sa-primary)}[data-super-agent-widget] .active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .active\\:cursor-grabbing:active{cursor:grabbing}[data-super-agent-widget] .active\\:bg-\\[\\#F5F5F5\\]:active{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] :is(.group:hover .group-hover\\:flex){display:flex}',F0={primaryColor:"#6366f1",backgroundColor:"#ffffff",fontFamily:"system-ui, -apple-system, sans-serif",borderRadius:16,panelWidth:400,panelHeight:648,zIndex:9999};function B5(e,t){const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16),i=1-t;return`#${Math.round(n*i).toString(16).padStart(2,"0")}${Math.round(r*i).toString(16).padStart(2,"0")}${Math.round(o*i).toString(16).padStart(2,"0")}`}function H5(e,t){const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return`#${Math.round(n+(255-n)*t).toString(16).padStart(2,"0")}${Math.round(r+(255-r)*t).toString(16).padStart(2,"0")}${Math.round(o+(255-o)*t).toString(16).padStart(2,"0")}`}function _0(e){const t={...F0,...e},n=t.primaryColor,r=t.backgroundColor;return[`--sa-primary: ${n}`,`--sa-bg: ${r}`,`--sa-font: ${t.fontFamily}`,`--sa-radius: ${t.borderRadius}px`,`--sa-panel-width: ${t.panelWidth}px`,`--sa-panel-height: ${t.panelHeight}px`,`--sa-z-index: ${t.zIndex}`,`--sa-primary-dark: ${B5(n,.15)}`,`--sa-primary-light: ${H5(n,.9)}`,`--sa-surface: ${r}`,"--sa-border: #e5e7eb","--sa-hover: #f4f4f5","--sa-text: #374151","--sa-text-muted: #9ca3af","--sa-text-light: #6b7280"].join("; ")}function V5(e){return typeof e=="string"?e:e.id?`#${e.id}`:""}function W5(e,t){const n=typeof e=="string"?document.querySelector(e):e;if(!n)throw new Error(`Target element not found: ${e}`);const r=document.createElement("div");r.setAttribute("data-super-agent-widget","");const o=_0(t.theme??{});if(r.setAttribute("style",`${o}; height: 100%;`),n.appendChild(r),!document.getElementById("sa-widget-styles")){const c=document.createElement("style");c.id="sa-widget-styles",c.textContent=`${L0}
|
|
1664
|
-
${
|
|
1668
|
+
`,B5='[data-super-agent-widget] .pointer-events-none{pointer-events:none}[data-super-agent-widget] .visible{visibility:visible}[data-super-agent-widget] .collapse{visibility:collapse}[data-super-agent-widget] .fixed{position:fixed}[data-super-agent-widget] .absolute{position:absolute}[data-super-agent-widget] .relative{position:relative}[data-super-agent-widget] .inset-0{top:0;right:0;bottom:0;left:0}[data-super-agent-widget] .inset-x-0{left:0;right:0}[data-super-agent-widget] .-bottom-px{bottom:-1px}[data-super-agent-widget] .-left-px{left:-1px}[data-super-agent-widget] .-right-2{right:-.5rem}[data-super-agent-widget] .-top-1\\.5{top:-.375rem}[data-super-agent-widget] .-top-px{top:-1px}[data-super-agent-widget] .bottom-0{bottom:0}[data-super-agent-widget] .left-\\[-3px\\]{left:-3px}[data-super-agent-widget] .top-0{top:0}[data-super-agent-widget] .z-0{z-index:0}[data-super-agent-widget] .z-10{z-index:10}[data-super-agent-widget] .z-20{z-index:20}[data-super-agent-widget] .z-\\[10000\\]{z-index:10000}[data-super-agent-widget] .z-\\[10001\\]{z-index:10001}[data-super-agent-widget] .z-\\[1\\]{z-index:1}[data-super-agent-widget] .z-\\[2\\]{z-index:2}[data-super-agent-widget] .z-\\[30\\]{z-index:30}[data-super-agent-widget] .z-\\[5\\]{z-index:5}[data-super-agent-widget] .z-\\[var\\(--sa-z-index\\,9999\\)\\]{z-index:var(--sa-z-index,9999)}[data-super-agent-widget] .m-0{margin:0}[data-super-agent-widget] .mx-auto{margin-left:auto;margin-right:auto}[data-super-agent-widget] .mb-0\\.5{margin-bottom:.125rem}[data-super-agent-widget] .mb-1{margin-bottom:.25rem}[data-super-agent-widget] .mb-1\\.5{margin-bottom:.375rem}[data-super-agent-widget] .mb-3{margin-bottom:.75rem}[data-super-agent-widget] .mb-4{margin-bottom:1rem}[data-super-agent-widget] .ml-auto{margin-left:auto}[data-super-agent-widget] .mr-auto{margin-right:auto}[data-super-agent-widget] .mt-3{margin-top:.75rem}[data-super-agent-widget] .block{display:block}[data-super-agent-widget] .inline{display:inline}[data-super-agent-widget] .flex{display:flex}[data-super-agent-widget] .inline-flex{display:inline-flex}[data-super-agent-widget] .table{display:table}[data-super-agent-widget] .hidden{display:none}[data-super-agent-widget] .h-5{height:1.25rem}[data-super-agent-widget] .h-7{height:1.75rem}[data-super-agent-widget] .h-8{height:2rem}[data-super-agent-widget] .h-9{height:2.25rem}[data-super-agent-widget] .h-\\[13px\\]{height:13px}[data-super-agent-widget] .h-\\[18px\\]{height:18px}[data-super-agent-widget] .h-\\[238px\\]{height:238px}[data-super-agent-widget] .h-\\[calc\\(100\\%_-_48px\\)\\]{height:calc(100% - 48px)}[data-super-agent-widget] .h-full{height:100%}[data-super-agent-widget] .w-12{width:3rem}[data-super-agent-widget] .w-5{width:1.25rem}[data-super-agent-widget] .w-7{width:1.75rem}[data-super-agent-widget] .w-\\[18px\\]{width:18px}[data-super-agent-widget] .w-\\[220px\\]{width:220px}[data-super-agent-widget] .w-\\[6px\\]{width:6px}[data-super-agent-widget] .w-full{width:100%}[data-super-agent-widget] .w-px{width:1px}[data-super-agent-widget] .min-w-0{min-width:0px}[data-super-agent-widget] .min-w-\\[14px\\]{min-width:14px}[data-super-agent-widget] .max-w-16{max-width:4rem}[data-super-agent-widget] .max-w-\\[50\\%\\]{max-width:50%}[data-super-agent-widget] .max-w-\\[800px\\]{max-width:800px}[data-super-agent-widget] .max-w-full{max-width:100%}[data-super-agent-widget] .flex-1{flex:1 1 0%}[data-super-agent-widget] .flex-shrink{flex-shrink:1}[data-super-agent-widget] .shrink-0{flex-shrink:0}[data-super-agent-widget] .border-collapse{border-collapse:collapse}[data-super-agent-widget] .scale-50{--tw-scale-x: .5;--tw-scale-y: .5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .cursor-col-resize{cursor:col-resize}[data-super-agent-widget] .cursor-default{cursor:default}[data-super-agent-widget] .cursor-grab{cursor:grab}[data-super-agent-widget] .cursor-pointer{cursor:pointer}[data-super-agent-widget] .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-super-agent-widget] .resize{resize:both}[data-super-agent-widget] .flex-row{flex-direction:row}[data-super-agent-widget] .flex-col{flex-direction:column}[data-super-agent-widget] .flex-wrap{flex-wrap:wrap}[data-super-agent-widget] .items-start{align-items:flex-start}[data-super-agent-widget] .items-center{align-items:center}[data-super-agent-widget] .justify-end{justify-content:flex-end}[data-super-agent-widget] .justify-center{justify-content:center}[data-super-agent-widget] .gap-0\\.5{gap:.125rem}[data-super-agent-widget] .gap-1{gap:.25rem}[data-super-agent-widget] .gap-1\\.5{gap:.375rem}[data-super-agent-widget] .gap-2{gap:.5rem}[data-super-agent-widget] .gap-2\\.5{gap:.625rem}[data-super-agent-widget] .gap-3{gap:.75rem}[data-super-agent-widget] .gap-4{gap:1rem}[data-super-agent-widget] .gap-8{gap:2rem}[data-super-agent-widget] .gap-\\[22px\\]{gap:22px}[data-super-agent-widget] .gap-\\[7px\\]{gap:7px}[data-super-agent-widget] .overflow-hidden{overflow:hidden}[data-super-agent-widget] .overflow-visible{overflow:visible}[data-super-agent-widget] .overflow-y-auto{overflow-y:auto}[data-super-agent-widget] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-super-agent-widget] .text-ellipsis{text-overflow:ellipsis}[data-super-agent-widget] .whitespace-nowrap{white-space:nowrap}[data-super-agent-widget] .rounded{border-radius:.25rem}[data-super-agent-widget] .rounded-full{border-radius:9999px}[data-super-agent-widget] .rounded-md{border-radius:.375rem}[data-super-agent-widget] .border{border-width:1px}[data-super-agent-widget] .border-r{border-right-width:1px}[data-super-agent-widget] .border-r-0{border-right-width:0px}[data-super-agent-widget] .border-none{border-style:none}[data-super-agent-widget] .border-\\[\\#DADADA\\]{--tw-border-opacity: 1;border-color:rgb(218 218 218 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[\\#E8E8E8\\]{--tw-border-opacity: 1;border-color:rgb(232 232 232 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[\\#ECECEC\\]{--tw-border-opacity: 1;border-color:rgb(236 236 236 / var(--tw-border-opacity, 1))}[data-super-agent-widget] .border-\\[var\\(--sa-primary\\)\\]{border-color:var(--sa-primary)}[data-super-agent-widget] .bg-\\[\\#DCDCDC\\]{--tw-bg-opacity: 1;background-color:rgb(220 220 220 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#E8F1FE\\]{--tw-bg-opacity: 1;background-color:rgb(232 241 254 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#F5F5F5\\]{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#FAFAFA\\]{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[\\#fee2e2\\]{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .bg-\\[var\\(--sa-primary\\)\\]{background-color:var(--sa-primary)}[data-super-agent-widget] .bg-black\\/30{background-color:#0000004d}[data-super-agent-widget] .bg-transparent{background-color:transparent}[data-super-agent-widget] .bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .object-contain{-o-object-fit:contain;object-fit:contain}[data-super-agent-widget] .p-0{padding:0}[data-super-agent-widget] .p-3{padding:.75rem}[data-super-agent-widget] .px-0\\.5{padding-left:.125rem;padding-right:.125rem}[data-super-agent-widget] .px-1{padding-left:.25rem;padding-right:.25rem}[data-super-agent-widget] .px-1\\.5{padding-left:.375rem;padding-right:.375rem}[data-super-agent-widget] .px-2\\.5{padding-left:.625rem;padding-right:.625rem}[data-super-agent-widget] .px-3{padding-left:.75rem;padding-right:.75rem}[data-super-agent-widget] .px-\\[15px\\]{padding-left:15px;padding-right:15px}[data-super-agent-widget] .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}[data-super-agent-widget] .py-1{padding-top:.25rem;padding-bottom:.25rem}[data-super-agent-widget] .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}[data-super-agent-widget] .py-2{padding-top:.5rem;padding-bottom:.5rem}[data-super-agent-widget] .py-3{padding-top:.75rem;padding-bottom:.75rem}[data-super-agent-widget] .pb-1{padding-bottom:.25rem}[data-super-agent-widget] .pb-2\\.5{padding-bottom:.625rem}[data-super-agent-widget] .pt-2{padding-top:.5rem}[data-super-agent-widget] .text-left{text-align:left}[data-super-agent-widget] .text-center{text-align:center}[data-super-agent-widget] .text-\\[11px\\]{font-size:11px}[data-super-agent-widget] .text-\\[12px\\]{font-size:12px}[data-super-agent-widget] .text-\\[13px\\]{font-size:13px}[data-super-agent-widget] .text-\\[14px\\]{font-size:14px}[data-super-agent-widget] .text-\\[15px\\]{font-size:15px}[data-super-agent-widget] .text-\\[18px\\]{font-size:18px}[data-super-agent-widget] .text-\\[9px\\]{font-size:9px}[data-super-agent-widget] .font-bold{font-weight:700}[data-super-agent-widget] .font-medium{font-weight:500}[data-super-agent-widget] .font-semibold{font-weight:600}[data-super-agent-widget] .italic{font-style:italic}[data-super-agent-widget] .leading-\\[1\\.3\\]{line-height:1.3}[data-super-agent-widget] .leading-\\[1\\.4\\]{line-height:1.4}[data-super-agent-widget] .leading-\\[14px\\]{line-height:14px}[data-super-agent-widget] .leading-none{line-height:1}[data-super-agent-widget] .text-\\[\\#18181b\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#333\\]{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#666\\]{--tw-text-opacity: 1;color:rgb(102 102 102 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#999\\]{--tw-text-opacity: 1;color:rgb(153 153 153 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#9A9A9A\\]{--tw-text-opacity: 1;color:rgb(154 154 154 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#A0A0A0\\]{--tw-text-opacity: 1;color:rgb(160 160 160 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#B8B8B8\\]{--tw-text-opacity: 1;color:rgb(184 184 184 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#C0C0C0\\]{--tw-text-opacity: 1;color:rgb(192 192 192 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-\\[\\#ef4444\\]{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .underline{text-decoration-line:underline}[data-super-agent-widget] .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[data-super-agent-widget] .opacity-0{opacity:0}[data-super-agent-widget] .opacity-10{opacity:.1}[data-super-agent-widget] .opacity-100{opacity:1}[data-super-agent-widget] .opacity-60{opacity:.6}[data-super-agent-widget] .opacity-70{opacity:.7}[data-super-agent-widget] .shadow-\\[0_-12px_48px_rgba\\(0\\,0\\,0\\,0\\.25\\)\\]{--tw-shadow: 0 -12px 48px rgba(0,0,0,.25);--tw-shadow-colored: 0 -12px 48px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .shadow-\\[0_12px_36px_rgba\\(0\\,0\\,0\\,0\\.18\\)\\]{--tw-shadow: 0 12px 36px rgba(0,0,0,.18);--tw-shadow-colored: 0 12px 36px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.12\\)\\]{--tw-shadow: 0 2px 8px rgba(0,0,0,.12);--tw-shadow-colored: 0 2px 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-super-agent-widget] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-super-agent-widget] .outline{outline-style:solid}[data-super-agent-widget] .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-super-agent-widget] .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}[data-super-agent-widget] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-super-agent-widget] .duration-200{transition-duration:.2s}[data-super-agent-widget] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-super-agent-widget] .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes sa-window-in{0%{opacity:0;transform:translateY(20px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes sa-slide-up-full{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes sa-home-fade-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes sa-chip-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes sa-logo-float{0%,to{transform:translateY(0)}50%{transform:translateY(-3px)}}@keyframes sa-title-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}@keyframes sa-history-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}[data-super-agent-widget] .animate-sa-window-in{animation:sa-window-in .3s cubic-bezier(.16,1,.3,1)}[data-super-agent-widget] .animate-sa-slide-up-full{animation:sa-slide-up-full .3s cubic-bezier(.16,1,.3,1)}[data-super-agent-widget] .animate-sa-fade-in{animation:sa-fade-in .2s ease}[data-super-agent-widget] .animate-sa-home-fade-in{animation:sa-home-fade-in .4s ease forwards}[data-super-agent-widget] .animate-sa-chip-in{animation:sa-chip-in .4s cubic-bezier(.22,1,.36,1) forwards}[data-super-agent-widget] .animate-sa-logo-float{animation:sa-logo-float 3s ease-in-out infinite}[data-super-agent-widget] .animate-sa-title-shimmer{animation:sa-title-shimmer 2.5s ease forwards}[data-super-agent-widget] .animate-sa-history-in{animation:sa-history-in .2s ease}[data-super-agent-widget] .sa-tip{position:relative}[data-super-agent-widget] .sa-tip:before,[data-super-agent-widget] .sa-tip:after{position:absolute;top:100%;left:50%;pointer-events:none;opacity:0;transition:opacity .15s ease;z-index:100}[data-super-agent-widget] .sa-tip:before{content:attr(data-tooltip);transform:translate(-50%);margin-top:6px;padding:4px 8px;background:#fff;color:#333;font-size:12px;line-height:1.4;white-space:nowrap;border-radius:4px;box-shadow:0 2px 8px #0000001f;border:1px solid #e8e8e8}[data-super-agent-widget] .sa-tip:after{content:"";transform:translate(-50%);margin-top:2px;border:4px solid transparent;border-bottom-color:#fff;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.06))}[data-super-agent-widget] .sa-tip:hover:before,[data-super-agent-widget] .sa-tip:hover:after{opacity:1}[data-super-agent-widget] .sa-chip{background:linear-gradient(#fff,#fff) padding-box,linear-gradient(#e0e0e0,#e0e0e0) border-box;border:1px solid transparent}[data-super-agent-widget] .sa-chip:hover{background:linear-gradient(#fff,#fff) padding-box,linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7) border-box}[data-super-agent-widget] .sa-chip:hover .sa-chip-text{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-shimmer-text{background:linear-gradient(90deg,#333,#333 35%,#00d4ff 40%,#1881f0,#2b52ee,#d116ea,#ff2e7e 56%,#333 61%,#333);background-size:300% 100%;background-position:100% 0;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-new-chat{background:linear-gradient(258deg,#ff2e7e1a -4%,#d116ea1a 16%,#2b52ee1a 53%,#1881f01a 81%,#00d4ff1a 106%)}[data-super-agent-widget] .sa-new-chat:hover{background:linear-gradient(258deg,#ff2e7e29 -4%,#d116ea29 16%,#2b52ee29 53%,#1881f029 81%,#00d4ff29 106%)}[data-super-agent-widget] .sa-new-chat .sa-new-chat-text{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}[data-super-agent-widget] .sa-home-gradient{background:linear-gradient(239deg,#ff2e7e -3%,#d116ea 17%,#2b52ee 54%,#1881f0 82%,#00d4ff 107%)}[data-super-agent-widget] .sa-home-gradient-fade{background:linear-gradient(180deg,#fff0,#fff)}[data-super-agent-widget] .sa-home-view .sa-thread{background:transparent}[data-super-agent-widget] .sa-resize-handle:hover{background:color-mix(in srgb,var(--sa-primary) 30%,transparent)}[data-super-agent-widget] .sa-sender.sa-input-form{display:flex;flex-direction:column;gap:4px;width:100%;min-height:70px;padding:8px;border:1px solid transparent;border-radius:5px;box-shadow:none;background-color:#fff;background-image:linear-gradient(#fff,#fff),linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);background-origin:border-box;background-clip:padding-box,border-box;transition:background .15s ease}[data-super-agent-widget] .sa-sender.sa-input-form-active,[data-super-agent-widget] .sa-sender.sa-input-form:focus-within{background-image:linear-gradient(#fff,#fff),linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7)}[data-super-agent-widget] .sa-sender.sa-input-form-streaming,[data-super-agent-widget] .sa-sender.sa-input-form-streaming:focus-within{background-image:linear-gradient(#f5f5f7,#f5f5f7),linear-gradient(#e5e7eb,#e5e7eb);cursor:not-allowed}[data-super-agent-widget] .sa-sender-content{display:flex;flex-direction:column;gap:4px;width:100%;padding:0;background:transparent}[data-super-agent-widget] .sa-sender-actions-list{position:static;display:block;width:100%;padding:0;margin:0}[data-super-agent-widget] .sa-sender-input{width:100%;min-height:34px!important;max-height:90px!important;overflow-y:auto!important;padding:0;border:none;border-radius:0;background:transparent;box-shadow:none;resize:none;font-size:14px;line-height:1.5;color:#333;outline:none}[data-super-agent-widget] .sa-sender-input::-moz-placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input::placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input:disabled,[data-super-agent-widget] .sa-sender-input:disabled:hover{background:transparent;border:none;box-shadow:none;color:#333;cursor:not-allowed}[data-super-agent-widget] .sa-sender-input:disabled::-moz-placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-sender-input:disabled::placeholder{color:#b8b8b8}[data-super-agent-widget] .sa-send-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;border-radius:9999px;background:linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);cursor:pointer;flex-shrink:0;transition:background .15s ease,opacity .15s ease}[data-super-agent-widget] .sa-send-btn-active,[data-super-agent-widget] .sa-sender.sa-input-form:focus-within .sa-send-btn{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7)}[data-super-agent-widget] .sa-send-btn:hover{opacity:.9}[data-super-agent-widget] .sa-send-btn:active{opacity:.7}[data-super-agent-widget] .sa-send-btn img{display:block;width:14px;height:14px;filter:brightness(0) invert(1)}[data-super-agent-widget] .sa-stop-icon{display:block;width:8px;height:8px;border-radius:2px;background:#fff}[data-super-agent-widget] .sa-send-hint{display:flex;align-items:center;gap:3px;flex-shrink:0;font-size:11px;line-height:1;color:#9ca3af;-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-super-agent-widget] .sa-send-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;border:1px solid #e5e7eb;border-radius:4px;background:#f5f5f7;font-family:inherit;font-size:11px;line-height:1;color:#6b7280}[data-super-agent-widget] .sa-attach-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;border-radius:9999px;background:linear-gradient(110deg,#03b5ff80,#285cff80 47%,#ff28a780);color:#fff;cursor:pointer;flex-shrink:0;transition:background .15s ease,opacity .15s ease}[data-super-agent-widget] .sa-attach-btn:hover{background:linear-gradient(110deg,#03b5ff,#285cff 47%,#ff28a7);opacity:.9}[data-super-agent-widget] .sa-attach-btn:active{opacity:.7}[data-super-agent-widget] .sa-attachment-tray{display:flex;flex-wrap:wrap;gap:6px;padding:2px 0}[data-super-agent-widget] .sa-attachment-tray-chip{display:inline-flex;align-items:center;gap:4px;max-width:220px;padding:4px 8px;border:1px solid rgba(40,92,255,.25);border-radius:6px;background:#285cff0d;font-size:12px;line-height:1;color:#333}[data-super-agent-widget] .sa-attachment-tray-chip-error{border-color:#ef444459;background:#ef44440f}[data-super-agent-widget] .sa-attachment-tray-chip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}[data-super-agent-widget] .sa-attachment-tray-chip-size{color:#b8b8b8;flex-shrink:0}[data-super-agent-widget] .sa-attachment-tray-chip-remove{display:flex;align-items:center;justify-content:center;width:14px;height:14px;border:none;border-radius:9999px;background:transparent;color:#b8b8b8;font-size:10px;line-height:1;cursor:pointer;flex-shrink:0;padding:0}[data-super-agent-widget] .sa-attachment-tray-chip-remove:hover{background:#00000014;color:#666}[data-super-agent-widget] .sa-sender-skill-tag{position:relative;top:1px;height:21px;padding:0 7px 0 5px;border-radius:5px;background:#f2f3f5;font-size:12px;line-height:1;color:#333;gap:0;-moz-user-select:none;user-select:none;-webkit-user-select:none;max-width:180px}[data-super-agent-widget] .sa-sender-skill-tag:hover,[data-super-agent-widget] .sa-sender-skill-tag:focus-within{background:#f2f3f5;color:#333}[data-super-agent-widget] .sa-sender-skill-tag-text{display:inline-flex;align-items:center;gap:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-super-agent-widget] .sa-skill-inline-icon,[data-super-agent-widget] .sa-sender-skill-close{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin:0;padding:0;color:#8a8f99}[data-super-agent-widget] .sa-sender-skill-close{position:absolute;left:5px;top:50%;transform:translateY(-50%)}[data-super-agent-widget] .sa-sender-skill-close:hover{color:#333}[data-super-agent-widget] .sa-sender-skill-close-icon{font-size:12px}[data-super-agent-widget] .sa-skill-inline-icon{visibility:hidden}@media (hover: hover){[data-super-agent-widget] .sa-skill-inline-icon{visibility:visible}[data-super-agent-widget] .sa-sender-skill-close{display:none}[data-super-agent-widget] .sa-sender-skill-tag:hover .sa-skill-inline-icon,[data-super-agent-widget] .sa-sender-skill-tag:focus-within .sa-skill-inline-icon{visibility:hidden}[data-super-agent-widget] .sa-sender-skill-tag:hover .sa-sender-skill-close,[data-super-agent-widget] .sa-sender-skill-tag:focus-within .sa-sender-skill-close{display:inline-flex}}[data-super-agent-widget] .sa-sender-skill-empty:after,[data-super-agent-widget] .sa-sender-input-slot:empty:before{color:#b8b8b8}[data-super-agent-widget] .sa-sender-content>div:not([class]):empty{display:none}[data-super-agent-widget] .sa-sender.sa-sender-main .sa-sender-input-slot{line-height:21px;caret-color:#285cff}[data-super-agent-widget] .sa-attachment-chip{display:inline-flex;align-items:center;gap:4px;max-width:240px;margin:2px 0;padding:5px 10px;border-radius:8px;background:#ffffff59;font-size:12px;line-height:1;color:inherit}[data-super-agent-widget] .sa-attachment-chip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}[data-super-agent-widget] .sa-attachment-chip-size{color:#00000073;flex-shrink:0}[data-super-agent-widget] .hover\\:scale-\\[1\\.08\\]:hover{--tw-scale-x: 1.08;--tw-scale-y: 1.08;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .hover\\:bg-\\[\\#E8F1FE\\]:hover{--tw-bg-opacity: 1;background-color:rgb(232 241 254 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-\\[\\#F5F5F5\\]:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] .hover\\:bg-white\\/70:hover{background-color:#ffffffb3}[data-super-agent-widget] .hover\\:text-\\[\\#1881F0\\]:hover{--tw-text-opacity: 1;color:rgb(24 129 240 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .hover\\:text-\\[\\#ef4444\\]:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}[data-super-agent-widget] .hover\\:text-\\[var\\(--sa-primary\\)\\]:hover{color:var(--sa-primary)}[data-super-agent-widget] .active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[data-super-agent-widget] .active\\:cursor-grabbing:active{cursor:grabbing}[data-super-agent-widget] .active\\:bg-\\[\\#F5F5F5\\]:active{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1))}[data-super-agent-widget] :is(.group:hover .group-hover\\:flex){display:flex}',_0={primaryColor:"#6366f1",backgroundColor:"#ffffff",fontFamily:"system-ui, -apple-system, sans-serif",borderRadius:16,panelWidth:400,panelHeight:648,zIndex:9999};function H5(e,t){const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16),i=1-t;return`#${Math.round(n*i).toString(16).padStart(2,"0")}${Math.round(r*i).toString(16).padStart(2,"0")}${Math.round(o*i).toString(16).padStart(2,"0")}`}function V5(e,t){const n=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return`#${Math.round(n+(255-n)*t).toString(16).padStart(2,"0")}${Math.round(r+(255-r)*t).toString(16).padStart(2,"0")}${Math.round(o+(255-o)*t).toString(16).padStart(2,"0")}`}function j0(e){const t={..._0,...e},n=t.primaryColor,r=t.backgroundColor;return[`--sa-primary: ${n}`,`--sa-bg: ${r}`,`--sa-font: ${t.fontFamily}`,`--sa-radius: ${t.borderRadius}px`,`--sa-panel-width: ${t.panelWidth}px`,`--sa-panel-height: ${t.panelHeight}px`,`--sa-z-index: ${t.zIndex}`,`--sa-primary-dark: ${H5(n,.15)}`,`--sa-primary-light: ${V5(n,.9)}`,`--sa-surface: ${r}`,"--sa-border: #e5e7eb","--sa-hover: #f4f4f5","--sa-text: #374151","--sa-text-muted: #9ca3af","--sa-text-light: #6b7280"].join("; ")}function W5(e){return typeof e=="string"?e:e.id?`#${e.id}`:""}function q5(e,t){const n=typeof e=="string"?document.querySelector(e):e;if(!n)throw new Error(`Target element not found: ${e}`);const r=document.createElement("div");r.setAttribute("data-super-agent-widget","");const o=j0(t.theme??{});if(r.setAttribute("style",`${o}; height: 100%;`),n.appendChild(r),!document.getElementById("sa-widget-styles")){const c=document.createElement("style");c.id="sa-widget-styles",c.textContent=`${F0}
|
|
1669
|
+
${B5}`,document.head.appendChild(c)}let i=hm.createRoot(r);const a=W5(e);let s=Oi(a);const l=c=>{i&&i.render(b.createElement(L0,{...t,initialOpen:c??s,onOpenChange:u=>{s=u,Oi(a,u)}}))};return l(s),{open(){s=!0,Oi(a,!0),l(!0)},close(){s=!1,Oi(a,!1),l(!1)},destroy(){i&&(i.unmount(),i=null),r.remove()}}}exports.ASSETS=Gt;exports.ActionBar=Hg;exports.ChatProvider=fl;exports.ChatWidget=L0;exports.Composer=bd;exports.ErrorPart=_g;exports.FullpageLayout=D0;exports.Header=$m;exports.Icon=Ze;exports.InterruptCard=Bg;exports.Message=Vg;exports.PageOverlay=z0;exports.TextPart=zg;exports.ThinkingPart=Dg;exports.Thread=Cu;exports.ThreadList=pl;exports.ToolCallPart=Lg;exports.ToolResultPart=Fg;exports.Trigger=Em;exports.WelcomeScreen=Wg;exports.defaultTheme=_0;exports.ensureIconFont=Og;exports.mount=q5;exports.themeToCSSVars=j0;exports.useAutoScroll=Im;exports.useChat=bm;exports.useChatContext=Fn;exports.useConversations=ym;exports.widgetStyles=F0;
|