super-agent-sdk 1.0.22 → 1.0.23
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/README.md +3 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +13 -0
- package/dist/index.mjs +27 -24
- package/dist/widget.cjs +61 -61
- package/dist/widget.d.ts +18 -3
- package/dist/widget.mjs +4978 -4968
- package/package.json +1 -1
package/dist/widget.cjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";var V0=Object.defineProperty;var W0=(e,t,n)=>t in e?V0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Z=(e,t,n)=>W0(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),gm=require("react-dom/client"),S=require("react/jsx-runtime"),qn=require("./nosUploader-Dk2GyRpT.cjs"),po=require("react-dom");function q0(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=q0(b);function hm(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,M)=>{if(A===y.current)u(z=>{const L=w.current.get(A)??z,_=M(L);return w.current.set(A,_),_});else{const z=w.current.get(A)??[];w.current.set(A,M(z))}},[]),C=b.useCallback((A,M)=>{const z=m.current.get(A);z!=null&&z.stopTimer&&(clearTimeout(z.stopTimer),z.stopTimer=null),m.current.delete(A),w.current.delete(A),A===y.current&&f(M)},[]);b.useEffect(()=>{const A=n?m.current.get(n):void 0;f(A!=null&&A.busy?"streaming":"ready")},[n]);const v=b.useRef(()=>{}),I=b.useCallback((A,M,z)=>{var J;const L=y.current;if(L&&((J=m.current.get(L))!=null&&J.busy))return;if(L){const V=X0(x.current);if(V){l==null||l(A),v.current(V,{action:"submit",value:A});return}}l==null||l(A);const _=z??A,H={id:`user_${Date.now()}`,role:"user",parts:[...(M??[]).map(V=>({type:"attachment",attachment:V})),{type:"text",content:_}],timestamp:Date.now(),rawContent:z!=null&&z!==A?A:void 0},F=`assistant_${Date.now()}`,R={id:F,role:"assistant",parts:[],timestamp:Date.now()},X=$.current,B=x.current;u(V=>[...V,H,R]),L&&w.current.set(L,[...B,H,R]),f("submitted"),h(null);const P=V=>{let G="",te=0,j="",Q=[],le=!1,fe;w.current.has(V)||w.current.set(V,[...B,H,R]);const q={abortController:null,busy:!0,stopTimer:null};m.current.set(V,q);const oe=()=>{G&&(Q.push({type:"thinking",content:G,durationMs:Date.now()-te}),G="",te=0)},ie=()=>{j&&(Q.push({type:"text",content:j}),j="")},Ce=()=>{const re=[...Q];G&&re.push({type:"thinking",content:G,durationMs:Date.now()-te}),j&&re.push({type:"text",content:j}),E(V,ne=>ne.map(se=>se.id===F?{...se,parts:re,...fe?{roundId:fe}:{}}:se))};q.abortController=t.chat({sessionId:V,message:A,attachments:M&&M.length>0?M:void 0,stream:!0,onMessage:re=>{switch(le||(le=!0,V===y.current&&f("streaming")),re.type){case"session.start":re.roundId&&(fe=re.roundId,o==null||o(re.roundId));break;case"user":re.content&&E(V,ne=>ne.map(se=>se.id===H.id?{...se,parts:se.parts.map(ye=>ye.type==="text"?{...ye,content:re.content}:ye)}:se));break;case"thinking":ie(),G||(te=Date.now()),G+=re.content;break;case"ai":oe(),j+=re.content;break;case"tool_call":oe(),ie(),Q.push({type:"tool_call",toolName:re.toolName,toolCallId:re.toolCallId,args:re.args??"{}"});break;case"tool_result":oe(),ie(),Q.push({type:"tool_result",toolName:re.toolName??"",toolCallId:re.toolCallId,content:re.content,artifacts:re.artifacts,renderMode:re.renderMode,html:re.html,markdown:re.markdown});break;case"interrupt":oe(),ie(),re.interrupt&&Q.push({type:"interrupt",interrupt:re.interrupt,resolved:!1}),Ce(),C(V,"ready");return;case"stop":re.content&&(j=re.content),Ce();return}Ce()},onDone:re=>{if((j||Q.length>0||G)&&Ce(),re.artifacts&&re.artifacts.length>0){const se=re.artifacts;E(V,ye=>ye.map(ae=>ae.id===F?{...ae,artifacts:se}:ae))}if(re.messageId){const se=re.messageId;E(V,ye=>ye.map(ae=>ae.id===F?{...ae,messageId:se}:ae))}const ne=()=>{C(V,"ready"),a==null||a(re.sessionId||V)};if(X){const se=_.slice(0,30),ye=re.sessionId||V;t.renameConversation(ye,se).catch(()=>{}).finally(ne)}else ne()},onError:re=>{Q.push({type:"error",content:re.message}),Ce(),V===y.current&&(h(re),f("error")),s==null||s(re),C(V,"error")}}),i==null||i(V)};L?P(L):t.createSession().then(V=>{y.current==null&&(y.current=V,r==null||r(V)),P(V)}).catch(V=>{y.current==null&&(h(V instanceof Error?V:new Error(String(V))),f("error")),s==null||s(V instanceof Error?V:new Error(String(V)))})},[t,r,i,a,s,l,E,C]),T=b.useCallback(()=>{const A=y.current;if(!A)return;const M=m.current.get(A);M!=null&&M.busy&&(M.stopTimer&&clearTimeout(M.stopTimer),M.stopTimer=setTimeout(()=>{var z;M.stopTimer=null,(z=M.abortController)==null||z.abort(),C(A,"ready")},8e3),t.stopGeneration(A).catch(()=>{}))},[t,C]),O=b.useCallback(()=>{var _;const A=y.current;if(A&&((_=m.current.get(A))!=null&&_.busy))return;const M=c.findLastIndex(H=>H.role==="user");if(M<0)return;const z=c[M].rawContent??c[M].parts.filter(H=>H.type==="text").map(H=>H.content).join(""),L=c[M].parts.filter(H=>H.type==="attachment").map(H=>H.attachment);u(H=>H.slice(0,M)),I(z,L.length>0?L:void 0)},[c,I]),k=b.useCallback((A,M)=>{var te;const z=y.current;if(!z||(te=m.current.get(z))!=null&&te.busy)return;E(z,j=>j.map(Q=>({...Q,parts:Q.parts.map(le=>le.type==="interrupt"&&le.interrupt.interruptId===A?{...le,resolved:!0,response:M}:le)})));const L={abortController:null,busy:!0,stopTimer:null};m.current.set(z,L);const _=new AbortController;L.abortController=_;let H=0;E(z,j=>j.length>0&&j[j.length-1].role==="assistant"?(H=j[j.length-1].parts.length,j):(H=0,[...j,{id:`assistant_${Date.now()}`,role:"assistant",parts:[],timestamp:Date.now()}])),f("streaming");let F="",R=0,X="",B=[],P;const J=()=>{F&&(B.push({type:"thinking",content:F,durationMs:Date.now()-R}),F="",R=0)},V=()=>{X&&(B.push({type:"text",content:X}),X="")},G=()=>{const j=[...B];F&&j.push({type:"thinking",content:F,durationMs:Date.now()-R}),X&&j.push({type:"text",content:X}),E(z,Q=>{const le=Q.findLastIndex(fe=>fe.role==="assistant");return le<0?Q:Q.map((fe,q)=>q===le?{...fe,parts:[...fe.parts.slice(0,H),...j],...P?{roundId:P}:{}}:fe)})};t.respondInterrupt(A,z,M,j=>{let Q=!1;switch(j.type){case"session.start":j.roundId&&(P=j.roundId);break;case"thinking":V(),F||(R=Date.now()),F+=j.content;break;case"ai":J(),X+=j.content;break;case"tool_call":J(),V(),B.push({type:"tool_call",toolName:j.toolName,toolCallId:j.toolCallId,args:j.args??"{}"});break;case"tool_result":J(),V(),B.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});break;case"interrupt":J(),V(),j.interrupt&&B.push({type:"interrupt",interrupt:j.interrupt,resolved:!1}),Q=!0;break;case"stop":j.content&&(X=j.content),a==null||a(z),Q=!0;break;case"done":{const le=j.artifacts&&j.artifacts.length>0?j.artifacts:void 0;(j.messageId||le)&&E(z,fe=>{const q=fe.findLastIndex(oe=>oe.role==="assistant");return q<0?fe:fe.map((oe,ie)=>ie===q?{...oe,...j.messageId?{messageId:j.messageId}:{},...le?{artifacts:le}:{}}:oe)}),a==null||a(z),Q=!0;break}}G(),Q&&C(z,"ready")},j=>{B.push({type:"error",content:j.message}),G(),z===y.current&&(h(j),f("error")),s==null||s(j),C(z,"error")},_.signal).catch(j=>{if((j==null?void 0:j.name)==="AbortError"){C(z,"ready");return}z===y.current&&(h(j instanceof Error?j:new Error(String(j))),f("error")),s==null||s(j instanceof Error?j:new Error(String(j))),C(z,"error")})},[t,s,a,E,C]);v.current=k;const N=b.useCallback((A,M)=>{y.current=A;const z=M??w.current.get(A)??[];w.current.set(A,z),u(z)},[]),D=b.useCallback(A=>m.current.has(A)?w.current.get(A)??null:null,[]);return b.useEffect(()=>{var M;if(!n||d!=="ready"||(M=m.current.get(n))!=null&&M.busy)return;const A=qn.popPendingChat();A&&A.sessionId===n&&I(A.message)},[n,d]),{messages:c,status:d,error:p,sendMessage:I,stop:T,regenerate:O,setMessages:u,showSession:N,getLiveMessages:D,respondToInterrupt:k}}function X0(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 bm="sa_active_conversation",Cs=20;function wd(e){try{return localStorage.getItem(`${bm}_${e}`)}catch{return null}}function U0(e,t){try{const n=`${bm}_${e}`;t?localStorage.setItem(n,t):localStorage.removeItem(n)}catch{}}function xm(e){const{sdk:t,onConversationChange:n}=e,r=t.botCode,[o,i]=b.useState([]),[a,s]=b.useState(()=>wd(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),U0(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:Cs});if(!f.current)return;i(I.items),d(I.items.length<I.total);const T=wd(r);T&&!I.items.find(O=>O.sessionId===T)&&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,T=await t.listConversations({page:I,size:Cs});if(!f.current)return;p.current=I,i(k=>{const N=new Set(k.map(A=>A.sessionId)),D=T.items.filter(A=>!N.has(A.sessionId));return[...k,...D]});const O=p.current*Cs;d(O<T.total)}catch{}finally{h.current=!1,f.current&&c(!1)}}},[t,u]),$=b.useCallback(async(I,T)=>(m(I),(T==null?void 0:T.fetchHistory)===!1?[]:await t.getMessages(I)),[t,m]),x=b.useCallback(async()=>{try{const I=await t.createSession(),T=new Date().toISOString();i(O=>[{sessionId:I,title:"新对话",createTime:T,updateTime:T},...O]),m(I)}catch{m(null)}},[t,m]),E=b.useCallback(async I=>{i(T=>T.filter(O=>O.sessionId!==I)),a===I&&m(null);try{await t.deleteConversation(I)}catch{}},[t,a,m]),C=b.useCallback(async(I,T)=>{await t.renameConversation(I,T),i(O=>O.map(k=>k.sessionId===I?{...k,title:T}:k))},[t]),{enabled:v=!0}=e;return b.useEffect(()=>{v&&w()},[v,w]),{conversations:o,activeConversationId:a,loading:l,hasMore:u,loadConversations:w,loadMore:y,switchConversation:$,newConversation:x,deleteConversation:E,renameConversation:C,setActiveConversationId:m}}function ym(e){return!e&&e!==0?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function wm(e){return e==="pdf"?"PDF":e==="docx"?"DOC":e==="html"?"HTM":e==="md"?"MD":e.slice(0,3).toUpperCase()||"FILE"}function G0(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 vm(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??G0(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 Cm=b.createContext(null);function Xn(){const e=b.useContext(Cm);if(!e)throw new Error("useChatContext must be used within ChatProvider");return e}function pl({sdk:e,hooks:t,attachmentUploader:n,nosUpload:r,children:o}){const[i,a]=b.useState(!1),[s,l]=b.useState(!1),[c,u]=b.useState(null),[d,f]=b.useState(null),[p,h]=b.useState(!1),[m,w]=b.useState(!1);b.useEffect(()=>{e.getToken().then(()=>{h(!0)}).catch(()=>{h(!0)})},[e]);const y=xm({sdk:e,onConversationChange:t==null?void 0:t.onConversationChange,enabled:p}),$=hm({sdk:e,sessionId:y.activeConversationId,onSessionCreated:F=>{y.setActiveConversationId(F)},onStreamStart:t==null?void 0:t.onStreamStart,onStreamEnd:F=>{var R;(R=t==null?void 0:t.onStreamEnd)==null||R.call(t,F),y.loadConversations()},onError:t==null?void 0:t.onError,onMessageSend:t==null?void 0:t.onMessageSend}),x=b.useCallback(F=>{if(F.type==="link"){window.open(F.url,F.target??"_blank","noopener");return}f(F)},[]),E=b.useCallback(()=>f(null),[]),C=b.useRef(0),v=b.useCallback(async F=>{f(null);const R=++C.current;if($.getLiveMessages(F)){await y.switchConversation(F,{fetchHistory:!1}),$.showSession(F),w(!1);return}w(!0);try{const X=await y.switchConversation(F);if(C.current!==R)return;$.showSession(F,X)}finally{C.current===R&&w(!1)}},[y,$]),I=b.useCallback(async()=>{f(null),$.setMessages([]),await y.newConversation()},[y,$]),T=b.useCallback(async F=>{y.activeConversationId===F&&$.setMessages([]),await y.deleteConversation(F)},[y,$]);b.useEffect(()=>{y.activeConversationId&&$.messages.length===0&&(w(!0),e.getMessages(y.activeConversationId).then(F=>{$.setMessages(F)}).catch(()=>{}).finally(()=>w(!1)))},[]);const O=b.useCallback(()=>{a(F=>!F)},[]),k=b.useCallback(F=>{a(F)},[]),N=b.useCallback(()=>{l(F=>!F),u(F=>null)},[]),D=b.useCallback(F=>{u(F),l(!0)},[]),A=b.useMemo(()=>{const F=new Set,R=[];for(const X of $.messages)if(X.role==="assistant"&&X.artifacts)for(const B of vm(X.artifacts)){const P=B.id||`${B.url}:${B.filename}`;F.has(P)||(F.add(P),R.push(B))}return R},[$.messages]),M=b.useCallback(async F=>{const R=y.activeConversationId;if(!R)return null;try{const X=await e.getMessages(R);$.setMessages(X);const B=F?X.filter(P=>P.role==="assistant"&&P.roundId===F).pop():X.findLast(P=>P.role==="assistant");return(B==null?void 0:B.messageId)??null}catch{return null}},[e,y.activeConversationId,$]),z=b.useCallback(F=>{if(typeof F!="string")return{messageId:F.messageId,roundId:F.roundId};const R=$.messages.find(X=>X.id===F||X.messageId===F);return R?{messageId:R.messageId,roundId:R.roundId}:/^(user|assistant)_/.test(F)?{}:{messageId:F}},[$.messages]),L=b.useCallback((F,R,X)=>{const{messageId:B,roundId:P}=z(F);if(B){e.feedback(B,R,X).catch(()=>{});return}M(P).then(J=>{J&&e.feedback(J,R,X).catch(()=>{})})},[e,z,M]),_=b.useCallback(F=>{const{messageId:R,roundId:X}=z(F);if(R){e.cancelFeedback(R).catch(()=>{});return}M(X).then(B=>{B&&e.cancelFeedback(B).catch(()=>{})})},[e,z,M]),H=b.useMemo(()=>({sdk:e,status:$.status,error:$.error,messages:$.messages,conversations:y.conversations,activeConversationId:y.activeConversationId,isThreadListOpen:i,isArtifactDrawerOpen:s,allArtifacts:A,activePreviewArtifact:c,activePanel:d,hasMore:y.hasMore,conversationsLoading:y.loading,messagesLoading:m,sendMessage:$.sendMessage,attachmentUploader:n??null,nosUpload:r??null,stop:$.stop,regenerate:$.regenerate,switchConversation:v,newConversation:I,deleteConversation:T,renameConversation:y.renameConversation,loadMoreConversations:y.loadMore,toggleThreadList:O,setThreadListOpen:k,toggleArtifactDrawer:N,openArtifactPreview:D,openPanel:x,closePanel:E,feedback:L,cancelFeedback:_,respondToInterrupt:$.respondToInterrupt}),[e,$.status,$.error,$.messages,$.sendMessage,$.stop,$.regenerate,$.respondToInterrupt,n,r,y.conversations,y.activeConversationId,y.renameConversation,y.hasMore,y.loadMore,y.loading,i,s,A,c,d,m,v,I,T,O,k,N,D,x,E,L,_]);return S.jsx(Cm.Provider,{value:H,children:o})}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}),C=b.useRef(!1),v=b.useRef(null);b.useEffect(()=>{const M=()=>h({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",M),()=>window.removeEventListener("resize",M)},[]),b.useEffect(()=>()=>{var M;(M=v.current)==null||M.call(v)},[]);const I=Math.floor(p.height*Ut.MAX_HEIGHT_RATIO),T=Math.min(d||t,I),O=r+n;b.useEffect(()=>{if(!s){const M=p.width-O-20,z=p.height-T-20;a(L=>L.x===M&&L.y===z?L:{x:M,y:z})}},[s,O,T,p]);const k=b.useCallback(M=>{if(c||M.target.closest("button, input, textarea"))return;$.current=!0,C.current=!1,x.current={x:M.clientX,y:M.clientY},E.current={...i};const z=H=>{if(!$.current)return;const F=H.clientX-x.current.x,R=H.clientY-x.current.y;(Math.abs(F)>3||Math.abs(R)>3)&&(C.current=!0),C.current&&(l(!0),a({x:Math.max(-200,Math.min(E.current.x+F,window.innerWidth-100)),y:Math.max(0,Math.min(E.current.y+R,window.innerHeight-48))}))},L=()=>{$.current=!1,_()},_=()=>{document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",L),v.current=null};document.addEventListener("mousemove",z),document.addEventListener("mouseup",L),v.current=_},[c,i]),N=b.useCallback(M=>{M.preventDefault(),M.stopPropagation(),m.current=!0,w.current=M.clientX,y.current=r;const z=i.x+r,L=i.y,_=R=>{if(!m.current)return;const X=R.clientX-w.current;let B=y.current-X;if(B>Ut.MAX_WIDTH){m.current=!1,u(!0),F();return}B=Math.max(Ut.MIN_WIDTH,B),o(B),a({x:z-B,y:L})},H=()=>{m.current=!1,F()},F=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",H),v.current=null};document.addEventListener("mousemove",_),document.addEventListener("mouseup",H),v.current=F},[r,i]),D=b.useCallback(()=>{c&&o(e),u(M=>!M)},[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:O,windowHeight:T,startWindowDrag:k,startResize:N,toggleMaximize:D,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 Sm({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 Em({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 vd="sa-widget-open:";function zi(e,t){if(!e)return!1;try{if(t===void 0)return sessionStorage.getItem(`${vd}${e}`)==="1";sessionStorage.setItem(`${vd}${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 $m(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 ml({width:e}){const{conversations:t,activeConversationId:n,switchConversation:r,newConversation:o,deleteConversation:i,renameConversation:a,hasMore:s,loadMoreConversations:l,conversationsLoading:c}=Xn(),[u,d]=b.useState(null),[f,p]=b.useState(""),[h,m]=b.useState(null),w=b.useRef(null),y=b.useCallback((C,v)=>{d(C),p(v??"")},[]),$=b.useCallback(C=>{f.trim()&&a(C,f.trim()),d(null)},[f,a]),x=b.useCallback(()=>{const C=w.current;!C||!s||C.scrollHeight-C.scrollTop-C.clientHeight<50&&l()},[s,l]),E=b.useMemo(()=>$m(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(C=>S.jsxs("div",{className:"mb-1",children:[S.jsx("div",{className:"px-1 pb-1 pt-2 text-[11px] text-[#A0A0A0]",children:C.label}),C.items.map(v=>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 ${v.sessionId===n?"bg-[#E8F1FE]":"hover:bg-[#E8F1FE]"}`,onClick:()=>{u!==v.sessionId&&r(v.sessionId)},onMouseEnter:I=>{if(u===v.sessionId)return;const T=I.currentTarget.getBoundingClientRect();m({text:v.title||"新会话",x:T.right+8,y:T.top+T.height/2})},onMouseLeave:()=>m(null),children:u===v.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:()=>$(v.sessionId),onKeyDown:I=>{I.key==="Enter"&&$(v.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:v.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(v.sessionId,v.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(v.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"})})})]})]})},v.sessionId))]},C.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 km(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 Cd(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"?Sd(e.value):!1:Sd(e)}function Sd(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 Im(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 gl(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(),hl=Br(),me=Br(),lt=Br(),Or=Br(),bn=Br();function Br(){return 2**++iy}const bl=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:St,commaOrSpaceSeparated:bn,commaSeparated:Or,number:me,overloadedBoolean:hl,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Ss=Object.keys(bl);class nu extends dn{constructor(t,n,r,o){let i=-1;if(super(t,n),Ed(this,"space",o),typeof r=="number")for(;++i<Ss.length;){const a=Ss[i];Ed(this,Ss[i],(r&bl[a])===bl[a])}}}nu.prototype.defined=!0;function Ed(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 nu(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[gl(r)]=r,n[gl(i.attribute)]=r}return new mi(t,n,e.space)}const Rm=Co({properties:{ariaActiveDescendant:null,ariaAtomic:St,ariaAutoComplete:null,ariaBusy:St,ariaChecked:St,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,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:me,ariaLive:null,ariaModal:St,ariaMultiLine:St,ariaMultiSelectable:St,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:St,ariaReadOnly:St,ariaRelevant:null,ariaRequired:St,ariaRoleDescription:lt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:St,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Pm(e,t){return t in e?e[t]:t}function Tm(e,t){return Pm(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:me,colSpan:me,command:null,commandFor:null,content:null,contentEditable:St,controls:je,controlsList:lt,coords:me|Or,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:hl,draggable:St,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:lt,height:me,hidden:hl,high:me,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:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,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:me,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:me,rowSpan:me,sandbox:lt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootCustomElementRegistry:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shadowRootSerializable:je,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:St,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:St,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,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:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:St,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:je,disablePictureInPicture:je,disableRemotePlayback:je,exportParts:Or,part:lt,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:Tm}),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:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:bn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:bn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bn,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,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:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pm}),Nm=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()}}),Mm=Co({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tm}),Am=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,$d=/-[a-z]/g,uy=/^data[-\w.:]+$/i;function dy(e,t){const n=gl(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($d,py);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!$d.test(i)){let a=i.replace(cy,fy);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=nu}return new o(r,t)}function fy(e){return"-"+e.toLowerCase()}function py(e){return e.charAt(1).toUpperCase()}const my=Im([Rm,ay,Nm,Mm,Am],"html"),ru=Im([Rm,sy,Nm,Mm,Am],"svg");function gy(e){return e.join(" ").trim()}var ou={},kd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,hy=/\n/g,by=/^\s*/,xy=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,yy=/^:\s*/,wy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,vy=/^[;\s]*/,Cy=/^\s+|\s+$/g,Sy=`
|
|
2
|
-
`,Id="/",Rd="*",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(!(Id!=e.charAt(0)||Rd!=e.charAt(1))){for(var m=2;Tr!=e.charAt(m)&&(Rd!=e.charAt(m)||Id!=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:Pd(m[0].replace(kd,Tr)),value:w?Pd(w[0].replace(kd,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 Pd(e){return e?e.replace(Cy,Tr):Tr}var Iy=ky,Ry=qn.commonjsGlobal&&qn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ou,"__esModule",{value:!0});ou.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()},Td=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,Td):e=e.replace(zy,Td),e.replace(My,Ly))};Ba.camelCase=Fy;var _y=qn.commonjsGlobal&&qn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},jy=_y(ou),By=Ba;function xl(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}xl.default=xl;var Hy=xl;const Vy=qn.getDefaultExportFromCjs(Hy),zm=Om("end"),iu=Om("start");function Om(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=iu(e),n=zm(e);if(t&&n)return{start:t,end:n}}function Ko(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Nd(e.position):"start"in e||"end"in e?Nd(e):"line"in e||"column"in e?yl(e):""}function yl(e){return Md(e&&e.line)+":"+Md(e&&e.column)}function Nd(e){return yl(e&&e.start)+"-"+yl(e&&e.end)}function Md(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 au={}.hasOwnProperty,qy=new Map,Xy=/[A-Z]/g,Uy=new Set(["table","tbody","thead","tfoot","tr"]),Gy=new Set(["td","th"]),Dm="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"?ru:my,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Lm(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Lm(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=ru,e.schema=o),e.ancestors.push(t);const i=_m(e,t.tagName,!1),a=ow(e,t);let s=lu(e,t);return Uy.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!oy(l):!0})),Fm(e,a,i,t),su(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=ru,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:_m(e,t.name,!0),a=iw(e,t),s=lu(e,t);return Fm(e,a,i,t),su(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function ew(e,t,n){const r={};return su(r,lu(e,t)),e.create(t,e.Fragment,r,n)}function tw(e,t){return t.value}function Fm(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function su(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=iu(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"&&au.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 lu(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=Lm(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=Dm+"#cannot-parse-style-attribute",o}}function _m(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=Cd(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=Cd(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return au.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=Dm+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lw(e){const t={};let n;for(n in e)au.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 Es={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 cu(e,t){const n=dw,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return jm(e,r,o)}function jm(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 Ad(e.children,t,n)}return Array.isArray(e)?Ad(e,t,n):""}function Ad(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=jm(e[o],t,n);return r.join("")}function fw(e){return!!(e&&typeof e=="object")}const zd=document.createElement("i");function uu(e){const t="&"+e+";";zd.innerHTML=t;const n=zd.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 Od={}.hasOwnProperty;function Bm(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=(Od.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Od.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 Hm(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 wl=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},Dd={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 C=E,v;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){v=t.events[C][1].end;break}y(r);let I=E;for(;I<t.events.length;)t.events[I][1].end={...v},I++;return wn(t.events,C+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(Dd,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(Dd,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 C=t.sliceStream(x);if(E&&C.push(null),x.previous=i,i&&(i.next=x),i=x,o.defineSkip(x.start),o.write(C),t.parser.lazy[x.start.line]){let v=o.events.length;for(;v--;)if(o.events[v][1].start.offset<a&&(!o.events[v][1].end||o.events[v][1].end.offset>a))return;const I=t.events.length;let T=I,O,k;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(O){k=t.events[T][1].end;break}O=!0}for(y(r),v=I;v<t.events.length;)t.events[v][1].end={...k},v++;wn(t.events,T+1,0,t.events.slice(I)),t.events.length=v}}function y(x){let E=n.length;for(;E-- >x;){const C=n[E];t.containerState=C[1],C[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 vl={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};Ld(d,-l),Ld(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 Ld(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 Vm={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(Vm,t,n)(a)}}function Tw(e){e.exit("blockQuote")}const Wm={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 qm={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=wl,u(d))}function u(d){if(d===59&&o){const f=e.exit("characterReferenceValue");return a===Kt&&!uu(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 Fd={partial:!0,tokenize:zw},_d={concrete:!0,name:"codeFenced",tokenize:Aw};function Aw(e,t,n){const r=this,o={partial:!0,tokenize:C};let i=0,a=0,s;return l;function l(v){return c(v)}function c(v){const I=r.events[r.events.length-1];return i=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,s=v,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(v)}function u(v){return v===s?(a++,e.consume(v),u):a<3?n(v):(e.exit("codeFencedFenceSequence"),qe(v)?Ye(e,d,"whitespace")(v):d(v))}function d(v){return v===null||Ae(v)?(e.exit("codeFencedFence"),r.interrupt?t(v):e.check(Fd,m,E)(v)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(v))}function f(v){return v===null||Ae(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(v)):qe(v)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ye(e,p,"whitespace")(v)):v===96&&v===s?n(v):(e.consume(v),f)}function p(v){return v===null||Ae(v)?d(v):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===null||Ae(v)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(v)):v===96&&v===s?n(v):(e.consume(v),h)}function m(v){return e.attempt(o,E,w)(v)}function w(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),y}function y(v){return i>0&&qe(v)?Ye(e,$,"linePrefix",i+1)(v):$(v)}function $(v){return v===null||Ae(v)?e.check(Fd,m,E)(v):(e.enter("codeFlowValue"),x(v))}function x(v){return v===null||Ae(v)?(e.exit("codeFlowValue"),$(v)):(e.consume(v),x)}function E(v){return e.exit("codeFenced"),t(v)}function C(v,I,T){let O=0;return k;function k(z){return v.enter("lineEnding"),v.consume(z),v.exit("lineEnding"),N}function N(z){return v.enter("codeFencedFence"),qe(z)?Ye(v,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):D(z)}function D(z){return z===s?(v.enter("codeFencedFenceSequence"),A(z)):T(z)}function A(z){return z===s?(O++,v.consume(z),A):O>=a?(v.exit("codeFencedFenceSequence"),qe(z)?Ye(v,M,"whitespace")(z):M(z)):T(z)}function M(z){return z===null||Ae(z)?(v.exit("codeFencedFence"),I(z)):T(z)}}}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 $s={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 Xm(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 Xm(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 Um(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 Gm(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 Km(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 Gm.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 Um(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 Km(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"],jd=["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(P){return u(P)}function u(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),i=!0,m):P===63?(e.consume(P),o=3,r.interrupt?t:R):nn(P)?(e.consume(P),a=String.fromCharCode(P),w):n(P)}function f(P){return P===45?(e.consume(P),o=2,p):P===91?(e.consume(P),o=5,s=0,h):nn(P)?(e.consume(P),o=4,r.interrupt?t:R):n(P)}function p(P){return P===45?(e.consume(P),r.interrupt?t:R):n(P)}function h(P){const J="CDATA[";return P===J.charCodeAt(s++)?(e.consume(P),s===J.length?r.interrupt?t:D:h):n(P)}function m(P){return nn(P)?(e.consume(P),a=String.fromCharCode(P),w):n(P)}function w(P){if(P===null||P===47||P===62||ct(P)){const J=P===47,V=a.toLowerCase();return!J&&!i&&jd.includes(V)?(o=1,r.interrupt?t(P):D(P)):o1.includes(a.toLowerCase())?(o=6,J?(e.consume(P),y):r.interrupt?t(P):D(P)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):i?$(P):x(P))}return P===45||Kt(P)?(e.consume(P),a+=String.fromCharCode(P),w):n(P)}function y(P){return P===62?(e.consume(P),r.interrupt?t:D):n(P)}function $(P){return qe(P)?(e.consume(P),$):k(P)}function x(P){return P===47?(e.consume(P),k):P===58||P===95||nn(P)?(e.consume(P),E):qe(P)?(e.consume(P),x):k(P)}function E(P){return P===45||P===46||P===58||P===95||Kt(P)?(e.consume(P),E):C(P)}function C(P){return P===61?(e.consume(P),v):qe(P)?(e.consume(P),C):x(P)}function v(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),l=P,I):qe(P)?(e.consume(P),v):T(P)}function I(P){return P===l?(e.consume(P),l=null,O):P===null||Ae(P)?n(P):(e.consume(P),I)}function T(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||ct(P)?C(P):(e.consume(P),T)}function O(P){return P===47||P===62||qe(P)?x(P):n(P)}function k(P){return P===62?(e.consume(P),N):n(P)}function N(P){return P===null||Ae(P)?D(P):qe(P)?(e.consume(P),N):n(P)}function D(P){return P===45&&o===2?(e.consume(P),L):P===60&&o===1?(e.consume(P),_):P===62&&o===4?(e.consume(P),X):P===63&&o===3?(e.consume(P),R):P===93&&o===5?(e.consume(P),F):Ae(P)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(a1,B,A)(P)):P===null||Ae(P)?(e.exit("htmlFlowData"),A(P)):(e.consume(P),D)}function A(P){return e.check(s1,M,B)(P)}function M(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),z}function z(P){return P===null||Ae(P)?A(P):(e.enter("htmlFlowData"),D(P))}function L(P){return P===45?(e.consume(P),R):D(P)}function _(P){return P===47?(e.consume(P),a="",H):D(P)}function H(P){if(P===62){const J=a.toLowerCase();return jd.includes(J)?(e.consume(P),X):D(P)}return nn(P)&&a.length<8?(e.consume(P),a+=String.fromCharCode(P),H):D(P)}function F(P){return P===93?(e.consume(P),R):D(P)}function R(P){return P===62?(e.consume(P),X):P===45&&o===2?(e.consume(P),R):D(P)}function X(P){return P===null||Ae(P)?(e.exit("htmlFlowData"),B(P)):(e.consume(P),X)}function B(P){return e.exit("htmlFlow"),t(P)}}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(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),l}function l(R){return R===33?(e.consume(R),c):R===47?(e.consume(R),C):R===63?(e.consume(R),x):nn(R)?(e.consume(R),T):n(R)}function c(R){return R===45?(e.consume(R),u):R===91?(e.consume(R),i=0,h):nn(R)?(e.consume(R),$):n(R)}function u(R){return R===45?(e.consume(R),p):n(R)}function d(R){return R===null?n(R):R===45?(e.consume(R),f):Ae(R)?(a=d,_(R)):(e.consume(R),d)}function f(R){return R===45?(e.consume(R),p):d(R)}function p(R){return R===62?L(R):R===45?f(R):d(R)}function h(R){const X="CDATA[";return R===X.charCodeAt(i++)?(e.consume(R),i===X.length?m:h):n(R)}function m(R){return R===null?n(R):R===93?(e.consume(R),w):Ae(R)?(a=m,_(R)):(e.consume(R),m)}function w(R){return R===93?(e.consume(R),y):m(R)}function y(R){return R===62?L(R):R===93?(e.consume(R),y):m(R)}function $(R){return R===null||R===62?L(R):Ae(R)?(a=$,_(R)):(e.consume(R),$)}function x(R){return R===null?n(R):R===63?(e.consume(R),E):Ae(R)?(a=x,_(R)):(e.consume(R),x)}function E(R){return R===62?L(R):x(R)}function C(R){return nn(R)?(e.consume(R),v):n(R)}function v(R){return R===45||Kt(R)?(e.consume(R),v):I(R)}function I(R){return Ae(R)?(a=I,_(R)):qe(R)?(e.consume(R),I):L(R)}function T(R){return R===45||Kt(R)?(e.consume(R),T):R===47||R===62||ct(R)?O(R):n(R)}function O(R){return R===47?(e.consume(R),L):R===58||R===95||nn(R)?(e.consume(R),k):Ae(R)?(a=O,_(R)):qe(R)?(e.consume(R),O):L(R)}function k(R){return R===45||R===46||R===58||R===95||Kt(R)?(e.consume(R),k):N(R)}function N(R){return R===61?(e.consume(R),D):Ae(R)?(a=N,_(R)):qe(R)?(e.consume(R),N):O(R)}function D(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),o=R,A):Ae(R)?(a=D,_(R)):qe(R)?(e.consume(R),D):(e.consume(R),M)}function A(R){return R===o?(e.consume(R),o=void 0,z):R===null?n(R):Ae(R)?(a=A,_(R)):(e.consume(R),A)}function M(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||ct(R)?O(R):(e.consume(R),M)}function z(R){return R===47||R===62||ct(R)?O(R):n(R)}function L(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function _(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),H}function H(R){return qe(R)?Ye(e,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):F(R)}function F(R){return e.enter("htmlTextData"),a(R)}}const du={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):Um(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?Km(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 Gm.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:du.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:du.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 ks={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:wl(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 wl(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 Bd={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:Qm()},B1=Ym("string"),H1=Ym("text");function Ym(e){return{resolveAll:Qm(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 Qm(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:Vm},q1={91:Kw},X1={[-2]:$s,[-1]:$s,32:$s},U1={35:t1,42:ta,45:[Bd,ta],60:i1,61:Bd,95:ta,96:_d,126:_d},G1={38:qm,92:Wm},K1={[-5]:ks,[-4]:ks,[-3]:ks,33:S1,38:qm,42:vl,60:[$w,f1],91:$1,92:[Jw,Wm],93:du,95:vl,96:Fw},Y1={null:[vl,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(C),check:I(v),consume:$,enter:x,exit:E,interrupt:I(v,{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(N){return a=kn(a,N),w(),a[a.length-1]!==null?[]:(T(t,0),c.events=Va(i,c.events,c),c.events)}function f(N,D){return nv(p(N),D)}function p(N){return tv(a,N)}function h(){const{_bufferIndex:N,_index:D,line:A,column:M,offset:z}=r;return{_bufferIndex:N,_index:D,line:A,column:M,offset:z}}function m(N){o[N.line]=N.column,k()}function w(){let N;for(;r._index<a.length;){const D=a[r._index];if(typeof D=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<D.length;)y(D.charCodeAt(r._bufferIndex));else y(D)}}function y(N){u=u(N)}function $(N){Ae(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,k()):N!==-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=N}function x(N,D){const A=D||{};return A.type=N,A.start=h(),c.events.push(["enter",A,c]),s.push(A),A}function E(N){const D=s.pop();return D.end=h(),c.events.push(["exit",D,c]),D}function C(N,D){T(N,D.from)}function v(N,D){D.restore()}function I(N,D){return A;function A(M,z,L){let _,H,F,R;return Array.isArray(M)?B(M):"tokenize"in M?B([M]):X(M);function X(G){return te;function te(j){const Q=j!==null&&G[j],le=j!==null&&G.null,fe=[...Array.isArray(Q)?Q:Q?[Q]:[],...Array.isArray(le)?le:le?[le]:[]];return B(fe)(j)}}function B(G){return _=G,H=0,G.length===0?L:P(G[H])}function P(G){return te;function te(j){return R=O(),F=G,G.partial||(c.currentConstruct=G),G.name&&c.parser.constructs.disable.null.includes(G.name)?V():G.tokenize.call(D?Object.assign(Object.create(c),D):c,l,J,V)(j)}}function J(G){return N(F,R),z}function V(G){return R.restore(),++H<_.length?P(_[H]):L}}}function T(N,D){N.resolveAll&&!i.includes(N)&&i.push(N),N.resolve&&wn(c.events,D,c.events.length-D,N.resolve(c.events.slice(D),c)),N.resolveTo&&(c.events=N.resolveTo(c.events,c))}function O(){const N=h(),D=c.previous,A=c.currentConstruct,M=c.events.length,z=Array.from(s);return{from:M,restore:L};function L(){r=N,c.previous=D,c.currentConstruct=A,c.events.length=M,s=z,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 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 Z=(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,M)=>{if(A===y.current)u(z=>{const L=w.current.get(A)??z,j=M(L);return w.current.set(A,j),j});else{const z=w.current.get(A)??[];w.current.set(A,M(z))}},[]),v=b.useCallback((A,M)=>{const z=m.current.get(A);z!=null&&z.stopTimer&&(clearTimeout(z.stopTimer),z.stopTimer=null),m.current.delete(A),w.current.delete(A),A===y.current&&f(M)},[]);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,M,z)=>{var J;const L=y.current;if(L&&((J=m.current.get(L))!=null&&J.busy))return;if(L){const V=W0(x.current);if(V){l==null||l(A),C.current(V,{action:"submit",value:A});return}}l==null||l(A);const j=z??A,H={id:`user_${Date.now()}`,role:"user",parts:[...(M??[]).map(V=>({type:"attachment",attachment:V})),{type:"text",content:j}],timestamp:Date.now(),rawContent:z!=null&&z!==A?A:void 0},F=`assistant_${Date.now()}`,R={id:F,role:"assistant",parts:[],timestamp:Date.now()},X=$.current,B=x.current;u(V=>[...V,H,R]),L&&w.current.set(L,[...B,H,R]),f("submitted"),h(null);const P=V=>{let G="",te=0,_="",Q=[],le=!1,fe;w.current.has(V)||w.current.set(V,[...B,H,R]);const q={abortController:null,busy:!0,stopTimer:null};m.current.set(V,q);const oe=()=>{G&&(Q.push({type:"thinking",content:G,durationMs:Date.now()-te}),G="",te=0)},ie=()=>{_&&(Q.push({type:"text",content:_}),_="")},Ce=()=>{const ne=[...Q];G&&ne.push({type:"thinking",content:G,durationMs:Date.now()-te}),_&&ne.push({type:"text",content:_}),E(V,re=>re.map(se=>se.id===F?{...se,parts:ne,...fe?{roundId:fe}:{}}:se))};q.abortController=t.chat({sessionId:V,message:A,attachments:M&&M.length>0?M:void 0,stream:!0,onMessage:ne=>{switch(le||(le=!0,V===y.current&&f("streaming")),ne.type){case"session.start":ne.roundId&&(fe=ne.roundId,o==null||o(ne.roundId));break;case"user":ne.content&&E(V,re=>re.map(se=>se.id===H.id?{...se,parts:se.parts.map(ye=>ye.type==="text"?{...ye,content:ne.content}:ye)}:se));break;case"thinking":ie(),G||(te=Date.now()),G+=ne.content;break;case"ai":oe(),_+=ne.content;break;case"tool_call":oe(),ie(),Q.push({type:"tool_call",toolName:ne.toolName,toolCallId:ne.toolCallId,args:ne.args??"{}"});break;case"tool_result":oe(),ie(),Q.push({type:"tool_result",toolName:ne.toolName??"",toolCallId:ne.toolCallId,content:ne.content,artifacts:ne.artifacts,renderMode:ne.renderMode,html:ne.html,markdown:ne.markdown,defaultExpanded:ne.defaultExpanded});break;case"interrupt":oe(),ie(),ne.interrupt&&Q.push({type:"interrupt",interrupt:ne.interrupt,resolved:!1}),Ce(),v(V,"ready");return;case"stop":ne.content&&(_=ne.content),Ce();return}Ce()},onDone:ne=>{if((_||Q.length>0||G)&&Ce(),ne.artifacts&&ne.artifacts.length>0){const se=ne.artifacts;E(V,ye=>ye.map(ae=>ae.id===F?{...ae,artifacts:se}:ae))}if(ne.messageId){const se=ne.messageId;E(V,ye=>ye.map(ae=>ae.id===F?{...ae,messageId:se}:ae))}const re=()=>{v(V,"ready"),a==null||a(ne.sessionId||V)};if(X){const se=j.slice(0,30),ye=ne.sessionId||V;t.renameConversation(ye,se).catch(()=>{}).finally(re)}else re()},onError:ne=>{Q.push({type:"error",content:ne.message}),Ce(),V===y.current&&(h(ne),f("error")),s==null||s(ne),v(V,"error")}}),i==null||i(V)};L?P(L):t.createSession().then(V=>{y.current==null&&(y.current=V,r==null||r(V)),P(V)}).catch(V=>{y.current==null&&(h(V instanceof Error?V:new Error(String(V))),f("error")),s==null||s(V instanceof Error?V:new Error(String(V)))})},[t,r,i,a,s,l,E,v]),T=b.useCallback(()=>{const A=y.current;if(!A)return;const M=m.current.get(A);M!=null&&M.busy&&(M.stopTimer&&clearTimeout(M.stopTimer),M.stopTimer=setTimeout(()=>{var z;M.stopTimer=null,(z=M.abortController)==null||z.abort(),v(A,"ready")},8e3),t.stopGeneration(A).catch(()=>{}))},[t,v]),O=b.useCallback(()=>{var j;const A=y.current;if(A&&((j=m.current.get(A))!=null&&j.busy))return;const M=c.findLastIndex(H=>H.role==="user");if(M<0)return;const z=c[M].rawContent??c[M].parts.filter(H=>H.type==="text").map(H=>H.content).join(""),L=c[M].parts.filter(H=>H.type==="attachment").map(H=>H.attachment);u(H=>H.slice(0,M)),I(z,L.length>0?L:void 0)},[c,I]),k=b.useCallback((A,M)=>{var te;const z=y.current;if(!z||(te=m.current.get(z))!=null&&te.busy)return;E(z,_=>_.map(Q=>({...Q,parts:Q.parts.map(le=>le.type==="interrupt"&&le.interrupt.interruptId===A?{...le,resolved:!0,response:M}:le)})));const L={abortController:null,busy:!0,stopTimer:null};m.current.set(z,L);const j=new AbortController;L.abortController=j;let H=0;E(z,_=>_.length>0&&_[_.length-1].role==="assistant"?(H=_[_.length-1].parts.length,_):(H=0,[..._,{id:`assistant_${Date.now()}`,role:"assistant",parts:[],timestamp:Date.now()}])),f("streaming");let F="",R=0,X="",B=[],P;const J=()=>{F&&(B.push({type:"thinking",content:F,durationMs:Date.now()-R}),F="",R=0)},V=()=>{X&&(B.push({type:"text",content:X}),X="")},G=()=>{const _=[...B];F&&_.push({type:"thinking",content:F,durationMs:Date.now()-R}),X&&_.push({type:"text",content:X}),E(z,Q=>{const le=Q.findLastIndex(fe=>fe.role==="assistant");return le<0?Q:Q.map((fe,q)=>q===le?{...fe,parts:[...fe.parts.slice(0,H),..._],...P?{roundId:P}:{}}:fe)})};t.respondInterrupt(A,z,M,_=>{let Q=!1;switch(_.type){case"session.start":_.roundId&&(P=_.roundId);break;case"thinking":V(),F||(R=Date.now()),F+=_.content;break;case"ai":J(),X+=_.content;break;case"tool_call":J(),V(),B.push({type:"tool_call",toolName:_.toolName,toolCallId:_.toolCallId,args:_.args??"{}"});break;case"tool_result":J(),V(),B.push({type:"tool_result",toolName:_.toolName??"",toolCallId:_.toolCallId,content:_.content,artifacts:_.artifacts,renderMode:_.renderMode,html:_.html,markdown:_.markdown,defaultExpanded:_.defaultExpanded});break;case"interrupt":J(),V(),_.interrupt&&B.push({type:"interrupt",interrupt:_.interrupt,resolved:!1}),Q=!0;break;case"stop":_.content&&(X=_.content),a==null||a(z),Q=!0;break;case"done":{const le=_.artifacts&&_.artifacts.length>0?_.artifacts:void 0;(_.messageId||le)&&E(z,fe=>{const q=fe.findLastIndex(oe=>oe.role==="assistant");return q<0?fe:fe.map((oe,ie)=>ie===q?{...oe,..._.messageId?{messageId:_.messageId}:{},...le?{artifacts:le}:{}}:oe)}),a==null||a(z),Q=!0;break}}G(),Q&&v(z,"ready")},_=>{B.push({type:"error",content:_.message}),G(),z===y.current&&(h(_),f("error")),s==null||s(_),v(z,"error")},j.signal).catch(_=>{if((_==null?void 0:_.name)==="AbortError"){v(z,"ready");return}z===y.current&&(h(_ instanceof Error?_:new Error(String(_))),f("error")),s==null||s(_ instanceof Error?_:new Error(String(_))),v(z,"error")})},[t,s,a,E,v]);C.current=k;const N=b.useCallback((A,M)=>{y.current=A;const z=M??w.current.get(A)??[];w.current.set(A,z),u(z)},[]),D=b.useCallback(A=>m.current.has(A)?w.current.get(A)??null:null,[]);return b.useEffect(()=>{var M;if(!n||d!=="ready"||(M=m.current.get(n))!=null&&M.busy)return;const A=zn.popPendingChat();A&&A.sessionId===n&&I(A.message)},[n,d]),{messages:c,status:d,error:p,sendMessage:I,stop:T,regenerate:O,setMessages:u,showSession:N,getLiveMessages:D,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 T=xd(r);T&&!I.items.find(O=>O.sessionId===T)&&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,T=await t.listConversations({page:I,size:ws});if(!f.current)return;p.current=I,i(k=>{const N=new Set(k.map(A=>A.sessionId)),D=T.items.filter(A=>!N.has(A.sessionId));return[...k,...D]});const O=p.current*ws;d(O<T.total)}catch{}finally{h.current=!1,f.current&&c(!1)}}},[t,u]),$=b.useCallback(async(I,T)=>(m(I),(T==null?void 0:T.fetchHistory)===!1?[]:await t.getMessages(I)),[t,m]),x=b.useCallback(async()=>{try{const I=await t.createSession(),T=new Date().toISOString();i(O=>[{sessionId:I,title:"新对话",createTime:T,updateTime:T},...O]),m(I)}catch{m(null)}},[t,m]),E=b.useCallback(async I=>{i(T=>T.filter(O=>O.sessionId!==I)),a===I&&m(null);try{await t.deleteConversation(I)}catch{}},[t,a,m]),v=b.useCallback(async(I,T)=>{await t.renameConversation(I,T),i(O=>O.map(k=>k.sessionId===I?{...k,title:T}: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 wm=b.createContext(null);function Xn(){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,children:o}){const[i,a]=b.useState(!1),[s,l]=b.useState(!1),[c,u]=b.useState(null),[d,f]=b.useState(null),[p,h]=b.useState(!1),[m,w]=b.useState(!1);b.useEffect(()=>{e.getToken().then(()=>{h(!0)}).catch(()=>{h(!0)})},[e]);const y=hm({sdk:e,onConversationChange:t==null?void 0:t.onConversationChange,enabled:p}),$=mm({sdk:e,sessionId:y.activeConversationId,onSessionCreated:F=>{y.setActiveConversationId(F)},onStreamStart:t==null?void 0:t.onStreamStart,onStreamEnd:F=>{var R;(R=t==null?void 0:t.onStreamEnd)==null||R.call(t,F),y.loadConversations()},onError:t==null?void 0:t.onError,onMessageSend:t==null?void 0:t.onMessageSend}),x=b.useCallback(F=>{if(F.type==="link"){window.open(F.url,F.target??"_blank","noopener");return}f(F)},[]),E=b.useCallback(()=>f(null),[]),v=b.useRef(0),C=b.useCallback(async F=>{f(null);const R=++v.current;if($.getLiveMessages(F)){await y.switchConversation(F,{fetchHistory:!1}),$.showSession(F),w(!1);return}w(!0);try{const X=await y.switchConversation(F);if(v.current!==R)return;$.showSession(F,X)}finally{v.current===R&&w(!1)}},[y,$]),I=b.useCallback(async()=>{f(null),$.setMessages([]),await y.newConversation()},[y,$]),T=b.useCallback(async F=>{y.activeConversationId===F&&$.setMessages([]),await y.deleteConversation(F)},[y,$]);b.useEffect(()=>{y.activeConversationId&&$.messages.length===0&&(w(!0),e.getMessages(y.activeConversationId).then(F=>{$.setMessages(F)}).catch(()=>{}).finally(()=>w(!1)))},[]);const O=b.useCallback(()=>{a(F=>!F)},[]),k=b.useCallback(F=>{a(F)},[]),N=b.useCallback(()=>{l(F=>!F),u(F=>null)},[]),D=b.useCallback(F=>{u(F),l(!0)},[]),A=b.useMemo(()=>{const F=new Set,R=[];for(const X of $.messages)if(X.role==="assistant"&&X.artifacts)for(const B of ym(X.artifacts)){const P=B.id||`${B.url}:${B.filename}`;F.has(P)||(F.add(P),R.push(B))}return R},[$.messages]),M=b.useCallback(async F=>{const R=y.activeConversationId;if(!R)return null;try{const X=await e.getMessages(R);$.setMessages(X);const B=F?X.filter(P=>P.role==="assistant"&&P.roundId===F).pop():X.findLast(P=>P.role==="assistant");return(B==null?void 0:B.messageId)??null}catch{return null}},[e,y.activeConversationId,$]),z=b.useCallback(F=>{if(typeof F!="string")return{messageId:F.messageId,roundId:F.roundId};const R=$.messages.find(X=>X.id===F||X.messageId===F);return R?{messageId:R.messageId,roundId:R.roundId}:/^(user|assistant)_/.test(F)?{}:{messageId:F}},[$.messages]),L=b.useCallback((F,R,X)=>{const{messageId:B,roundId:P}=z(F);if(B){e.feedback(B,R,X).catch(()=>{});return}M(P).then(J=>{J&&e.feedback(J,R,X).catch(()=>{})})},[e,z,M]),j=b.useCallback(F=>{const{messageId:R,roundId:X}=z(F);if(R){e.cancelFeedback(R).catch(()=>{});return}M(X).then(B=>{B&&e.cancelFeedback(B).catch(()=>{})})},[e,z,M]),H=b.useMemo(()=>({sdk:e,status:$.status,error:$.error,messages:$.messages,conversations:y.conversations,activeConversationId:y.activeConversationId,isThreadListOpen:i,isArtifactDrawerOpen:s,allArtifacts:A,activePreviewArtifact:c,activePanel:d,hasMore:y.hasMore,conversationsLoading:y.loading,messagesLoading:m,sendMessage:$.sendMessage,attachmentUploader:n??null,nosUpload:r??null,stop:$.stop,regenerate:$.regenerate,switchConversation:C,newConversation:I,deleteConversation:T,renameConversation:y.renameConversation,loadMoreConversations:y.loadMore,toggleThreadList:O,setThreadListOpen:k,toggleArtifactDrawer:N,openArtifactPreview:D,openPanel:x,closePanel:E,feedback:L,cancelFeedback:j,respondToInterrupt:$.respondToInterrupt}),[e,$.status,$.error,$.messages,$.sendMessage,$.stop,$.regenerate,$.respondToInterrupt,n,r,y.conversations,y.activeConversationId,y.renameConversation,y.hasMore,y.loadMore,y.loading,i,s,A,c,d,m,C,I,T,O,k,N,D,x,E,L,j]);return S.jsx(wm.Provider,{value:H,children:o})}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 U0({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 M=()=>h({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",M),()=>window.removeEventListener("resize",M)},[]),b.useEffect(()=>()=>{var M;(M=C.current)==null||M.call(C)},[]);const I=Math.floor(p.height*Ut.MAX_HEIGHT_RATIO),T=Math.min(d||t,I),O=r+n;b.useEffect(()=>{if(!s){const M=p.width-O-20,z=p.height-T-20;a(L=>L.x===M&&L.y===z?L:{x:M,y:z})}},[s,O,T,p]);const k=b.useCallback(M=>{if(c||M.target.closest("button, input, textarea"))return;$.current=!0,v.current=!1,x.current={x:M.clientX,y:M.clientY},E.current={...i};const z=H=>{if(!$.current)return;const F=H.clientX-x.current.x,R=H.clientY-x.current.y;(Math.abs(F)>3||Math.abs(R)>3)&&(v.current=!0),v.current&&(l(!0),a({x:Math.max(-200,Math.min(E.current.x+F,window.innerWidth-100)),y:Math.max(0,Math.min(E.current.y+R,window.innerHeight-48))}))},L=()=>{$.current=!1,j()},j=()=>{document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",L),C.current=null};document.addEventListener("mousemove",z),document.addEventListener("mouseup",L),C.current=j},[c,i]),N=b.useCallback(M=>{M.preventDefault(),M.stopPropagation(),m.current=!0,w.current=M.clientX,y.current=r;const z=i.x+r,L=i.y,j=R=>{if(!m.current)return;const X=R.clientX-w.current;let B=y.current-X;if(B>Ut.MAX_WIDTH){m.current=!1,u(!0),F();return}B=Math.max(Ut.MIN_WIDTH,B),o(B),a({x:z-B,y:L})},H=()=>{m.current=!1,F()},F=()=>{document.removeEventListener("mousemove",j),document.removeEventListener("mouseup",H),C.current=null};document.addEventListener("mousemove",j),document.addEventListener("mouseup",H),C.current=F},[r,i]),D=b.useCallback(()=>{c&&o(e),u(M=>!M)},[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:O,windowHeight:T,startWindowDrag:k,startResize:N,toggleMaximize:D,setIsMaximized:u,setLockedHeight:f,setHasCustomPosition:l,reset:A}}function G0(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 K0(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(K0(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 Y0(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}=Xn(),[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 T=I.currentTarget.getBoundingClientRect();m({text:C.title||"新会话",x:T.right+8,y:T.top+T.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 Q0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Z0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,J0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ey={};function wd(e,t){return(ey.jsx?J0:Z0).test(e)}const ty=/[ \t\n\f\r]/g;function ny(e){return typeof e=="object"?e.type==="text"?vd(e.value):!1:vd(e)}function vd(e){return e.replace(ty,"")===""}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 ry=0;const je=Br(),St=Br(),ml=Br(),me=Br(),lt=Br(),Or=Br(),bn=Br();function Br(){return 2**++ry}const gl=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:St,commaOrSpaceSeparated:bn,commaSeparated:Or,number:me,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:me,ariaColIndex:me,ariaColSpan:me,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:me,ariaLive:null,ariaModal:St,ariaMultiLine:St,ariaMultiSelectable:St,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:St,ariaReadOnly:St,ariaRelevant:null,ariaRequired:St,ariaRoleDescription:lt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:St,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,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 oy=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:me,colSpan:me,command:null,commandFor:null,content:null,contentEditable:St,controls:je,controlsList:lt,coords:me|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:me,hidden:ml,high:me,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:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,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:me,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:me,rowSpan:me,sandbox:lt,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootCustomElementRegistry:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shadowRootSerializable:je,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:St,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:St,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,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:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:St,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:je,disablePictureInPicture:je,disableRemotePlayback:je,exportParts:Or,part:lt,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:Rm}),iy=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:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:bn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:bn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bn,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,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:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,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()}}),ay={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"},sy=/[A-Z]/g,Sd=/-[a-z]/g,ly=/^data[-\w.:]+$/i;function cy(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"&&ly.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Sd,dy);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Sd.test(i)){let a=i.replace(sy,uy);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=eu}return new o(r,t)}function uy(e){return"-"+e.toLowerCase()}function dy(e){return e.charAt(1).toUpperCase()}const fy=$m([km,oy,Pm,Tm,Nm],"html"),tu=$m([km,iy,Pm,Tm,Nm],"svg");function py(e){return e.join(" ").trim()}var nu={},Ed=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,my=/\n/g,gy=/^\s*/,hy=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,by=/^:\s*/,xy=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,yy=/^[;\s]*/,wy=/^\s+|\s+$/g,vy=`
|
|
2
|
+
`,$d="/",kd="*",Tr="",Cy="comment",Sy="declaration";function Ey(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(my);m&&(n+=m.length);var w=h.lastIndexOf(vy);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(gy)}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:Cy,comment:w})}}function f(){var h=i(),m=l(hy);if(m){if(d(),!l(by))return s("property missing ':'");var w=l(xy),y=h({type:Sy,property:Id(m[0].replace(Ed,Tr)),value:w?Id(w[0].replace(Ed,Tr)):Tr});return l(yy),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(wy,Tr):Tr}var $y=Ey,ky=zn.commonjsGlobal&&zn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nu,"__esModule",{value:!0});nu.default=Ry;const Iy=ky($y);function Ry(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Iy.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 Py=/^--[a-zA-Z0-9_-]+$/,Ty=/-([a-z])/g,Ny=/^[^-]+$/,My=/^-(webkit|moz|ms|o|khtml)-/,Ay=/^-(ms)-/,zy=function(e){return!e||Ny.test(e)||Py.test(e)},Oy=function(e,t){return t.toUpperCase()},Rd=function(e,t){return"".concat(t,"-")},Dy=function(e,t){return t===void 0&&(t={}),zy(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Ay,Rd):e=e.replace(My,Rd),e.replace(Ty,Oy))};Ba.camelCase=Dy;var Ly=zn.commonjsGlobal&&zn.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Fy=Ly(nu),_y=Ba;function hl(e,t){var n={};return!e||typeof e!="string"||(0,Fy.default)(e,function(r,o){r&&o&&(n[(0,_y.camelCase)(r,t)]=o)}),n}hl.default=hl;var jy=hl;const By=zn.getDefaultExportFromCjs(jy),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 Hy(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,Vy=new Map,Wy=/[A-Z]/g,qy=new Set(["table","tbody","thead","tfoot","tr"]),Xy=new Set(["td","th"]),zm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Uy(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=tw(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=ew(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:fy,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 Gy(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ky(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Qy(e,t,n);if(t.type==="mdxjsEsm")return Yy(e,t);if(t.type==="root")return Zy(e,t,n);if(t.type==="text")return Jy(e,t)}function Gy(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=nw(e,t);let s=au(e,t);return qy.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!ny(l):!0})),Dm(e,a,i,t),iu(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Ky(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 Yy(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ni(e,t.position)}function Qy(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=rw(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 Zy(e,t,n){const r={};return iu(r,au(e,t)),e.create(t,e.Fragment,r,n)}function Jy(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 ew(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 tw(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 nw(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&ou.call(t.properties,o)){const i=ow(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Xy.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 rw(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:Vy;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 ow(e,t,n){const r=cy(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Q0(n):py(n)),r.property==="style"){let o=typeof n=="object"?n:iw(e,String(n));return e.stylePropertyNameCase==="css"&&(o=aw(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?ay[r.property]||r.property:r.attribute,n]}}function iw(e,t){try{return By(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 aw(e){const t={};let n;for(n in e)ou.call(e,n)&&(t[sw(n)]=e[n]);return t}function sw(e){let t=e.replace(Wy,lw);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function lw(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"]},cw={};function su(e,t){const n=cw,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(uw(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 uw(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;)dw(t,e[n]);return t}function dw(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];fw(o[a],Array.isArray(s)?s:s?[s]:[])}}}function fw(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]/),pw=wr(/[#-'*+\--9=?A-Z^-~]/);function pa(e){return e!==null&&(e<32||e===127)}const xl=wr(/\d/),mw=wr(/[\dA-Fa-f]/),gw=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 hw={tokenize:bw};function bw(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 xw={tokenize:yw},zd={tokenize:ww};function yw(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 T=I,O,k;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(O){k=t.events[T][1].end;break}O=!0}for(y(r),C=I;C<t.events.length;)t.events[C][1].end={...k},C++;wn(t.events,T+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 ww(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:vw,tokenize:Cw};function vw(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 Cw(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 Sw={name:"autolink",tokenize:Ew};function Ew(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):pw(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:$w};function $w(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:Iw},exit:Rw,name:"blockQuote",tokenize:kw};function kw(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 Iw(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 Rw(e){e.exit("blockQuote")}const Hm={name:"characterEscape",tokenize:Pw};function Pw(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 gw(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Vm={name:"characterReference",tokenize:Tw};function Tw(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=mw,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:Mw},Ld={concrete:!0,name:"codeFenced",tokenize:Nw};function Nw(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,T){let O=0;return k;function k(z){return C.enter("lineEnding"),C.consume(z),C.exit("lineEnding"),N}function N(z){return C.enter("codeFencedFence"),qe(z)?Ye(C,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):D(z)}function D(z){return z===s?(C.enter("codeFencedFenceSequence"),A(z)):T(z)}function A(z){return z===s?(O++,C.consume(z),A):O>=a?(C.exit("codeFencedFenceSequence"),qe(z)?Ye(C,M,"whitespace")(z):M(z)):T(z)}function M(z){return z===null||Ae(z)?(C.exit("codeFencedFence"),I(z)):T(z)}}}function Mw(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:zw},Aw={partial:!0,tokenize:Ow};function zw(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(Aw,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 Ow(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 Dw={name:"codeText",previous:Fw,resolve:Lw,tokenize:_w};function Lw(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 Fw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _w(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 jw{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 jw(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,Bw(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 Bw(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 Hw={resolve:Ww,tokenize:qw},Vw={partial:!0,tokenize:Xw};function Ww(e){return Wm(e),e}function qw(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(Vw,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 Xw(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 Uw={name:"definition",tokenize:Kw},Gw={partial:!0,tokenize:Yw};function Kw(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(Gw,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 Yw(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 Qw={name:"hardBreakEscape",tokenize:Zw};function Zw(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 Jw={name:"headingAtx",resolve:e1,tokenize:t1};function e1(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 t1(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 n1=["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"],r1={concrete:!0,name:"htmlFlow",resolveTo:a1,tokenize:s1},o1={partial:!0,tokenize:c1},i1={partial:!0,tokenize:l1};function a1(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 s1(e,t,n){const r=this;let o,i,a,s,l;return c;function c(P){return u(P)}function u(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),i=!0,m):P===63?(e.consume(P),o=3,r.interrupt?t:R):nn(P)?(e.consume(P),a=String.fromCharCode(P),w):n(P)}function f(P){return P===45?(e.consume(P),o=2,p):P===91?(e.consume(P),o=5,s=0,h):nn(P)?(e.consume(P),o=4,r.interrupt?t:R):n(P)}function p(P){return P===45?(e.consume(P),r.interrupt?t:R):n(P)}function h(P){const J="CDATA[";return P===J.charCodeAt(s++)?(e.consume(P),s===J.length?r.interrupt?t:D:h):n(P)}function m(P){return nn(P)?(e.consume(P),a=String.fromCharCode(P),w):n(P)}function w(P){if(P===null||P===47||P===62||ct(P)){const J=P===47,V=a.toLowerCase();return!J&&!i&&Fd.includes(V)?(o=1,r.interrupt?t(P):D(P)):n1.includes(a.toLowerCase())?(o=6,J?(e.consume(P),y):r.interrupt?t(P):D(P)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):i?$(P):x(P))}return P===45||Kt(P)?(e.consume(P),a+=String.fromCharCode(P),w):n(P)}function y(P){return P===62?(e.consume(P),r.interrupt?t:D):n(P)}function $(P){return qe(P)?(e.consume(P),$):k(P)}function x(P){return P===47?(e.consume(P),k):P===58||P===95||nn(P)?(e.consume(P),E):qe(P)?(e.consume(P),x):k(P)}function E(P){return P===45||P===46||P===58||P===95||Kt(P)?(e.consume(P),E):v(P)}function v(P){return P===61?(e.consume(P),C):qe(P)?(e.consume(P),v):x(P)}function C(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),l=P,I):qe(P)?(e.consume(P),C):T(P)}function I(P){return P===l?(e.consume(P),l=null,O):P===null||Ae(P)?n(P):(e.consume(P),I)}function T(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||ct(P)?v(P):(e.consume(P),T)}function O(P){return P===47||P===62||qe(P)?x(P):n(P)}function k(P){return P===62?(e.consume(P),N):n(P)}function N(P){return P===null||Ae(P)?D(P):qe(P)?(e.consume(P),N):n(P)}function D(P){return P===45&&o===2?(e.consume(P),L):P===60&&o===1?(e.consume(P),j):P===62&&o===4?(e.consume(P),X):P===63&&o===3?(e.consume(P),R):P===93&&o===5?(e.consume(P),F):Ae(P)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(o1,B,A)(P)):P===null||Ae(P)?(e.exit("htmlFlowData"),A(P)):(e.consume(P),D)}function A(P){return e.check(i1,M,B)(P)}function M(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),z}function z(P){return P===null||Ae(P)?A(P):(e.enter("htmlFlowData"),D(P))}function L(P){return P===45?(e.consume(P),R):D(P)}function j(P){return P===47?(e.consume(P),a="",H):D(P)}function H(P){if(P===62){const J=a.toLowerCase();return Fd.includes(J)?(e.consume(P),X):D(P)}return nn(P)&&a.length<8?(e.consume(P),a+=String.fromCharCode(P),H):D(P)}function F(P){return P===93?(e.consume(P),R):D(P)}function R(P){return P===62?(e.consume(P),X):P===45&&o===2?(e.consume(P),R):D(P)}function X(P){return P===null||Ae(P)?(e.exit("htmlFlowData"),B(P)):(e.consume(P),X)}function B(P){return e.exit("htmlFlow"),t(P)}}function l1(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 c1(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(gi,t,n)}}const u1={name:"htmlText",tokenize:d1};function d1(e,t,n){const r=this;let o,i,a;return s;function s(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),l}function l(R){return R===33?(e.consume(R),c):R===47?(e.consume(R),v):R===63?(e.consume(R),x):nn(R)?(e.consume(R),T):n(R)}function c(R){return R===45?(e.consume(R),u):R===91?(e.consume(R),i=0,h):nn(R)?(e.consume(R),$):n(R)}function u(R){return R===45?(e.consume(R),p):n(R)}function d(R){return R===null?n(R):R===45?(e.consume(R),f):Ae(R)?(a=d,j(R)):(e.consume(R),d)}function f(R){return R===45?(e.consume(R),p):d(R)}function p(R){return R===62?L(R):R===45?f(R):d(R)}function h(R){const X="CDATA[";return R===X.charCodeAt(i++)?(e.consume(R),i===X.length?m:h):n(R)}function m(R){return R===null?n(R):R===93?(e.consume(R),w):Ae(R)?(a=m,j(R)):(e.consume(R),m)}function w(R){return R===93?(e.consume(R),y):m(R)}function y(R){return R===62?L(R):R===93?(e.consume(R),y):m(R)}function $(R){return R===null||R===62?L(R):Ae(R)?(a=$,j(R)):(e.consume(R),$)}function x(R){return R===null?n(R):R===63?(e.consume(R),E):Ae(R)?(a=x,j(R)):(e.consume(R),x)}function E(R){return R===62?L(R):x(R)}function v(R){return nn(R)?(e.consume(R),C):n(R)}function C(R){return R===45||Kt(R)?(e.consume(R),C):I(R)}function I(R){return Ae(R)?(a=I,j(R)):qe(R)?(e.consume(R),I):L(R)}function T(R){return R===45||Kt(R)?(e.consume(R),T):R===47||R===62||ct(R)?O(R):n(R)}function O(R){return R===47?(e.consume(R),L):R===58||R===95||nn(R)?(e.consume(R),k):Ae(R)?(a=O,j(R)):qe(R)?(e.consume(R),O):L(R)}function k(R){return R===45||R===46||R===58||R===95||Kt(R)?(e.consume(R),k):N(R)}function N(R){return R===61?(e.consume(R),D):Ae(R)?(a=N,j(R)):qe(R)?(e.consume(R),N):O(R)}function D(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),o=R,A):Ae(R)?(a=D,j(R)):qe(R)?(e.consume(R),D):(e.consume(R),M)}function A(R){return R===o?(e.consume(R),o=void 0,z):R===null?n(R):Ae(R)?(a=A,j(R)):(e.consume(R),A)}function M(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||ct(R)?O(R):(e.consume(R),M)}function z(R){return R===47||R===62||ct(R)?O(R):n(R)}function L(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function j(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),H}function H(R){return qe(R)?Ye(e,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):F(R)}function F(R){return e.enter("htmlTextData"),a(R)}}const cu={name:"labelEnd",resolveAll:g1,resolveTo:h1,tokenize:b1},f1={tokenize:x1},p1={tokenize:y1},m1={tokenize:w1};function g1(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 h1(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 b1(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(f1,u,a?u:d)(f):f===91?e.attempt(p1,u,a?c:d)(f):a?u(f):d(f)}function c(f){return e.attempt(m1,u,d)(f)}function u(f){return t(f)}function d(f){return i._balanced=!0,n(f)}}function x1(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 y1(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 w1(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 v1={name:"labelStartImage",resolveAll:cu.resolveAll,tokenize:C1};function C1(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 S1={name:"labelStartLink",resolveAll:cu.resolveAll,tokenize:E1};function E1(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:$1};function $1(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:k1};function k1(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:T1},exit:M1,name:"list",tokenize:P1},I1={partial:!0,tokenize:A1},R1={partial:!0,tokenize:N1};function P1(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(I1,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 T1(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(R1,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 N1(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 M1(e){e.exit(this.containerState.type)}function A1(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:z1,tokenize:O1};function z1(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 O1(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 D1={tokenize:L1};function L1(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(Hw,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 F1={resolveAll:Km()},_1=Gm("string"),j1=Gm("text");function Gm(e){return{resolveAll:Km(e==="text"?B1: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 B1(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 H1={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},V1={91:Uw},W1={[-2]:Ss,[-1]:Ss,32:Ss},q1={35:Jw,42:ta,45:[_d,ta],60:r1,61:_d,95:ta,96:Ld,126:Ld},X1={38:Vm,92:Hm},U1={[-5]:Es,[-4]:Es,[-3]:Es,33:v1,38:Vm,42:yl,60:[Sw,u1],91:S1,92:[Qw,Hm],93:cu,95:yl,96:Dw},G1={null:[yl,F1]},K1={null:[42,95]},Y1={null:[]},Q1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:K1,contentInitial:V1,disable:Y1,document:H1,flow:q1,flowInitial:W1,insideSpan:G1,string:X1,text:U1},Symbol.toStringTag,{value:"Module"}));function Z1(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(N){return a=kn(a,N),w(),a[a.length-1]!==null?[]:(T(t,0),c.events=Va(i,c.events,c),c.events)}function f(N,D){return ev(p(N),D)}function p(N){return J1(a,N)}function h(){const{_bufferIndex:N,_index:D,line:A,column:M,offset:z}=r;return{_bufferIndex:N,_index:D,line:A,column:M,offset:z}}function m(N){o[N.line]=N.column,k()}function w(){let N;for(;r._index<a.length;){const D=a[r._index];if(typeof D=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<D.length;)y(D.charCodeAt(r._bufferIndex));else y(D)}}function y(N){u=u(N)}function $(N){Ae(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,k()):N!==-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=N}function x(N,D){const A=D||{};return A.type=N,A.start=h(),c.events.push(["enter",A,c]),s.push(A),A}function E(N){const D=s.pop();return D.end=h(),c.events.push(["exit",D,c]),D}function v(N,D){T(N,D.from)}function C(N,D){D.restore()}function I(N,D){return A;function A(M,z,L){let j,H,F,R;return Array.isArray(M)?B(M):"tokenize"in M?B([M]):X(M);function X(G){return te;function te(_){const Q=_!==null&&G[_],le=_!==null&&G.null,fe=[...Array.isArray(Q)?Q:Q?[Q]:[],...Array.isArray(le)?le:le?[le]:[]];return B(fe)(_)}}function B(G){return j=G,H=0,G.length===0?L:P(G[H])}function P(G){return te;function te(_){return R=O(),F=G,G.partial||(c.currentConstruct=G),G.name&&c.parser.constructs.disable.null.includes(G.name)?V():G.tokenize.call(D?Object.assign(Object.create(c),D):c,l,J,V)(_)}}function J(G){return N(F,R),z}function V(G){return R.restore(),++H<j.length?P(j[H]):L}}}function T(N,D){N.resolveAll&&!i.includes(N)&&i.push(N),N.resolve&&wn(c.events,D,c.events.length-D,N.resolve(c.events.slice(D),c)),N.resolveTo&&(c.events=N.resolveTo(c.events,c))}function O(){const N=h(),D=c.previous,A=c.currentConstruct,M=c.events.length,z=Array.from(s);return{from:M,restore:L};function L(){r=N,c.previous=D,c.currentConstruct=A,c.events.length=M,s=z,k()}}function k(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function J1(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 ev(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:Bm([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(;!Xm(e););return e}const Hd=/[\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(Hd.lastIndex=d,c=Hd.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 Hm(n.slice(i?2:1),i?16:10)}return uu(n)||e}const Zm={}.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(ye),autolinkProtocol:O,autolinkEmail:O,atxHeading:i(Ce),blockQuote:i(le),characterEscape:O,characterReference:O,codeFenced:i(fe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(fe,a),codeText:i(q,a),codeTextData:O,data:O,codeFlowValue:O,definition:i(oe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(ie),hardBreakEscape:i(re),hardBreakTrailing:i(re),htmlFlow:i(ne,a),htmlFlowData:O,htmlText:i(ne,a),htmlTextData:O,image:i(se),label:a,link:i(ye),listItem:i(he),listItemValue:f,listOrdered:i(ae,d),listUnordered:i(ae),paragraph:i(ce),reference:P,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Ce),strong:i(Ne),thematicBreak:i(Pe)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:Q,autolinkProtocol:j,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:G,characterReference:te,codeFenced:l(w),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:k,codeIndented:l(y),codeText:l(z),codeTextData:k,data:k,definition:l(),definitionDestinationString:E,definitionLabelString:$,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(D),hardBreakTrailing:l(D),htmlFlow:l(A),htmlFlowData:k,htmlText:l(M),htmlTextData:k,image:l(_),label:F,labelText:H,lineEnding:N,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:J,resourceDestinationString:R,resourceTitleString:X,resource:B,setextHeading:l(T),setextHeadingLineSequence:I,setextHeadingText:v,strong:l(),thematicBreak:l()}};Jm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let K={type:"root",children:[]};const ue={stack:[K],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},be=[];let Se=-1;for(;++Se<W.length;)if(W[Se][1].type==="listOrdered"||W[Se][1].type==="listUnordered")if(W[Se][0]==="enter")be.push(Se);else{const de=be.pop();Se=o(W,de,Se)}for(Se=-1;++Se<W.length;){const de=t[W[Se][0]];Zm.call(de,W[Se][1].type)&&de[W[Se][1].type].call(Object.assign({sliceSerialize:W[Se][2].sliceSerialize},ue),W[Se][1])}if(ue.tokenStack.length>0){const de=ue.tokenStack[ue.tokenStack.length-1];(de[1]||Vd).call(ue,void 0,de[0])}for(K.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})},Se=-1;++Se<t.transforms.length;)K=t.transforms[Se](K)||K;return K}function o(W,K,ue){let be=K-1,Se=-1,de=!1,ee,Ee,Ie,Ge;for(;++be<=ue;){const Re=W[be];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?Se++:Se--,Ge=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(ee&&!Ge&&!Se&&!Ie&&(Ie=be),Ge=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ge=void 0}if(!Se&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||Se===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(ee){let ze=be;for(Ee=void 0;ze--;){const Me=W[ze];if(Me[1].type==="lineEnding"||Me[1].type==="lineEndingBlank"){if(Me[0]==="exit")continue;Ee&&(W[Ee][1].type="lineEndingBlank",de=!0),Me[1].type="lineEnding",Ee=ze}else if(!(Me[1].type==="linePrefix"||Me[1].type==="blockQuotePrefix"||Me[1].type==="blockQuotePrefixWhitespace"||Me[1].type==="blockQuoteMarker"||Me[1].type==="listItemIndent"))break}Ie&&(!Ee||Ie<Ee)&&(ee._spread=!0),ee.end=Object.assign({},Ee?W[Ee][1].start:Re[1].end),W.splice(Ee||be,0,["exit",ee,Re[2]]),be++,ue++}if(Re[1].type==="listItemPrefix"){const ze={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};ee=ze,W.splice(be,0,["enter",ze,Re[2]]),be++,ue++,Ie=void 0,Ge=!0}}}return W[K][1]._spread=de,ue}function i(W,K){return ue;function ue(be){s.call(this,W(be),be),K&&K.call(this,be)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(W,K,ue){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([K,ue||void 0]),W.position={start:dr(K.start),end:void 0}}function l(W){return K;function K(ue){W&&W.call(this,ue),c.call(this,ue)}}function c(W,K){const ue=this.stack.pop(),be=this.tokenStack.pop();if(be)be[0].type!==W.type&&(K?K.call(this,W,be[0]):(be[1]||Vd).call(this,W,be[0]));else throw new Error("Cannot close `"+W.type+"` ("+Ko({start:W.start,end:W.end})+"): it’s not open");ue.position.end=dr(W.end)}function u(){return cu(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(W){if(this.data.expectingFirstListItemValue){const K=this.stack[this.stack.length-2];K.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function p(){const W=this.resume(),K=this.stack[this.stack.length-1];K.lang=W}function h(){const W=this.resume(),K=this.stack[this.stack.length-1];K.meta=W}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const W=this.resume(),K=this.stack[this.stack.length-1];K.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const W=this.resume(),K=this.stack[this.stack.length-1];K.value=W.replace(/(\r?\n|\r)$/g,"")}function $(W){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.label=K,ue.identifier=Mn(this.sliceSerialize(W)).toLowerCase()}function x(){const W=this.resume(),K=this.stack[this.stack.length-1];K.title=W}function E(){const W=this.resume(),K=this.stack[this.stack.length-1];K.url=W}function C(W){const K=this.stack[this.stack.length-1];if(!K.depth){const ue=this.sliceSerialize(W).length;K.depth=ue}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function I(W){const K=this.stack[this.stack.length-1];K.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function O(W){const ue=this.stack[this.stack.length-1].children;let be=ue[ue.length-1];(!be||be.type!=="text")&&(be=$e(),be.position={start:dr(W.start),end:void 0},ue.push(be)),this.stack.push(be)}function k(W){const K=this.stack.pop();K.value+=this.sliceSerialize(W),K.position.end=dr(W.end)}function N(W){const K=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ue=K.children[K.children.length-1];ue.position.end=dr(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(K.type)&&(O.call(this,W),k.call(this,W))}function D(){this.data.atHardBreak=!0}function A(){const W=this.resume(),K=this.stack[this.stack.length-1];K.value=W}function M(){const W=this.resume(),K=this.stack[this.stack.length-1];K.value=W}function z(){const W=this.resume(),K=this.stack[this.stack.length-1];K.value=W}function L(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=K,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 K=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=K,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function H(W){const K=this.sliceSerialize(W),ue=this.stack[this.stack.length-2];ue.label=sv(K),ue.identifier=Mn(K).toLowerCase()}function F(){const W=this.stack[this.stack.length-1],K=this.resume(),ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,ue.type==="link"){const be=W.children;ue.children=be}else ue.alt=K}function R(){const W=this.resume(),K=this.stack[this.stack.length-1];K.url=W}function X(){const W=this.resume(),K=this.stack[this.stack.length-1];K.title=W}function B(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function J(W){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.label=K,ue.identifier=Mn(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function V(W){this.data.characterReferenceType=W.type}function G(W){const K=this.sliceSerialize(W),ue=this.data.characterReferenceType;let be;ue?(be=Hm(K,ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):be=uu(K);const Se=this.stack[this.stack.length-1];Se.value+=be}function te(W){const K=this.stack.pop();K.position.end=dr(W.end)}function j(W){k.call(this,W);const K=this.stack[this.stack.length-1];K.url=this.sliceSerialize(W)}function Q(W){k.call(this,W);const K=this.stack[this.stack.length-1];K.url="mailto:"+this.sliceSerialize(W)}function le(){return{type:"blockquote",children:[]}}function fe(){return{type:"code",lang:null,meta:null,value:""}}function q(){return{type:"inlineCode",value:""}}function oe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ie(){return{type:"emphasis",children:[]}}function Ce(){return{type:"heading",depth:0,children:[]}}function re(){return{type:"break"}}function ne(){return{type:"html",value:""}}function se(){return{type:"image",title:null,url:"",alt:null}}function ye(){return{type:"link",title:null,url:"",children:[]}}function ae(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function he(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function ce(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function $e(){return{type:"text",value:""}}function Pe(){return{type:"thematicBreak"}}}function dr(e){return{line:e.line,column:e.column,offset:e.offset}}function Jm(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Jm(e,r):dv(e,r)}}function dv(e,t){let n;for(n in t)if(Zm.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 Vd(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 tv(e){const r={constructs:_m([Q1,...(e||{}).extensions||[]]),content:o(hw),defined:[],document:o(xw),flow:o(D1),lazy:{},string:o(_1),text:o(j1)};return r;function o(i){return a;function a(s){return Z1(r,i,s)}}}function nv(e){for(;!Wm(e););return e}const jd=/[\0\t\n\r]/g;function rv(){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 ov=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function iv(e){return e.replace(ov,av)}function av(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 sv(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),lv(n)(nv(tv(n).document().write(rv()(e,t,!0))))}function lv(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(ye),autolinkProtocol:O,autolinkEmail:O,atxHeading:i(Ce),blockQuote:i(le),characterEscape:O,characterReference:O,codeFenced:i(fe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(fe,a),codeText:i(q,a),codeTextData:O,data:O,codeFlowValue:O,definition:i(oe),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(ie),hardBreakEscape:i(ne),hardBreakTrailing:i(ne),htmlFlow:i(re,a),htmlFlowData:O,htmlText:i(re,a),htmlTextData:O,image:i(se),label:a,link:i(ye),listItem:i(he),listItemValue:f,listOrdered:i(ae,d),listUnordered:i(ae),paragraph:i(ce),reference:P,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Ce),strong:i(Ne),thematicBreak:i(Pe)},exit:{atxHeading:l(),atxHeadingSequence:v,autolink:l(),autolinkEmail:Q,autolinkProtocol:_,blockQuote:l(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:G,characterReference:te,codeFenced:l(w),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:k,codeIndented:l(y),codeText:l(z),codeTextData:k,data:k,definition:l(),definitionDestinationString:E,definitionLabelString:$,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(D),hardBreakTrailing:l(D),htmlFlow:l(A),htmlFlowData:k,htmlText:l(M),htmlTextData:k,image:l(j),label:F,labelText:H,lineEnding:N,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:J,resourceDestinationString:R,resourceTitleString:X,resource:B,setextHeading:l(T),setextHeadingLineSequence:I,setextHeadingText:C,strong:l(),thematicBreak:l()}};Qm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let K={type:"root",children:[]};const ue={stack:[K],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},be=[];let Se=-1;for(;++Se<W.length;)if(W[Se][1].type==="listOrdered"||W[Se][1].type==="listUnordered")if(W[Se][0]==="enter")be.push(Se);else{const de=be.pop();Se=o(W,de,Se)}for(Se=-1;++Se<W.length;){const de=t[W[Se][0]];Ym.call(de,W[Se][1].type)&&de[W[Se][1].type].call(Object.assign({sliceSerialize:W[Se][2].sliceSerialize},ue),W[Se][1])}if(ue.tokenStack.length>0){const de=ue.tokenStack[ue.tokenStack.length-1];(de[1]||Bd).call(ue,void 0,de[0])}for(K.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})},Se=-1;++Se<t.transforms.length;)K=t.transforms[Se](K)||K;return K}function o(W,K,ue){let be=K-1,Se=-1,de=!1,ee,Ee,Ie,Ge;for(;++be<=ue;){const Re=W[be];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?Se++:Se--,Ge=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(ee&&!Ge&&!Se&&!Ie&&(Ie=be),Ge=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ge=void 0}if(!Se&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||Se===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(ee){let ze=be;for(Ee=void 0;ze--;){const Me=W[ze];if(Me[1].type==="lineEnding"||Me[1].type==="lineEndingBlank"){if(Me[0]==="exit")continue;Ee&&(W[Ee][1].type="lineEndingBlank",de=!0),Me[1].type="lineEnding",Ee=ze}else if(!(Me[1].type==="linePrefix"||Me[1].type==="blockQuotePrefix"||Me[1].type==="blockQuotePrefixWhitespace"||Me[1].type==="blockQuoteMarker"||Me[1].type==="listItemIndent"))break}Ie&&(!Ee||Ie<Ee)&&(ee._spread=!0),ee.end=Object.assign({},Ee?W[Ee][1].start:Re[1].end),W.splice(Ee||be,0,["exit",ee,Re[2]]),be++,ue++}if(Re[1].type==="listItemPrefix"){const ze={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};ee=ze,W.splice(be,0,["enter",ze,Re[2]]),be++,ue++,Ie=void 0,Ge=!0}}}return W[K][1]._spread=de,ue}function i(W,K){return ue;function ue(be){s.call(this,W(be),be),K&&K.call(this,be)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(W,K,ue){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([K,ue||void 0]),W.position={start:dr(K.start),end:void 0}}function l(W){return K;function K(ue){W&&W.call(this,ue),c.call(this,ue)}}function c(W,K){const ue=this.stack.pop(),be=this.tokenStack.pop();if(be)be[0].type!==W.type&&(K?K.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");ue.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 K=this.stack[this.stack.length-2];K.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function p(){const W=this.resume(),K=this.stack[this.stack.length-1];K.lang=W}function h(){const W=this.resume(),K=this.stack[this.stack.length-1];K.meta=W}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const W=this.resume(),K=this.stack[this.stack.length-1];K.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const W=this.resume(),K=this.stack[this.stack.length-1];K.value=W.replace(/(\r?\n|\r)$/g,"")}function $(W){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.label=K,ue.identifier=Mn(this.sliceSerialize(W)).toLowerCase()}function x(){const W=this.resume(),K=this.stack[this.stack.length-1];K.title=W}function E(){const W=this.resume(),K=this.stack[this.stack.length-1];K.url=W}function v(W){const K=this.stack[this.stack.length-1];if(!K.depth){const ue=this.sliceSerialize(W).length;K.depth=ue}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function I(W){const K=this.stack[this.stack.length-1];K.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function O(W){const ue=this.stack[this.stack.length-1].children;let be=ue[ue.length-1];(!be||be.type!=="text")&&(be=$e(),be.position={start:dr(W.start),end:void 0},ue.push(be)),this.stack.push(be)}function k(W){const K=this.stack.pop();K.value+=this.sliceSerialize(W),K.position.end=dr(W.end)}function N(W){const K=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ue=K.children[K.children.length-1];ue.position.end=dr(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(K.type)&&(O.call(this,W),k.call(this,W))}function D(){this.data.atHardBreak=!0}function A(){const W=this.resume(),K=this.stack[this.stack.length-1];K.value=W}function M(){const W=this.resume(),K=this.stack[this.stack.length-1];K.value=W}function z(){const W=this.resume(),K=this.stack[this.stack.length-1];K.value=W}function L(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=K,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 K=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=K,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function H(W){const K=this.sliceSerialize(W),ue=this.stack[this.stack.length-2];ue.label=iv(K),ue.identifier=Mn(K).toLowerCase()}function F(){const W=this.stack[this.stack.length-1],K=this.resume(),ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,ue.type==="link"){const be=W.children;ue.children=be}else ue.alt=K}function R(){const W=this.resume(),K=this.stack[this.stack.length-1];K.url=W}function X(){const W=this.resume(),K=this.stack[this.stack.length-1];K.title=W}function B(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function J(W){const K=this.resume(),ue=this.stack[this.stack.length-1];ue.label=K,ue.identifier=Mn(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function V(W){this.data.characterReferenceType=W.type}function G(W){const K=this.sliceSerialize(W),ue=this.data.characterReferenceType;let be;ue?(be=jm(K,ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):be=lu(K);const Se=this.stack[this.stack.length-1];Se.value+=be}function te(W){const K=this.stack.pop();K.position.end=dr(W.end)}function _(W){k.call(this,W);const K=this.stack[this.stack.length-1];K.url=this.sliceSerialize(W)}function Q(W){k.call(this,W);const K=this.stack[this.stack.length-1];K.url="mailto:"+this.sliceSerialize(W)}function le(){return{type:"blockquote",children:[]}}function fe(){return{type:"code",lang:null,meta:null,value:""}}function q(){return{type:"inlineCode",value:""}}function oe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ie(){return{type:"emphasis",children:[]}}function Ce(){return{type:"heading",depth:0,children:[]}}function ne(){return{type:"break"}}function re(){return{type:"html",value:""}}function se(){return{type:"image",title:null,url:"",alt:null}}function ye(){return{type:"link",title:null,url:"",children:[]}}function ae(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function he(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function ce(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function $e(){return{type:"text",value:""}}function Pe(){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):cv(e,r)}}function cv(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 uv(e){const t=this;t.parser=n;function n(r){return sv(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function dv(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 fv(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
5
|
+
`}]}function pv(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 mv(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gv(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hv(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 bv(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 xv(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Zm(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 yv(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zm(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 wv(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 vv(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 Cv(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zm(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 Sv(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 Ev(e,t,n){const r=e.all(t),o=n?$v(n):Jm(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 $v(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=Jm(n[r])}return t}function Jm(e){const t=e.spread;return t??e.children.length>1}function kv(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 Iv(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rv(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Pv(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Tv(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=ru(t.children[1]),l=Mm(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 Nv(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 Mv(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Hd=9,Vd=32;function Av(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Wd(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Wd(t.slice(o),o>0,!1)),i.join("")}function Wd(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===Hd||i===Vd;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===Hd||i===Vd;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function zv(e,t){const n={type:"text",value:Av(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Ov(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Dv={blockquote:dv,break:fv,code:pv,delete:mv,emphasis:gv,footnoteReference:hv,heading:bv,html:xv,imageReference:yv,image:wv,inlineCode:vv,linkReference:Cv,link:Sv,listItem:Ev,list:kv,paragraph:Iv,root:Rv,strong:Pv,table:Tv,tableCell:Mv,tableRow:Nv,text:zv,thematicBreak:Ov,toml:Oi,yaml:Oi,definition:Oi,footnoteDefinition:Oi};function Oi(){}const eg=-1,Wa=0,Qo=1,ma=2,uu=3,du=4,fu=5,pu=6,tg=7,ng=8,{defineProperty:Lv}=Object,rg=typeof self=="object"?self:globalThis,qd=(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 rg[e](t)},Fv=(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 Wa:case eg:return n(a,o);case Qo:{const s=n([],o);for(const l of a)s.push(r(l));return s}case ma:{const s=n({},o);for(const[l,c]of a){const u=r(l),d=r(c);u==="__proto__"?Lv(s,u,{value:d,configurable:!0,enumerable:!0,writable:!0}):s[u]=d}return s}case uu:return n(new Date(a),o);case du:{const{source:s,flags:l}=a;return n(new RegExp(s,l),o)}case fu:{const s=n(new Map,o);for(const[l,c]of a)s.set(r(l),r(c));return s}case pu:{const s=n(new Set,o);for(const l of a)s.add(r(l));return s}case tg:{const{name:s,message:l}=a;return n(typeof rg[s]=="function"?qd(s,l):new Error(l),o)}case ng: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(qd(i,a),o)};return r},Xd=e=>Fv(new Map,e)(0),Pr="",{toString:_v}={},{keys:jv,is:Bv}=Object,Do=e=>{const t=typeof e;if(t!=="object"||!e)return[Wa,t];const n=_v.call(e).slice(8,-1);switch(n){case"Array":return[Qo,Pr];case"Object":return[ma,Pr];case"Date":return[uu,Pr];case"RegExp":return[du,Pr];case"Map":return[fu,Pr];case"Set":return[pu,Pr];case"DataView":return[Qo,n]}return n.includes("Array")?[Qo,n]:e instanceof Error?[tg,e.name||"Error"]:[ma,n]},Di=([e,t])=>e===Wa&&(t==="function"||t==="symbol"),Hv=(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]=Do(a);switch(s){case Wa:{let u=a;switch(l){case"bigint":s=ng,u=a.toString();break;case"number":if(!a&&Bv(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([eg],a)}return o([s,u],a)}case Qo:{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 ma:{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 jv(a))(e||!Di(Do(a[f])))&&u.push([i(f),i(a[f])]);return d}case uu:return o([s,isNaN(a.getTime())?Pr:a.toISOString()],a);case du:{const{source:u,flags:d}=a;return o([s,{source:u,flags:d}],a)}case fu:{const u=[],d=o([s,u],a);for(const[f,p]of a)(e||!(Di(Do(f))||Di(Do(p))))&&u.push([i(f),i(p)]);return d}case pu:{const u=[],d=o([s,u],a);for(const f of a)(e||!Di(Do(f)))&&u.push(i(f));return d}}const{message:c}=a;return o([s,{name:l,message:c}],a)};return i},Ud=(e,{json:t,lossy:n}={})=>{const r=[];return Hv(!(t||n),!!t,new Map,r)(e),r},ga=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Xd(Ud(e,t)):structuredClone(e):(e,t)=>Xd(Ud(e,t));function Vv(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 Wv(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qv(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Vv,r=e.options.footnoteBackLabel||Wv,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:{...ga(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 qa=function(e){if(e==null)return
|
|
10
|
+
`}]}}const qa=function(e){if(e==null)return Kv;if(typeof e=="function")return Xa(e);if(typeof e=="object")return Array.isArray(e)?Xv(e):Uv(e);if(typeof e=="string")return Gv(e);throw new Error("Expected function, string, or object as test")};function Xv(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=qa(e[n]);return Xa(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function Uv(e){const t=e;return Xa(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function Gv(e){return Xa(t);function t(n){return n&&n.type===e}}function Xa(e){return t;function t(n,r,o){return!!(Yv(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function Kv(){return!0}function Yv(e){return e!==null&&typeof e=="object"&&"type"in e}const og=[],Qv=!0,wl=!1,Zv="skip";function ig(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=qa(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=og,h,m,w;if((!t||i(l,c,u[u.length-1]||void 0))&&(p=Jv(n(l,u)),p[0]===wl))return p;if("children"in l&&l.children){const y=l;if(y.children&&p[0]!==Zv)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]===wl)return h;m=typeof h[1]=="number"?h[1]:m+a}}return p}}}function Jv(e){return Array.isArray(e)?e:typeof e=="number"?[Qv,e]:e==null?og:[e]}function mu(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),ig(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 vl={}.hasOwnProperty,eC={};function tC(e,t){const n=t||eC,r=new Map,o=new Map,i=new Map,a={...Dv,...n.handlers},s={all:c,applyData:rC,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:nC,wrap:iC};return mu(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(vl.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=ga(w);return y.children=s.all(u),y}return ga(u)}return(s.options.unknownHandler||oC)(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=Gd(h.value)),!Array.isArray(h)&&h.type==="element")){const m=h.children[0];m&&m.type==="text"&&(m.value=Gd(m.value))}Array.isArray(h)?d.push(...h):d.push(h)}}}return d}}function nC(e,t){e.position&&(t.position=Hy(e))}function rC(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,ga(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function oC(e,t){const n=t.data||{},r="value"in t&&!(vl.call(n,"hProperties")||vl.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 iC(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=Qd(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Qd(n,{file:r,...e||t})}}function Zd(e){if(e)throw e}var na=Object.prototype.hasOwnProperty,lg=Object.prototype.toString,Jd=Object.defineProperty,ef=Object.getOwnPropertyDescriptor,tf=function(t){return typeof Array.isArray=="function"?Array.isArray(t):lg.call(t)==="[object Array]"},nf=function(t){if(!t||lg.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)},rf=function(t,n){Jd&&n.name==="__proto__"?Jd(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},of=function(t,n){if(n==="__proto__")if(na.call(t,n)){if(ef)return ef(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=of(s,n),o=of(t,n),s!==o&&(u&&o&&(nf(o)||(i=tf(o)))?(i?(i=!1,a=r&&tf(r)?r:[]):a=r&&nf(r)?r:{},rf(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&rf(s,{name:n,newValue:o}));return s};const Is=qn.getDefaultExportFromCjs(cC);function El(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 Hn={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 $l(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(!$l(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 Rs=["history","path","basename","stem","extname","dirname"];class cg{constructor(t){let n;t?$l(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<Rs.length;){const i=Rs[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)Rs.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Hn.basename(this.path):void 0}set basename(t){Ts(t,"basename"),Ps(t,"basename"),this.path=Hn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Hn.dirname(this.path):void 0}set dirname(t){af(this.basename,"dirname"),this.path=Hn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Hn.extname(this.path):void 0}set extname(t){if(Ps(t,"extname"),af(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=Hn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$l(t)&&(t=wC(t)),Ts(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Hn.basename(this.path,this.extname):void 0}set stem(t){Ts(t,"stem"),Ps(t,"stem"),this.path=Hn.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 Ps(e,t){if(e&&e.includes(Hn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Hn.sep+"`")}function Ts(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function af(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 bu 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 bu;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Is(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(As("data",this.frozen),this.namespace[t]=n,this):EC.call(this.namespace,t)&&this.namespace[t]||void 0:t?(As("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 Ns("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ns("process",this.parser||this.Parser),Ms("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(),Ns("processSync",this.parser||this.Parser),Ms("processSync",this.compiler||this.Compiler),this.process(t,o),lf("processSync","process",n),r;function o(i,a){n=!0,Zd(i),r=a}}run(t,n,r){sf(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),lf("runSync","run",r),o;function i(a,s){Zd(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Li(n),o=this.compiler||this.Compiler;return Ms("stringify",o),sf(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(As("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=Is(!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];El(m)&&El(p)&&(p=Is(!0,m,p)),r[f]=[c,p,...h]}}}}const $C=new bu().freeze();function Ns(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ms(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function As(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 sf(e){if(!El(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function lf(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Li(e){return kC(e)?e:new cg(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",cf=[],uf={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 ug(e){const t=MC(e),n=AC(e);return zC(t.runSync(t.parse(n),n),e)}function MC(e){const t=e.rehypePlugins||cf,n=e.remarkPlugins||cf,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...uf}:uf;return $C().use(fv).use(n).use(lC,r).use(t)}function AC(e){const t=e.children||"",n=new cg;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 hu(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 Es)if(Object.hasOwn(Es,p)&&Object.hasOwn(u.properties,p)){const h=u.properties[p],m=Es[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 df(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;)sg(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,C={index:x.index,input:x.input,stack:[...u,c]};let v=p(...x,C);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?f.lastIndex=E+1:(h!==E&&$.push({type:"text",value:c.value.slice(h,E)}),Array.isArray(v)?$.push(...v):v&&$.push(v),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 zs="phrasing",Os=["autolink","link","image","label"];function BC(){return{transforms:[GC],enter:{literalAutolink:VC,literalAutolinkEmail:Ds,literalAutolinkHttp:Ds,literalAutolinkWww:Ds},exit:{literalAutolink:UC,literalAutolinkEmail:XC,literalAutolinkHttp:WC,literalAutolinkWww:qC}}}function HC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zs,notInConstruct:Os},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zs,notInConstruct:Os},{character:":",before:"[ps]",after:"\\/",inConstruct:zs,notInConstruct:Os}]}}function VC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ds(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(!dg(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!dg(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=df(e,"(");let i=df(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)||Ha(n))&&(!t||n!==47)}fg.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 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 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: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?
|
|
16
|
-
`)}function
|
|
17
|
-
`&&
|
|
18
|
-
`}function
|
|
13
|
+
`}),n}function Gd(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Kd(e,t){const n=tC(e,t),r=n.one(e,void 0),o=qv(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 aC(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]},sC=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(sC);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 lC(){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?cC(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 cC(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 Vn={basename:uC,dirname:dC,extname:fC,join:pC,sep:"/"};function uC(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 dC(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 fC(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 pC(...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?".":mC(n)}function mC(e){hi(e);const t=e.codePointAt(0)===47;let n=gC(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function gC(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 hC={cwd:bC};function bC(){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 xC(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 yC(e)}function yC(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"||wC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":hC.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"?Vn.basename(this.path):void 0}set basename(t){Rs(t,"basename"),Is(t,"basename"),this.path=Vn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vn.dirname(this.path):void 0}set dirname(t){rf(this.basename,"dirname"),this.path=Vn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vn.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=Vn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Sl(t)&&(t=xC(t)),Rs(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vn.basename(this.path,this.extname):void 0}set stem(t){Rs(t,"stem"),Is(t,"stem"),this.path=Vn.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(Vn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vn.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 wC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vC=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},CC={}.hasOwnProperty;class gu extends vC{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=lC()}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):CC.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);$C(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 SC=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 EC(e)?e:new sg(e)}function EC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function $C(e){return typeof e=="string"||kC(e)}function kC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const IC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sf=[],lf={allowDangerousHtml:!0},RC=/^(https?|ircs?|mailto|xmpp)$/i,PC=[{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=TC(e),n=NC(e);return MC(t.runSync(t.parse(n),n),e)}function TC(e){const t=e.rehypePlugins||sf,n=e.remarkPlugins||sf,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lf}:lf;return SC().use(uv).use(n).use(aC,r).use(t)}function NC(e){const t=e.children||"",n=new sg;return typeof t=="string"&&(n.value=t),n}function MC(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||AC;for(const u of PC)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+IC+u.id,void 0);return mu(e,c),Uy(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 AC(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||RC.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 zC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function OC(e,t,n){const o=qa((n||{}).ignore||[]),i=DC(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 DC(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([LC(o[0]),FC(o[1])])}return t}function LC(e){return typeof e=="string"?new RegExp(zC(e),"g"):e}function FC(e){return typeof e=="function"?e:function(){return e}}const Ms="phrasing",As=["autolink","link","image","label"];function _C(){return{transforms:[XC],enter:{literalAutolink:BC,literalAutolinkEmail:zs,literalAutolinkHttp:zs,literalAutolinkWww:zs},exit:{literalAutolink:qC,literalAutolinkEmail:WC,literalAutolinkHttp:HC,literalAutolinkWww:VC}}}function jC(){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 BC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function zs(e){this.config.enter.autolinkProtocol.call(this,e)}function HC(e){this.config.exit.autolinkProtocol.call(this,e)}function VC(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 WC(e){this.config.exit.autolinkEmail.call(this,e)}function qC(e){this.exit(e)}function XC(e){OC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,UC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),GC]],{ignore:["link","linkReference"]})}function UC(e,t,n,r,o){let i="";if(!cg(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!KC(n)))return!1;const a=YC(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 GC(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 KC(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 YC(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=iS;function QC(){this.buffer()}function ZC(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function JC(){this.buffer()}function eS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function tS(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 nS(e){this.exit(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(){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 aS(){return{enter:{gfmFootnoteCallString:QC,gfmFootnoteCall:ZC,gfmFootnoteDefinitionLabelString:JC,gfmFootnoteDefinition:eS},exit:{gfmFootnoteCallString:tS,gfmFootnoteCall:nS,gfmFootnoteDefinitionLabelString:rS,gfmFootnoteDefinition:oS}}}function sS(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?dg:lS))),c(),l}}function lS(e,t,n){return t===0?e:dg(e,t,n)}function dg(e,t,n){return(n?"":" ")+e}const cS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];fg.peek=mS;function uS(){return{canContainEols:["delete"],enter:{strikethrough:fS},exit:{strikethrough:pS}}}function dS(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:cS}],handlers:{delete:fg}}}function fS(e){this.enter({type:"delete",children:[]},e)}function pS(e){this.exit(e)}function fg(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 mS(){return"~"}function gS(e){return e.length}function hS(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||gS,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 $=bS(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]=uf(r[d]);else{const m=uf(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 bS(e){return e==null?"":String(e)}function uf(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 xS(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()),yS);return o(),a}function yS(e,t,n){return">"+(n?"":" ")+e}function wS(e,t){return df(e,t.inConstruct,!0)&&!df(e,t.notInConstruct,!1)}function df(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 ff(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
17
|
+
`&&wS(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
18
|
+
`}function vS(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 CS(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 SS(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 ES(e,t,n,r){const o=SS(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(CS(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(i,$S);return d(),f}const s=n.createTracker(r),l=o.repeat(Math.max(vS(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 $S(e,t,n){return(n?"":" ")+e}function hu(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 kS(e,t,n,r){const o=hu(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 IS(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 ri(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ha(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}}pg.peek=RS;function pg(e,t,n,r){const o=IS(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=ha(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=ri(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ha(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+ri(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function RS(e,t,n){return n.options.emphasis||"*"}function PS(e,t){let n=!1;return mu(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,wl}),!!((!e.depth||e.depth<3)&&su(e)&&(t.options.setext||n))}function TS(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(PS(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=ri(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c}
|
|
27
|
+
`,...i.current()});return/^[\t ]/.test(c)&&(c=ri(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c}mg.peek=NS;function mg(e){return e.value||""}function NS(){return"<"}gg.peek=MS;function gg(e,t,n,r){const o=hu(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 MS(){return"!"}hg.peek=AS;function hg(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 AS(){return"!"}bg.peek=zS;function bg(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 zS(){return"`"}function xg(e,t){const n=su(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))}yg.peek=OS;function yg(e,t,n,r){const o=hu(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(xg(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 OS(e,t,n){return xg(e,n)?"<":"["}wg.peek=DS;function wg(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 DS(){return"["}function bu(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 LS(e){const t=bu(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 FS(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 vg(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 _S(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?FS(n):bu(n);const s=e.ordered?a==="."?")":".":LS(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),vg(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 jS(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 BS(e,t,n,r){const o=jS(n);let i=n.bulletCurrent||bu(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 HS(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const VS=qa(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function WS(e,t,n,r){return(e.children.some(function(a){return VS(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function qS(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Cg.peek=XS;function Cg(e,t,n,r){const o=qS(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=ha(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=ri(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ha(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+ri(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function XS(e,t,n){return n.options.strong||"*"}function US(e,t,n,r){return n.safe(e.value,r)}function GS(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 KS(e,t,n){const r=(vg(n)+(n.options.ruleSpaces?" ":"")).repeat(GS(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Sg={blockquote:xS,break:ff,code:ES,definition:kS,emphasis:pg,hardBreak:ff,heading:TS,html:mg,image:gg,imageReference:hg,inlineCode:bg,link:yg,linkReference:wg,list:_S,listItem:BS,paragraph:HS,root:WS,strong:Cg,text:US,thematicBreak:KS};function YS(){return{enter:{table:QS,tableData:pf,tableHeader:pf,tableRow:JS},exit:{codeText:eE,table:ZS,tableData:Os,tableHeader:Os,tableRow:Os}}}function QS(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 ZS(e){this.exit(e),this.data.inTable=void 0}function JS(e){this.enter({type:"tableRow",children:[]},e)}function Os(e){this.exit(e)}function pf(e){this.enter({type:"tableCell",children:[]},e)}function eE(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,tE));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function tE(e,t){return t==="|"?t:e}function nE(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=$g.inlineCode(p,h,m);return m.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function iE(){return{exit:{taskListCheckValueChecked:hf,taskListCheckValueUnchecked:hf,paragraph:sE}}}function aE(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:lE}}}function hf(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=$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 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},kg={tokenize:xE,partial:!0},Ig={tokenize:yE,partial:!0},Rg={tokenize:wE,partial:!0},fE={tokenize:vE,partial:!0},Pg={name:"wwwAutolink",tokenize:gE,previous:Ng},Tg={name:"protocolAutolink",tokenize:hE,previous:Mg},lr={name:"emailAutolink",tokenize:mE,previous:Ag},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,Tg];Un[104]=[lr,Tg];Un[87]=[lr,Pg];Un[119]=[lr,Pg];function mE(e,t,n){const r=this;let o,i;return a;function a(d){return!kl(d)||!Ag.call(r,r.previous)||wu(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return kl(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||!Ng.call(r,r.previous)||wu(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(dE,e.attempt(kg,e.attempt(Ig,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)&&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||pa(d)||ct(d)||Fr(d)||Ha(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 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(Rg,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(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 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 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||kl(e))}function kl(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 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 N=r.events.length-1;for(;N>-1;){const M=r.events[N][1].type;if(M==="lineEnding"||M==="linePrefix")N--;else break}const D=N>-1?r.events[N][1].type:null,A=D==="tableHead"||D==="tableRow"?v:l;return A===v&&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):C(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):C(k)}function y(k){return k===45?(e.enter("tableDelimiterFiller"),$(k)):C(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?C(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):C(k)}function C(k){return n(k)}function v(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"),T(k))}function T(k){return k===null||k===124||ct(k)?(e.exit("data"),I(k)):(e.consume(k),k===92?O:T)}function O(k){return k===92||k===124?(e.consume(k),T):T(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&&(bf(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&&bf(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 bf(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 Bm([pE(),SE(),NE(e),OE(),_E()])}const VE={};function zg(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 Og({content:e}){return S.jsx("div",{className:"sa-text-part",children:S.jsx(ug,{remarkPlugins:[zg],children:e})})}const WE="https://at.alicdn.com/t/c/font_5210396_pffyg5g21kn.js";let xf=!1;function Dg(e=WE){if(xf||typeof document>"u")return;xf=!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)}Dg();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-${e}`})})}function qE(e){const t=e/1e3;return t<10?`${t.toFixed(1)}s`:`${Math.round(t)}s`}function Lg({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 Fg({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 yf({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 _g({toolName:e,content:t,renderMode:n,html:r}){const[o,i]=b.useState(!1);let a=t;if(a)try{a=JSON.stringify(JSON.parse(a),null,2)}catch{}return S.jsxs("div",{className:"sa-tool-result-part",children:[S.jsxs("div",{className:"sa-tool-result-header",onClick:()=>i(!o),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 ${o?"expanded":""}`,children:S.jsx(We,{name:"chevron-right",size:12})})]}),o&&(n==="html"&&r?S.jsxs(S.Fragment,{children:[S.jsx(XE,{html:r}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsx(yf,{text:r})})]}):a?S.jsxs(S.Fragment,{children:[S.jsx("pre",{className:"sa-tool-result-content",children:a}),S.jsx("div",{className:"sa-tool-result-actions",children:S.jsx(yf,{text:a})})]}):S.jsx("pre",{className:"sa-tool-result-content",children:"—"}))]})}function jg({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 Bg(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:Bg(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 wf(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(wf);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(wf),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 Hg({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}=Xn();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:wm(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:ym(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 Vg({message:e,onCopy:t,onRegenerate:n,onFeedback:r}){const{status:o,cancelFeedback:i}=Xn(),[a,s]=b.useState(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)=>{s("dislike"),d(!1),r==null||r(e,"dislike",{reason:$,remark:(x==null?void 0:x.trim())||void 0})},[e,r]),y=b.useCallback(()=>{d(!1)},[]);return b.useEffect(()=>{if(!u)return;const $=E=>{f.current&&!f.current.contains(E.target)&&d(!1)},x=E=>{E.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",$),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",$),document.removeEventListener("keydown",x)}},[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 vf({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 Wg({message:e,isStreaming:t,isLast:n,slots:r,avatar:o,artifactPreview:i,showTimestamp:a,collapse:s}){const{regenerate:l,feedback:c,respondToInterrupt:u}=Xn(),d=b.useCallback(()=>{var M;const A=e.parts.filter(z=>z.type==="text").map(z=>z.content).join(`
|
|
30
|
-
`);(M=navigator.clipboard)==null||M.writeText(A).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??
|
|
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 hS(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 rE(){return{exit:{taskListCheckValueChecked:mf,taskListCheckValueUnchecked:mf,paragraph:iE}}}function oE(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:aE}}}function mf(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function iE(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 aE(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 sE(){return[_C(),aS(),uS(),YS(),rE()]}function lE(e){return{extensions:[jC(),sS(e),dS(),nE(e),oE()]}}const cE={tokenize:gE,partial:!0},Eg={tokenize:hE,partial:!0},$g={tokenize:bE,partial:!0},kg={tokenize:xE,partial:!0},uE={tokenize:yE,partial:!0},Ig={name:"wwwAutolink",tokenize:pE,previous:Pg},Rg={name:"protocolAutolink",tokenize:mE,previous:Tg},lr={name:"emailAutolink",tokenize:fE,previous:Ng},Un={};function dE(){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 fE(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(uE,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 pE(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(cE,e.attempt(Eg,e.attempt($g,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function mE(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 gE(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 hE(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 bE(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 xE(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 yE(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 wE={tokenize:RE,partial:!0};function vE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:$E,continuation:{tokenize:kE},exit:IE}},text:{91:{name:"gfmFootnoteCall",tokenize:EE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:CE,resolveTo:SE}}}}function CE(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 SE(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 EE(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 $E(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 kE(e,t,n){return e.check(gi,t,e.attempt(wE,t,n))}function IE(e){e.exit("gfmFootnoteDefinition")}function RE(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 PE(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 TE{constructor(){this.map=[]}add(t,n,r){NE(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 NE(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 ME(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 AE(){return{flow:{null:{name:"table",tokenize:zE,resolveAll:OE}}}}function zE(e,t,n){const r=this;let o=0,i=0,a;return s;function s(k){let N=r.events.length-1;for(;N>-1;){const M=r.events[N][1].type;if(M==="lineEnding"||M==="linePrefix")N--;else break}const D=N>-1?r.events[N][1].type:null,A=D==="tableHead"||D==="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"),T(k))}function T(k){return k===null||k===124||ct(k)?(e.exit("data"),I(k)):(e.consume(k),k===92?O:T)}function O(k){return k===92||k===124?(e.consume(k),T):T(k)}}function OE(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 TE;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=ME(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 DE={name:"tasklistCheck",tokenize:FE};function LE(){return{text:{91:DE}}}function FE(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:_E},t,n)(l):n(l)}}function _E(e,t,n){return Ye(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function jE(e){return _m([dE(),vE(),PE(e),AE(),LE()])}const BE={};function Mg(e){const t=this,n=e||BE,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(jE(n)),i.push(sE()),a.push(lE(n))}function Ag({content:e}){return S.jsx("div",{className:"sa-text-part",children:S.jsx(lg,{remarkPlugins:[Mg],children:e})})}const HE="//at.alicdn.com/t/c/font_5210396_5l251pz1zln.js";let hf=!1;function zg(e=HE){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 VE(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?VE(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 WE({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(WE,{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 qE({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 XE(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=XE(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 UE({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 GE({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 KE(e){return typeof e=="string"?{value:e,label:e}:e}function YE({interrupt:e,onRespond:t,disabled:n,initialValue:r}){const o=(e.options??[]).map(KE),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 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=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 JE({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 e$({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:"*"})]}),t$(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 t$(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(UE,{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(GE,{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(YE,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"multiSelect":return S.jsx(ZE,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"input":return S.jsx(JE,{interrupt:e,onRespond:r,disabled:o,initialValue:i});case"form":return S.jsx(e$,{interrupt:e,onRespond:r,disabled:o,initialValue:i});default:return S.jsxs("div",{className:"sa-interrupt-unknown",children:["未知的交互类型: ",e.interruptType]})}}function n$({files:e,artifactPreview:t}){const{openArtifactPreview:n}=Xn();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 r$=[{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}=Xn(),[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(o$,{onSubmit:w,onCancel:y})})]})}function o$({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:r$.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 i$=/^(https?:\/\/|data:|blob:|\/\/|\/|\.\/|\.\.\/)/;function yf({src:e,alt:t}){return e?i$.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}=Xn(),d=b.useCallback(()=>{var M;const A=e.parts.filter(z=>z.type==="text").map(z=>z.content).join(`
|
|
30
|
+
`);(M=navigator.clipboard)==null||M.writeText(A).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??Ag,m=r.ThinkingPart??Og,w=r.ToolCallPart??Dg,y=r.ToolResultPart??Lg,$=r.ErrorPart??Fg,x=r.ActionBar??Bg,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,T=s?(v==null?void 0:v.expandWhileStreaming)??!0:!1,O=new Set(e.parts.filter(A=>A.type==="tool_result").map(A=>A.toolCallId)),k=t&&n,N=!f&&e.parts.some(A=>A.type==="text"&&A.content),D=!f&&e.parts.some(A=>A.type==="thinking");return S.jsxs("div",{className:`sa-message ${f?"sa-message-user":"sa-message-assistant"}`,children:[!f&&S.jsx(yf,{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:Y0(e.timestamp)}),S.jsxs("div",{className:"sa-message-body",children:[e.parts.map((A,M)=>{switch(A.type){case"text":return S.jsx(h,{content:A.content},M);case"attachment":return S.jsx(qE,{attachment:A.attachment},M);case"thinking":return S.jsx(m,{content:A.content,durationMs:A.durationMs,isStreaming:t&&n,expandWhileStreaming:C,showDuration:I},M);case"tool_call":return S.jsx(w,{toolName:A.toolName,toolCallId:A.toolCallId,args:A.args,pending:k&&!O.has(A.toolCallId),expandWhileStreaming:T},M);case"tool_result":return S.jsx(y,{toolName:A.toolName,toolCallId:A.toolCallId,content:A.content,artifacts:A.artifacts,renderMode:A.renderMode,html:A.html,defaultExpanded:A.defaultExpanded,artifactPreview:i},M);case"error":return S.jsx($,{content:A.content,onRetry:l},M);case"interrupt":return S.jsx(jg,{interrupt:A.interrupt,resolved:A.resolved??!1,response:A.response,onRespond:z=>u(A.interrupt.interruptId,z)},M);default:return null}}),t&&n&&!f&&!N&&!D&&S.jsx("span",{className:"sa-thinking-indicator",children:"思考中…"}),!f&&e.artifacts&&e.artifacts.length>0&&S.jsx(n$,{files:ym(e.artifacts),artifactPreview:i}),!f&&!t&&N&&S.jsx(x,{message:e,onCopy:d,onRegenerate:n?l:void 0,onFeedback:c})]})]}),f&&(o==null?void 0:o.user)&&S.jsx(yf,{src:o.user,alt:"用户"})]})}function Vg({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 yu({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}=Xn(),{containerRef:h}=Em([u]),m=d==="streaming"||d==="submitted",w=e.WelcomeScreen??Vg,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(Hg,{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 Ke=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 wf=process.env.NODE_ENV!=="test"&&vn()?g.useLayoutEffect:g.useEffect,Bt=(e,t)=>{const n=g.useRef(!0);wf(()=>e(n.current),t),wf(()=>(n.current=!1,()=>{n.current=!0}),[])},a$=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 Wg=e=>+setTimeout(e,16),qg=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(Wg=e=>window.requestAnimationFrame(e),qg=e=>window.cancelAnimationFrame(e));let vf=0;const Ua=new Map;function Xg(e){Ua.delete(e)}const xt=(e,t=1)=>{vf+=1;const n=vf;function r(o){if(o===0)Xg(n),e();else{const i=Wg(()=>{r(o-1)});Ua.set(n,i)}}return r(t),n};xt.cancel=e=>{const t=Ua.get(e);return Xg(e),qg(t)};process.env.NODE_ENV!=="production"&&(xt.ids=()=>Ua);function s$(e){const[t,n]=g.useState(e),r=g.useRef(null),o=Ke(()=>{if(r.current){const[a,s]=r.current;a?xt.cancel(s):clearTimeout(s),r.current=null}}),i=Ke((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 l$(){return{...g}.useId}let Cf=0;const Sf=l$(),Ga=Sf?function(t){const n=Sf();return t||(process.env.NODE_ENV==="test"?"test-id":n)}:function(t){const[n,r]=g.useState("ssr-id");return g.useEffect(()=>{const o=Cf;Cf+=1,r(`rc_unique_${o}`)},[]),t||(process.env.NODE_ENV==="test"?"test-id":n)};function Ka(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 c$(e){const[,t]=g.useReducer(i=>i+1,0),n=g.useRef(e),r=Ke(()=>n.current),o=Ke(i=>{n.current=typeof i=="function"?i(n.current):i,t()});return[r,o]}var $l={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 Ef;function u$(){if(Ef)return nt;Ef=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 $f;function d$(){return $f||($f=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"?$l.exports=u$():$l.exports=d$();var Ds=$l.exports;const f$=Symbol.for("react.element"),p$=Symbol.for("react.transitional.element"),m$=Symbol.for("react.fragment");function Ug(e){return e&&typeof e=="object"&&(e.$$typeof===f$||e.$$typeof===p$)&&e.type===m$}const g$=Number(b.version.split(".")[0]),h$=(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=>{h$(r,n)})}},Hr=(...e)=>Ka(()=>Gn(...e),e,(t,n)=>t.length!==n.length||t.every((r,o)=>r!==n[o])),Eo=e=>{var n,r;if(!e)return!1;if(wu(e)&&g$>=19)return!0;const t=Ds.isMemo(e)?e.type.type:e.type;return!(typeof t=="function"&&!((n=t.prototype)!=null&&n.render)&&t.$$typeof!==Ds.ForwardRef||typeof e=="function"&&!((r=e.prototype)!=null&&r.render)&&e.$$typeof!==Ds.ForwardRef)};function wu(e){return b.isValidElement(e)&&!Ug(e)}const Gg=e=>wu(e)&&Eo(e),cr=e=>{if(e&&wu(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function b$(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 kf="data-rc-order",If="data-rc-priority",x$="rc-util-key",kl=new Map;function Kg({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:x$}function Ya(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function y$(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function vu(e){return Array.from((kl.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function Yg(e,t={}){if(!vn())return null;const{csp:n,prepend:r,priority:o=0}=t,i=y$(r),a=i==="prependQueue",s=document.createElement("style");s.setAttribute(kf,i),a&&o&&s.setAttribute(If,`${o}`),n!=null&&n.nonce&&(s.nonce=n==null?void 0:n.nonce),s.innerHTML=e;const l=Ya(t),{firstChild:c}=l;if(r){if(a){const u=(t.styles||vu(l)).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(kf)))return!1;const f=Number(d.getAttribute(If)||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 Qg(e,t={}){let{styles:n}=t;return n||(n=vu(Ya(t))),n.find(r=>r.getAttribute(Kg(t))===e)}function oi(e,t={}){const n=Qg(e,t);n&&Ya(t).removeChild(n)}function w$(e,t){const n=kl.get(e);if(!n||!b$(document,n)){const r=Yg("",t),{parentNode:o}=r;kl.set(e,o),e.removeChild(r)}}function Dr(e,t,n={}){var l,c,u;const r=Ya(n),o=vu(r),i={...n,styles:o};w$(r,i);const a=Qg(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=Yg(e,i);return s.setAttribute(Kg(i),t),s}function go(e){return e instanceof HTMLElement||e instanceof SVGElement}function Cu(e){return e&&typeof e=="object"&&go(e.nativeElement)?e.nativeElement:go(e)?e:null}const Su=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 Rf(e,t=!1){if(Su(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 v$(e,t=!1){const n=[...e.querySelectorAll("*")].filter(r=>Rf(r,t));return Rf(e,t)&&n.unshift(e),n}function Zg(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 Jg(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function C$(e){return Jg(e)instanceof ShadowRoot}function Il(e){return C$(e)?Jg(e):null}const Eu={TAB:9,ENTER:13,ESC:27,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};function S$(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),oi(t),{width:a,height:s}}function
|
|
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),oi(t),{width:a,height:s}}function E$(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:S$(e)}let Rl={};const $u=[],$$=e=>{$u.push(e)};function ba(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=$u.reduce((r,o)=>o(r??"","warning"),t);n&&console.error(`Warning: ${n}`)}}function k$(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=$u.reduce((r,o)=>o(r??"","note"),t);n&&console.warn(`Note: ${n}`)}}function I$(){Rl={}}function eh(e,t,n){!t&&!Rl[n]&&(e(!1,n),Rl[n]=!0)}function tt(e,t){eh(ba,e,t)}function R$(e,t){eh(k$,e,t)}tt.preMessage=$$;tt.resetWarned=I$;tt.noteOnce=R$;function ii(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 Pl(e){return e!=null}function xi(e){return Pl(e)&&e!==!1&&e!==""}var ku={exports:{}};ku.exports=Iu;ku.exports.isMobile=Iu;ku.exports.default=Iu;const P$=/(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,T$=/CrOS/,N$=/android|ipad|playbook|silk/i;function Iu(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=P$.test(t)&&!T$.test(t)||!!e.tablet&&N$.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 M$=`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`,A$=`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`,z$=`${M$} ${A$}`.split(/[\s\n]+/),O$="aria-",D$="data-";function Pf(e,t){return e.indexOf(t)===0}function th(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"||Pf(o,O$))||n.data&&Pf(o,D$)||n.attr&&z$.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)):Ug(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 nh(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]=nh(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:nh(e,t,n,r)}function L$(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Tf(e){return Array.isArray(e)?[]:{}}const F$=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function _$(e,t={}){const{prepareArray:n}=t,r=n||(()=>[]);let o=Tf(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||L$(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,Tf(u))),F$(u).forEach(p=>{Object.getOwnPropertyDescriptor(u,p).enumerable&&a([...s,p],c)})}}else o=xn(o,s,u)}a([])}),o}function oo(...e){return _$(e)}const xa="__rc_react_root__";function j$(e,t){const n=t[xa]||pm.createRoot(t);n.render(e),t[xa]=n}async function B$(e){return Promise.resolve().then(()=>{var t;(t=e[xa])==null||t.unmount(),delete e[xa]})}function rh(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=rh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Y(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=rh(e))&&(r&&(r+=" "),r+=t);return r}const oh=g.createContext({}),H$=e=>{const{children:t,...n}=e,r=g.useMemo(()=>({motion:n.motion}),[n.motion]);return g.createElement(oh.Provider,{value:r},t)},Wn="none",_i="appear",ji="enter",Bi="leave",Nf="none",Tn="prepare",Nr="start",Mr="active",Ru="end",ih="prepared";function Mf(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 V$(e,t){const n={animationend:Mf("Animation","AnimationEnd"),transitionend:Mf("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}const W$=V$(vn(),typeof window<"u"?window:{});let ah={};vn()&&({style:ah}=document.createElement("div"));const Hi={};function sh(e){if(Hi[e])return Hi[e];const t=W$[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 ah)return Hi[e]=t[i],Hi[e]}}return""}const lh=sh("animationend"),ch=sh("transitionend"),q$=!!(lh&&ch),Af=lh||"animationend",zf=ch||"transitionend";function Of(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 X$=e=>{const t=b.useRef();function n(o){o&&(o.removeEventListener(zf,e),o.removeEventListener(Af,e))}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(zf,e),o.addEventListener(Af,e),t.current=o)}return g.useEffect(()=>()=>{n(t.current),t.current=null},[]),[r,n]},uh=vn()?b.useLayoutEffect:b.useEffect,U$=()=>{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]},G$=[Tn,Nr,Mr,Ru],K$=[Tn,ih],dh=!1,Y$=!0;function fh(e){return e===Mr||e===Ru}const Q$=(e,t,n)=>{const[r,o]=a$(Nf),[i,a]=U$();function s(){o(Tn,!0)}const l=t?K$:G$;return uh(()=>{if(r!==Nf&&r!==Ru){const c=l.indexOf(r),u=l[c+1],d=n(r);d===dh?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 Z$(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,T]=c$(Wn),[O,k]=g.useState([null,null]),N=I(),D=b.useRef(!1),A=b.useRef(null);function M(){return n()}const z=b.useRef(!1);function L(){T(Wn),k([null,null])}const j=Ke(_=>{const Q=I();if(Q===Wn)return;const le=M();if(_&&!_.deadline&&_.target!==le)return;const fe=z.current;let q;Q===_i&&fe?q=y==null?void 0:y(le,_):Q===ji&&fe?q=$==null?void 0:$(le,_):Q===Bi&&fe&&(q=x==null?void 0:x(le,_)),fe&&q!==!1&&L()}),[H]=X$(j),F=_=>{switch(_){case _i:return{[Tn]:l,[Nr]:d,[Mr]:h};case ji:return{[Tn]:c,[Nr]:f,[Mr]:m};case Bi:return{[Tn]:u,[Nr]:p,[Mr]:w};default:return{}}},R=g.useMemo(()=>F(N),[N]),[X,B]=Q$(N,!e,_=>{var Q;if(_===Tn){const le=R[Tn];return le?le(M()):dh}return _ in R&&k([((Q=R[_])==null?void 0:Q.call(R,M(),null))||null,_]),_===Mr&&N!==Wn&&(H(M()),a>0&&(clearTimeout(A.current),A.current=setTimeout(()=>{j({deadline:!0})},a))),_===ih&&L(),Y$}),P=fh(B);z.current=P;const J=b.useRef(null);uh(()=>{if(D.current&&J.current===t)return;C(t);const _=D.current;D.current=!0;let Q;!_&&t&&o&&(Q=_i),_&&t&&r&&(Q=ji),(_&&!t&&i||!_&&s&&!t&&i)&&(Q=Bi);const le=F(Q);Q&&(e||le[Tn])?(T(Q),X()):T(Wn),J.current=t},[t]),b.useEffect(()=>{(N===_i&&!o||N===ji&&!r||N===Bi&&!i)&&T(Wn)},[o,r,i]),b.useEffect(()=>()=>{D.current=!1,clearTimeout(A.current)},[]);const V=g.useRef(!1);b.useEffect(()=>{v&&(V.current=!0),v!==void 0&&N===Wn&&((V.current||v)&&(E==null||E(v)),V.current=!0)},[v,N]);let G=O[0];R[Tn]&&B===Nr&&(G={transition:"none",...G});const te=O[1];return[I,B,G,v??t,!D.current&&N===Wn&&e&&o?"NONE":B===Nr||B===Mr?te===B:!0]}function J$(e){return(e==null?void 0:e.length)<2}function ek(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(oh),h=n(o,p),m=b.useRef();function w(){return Cu(m.current)}const[y,$,x,E,v]=Z$(h,a,w,o),C=y(),I=g.useRef(E);E&&(I.current=!0);const T=g.useMemo(()=>{const N={};return Object.defineProperties(N,{nativeElement:{enumerable:!0,get:w},inMotion:{enumerable:!0,get:()=>()=>y()!==Wn},enableMotion:{enumerable:!0,get:()=>()=>h}}),N},[]);g.useImperativeHandle(i,()=>T,[]);const O=g.useRef(0);v&&(O.current+=1);const k=g.useMemo(()=>{if(v==="NONE")return null;let N;const D={...f,visible:a};if(!c)N=null;else if(C===Wn)E?N=c({...D},m):!s&&I.current&&d?N=c({...D,className:d},m):l||!s&&!d?N=c({...D,style:{display:"none"}},m):N=null;else{let A;$===Tn?A="prepare":fh($)?A="active":$===Nr&&(A="start");const M=Of(u,`${C}-${A}`);N=c({...D,className:Y(Of(u,C),{[M]:M&&A,[u]:typeof u=="string"}),style:x},m)}return N},[O.current]);if(J$(c)&&Gg(k)){const N=cr(k);if(N!==m)return g.cloneElement(k,{ref:Gn(N,m)})}return k});return r.displayName="CSSMotion",r}const vr=ek(q$);var ph={};Object.defineProperty(ph,"__esModule",{value:!0});var Qa=ph.default=ak;const tk=`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`,nk=`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 Ff(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"||Ff(o,ak))||n.data&&Ff(o,sk)||n.attr&&ik.includes(o))&&(r[o]=e[o])}),r}function hh(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:{}},Nu=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 Ml(e){return e.join(dk)}let _f=0;class fk{constructor(t){Z(this,"instanceId");Z(this,"cache",new Map);Z(this,"updateTimes",new Map);Z(this,"extracted",new Set);this.instanceId=t}get(t){return this.opGet(Ml(t))}opGet(t){return this.cache.get(t)||null}update(t,n){return this.opUpdate(Ml(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,_f),_f+=1)}}const Mu="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(){Z(this,"cache");Z(this,"keys");Z(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)}};Z(co,"MAX_CACHE_SIZE",20),Z(co,"MAX_CACHE_OFFSET",5);let Al=co,jf=0;class bh{constructor(t){Z(this,"derivatives");Z(this,"id");this.derivatives=Array.isArray(t)?t:[t],this.id=jf,t.length===0&&ba(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),jf+=1}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const _s=new Al;function ya(e){const t=Array.isArray(e)?e:[e];return _s.has(t)||_s.set(t,new bh(t)),_s.get(t)}const hk=new WeakMap,js={};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(js)||n.set(js,e()),n.get(js)}const Bf=new WeakMap;function Zo(e){let t=Bf.get(e)||"";return t||(Object.keys(e).forEach(n=>{const r=e[n];t+=n,r instanceof bh?t+=r.id:r&&typeof r=="object"?t+=Zo(r):t+=r}),t=ai(t),Bf.set(e,t)),t}function xk(e,t){return ai(`${t}_${Zo(e)}`)}const zl=vn();function xe(e){return typeof e=="number"?`${e}px`:e}function xh(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 Au(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=`${xh({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("")}}`},yh=(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 Ol=!1;function Ck(){return Ol}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)=>(Ol=!0,setTimeout(()=>{Ol=!1},0),t(...n))}}const Vi=new Map;function zu(e,t,n,r,o){const{cache:i}=g.useContext(yi),a=[e,...t],s=Ml(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[${Mu}="${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 wh(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 zu(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),C=`${$k}-${E}`;$._tokenKey=xk($,x);const[v,I]=yh(y,u.key,{prefix:u.prefix,ignore:u.ignore,unitless:u.unitless,preserve:u.preserve,hashPriority:i,hashCls:u.hashed?C:void 0});return v._hashId=E,kk(u.key),[v,C,$,I,u.key]},([,,,,y])=>{Pk(y,r)},([,,,y,$])=>{if(!y)return;let x={mark:nr,prepend:"queue",attachTo:o,priority:-999};x=Au(x,d);const E=Dr(y,ai(`css-var-${$}`),x);E[er]=r,E.setAttribute(Mu,$)})}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-",vh="comm",Ou="rule",Du="decl",Ak="@import",zk="@namespace",Ch="@keyframes",Ok="@layer",Dk=Math.abs,ei=String.fromCharCode,Dl=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 Sh(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 Bs(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 Eh(e){return e.length}function qo(e,t){return t.push(e),e}function Fk(e,t){return e.map(t).join("")}function Hf(e,t){return e.filter(function(n){return!Zn(n,t)})}var Za=1,ho=1,$h=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 Dl(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<$h?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,$h=Nn($o=e),Rn=0,[]}function Hk(e){return $o="",e}function Hs(e){return Sh(es(Rn-1,Ll(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 Ll(e){for(;An();)switch(Et){case e:return Rn;case 34:case 39:e!==34&&e!==39&&Ll(Et);break;case 40:e===41&&Ll(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 Vf(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="",C=o,v=i,I=r,T=E;w;)switch(h=x,x=An()){case 40:h!=108&&Mt(T,d-1)==58?($++,T+="("):T+=Hs(x);break;case 41:$--,T+=")";break;case 34:case 39:case 91:T+=Hs(x);break;case 9:case 10:case 13:case 32:if($>0){T+=ei(x);break}T+=Vk(h);break;case 92:T+=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(T)&&_r(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:s[c++]=Nn(T)*y;case 125*m:case 59:case 0:if($>0&&x){T+=ei(x);break}switch(x){case 0:case 125:w=0;case 59+u:y==-1&&(T=He(T,/\f/g,"")),p>0&&(Nn(T)-d||m===0)&&qo(p>32?qf(T+";",r,n,d-1,l):qf(He(T," ","")+";",r,n,d-2,l),l);break;case 59:T+=";";default:if(qo(I=Wf(T,t,n,c,u,o,s,E,C=[],v=[],d,i),i),x===123)if(u===0)ia(T,t,I,I,C,i,d,s,v);else{switch(f){case 99:if(Mt(T,3)===110)break;case 108:if(Mt(T,2)===97)break;default:u=0;case 100:case 109:case 115:}u?ia(e,I,I,r&&qo(Wf(e,I,I,0,0,o,s,E,o,C=[],d,v),v),o,v,d,s,r?C:v):ia(T,I,I,I,[""],v,0,s,v)}}c=u=p=0,m=y=1,E=T="",d=a;break;case 58:d=1+Nn(T),p=h;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&jk()==125)continue}switch(T+=ei(x),x*m){case 38:y=u>0?1:(T+="\f",-1);break;case 44:if($>0)break;s[c++]=(Nn(T)-1)*y,y=1;break;case 64:gr()===45&&(T+=Hs(An())),f=gr(),u=d=Nn(E=T+=Xk(oa())),x++;break;case 45:h===45&&Nn(T)==2&&(m=0)}}return i}function Wf(e,t,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,p=o===0?i:[""],h=Eh(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=Sh(w>0?p[$]+" "+x:He(x,/&\f/g,p[$])))&&(l[y++]=E);return Ja(e,t,n,o===0?Ou:s,l,c,u,d)}function Uk(e,t,n,r){return Ja(e,t,n,vh,ei(_k()),_r(e,2,-2),0,r)}function qf(e,t,n,r,o){return Ja(e,t,n,Du,_r(e,0,r),_r(e,r+1,-1),r,o)}function kh(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/)})?~Bs(e+(n=n[t].value),"span")?e:ut+He(e,"-start","")+e+ut+"grid-row-span:"+(~Bs(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~Bs(e,"stretch")?kh(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 Xf(e,t,n,r){switch(e.type){case Ok:if(e.children.length)break;case Ak:case zk:case Du:return e.return=e.return||e.value;case vh:return"";case Ch:return e.return=e.value+"{"+li(e.children,r)+"}";case Ou: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=Eh(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 Du:e.return=kh(e.value,e.length,n);return;case Ch:return li([pr(e,{value:He(e.value,"@","@"+Je)})],r);case Ou: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]})),Dl(e,{props:Hf(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]})),Dl(e,{props:Hf(n,r)});break}return""})}}function Ih(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)!=="'"))&&Ih(`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"&&Ih(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`,n)},Uf="data-ant-cssinjs-cache-path",Rh="_FILE_STYLE__";let Lr,Ph=!0;function Zk(){var e;if(!Lr&&(Lr={},vn())){const t=document.createElement("div");t.className=Uf,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[${Uf}]`);r&&(Ph=!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(Ph)n=Rh;else{const r=document.querySelector(`style[${nr}="${Lr[e]}"]`);r?n=r.innerHTML:delete Lr[e]}return[n,t]}const Th="_skip_check_",Nh="_multi_value_";function Vs(e,t){return(t?li(Vf(e),Gk([Kk,Xf])):li(Vf(e),Xf)).replace(/\{%%%\:[^;];}/g,";")}function t2(e){return typeof e=="object"&&e&&(Th in e||Nh in e)}function Gf(e,t,n="high"){if(!t)return e;const r=xh({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 Fl=(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[$]=Fl(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
|
|
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 Bh(e,t){return y2(e)||w2(e,t)||jh(e,t)||v2()}function C2(e,t){if(zn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hh(e){var t=C2(e,"string");return zn(t)=="symbol"?t:t+""}function Wn(e,t,n){return(t=Hh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yf(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?Yf(Object(n),!0).forEach(function(r){Wn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yf(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,Hh(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 Vl(e,t){return Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Vl(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&&Vl(e,t)}function va(e){return va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},va(e)}function Vh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vh=function(){return!!e})()}function $2(e,t){if(t&&(zn(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=Vh();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)}),Wh="CALC_UNIT",R2=new RegExp(Wh,"g");function qs(e){return typeof e=="number"?"".concat(e).concat(Wh):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),Wn(aa(i),"result",""),Wn(aa(i),"unitlessCssVar",void 0),Wn(aa(i),"lowPriority",void 0);var a=zn(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):a==="number"?i.result=qs(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(qs(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(qs(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)}},Qf=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 Zf(e,t,n,r){var o=cn({},t[e]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(s){var l=Bh(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 qh=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",Wl=!0;function yt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!qh)return Object.assign.apply(Object,[{}].concat(t));Wl=!1;var r={};return t.forEach(function(o){if(zn(o)==="object"){var i=Object.keys(o);i.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return o[a]}})})}}),Wl=!0,r}var Jf={};function N2(){}var M2=function(t){var n,r=t,o=N2;return qh&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(a,s){if(Wl){var l;(l=n)===null||l===void 0||l.add(s)}return a[s]}}),o=function(a,s){var l;Jf[a]={global:Array.from(n),component:cn(cn({},(l=Jf[a])===null||l===void 0?void 0:l.component),s)}}),{token:r,keys:n,flush:o}};function ep(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),Wn(this,"map",new Map),Wn(this,"objectIDMap",new WeakMap),Wn(this,"nextID",0),Wn(this,"lastAccessBeat",new Map),Wn(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&&zn(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(zn(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}(),tp=new O2;function D2(e,t){return b.useMemo(function(){var n=tp.get(t);if(n)return n;var r=e();return tp.set(t,r),r},t)}var L2=function(){return{}};function Xh(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(T){return"".concat(String(w)).concat(T.slice(0,1).toUpperCase()).concat(T.slice(1))}var $=(m==null?void 0:m.unitless)||{},x=typeof s=="function"?s(f):{},E=cn(cn({},x),{},Wn({},y("zIndexPopup"),!0));Object.keys($).forEach(function(T){E[y(T)]=$[T]});var C=cn(cn({},m),{},{unitless:E,prefixToken:y}),v=u(f,p,h,C),I=c(w,h,C);return function(T){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:T,k=v(T,O),N=m==null?void 0:m.extraCssVarPrefixCls,D=typeof N=="function"?N({prefixCls:T,rootCls:O}):N,A=I(D!=null&&D.length?[O].concat(jr(D)):O);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,C=x.realToken,v=n();return o2({path:[f],prefix:E.prefix,key:E.key,unitless:m,ignore:y,token:C,scope:$,nonce:function(){return v.nonce}},function(){var I=ep(f,C,p),T=Zf(f,C,I,{deprecatedTokens:h==null?void 0:h.deprecatedTokens});return I&&Object.keys(I).forEach(function(O){T[w(O)]=T[O],delete T[O]}),T}),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=Bh(w,1),$=y[0],x=w.join("-"),E=e.layer||{name:"antd"};return function(C){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C,I=r(),T=I.theme,O=I.realToken,k=I.hashId,N=I.token,D=I.cssVar,A=I.zeroRuntime,M=b.useMemo(function(){return A},[]);if(M)return k;var z=o(),L=z.rootPrefixCls,_=z.iconPrefixCls,H=n(),F="css",R=D2(function(){var V=new Set;return Object.keys(m.unitless||{}).forEach(function(G){V.add(ra(G,D.prefix)),V.add(ra(G,Qf($,D.prefix)))}),T2(F,V)},[F,$,D==null?void 0:D.prefix]),X=A2(),B=X.max,P=X.min,J={theme:T,token:N,hashId:k,nonce:function(){return H.nonce},clientOnly:m.clientOnly,layer:E,order:m.order||-999};return typeof i=="function"&&_l(cn(cn({},J),{},{clientOnly:!1,path:["Shared",L]}),function(){return i(N,{prefix:{rootPrefixCls:L,iconPrefixCls:_},csp:H})}),_l(cn(cn({},J),{},{path:[x,C,_]}),function(){if(m.injectStyle===!1)return[];var V=M2(N),G=V.token,te=V.flush,j=ep($,O,h),Q=".".concat(C),le=Zf($,O,j,{deprecatedTokens:m.deprecatedTokens});j&&zn(j)==="object"&&Object.keys(j).forEach(function(ie){j[ie]="var(".concat(ra(ie,Qf($,D.prefix)),")")});var fe=yt(G,{componentCls:Q,prefixCls:C,iconCls:".".concat(_),antCls:".".concat(L),calc:R,max:B,min:P},j),q=p(fe,{hashId:k,prefixCls:C,rootPrefixCls:L,iconPrefixCls:_});te($,le);var oe=typeof a=="function"?a(fe,C,v,m.resetFont):null;return[m.resetStyle===!1?null:oe,q]}),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,C=x.rootCls,v=C===void 0?E:C;return w(E,v),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",Uh={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={...Uh,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`,rk=`${tk} ${nk}`.split(/[\s\n]+/),ok="aria-",ik="data-";function Df(e,t){return e.indexOf(t)===0}function ak(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,ok))||n.data&&Df(o,ik)||n.attr&&rk.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 sk=b.createContext({}),lk={classNames:{},styles:{},className:"",style:{},shortcutKeys:{}},Pu=e=>{const t=b.useContext(sk);return b.useMemo(()=>({...lk,...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 ck="%";function Tl(e){return e.join(ck)}let Lf=0;class uk{constructor(t){Z(this,"instanceId");Z(this,"cache",new Map);Z(this,"updateTimes",new Map);Z(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",dk="data-cache-path",er="__cssinjs_instance__";function fk(){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 uk(e)}const yi=g.createContext({hashPriority:"low",cache:fk(),defaultCache:!0,autoPrefix:!1});function pk(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(){Z(this,"cache");Z(this,"keys");Z(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=>!pk(n,t)),this.deleteByPath(this.cache,t)}};Z(co,"MAX_CACHE_SIZE",20),Z(co,"MAX_CACHE_OFFSET",5);let Nl=co,Ff=0;class gh{constructor(t){Z(this,"derivatives");Z(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 mk=new WeakMap,Fs={};function gk(e,t){let n=mk;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 hk(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 bk=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(),xk=(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,xk(c,t,{scope:n==null?void 0:n.scope,hashCls:r,hashPriority:o})]};function yk(){return!1}let Al=!1;function wk(){return Al}const vk=process.env.NODE_ENV==="production"?yk:wk;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=vk(),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 Ck={},Sk=process.env.NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Ar=new Map;function Ek(e){Ar.set(e,(Ar.get(e)||0)+1)}function $k(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 kk=-1;function Ik(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>kk&&n.forEach(r=>{$k(r,t),Ar.delete(r)})}const Rk=(e,t,n,r)=>{let i={...n.getDerivativeToken(e),...t};return r&&(i=r(i)),i},Pk="token";function xh(e,t,n){const{cache:{instanceId:r},container:o,hashPriority:i}=b.useContext(yi),{salt:a="",override:s=Ck,formatToken:l,getComputedToken:c,cssVar:u,nonce:d}=n,f=gk(()=>Object.assign({},...t),t),p=Zo(f),h=Zo(s),m=Zo(u);return Mu(Pk,[a,e.id,p,h,m],()=>{const y=c?c(f,s,e):Rk(f,s,e,l),$={...y},x=`${a}_${u.prefix}`,E=ai(x),v=`${Sk}-${E}`;$._tokenKey=hk($,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,Ek(u.key),[C,v,$,I,u.key]},([,,,,y])=>{Ik(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 Tk={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",Nk="@import",Mk="@namespace",wh="@keyframes",Ak="@layer",zk=Math.abs,ei=String.fromCharCode,zl=Object.assign;function Ok(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 Dk(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 Lk(){return Et}function Fk(){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 _k(e){return Za=ho=1,Sh=Nn($o=e),Rn=0,[]}function jk(e){return $o="",e}function js(e){return vh(es(Rn-1,Ol(e===91?e+2:e===40?e+1:e)))}function Bk(e){for(;(Et=gr())&&Et<33;)An();return si(e)>2||si(Et)>3?"":" "}function Hk(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 Vk(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 Wk(e){for(;!si(gr());)An();return es(e,Rn)}function Bf(e){return jk(ia("",null,null,null,[""],e=_k(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,T=E;w;)switch(h=x,x=An()){case 40:h!=108&&Mt(T,d-1)==58?($++,T+="("):T+=js(x);break;case 41:$--,T+=")";break;case 34:case 39:case 91:T+=js(x);break;case 9:case 10:case 13:case 32:if($>0){T+=ei(x);break}T+=Bk(h);break;case 92:T+=Hk(oa()-1,7);continue;case 47:switch(gr()){case 42:case 47:qo(qk(Vk(An(),oa()),t,n,l),l),(si(h||1)==5||si(gr()||1)==5)&&Nn(T)&&_r(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:s[c++]=Nn(T)*y;case 125*m:case 59:case 0:if($>0&&x){T+=ei(x);break}switch(x){case 0:case 125:w=0;case 59+u:y==-1&&(T=He(T,/\f/g,"")),p>0&&(Nn(T)-d||m===0)&&qo(p>32?Vf(T+";",r,n,d-1,l):Vf(He(T," ","")+";",r,n,d-2,l),l);break;case 59:T+=";";default:if(qo(I=Hf(T,t,n,c,u,o,s,E,v=[],C=[],d,i),i),x===123)if(u===0)ia(T,t,I,I,v,i,d,s,C);else{switch(f){case 99:if(Mt(T,3)===110)break;case 108:if(Mt(T,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(T,I,I,I,[""],C,0,s,C)}}c=u=p=0,m=y=1,E=T="",d=a;break;case 58:d=1+Nn(T),p=h;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&Fk()==125)continue}switch(T+=ei(x),x*m){case 38:y=u>0?1:(T+="\f",-1);break;case 44:if($>0)break;s[c++]=(Nn(T)-1)*y,y=1;break;case 64:gr()===45&&(T+=js(An())),f=gr(),u=d=Nn(E=T+=Wk(oa())),x++;break;case 45:h===45&&Nn(T)==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=zk(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 qk(e,t,n,r){return Ja(e,t,n,yh,ei(Lk()),_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(Ok(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 Ak:if(e.children.length)break;case Nk:case Mk: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 Xk(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 Uk(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 Dk(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 Gk=(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)}},Kk=(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 Yk(){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 Qk(e){return Yk(),!!Lr[e]}function Zk(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),Xk([Uk,Wf])):li(Bf(e),Wf)).replace(/\{%%%\:[^;];}/g,";")}function Jk(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)&&!Jk(E)){let v=!1,C=x.trim(),I=!1;(n||r)&&i?C.startsWith("@")?v=!0:C==="&"?C=Xf("",i,l):C=Xf(x,i,l):n&&!i&&(C==="&"||C==="")&&(C="",I=!0);const[T,O]=Dl(E,t,{root:I,injectHash:v,parentSelectors:[...o,C]});f={...f,...O},d+=`${C}${T}`}else{let v=function(I,T){process.env.NODE_ENV!=="production"&&(typeof E!="object"||!(E!=null&&E[Rh]))&&[Gk,Kk,...u].forEach(N=>N(I,T,{path:s,hashId:i,parentSelectors:o}));const O=I.replace(/[A-Z]/g,N=>`-${N.toLowerCase()}`);let k=T;!Tk[I]&&typeof k=="number"&&k!==0&&(k=`${k}px`),I==="animationName"&&(T!=null&&T._keyframe)&&(p(T),k=T.getName(i)),d+=`${O}:${k};`};const C=(E==null?void 0:E.value)??E;typeof E=="object"&&(E!=null&&E[Ph])&&Array.isArray(C)?C.forEach(I=>{v(x,I)}):bk(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 Th(e,t){return ai(`${e.join("%")}${t}`)}const e2="style";function Ll(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(yi),w=[r||""];h&&w.push("layer"),w.push(...n);let y=Ml;process.env.NODE_ENV!=="production"&&l!==void 0&&(y=l==="client"),Mu(e2,w,()=>{const $=w.join("|");if(Qk($)){const[T,O]=Zk($);if(T)return[T,O,{},a,s]}const x=t(),[E,v]=Dl(x,{hashId:r,hashPriority:c,layer:h?o:void 0,path:n.join("-"),transformers:d,linters:f}),C=Bs(E,m||!1),I=Th(w,C);return[C,I,v,a,s]},($,x)=>{const[,E]=$;x&&Ml&&oi(E,{mark:nr,attachTo:u})},$=>{const[x,E,v,,C]=$;if(y&&x!==kh){let I={mark:nr,prepend:h?!1:"queue",attachTo:u,priority:C};I=Nu(I,i);const T=[],O=[];Object.keys(v).forEach(N=>{N.startsWith("@layer")?T.push(N):O.push(N)}),T.forEach(N=>{Dr(Bs(v[N],m||!1),`_layer-${N}`,{...I,prepend:!0})});const k=Dr(x,E,I);k[er]=p.instanceId,process.env.NODE_ENV!=="production"&&k.setAttribute(dk,w.join("|")),O.forEach(N=>{Dr(Bs(v[N],m||!1),`_effect-${N}`,I)})}})}const t2="cssVar",n2=(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(yi),{_tokenKey:p}=a,h=Array.isArray(l)?l.join("@@"):l,m=[...e.path,n,h,p];return Mu(t2,m,()=>{const y=t(),[$,x]=bh(y,n,{prefix:r,unitless:o,ignore:i,scope:l,hashPriority:f,hashCls:s}),E=Th(m,x);return[$,x,E,n]},([,,y])=>{Ml&&oi(y,{mark:nr,attachTo:d})},([,y,$])=>{if(!y)return;let x={mark:nr,prepend:"queue",attachTo:d,priority:-999};x=Nu(x,c);const E=Dr(y,$,x);E[er]=u,E.setAttribute(Tu,n)})};class et{constructor(t,n){Z(this,"name");Z(this,"style");Z(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 Ou=b.createContext({});function Nh(){}const{resetWarned:r2}=tt;let Yn=null;function o2(){Yn=null,r2()}let Mh=Nh;process.env.NODE_ENV!=="production"&&(Mh=(e,t,n)=>{tt(e,`[antd: ${t}] ${n}`),process.env.NODE_ENV==="test"&&o2()});const Du=Mh,Ah=g.createContext({}),i2=process.env.NODE_ENV!=="production"?e=>{const{strict:t}=g.useContext(Ah),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"&&Du(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=Nh,e},At=i2,Fl=g.createContext(null);function a2({children:e,onBatchResize:t}){const n=g.useRef(0),r=g.useRef([]),o=g.useContext(Fl),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(Fl.Provider,{value:i},e)}const tr=new Map;function zh(e){e.forEach(t=>{var r;const{target:n}=t;(r=tr.get(n))==null||r.forEach(o=>o(n))})}let Hs;function Oh(){return Hs||(Hs=new ResizeObserver(zh)),Hs}process.env.NODE_ENV;process.env.NODE_ENV;function s2(e,t){tr.has(e)||(tr.set(e,new Set),Oh().observe(e)),tr.get(e).add(t)}function l2(e,t){tr.has(e)&&(tr.get(e).delete(t),tr.get(e).size||(Oh().unobserve(e),tr.delete(e)))}function Dh(e,t,n,r){const o=g.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),i=Ke(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?s2(l,i):e&&a&&(s.current+=1),()=>{l&&l2(l,i)}},[e,a?s.current:t])}function c2(e,t){const{children:n,disabled:r,onResize:o,data:i}=e,a=g.useRef(null),s=g.useContext(Fl),l=typeof n=="function",c=l?n(a):n,u=!l&&g.isValidElement(c)&&Eo(c),d=u?cr(c):null,f=Hr(d,a),p=()=>Cu(a.current);return g.useImperativeHandle(t,()=>p()),Dh(!r,p,o,(h,m)=>{s==null||s(h,m,i)}),u?g.cloneElement(c,{ref:f}):c}const Lh=g.forwardRef(c2);process.env.NODE_ENV!=="production"&&(Lh.displayName="SingleObserver");function _l(){return _l=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},_l.apply(this,arguments)}const u2="rc-observer-key";function d2(e,t){const{children:n}=e,r=typeof n=="function"?[n]:or(n);return process.env.NODE_ENV!=="production"&&(r.length>1?ba(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&ba(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map((o,i)=>{const a=(o==null?void 0:o.key)||`${u2}-${i}`;return g.createElement(Lh,_l({},e,{key:a,ref:i===0?t:void 0}),o)})}const ko=g.forwardRef(d2);process.env.NODE_ENV!=="production"&&(ko.displayName="ResizeObserver");ko.Collection=a2;function jl(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 f2(e){if(Array.isArray(e))return jl(e)}function p2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fh(e,t){if(e){if(typeof e=="string")return jl(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)?jl(e,t):void 0}}function m2(){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 f2(e)||p2(e)||Fh(e)||m2()}const wa="ant",Lu="anticon",g2=["outlined","borderless","filled","underlined"],h2=(e,t)=>t||(e?`${wa}-${e}`:wa),dt=g.createContext({getPrefixCls:h2,iconPrefixCls:Lu}),{Consumer:H5}=dt,Uf={};function Kn(e){const t=g.useContext(dt),{getPrefixCls:n,direction:r,getPopupContainer:o,renderEmpty:i}=t,a=t[e];return{classNames:Uf,styles:Uf,...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 b2(e){if(Array.isArray(e))return e}function x2(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 y2(){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 _h(e,t){return b2(e)||x2(e,t)||Fh(e,t)||y2()}function w2(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=w2(e,"string");return On(t)=="symbol"?t:t+""}function qn(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){qn(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 v2(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&&v2(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 C2(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 S2(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 E2(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 S2(this,n)}}var $2=ns(function e(){ts(this,e)}),Hh="CALC_UNIT",k2=new RegExp(Hh,"g");function Vs(e){return typeof e=="number"?"".concat(e).concat(Hh):e}var I2=function(e){C2(n,e);var t=E2(n);function n(r,o){var i;ts(this,n),i=t.call(this),qn(aa(i),"result",""),qn(aa(i),"unitlessCssVar",void 0),qn(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(k2,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}($2),R2=function(t,n){var r=I2;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 P2(){}var T2=function(t){var n,r=t,o=P2;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 N2(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 M2=1e3*60*10,A2=function(){function e(){ts(this,e),qn(this,"map",new Map),qn(this,"objectIDMap",new WeakMap),qn(this,"nextID",0),qn(this,"lastAccessBeat",new Map),qn(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>M2&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),Jf=new A2;function z2(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 O2=function(){return{}};function Wh(e){var t=e.useCSP,n=t===void 0?O2: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(T){return"".concat(String(w)).concat(T.slice(0,1).toUpperCase()).concat(T.slice(1))}var $=(m==null?void 0:m.unitless)||{},x=typeof s=="function"?s(f):{},E=cn(cn({},x),{},qn({},y("zIndexPopup"),!0));Object.keys($).forEach(function(T){E[y(T)]=$[T]});var v=cn(cn({},m),{},{unitless:E,prefixToken:y}),C=u(f,p,h,v),I=c(w,h,v);return function(T){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:T,k=C(T,O),N=m==null?void 0:m.extraCssVarPrefixCls,D=typeof N=="function"?N({prefixCls:T,rootCls:O}):N,A=I(D!=null&&D.length?[O].concat(jr(D)):O);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 n2({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),T=Yf(f,v,I,{deprecatedTokens:h==null?void 0:h.deprecatedTokens});return I&&Object.keys(I).forEach(function(O){T[w(O)]=T[O],delete T[O]}),T}),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(),T=I.theme,O=I.realToken,k=I.hashId,N=I.token,D=I.cssVar,A=I.zeroRuntime,M=b.useMemo(function(){return A},[]);if(M)return k;var z=o(),L=z.rootPrefixCls,j=z.iconPrefixCls,H=n(),F="css",R=z2(function(){var V=new Set;return Object.keys(m.unitless||{}).forEach(function(G){V.add(ra(G,D.prefix)),V.add(ra(G,Kf($,D.prefix)))}),R2(F,V)},[F,$,D==null?void 0:D.prefix]),X=N2(),B=X.max,P=X.min,J={theme:T,token:N,hashId:k,nonce:function(){return H.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(N,{prefix:{rootPrefixCls:L,iconPrefixCls:j},csp:H})}),Ll(cn(cn({},J),{},{path:[x,v,j]}),function(){if(m.injectStyle===!1)return[];var V=T2(N),G=V.token,te=V.flush,_=Zf($,O,h),Q=".".concat(v),le=Yf($,O,_,{deprecatedTokens:m.deprecatedTokens});_&&On(_)==="object"&&Object.keys(_).forEach(function(ie){_[ie]="var(".concat(ra(ie,Kf($,D.prefix)),")")});var fe=yt(G,{componentCls:Q,prefixCls:v,iconCls:".".concat(j),antCls:".".concat(L),calc:R,max:B,min:P},_),q=p(fe,{hashId:k,prefixCls:v,rootPrefixCls:L,iconPrefixCls:j});te($,le);var oe=typeof a=="function"?a(fe,v,C,m.resetFont):null;return[m.resetStyle===!1?null:oe,q]}),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 D2(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 L2="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,
|
|
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 Xs(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 np=(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){Z(this,"isValid",!0);Z(this,"r",0);Z(this,"g",0);Z(this,"b",0);Z(this,"a",1);Z(this,"_h");Z(this,"_hsl_s");Z(this,"_hsv_s");Z(this,"_l");Z(this,"_v");Z(this,"_max");Z(this,"_min");Z(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=Xs(t,np);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=Xs(t,np);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=Xs(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,rp=.16,B2=.05,H2=.05,V2=.15,Gh=5,Kh=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 op(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 ip(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return n?r=e.s-rp*t:t===Kh?r=e.s+rp:r=e.s+B2*t,r>1&&(r=1),n&&t===Gh&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function ap(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 Yh(e,t={}){const n=[],r=new Ve(e),o=r.toHsv();for(let i=Gh;i>0;i-=1){const a=new Ve({h:op(o,i,!0),s:ip(o,i,!0),v:ap(o,i,!0)});n.push(a)}n.push(r);for(let i=1;i<=Kh;i+=1){const a=new Ve({h:op(o,i),s:ip(o,i),v:ap(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 Us={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"},ql=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];ql.primary=ql[5];const Xl=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Xl.primary=Xl[5];const Ul=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Ul.primary=Ul[5];const Gl=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Gl.primary=Gl[5];const Kl=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Kl.primary=Kl[5];const Yl=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Yl.primary=Yl[5];const Ql=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Ql.primary=Ql[5];const Zl=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Zl.primary=Zl[5];const Jl=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Jl.primary=Jl[5];const ec=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];ec.primary=ec[5];const tc=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];tc.primary=tc[5];const nc=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];nc.primary=nc[5];const rc=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];rc.primary=rc[5];const Gs={red:ql,volcano:Xl,orange:Ul,gold:Gl,yellow:Kl,lime:Yl,green:Ql,cyan:Zl,blue:Jl,geekblue:ec,purple:tc,magenta:nc,grey:rc};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 C=e[E];if(C){const v=t(C);x[`${E}Hover`]=v[5],x[`${E}Active`]=v[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=Yh(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 Qh(e){Us.pink=Us.magenta,Gs.pink=Gs.magenta;const t=Object.keys(Uh).map(n=>{const r=e[n]===Us[n]?Gs[n]:Yh(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 Zh=ya(Qh),Ca={token:ci,override:{override:ci},hashed:!0},ju=b.createContext(Ca);function Ks(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(Ks(u)&&Ks(d)&&Ks(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},F2={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){Z(this,"isValid",!0);Z(this,"r",0);Z(this,"g",0);Z(this,"b",0);Z(this,"a",1);Z(this,"_h");Z(this,"_hsl_s");Z(this,"_hsv_s");Z(this,"_l");Z(this,"_v");Z(this,"_max");Z(this,"_min");Z(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=F2[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,_2=.05,j2=.05,B2=.15,Xh=5,Uh=4,H2=[{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+_2*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+j2*t:r=e.v-B2*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"?H2.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 V2(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 W2=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 q2(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,...W2(r)}}const X2=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},U2=e=>{const t=D2(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 G2(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(),K2=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]}},Y2=(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,...V2(e,{generateColorPalettes:K2,generateNeutralColorPalettes:Y2}),...U2(e.fontSize),...G2(e),...X2(e),...q2(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 Q2(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:`
|
|
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 Qh={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},Z2={motionBase:!0,motionUnit:!0},J2={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},Zh=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let a={...r,override:o};return a=Q2(a),i&&Object.entries(i).forEach(([s,l])=>{const{theme:c,...u}=l;let d=u;c&&(d=Zh({...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(Fu),{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=`${L2}-${t||""}`,u=n||Yh,[d,f,p]=xh(u,[ci,e],{salt:c,override:r,getComputedToken:Zh,cssVar:{...l,unitless:Qh,ignore:Z2,preserve:J2},nonce:a==null?void 0:a.nonce});return[u,p,t?f:"",d,l,!!i]}const Jh={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Io=(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}),_u=()=>({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"}}),eI=new et("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),nc=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),ju=(e,t)=>({outline:`${xe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:["outline-offset","outline"].map(n=>`${n} 0s`).join(", ")}),Sa=(e,t)=>({"&:focus-visible":ju(e)}),tI=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},...Sa(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),nI=(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}}},eb=e=>({[`.${e}`]:{..._u(),"&::before":{display:"none"},"&[tabindex]":{cursor:"pointer"}},[`.${e} .${e}-icon`]:{display:"block"},[`.${e}-spin`]:{animationName:eI,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),{genStyleHooks:on,genComponentStyleHook:rI,genSubStyleComponent:oI}=Wh({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=tI(e);return[n,{"&":n},eb((t==null?void 0:t.prefix.iconPrefixCls)??Lu)]},getCommonStyle:nI,getCompUnitless:()=>Qh}),ur=(e,t)=>{const n=`--${e.replace(/\./g,"")}-${t}-`;return[i=>`${n}${i}`,(i,a)=>a?`var(${n}${i}, ${a})`:`var(${n}${i})`]};function iI(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 aI=(e,t)=>(Cr(),Ll({hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>eb(e))),ip="data-rc-order",ap="data-rc-priority",sI="rc-util-key",rc=new Map;function tb(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function lI(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 nb({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:sI}function Bu(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function cI(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Hu(e){return Array.from((rc.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function rb(e,t={}){if(!tb())return null;const{csp:n,prepend:r,priority:o=0}=t,i=cI(r),a=i==="prependQueue",s=document.createElement("style");s.setAttribute(ip,i),a&&o&&s.setAttribute(ap,`${o}`),n!=null&&n.nonce&&(s.nonce=n.nonce),s.innerHTML=e;const l=Bu(t),{firstChild:c}=l;if(r){if(a){const u=(t.styles||Hu(l)).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(ip)))return!1;const f=Number(d.getAttribute(ap)||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 uI(e,t={}){let{styles:n}=t;return n||(n=Hu(Bu(t))),n.find(r=>r.getAttribute(nb(t))===e)}function dI(e,t){const n=rc.get(e);if(!n||!lI(document,n)){const r=rb("",t);if(!r)return;const{parentNode:o}=r;rc.set(e,o),e.removeChild(r)}}function fI(e,t,n={}){var l;if(!tb())return null;const r=Bu(n),o=Hu(r),i={...n,styles:o};dI(r,i);const a=uI(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=rb(e,i);return s==null||s.setAttribute(nb(i),t),s}function pI(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function mI(e){const t=pI(e);return typeof ShadowRoot<"u"&&t instanceof ShadowRoot?t:null}const sp={};function gI(e,t){e||sp[t]||(process.env.NODE_ENV!=="production"&&typeof console<"u"&&console.error(`Warning: ${t}`),sp[t]=!0)}function hI(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function ob(e,t){gI(e,`[@ant-design/icons] ${t}`)}function Ea(e){return e!==null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function lp(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[hI(n)]=r}return t},{})}function oc(e,t,n){return n?b.createElement(e.tag,{key:t,...lp(e.attrs),...n},(e.children||[]).map((r,o)=>oc(r,`${t}-${e.tag}-${o}`))):b.createElement(e.tag,{key:t,...lp(e.attrs)},(e.children||[]).map((r,o)=>oc(r,`${t}-${e.tag}-${o}`)))}const bI=`
|
|
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
|
+
`,xI=e=>{const{csp:t,prefixCls:n,layer:r,zeroRuntime:o}=b.useContext(Ou);let i=bI;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})},[])},sb=e=>{const{icon:t,className:n,onClick:r,style:o,primaryColor:i,secondaryColor:a,...s}=e,l=g.useRef(null);if(wI(l),ab(Ea(t),`icon should be icon definiton, but got ${typeof t}`),!Ea(t))return null;const c=t;return ac(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})};sb.displayName="IconReact";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 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(Lu);if(ab(Ea(r),`icon should be icon definiton, but got ${typeof r}`),!Ea(r))return null;const f=Y(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",sc({role:"img","aria-label":r.name},c,{ref:t,tabIndex:p,onClick:s,className:f}),g.createElement(sb,{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 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 CI=(e,t)=>g.createElement(Jt,lc({},e,{ref:t,icon:vI})),lb=g.forwardRef(CI);process.env.NODE_ENV!=="production"&&(lb.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 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)}const EI=(e,t)=>g.createElement(Jt,cc({},e,{ref:t,icon:SI})),qu=g.forwardRef(EI);process.env.NODE_ENV!=="production"&&(qu.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,cb=e=>rn(e)&&"propertyName"in e&&br(e.propertyName),uc=(e,t)=>{const n={...e};return Object.keys(t).forEach(r=>{t[r]._default?n[r]||(n[r]={}):n[r]=uc(n[r],t[r])}),n},ub=(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]=ub(i,n[o],a);else{const{_default:s}=i;s&&(n[o]=n[o]||{},n[o][s]=Y(n[o][s],a))}else n[o]=Y(n[o],a)}),n),{}),kI=(e,...t)=>g.useMemo(()=>ub.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]),dp=(e,t)=>Qt(e)?e(t):e,Pn=(e,t,n,r)=>{const o=e.map(l=>l?dp(l,n):void 0),i=t.map(l=>l?dp(l,n):void 0),a=kI.apply(void 0,[r].concat(jr(o))),s=RI.apply(void 0,jr(i));return g.useMemo(()=>r?[uc(a,r),uc(s,r)]:[a,s],[a,s,r])},Ro=e=>`${e}-css-var`,PI=b.createContext(void 0),db={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:db},Symbol.toStringTag,{value:"Module"}));var os={},is={};Object.defineProperty(is,"__esModule",{value:!0});is.commonLocale=void 0;is.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};Object.defineProperty(os,"__esModule",{value:!0});var fb=os.default=void 0,NI=is;const MI={...NI.commonLocale,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"};fb=os.default=MI;const pb={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},fp={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"],...fb},timePickerLocale:{...pb}},mn="${label} is not a valid ${type}",bo={locale:"en",Pagination:db,DatePicker:fp,TimePicker:pb,Calendar:fp,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 pp=()=>la.reduce((e,t)=>({...e,...t}),bo.Modal);function AI(e){if(e){const t={...e};return la.push(t),pp(),()=>{la=la.filter(n=>n!==t),pp()}}({...bo.Modal})}const Xu=b.createContext(void 0),zI=(e,t)=>{const n=g.useContext(Xu),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]},mb="internalMark",gb=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===mb,"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(Xu.Provider,{value:o},n)};process.env.NODE_ENV!=="production"&&(gb.displayName="LocaleProvider");const hb=g.createContext(null);let OI=!1;function DI(e){return OI}const mp=[];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(hb),[i,a]=g.useState(mp),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(mp))},[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 gp=0;function jI(e){const t=!!e,[n]=g.useState(()=>(gp+=1,`${_I}_${gp}`));Bt(()=>{if(t){const r=k$(document.body).width,o=FI();Dr(`
|
|
188
|
+
}`),b.useEffect(()=>{if(o)return;const a=e.current,s=mI(a);fI(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(xI(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=Y(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 yI={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 wI=(e,t)=>g.createElement(Jt,ac({},e,{ref:t,icon:yI})),ab=g.forwardRef(wI);process.env.NODE_ENV!=="production"&&(ab.displayName="CloseCircleFilled");var vI={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 CI=(e,t)=>g.createElement(Jt,sc({},e,{ref:t,icon:vI})),Vu=g.forwardRef(CI);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",SI=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]=Y(n[o][s],a))}else n[o]=Y(n[o],a)}),n),{}),EI=(e,...t)=>g.useMemo(()=>lb.apply(void 0,[e].concat(t)),[e].concat(t)),$I=(...e)=>e.filter(t=>!!t).reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]={...t[r],...n[r]}}),t),{}),kI=(...e)=>g.useMemo(()=>$I.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=EI.apply(void 0,[r].concat(jr(o))),s=kI.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`,II=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"},RI=Object.freeze(Object.defineProperty({__proto__:null,default:cb},Symbol.toStringTag,{value:"Module"})),PI={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},ub={...PI,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"},TI=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 NI(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),MI=(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(()=>NI(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 AI=!1;function zI(e){return AI}const fp=[];function OI(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 DI(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const LI=`rc-util-locker-${Date.now()}`;let pp=0;function FI(e){const t=!!e,[n]=g.useState(()=>(pp+=1,`${LI}_${pp}`));Bt(()=>{if(t){const r=E$(document.body).width,o=DI();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 Uu=0;process.env.NODE_ENV;const bb=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-Uu<BI)return;const n=hr.length;for(let r=n-1;r>=0;r-=1)hr[r].onEsc({top:r===n-1,event:e})}},xb=()=>{Uu=Date.now()};function HI(){window.addEventListener("keydown",bb),window.addEventListener("compositionend",xb)}function VI(){hr.length===0&&(window.removeEventListener("keydown",bb),window.removeEventListener("compositionend",xb))}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 hp=e=>e===!1?!1:!vn()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,as=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(()=>hp(o));g.useEffect(()=>{const C=hp(o);p(()=>C??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(hb.Provider,{value:m},x?E:po.createPortal(E,w))});process.env.NODE_ENV!=="production"&&(as.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:Y(`${t}-arrow`,i),style:{...d,...s}},a)}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)}function XI(e){const{prefixCls:t,open:n,zIndex:r,mask:o,motion:i,mobile:a}=e;return o?g.createElement(vr,dc({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),({className:s})=>g.createElement("div",{style:{zIndex:r},className:Y(`${t}-mask`,a&&`${t}-mobile-mask`,s)})):null}const yb=g.memo(({children:e})=>e,(e,t)=>t.cache);process.env.NODE_ENV!=="production"&&(yb.displayName="PopupContent");function wb(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 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 Gu=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:C,autoDestroy:v,portal:I,children:T,zIndex:O,onMouseEnter:k,onMouseLeave:N,onPointerEnter:D,onPointerDownCapture:A,ready:M,offsetX:z,offsetY:L,offsetR:_,offsetB:H,onAlign:F,onPrepare:R,onResize:X,stretch:B,targetWidth:P,targetHeight:J}=e,V=typeof r=="function"?r():r,G=c||u,te=!!x,[j,Q,le]=g.useMemo(()=>x?[x.mask,x.maskMotion,x.motion]:[p,$,y],[x,p,$,y]),fe=(C==null?void 0:C.length)>0,[q,oe]=g.useState(!C||!fe);Bt(()=>{!q&&fe&&s&&oe(!0)},[q,fe,s]);const ie=Ke((ne,se)=>{X==null||X(ne,se),F()}),Ce=wb(te,M,c,w,_,H,z,L);if(!q)return null;const re={};return B&&(B.includes("height")&&J?re.height=J:B.includes("minHeight")&&J&&(re.minHeight=J),B.includes("width")&&P?re.width=P:B.includes("minWidth")&&P&&(re.minWidth=P)),c||(re.pointerEvents="none"),g.createElement(I,{open:E||G,getContainer:C&&(()=>C(s)),autoDestroy:v,onEsc:n},g.createElement(XI,{prefixCls:i,open:c,zIndex:O,mask:j,motion:Q,mobile:te}),g.createElement(ko,{onResize:ie,disabled:!c},ne=>g.createElement(vr,fc({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:`${i}-hidden`},le,{onAppearPrepare:R,onEnterPrepare:R,visible:c,onVisibleChanged:se=>{var ye;(ye=y==null?void 0:y.onVisibleChanged)==null||ye.call(y,se),l(se)}}),({className:se,style:ye},ae)=>{const he=Y(i,se,o,{[`${i}-mobile`]:te});return g.createElement("div",{ref:Gn(ne,t,ae),className:he,style:{"--arrow-x":`${m.x||0}px`,"--arrow-y":`${m.y||0}px`,...Ce,...re,...ye,boxSizing:"border-box",zIndex:O,...a},onMouseEnter:k,onMouseLeave:N,onPointerEnter:D,onClick:f,onPointerDownCapture:A},h&&g.createElement(qI,{prefixCls:i,arrow:h,arrowPos:m,align:w}),g.createElement(yb,{cache:!c&&!d},V))})),T)});process.env.NODE_ENV!=="production"&&(Gu.displayName="Popup");const $a=g.createContext(null),vb=g.createContext(null);function bp(e){return e?Array.isArray(e)?e:[e]:[]}function UI(e,t,n){return g.useMemo(()=>{const r=bp(t??e),o=bp(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 Cb(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 pc(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 xp(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),C=(p-h-y-$)*x,v=(d-f-m-w)*E,I=m*E,T=w*E,O=y*x,k=$*x;let N=0,D=0;if(o==="clip"){const _=Fo(i);N=_*x,D=_*E}const A=u.x+O-N,M=u.y+I-D,z=A+u.width+2*N-O-k-C,L=M+u.height+2*D-I-T-v;n.left=Math.max(n.left,A),n.top=Math.max(n.top,M),n.right=Math.min(n.right,z),n.bottom=Math.min(n.bottom,L)}),n}function yp(e,t=0){const n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function wp(e,t){const[n,r]=t||[];return[yp(e.width,n),yp(e.height,r)]}function vp(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 Cp(e){return e.join("")}function Sb(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?[]:pc(t),[t]),f=g.useRef({});e||(()=>{f.current={}})();const h=Ke(()=>{var y,$;if(t&&n&&e&&!s){let it=function(Le,Tt,Nt=se){const Bn=_.x+Le,Er=_.y+Tt,Ai=Bn+te,bd=Er+G,ys=Math.max(Bn,Nt.left),ws=Math.max(Er,Nt.top),vs=Math.min(Ai,Nt.right),ve=Math.min(bd,Nt.bottom);return Math.max(0,(vs-ys)*(ve-ws))},jn=function(){Rt=_.y+Me,Sn=Rt+G,Ht=_.x+ze,an=Ht+te};const x=t,E=x.ownerDocument,C=wi(x),{position:v}=C.getComputedStyle(x),I=x.style.left,T=x.style.top,O=x.style.right,k=x.style.bottom,N=x.style.overflow,D=x.style.overflowX,A=x.style.overflowY,M={...o[r],...i},z=E.createElement("div");(y=x.parentElement)==null||y.appendChild(z),z.style.left=`${x.offsetLeft}px`,z.style.top=`${x.offsetTop}px`,z.style.position=v,z.style.height=`${x.offsetHeight}px`,z.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:H,width:F}=C.getComputedStyle(x);_.x=_.x??_.left,_.y=_.y??_.top;const{clientWidth:R,clientHeight:X,scrollWidth:B,scrollHeight:P,scrollTop:J,scrollLeft:V}=E.documentElement,G=_.height,te=_.width,j=L.height,Q=L.width,le={left:0,top:0,right:R,bottom:X},fe={left:-V,top:-J,right:B-V,bottom:P-J};let{htmlRegion:q}=M;const oe="visible",ie="visibleFirst";q!=="scroll"&&q!==ie&&(q=oe);const Ce=q===ie,re=xp(fe,d),ne=xp(le,d),se=q===oe?ne:re,ye=Ce?ne:se;x.style.left="auto",x.style.top="auto",x.style.right="0",x.style.bottom="0";const ae=x.getBoundingClientRect();x.style.left=I,x.style.top=T,x.style.right=O,x.style.bottom=k,x.style.overflow=N,x.style.overflowX=D,x.style.overflowY=A,($=x.parentElement)==null||$.removeChild(z);const he=ui(Math.round(te/parseFloat(F)*1e3)/1e3),ce=ui(Math.round(G/parseFloat(H)*1e3)/1e3);if(he===0||ce===0||go(n)&&!$u(n))return;const{offset:Ne,targetOffset:$e}=M;let[Pe,W]=wp(_,Ne);const[K,ue]=wp(L,$e);L.x-=K,L.y-=ue;const[be,Se]=M.points||[],de=vp(Se),ee=vp(be),Ee=Gr(L,de),Ie=Gr(_,ee),Ge={...M};let Re=[ee,de],ze=Ee.x-Ie.x+Pe,Me=Ee.y-Ie.y+W;const Qe=it(ze,Me),It=it(ze,Me,ne),wt=Gr(L,["t","l"]),Ot=Gr(_,["t","l"]),gt=Gr(L,["b","r"]),_t=Gr(_,["b","r"]),jt=M.overflow||{},{adjustX:_e,adjustY:pt,shiftX:Cn,shiftY:Fn}=jt,_n=Le=>typeof Le=="boolean"?Le:Le>=0;let Rt,Sn,Ht,an;jn();const fn=_n(pt),pn=ee[0]===de[0];if(fn&&ee[0]==="t"&&(Sn>ye.bottom||f.current.bt)){let Le=Me;pn?Le-=G-j:Le=wt.y-_t.y-W;const Tt=it(ze,Le),Nt=it(ze,Le,ne);Tt>Qe||Tt===Qe&&(!Ce||Nt>=It)?(f.current.bt=!0,Me=Le,W=-W,Re=[fr(Re[0],0),fr(Re[1],0)]):f.current.bt=!1}if(fn&&ee[0]==="b"&&(Rt<ye.top||f.current.tb)){let Le=Me;pn?Le+=G-j:Le=gt.y-Ot.y-W;const Tt=it(ze,Le),Nt=it(ze,Le,ne);Tt>Qe||Tt===Qe&&(!Ce||Nt>=It)?(f.current.tb=!0,Me=Le,W=-W,Re=[fr(Re[0],0),fr(Re[1],0)]):f.current.tb=!1}const en=_n(_e),Dt=ee[1]===de[1];if(en&&ee[1]==="l"&&(an>ye.right||f.current.rl)){let Le=ze;Dt?Le-=te-Q:Le=wt.x-_t.x-Pe;const Tt=it(Le,Me),Nt=it(Le,Me,ne);Tt>Qe||Tt===Qe&&(!Ce||Nt>=It)?(f.current.rl=!0,ze=Le,Pe=-Pe,Re=[fr(Re[0],1),fr(Re[1],1)]):f.current.rl=!1}if(en&&ee[1]==="r"&&(Ht<ye.left||f.current.lr)){let Le=ze;Dt?Le+=te-Q:Le=gt.x-Ot.x-Pe;const Tt=it(Le,Me),Nt=it(Le,Me,ne);Tt>Qe||Tt===Qe&&(!Ce||Nt>=It)?(f.current.lr=!0,ze=Le,Pe=-Pe,Re=[fr(Re[0],1),fr(Re[1],1)]):f.current.lr=!1}Ge.points=[Cp(Re[0]),Cp(Re[1])],jn();const at=Cn===!0?0:Cn;typeof at=="number"&&(Ht<ne.left&&(ze-=Ht-ne.left-Pe,L.x+Q<ne.left+at&&(ze+=L.x-ne.left+Q-at)),an>ne.right&&(ze-=an-ne.right-Pe,L.x>ne.right-at&&(ze+=L.x-ne.right+at)));const Vt=Fn===!0?0:Fn;typeof Vt=="number"&&(Rt<ne.top&&(Me-=Rt-ne.top-W,L.y+j<ne.top+Vt&&(Me+=L.y-ne.top+j-Vt)),Sn>ne.bottom&&(Me-=Sn-ne.bottom-W,L.y>ne.bottom-Vt&&(Me+=L.y-ne.bottom+Vt)));const vt=_.x+ze,Oe=vt+te,Ze=_.y+Me,st=Ze+G,Be=L.x,U=Be+Q,ge=L.y,pe=ge+j,we=Math.max(vt,Be),Te=Math.min(Oe,U),Fe=(we+Te)/2-vt,De=Math.max(Ze,ge),ft=Math.min(st,pe),ht=(De+ft)/2-Ze;a==null||a(t,Ge);let Ct=ae.right-_.x-(ze+_.width),mt=ae.bottom-_.y-(Me+_.height);he===1&&(ze=Math.floor(ze),Ct=Math.floor(Ct)),ce===1&&(Me=Math.floor(Me),mt=Math.floor(mt));const Lt={ready:!0,offsetX:ze/he,offsetY:Me/ce,offsetR:Ct/he,offsetB:mt/ce,arrowX:Fe/he,arrowY:ht/ce,scaleX:he,scaleY:ce,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 Eb(){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=pc(i),l=pc(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=Pl(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 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 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),$=wb(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,mc({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${m}-hidden`},f,{visible:o,onVisibleChanged:C=>{y(C)}}),({className:C,style:v})=>{const I=Y(m,C,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,...v,...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(H=>{d.current=H,go(H)&&s!==H&&l(H)}),p=g.useRef(null),h=Eb(),m=Ke((H,F)=>{p.current=F,h(()=>{n(H)},H.delay)}),w=H=>{h(()=>{var F;(F=p.current)!=null&&F.call(p)||n(!1)},H)},y=Ke(H=>{i(H)}),[$,x,E,C,v,I,T,,,O,k]=Sb(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),N=g.useMemo(()=>{var F;if(!a)return"";const H=Cb(a.builtinPlacements||{},a.prefixCls||"",O,!1);return Y(H,(F=a.getPopupClassNameFromAlign)==null?void 0:F.call(a,O))},[O,a==null?void 0:a.getPopupClassNameFromAlign,a==null?void 0:a.builtinPlacements,a==null?void 0:a.prefixCls]),D=g.useMemo(()=>({show:m,hide:w}),[]);g.useEffect(()=>{k()},[a==null?void 0:a.target]);const A=Ke(()=>(k(),Promise.resolve())),M=g.useRef({}),z=g.useContext($a),L=g.useMemo(()=>({registerSubPopup:(H,F)=>{M.current[H]=F,z==null||z.registerSubPopup(H,F)}}),[z]),_=a==null?void 0:a.prefixCls;return g.createElement(vb.Provider,{value:D},e,a&&g.createElement($a.Provider,{value:L},g.createElement(Gu,{ref:f,portal:as,onEsc:a.onEsc,prefixCls:_,popup:a.popup,className:Y(a.popupClassName,N,`${_}-unique-controlled`),style:a.popupStyle,target:a.target,open:r,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:y,ready:$,offsetX:x,offsetY:E,offsetR:C,offsetB:v,onAlign:k,onPrepare:A,onResize:H=>u({width:H.offsetWidth,height:H.offsetHeight}),arrowPos:{x:I,y:T},align:O,zIndex:a.zIndex,mask:a.mask,arrow:a.arrow,motion:a.popupMotion,maskMotion:a.maskMotion,getPopupContainer:a.getPopupContainer},g.createElement(ZI,{prefixCls:_,isMobile:!1,ready:$,open:r,align:O,offsetR:C,offsetB:v,offsetX:x,offsetY:E,arrowPos:{x:I,y:T},popupSize:c,motion:a.popupMotion,uniqueContainerClassName:Y(a.uniqueContainerClassName,N),uniqueContainerStyle:a.uniqueContainerStyle}))))};function eR(e=as){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:C=!0,getPopupContainer:v,forceRender:I,autoDestroy:T,popup:O,popupClassName:k,uniqueContainerClassName:N,uniqueContainerStyle:D,popupStyle:A,popupPlacement:M,builtinPlacements:z={},popupAlign:L,zIndex:_,stretch:H,getPopupClassNameFromAlign:F,fresh:R,unique:X,alignPoint:B,onPopupClick:P,onPopupAlign:J,arrow:V,popupMotion:G,maskMotion:te,mobile:j,...Q}=n,le=T||!1,fe=u===void 0,q=!!j,oe=g.useRef({}),ie=g.useContext($a),Ce=g.useMemo(()=>({registerSubPopup:(ve,Xe)=>{oe.current[ve]=Xe,ie==null||ie.registerSubPopup(ve,Xe)}}),[ie]),re=g.useContext(vb),ne=Ga(),[se,ye]=g.useState(null),ae=g.useRef(null),he=Ke(ve=>{ae.current=ve,go(ve)&&se!==ve&&ye(ve),ie==null||ie.registerSubPopup(ne,ve)}),[ce,Ne]=g.useState(null),$e=g.useRef(null),Pe=Ke(ve=>{const Xe=Eu(ve);go(Xe)&&ce!==Xe&&(Ne(Xe),$e.current=Xe)}),W={},K=Ke(ve=>{var Wt,Wr;const Xe=ce;return(Xe==null?void 0:Xe.contains(ve))||((Wt=Pl(Xe))==null?void 0:Wt.host)===ve||ve===Xe||(se==null?void 0:se.contains(ve))||((Wr=Pl(se))==null?void 0:Wr.host)===ve||ve===se||Object.values(oe.current).some($r=>($r==null?void 0:$r.contains(ve))||ve===$r)}),ue=V?{...V!==!0?V:{}}:null,[be,Se]=un(d||!1,u),de=be||!1,ee=de&&!c,Ee=g.useMemo(()=>{const ve=typeof i=="function"?i({open:ee}):i;return g.Children.only(ve)},[i,ee]),Ie=(Ee==null?void 0:Ee.props)||{},Ge=Ke(()=>ee),Re=Ke((ve=0)=>({popup:O,target:ce,delay:ve,prefixCls:o,popupClassName:k,uniqueContainerClassName:N,uniqueContainerStyle:D,popupStyle:A,popupPlacement:M,builtinPlacements:z,popupAlign:L,zIndex:_,mask:E,maskClosable:C,popupMotion:G,maskMotion:te,arrow:ue,getPopupContainer:v,getPopupClassNameFromAlign:F,id:ne,onEsc:It}));Bt(()=>{re&&X&&ce&&!fe&&!ie&&(ee?re.show(Re(w),Ge):re.hide(y))},[ee,ce]);const ze=g.useRef(ee);ze.current=ee;const Me=Ke(ve=>{po.flushSync(()=>{de!==ve&&(Se(ve),f==null||f(ve),h==null||h(ve))})}),it=Eb(),Qe=(ve,Xe=0)=>{if(u!==void 0){it(()=>{Me(ve)},Xe);return}if(re&&X&&fe&&!ie){ve?re.show(Re(Xe),Ge):re.hide(Xe);return}it(()=>{Me(ve)},Xe)};function It({top:ve}){ve&&Qe(!1)}const[wt,Ot]=g.useState(!1);Bt(ve=>{(!ve||ee)&&Ot(!0)},[ee]);const[gt,_t]=g.useState(null),[jt,_e]=g.useState(null),pt=ve=>{_e([ve.clientX,ve.clientY])},[Cn,Fn,_n,Rt,Sn,Ht,an,jn,fn,pn,en]=Sb(ee,se,B&&jt!==null?jt:ce,M,z,L,J,q),[Dt,at]=UI(a,s,l),Vt=Dt.has("click"),vt=at.has("click")||at.has("contextMenu"),Oe=Ke(()=>{wt||en()});KI(ee,ce,se,Oe,()=>{ze.current&&B&&vt&&Qe(!1)}),Bt(()=>{Oe()},[jt,M]),Bt(()=>{ee&&!(z!=null&&z[M])&&Oe()},[JSON.stringify(L)]);const st=g.useMemo(()=>{const ve=Cb(z,o,pn,B);return Y(ve,F==null?void 0:F(pn))},[pn,F,z,o,B]);g.useImperativeHandle(r,()=>({nativeElement:$e.current,popupElement:ae.current,forceAlign:Oe}));const[Be,U]=g.useState(0),[ge,pe]=g.useState(0),we=()=>{if(H&&ce){const ve=ce.getBoundingClientRect();U(ve.width),pe(ve.height)}},Te=()=>{we(),Oe()},ke=ve=>{Ot(!1),en(),p==null||p(ve),m==null||m(ve)},Fe=()=>new Promise(ve=>{we(),_t(()=>ve)});Bt(()=>{gt&&(en(),gt(),_t(null))},[gt]);function De(ve,Xe,Wt,Wr,$r){W[ve]=(xd,...H0)=>{var yd;(!$r||!$r())&&(Wr==null||Wr(xd),Qe(Xe,Wt)),(yd=Ie[ve])==null||yd.call(Ie,xd,...H0)}}const ft=Dt.has("touch"),Pt=at.has("touch"),ht=g.useRef(!1);(ft||Pt)&&(W.onTouchStart=(...ve)=>{var Xe;ht.current=!0,ze.current&&Pt?Qe(!1):!ze.current&&ft&&Qe(!0),(Xe=Ie.onTouchStart)==null||Xe.call(Ie,...ve)}),(Vt||vt)&&(W.onClick=(ve,...Xe)=>{var Wt;ze.current&&vt?Qe(!1):!ze.current&&Vt&&(pt(ve),Qe(!0)),(Wt=Ie.onClick)==null||Wt.call(Ie,ve,...Xe),ht.current=!1});const Ct=YI(ee,vt||Pt,ce,se,E,C,K,Qe),mt=Dt.has("hover"),Lt=at.has("hover");let Le,Tt;const Nt=()=>ht.current;if(mt){const ve=Xe=>{pt(Xe)};De("onMouseEnter",!0,w,ve,Nt),De("onPointerEnter",!0,w,ve,Nt),Le=Xe=>{(ee||wt)&&(se!=null&&se.contains(Xe.target))&&Qe(!0,w)},B&&(W.onMouseMove=Xe=>{var Wt;(Wt=Ie.onMouseMove)==null||Wt.call(Ie,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=(ve,...Xe)=>{var Wt;ze.current&&at.has("contextMenu")?Qe(!1):(pt(ve),Qe(!0)),ve.preventDefault(),(Wt=Ie.onContextMenu)==null||Wt.call(Ie,ve,...Xe)});const Bn=g.useRef(!1);Bn.current||(Bn.current=I||ee||wt);const Er={...Ie,...W},Ai={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(ve=>{Q[ve]&&(Ai[ve]=(...Xe)=>{var Wt;(Wt=Er[ve])==null||Wt.call(Er,...Xe),Q[ve](...Xe)})});const ys={x:Ht,y:an};Fh(ee,ce,Te);const ws=Hr(Pe,cr(Ee)),vs=g.cloneElement(Ee,{...Er,...Ai,ref:ws});return g.createElement(g.Fragment,null,vs,Bn.current&&(!re||!X)&&g.createElement($a.Provider,{value:Ce},g.createElement(Gu,{portal:e,ref:he,prefixCls:o,popup:O,className:Y(k,!q&&st),style:A,target:ce,onMouseEnter:Le,onMouseLeave:Tt,onPointerEnter:Le,zIndex:_,open:ee,keepDom:wt,fresh:R,onClick:P,onPointerDownCapture:Ct,mask:E,motion:G,maskMotion:te,onVisibleChanged:ke,onPrepare:Fe,forceRender:I,autoDestroy:le,getPopupContainer:v,onEsc:It,align:pn,arrow:ue,arrowPos:ys,ready:Cn,offsetX:Fn,offsetY:_n,offsetR:Rt,offsetB:Sn,onAlign:Oe,stretch:H,targetWidth:Be/jn,targetHeight:ge/fn,mobile:j})))});return process.env.NODE_ENV!=="production"&&(t.displayName="Trigger"),t}const Ku=eR(as);function $b(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 On(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})=>On(e,i=>({className:Y(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 kb=({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 gc=g.createContext(!0);process.env.NODE_ENV!=="production"&&(gc.displayName="MotionCacheContext");function lR(e){const t=g.useContext(gc),{children:n}=e,[,r]=Cr(),{motion:o}=r,i=g.useRef(!1);return i.current||(i.current=t!==o),i.current?g.createElement(gc.Provider,{value:o},g.createElement(W$,{motion:o},n)):n}const Ib=g.memo(e=>{const{dropdownMatchSelectWidth:t}=e;return At("ConfigProvider").deprecated(t===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&(Ib.displayName="PropWarning");const cR=process.env.NODE_ENV!=="production"?Ib:()=>null,uR=({iconPrefixCls:e,csp:t})=>(lI(e,t),null);let hc=!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:C,componentDisabled:v,segmented:I,statistic:T,spin:O,calendar:k,carousel:N,cascader:D,collapse:A,typography:M,checkbox:z,descriptions:L,divider:_,drawer:H,skeleton:F,steps:R,image:X,layout:B,list:P,listy:J,mentions:V,modal:G,progress:te,result:j,slider:Q,breadcrumb:le,masonry:fe,menu:q,pagination:oe,input:ie,inputPassword:Ce,inputSearch:re,textArea:ne,otp:se,empty:ye,badge:ae,borderBeam:he,radio:ce,rate:Ne,ribbon:$e,switch:Pe,transfer:W,avatar:K,message:ue,tag:be,table:Se,card:de,cardMeta:ee,tabs:Ee,timeline:Ie,timePicker:Ge,upload:Re,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:Fn,floatButton:_n,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:jn}=e,fn=g.useMemo(()=>{var pe;return rn(c)&&Object.prototype.hasOwnProperty.call(c,"default")&&((pe=c.default)!=null&&pe.locale)?c.default:c},[c]),pn=g.useCallback((pe,we)=>{const{prefixCls:Te}=e;if(we)return we;const ke=Te||x.getPrefixCls("");return pe?`${ke}-${pe}`:ke},[x.getPrefixCls,e.prefixCls]),en=E||x.iconPrefixCls||_u,Dt=n||x.csp,at=sR(C,x.theme,{prefixCls:pn("")});process.env.NODE_ENV!=="production"&&(hc=hc||!!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:T,spin:O,calendar:k,carousel:N,cascader:D,collapse:A,typography:M,checkbox:z,descriptions:L,divider:_,drawer:H,skeleton:F,steps:R,image:X,input:ie,inputPassword:Ce,inputSearch:re,textArea:ne,otp:se,layout:B,list:P,listy:J,mentions:V,modal:G,progress:te,result:j,slider:Q,breadcrumb:le,masonry:fe,menu:q,pagination:oe,empty:ye,badge:ae,borderBeam:he,radio:ce,rate:Ne,ribbon:$e,switch:Pe,transfer:W,avatar:K,message:ue,tag:be,table:Se,card:de,cardMeta:ee,tabs:Ee,timeline:Ie,timePicker:Ge,upload:Re,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:Fn,floatButton:_n,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:jn};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(pe=>{Vt[pe]!==void 0&&(vt[pe]=Vt[pe])}),dR.forEach(pe=>{const we=e[pe];we&&(vt[pe]=we)}),typeof r<"u"&&(vt.button={autoInsertSpace:r,...vt.button});const Oe=Ka(()=>vt,vt,(pe,we)=>{const Te=Object.keys(pe),ke=Object.keys(we);return Te.length!==ke.length||Te.some(Fe=>pe[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 U=g.useMemo(()=>{var pe,we,Te,ke;return oo(((pe=bo.Form)==null?void 0:pe.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(U).length>0&&(Be=g.createElement(PI.Provider,{value:U},Be)),fn&&(Be=g.createElement(gb,{locale:fn,_ANT_MARK__:mb},Be)),Be=g.createElement(Lu.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(kb,null,Be));const ge=g.useMemo(()=>{const{algorithm:pe,token:we,components:Te,cssVar:ke,...Fe}=at||{},De=pe&&(!Array.isArray(pe)||pe.length>0)?ya(pe):Zh,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 C&&(Be=g.createElement(ju.Provider,{value:ge},Be)),Oe.warning&&(Be=g.createElement(Oh.Provider,{value:Oe.warning},Be)),v!==void 0&&(Be=g.createElement(oR,{disabled:v},Be)),g.createElement(dt.Provider,{value:Oe},Be)},Sr=e=>{const t=g.useContext(dt),n=g.useContext(Xu);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"&&Fu(!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 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 gR=(e,t)=>g.createElement(Jt,bc({},e,{ref:t,icon:mR})),Rb=g.forwardRef(gR);process.env.NODE_ENV!=="production"&&(Rb.displayName="LoadingOutlined");function Pb(...e){return e.find(t=>t!==void 0)}const Tb=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:Pb(rn(t)?t==null?void 0:t.clearIcon:n,rn(r)?r==null?void 0:r.clearIcon:o,b.createElement(lb,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])},Sp=e=>e==="horizontal"||e==="vertical",Yu=(e,t,n)=>b.useMemo(()=>{const r=Sp(e);let o;return r?o=e:typeof t=="boolean"?o=t?"vertical":"horizontal":o=Sp(n)?n:"horizontal",[o,o==="vertical"]},[n,e,t]),ss=b.createContext(void 0);process.env.NODE_ENV!=="production"&&(ss.displayName="ZIndexContext");const Jn=100,hR=10,bR=Jn*hR,xR=bR+Jn,Nb={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 Nb,Qu=(e,t)=>{const[,n]=Cr(),r=b.useContext(ss),o=wR(e);let i;if(t!==void 0)i=[t,t];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+Nb[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},Ys=()=>({height:0,opacity:0}),Ep=e=>({height:(e==null?void 0:e.scrollHeight)??0,opacity:e?1:0}),vR=e=>({height:(e==null?void 0:e.offsetHeight)??0}),Qs=(e,t)=>(t==null?void 0:t.deadline)===!0||cb(t)&&t.propertyName==="height",CR=(e=wa)=>({motionName:`${e}-motion-collapse`,onAppearStart:Ys,onEnterStart:Ys,onAppearActive:Ep,onEnterActive:Ep,onLeaveStart:vR,onLeaveActive:Ys,onAppearEnd:Qs,onEnterEnd:Qs,onLeaveEnd:Qs,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),Mb=`${wa}-wave-target`,$p=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&&$p(n[t])?n[t]:[r,o,i].find($p)??null}function Zs(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),[C,v]=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 T(){const k=getComputedStyle(n);u(kR(n,o));const N=k.position==="static",{borderLeftWidth:D,borderTopWidth:A}=k;h(N?n.offsetLeft:Zs(-Number.parseFloat(D))),w(N?n.offsetTop:Zs(-Number.parseFloat(A))),$(n.offsetWidth),E(n.offsetHeight);const{borderTopLeftRadius:M,borderTopRightRadius:z,borderBottomLeftRadius:L,borderBottomRightRadius:_}=k;f([M,z,_,L].map(H=>Zs(Number.parseFloat(H))))}if(g.useEffect(()=>{if(n){const k=xt(()=>{T(),v(!0)});let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(T),N.observe(n)),()=>{xt.cancel(k),N==null||N.disconnect()}}},[n]),!C)return null;const O=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(Mb));return g.createElement(vr,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(k,N)=>{var D;if(N.deadline||cb(N)&&N.propertyName==="opacity"){const A=(D=i.current)==null?void 0:D.parentElement;V$(A).then(()=>{A==null||A.remove()})}return!1}},({className:k},N)=>g.createElement("div",{ref:Gn(i,N),className:Y(t,k,{"wave-quick":O}),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(`.${Mb}`)||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)})}},kp={click:"click",mousedown:"mousedown",mouseup:"mouseup",pointerdown:"pointerdown",pointerup:"pointerup"},Ab=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,Y(l,c),r,o);if(b.useEffect(()=>{const f=s.current;if(!f||f.nodeType!==window.Node.ELEMENT_NODE||n)return;const p=w=>{!$u(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 kp?kp[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 On(t,{ref:d})};process.env.NODE_ENV!=="production"&&(Ab.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}),ls=g.createContext(null),To=(e,t)=>{const n=g.useContext(ls),r=g.useMemo(()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return Y(`${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(ls.Provider,{value:null},t)},AR=e=>{const{children:t,...n}=e;return g.createElement(ls.Provider,{value:g.useMemo(()=>n,[n])},t)},zb=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]=Yu(a,f,i),w=Po(T=>o??T),y=n("space-compact",l),[$]=NR(y),x=Y(y,$,{[`${y}-rtl`]:r==="rtl",[`${y}-block`]:s,[`${y}-vertical`]:m},c,u),E=g.useContext(ls),C=g.useRef(null);g.useImperativeHandle(t,()=>({nativeElement:C.current}));const v=or(d),I=g.useMemo(()=>v.map((T,O)=>{const k=(T==null?void 0:T.key)||`${y}-item-${O}`;return g.createElement(AR,{key:k,compactSize:w,compactDirection:h,isFirstItem:O===0&&(!E||(E==null?void 0:E.isFirstItem)),isLastItem:O===v.length-1&&(!E||(E==null?void 0:E.isLastItem))},T)}),[v,E,h,w,y]);return v.length===0?null:g.createElement("div",{ref:C,className:x,...p},I)}),Ob=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=Y(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},i,l);return g.createElement(Ob.Provider,{value:o},g.createElement("div",{...a,className:u}))},Ip=/^[\u4E00-\u9FA5]{2}$/,xc=Ip.test.bind(Ip);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)&&xc(e.props.children)?On(e,i=>{const a=Y(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},xc(e)?e.split("").join(o):e):$b(e)?b.createElement("span",{className:r,style:n},e):On(e,i=>({...i,className:Y(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 Db=b.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,a=Y(`${i}-icon`,n);return b.createElement("span",{ref:t,className:a,style:r},o)}),Rp=b.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,a=Y(`${n}-loading-icon`,r);return b.createElement(Db,{prefixCls:n,className:a,style:o,ref:t},b.createElement(Rb,{className:i}))}),Js=()=>({width:0,opacity:0,transform:"scale(0)"}),el=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(Rp,{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:Js,onAppearActive:el,onEnterStart:Js,onEnterActive:el,onLeaveStart:el,onLeaveActive:Js},({className:l,style:c},u)=>{const d={...i,...c};return b.createElement(Rp,{prefixCls:t,className:Y(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`}}}},Pp=e=>({animationDuration:e,animationFillMode:"both"}),cs=(e,t,n,r,o=!1)=>{const i=o?"&":"";return{[`
|
|
192
|
+
}`,n)}else oi(n);return()=>{oi(n)}},[t,n])}let hr=[];const _I=200;let qu=0;process.env.NODE_ENV;const gb=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-qu<_I)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 jI(){window.addEventListener("keydown",gb),window.addEventListener("compositionend",hb)}function BI(){hr.length===0&&(window.removeEventListener("keydown",gb),window.removeEventListener("compositionend",hb))}function HI(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(),jI(),()=>{i(),BI()}},[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]=OI(d&&!f,i),w=f??h;FI(r&&n&&vn()&&(w===h||w===document.body)),HI(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||zI();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 VI(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:Y(`${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 WI(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:Y(`${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:T,zIndex:O,onMouseEnter:k,onMouseLeave:N,onPointerEnter:D,onPointerDownCapture:A,ready:M,offsetX:z,offsetY:L,offsetR:j,offsetB:H,onAlign:F,onPrepare:R,onResize:X,stretch:B,targetWidth:P,targetHeight:J}=e,V=typeof r=="function"?r():r,G=c||u,te=!!x,[_,Q,le]=g.useMemo(()=>x?[x.mask,x.maskMotion,x.motion]:[p,$,y],[x,p,$,y]),fe=(v==null?void 0:v.length)>0,[q,oe]=g.useState(!v||!fe);Bt(()=>{!q&&fe&&s&&oe(!0)},[q,fe,s]);const ie=Ke((re,se)=>{X==null||X(re,se),F()}),Ce=xb(te,M,c,w,j,H,z,L);if(!q)return null;const ne={};return B&&(B.includes("height")&&J?ne.height=J:B.includes("minHeight")&&J&&(ne.minHeight=J),B.includes("width")&&P?ne.width=P:B.includes("minWidth")&&P&&(ne.minWidth=P)),c||(ne.pointerEvents="none"),g.createElement(I,{open:E||G,getContainer:v&&(()=>v(s)),autoDestroy:C,onEsc:n},g.createElement(WI,{prefixCls:i,open:c,zIndex:O,mask:_,motion:Q,mobile:te}),g.createElement(ko,{onResize:ie,disabled:!c},re=>g.createElement(vr,uc({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:`${i}-hidden`},le,{onAppearPrepare:R,onEnterPrepare:R,visible:c,onVisibleChanged:se=>{var ye;(ye=y==null?void 0:y.onVisibleChanged)==null||ye.call(y,se),l(se)}}),({className:se,style:ye},ae)=>{const he=Y(i,se,o,{[`${i}-mobile`]:te});return g.createElement("div",{ref:Gn(re,t,ae),className:he,style:{"--arrow-x":`${m.x||0}px`,"--arrow-y":`${m.y||0}px`,...Ce,...ne,...ye,boxSizing:"border-box",zIndex:O,...a},onMouseEnter:k,onMouseLeave:N,onPointerEnter:D,onClick:f,onPointerDownCapture:A},h&&g.createElement(VI,{prefixCls:i,arrow:h,arrowPos:m,align:w}),g.createElement(bb,{cache:!c&&!d},V))})),T)});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 qI(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 XI(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(XI((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,T=w*E,O=y*x,k=$*x;let N=0,D=0;if(o==="clip"){const j=Fo(i);N=j*x,D=j*E}const A=u.x+O-N,M=u.y+I-D,z=A+u.width+2*N-O-k-v,L=M+u.height+2*D-I-T-C;n.left=Math.max(n.left,A),n.top=Math.max(n.top,M),n.right=Math.min(n.right,z),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=se){const Hn=j.x+Le,Er=j.y+Tt,Ai=Hn+te,gd=Er+G,bs=Math.max(Hn,Nt.left),xs=Math.max(Er,Nt.top),ys=Math.min(Ai,Nt.right),ve=Math.min(gd,Nt.bottom);return Math.max(0,(ys-bs)*(ve-xs))},Bn=function(){Rt=j.y+Me,Sn=Rt+G,Ht=j.x+ze,an=Ht+te};const x=t,E=x.ownerDocument,v=wi(x),{position:C}=v.getComputedStyle(x),I=x.style.left,T=x.style.top,O=x.style.right,k=x.style.bottom,N=x.style.overflow,D=x.style.overflowX,A=x.style.overflowY,M={...o[r],...i},z=E.createElement("div");(y=x.parentElement)==null||y.appendChild(z),z.style.left=`${x.offsetLeft}px`,z.style.top=`${x.offsetTop}px`,z.style.position=C,z.style.height=`${x.offsetHeight}px`,z.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:H,width:F}=v.getComputedStyle(x);j.x=j.x??j.left,j.y=j.y??j.top;const{clientWidth:R,clientHeight:X,scrollWidth:B,scrollHeight:P,scrollTop:J,scrollLeft:V}=E.documentElement,G=j.height,te=j.width,_=L.height,Q=L.width,le={left:0,top:0,right:R,bottom:X},fe={left:-V,top:-J,right:B-V,bottom:P-J};let{htmlRegion:q}=M;const oe="visible",ie="visibleFirst";q!=="scroll"&&q!==ie&&(q=oe);const Ce=q===ie,ne=hp(fe,d),re=hp(le,d),se=q===oe?re:ne,ye=Ce?re:se;x.style.left="auto",x.style.top="auto",x.style.right="0",x.style.bottom="0";const ae=x.getBoundingClientRect();x.style.left=I,x.style.top=T,x.style.right=O,x.style.bottom=k,x.style.overflow=N,x.style.overflowX=D,x.style.overflowY=A,($=x.parentElement)==null||$.removeChild(z);const he=ui(Math.round(te/parseFloat(F)*1e3)/1e3),ce=ui(Math.round(G/parseFloat(H)*1e3)/1e3);if(he===0||ce===0||go(n)&&!Su(n))return;const{offset:Ne,targetOffset:$e}=M;let[Pe,W]=xp(j,Ne);const[K,ue]=xp(L,$e);L.x-=K,L.y-=ue;const[be,Se]=M.points||[],de=yp(Se),ee=yp(be),Ee=Gr(L,de),Ie=Gr(j,ee),Ge={...M};let Re=[ee,de],ze=Ee.x-Ie.x+Pe,Me=Ee.y-Ie.y+W;const Qe=it(ze,Me),It=it(ze,Me,re),wt=Gr(L,["t","l"]),Ot=Gr(j,["t","l"]),gt=Gr(L,["b","r"]),_t=Gr(j,["b","r"]),jt=M.overflow||{},{adjustX:_e,adjustY:pt,shiftX:Cn,shiftY:_n}=jt,jn=Le=>typeof Le=="boolean"?Le:Le>=0;let Rt,Sn,Ht,an;Bn();const fn=jn(pt),pn=ee[0]===de[0];if(fn&&ee[0]==="t"&&(Sn>ye.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,re);Tt>Qe||Tt===Qe&&(!Ce||Nt>=It)?(f.current.bt=!0,Me=Le,W=-W,Re=[fr(Re[0],0),fr(Re[1],0)]):f.current.bt=!1}if(fn&&ee[0]==="b"&&(Rt<ye.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,re);Tt>Qe||Tt===Qe&&(!Ce||Nt>=It)?(f.current.tb=!0,Me=Le,W=-W,Re=[fr(Re[0],0),fr(Re[1],0)]):f.current.tb=!1}const en=jn(_e),Dt=ee[1]===de[1];if(en&&ee[1]==="l"&&(an>ye.right||f.current.rl)){let Le=ze;Dt?Le-=te-Q:Le=wt.x-_t.x-Pe;const Tt=it(Le,Me),Nt=it(Le,Me,re);Tt>Qe||Tt===Qe&&(!Ce||Nt>=It)?(f.current.rl=!0,ze=Le,Pe=-Pe,Re=[fr(Re[0],1),fr(Re[1],1)]):f.current.rl=!1}if(en&&ee[1]==="r"&&(Ht<ye.left||f.current.lr)){let Le=ze;Dt?Le+=te-Q:Le=gt.x-Ot.x-Pe;const Tt=it(Le,Me),Nt=it(Le,Me,re);Tt>Qe||Tt===Qe&&(!Ce||Nt>=It)?(f.current.lr=!0,ze=Le,Pe=-Pe,Re=[fr(Re[0],1),fr(Re[1],1)]):f.current.lr=!1}Ge.points=[wp(Re[0]),wp(Re[1])],Bn();const at=Cn===!0?0:Cn;typeof at=="number"&&(Ht<re.left&&(ze-=Ht-re.left-Pe,L.x+Q<re.left+at&&(ze+=L.x-re.left+Q-at)),an>re.right&&(ze-=an-re.right-Pe,L.x>re.right-at&&(ze+=L.x-re.right+at)));const Vt=_n===!0?0:_n;typeof Vt=="number"&&(Rt<re.top&&(Me-=Rt-re.top-W,L.y+_<re.top+Vt&&(Me+=L.y-re.top+_-Vt)),Sn>re.bottom&&(Me-=Sn-re.bottom-W,L.y>re.bottom-Vt&&(Me+=L.y-re.bottom+Vt)));const vt=j.x+ze,Oe=vt+te,Ze=j.y+Me,st=Ze+G,Be=L.x,U=Be+Q,ge=L.y,pe=ge+_,we=Math.max(vt,Be),Te=Math.min(Oe,U),Fe=(we+Te)/2-vt,De=Math.max(Ze,ge),ft=Math.min(st,pe),ht=(De+ft)/2-Ze;a==null||a(t,Ge);let Ct=ae.right-j.x-(ze+j.width),mt=ae.bottom-j.y-(Me+j.height);he===1&&(ze=Math.floor(ze),Ct=Math.floor(Ct)),ce===1&&(Me=Math.floor(Me),mt=Math.floor(mt));const Lt={ready:!0,offsetX:ze/he,offsetY:Me/ce,offsetR:Ct/he,offsetB:mt/ce,arrowX:Fe/he,arrowY:ht/ce,scaleX:he,scaleY:ce,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 UI(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 GI(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 KI(){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 YI=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=Y(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}})})},QI=({children:e,postTriggerProps:t})=>{const[n,r,o,i]=KI(),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(H=>{d.current=H,go(H)&&s!==H&&l(H)}),p=g.useRef(null),h=Cb(),m=Ke((H,F)=>{p.current=F,h(()=>{n(H)},H.delay)}),w=H=>{h(()=>{var F;(F=p.current)!=null&&F.call(p)||n(!1)},H)},y=Ke(H=>{i(H)}),[$,x,E,v,C,I,T,,,O,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),N=g.useMemo(()=>{var F;if(!a)return"";const H=wb(a.builtinPlacements||{},a.prefixCls||"",O,!1);return Y(H,(F=a.getPopupClassNameFromAlign)==null?void 0:F.call(a,O))},[O,a==null?void 0:a.getPopupClassNameFromAlign,a==null?void 0:a.builtinPlacements,a==null?void 0:a.prefixCls]),D=g.useMemo(()=>({show:m,hide:w}),[]);g.useEffect(()=>{k()},[a==null?void 0:a.target]);const A=Ke(()=>(k(),Promise.resolve())),M=g.useRef({}),z=g.useContext($a),L=g.useMemo(()=>({registerSubPopup:(H,F)=>{M.current[H]=F,z==null||z.registerSubPopup(H,F)}}),[z]),j=a==null?void 0:a.prefixCls;return g.createElement(yb.Provider,{value:D},e,a&&g.createElement($a.Provider,{value:L},g.createElement(Xu,{ref:f,portal:os,onEsc:a.onEsc,prefixCls:j,popup:a.popup,className:Y(a.popupClassName,N,`${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:H=>u({width:H.offsetWidth,height:H.offsetHeight}),arrowPos:{x:I,y:T},align:O,zIndex:a.zIndex,mask:a.mask,arrow:a.arrow,motion:a.popupMotion,maskMotion:a.maskMotion,getPopupContainer:a.getPopupContainer},g.createElement(YI,{prefixCls:j,isMobile:!1,ready:$,open:r,align:O,offsetR:v,offsetB:C,offsetX:x,offsetY:E,arrowPos:{x:I,y:T},popupSize:c,motion:a.popupMotion,uniqueContainerClassName:Y(a.uniqueContainerClassName,N),uniqueContainerStyle:a.uniqueContainerStyle}))))};function ZI(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:T,popup:O,popupClassName:k,uniqueContainerClassName:N,uniqueContainerStyle:D,popupStyle:A,popupPlacement:M,builtinPlacements:z={},popupAlign:L,zIndex:j,stretch:H,getPopupClassNameFromAlign:F,fresh:R,unique:X,alignPoint:B,onPopupClick:P,onPopupAlign:J,arrow:V,popupMotion:G,maskMotion:te,mobile:_,...Q}=n,le=T||!1,fe=u===void 0,q=!!_,oe=g.useRef({}),ie=g.useContext($a),Ce=g.useMemo(()=>({registerSubPopup:(ve,Xe)=>{oe.current[ve]=Xe,ie==null||ie.registerSubPopup(ve,Xe)}}),[ie]),ne=g.useContext(yb),re=Ga(),[se,ye]=g.useState(null),ae=g.useRef(null),he=Ke(ve=>{ae.current=ve,go(ve)&&se!==ve&&ye(ve),ie==null||ie.registerSubPopup(re,ve)}),[ce,Ne]=g.useState(null),$e=g.useRef(null),Pe=Ke(ve=>{const Xe=Cu(ve);go(Xe)&&ce!==Xe&&(Ne(Xe),$e.current=Xe)}),W={},K=Ke(ve=>{var Wt,Wr;const Xe=ce;return(Xe==null?void 0:Xe.contains(ve))||((Wt=Il(Xe))==null?void 0:Wt.host)===ve||ve===Xe||(se==null?void 0:se.contains(ve))||((Wr=Il(se))==null?void 0:Wr.host)===ve||ve===se||Object.values(oe.current).some($r=>($r==null?void 0:$r.contains(ve))||ve===$r)}),ue=V?{...V!==!0?V:{}}:null,[be,Se]=un(d||!1,u),de=be||!1,ee=de&&!c,Ee=g.useMemo(()=>{const ve=typeof i=="function"?i({open:ee}):i;return g.Children.only(ve)},[i,ee]),Ie=(Ee==null?void 0:Ee.props)||{},Ge=Ke(()=>ee),Re=Ke((ve=0)=>({popup:O,target:ce,delay:ve,prefixCls:o,popupClassName:k,uniqueContainerClassName:N,uniqueContainerStyle:D,popupStyle:A,popupPlacement:M,builtinPlacements:z,popupAlign:L,zIndex:j,mask:E,maskClosable:v,popupMotion:G,maskMotion:te,arrow:ue,getPopupContainer:C,getPopupClassNameFromAlign:F,id:re,onEsc:It}));Bt(()=>{ne&&X&&ce&&!fe&&!ie&&(ee?ne.show(Re(w),Ge):ne.hide(y))},[ee,ce]);const ze=g.useRef(ee);ze.current=ee;const Me=Ke(ve=>{po.flushSync(()=>{de!==ve&&(Se(ve),f==null||f(ve),h==null||h(ve))})}),it=Cb(),Qe=(ve,Xe=0)=>{if(u!==void 0){it(()=>{Me(ve)},Xe);return}if(ne&&X&&fe&&!ie){ve?ne.show(Re(Xe),Ge):ne.hide(Xe);return}it(()=>{Me(ve)},Xe)};function It({top:ve}){ve&&Qe(!1)}const[wt,Ot]=g.useState(!1);Bt(ve=>{(!ve||ee)&&Ot(!0)},[ee]);const[gt,_t]=g.useState(null),[jt,_e]=g.useState(null),pt=ve=>{_e([ve.clientX,ve.clientY])},[Cn,_n,jn,Rt,Sn,Ht,an,Bn,fn,pn,en]=vb(ee,se,B&&jt!==null?jt:ce,M,z,L,J,q),[Dt,at]=qI(a,s,l),Vt=Dt.has("click"),vt=at.has("click")||at.has("contextMenu"),Oe=Ke(()=>{wt||en()});UI(ee,ce,se,Oe,()=>{ze.current&&B&&vt&&Qe(!1)}),Bt(()=>{Oe()},[jt,M]),Bt(()=>{ee&&!(z!=null&&z[M])&&Oe()},[JSON.stringify(L)]);const st=g.useMemo(()=>{const ve=wb(z,o,pn,B);return Y(ve,F==null?void 0:F(pn))},[pn,F,z,o,B]);g.useImperativeHandle(r,()=>({nativeElement:$e.current,popupElement:ae.current,forceAlign:Oe}));const[Be,U]=g.useState(0),[ge,pe]=g.useState(0),we=()=>{if(H&&ce){const ve=ce.getBoundingClientRect();U(ve.width),pe(ve.height)}},Te=()=>{we(),Oe()},ke=ve=>{Ot(!1),en(),p==null||p(ve),m==null||m(ve)},Fe=()=>new Promise(ve=>{we(),_t(()=>ve)});Bt(()=>{gt&&(en(),gt(),_t(null))},[gt]);function De(ve,Xe,Wt,Wr,$r){W[ve]=(hd,...j0)=>{var bd;(!$r||!$r())&&(Wr==null||Wr(hd),Qe(Xe,Wt)),(bd=Ie[ve])==null||bd.call(Ie,hd,...j0)}}const ft=Dt.has("touch"),Pt=at.has("touch"),ht=g.useRef(!1);(ft||Pt)&&(W.onTouchStart=(...ve)=>{var Xe;ht.current=!0,ze.current&&Pt?Qe(!1):!ze.current&&ft&&Qe(!0),(Xe=Ie.onTouchStart)==null||Xe.call(Ie,...ve)}),(Vt||vt)&&(W.onClick=(ve,...Xe)=>{var Wt;ze.current&&vt?Qe(!1):!ze.current&&Vt&&(pt(ve),Qe(!0)),(Wt=Ie.onClick)==null||Wt.call(Ie,ve,...Xe),ht.current=!1});const Ct=GI(ee,vt||Pt,ce,se,E,v,K,Qe),mt=Dt.has("hover"),Lt=at.has("hover");let Le,Tt;const Nt=()=>ht.current;if(mt){const ve=Xe=>{pt(Xe)};De("onMouseEnter",!0,w,ve,Nt),De("onPointerEnter",!0,w,ve,Nt),Le=Xe=>{(ee||wt)&&(se!=null&&se.contains(Xe.target))&&Qe(!0,w)},B&&(W.onMouseMove=Xe=>{var Wt;(Wt=Ie.onMouseMove)==null||Wt.call(Ie,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=(ve,...Xe)=>{var Wt;ze.current&&at.has("contextMenu")?Qe(!1):(pt(ve),Qe(!0)),ve.preventDefault(),(Wt=Ie.onContextMenu)==null||Wt.call(Ie,ve,...Xe)});const Hn=g.useRef(!1);Hn.current||(Hn.current=I||ee||wt);const Er={...Ie,...W},Ai={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(ve=>{Q[ve]&&(Ai[ve]=(...Xe)=>{var Wt;(Wt=Er[ve])==null||Wt.call(Er,...Xe),Q[ve](...Xe)})});const bs={x:Ht,y:an};Dh(ee,ce,Te);const xs=Hr(Pe,cr(Ee)),ys=g.cloneElement(Ee,{...Er,...Ai,ref:xs});return g.createElement(g.Fragment,null,ys,Hn.current&&(!ne||!X)&&g.createElement($a.Provider,{value:Ce},g.createElement(Xu,{portal:e,ref:he,prefixCls:o,popup:O,className:Y(k,!q&&st),style:A,target:ce,onMouseEnter:Le,onMouseLeave:Tt,onPointerEnter:Le,zIndex:j,open:ee,keepDom:wt,fresh:R,onClick:P,onPointerDownCapture:Ct,mask:E,motion:G,maskMotion:te,onVisibleChanged:ke,onPrepare:Fe,forceRender:I,autoDestroy:le,getPopupContainer:C,onEsc:It,align:pn,arrow:ue,arrowPos:bs,ready:Cn,offsetX:_n,offsetY:jn,offsetR:Rt,offsetB:Sn,onAlign:Oe,stretch:H,targetWidth:Be/Bn,targetHeight:ge/fn,mobile:_})))});return process.env.NODE_ENV!=="production"&&(t.displayName="Trigger"),t}const Uu=ZI(os);function Sb(e){return e&&b.isValidElement(e)&&e.type===b.Fragment}const JI=(e,t,n)=>b.isValidElement(e)?b.cloneElement(e,Qt(n)?n(e.props||{}):n):t;function Dn(e,t){return JI(e,e,t)}const eR=({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:Y(i.className,o),style:{...i.style,...r}}))):e},qi=[null,null];function tR(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=tR(o);return{...n,getPopupContainer:null,arrow:!1,popup:b.createElement(eR,{key:r},a),builtinPlacements:s}};return b.createElement(QI,{postTriggerProps:t},e)},yr=g.createContext(!1),nR=({children:e,disabled:t})=>{const n=g.useContext(yr);return g.createElement(yr.Provider,{value:t??n},e)},xo=g.createContext(void 0),rR=({children:e,size:t})=>{const n=g.useContext(xo);return g.createElement(xo.Provider,{value:t||n},e)};function oR(){const e=b.useContext(yr),t=b.useContext(xo);return{componentDisabled:e,componentSize:t}}function iR(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 aR(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(H$,{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 sR=process.env.NODE_ENV!=="production"?$b:()=>null,lR=({iconPrefixCls:e,csp:t})=>(aI(e,t),null);let mc=!1;process.env.NODE_ENV;const cR=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"],uR=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e},dR=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:T,spin:O,calendar:k,carousel:N,cascader:D,collapse:A,typography:M,checkbox:z,descriptions:L,divider:j,drawer:H,skeleton:F,steps:R,image:X,layout:B,list:P,listy:J,mentions:V,modal:G,progress:te,result:_,slider:Q,breadcrumb:le,masonry:fe,menu:q,pagination:oe,input:ie,inputPassword:Ce,inputSearch:ne,textArea:re,otp:se,empty:ye,badge:ae,borderBeam:he,radio:ce,rate:Ne,ribbon:$e,switch:Pe,transfer:W,avatar:K,message:ue,tag:be,table:Se,card:de,cardMeta:ee,tabs:Ee,timeline:Ie,timePicker:Ge,upload:Re,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:_n,floatButton:jn,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:Bn}=e,fn=g.useMemo(()=>{var pe;return rn(c)&&Object.prototype.hasOwnProperty.call(c,"default")&&((pe=c.default)!=null&&pe.locale)?c.default:c},[c]),pn=g.useCallback((pe,we)=>{const{prefixCls:Te}=e;if(we)return we;const ke=Te||x.getPrefixCls("");return pe?`${ke}-${pe}`:ke},[x.getPrefixCls,e.prefixCls]),en=E||x.iconPrefixCls||Lu,Dt=n||x.csp,at=iR(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:T,spin:O,calendar:k,carousel:N,cascader:D,collapse:A,typography:M,checkbox:z,descriptions:L,divider:j,drawer:H,skeleton:F,steps:R,image:X,input:ie,inputPassword:Ce,inputSearch:ne,textArea:re,otp:se,layout:B,list:P,listy:J,mentions:V,modal:G,progress:te,result:_,slider:Q,breadcrumb:le,masonry:fe,menu:q,pagination:oe,empty:ye,badge:ae,borderBeam:he,radio:ce,rate:Ne,ribbon:$e,switch:Pe,transfer:W,avatar:K,message:ue,tag:be,table:Se,card:de,cardMeta:ee,tabs:Ee,timeline:Ie,timePicker:Ge,upload:Re,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:_n,floatButton:jn,floatButtonGroup:Rt,variant:Sn,inputNumber:Ht,treeSelect:an,watermark:Bn};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(pe=>{Vt[pe]!==void 0&&(vt[pe]=Vt[pe])}),cR.forEach(pe=>{const we=e[pe];we&&(vt[pe]=we)}),typeof r<"u"&&(vt.button={autoInsertSpace:r,...vt.button});const Oe=Ka(()=>vt,vt,(pe,we)=>{const Te=Object.keys(pe),ke=Object.keys(we);return Te.length!==ke.length||Te.some(Fe=>pe[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(lR,{iconPrefixCls:en,csp:Dt}),g.createElement(sR,{dropdownMatchSelectWidth:m}),t);const U=g.useMemo(()=>{var pe,we,Te,ke;return oo(((pe=bo.Form)==null?void 0:pe.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(U).length>0&&(Be=g.createElement(II.Provider,{value:U},Be)),fn&&(Be=g.createElement(pb,{locale:fn,_ANT_MARK__:fb},Be)),Be=g.createElement(Ou.Provider,{value:st},Be),u&&(Be=g.createElement(rR,{size:u},Be)),Be=g.createElement(aR,null,Be),_e!=null&&_e.unique&&(Be=g.createElement(Eb,null,Be));const ge=g.useMemo(()=>{const{algorithm:pe,token:we,components:Te,cssVar:ke,...Fe}=at||{},De=pe&&(!Array.isArray(pe)||pe.length>0)?ya(pe):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(nR,{disabled:C},Be)),g.createElement(dt.Provider,{value:Oe},Be)},Sr=e=>{const t=g.useContext(dt),n=g.useContext(Wu);return g.createElement(dR,{parentContext:t,legacyLocale:n,...e})};Sr.ConfigContext=dt;Sr.SizeContext=xo;Sr.config=uR;Sr.useConfig=oR;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 fR={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 pR=(e,t)=>g.createElement(Jt,gc({},e,{ref:t,icon:fR})),kb=g.forwardRef(pR);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,mR=10,gR=Jn*mR,hR=gR+Jn,Pb={Modal:Jn,Drawer:Jn,Popover:Jn,Popconfirm:Jn,Tooltip:Jn,Tour:Jn,FloatButton:Jn},bR={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},xR=e=>e in Pb,Ku=(e,t)=>{const[,n]=Cr(),r=b.useContext(is),o=xR(e);let i;if(t!==void 0)i=[t,t];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+Pb[e]:a+=bR[e],i=[r===void 0?t:a,a]}if(process.env.NODE_ENV!=="production"){const a=At(e),s=n.zIndexPopupBase+hR,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}),yR=e=>({height:(e==null?void 0:e.offsetHeight)??0}),Ks=(e,t)=>(t==null?void 0:t.deadline)===!0||sb(t)&&t.propertyName==="height",wR=(e=wa)=>({motionName:`${e}-motion-collapse`,onAppearStart:Gs,onEnterStart:Gs,onAppearActive:Cp,onEnterActive:Cp,onLeaveStart:yR,onLeaveActive:Gs,onAppearEnd:Ks,onEnterEnd:Ks,onLeaveEnd:Ks,motionDeadline:500}),vR=(e,t,n)=>n!==void 0?n:`${e}-${t}`,CR=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(",")}}}}},SR=rI("Wave",CR),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 ER(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 $R=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 T(){const k=getComputedStyle(n);u(ER(n,o));const N=k.position==="static",{borderLeftWidth:D,borderTopWidth:A}=k;h(N?n.offsetLeft:Ys(-Number.parseFloat(D))),w(N?n.offsetTop:Ys(-Number.parseFloat(A))),$(n.offsetWidth),E(n.offsetHeight);const{borderTopLeftRadius:M,borderTopRightRadius:z,borderBottomLeftRadius:L,borderBottomRightRadius:j}=k;f([M,z,j,L].map(H=>Ys(Number.parseFloat(H))))}if(g.useEffect(()=>{if(n){const k=xt(()=>{T(),C(!0)});let N;return typeof ResizeObserver<"u"&&(N=new ResizeObserver(T),N.observe(n)),()=>{xt.cancel(k),N==null||N.disconnect()}}},[n]),!v)return null;const O=(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,N)=>{var D;if(N.deadline||sb(N)&&N.propertyName==="opacity"){const A=(D=i.current)==null?void 0:D.parentElement;B$(A).then(()=>{A==null||A.remove()})}return!1}},({className:k},N)=>g.createElement("div",{ref:Gn(i,N),className:Y(t,k,{"wave-quick":O}),style:I}))},kR=(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),j$(g.createElement($R,{...t,target:e}),r)},IR=(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||kR)(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=SR(l),u=IR(s,Y(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])},RR=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},PR=on(["Space","Compact"],RR,()=>({}),{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 Y(`${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}},TR=e=>{const{children:t}=e;return g.createElement(as.Provider,{value:null},t)},NR=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(T=>o??T),y=n("space-compact",l),[$]=PR(y),x=Y(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((T,O)=>{const k=(T==null?void 0:T.key)||`${y}-item-${O}`;return g.createElement(NR,{key:k,compactSize:w,compactDirection:h,isFirstItem:O===0&&(!E||(E==null?void 0:E.isFirstItem)),isLastItem:O===C.length-1&&(!E||(E==null?void 0:E.isLastItem))},T)}),[C,E,h,w,y]);return C.length===0?null:g.createElement("div",{ref:v,className:x,...p},I)}),Ab=g.createContext(void 0),MR=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=Y(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 AR(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=Y(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:Y(i.className,r)||void 0,style:{...i.style,...n}}))}function zR(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=>AR(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=Y(`${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=Y(`${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)"}),OR=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:Y(o,l),style:d,ref:u})})},DR=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{[`
|
|
193
193
|
${i}${e}-enter,
|
|
194
194
|
${i}${e}-appear
|
|
195
|
-
`]:{...
|
|
195
|
+
`]:{...Ip(r),animationPlayState:"paused"},[`${i}${e}-leave`]:{...Ip(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"}}},LR=new et("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),FR=new et("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),_R=(e,t=!1)=>{const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return[ss(r,LR,FR,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"}}]},jR=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}}),BR=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}}),HR=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}}),VR=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}}),WR=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}}),qR=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}}),XR=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}}),UR=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}}),GR={"move-up":{inKeyframes:XR,outKeyframes:UR},"move-down":{inKeyframes:jR,outKeyframes:BR},"move-left":{inKeyframes:HR,outKeyframes:VR},"move-right":{inKeyframes:WR,outKeyframes:qR}},Rp=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=GR[t];return[ss(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}}]},Ob=new et("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Db=new et("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Lb=new et("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Fb=new et("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),_b=new et("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),jb=new et("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),Bb=new et("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Hb=new et("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),KR={"slide-up":{inKeyframes:Ob,outKeyframes:Db},"slide-down":{inKeyframes:Lb,outKeyframes:Fb},"slide-left":{inKeyframes:_b,outKeyframes:jb},"slide-right":{inKeyframes:Bb,outKeyframes:Hb}},io=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=KR[t];return[ss(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}}]},YR=()=>({"@media (prefers-reduced-motion: reduce)":{"&, &::before, &::after":{transition:"none",animation:"none"}}}),QR=new et("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),ZR=new et("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Pp=new et("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Tp=new et("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),JR=new et("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),eP=new et("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),tP=new et("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),nP=new et("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),rP=new et("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),oP=new et("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),iP=new et("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),aP=new et("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),sP={zoom:{inKeyframes:QR,outKeyframes:ZR},"zoom-big":{inKeyframes:Pp,outKeyframes:Tp},"zoom-big-fast":{inKeyframes:Pp,outKeyframes:Tp},"zoom-left":{inKeyframes:tP,outKeyframes:nP},"zoom-right":{inKeyframes:rP,outKeyframes:oP},"zoom-up":{inKeyframes:JR,outKeyframes:eP},"zoom-down":{inKeyframes:iP,outKeyframes:aP}},Yu=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=sP[t];return[ss(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}}]},Ap=(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}},Ap(`${t}-primary`,o),Ap(`${t}-danger`,i)]}},tl=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=tl(t.s*100),r=tl(t.b*100),o=tl(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"),qb=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})},Xb=(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:Y(s,n),style:r,onClick:a},b.createElement("div",{className:Y(`${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 Ub(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:C,width:v,height:I}=n.current.getBoundingClientRect(),{width:T,height:O}=t.current.getBoundingClientRect(),k=T/2,N=O/2,D=Math.max(0,Math.min($-E,v))-k,A=Math.max(0,Math.min(x-C,I))-N,M={x:D,y:r==="x"?c.y:A};if(T===0&&O===0||T!==O)return!1;o==null||o(M)},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 Gb=({size:e="default",color:t,prefixCls:n})=>b.createElement("div",{className:Y(`${n}-handler`,{[`${n}-handler-sm`]:e==="small"}),style:{backgroundColor:t}}),Kb=({children:e,style:t,prefixCls:n})=>b.createElement("div",{className:`${n}-palette`,style:{position:"relative",...t}},e),Yb=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=qb({offset:d,targetRef:a,containerRef:i,color:e});s.current=f,t(f)}),[c,u]=Ub({color:e,containerRef:i,targetRef:a,calculate:()=>Xb(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(Kb,{prefixCls:n},b.createElement(Yb,{x:c.x,y:c.y,ref:a},b.createElement(Gb,{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 $=qb({offset:y,targetRef:c,containerRef:l,color:a,type:s});u.current=$,o(d($))}),[p,h]=Ub({color:a,targetRef:c,containerRef:l,calculate:()=>Xb(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:Y(`${t}-slider`,`${t}-slider-${s}`),onMouseDown:h,onTouchStart:h},b.createElement(Kb,{prefixCls:t},b.createElement(Yb,{x:p.x,y:p.y,ref:c},b.createElement(Gb,{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=(N,D)=>{n||m(N),i==null||i(N,D)},$=N=>new ir(h.setHue(N)),x=N=>new ir(h.setA(N/100)),E=N=>{y($(N),{type:"hue",value:N})},C=N=>{y(x(N),{type:"alpha",value:N})},v=N=>{a&&a($(N))},I=N=>{a&&a(x(N))},T=Y(`${o}-panel`,s,{[`${o}-panel-disabled`]:d}),O={prefixCls:o,disabled:d,color:h},k=b.createElement(b.Fragment,null,b.createElement(hP,ti({onChange:y},O,{onChangeComplete:a})),b.createElement("div",{className:`${o}-slider-container`},b.createElement("div",{className:Y(`${o}-slider-group`,{[`${o}-slider-group-disabled-alpha`]:u})},b.createElement(p,ti({},O,{type:"hue",colors:vP,min:0,max:359,value:h.getHue(),onChange:E,onChangeComplete:v})),!u&&b.createElement(p,ti({},O,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:w}],min:0,max:100,value:h.a*100,onChange:C,onChangeComplete:I}))),b.createElement(mP,{color:h.toRgbString(),prefixCls:o})));return b.createElement("div",{className:T,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 yc=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 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 kP=(e,t)=>g.createElement(Jt,wc({},e,{ref:t,icon:$P})),ka=g.forwardRef(kP);process.env.NODE_ENV!=="production"&&(ka.displayName="RightOutlined");const IP=e=>e instanceof yc?e:new yc(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},Qb=e=>{const{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return yt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},Zb=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 yc(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`]:Bu(),[`${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%"}),Ju=(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 Ju(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 Ju(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 Ju(t,`${e.componentCls}-lg`)},OP=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},DP=on("Button",e=>{const t=Qb(e);return[TP(t),MP(t),AP(t),zP(t),OP(t),PP(t),uP(t)]},Zb,{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 ed(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=Qb(e);return[ed(t),BP(t),HP(t)]},Zb);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:C,styles:v,style:I,autoInsertSpace:T,autoFocus:O,...k}=e,N=or(h),D=s||"default",{getPrefixCls:A,direction:M,autoInsertSpace:z,className:L,style:_,classNames:H,styles:F,loadingIcon:R,shape:X,color:B,variant:P}=Kn("button"),J=c||X||"default",[V,G]=b.useMemo(()=>{if(i&&a)return[i,a];if(s||l){const _e=qP[D]||[];return l?["danger",_e[1]]:_e}return a==="solid"?["primary",a]:B&&P?[B,P]:P==="solid"?["primary",P]:["default","outlined"]},[i,a,s,l,B,P,D]),[te,j]=b.useMemo(()=>$&&G==="solid"?[V,"outlined"]:[V,G],[V,G,$]),Q=te==="danger",le=Q?"dangerous":te,fe=T??z??!0,q=A("btn",o),[oe,ie]=DP(q),Ce=b.useContext(yr),re=d??Ce,ne=b.useContext(Ob),se=b.useMemo(()=>WP(r),[r]),[ye,ae]=c$(se.loading),[he,ce]=b.useState(!1),Ne=b.useRef(null),$e=Hr(t,Ne),Pe=N.length===1&&!m&&!Xi(j),W=b.useRef(!0);b.useEffect(()=>(W.current=!1,()=>{W.current=!0}),[]),Bt(()=>{se.delay>0?ae(!0,{ms:se.delay}):ae(se.loading,!0)},[se.delay,se.loading]),b.useEffect(()=>{if(!Ne.current||!fe)return;const _e=Ne.current.textContent||"";Pe&&xc(_e)?he||ce(!0):he&&ce(!1)}),b.useEffect(()=>{var _e;O&&((_e=Ne.current)==null||_e.focus())},[]);const K=b.useCallback(_e=>{var pt;if(ye||re){_e.preventDefault();return}(pt=e.onClick)==null||pt.call(e,("href"in e,_e))},[e.onClick,ye,re]);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(j)),"usage","`link` or `text` button can't be a `ghost` button."),_e.deprecated(!w,"iconPosition","iconPlacement")}const{compactSize:ue,compactItemClassnames:be}=To(q,M),Se=Po(_e=>u??ue??ne??_e),de=ye?"loading":m,ee=y??w??"start",Ee=Yt(k,["navigate"]),Ie={...e,type:D,color:te,variant:j,danger:Q,shape:J,size:Se,disabled:re,loading:ye,iconPlacement:ee},Ge=kt(_),Re=kt(I),[ze,Me]=Pn([n?void 0:H,C],[n?void 0:F,Ge,v,Re],{props:Ie}),it=Y(q,oe,ie,{[`${q}-${J}`]:J!=="default"&&J!=="square"&&J,[`${q}-${D}`]:D,[`${q}-dangerous`]:l,[`${q}-color-${le}`]:le,[`${q}-variant-${j}`]:j,[`${q}-lg`]:Se==="large",[`${q}-sm`]:Se==="small",[`${q}-icon-only`]:!h&&h!==0&&!!de,[`${q}-background-ghost`]:$&&!Xi(j),[`${q}-loading`]:ye,[`${q}-two-chinese-chars`]:he&&fe&&!ye,[`${q}-block`]:x,[`${q}-rtl`]:M==="rtl",[`${q}-icon-end`]:ee==="end"},be,f,p,L,ze.root),Qe={className:ze.icon,style:Me.icon},It=_e=>b.createElement(Db,{prefixCls:q,...Qe},_e),wt=b.createElement(LR,{existIcon:!!m,prefixCls:q,loading:ye,mount:W.current,...Qe}),Ot=rn(r)&&r.icon||R;let gt;m&&!ye?gt=It(m):r&&Ot?gt=It(Ot):gt=wt;const _t=xi(h)?DR(h,Pe&&fe,Me.content,ze.content):null;if(Ee.href!==void 0)return b.createElement("a",{...Ee,className:Y(it,{[`${q}-disabled`]:re}),href:re?void 0:Ee.href,style:Me.root,onClick:K,ref:$e,tabIndex:re?-1:0,"aria-disabled":re},gt,_t);let jt=b.createElement("button",{...k,type:E,className:it,style:Me.root,onClick:K,disabled:re,ref:$e},gt,_t,be&&b.createElement(VP,{prefixCls:q}));return Xi(j)||(jt=b.createElement(Ab,{component:"Button",disabled:ye},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 vc(e){return e==null?[]:Array.isArray(e)?e:[e]}function UP(e){return e&&!!e._init}function Cc(){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 nl=Cc(),GP=/%[sdj%]/g;let Jb=()=>{};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(Jb=(e,t)=>{typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&t.every(n=>typeof n=="string")&&console.warn(e,t)});function Sc(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 zp(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 Op extends Error{constructor(n,r){super("Async Validation Error");Z(this,"errors");Z(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 Op(w,Sc(w))):f(o)),m=QP(e);zp(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 Op(c,Sc(c))):d(o)};a.length||(r(c),d(o)),a.forEach(h=>{const m=e[h];i.indexOf(h)!==-1?zp(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 Dp(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 Lp(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))},ex=(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=C=>C&&C.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=C=>C&&C.exact?s:new RegExp(`(?:${t(C)}${n}${t(C)})|(?:${t(C)}${a}${t(C)})`,"g");u.v4=C=>C&&C.exact?l:new RegExp(`${t(C)}${n}${t(C)}`,"g"),u.v6=C=>C&&C.exact?c:new RegExp(`${t(C)}${a}${t(C)}`,"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},rl={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(rl.email)},tel(e){return typeof e=="string"&&e.length<=32&&!!e.match(rl.tel)},url(e){return typeof e=="string"&&e.length<=2048&&!!e.match(oT())},hex(e){return typeof e=="string"&&!!e.match(rl.hex)}},iT=(e,t,n,r,o)=>{if(e.required&&t===void 0){ex(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:ex,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){Z(this,"rules",null);Z(this,"_messages",nl);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=Lp(Cc(),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=Sc(f),a(f,p)):a(null,o)}if(i.messages){let d=this.messages();d===nl&&(d=Cc()),Lp(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 C=E.map(Dp(p,o));if(i.first&&C.length)return u[p.field]=1,f(C);if(!h)f(C);else{if(p.required&&!d.value)return p.message!==void 0?C=[].concat(p.message).map(Dp(p,o)):i.error&&(C=[i.error(p,yn(i.messages.required,p.field))]),f(C);let v={};p.defaultField&&Object.keys(d.value).map(O=>{v[O]=p.defaultField}),v={...v,...d.rule.fields};const I={};Object.keys(v).forEach(O=>{const k=v[O],N=Array.isArray(k)?k:[k];I[O]=N.map(m.bind(null,O))});const T=new mr(I);T.messages(i.messages),d.rule.options&&(d.rule.options.messages=i.messages,d.rule.options.error=i.error),T.validate(d.value,d.rule.options||i,O=>{const k=[];C&&C.length&&k.push(...C),O&&O.length&&k.push(...O),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}};Z(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}),Z(mr,"warning",Jb),Z(mr,"messages",nl),Z(mr,"validators",_o);let Ec=mr;const sn="'${name}' is not a valid ${type}",tx={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}"}},Fp=Ec;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 _p="CODE_LOGIC_ERROR";async function $c(e,t,n,r,o){const i={...n};if(delete i.ruleIndex,Fp.warning=()=>{},i.validator){const f=i.validator;i.validator=(...p)=>{try{return f(...p)}catch(h){return console.error(h),Promise.reject(_p)}}}let a=null;i&&i.type==="array"&&i.defaultField&&(a=i.defaultField,delete i.defaultField);const s=new Fp({[e]:[i]}),l=oo(tx,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===_p?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)=>$c(`${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 $c(a,t,f,r,i);if(p.length){u([{errors:p,rule:f}]);return}}c([])});else{const c=s.map(u=>$c(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 vc(e)}function jp(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 Bp(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 nx=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)};class RT{constructor(t){Z(this,"namePathList",[]);Z(this,"taskId",0);Z(this,"watcherList",new Set);Z(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;nx(()=>{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=>{nx(()=>{xt(()=>{e()})})})}function kc(){return kc=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},kc.apply(this,arguments)}const Ir=[],jo=[];function ol(e,t,n,r,o,i){return typeof e=="function"?e(t,n,"source"in i?{source:i.source}:{}):r!==o}class rx extends g.PureComponent{constructor(n){super(n);Z(this,"state",{resetCount:0});Z(this,"cancelRegisterFunc",null);Z(this,"mounted",!1);Z(this,"touched",!1);Z(this,"dirty",!1);Z(this,"validatePromise");Z(this,"prevValidating");Z(this,"errors",Ir);Z(this,"warnings",jo);Z(this,"cancelRegister",()=>{const{preserve:n,isListField:r,name:o}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(r,n,bt(o)),this.cancelRegisterFunc=null});Z(this,"getNamePath",()=>{const{name:n,fieldContext:r}=this.props,{prefixName:o=[]}=r;return n!==void 0?[...o,...n]:[]});Z(this,"getRules",()=>{const{rules:n=[],fieldContext:r}=this.props;return n.map(o=>typeof o=="function"?o(r):o)});Z(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:n})=>({resetCount:n+1}))});Z(this,"metaCache",null);Z(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});Z(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&&ol(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&&ol(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)&&ol(i,n,l,u,d,o)){this.reRender();return}break}i===!0&&this.reRender()});Z(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?vc(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});Z(this,"isFieldValidating",()=>!!this.validatePromise);Z(this,"isFieldTouched",()=>this.touched);Z(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});Z(this,"getErrors",()=>this.errors);Z(this,"getWarnings",()=>this.warnings);Z(this,"isListField",()=>this.props.isListField);Z(this,"isList",()=>this.props.isList);Z(this,"isPreserve",()=>this.props.preserve);Z(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}));Z(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}});Z(this,"getValue",n=>{const{getFieldsValue:r}=this.props.fieldContext,o=this.getNamePath();return In(n||r(!0),o)});Z(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||(v=>({[l]:v})),$=n[o],x=r!==void 0?y(w):{};process.env.NODE_ENV!=="production"&&x&&Object.keys(x).forEach(v=>{tt(typeof x[v]!="function",`It's not recommended to generate dynamic function prop by \`getValueProps\`. Please pass it to child component directly (prop: ${v})`)});const E={...n,...x};return E[o]=(...v)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();const I=this.getValue();let T;a?T=a(...v):T=IT(l,...v),s&&(T=s(T,I,h(!0))),T!==I&&m({type:"updateValue",namePath:f,value:T}),$&&$(...v)},vc(d||[]).forEach(v=>{const I=E[v];E[v]=(...T)=>{I&&I(...T);const{rules:O}=this.props;O&&O.length&&m({type:"validateField",namePath:f,triggerName:v})}}),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)}}Z(rx,"contextType",yo);function ox({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(rx,kc({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(ox,{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:(C,v)=>{const I=$();v>=0&&v<=I.length?(c.keys=[...c.keys.slice(0,v),c.id,...c.keys.slice(v)],m([...I.slice(0,v),C,...I.slice(v)])):(process.env.NODE_ENV!=="production"&&(v<0||v>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,C])),c.id+=1},remove:C=>{const v=$(),I=new Set(Array.isArray(C)?C:[C]);I.size<=0||(c.keys=c.keys.filter((T,O)=>!I.has(O)),m(v.filter((T,O)=>!I.has(O))))},move(C,v){if(C===v)return;const I=$();C<0||C>=I.length||v<0||v>=I.length||(c.keys=Bp(c.keys,C,v),m(Bp(I,C,v)))}};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((C,v)=>{let I=c.keys[v];return I===void 0&&(c.keys[v]=c.id,I=c.keys[v],c.id+=1),{name:v,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 Ic="__@field_split__";function Ki(e){return e.map(t=>`${typeof t}:${t}`).join(Ic)}class Yr{constructor(){Z(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+Ic,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(Ic);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){Z(this,"formHooked",!1);Z(this,"forceRootUpdate");Z(this,"subscribable",!0);Z(this,"store",{});Z(this,"fieldEntities",[]);Z(this,"initialValues",{});Z(this,"callbacks",{});Z(this,"validateMessages",null);Z(this,"preserve",null);Z(this,"lastValidatePromise",null);Z(this,"watcherCenter",new RT(this));Z(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}));Z(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));Z(this,"useSubscribe",t=>{this.subscribable=t});Z(this,"prevWithoutPreserves",null);Z(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)}});Z(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}});Z(this,"getInitialValue",t=>{const n=In(this.initialValues,t);return t.length?oo(n):n});Z(this,"setCallbacks",t=>{this.callbacks=t});Z(this,"setValidateMessages",t=>{this.validateMessages=t});Z(this,"setPreserve",t=>{this.preserve=t});Z(this,"registerWatch",t=>this.watcherCenter.register(t));Z(this,"notifyWatch",(t=[])=>{this.watcherCenter.notify(t)});Z(this,"timeoutId",null);Z(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?")}))});Z(this,"updateStore",t=>{this.store=t});Z(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(n=>n.getNamePath().length):this.fieldEntities);Z(this,"getFieldsMap",(t=!1)=>{const n=new Yr;return this.getFieldEntities(t).forEach(r=>{const o=r.getNamePath();n.set(o,r)}),n});Z(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)}})});Z(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=jp(this.store,a.map(bt));return s.forEach(c=>{In(l,c)||(l=xn(l,c,[]))}),l});Z(this,"getFieldValue",t=>{this.warningUnhooked();const n=bt(t);return In(this.store,n)});Z(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:[]})));Z(this,"getFieldError",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].errors});Z(this,"getFieldWarning",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].warnings});Z(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)});Z(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t])));Z(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()})});Z(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t])));Z(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)});Z(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)});Z(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)});Z(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}));Z(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))}});Z(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0);Z(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])}});Z(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}}});Z(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()});Z(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});Z(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=jp(this.store,[r]),l=this.getFieldsValue(),c=xn(l,r,In(s,r));a(s,c)}this.triggerOnFieldsChange([r,...i])});Z(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()});Z(this,"setFieldValue",(t,n)=>{this.setFields([{name:t,value:n,errors:[],warnings:[],touched:!0}])});Z(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});Z(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)}});Z(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:{...tx,...this.validateMessages},...o});l.push($.then(()=>({name:y,errors:[],warnings:[]})).catch(x=>{var v;const E=[],C=[];return(v=x.forEach)==null||v.call(x,({rule:{warningOnly:I},errors:T})=>{I?C.push(...T):E.push(...T)}),E.length?Promise.reject({name:y,errors:E,warnings:C}):{name:y,errors:E,warnings:C}}))}});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(C=>C&&C.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});Z(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 ix(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 Rc=g.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),AT=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{const o=g.useContext(Rc),i=g.useRef({});return g.createElement(Rc.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 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 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(Rc),[x]=ix(i),{useSubscribe:E,setInitialValues:C,setCallbacks:v,setValidateMessages:I,setPreserve:T,destroyForm:O}=x.getInternalHooks(zr);g.useImperativeHandle(t,()=>({...x,nativeElement:y.current})),g.useEffect(()=>($.registerForm(n,x),()=>{$.unregisterForm(n)}),[$,x,n]),I({...$.validateMessages,...c}),v({onValuesChange:d,onFieldsChange:(L,..._)=>{$.triggerFormChange(n,L),f&&f(L,..._)},onFinish:L=>{$.triggerFormFinish(n,L),p&&p(L)},onFinishFailed:h}),T(a);const k=g.useRef(null);C(r,!k.current),k.current||(k.current=!0),g.useEffect(()=>()=>O(m),[]);let N;const D=typeof s=="function";if(D){const L=x.getFieldsValue(!0);N=s(L,x)}else N=s;E(!D);const A=g.useRef(null);g.useEffect(()=>{kT(A.current||[],o||[])||x.setFields(o||[]),A.current=o},[o,x]);const M=g.useMemo(()=>({...x,validateTrigger:u}),[x,u]),z=g.createElement(Ia.Provider,{value:null},g.createElement(yo.Provider,{value:M},N));return l===!1?z:g.createElement(l,Pc({},w,{ref:y,onSubmit:L=>{L.preventDefault(),L.stopPropagation(),x.submit()},onReset:L=>{var _;L.preventDefault(),x.resetFields(),(_=w.onReset)==null||_.call(w,L)}}),z)};function il(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(()=>il(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));il(i)!==il(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=ox;vi.List=TT;vi.useForm=ix;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(v=>{const I=v[0].target;d(I.offsetHeight+8),p(I.offsetWidth)}),C=setInterval(()=>{var T;const v=o?`.${o(y)}`:`.${y}-dropdown`,I=(T=c.current)==null?void 0:T.querySelector(v);I&&(clearInterval(C),E.observe(I))},10);return()=>{clearInterval(C),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 C={};y&&(C["aria-hidden"]=!0);let v=g.createElement(m,$t({className:Y(!r&&n,u),style:{...E,...d}},C,w,{ref:t}),x);return a&&(v=g.createElement(ko,{onResize:({offsetWidth:I})=>{$(I)},disabled:s},v)),v}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:Y(r,i)},o,a)))},ax=g.forwardRef(WT);process.env.NODE_ENV!=="production"&&(ax.displayName="RawItem");const sx="responsive",lx="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",C=VT(),[v,I]=Zr(C,null),T=v||0,[O,k]=Zr(C,new Map),[N,D]=Zr(C,0),[A,M]=Zr(C,0),[z,L]=Zr(C,0),[_,H]=Zr(C,0),[F,R]=b.useState(null),[X,B]=b.useState(null),P=g.useMemo(()=>X===null&&E?Number.MAX_SAFE_INTEGER:X||0,[X,v]),[J,V]=b.useState(!1),G=`${n}-item`,te=Math.max(N,A),j=d===sx,Q=r.length&&j,le=d===lx,fe=Q||typeof d=="number"&&r.length>d,q=b.useMemo(()=>{let de=r;return Q?v===null&&E?de=r:de=r.slice(0,Math.min(r.length,T/s)):typeof d=="number"&&(de=r.slice(0,d)),de},[r,s,v,d,Q]),oe=b.useMemo(()=>Q?r.slice(P+1):r.slice(q.length),[r,q,Q,P]),ie=b.useCallback((de,ee)=>typeof a=="function"?a(de):(a&&(de==null?void 0:de[a]))??ee,[a]),Ce=b.useCallback(o||(de=>de),[o]);function re(de,ee,Ee){X===de&&(ee===void 0||ee===F)||(B(de),Ee||(V(de<r.length-1),$==null||$(de)),ee!==void 0&&R(ee))}function ne(de,ee){I(ee.clientWidth)}function se(de,ee){k(Ee=>{const Ie=new Map(Ee);return ee===null?Ie.delete(de):Ie.set(de,ee),Ie})}function ye(de,ee){M(ee),D(A)}function ae(de,ee){L(ee)}function he(de,ee){H(ee)}function ce(de){return O.get(ie(q[de],de))}Bt(()=>{if(T&&typeof te=="number"&&q){let de=z+_;const ee=q.length,Ee=ee-1;if(!ee){re(0,null);return}for(let Ie=0;Ie<ee;Ie+=1){let Ge=ce(Ie);if(E&&(Ge=Ge||0),Ge===void 0){re(Ie-1,void 0,!0);break}if(de+=Ge,Ee===0&&de<=T||Ie===Ee-1&&de+ce(Ee)<=T){re(Ee,null);break}else if(de+te>T){re(Ie-1,de-Ge-_+A);break}}m&&ce(0)+_>T&&R(null)}},[T,O,A,z,_,ie,q]);const Ne=J&&!!oe.length;let $e={};F!==null&&Q&&($e={position:"absolute",top:0,insetInlineStart:F});const Pe={prefixCls:G,responsive:Q,component:y,invalidate:le},W=i?(de,ee)=>{const Ee=ie(de,ee);return g.createElement(Ta.Provider,{key:Ee,value:{...Pe,order:ee,item:de,itemKey:Ee,registerSize:se,display:ee<=P}},i(de,ee))}:(de,ee)=>{const Ee=ie(de,ee);return g.createElement(ao,$t({},Pe,{order:ee,key:Ee,item:de,renderItem:Ce,itemKey:Ee,registerSize:se,display:ee<=P}))},K={order:Ne?P:Number.MAX_SAFE_INTEGER,className:`${G}-rest`,registerSize:ye,display:Ne},ue=f||qT,be=p?g.createElement(Ta.Provider,{value:{...Pe,...K}},p(oe)):g.createElement(ao,$t({},Pe,K),typeof ue=="function"?ue(oe):ue),Se=g.createElement(w,$t({className:Y(!le&&n,u),style:c,ref:t},x),h&&g.createElement(ao,$t({},Pe,{responsive:j,responsiveDisabled:!Q,order:-1,className:`${G}-prefix`,registerSize:ae,display:!0}),h),q.map(W),fe?be:null,m&&g.createElement(ao,$t({},Pe,{responsive:j,responsiveDisabled:!Q,order:P,className:`${G}-suffix`,registerSize:he,display:!0,style:$e}),m));return j?g.createElement(ko,{onResize:ne,disabled:!Q},Se):Se}const rr=g.forwardRef(XT);rr.Item=ax;rr.RESPONSIVE=sx;rr.INVALIDATE=lx;process.env.NODE_ENV!=="production"&&(rr.displayName="Overflow");const Na=(e,t,n)=>Y({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n}),td=(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 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 GT=(e,t)=>g.createElement(Jt,Tc({},e,{ref:t,icon:UT})),cx=g.forwardRef(GT);process.env.NODE_ENV!=="production"&&(cx.displayName="SearchOutlined");const ux=e=>{const{children:t,prefixCls:n,id:r,classNames:o,styles:i,className:a,style:s}=e;return g.createElement("div",{id:r,className:Y(`${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 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 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,...C}=e,v=Ga(y),I=b.useRef(null);b.useImperativeHandle(t,()=>I.current);const T={...C};"visible"in e&&(T.popupVisible=e.visible);const O=g.useMemo(()=>{if(!$)return!1;const N=$===!0?{}:$;return{...N,className:Y(N.className,x==null?void 0:x.arrow),style:{...N.style,...E==null?void 0:E.arrow},content:N.content??m}},[$,x==null?void 0:x.arrow,E==null?void 0:E.arrow,m]),k=({open:N})=>{const D=g.Children.only(a),z={"aria-describedby":[D.props["aria-describedby"],w&&N?v:void 0].filter(Boolean).join(" ")||void 0};return g.cloneElement(D,z)};return g.createElement(Ku,Nc({popupClassName:x==null?void 0:x.root,prefixCls:i,popup:g.createElement(ux,{key:"content",prefixCls:i,id:v,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:O,uniqueContainerClassName:x==null?void 0:x.uniqueContainer,uniqueContainerStyle:E==null?void 0:E.uniqueContainer},T),k)});function dx(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}},fx=8;function nd(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?fx:r}}const px=(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 Hp={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 mx(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,s=t/2,l={},c=nd({contentRadius:i,limitVerticalRadius:!0});return Object.keys(Hp).forEach(u=>{const f={...r&&JT[u]||Hp[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])},Vp="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",Vp),`var(--arrow-y, ${Vp})`].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,fx)}},[`${n}-content`]:{position:"relative"},...sI(e,(C,{darkColor:v})=>({[`&${n}-${C}`]:{[`${n}-container`]:{backgroundColor:v},[`${n}-arrow`]:{[m("arrow-background-color")]:v}}})),"&-rtl":{direction:"rtl"}}},px(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,...nd({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...dx(yt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),gx=(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),Zu(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 hx=(e,t,n)=>{const r=aN(n),[o]=ur(e,"tooltip"),i=Y({[`${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]=gx(u,f),m=hx(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:$}),C=Y(f,p,h,u,`${u}-pure`,`${u}-placement-${r}`,n,m.className);return g.createElement("div",{className:C,style:w},g.createElement("div",{className:`${u}-arrow`}),g.createElement(ux,{...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:C,styles:v,classNames:I,onOpenChange:T,overlayInnerStyle:O,overlayStyle:k,overlayClassName:N,...D}=e,[,A]=Cr(),M=e["data-popover-inject"],{getPopupContainer:z,getPrefixCls:L,direction:_,...H}=Kn("tooltip"),{className:F,style:R,classNames:X,styles:B,arrow:P,trigger:J,mouseEnterDelay:V,mouseLeaveDelay:G}=M?{}:H,te=x??V??.1,j=E??G??.1,Q=nN(l,P),le=Q.show,fe=p||J||"hover",q=y||z,oe=u??!!c,ie=g.useContext(tN),Ce=At("Tooltip"),re=g.useRef(null),ne=()=>{var _e;(_e=re.current)==null||_e.forceAlign()};g.useImperativeHandle(t,()=>{var _e,pt;return{forceAlign:ne,nativeElement:(_e=re.current)==null?void 0:_e.nativeElement,popupElement:(pt=re.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])=>{Ce.deprecated(!(_e in e),_e,pt)}),process.env.NODE_ENV!=="production"&&Ce(!c||typeof c=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."));const[se,ye]=un(e.defaultOpen??!1,e.open),ae=!d&&!f&&d!==0,he=_e=>{ye(ae?!1:_e),!ae&&T&&T(_e)},ce=g.useMemo(()=>h||mx({arrowPointAtCenter:(Q==null?void 0:Q.pointAtCenter)??!1,autoAdjustOverflow:m,arrowWidth:le?A.sizePopupArrow:0,borderRadius:A.borderRadius,offset:A.marginXXS,visibleFirst:!0}),[Q,h,A,le,m]),Ne=g.useMemo(()=>d===0?d:f||d||"",[f,d]),$e=g.createElement(Pa,{space:!0,form:!0},Qt(Ne)?Ne():Ne),Pe={...e,trigger:fe,builtinPlacements:ce,getPopupContainer:q,destroyOnHidden:oe,mouseEnterDelay:te,mouseLeaveDelay:j},W=kt(R),K=kt(k),[ue,be]=Pn([X,I],[B,W,v,K],{props:Pe}),Se=L("tooltip",n),de=L();let ee=se;(!("open"in e)&&ae||ie)&&(ee=!1);const Ee=g.isValidElement(a)&&!$b(a)?a:g.createElement("span",null,a),Ie=Ee.props,Ge=!Ie.className||typeof Ie.className=="string"?Y(Ie.className,r||`${Se}-open`):Ie.className,Re=Ro(Se),[ze,Me]=gx(Se,Re,!M),it=hx(de,Se,i),Qe=it.arrowStyle,It=Y(Re,ze,Me),wt=Y(N,{[`${Se}-rtl`]:_==="rtl"},it.className,C,It,F,ue.root),[Ot,gt]=Qu("Tooltip",D.zIndex),_t={...be.container,...O,...it.overlayStyle},jt=g.createElement(YT,{unique:!0,...D,zIndex:Ot,showArrow:le,placement:$,mouseEnterDelay:te,mouseLeaveDelay:j,prefixCls:Se,classNames:{root:wt,container:ue.container,arrow:ue.arrow,uniqueContainer:Y(It,ue.container)},styles:{root:{...Qe,...be.root},container:_t,uniqueContainer:_t,arrow:be.arrow},ref:re,overlay:$e,visible:ee,onVisibleChange:he,afterVisibleChange:s,arrowContent:g.createElement("span",{className:`${Se}-arrow-content`}),motion:{motionName:SR(de,"zoom-big-fast",typeof(w==null?void 0:w.motionName)=="string"?w==null?void 0:w.motionName:void 0),motionDeadline:1e3},trigger:fe,builtinPlacements:ce,getTooltipContainer:q,destroyOnHidden:oe},ee&&!D.disabled?On(Ee,{className:Ge}):Ee);return g.createElement(ss.Provider,{value:gt},jt)}),Ci=lN;process.env.NODE_ENV!=="production"&&(Ci.displayName="Tooltip");Ci._InternalPanelDoNotUseOrYouWillBeFired=sN;Ci.UniqueProvider=kb;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 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 uN=(e,t)=>g.createElement(Jt,Mc({},e,{ref:t,icon:cN})),Ma=g.forwardRef(uN);process.env.NODE_ENV!=="production"&&(Ma.displayName="LeftOutlined");const{ESC:dN,TAB:fN}=ku;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 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 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,...C}=e,[v,I]=b.useState(),T="visible"in e?h:v,O=i?`${r}-${i}`:o,k=b.useRef(null),N=b.useRef(null),D=b.useRef(null);b.useImperativeHandle(t,()=>k.current);const A=V=>{I(V),x==null||x(V)};pN({visible:T,triggerRef:D,onVisibleChange:A,autoFocus:w,overlayRef:N});const M=V=>{const{onOverlayClick:G}=e;I(!1),G&&G(V)},z=()=>b.createElement(mN,{ref:N,overlay:y,prefixCls:r,arrow:n}),L=()=>typeof y=="function"?z:z(),_=()=>{const{minOverlayWidthMatchTrigger:V,alignPoint:G}=e;return"minOverlayWidthMatchTrigger"in e?V:!G},H=()=>{const{openClassName:V}=e;return V!==void 0?V:`${r}-open`},F=$,R=Y((J=F.props)==null?void 0:J.className,T&&H()),X={className:R,ref:Gn(D,cr(F))},B=Eo(F)?b.cloneElement(F,X):b.createElement("span",{className:R,ref:D},b.cloneElement(F,{className:R}));let P=d;return!P&&m.indexOf("contextMenu")!==-1&&(P=["click"]),b.createElement(Ku,Ac({builtinPlacements:l},C,{prefixCls:r,ref:k,popupClassName:Y(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:m,showAction:u,hideAction:P,popupPlacement:s,popupAlign:a,popupMotion:{motionName:O},popupVisible:T,stretch:_()?"minWidth":"",popup:L(),onOpenChange:A,onPopupClick:M,getPopupContainer:c}),B)}),bx=g.createContext(null);function xx(e,t){return`${e}-${t}`}function yx(e){const t=g.useContext(bx);return xx(t,e)}const Dn=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(Dn),o=Ka(()=>bN(r,n),[r,n],(i,a)=>!t&&(i[0]!==a[0]||!ii(i[1],a[1],!0)));return g.createElement(Dn.Provider,{value:o},e)}const xN=[],wx=g.createContext(null);function us(){return g.useContext(wx)}const vx=g.createContext(xN);function No(e){const t=g.useContext(vx);return g.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const Cx=g.createContext(null),rd=g.createContext({}),{LEFT:zc,RIGHT:Oc,UP:Dc,DOWN:ca,ENTER:ua,ESC:Sx,HOME:Bo,END:Ho}=ku,Wp=[Dc,ca,zc,Oc];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={[Dc]:o,[ca]:i},c={[zc]:n?i:o,[Oc]:n?o:i,[ca]:a,[ua]:a},u={[Dc]:o,[ca]:i,[ua]:a,[Sx]:s,[zc]:n?a:s,[Oc]: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 od(e,t){return S$(e,!0).filter(r=>t.has(r))}function qp(e,t,n,r=1){if(!e)return null;const o=od(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='${xx(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([...Wp,ua,Sx,Bo,Ho].includes(h)){const m=i();let w=Aa(m,r);const{elements:y,key2element:$,element2key:x}=w,E=$.get(t),C=vN(E,y),v=x.get(C),I=yN(e,a(v,!0).length===1,n,h);if(!I&&h!==Bo&&h!==Ho)return;(Wp.includes(h)||[Bo,Ho].includes(h))&&p.preventDefault();const T=O=>{if(O){let k=O;const N=O.querySelector("a");N!=null&&N.getAttribute("href")&&(k=N);const D=x.get(O);s(D),f(),u.current=xt(()=>{d.current===D&&k.focus()})}};if([Bo,Ho].includes(h)||I.sibling||!C){let O;!C||e==="inline"?O=o.current:O=wN(C);let k;const N=od(O,y);h===Bo?k=N[0]:h===Ho?k=N[N.length-1]:k=qp(O,y,C,I.offset),T(k)}else if(I.inlineTrigger)l(v);else if(I.offset>0)l(v,!0),f(),u.current=xt(()=>{w=Aa(m,r);const O=C.getAttribute("aria-controls"),k=document.getElementById(O),N=qp(k,w.elements);T(N)},5);else if(I.offset<0){const O=a(v,!0),k=O[O.length-2],N=$.get(k);l(k,!1),T(N)}}c==null||c(p)}}function SN(e){Promise.resolve().then(e)}const id="__RC_UTIL_PATH_SPLIT__",Xp=e=>e.join(id),EN=e=>e.split(id),Lc="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=Xp(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=Xp(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(Lc),$},[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(Lc),m},h=b.useCallback(m=>{const w=`${t.current.get(m)}${id}`,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 Ex(e,t,n,r){const{activeKey:o,onActive:i,onInactive:a}=g.useContext(Dn),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 $x(e){const{mode:t,rtl:n,inlineIndent:r}=g.useContext(Dn);if(t!=="inline")return null;const o=e;return n?{paddingRight:o*r}:{paddingLeft:o*r}}function kx({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=yx(o),{prefixCls:$,onItemClick:x,disabled:E,overflowDisabled:C,itemIcon:v,selectedKeys:I,onActive:T}=g.useContext(Dn),{_internalRenderMenuItem:O}=g.useContext(rd),k=`${$}-item`,N=g.useRef(null),D=g.useRef(null),A=E||a,M=Hr(t,D),z=No(o);process.env.NODE_ENV!=="production"&&i&&tt(!1,"MenuItem should not leave undefined `key`.");const L=te=>{const j=c||{key:o||"",label:l,itemIcon:s,extra:e.extra,title:e.title};return{key:o,keyPath:[...z].reverse(),item:N.current,domEvent:te,itemData:c||j}},_=s||v,{active:H,...F}=Ex(o,A,d,f),R=I.includes(o),X=$x(z.length),B=te=>{if(A)return;const j=L(te);p==null||p(za(j)),x(j)},P=te=>{if(h==null||h(te),te.which===ku.ENTER){const j=L(te);p==null||p(za(j)),x(j)}},J=te=>{T(o),m==null||m(te)},V={};e.role==="option"&&(V["aria-selected"]=R);let G=g.createElement(kN,fi({ref:N,elementRef:M,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":C&&y?null:y},Yt(w,["extra"]),F,V,{component:"li","aria-disabled":a,style:{...X,...n},className:Y(k,{[`${k}-active`]:H,[`${k}-selected`]:R,[`${k}-disabled`]:A},r),onClick:B,onKeyDown:P,onFocus:J}),l,g.createElement(kx,{props:{...e,isSelected:R},icon:_}));return O&&(G=O(G,e,{selected:R})),G});function RN(e,t){const{eventKey:n}=e,r=us(),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 ds=g.forwardRef(RN);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 PN=({className:e,children:t,...n},r)=>{const{prefixCls:o,mode:i,rtl:a}=g.useContext(Dn);return g.createElement("ul",Fc({className:Y(o,a&&`${o}-rtl`,`${o}-sub`,`${o}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},n,{"data-menu-list":!0,ref:r}),t)},ad=g.forwardRef(PN);process.env.NODE_ENV!=="production"&&(ad.displayName="SubMenuList");function sd(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 Ix(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(Dn),[E,C]=g.useState(!1),v=d?{...NN,...h}:{...TN,...h},I=MN[l],T=Ix(l,$,x),O=g.useRef(T);l!=="inline"&&(O.current=T);const k={...O.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},N=g.useRef(void 0);return g.useEffect(()=>(N.current=xt(()=>{C(t)}),()=>{xt.cancel(N.current)}),[t]),g.createElement(Ku,{prefixCls:e,popupClassName:Y(`${e}-popup`,{[`${e}-rtl`]:d},i,y),stretch:l==="horizontal"?"minWidth":null,getPopupContainer:u,builtinPlacements:v,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 _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)}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(Dn),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={...Ix(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,_c({visible:p},h,{forceRender:a,removeOnLeave:!1,leavedClassName:`${i}-hidden`}),({className:w,style:y})=>g.createElement(ad,{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:C,onTitleMouseEnter:v,onTitleMouseLeave:I,popupRender:T,...O}=e,k=yx(l),{prefixCls:N,mode:D,openKeys:A,disabled:M,overflowDisabled:z,activeKey:L,selectedKeys:_,itemIcon:H,expandIcon:F,onItemClick:R,onOpenChange:X,onActive:B,popupRender:P}=g.useContext(Dn),{_internalRenderSubMenuItem:J}=g.useContext(rd),{isSubPathKey:V}=g.useContext(Cx),G=No(),te=`${N}-submenu`,j=M||u,Q=g.useRef(null),le=g.useRef(null);process.env.NODE_ENV!=="production"&&c&&tt(!1,"SubMenu should not leave undefined `key`.");const fe=p??H,q=h??F,oe=A.includes(l),ie=!z&&oe,Ce=V(_,l),{active:re,...ne}=Ex(l,j,v,I),[se,ye]=g.useState(!1),ae=Re=>{j||ye(Re)},he=Re=>{ae(!0),x==null||x({key:l,domEvent:Re})},ce=Re=>{ae(!1),E==null||E({key:l,domEvent:Re})},Ne=g.useMemo(()=>re||(D!=="inline"?se||V([L],l):!1),[D,re,L,se,l,V]),$e=$x(G.length),Pe=Re=>{j||(C==null||C({key:l,domEvent:Re}),D==="inline"&&X(l,!oe))},W=Go(Re=>{$==null||$(za(Re)),R(Re)}),K=Re=>{D!=="inline"&&X(l,Re)},ue=()=>{B(l)},be=k&&`${k}-popup`,Se=g.useMemo(()=>g.createElement(kx,{icon:D!=="horizontal"?q:void 0,props:{...e,isOpen:ie,isSubMenu:!0}},g.createElement("i",{className:`${te}-arrow`})),[D,q,e,ie,te]);let de=g.createElement("div",pi({role:"menuitem",style:$e,className:`${te}-title`,tabIndex:j?null:-1,ref:Q,title:s??(typeof a=="string"?a:null),"data-menu-id":z&&k?null:k,"aria-expanded":ie,"aria-haspopup":!0,"aria-controls":be,"aria-disabled":j,onClick:Pe,onFocus:ue},ne),a,Se);const ee=g.useRef(D);D!=="inline"&&G.length>1?ee.current="vertical":ee.current=D;const Ee=ee.current,Ie=g.useMemo(()=>{const Re=g.createElement(di,{classNames:i,styles:o,mode:Ee==="horizontal"?"vertical":Ee},g.createElement(ad,{id:be,ref:le},f)),ze=T||P;return ze?ze(Re,{item:e,keys:G}):Re},[T,P,G,be,f,e,Ee]);if(!z){const Re=ee.current;de=g.createElement(AN,{mode:Re,prefixCls:te,visible:!d&&ie&&D!=="inline",popupClassName:m,popupOffset:w,popupStyle:y,popup:Ie,disabled:j,onVisibleChange:K},de)}let Ge=g.createElement(rr.Item,pi({ref:t,role:"none"},O,{component:"li",style:n,className:Y(te,`${te}-${D}`,r,{[`${te}-open`]:ie,[`${te}-active`]:Ne,[`${te}-selected`]:Ce,[`${te}-disabled`]:j}),onMouseEnter:he,onMouseLeave:ce}),de,!z&&g.createElement(zN,{id:be,open:ie,keyPath:G},f));return J&&(Ge=J(Ge,e,{selected:Ce,active:Ne,open:ie,disabled:j})),g.createElement(di,{classNames:i,styles:o,onItemClick:W,mode:D==="horizontal"?"vertical":D,itemIcon:fe,expandIcon:q},Ge)}),Si=g.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=No(n),i=sd(r,o),a=us();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(vx.Provider,{value:o},s)});process.env.NODE_ENV!=="production"&&(Si.displayName="SubMenu");function ld({className:e,style:t}){const{prefixCls:n}=g.useContext(Dn);return us()?null:g.createElement("li",{role:"separator",className:Y(`${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(Dn),u=`${s}-item-group`;return g.createElement("li",Oa({ref:t,role:"presentation"},a,{onClick:d=>d.stopPropagation(),className:Y(u,n)}),g.createElement("div",{role:"presentation",className:Y(`${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:Y(`${u}-list`,l==null?void 0:l.list),style:c==null?void 0:c.list},i))}),fs=g.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,o=No(n),i=sd(r,o);return us()?i:g.createElement(DN,Oa({ref:t},Yt(e,["warnKey"])),i)});process.env.NODE_ENV!=="production"&&(fs.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 jc(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}),jc(u,t,n));const{title:y,...$}=h;return g.createElement(i,so({key:m},$,{title:c,itemTitle:typeof y=="string"?y:void 0}),jc(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 Up(e,t,n,r,o){let i=e;const a={divider:ld,item:ds,group:fs,submenu:Si,...r};return t&&(i=jc(t,a,o)),sd(i,n)}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 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:C,activeKey:v,defaultActiveFirst:I,selectable:T=!0,multiple:O=!1,defaultSelectedKeys:k,selectedKeys:N,onSelect:D,onDeselect:A,inlineIndent:M=24,motion:z,defaultMotions:L,triggerSubMenuAction:_="hover",builtinPlacements:H,itemIcon:F,expandIcon:R,overflowedIndicator:X="...",overflowedIndicatorPopupClassName:B,getPopupContainer:P,onClick:J,onOpenChange:V,onKeyDown:G,openAnimation:te,openTransitionName:j,_internalRenderMenuItem:Q,_internalRenderSubMenuItem:le,_internalComponents:fe,popupRender:q,...oe}=e,[ie,Ce]=g.useMemo(()=>[Up(u,c,Rr,fe,n),Up(u,c,Rr,{},n)],[u,c,fe]),[re,ne]=g.useState(!1),se=g.useRef(null),ye=Ga(),ae=f??`rc-menu-uuid-${ye}`,he=d==="rtl";process.env.NODE_ENV!=="production"&&tt(!te&&!j,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");const[ce,Ne]=un(E,C),$e=ce||Rr,Pe=(Oe,Ze=!1)=>{function st(){Ne(Oe),V==null||V(Oe)}Ze?po.flushSync(st):st()},[W,K]=g.useState($e),ue=g.useRef(!1),[be,Se]=g.useMemo(()=>(p==="inline"||p==="vertical")&&h?["vertical",h]:[p,!1],[p,h]),de=be==="inline",[ee,Ee]=g.useState(be),[Ie,Ge]=g.useState(Se);g.useEffect(()=>{Ee(be),Ge(Se),ue.current&&(de?Ne(W):Pe(Rr))},[be,Se]);const[Re,ze]=g.useState(0),Me=Re>=ie.length-1||ee!=="horizontal"||w;g.useEffect(()=>{de&&K($e)},[$e]),g.useEffect(()=>(ue.current=!0,()=>{ue.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:ie.slice(Re+1).map(Oe=>Oe.key))},[Re,Me]);const[pt,Cn]=un(v||I&&((vt=ie[0])==null?void 0:vt.key),v),Fn=Go(Oe=>{Cn(Oe)}),_n=Go(()=>{Cn(void 0)});b.useImperativeHandle(t,()=>({list:se.current,focus:Oe=>{var Te,ke;const Ze=gt(),{elements:st,key2element:Be,element2key:U}=Aa(Ze,ae),ge=od(se.current,st);let pe;pt&&Ze.includes(pt)?pe=pt:pe=ge[0]?U.get(ge[0]):(Te=ie.find(Fe=>!Fe.props.disabled))==null?void 0:Te.key;const we=Be.get(pe);pe&&we&&((ke=we==null?void 0:we.focus)==null||ke.call(we,Oe))},findItem:({key:Oe})=>{const Ze=gt(),{key2element:st}=Aa(Ze,ae);return st.get(Oe)||null}}));const[Rt,Sn]=un(k||[],N),Ht=g.useMemo(()=>Array.isArray(Rt)?Rt:Rt==null?Rr:[Rt],[Rt]),an=Oe=>{if(T){const{key:Ze}=Oe,st=Ht.includes(Ze);let Be;O?st?Be=Ht.filter(ge=>ge!==Ze):Be=[...Ht,Ze]:Be=[Ze],Sn(Be);const U={...Oe,selectedKeys:Be};st?A==null||A(U):D==null||D(U)}!O&&$e.length&&ee!=="inline"&&Pe(Rr)},jn=Go(Oe=>{J==null||J(za(Oe)),an(Oe)}),fn=Go((Oe,Ze)=>{let st=$e.filter(Be=>Be!==Oe);if(Ze)st.push(Oe);else if(ee!=="inline"){const Be=_t(Oe);st=st.filter(U=>!Be.has(U))}ii($e,st,!0)||Pe(st,!0)}),en=CN(ee,pt,he,ae,se,gt,Ot,Cn,(Oe,Ze)=>{const st=Ze??!$e.includes(Oe);fn(Oe,st)},G);g.useEffect(()=>{ne(!0)},[]);const Dt=g.useMemo(()=>({_internalRenderMenuItem:Q,_internalRenderSubMenuItem:le}),[Q,le]),at=ee!=="horizontal"||w?ie:ie.map((Oe,Ze)=>g.createElement(di,{key:Oe.key,overflowDisabled:Ze>Re,classNames:s,styles:a},Oe)),Vt=g.createElement(rr,Bc({id:f,ref:se,prefixCls:`${n}-overflow`,component:"ul",itemComponent:ds,className:Y(n,`${n}-root`,`${n}-${ee}`,i,{[`${n}-inline-collapsed`]:Ie,[`${n}-rtl`]:he},r),dir:d,style:o,role:"menu",tabIndex:l,data:at,renderRawItem:Oe=>Oe,renderRawRest:Oe=>{const Ze=Oe.length,st=Ze?ie.slice(-Ze):null;return g.createElement(Si,{eventKey:Lc,title:X,disabled:Me,internalPopupClose:Ze===0,popupClassName:B},st)},maxCount:ee!=="horizontal"||w?rr.INVALIDATE:rr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:Oe=>{ze(Oe)},onKeyDown:en},oe));return g.createElement(rd.Provider,{value:Dt},g.createElement(bx.Provider,{value:ae},g.createElement(di,{prefixCls:n,rootClassName:r,classNames:s,styles:a,mode:ee,openKeys:$e,rtl:he,disabled:m,motion:re?z:null,defaultMotions:re?L:null,activeKey:pt,onActive:Fn,onInactive:_n,selectedKeys:Ht,inlineIndent:M,subMenuOpenDelay:y,subMenuCloseDelay:$,forceSubMenuRender:x,builtinPlacements:H,triggerSubMenuAction:_,getPopupContainer:P,itemIcon:F,expandIcon:R,onItemClick:jn,onOpenChange:fn,popupRender:q},g.createElement(Cx.Provider,{value:_e},Vt),g.createElement("div",{style:{display:"none"},"aria-hidden":!0},g.createElement(wx.Provider,{value:jt},Ce)))))}),Ei=LN;Ei.Item=ds;Ei.SubMenu=Si;Ei.ItemGroup=fs;Ei.Divider=ld;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 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 _N=(e,t)=>g.createElement(Jt,Hc({},e,{ref:t,icon:FN})),Rx=g.forwardRef(_N);process.env.NODE_ENV!=="production"&&(Rx.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}}},Px=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}},Tx=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];on("Layout",BN,Px,{deprecatedTokens:Tx});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,Px,{deprecatedTokens:Tx}),Gp={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)),cd=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),[C,v]=un(a,e.collapsed),[I,T]=b.useState(!1),O=(q,oe)=>{v(q),m==null||m(q,oe)},k={...e,collapsed:C,defaultCollapsed:a,theme:s,style:l,collapsible:c,reverseArrow:u,width:d,collapsedWidth:f,zeroWidthTriggerStyle:p,breakpoint:h,onCollapse:m,onBreakpoint:w},[N,D]=Pn([y],[$],{props:k}),{getPrefixCls:A,direction:M}=b.useContext(dt),z=A("layout-sider",n),[L,_]=VN(z),H=b.useRef(null);H.current=q=>{T(q.matches),w==null||w(q.matches),C!==q.matches&&O(q.matches,"responsive")},b.useEffect(()=>{function q(ie){var Ce;return(Ce=H.current)==null?void 0:Ce.call(H,ie)}let oe;return typeof(window==null?void 0:window.matchMedia)<"u"&&h&&h in Gp&&(oe=window.matchMedia(`screen and (max-width: ${Gp[h]})`),Qt(oe==null?void 0:oe.addEventListener)&&oe.addEventListener("change",q),q(oe)),()=>{Qt(oe==null?void 0:oe.removeEventListener)&&oe.removeEventListener("change",q)}},[h]),b.useEffect(()=>{const q=qN("ant-sider-");return E.addSider(q),()=>E.removeSider(q)},[]);const F=()=>{O(!C,"clickTrigger")},R=Yt(x,["collapsed"]),X=C?f:d,B=WN(X)?`${X}px`:String(X),P=Number.parseFloat(String(f||0))===0?g.createElement("span",{onClick:F,className:Y(`${z}-zero-width-trigger`,`${z}-zero-width-trigger-${u?"right":"left"}`),style:p},o||g.createElement(Rx,null)):null,J=M==="rtl"==!u,te={expanded:J?g.createElement(ka,null):g.createElement(Ma,null),collapsed:J?g.createElement(Ma,null):g.createElement(ka,null)}[C?"collapsed":"expanded"],j=o!==null?P||g.createElement("div",{className:`${z}-trigger`,onClick:F,style:{width:B}},o||te):null,Q={...l,flex:`0 0 ${B}`,maxWidth:B,minWidth:B,width:B},le=Y(z,`${z}-${s}`,{[`${z}-collapsed`]:!!C,[`${z}-has-trigger`]:c&&o!==null&&!P,[`${z}-below`]:!!I,[`${z}-zero-width`]:Number.parseFloat(B)===0},r,N.root,L,_),fe=g.useMemo(()=>({siderCollapsed:C}),[C]);return g.createElement(cd.Provider,{value:fe},g.createElement("aside",{className:le,...R,style:{...D.root,...Q},ref:t},g.createElement("div",{className:Y(`${z}-children`,N.body),style:D.body},i),c||I&&P?j: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 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 GN=(e,t)=>g.createElement(Jt,Vc({},e,{ref:t,icon:UN})),ud=g.forwardRef(GN);process.env.NODE_ENV!=="production"&&(ud.displayName="EllipsisOutlined");const Da=b.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),Nx=e=>{const{prefixCls:t,className:n,dashed:r,...o}=e,{getPrefixCls:i}=g.useContext(dt),a=i("menu",t),s=Y({[`${a}-item-divider-dashed`]:!!r},n);return g.createElement(ld,{className:s,...o})},Mx=e=>{var k,N;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(cd),w=!!(m||f),[y,$]=g.useState(!1);g.useEffect(()=>{$(!1)},[w]);const x=D=>{var z,L;const A=n==null?void 0:n[0],M=g.createElement("span",{className:Y(`${s}-title-content`,l?h==null?void 0:h.itemContent:(z=h==null?void 0:h.subMenu)==null?void 0:z.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&&D&&l&&typeof A=="string"?g.createElement("div",{className:`${s}-inline-collapsed-noicon`},A.charAt(0)):M};let E=o;typeof o>"u"?E=l?n:"":o===!1&&(E="");const C=d===!1?void 0:d,v=C&&C.title!==void 0?C.title:E,I={...C??null,title:v};w?(I.open=(C==null?void 0:C.open)??y,I.onOpenChange=D=>{var A;$(D),(A=C==null?void 0:C.onOpenChange)==null||A.call(C,D)}):(I.title=null,I.open=!1);const T=or(n).length;let O=g.createElement(ds,{...Yt(e,["title","icon","danger"]),className:Y(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?T+1:T)===1},t),style:{...l?p==null?void 0:p.item:(N=p==null?void 0:p.subMenu)==null?void 0:N.item,...e.style},title:typeof o=="string"?o:void 0,itemData:(e==null?void 0:e.itemData)??{...e,key:e.eventKey}},On(r,D=>{var A,M;return{className:Y(`${s}-item-icon`,l?h==null?void 0:h.itemIcon:(A=h==null?void 0:h.subMenu)==null?void 0:A.itemIcon,D.className),style:{...l?p==null?void 0:p.itemIcon:(M=p==null?void 0:p.subMenu)==null?void 0:M.itemIcon,...D.style}}}),x(f));if(!u&&d!==!1){const D=C&&C.placement?C.placement:c==="rtl"?"left":"right",A=`${s}-inline-collapsed-tooltip`,M=L=>({...L,root:Y(A,L==null?void 0:L.root)}),z=Qt(C==null?void 0:C.classNames)?L=>{const _=C.classNames(L);return M(_)}:M(C==null?void 0:C.classNames);O=g.createElement(Ci,{...I,placement:D,classNames:z},O)}return O},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=Yg(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}}]},Np=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),lP=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)),cP=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(cP(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 uP="rc-color-picker",uo=e=>e instanceof ir?e:new ir(e),dP=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}}},fP=({color:e,prefixCls:t,className:n,style:r,innerClassName:o,innerStyle:i,onClick:a})=>{const s=`${t}-color-block`;return b.createElement("div",{className:Y(s,n),style:r,onClick:a},b.createElement("div",{className:Y(`${s}-inner`,o),style:{background:e,...i}}))};function pP(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}=pP(y),{x:E,y:v,width:C,height:I}=n.current.getBoundingClientRect(),{width:T,height:O}=t.current.getBoundingClientRect(),k=T/2,N=O/2,D=Math.max(0,Math.min($-E,C))-k,A=Math.max(0,Math.min(x-v,I))-N,M={x:D,y:r==="x"?c.y:A};if(T===0&&O===0||T!==O)return!1;o==null||o(M)},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:Y(`${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)}),mP=({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))"}})))},gP=(e,t)=>{const[n,r]=un(e,t);return[b.useMemo(()=>uo(n),[n]),r]},hP=({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)},bP=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:Y(`${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(hP,{colors:w,type:s,prefixCls:t})))};function xP(e){return g.useMemo(()=>{const{slider:t}=e||{};return[t||bP]},[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 yP=[{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}],wP=b.forwardRef((e,t)=>{const{value:n,defaultValue:r,prefixCls:o=uP,onChange:i,onChangeComplete:a,className:s,style:l,panelRender:c,disabledAlpha:u=!1,disabled:d=!1,components:f}=e,[p]=xP(f),[h,m]=gP(r||dP,n),w=b.useMemo(()=>h.setA(1).toRgbString(),[h]),y=(N,D)=>{n||m(N),i==null||i(N,D)},$=N=>new ir(h.setHue(N)),x=N=>new ir(h.setA(N/100)),E=N=>{y($(N),{type:"hue",value:N})},v=N=>{y(x(N),{type:"alpha",value:N})},C=N=>{a&&a($(N))},I=N=>{a&&a(x(N))},T=Y(`${o}-panel`,s,{[`${o}-panel-disabled`]:d}),O={prefixCls:o,disabled:d,color:h},k=b.createElement(b.Fragment,null,b.createElement(mP,ti({onChange:y},O,{onChangeComplete:a})),b.createElement("div",{className:`${o}-slider-container`},b.createElement("div",{className:Y(`${o}-slider-group`,{[`${o}-slider-group-disabled-alpha`]:u})},b.createElement(p,ti({},O,{type:"hue",colors:yP,min:0,max:359,value:h.getHue(),onChange:E,onChangeComplete:C})),!u&&b.createElement(p,ti({},O,{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(fP,{color:h.toRgbString(),prefixCls:o})));return b.createElement("div",{className:T,style:l,ref:t},typeof c=="function"?c(k):k)});process.env.NODE_ENV!=="production"&&(wP.displayName="ColorPicker");const vP=(e,t)=>(e==null?void 0:e.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6))||"",CP=(e,t)=>e?vP(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 CP(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 SP={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 EP=(e,t)=>g.createElement(Jt,xc({},e,{ref:t,icon:SP})),ka=g.forwardRef(EP);process.env.NODE_ENV!=="production"&&(ka.displayName="RightOutlined");const $P=e=>e instanceof bc?e:new bc(e),kP=(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=kP(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}},IP=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}}}]}},RP=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",...YR(),"&: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()}}}}}},PP=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}`]:PP(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},TP=e=>{const t=yt(e,{fontSize:e.contentFontSize});return Qu(t,e.componentCls)},NP=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`)},MP=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`)},AP=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},zP=on("Button",e=>{const t=Kb(e);return[RP(t),TP(t),NP(t),MP(t),AP(t),IP(t),lP(t)]},Yb,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function OP(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 DP(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]:{...OP(e,i,t,o),...DP(o,i,t)}}}function LP(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 FP(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 _P(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:{...LP(e,t,e.componentCls),...FP(e.componentCls,t)}}}const jP=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})`}}]},BP=oI(["Button","compact"],e=>{const t=Kb(e);return[Zu(t),_P(t),jP(t)]},Yb);function HP(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 VP={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},WP=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:T,autoFocus:O,...k}=e,N=or(h),D=s||"default",{getPrefixCls:A,direction:M,autoInsertSpace:z,className:L,style:j,classNames:H,styles:F,loadingIcon:R,shape:X,color:B,variant:P}=Kn("button"),J=c||X||"default",[V,G]=b.useMemo(()=>{if(i&&a)return[i,a];if(s||l){const _e=VP[D]||[];return l?["danger",_e[1]]:_e}return a==="solid"?["primary",a]:B&&P?[B,P]:P==="solid"?["primary",P]:["default","outlined"]},[i,a,s,l,B,P,D]),[te,_]=b.useMemo(()=>$&&G==="solid"?[V,"outlined"]:[V,G],[V,G,$]),Q=te==="danger",le=Q?"dangerous":te,fe=T??z??!0,q=A("btn",o),[oe,ie]=zP(q),Ce=b.useContext(yr),ne=d??Ce,re=b.useContext(Ab),se=b.useMemo(()=>HP(r),[r]),[ye,ae]=s$(se.loading),[he,ce]=b.useState(!1),Ne=b.useRef(null),$e=Hr(t,Ne),Pe=N.length===1&&!m&&!Xi(_),W=b.useRef(!0);b.useEffect(()=>(W.current=!1,()=>{W.current=!0}),[]),Bt(()=>{se.delay>0?ae(!0,{ms:se.delay}):ae(se.loading,!0)},[se.delay,se.loading]),b.useEffect(()=>{if(!Ne.current||!fe)return;const _e=Ne.current.textContent||"";Pe&&hc(_e)?he||ce(!0):he&&ce(!1)}),b.useEffect(()=>{var _e;O&&((_e=Ne.current)==null||_e.focus())},[]);const K=b.useCallback(_e=>{var pt;if(ye||ne){_e.preventDefault();return}(pt=e.onClick)==null||pt.call(e,("href"in e,_e))},[e.onClick,ye,ne]);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:ue,compactItemClassnames:be}=To(q,M),Se=Po(_e=>u??ue??re??_e),de=ye?"loading":m,ee=y??w??"start",Ee=Yt(k,["navigate"]),Ie={...e,type:D,color:te,variant:_,danger:Q,shape:J,size:Se,disabled:ne,loading:ye,iconPlacement:ee},Ge=kt(j),Re=kt(I),[ze,Me]=Pn([n?void 0:H,v],[n?void 0:F,Ge,C,Re],{props:Ie}),it=Y(q,oe,ie,{[`${q}-${J}`]:J!=="default"&&J!=="square"&&J,[`${q}-${D}`]:D,[`${q}-dangerous`]:l,[`${q}-color-${le}`]:le,[`${q}-variant-${_}`]:_,[`${q}-lg`]:Se==="large",[`${q}-sm`]:Se==="small",[`${q}-icon-only`]:!h&&h!==0&&!!de,[`${q}-background-ghost`]:$&&!Xi(_),[`${q}-loading`]:ye,[`${q}-two-chinese-chars`]:he&&fe&&!ye,[`${q}-block`]:x,[`${q}-rtl`]:M==="rtl",[`${q}-icon-end`]:ee==="end"},be,f,p,L,ze.root),Qe={className:ze.icon,style:Me.icon},It=_e=>b.createElement(zb,{prefixCls:q,...Qe},_e),wt=b.createElement(OR,{existIcon:!!m,prefixCls:q,loading:ye,mount:W.current,...Qe}),Ot=rn(r)&&r.icon||R;let gt;m&&!ye?gt=It(m):r&&Ot?gt=It(Ot):gt=wt;const _t=xi(h)?zR(h,Pe&&fe,Me.content,ze.content):null;if(Ee.href!==void 0)return b.createElement("a",{...Ee,className:Y(it,{[`${q}-disabled`]:ne}),href:ne?void 0:Ee.href,style:Me.root,onClick:K,ref:$e,tabIndex:ne?-1:0,"aria-disabled":ne},gt,_t);let jt=b.createElement("button",{...k,type:E,className:it,style:Me.root,onClick:K,disabled:ne,ref:$e},gt,_t,be&&b.createElement(BP,{prefixCls:q}));return Xi(_)||(jt=b.createElement(Nb,{component:"Button",disabled:ye},jt)),jt}),ar=WP;ar.Group=MR;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 qP(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(),XP=/%[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(XP,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 UP(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||UP(t)&&typeof e=="string"&&!e)}function GP(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 KP(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");Z(this,"errors");Z(this,"fields");this.errors=n,this.fields=r}}function YP(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=KP(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):GP(m,n,p)})});return u.catch(d=>d),u}function QP(e){return!!(e&&e.message!==void 0)}function ZP(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=ZP(t,e.fullFields):r=t[n.field||e.fullField],QP(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",JP=(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(", ")))},eT=(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))))},tT=(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 nT=()=>{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(nT())},hex(e){return typeof e=="string"&&!!e.match(tl.hex)}},rT=(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))},oT=(e,t,n,r,o)=>{(/^\s+$/.test(t)||t==="")&&r.push(yn(o.messages.whitespace,e.fullField))},Ue={required:Zb,whitespace:oT,type:rT,range:tT,enum:JP,pattern:eT},iT=(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)},aT=(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)},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),t!==void 0&&Ue.type(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(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)},cT="enum",uT=(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[cT](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)&&!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)},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.type(e,t,r,i,o),Ue.range(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)}n(i)},mT=(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)},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(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)},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),zt(t)||Ue.type(e,t,r,i,o)}n(i)},xT=(e,t,n,r,o)=>{const i=[],a=Array.isArray(t)?"array":typeof t;Ue.required(e,t,r,i,o,a),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();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:yT,method:pT,number:mT,boolean:sT,regexp:bT,integer:fT,float:dT,array:aT,object:gT,enum:uT,pattern:hT,date:lT,url:Gi,hex:Gi,email:Gi,tel:Gi,required:xT,any:iT},mr=class mr{constructor(t){Z(this,"rules",null);Z(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 YP(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(O=>{C[O]=p.defaultField}),C={...C,...d.rule.fields};const I={};Object.keys(C).forEach(O=>{const k=C[O],N=Array.isArray(k)?k:[k];I[O]=N.map(m.bind(null,O))});const T=new mr(I);T.messages(i.messages),d.rule.options&&(d.rule.options.messages=i.messages,d.rule.options.error=i.error),T.validate(d.value,d.rule.options||i,O=>{const k=[];v&&v.length&&k.push(...v),O&&O.length&&k.push(...O),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}};Z(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}),Z(mr,"warning",Qb),Z(mr,"messages",el),Z(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 wT(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"?wT(f,u):f)}function vT(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?ST(c):CT(c)).then(u=>Promise.reject(u))}return l.catch(c=>c),l}async function CT(e){return Promise.all(e).then(t=>[].concat(...t))}async function ST(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 ET(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 $T(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 kT{constructor(t){Z(this,"namePathList",[]);Z(this,"taskId",0);Z(this,"watcherList",new Set);Z(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 IT(){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);Z(this,"state",{resetCount:0});Z(this,"cancelRegisterFunc",null);Z(this,"mounted",!1);Z(this,"touched",!1);Z(this,"dirty",!1);Z(this,"validatePromise");Z(this,"prevValidating");Z(this,"errors",Ir);Z(this,"warnings",jo);Z(this,"cancelRegister",()=>{const{preserve:n,isListField:r,name:o}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(r,n,bt(o)),this.cancelRegisterFunc=null});Z(this,"getNamePath",()=>{const{name:n,fieldContext:r}=this.props,{prefixName:o=[]}=r;return n!==void 0?[...o,...n]:[]});Z(this,"getRules",()=>{const{rules:n=[],fieldContext:r}=this.props;return n.map(o=>typeof o=="function"?o(r):o)});Z(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:n})=>({resetCount:n+1}))});Z(this,"metaCache",null);Z(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});Z(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()});Z(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 IT();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=vT(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});Z(this,"isFieldValidating",()=>!!this.validatePromise);Z(this,"isFieldTouched",()=>this.touched);Z(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});Z(this,"getErrors",()=>this.errors);Z(this,"getWarnings",()=>this.warnings);Z(this,"isListField",()=>this.props.isListField);Z(this,"isList",()=>this.props.isList);Z(this,"isPreserve",()=>this.props.preserve);Z(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}));Z(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}});Z(this,"getValue",n=>{const{getFieldsValue:r}=this.props.fieldContext,o=this.getNamePath();return In(n||r(!0),o)});Z(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 T;a?T=a(...C):T=$T(l,...C),s&&(T=s(T,I,h(!0))),T!==I&&m({type:"updateValue",namePath:f,value:T}),$&&$(...C)},yc(d||[]).forEach(C=>{const I=E[C];E[C]=(...T)=>{I&&I(...T);const{rules:O}=this.props;O&&O.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)}}Z(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 RT({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((T,O)=>!I.has(O)),m(C.filter((T,O)=>!I.has(O))))},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 PT(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(){Z(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 TT{constructor(t){Z(this,"formHooked",!1);Z(this,"forceRootUpdate");Z(this,"subscribable",!0);Z(this,"store",{});Z(this,"fieldEntities",[]);Z(this,"initialValues",{});Z(this,"callbacks",{});Z(this,"validateMessages",null);Z(this,"preserve",null);Z(this,"lastValidatePromise",null);Z(this,"watcherCenter",new kT(this));Z(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}));Z(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));Z(this,"useSubscribe",t=>{this.subscribable=t});Z(this,"prevWithoutPreserves",null);Z(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)}});Z(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}});Z(this,"getInitialValue",t=>{const n=In(this.initialValues,t);return t.length?oo(n):n});Z(this,"setCallbacks",t=>{this.callbacks=t});Z(this,"setValidateMessages",t=>{this.validateMessages=t});Z(this,"setPreserve",t=>{this.preserve=t});Z(this,"registerWatch",t=>this.watcherCenter.register(t));Z(this,"notifyWatch",(t=[])=>{this.watcherCenter.notify(t)});Z(this,"timeoutId",null);Z(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?")}))});Z(this,"updateStore",t=>{this.store=t});Z(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(n=>n.getNamePath().length):this.fieldEntities);Z(this,"getFieldsMap",(t=!1)=>{const n=new Yr;return this.getFieldEntities(t).forEach(r=>{const o=r.getNamePath();n.set(o,r)}),n});Z(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)}})});Z(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});Z(this,"getFieldValue",t=>{this.warningUnhooked();const n=bt(t);return In(this.store,n)});Z(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:[]})));Z(this,"getFieldError",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].errors});Z(this,"getFieldWarning",t=>{this.warningUnhooked();const n=bt(t);return this.getFieldsError([n])[0].warnings});Z(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)});Z(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t])));Z(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()})});Z(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t])));Z(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)});Z(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)});Z(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)});Z(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}));Z(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))}});Z(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0);Z(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])}});Z(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}}});Z(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()});Z(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});Z(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])});Z(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()});Z(this,"setFieldValue",(t,n)=>{this.setFields([{name:t,value:n,errors:[],warnings:[],touched:!0}])});Z(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});Z(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)}});Z(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:T})=>{I?v.push(...T):E.push(...T)}),E.length?Promise.reject({name:y,errors:E,warnings:v}):{name:y,errors:E,warnings:v}}))}});const p=PT(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});Z(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 TT(r);t.current=o.getForm()}return[t.current]}const kc=g.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),NT=({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 MT=(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:T,destroyForm:O}=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}),T(a);const k=g.useRef(null);v(r,!k.current),k.current||(k.current=!0),g.useEffect(()=>()=>O(m),[]);let N;const D=typeof s=="function";if(D){const L=x.getFieldsValue(!0);N=s(L,x)}else N=s;E(!D);const A=g.useRef(null);g.useEffect(()=>{ET(A.current||[],o||[])||x.setFields(o||[]),A.current=o},[o,x]);const M=g.useMemo(()=>({...x,validateTrigger:u}),[x,u]),z=g.createElement(Ia.Provider,{value:null},g.createElement(yo.Provider,{value:M},N));return l===!1?z: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)}}),z)};function rl(e){try{return JSON.stringify(e)}catch{return Math.random()}}function AT(...e){const[t,n={}]=e,r=qP(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 zT=g.forwardRef(MT),vi=zT;vi.FormProvider=NT;vi.Field=nx;vi.List=RT;vi.useForm=rx;vi.useWatch=AT;const sr=g.createContext({});process.env.NODE_ENV!=="production"&&(sr.displayName="FormItemInputContext");const OT=({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)},DT=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(OT,{override:!0,status:!0},o)),t&&(o=b.createElement(TR,null,o)),o};function LT(e){return t=>g.createElement(Sr,{theme:{token:{motion:!1,zIndexPopupBase:0}}},g.createElement(e,{...t}))}const FT=(e,t,n,r,o)=>LT(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 T;const C=o?`.${o(y)}`:`.${y}-dropdown`,I=(T=c.current)==null?void 0:T.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 _T(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:Y(!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(_T);process.env.NODE_ENV!=="production"&&(ao.displayName="Item");function jT(e){if(typeof MessageChannel>"u")xt(e);else{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function BT(){const e=g.useRef(null);return n=>{e.current||(e.current=[],jT(()=>{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),HT=(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:Y(r,i)},o,a)))},ox=g.forwardRef(HT);process.env.NODE_ENV!=="production"&&(ox.displayName="RawItem");const ix="responsive",ax="invalidate";function VT(e){return`+ ${e.length} ...`}function WT(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=BT(),[C,I]=Zr(v,null),T=C||0,[O,k]=Zr(v,new Map),[N,D]=Zr(v,0),[A,M]=Zr(v,0),[z,L]=Zr(v,0),[j,H]=Zr(v,0),[F,R]=b.useState(null),[X,B]=b.useState(null),P=g.useMemo(()=>X===null&&E?Number.MAX_SAFE_INTEGER:X||0,[X,C]),[J,V]=b.useState(!1),G=`${n}-item`,te=Math.max(N,A),_=d===ix,Q=r.length&&_,le=d===ax,fe=Q||typeof d=="number"&&r.length>d,q=b.useMemo(()=>{let de=r;return Q?C===null&&E?de=r:de=r.slice(0,Math.min(r.length,T/s)):typeof d=="number"&&(de=r.slice(0,d)),de},[r,s,C,d,Q]),oe=b.useMemo(()=>Q?r.slice(P+1):r.slice(q.length),[r,q,Q,P]),ie=b.useCallback((de,ee)=>typeof a=="function"?a(de):(a&&(de==null?void 0:de[a]))??ee,[a]),Ce=b.useCallback(o||(de=>de),[o]);function ne(de,ee,Ee){X===de&&(ee===void 0||ee===F)||(B(de),Ee||(V(de<r.length-1),$==null||$(de)),ee!==void 0&&R(ee))}function re(de,ee){I(ee.clientWidth)}function se(de,ee){k(Ee=>{const Ie=new Map(Ee);return ee===null?Ie.delete(de):Ie.set(de,ee),Ie})}function ye(de,ee){M(ee),D(A)}function ae(de,ee){L(ee)}function he(de,ee){H(ee)}function ce(de){return O.get(ie(q[de],de))}Bt(()=>{if(T&&typeof te=="number"&&q){let de=z+j;const ee=q.length,Ee=ee-1;if(!ee){ne(0,null);return}for(let Ie=0;Ie<ee;Ie+=1){let Ge=ce(Ie);if(E&&(Ge=Ge||0),Ge===void 0){ne(Ie-1,void 0,!0);break}if(de+=Ge,Ee===0&&de<=T||Ie===Ee-1&&de+ce(Ee)<=T){ne(Ee,null);break}else if(de+te>T){ne(Ie-1,de-Ge-j+A);break}}m&&ce(0)+j>T&&R(null)}},[T,O,A,z,j,ie,q]);const Ne=J&&!!oe.length;let $e={};F!==null&&Q&&($e={position:"absolute",top:0,insetInlineStart:F});const Pe={prefixCls:G,responsive:Q,component:y,invalidate:le},W=i?(de,ee)=>{const Ee=ie(de,ee);return g.createElement(Ta.Provider,{key:Ee,value:{...Pe,order:ee,item:de,itemKey:Ee,registerSize:se,display:ee<=P}},i(de,ee))}:(de,ee)=>{const Ee=ie(de,ee);return g.createElement(ao,$t({},Pe,{order:ee,key:Ee,item:de,renderItem:Ce,itemKey:Ee,registerSize:se,display:ee<=P}))},K={order:Ne?P:Number.MAX_SAFE_INTEGER,className:`${G}-rest`,registerSize:ye,display:Ne},ue=f||VT,be=p?g.createElement(Ta.Provider,{value:{...Pe,...K}},p(oe)):g.createElement(ao,$t({},Pe,K),typeof ue=="function"?ue(oe):ue),Se=g.createElement(w,$t({className:Y(!le&&n,u),style:c,ref:t},x),h&&g.createElement(ao,$t({},Pe,{responsive:_,responsiveDisabled:!Q,order:-1,className:`${G}-prefix`,registerSize:ae,display:!0}),h),q.map(W),fe?be:null,m&&g.createElement(ao,$t({},Pe,{responsive:_,responsiveDisabled:!Q,order:P,className:`${G}-suffix`,registerSize:he,display:!0,style:$e}),m));return _?g.createElement(ko,{onResize:re,disabled:!Q},Se):Se}const rr=g.forwardRef(WT);rr.Item=ox;rr.RESPONSIVE=ix;rr.INVALIDATE=ax;process.env.NODE_ENV!=="production"&&(rr.displayName="Overflow");const Na=(e,t,n)=>Y({[`${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(DT),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=g2.includes(d);return[d,f,u]};var qT={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 XT=(e,t)=>g.createElement(Jt,Rc({},e,{ref:t,icon:qT})),sx=g.forwardRef(XT);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:Y(`${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],UT={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 GT=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 T={...v};"visible"in e&&(T.popupVisible=e.visible);const O=g.useMemo(()=>{if(!$)return!1;const N=$===!0?{}:$;return{...N,className:Y(N.className,x==null?void 0:x.arrow),style:{...N.style,...E==null?void 0:E.arrow},content:N.content??m}},[$,x==null?void 0:x.arrow,E==null?void 0:E.arrow,m]),k=({open:N})=>{const D=g.Children.only(a),z={"aria-describedby":[D.props["aria-describedby"],w&&N?C:void 0].filter(Boolean).join(" ")||void 0};return g.cloneElement(D,z)};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:UT,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:O,uniqueContainerClassName:x==null?void 0:x.uniqueContainer,uniqueContainerStyle:E==null?void 0:E.uniqueContainer},T),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 KT=(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",...KT(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 YT(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"]}},QT={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"]}},ZT=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&&QT[u]||jp[u],offset:[0,0],dynamicInset:!0};switch(l[u]=f,ZT.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=YT(u,c,t,n),a&&(f.htmlRegion="visibleFirst")}),l}const JT=b.createContext(!1),eN=(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%",tN=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,_R(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"},...iI(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}`}}}]},nN=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[tN(c),Yu(o,"zoom-big-fast")]},nN,{resetStyle:!1,injectStyle:n})(e,t),rN=xr.map(e=>`${e}-inverse`);function oN(e,t=!0){return t?[].concat(jr(rN),jr(xr)).includes(e):xr.includes(e)}const mx=(e,t,n)=>{const r=oN(n),[o]=ur(e,"tooltip"),i=Y({[`${t}-${n}`]:n&&r}),a={},s={},l=$P(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}},iN=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=Y(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))},aN=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:T,overlayInnerStyle:O,overlayStyle:k,overlayClassName:N,...D}=e,[,A]=Cr(),M=e["data-popover-inject"],{getPopupContainer:z,getPrefixCls:L,direction:j,...H}=Kn("tooltip"),{className:F,style:R,classNames:X,styles:B,arrow:P,trigger:J,mouseEnterDelay:V,mouseLeaveDelay:G}=M?{}:H,te=x??V??.1,_=E??G??.1,Q=eN(l,P),le=Q.show,fe=p||J||"hover",q=y||z,oe=u??!!c,ie=g.useContext(JT),Ce=At("Tooltip"),ne=g.useRef(null),re=()=>{var _e;(_e=ne.current)==null||_e.forceAlign()};g.useImperativeHandle(t,()=>{var _e,pt;return{forceAlign:re,nativeElement:(_e=ne.current)==null?void 0:_e.nativeElement,popupElement:(pt=ne.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])=>{Ce.deprecated(!(_e in e),_e,pt)}),process.env.NODE_ENV!=="production"&&Ce(!c||typeof c=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."));const[se,ye]=un(e.defaultOpen??!1,e.open),ae=!d&&!f&&d!==0,he=_e=>{ye(ae?!1:_e),!ae&&T&&T(_e)},ce=g.useMemo(()=>h||fx({arrowPointAtCenter:(Q==null?void 0:Q.pointAtCenter)??!1,autoAdjustOverflow:m,arrowWidth:le?A.sizePopupArrow:0,borderRadius:A.borderRadius,offset:A.marginXXS,visibleFirst:!0}),[Q,h,A,le,m]),Ne=g.useMemo(()=>d===0?d:f||d||"",[f,d]),$e=g.createElement(Pa,{space:!0,form:!0},Qt(Ne)?Ne():Ne),Pe={...e,trigger:fe,builtinPlacements:ce,getPopupContainer:q,destroyOnHidden:oe,mouseEnterDelay:te,mouseLeaveDelay:_},W=kt(R),K=kt(k),[ue,be]=Pn([X,I],[B,W,C,K],{props:Pe}),Se=L("tooltip",n),de=L();let ee=se;(!("open"in e)&&ae||ie)&&(ee=!1);const Ee=g.isValidElement(a)&&!Sb(a)?a:g.createElement("span",null,a),Ie=Ee.props,Ge=!Ie.className||typeof Ie.className=="string"?Y(Ie.className,r||`${Se}-open`):Ie.className,Re=Ro(Se),[ze,Me]=px(Se,Re,!M),it=mx(de,Se,i),Qe=it.arrowStyle,It=Y(Re,ze,Me),wt=Y(N,{[`${Se}-rtl`]:j==="rtl"},it.className,v,It,F,ue.root),[Ot,gt]=Ku("Tooltip",D.zIndex),_t={...be.container,...O,...it.overlayStyle},jt=g.createElement(GT,{unique:!0,...D,zIndex:Ot,showArrow:le,placement:$,mouseEnterDelay:te,mouseLeaveDelay:_,prefixCls:Se,classNames:{root:wt,container:ue.container,arrow:ue.arrow,uniqueContainer:Y(It,ue.container)},styles:{root:{...Qe,...be.root},container:_t,uniqueContainer:_t,arrow:be.arrow},ref:ne,overlay:$e,visible:ee,onVisibleChange:he,afterVisibleChange:s,arrowContent:g.createElement("span",{className:`${Se}-arrow-content`}),motion:{motionName:vR(de,"zoom-big-fast",typeof(w==null?void 0:w.motionName)=="string"?w==null?void 0:w.motionName:void 0),motionDeadline:1e3},trigger:fe,builtinPlacements:ce,getTooltipContainer:q,destroyOnHidden:oe},ee&&!D.disabled?Dn(Ee,{className:Ge}):Ee);return g.createElement(is.Provider,{value:gt},jt)}),Ci=aN;process.env.NODE_ENV!=="production"&&(Ci.displayName="Tooltip");Ci._InternalPanelDoNotUseOrYouWillBeFired=iN;Ci.UniqueProvider=Eb;var sN={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 lN=(e,t)=>g.createElement(Jt,Tc({},e,{ref:t,icon:sN})),Ma=g.forwardRef(lN);process.env.NODE_ENV!=="production"&&(Ma.displayName="LeftOutlined");const{ESC:cN,TAB:uN}=Eu;function dN({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 cN:a();break;case uN:{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 fN=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],pN={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 mN=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=pN,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(),T="visible"in e?h:C,O=i?`${r}-${i}`:o,k=b.useRef(null),N=b.useRef(null),D=b.useRef(null);b.useImperativeHandle(t,()=>k.current);const A=V=>{I(V),x==null||x(V)};dN({visible:T,triggerRef:D,onVisibleChange:A,autoFocus:w,overlayRef:N});const M=V=>{const{onOverlayClick:G}=e;I(!1),G&&G(V)},z=()=>b.createElement(fN,{ref:N,overlay:y,prefixCls:r,arrow:n}),L=()=>typeof y=="function"?z:z(),j=()=>{const{minOverlayWidthMatchTrigger:V,alignPoint:G}=e;return"minOverlayWidthMatchTrigger"in e?V:!G},H=()=>{const{openClassName:V}=e;return V!==void 0?V:`${r}-open`},F=$,R=Y((J=F.props)==null?void 0:J.className,T&&H()),X={className:R,ref:Gn(D,cr(F))},B=Eo(F)?b.cloneElement(F,X):b.createElement("span",{className:R,ref:D},b.cloneElement(F,{className:R}));let P=d;return!P&&m.indexOf("contextMenu")!==-1&&(P=["click"]),b.createElement(Uu,Nc({builtinPlacements:l},v,{prefixCls:r,ref:k,popupClassName:Y(f,{[`${r}-show-arrow`]:n}),popupStyle:p,action:m,showAction:u,hideAction:P,popupPlacement:s,popupAlign:a,popupMotion:{motionName:O},popupVisible:T,stretch:j()?"minWidth":"",popup:L(),onOpenChange:A,onPopupClick:M,getPopupContainer:c}),B)}),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 gN(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(()=>gN(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 hN=[],xx=g.createContext(null);function ls(){return g.useContext(xx)}const yx=g.createContext(hN);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 bN(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 xN(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function yN(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 v$(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 wN(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=yN(E,y),C=x.get(v),I=bN(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 T=O=>{if(O){let k=O;const N=O.querySelector("a");N!=null&&N.getAttribute("href")&&(k=N);const D=x.get(O);s(D),f(),u.current=xt(()=>{d.current===D&&k.focus()})}};if([Bo,Ho].includes(h)||I.sibling||!v){let O;!v||e==="inline"?O=o.current:O=xN(v);let k;const N=nd(O,y);h===Bo?k=N[0]:h===Ho?k=N[N.length-1]:k=Vp(O,y,v,I.offset),T(k)}else if(I.inlineTrigger)l(C);else if(I.offset>0)l(C,!0),f(),u.current=xt(()=>{w=Aa(m,r);const O=v.getAttribute("aria-controls"),k=document.getElementById(O),N=Vp(k,w.elements);T(N)},5);else if(I.offset<0){const O=a(C,!0),k=O[O.length-2],N=$.get(k);l(k,!1),T(N)}}c==null||c(p)}}function vN(e){Promise.resolve().then(e)}const rd="__RC_UTIL_PATH_SPLIT__",Wp=e=>e.join(rd),CN=e=>e.split(rd),Oc="rc-menu-more";function SN(){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;vN(()=>{$===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)||"",$=CN(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 EN 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 $N=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:T}=g.useContext(Ln),{_internalRenderMenuItem:O}=g.useContext(td),k=`${$}-item`,N=g.useRef(null),D=g.useRef(null),A=E||a,M=Hr(t,D),z=No(o);process.env.NODE_ENV!=="production"&&i&&tt(!1,"MenuItem should not leave undefined `key`.");const L=te=>{const _=c||{key:o||"",label:l,itemIcon:s,extra:e.extra,title:e.title};return{key:o,keyPath:[...z].reverse(),item:N.current,domEvent:te,itemData:c||_}},j=s||C,{active:H,...F}=Cx(o,A,d,f),R=I.includes(o),X=Sx(z.length),B=te=>{if(A)return;const _=L(te);p==null||p(za(_)),x(_)},P=te=>{if(h==null||h(te),te.which===Eu.ENTER){const _=L(te);p==null||p(za(_)),x(_)}},J=te=>{T(o),m==null||m(te)},V={};e.role==="option"&&(V["aria-selected"]=R);let G=g.createElement(EN,fi({ref:N,elementRef:M,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":v&&y?null:y},Yt(w,["extra"]),F,V,{component:"li","aria-disabled":a,style:{...X,...n},className:Y(k,{[`${k}-active`]:H,[`${k}-selected`]:R,[`${k}-disabled`]:A},r),onClick:B,onKeyDown:P,onFocus:J}),l,g.createElement(Ex,{props:{...e,isSelected:R},icon:j}));return O&&(G=O(G,e,{selected:R})),G});function kN(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($N,fi({},e,{ref:t}))}const cs=g.forwardRef(kN);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 IN=({className:e,children:t,...n},r)=>{const{prefixCls:o,mode:i,rtl:a}=g.useContext(Ln);return g.createElement("ul",Dc({className:Y(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(IN);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},RN={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}},PN={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 TN={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function NN({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?{...PN,...h}:{...RN,...h},I=TN[l],T=$x(l,$,x),O=g.useRef(T);l!=="inline"&&(O.current=T);const k={...O.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},N=g.useRef(void 0);return g.useEffect(()=>(N.current=xt(()=>{v(t)}),()=>{xt.cancel(N.current)}),[t]),g.createElement(Uu,{prefixCls:e,popupClassName:Y(`${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 MN({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 AN=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:T,...O}=e,k=bx(l),{prefixCls:N,mode:D,openKeys:A,disabled:M,overflowDisabled:z,activeKey:L,selectedKeys:j,itemIcon:H,expandIcon:F,onItemClick:R,onOpenChange:X,onActive:B,popupRender:P}=g.useContext(Ln),{_internalRenderSubMenuItem:J}=g.useContext(td),{isSubPathKey:V}=g.useContext(wx),G=No(),te=`${N}-submenu`,_=M||u,Q=g.useRef(null),le=g.useRef(null);process.env.NODE_ENV!=="production"&&c&&tt(!1,"SubMenu should not leave undefined `key`.");const fe=p??H,q=h??F,oe=A.includes(l),ie=!z&&oe,Ce=V(j,l),{active:ne,...re}=Cx(l,_,C,I),[se,ye]=g.useState(!1),ae=Re=>{_||ye(Re)},he=Re=>{ae(!0),x==null||x({key:l,domEvent:Re})},ce=Re=>{ae(!1),E==null||E({key:l,domEvent:Re})},Ne=g.useMemo(()=>ne||(D!=="inline"?se||V([L],l):!1),[D,ne,L,se,l,V]),$e=Sx(G.length),Pe=Re=>{_||(v==null||v({key:l,domEvent:Re}),D==="inline"&&X(l,!oe))},W=Go(Re=>{$==null||$(za(Re)),R(Re)}),K=Re=>{D!=="inline"&&X(l,Re)},ue=()=>{B(l)},be=k&&`${k}-popup`,Se=g.useMemo(()=>g.createElement(Ex,{icon:D!=="horizontal"?q:void 0,props:{...e,isOpen:ie,isSubMenu:!0}},g.createElement("i",{className:`${te}-arrow`})),[D,q,e,ie,te]);let de=g.createElement("div",pi({role:"menuitem",style:$e,className:`${te}-title`,tabIndex:_?null:-1,ref:Q,title:s??(typeof a=="string"?a:null),"data-menu-id":z&&k?null:k,"aria-expanded":ie,"aria-haspopup":!0,"aria-controls":be,"aria-disabled":_,onClick:Pe,onFocus:ue},re),a,Se);const ee=g.useRef(D);D!=="inline"&&G.length>1?ee.current="vertical":ee.current=D;const Ee=ee.current,Ie=g.useMemo(()=>{const Re=g.createElement(di,{classNames:i,styles:o,mode:Ee==="horizontal"?"vertical":Ee},g.createElement(od,{id:be,ref:le},f)),ze=T||P;return ze?ze(Re,{item:e,keys:G}):Re},[T,P,G,be,f,e,Ee]);if(!z){const Re=ee.current;de=g.createElement(NN,{mode:Re,prefixCls:te,visible:!d&&ie&&D!=="inline",popupClassName:m,popupOffset:w,popupStyle:y,popup:Ie,disabled:_,onVisibleChange:K},de)}let Ge=g.createElement(rr.Item,pi({ref:t,role:"none"},O,{component:"li",style:n,className:Y(te,`${te}-${D}`,r,{[`${te}-open`]:ie,[`${te}-active`]:Ne,[`${te}-selected`]:Ce,[`${te}-disabled`]:_}),onMouseEnter:he,onMouseLeave:ce}),de,!z&&g.createElement(MN,{id:be,open:ie,keyPath:G},f));return J&&(Ge=J(Ge,e,{selected:Ce,active:Ne,open:ie,disabled:_})),g.createElement(di,{classNames:i,styles:o,onItemClick:W,mode:D==="horizontal"?"vertical":D,itemIcon:fe,expandIcon:q},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(AN,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:Y(`${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 zN=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:Y(u,n)}),g.createElement("div",{role:"presentation",className:Y(`${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:Y(`${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(zN,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=[],ON=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:T=!0,multiple:O=!1,defaultSelectedKeys:k,selectedKeys:N,onSelect:D,onDeselect:A,inlineIndent:M=24,motion:z,defaultMotions:L,triggerSubMenuAction:j="hover",builtinPlacements:H,itemIcon:F,expandIcon:R,overflowedIndicator:X="...",overflowedIndicatorPopupClassName:B,getPopupContainer:P,onClick:J,onOpenChange:V,onKeyDown:G,openAnimation:te,openTransitionName:_,_internalRenderMenuItem:Q,_internalRenderSubMenuItem:le,_internalComponents:fe,popupRender:q,...oe}=e,[ie,Ce]=g.useMemo(()=>[qp(u,c,Rr,fe,n),qp(u,c,Rr,{},n)],[u,c,fe]),[ne,re]=g.useState(!1),se=g.useRef(null),ye=Ga(),ae=f??`rc-menu-uuid-${ye}`,he=d==="rtl";process.env.NODE_ENV!=="production"&&tt(!te&&!_,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");const[ce,Ne]=un(E,v),$e=ce||Rr,Pe=(Oe,Ze=!1)=>{function st(){Ne(Oe),V==null||V(Oe)}Ze?po.flushSync(st):st()},[W,K]=g.useState($e),ue=g.useRef(!1),[be,Se]=g.useMemo(()=>(p==="inline"||p==="vertical")&&h?["vertical",h]:[p,!1],[p,h]),de=be==="inline",[ee,Ee]=g.useState(be),[Ie,Ge]=g.useState(Se);g.useEffect(()=>{Ee(be),Ge(Se),ue.current&&(de?Ne(W):Pe(Rr))},[be,Se]);const[Re,ze]=g.useState(0),Me=Re>=ie.length-1||ee!=="horizontal"||w;g.useEffect(()=>{de&&K($e)},[$e]),g.useEffect(()=>(ue.current=!0,()=>{ue.current=!1}),[]);const{registerPath:it,unregisterPath:Qe,refreshOverflowKeys:It,isSubPathKey:wt,getKeyPath:Ot,getKeys:gt,getSubPathKeys:_t}=SN(),jt=g.useMemo(()=>({registerPath:it,unregisterPath:Qe}),[it,Qe]),_e=g.useMemo(()=>({isSubPathKey:wt}),[wt]);g.useEffect(()=>{It(Me?Rr:ie.slice(Re+1).map(Oe=>Oe.key))},[Re,Me]);const[pt,Cn]=un(C||I&&((vt=ie[0])==null?void 0:vt.key),C),_n=Go(Oe=>{Cn(Oe)}),jn=Go(()=>{Cn(void 0)});b.useImperativeHandle(t,()=>({list:se.current,focus:Oe=>{var Te,ke;const Ze=gt(),{elements:st,key2element:Be,element2key:U}=Aa(Ze,ae),ge=nd(se.current,st);let pe;pt&&Ze.includes(pt)?pe=pt:pe=ge[0]?U.get(ge[0]):(Te=ie.find(Fe=>!Fe.props.disabled))==null?void 0:Te.key;const we=Be.get(pe);pe&&we&&((ke=we==null?void 0:we.focus)==null||ke.call(we,Oe))},findItem:({key:Oe})=>{const Ze=gt(),{key2element:st}=Aa(Ze,ae);return st.get(Oe)||null}}));const[Rt,Sn]=un(k||[],N),Ht=g.useMemo(()=>Array.isArray(Rt)?Rt:Rt==null?Rr:[Rt],[Rt]),an=Oe=>{if(T){const{key:Ze}=Oe,st=Ht.includes(Ze);let Be;O?st?Be=Ht.filter(ge=>ge!==Ze):Be=[...Ht,Ze]:Be=[Ze],Sn(Be);const U={...Oe,selectedKeys:Be};st?A==null||A(U):D==null||D(U)}!O&&$e.length&&ee!=="inline"&&Pe(Rr)},Bn=Go(Oe=>{J==null||J(za(Oe)),an(Oe)}),fn=Go((Oe,Ze)=>{let st=$e.filter(Be=>Be!==Oe);if(Ze)st.push(Oe);else if(ee!=="inline"){const Be=_t(Oe);st=st.filter(U=>!Be.has(U))}ii($e,st,!0)||Pe(st,!0)}),en=wN(ee,pt,he,ae,se,gt,Ot,Cn,(Oe,Ze)=>{const st=Ze??!$e.includes(Oe);fn(Oe,st)},G);g.useEffect(()=>{re(!0)},[]);const Dt=g.useMemo(()=>({_internalRenderMenuItem:Q,_internalRenderSubMenuItem:le}),[Q,le]),at=ee!=="horizontal"||w?ie:ie.map((Oe,Ze)=>g.createElement(di,{key:Oe.key,overflowDisabled:Ze>Re,classNames:s,styles:a},Oe)),Vt=g.createElement(rr,_c({id:f,ref:se,prefixCls:`${n}-overflow`,component:"ul",itemComponent:cs,className:Y(n,`${n}-root`,`${n}-${ee}`,i,{[`${n}-inline-collapsed`]:Ie,[`${n}-rtl`]:he},r),dir:d,style:o,role:"menu",tabIndex:l,data:at,renderRawItem:Oe=>Oe,renderRawRest:Oe=>{const Ze=Oe.length,st=Ze?ie.slice(-Ze):null;return g.createElement(Si,{eventKey:Oc,title:X,disabled:Me,internalPopupClose:Ze===0,popupClassName:B},st)},maxCount:ee!=="horizontal"||w?rr.INVALIDATE:rr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:Oe=>{ze(Oe)},onKeyDown:en},oe));return g.createElement(td.Provider,{value:Dt},g.createElement(gx.Provider,{value:ae},g.createElement(di,{prefixCls:n,rootClassName:r,classNames:s,styles:a,mode:ee,openKeys:$e,rtl:he,disabled:m,motion:ne?z:null,defaultMotions:ne?L:null,activeKey:pt,onActive:_n,onInactive:jn,selectedKeys:Ht,inlineIndent:M,subMenuOpenDelay:y,subMenuCloseDelay:$,forceSubMenuRender:x,builtinPlacements:H,triggerSubMenuAction:j,getPopupContainer:P,itemIcon:F,expandIcon:R,onItemClick:Bn,onOpenChange:fn,popupRender:q},g.createElement(wx.Provider,{value:_e},Vt),g.createElement("div",{style:{display:"none"},"aria-hidden":!0},g.createElement(xx.Provider,{value:jt},Ce)))))}),Ei=ON;Ei.Item=cs;Ei.SubMenu=Si;Ei.ItemGroup=us;Ei.Divider=ad;var DN={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 LN=(e,t)=>g.createElement(Jt,jc({},e,{ref:t,icon:DN})),kx=g.forwardRef(LN);process.env.NODE_ENV!=="production"&&(kx.displayName="BarsOutlined");const FN=g.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),_N=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",_N,Ix,{deprecatedTokens:Rx});const jN=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}}}}},BN=on(["Layout","Sider"],jN,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"},HN=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),sd=g.createContext({}),VN=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),WN=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(FN),[v,C]=un(a,e.collapsed),[I,T]=b.useState(!1),O=(q,oe)=>{C(q),m==null||m(q,oe)},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},[N,D]=Pn([y],[$],{props:k}),{getPrefixCls:A,direction:M}=b.useContext(dt),z=A("layout-sider",n),[L,j]=BN(z),H=b.useRef(null);H.current=q=>{T(q.matches),w==null||w(q.matches),v!==q.matches&&O(q.matches,"responsive")},b.useEffect(()=>{function q(ie){var Ce;return(Ce=H.current)==null?void 0:Ce.call(H,ie)}let oe;return typeof(window==null?void 0:window.matchMedia)<"u"&&h&&h in Xp&&(oe=window.matchMedia(`screen and (max-width: ${Xp[h]})`),Qt(oe==null?void 0:oe.addEventListener)&&oe.addEventListener("change",q),q(oe)),()=>{Qt(oe==null?void 0:oe.removeEventListener)&&oe.removeEventListener("change",q)}},[h]),b.useEffect(()=>{const q=VN("ant-sider-");return E.addSider(q),()=>E.removeSider(q)},[]);const F=()=>{O(!v,"clickTrigger")},R=Yt(x,["collapsed"]),X=v?f:d,B=HN(X)?`${X}px`:String(X),P=Number.parseFloat(String(f||0))===0?g.createElement("span",{onClick:F,className:Y(`${z}-zero-width-trigger`,`${z}-zero-width-trigger-${u?"right":"left"}`),style:p},o||g.createElement(kx,null)):null,J=M==="rtl"==!u,te={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?P||g.createElement("div",{className:`${z}-trigger`,onClick:F,style:{width:B}},o||te):null,Q={...l,flex:`0 0 ${B}`,maxWidth:B,minWidth:B,width:B},le=Y(z,`${z}-${s}`,{[`${z}-collapsed`]:!!v,[`${z}-has-trigger`]:c&&o!==null&&!P,[`${z}-below`]:!!I,[`${z}-zero-width`]:Number.parseFloat(B)===0},r,N.root,L,j),fe=g.useMemo(()=>({siderCollapsed:v}),[v]);return g.createElement(sd.Provider,{value:fe},g.createElement("aside",{className:le,...R,style:{...D.root,...Q},ref:t},g.createElement("div",{className:Y(`${z}-children`,N.body),style:D.body},i),c||I&&P?_:null))});process.env.NODE_ENV!=="production"&&(WN.displayName="Sider");var qN={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 XN=(e,t)=>g.createElement(Jt,Bc({},e,{ref:t,icon:qN})),ld=g.forwardRef(XN);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=Y({[`${a}-item-divider-dashed`]:!!r},n);return g.createElement(ad,{className:s,...o})},Tx=e=>{var k,N;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=D=>{var z,L;const A=n==null?void 0:n[0],M=g.createElement("span",{className:Y(`${s}-title-content`,l?h==null?void 0:h.itemContent:(z=h==null?void 0:h.subMenu)==null?void 0:z.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&&D&&l&&typeof A=="string"?g.createElement("div",{className:`${s}-inline-collapsed-noicon`},A.charAt(0)):M};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=D=>{var A;$(D),(A=v==null?void 0:v.onOpenChange)==null||A.call(v,D)}):(I.title=null,I.open=!1);const T=or(n).length;let O=g.createElement(cs,{...Yt(e,["title","icon","danger"]),className:Y(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?T+1:T)===1},t),style:{...l?p==null?void 0:p.item:(N=p==null?void 0:p.subMenu)==null?void 0:N.item,...e.style},title:typeof o=="string"?o:void 0,itemData:(e==null?void 0:e.itemData)??{...e,key:e.eventKey}},Dn(r,D=>{var A,M;return{className:Y(`${s}-item-icon`,l?h==null?void 0:h.itemIcon:(A=h==null?void 0:h.subMenu)==null?void 0:A.itemIcon,D.className),style:{...l?p==null?void 0:p.itemIcon:(M=p==null?void 0:p.subMenu)==null?void 0:M.itemIcon,...D.style}}}),x(f));if(!u&&d!==!1){const D=v&&v.placement?v.placement:c==="rtl"?"left":"right",A=`${s}-inline-collapsed-tooltip`,M=L=>({...L,root:Y(A,L==null?void 0:L.root)}),z=Qt(v==null?void 0:v.classNames)?L=>{const j=v.classNames(L);return M(j)}:M(v==null?void 0:v.classNames);O=g.createElement(Ci,{...I,placement:D,classNames:z},O)}return O},La=g.createContext(null),UN=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))}),GN=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"}}}},KN=({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)})`}}}}),Up=e=>ju(e),Gp=(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:T,dangerItemActiveBg:O,dangerItemSelectedBg:k,popupBg:N,itemHoverBg:D,itemActiveBg:A,menuSubMenuBg:M,horizontalItemSelectedColor:z,horizontalItemSelectedBg:L,horizontalItemBorderRadius:j,horizontalItemHoverBg:H}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:{...Up(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`]:{...Up(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:D},"&:active":{backgroundColor:A}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:D},"&:active":{backgroundColor:A}}},[`${n}-item-danger`]:{color:C,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:I}},[`&${n}-item:active`]:{background:O}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:T},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:k}},[`&${n}-submenu > ${n}`]:{backgroundColor:M},[`&${n}-popup > ${n}`]:{backgroundColor:N},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:N},[`&${n}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:j,"&::after":{position:"absolute",insetInline:w,bottom:0,pointerEvents:"none",borderBottom:`${xe(u)} solid transparent`,transition:`border-color ${p} ${h}`,content:'""'},"&:hover, &-active, &-open":{background:H,"&::after":{borderBottomWidth:u,borderBottomColor:z}},"&-selected":{color:z,backgroundColor:L,"&:hover":{backgroundColor:L},"&::after":{borderBottomWidth:u,borderBottomColor:z}}}},[`&${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(F=>`${F} ${y} ${m}`).join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:T}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform","opacity"].map(F=>`${F} ${y} ${h}`).join(",")}}}}}},Kp=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}}},YN=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"},...Kp(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...Kp(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:C,colorTextLightSolid:v,colorErrorHover:I}=e,T=e.activeBarWidth??0,O=e.activeBarBorderWidth??u,k=e.itemMarginInline??e.marginXXS,N=new Ve(v).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:T,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:O,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:C,groupTitleFontSize:x,darkItemDisabledColor:new Ve(v).setA(.25).toRgbString(),darkItemColor:N,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:v,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:N,darkItemHoverColor:v,darkDangerItemHoverColor:I,darkDangerItemSelectedColor:v,darkDangerItemActiveBg:n,itemWidth:T?`calc(100% + ${O}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:C,popupBg:v,darkPopupBg:I}=o,T=o.calc(s).div(7).mul(5).equal(),O=yt(o,{menuArrowSize:T,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(T).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:v}),k=yt(O,{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:C,dangerItemSelectedBg:h,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:p});return[JN(O),YN(O),ZN(O),Yp(O,"light"),Yp(k,"dark"),QN(O),FR(O),io(O,"slide-up"),io(O,"slide-down"),Zu(O,"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),Ax=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 C=g.isValidElement(r)&&r.type==="span";f=g.createElement(g.Fragment,null,On(n,v=>({className:Y(v.className,`${a}-item-icon`,c==null?void 0:c.itemIcon),style:{...v.style,...u==null?void 0:u.itemIcon}})),C?r:g.createElement("span",{className:`${a}-title-content`},r))}const p=g.useMemo(()=>({...i,firstLevel:!1}),[i]),[h]=Qu("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:Y(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 al(e){return e===null||e===!1}const nM={item:Mx,submenu:Ax,divider:Nx},rM=b.forwardRef((e,t)=>{var q;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:C}=g.useContext(dt),{getPrefixCls:v,getPopupContainer:I,direction:T,className:O,style:k,classNames:N,styles:D}=Kn("menu"),A=v(),M=Yt(E,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const oe=At("Menu");process.env.NODE_ENV!=="production"&&oe(!("inlineCollapsed"in e&&h!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),oe.deprecated("items"in e&&!e.children,"children","items")}(q=r.validator)==null||q.call(r,{mode:h});const z=Ke((...oe)=>{var ie;w==null||w(...oe),(ie=r.onClick)==null||ie.call(r)}),L=r.mode||h,_=m??r.selectable,H=d??f,F={...e,mode:L,inlineCollapsed:H,selectable:_,theme:s},R=kt(k),X=kt(a),[B,P]=Pn([N,$],[D,R,x,X],{props:F},{popup:{_default:"root"},subMenu:{_default:"item"}}),J={horizontal:{motionName:`${A}-slide-up`},inline:CR(A),other:{motionName:`${A}-zoom-big`}},V=v("menu",o||r.prefixCls),G=Ro(V),[te,j]=tM(V,G,!n),Q=Y(`${V}-${s}`,O,i),le=g.useMemo(()=>{var ie;if(Qt(l)||al(l))return l||null;if(Qt(r.expandIcon)||al(r.expandIcon))return r.expandIcon||null;if(Qt(C==null?void 0:C.expandIcon)||al(C==null?void 0:C.expandIcon))return(C==null?void 0:C.expandIcon)||null;const oe=l??(r==null?void 0:r.expandIcon)??(C==null?void 0:C.expandIcon);return On(oe,{className:Y(`${V}-submenu-expand-icon`,g.isValidElement(oe)?(ie=oe.props)==null?void 0:ie.className:void 0)})},[l,r==null?void 0:r.expandIcon,C==null?void 0:C.expandIcon,V]),fe=g.useMemo(()=>({prefixCls:V,inlineCollapsed:H||!1,direction:T,firstLevel:!0,theme:s,mode:L,disableMenuItemTitleTooltip:c,tooltip:u,classNames:B,styles:P}),[V,H,T,c,s,L,B,P,u]);return g.createElement(La.Provider,{value:null},g.createElement(Da.Provider,{value:fe},g.createElement(Ei,{getPopupContainer:I,overflowedIndicator:g.createElement(ud,null),overflowedIndicatorPopupClassName:Y(V,`${V}-${s}`,y),classNames:{list:B.list,listTitle:B.itemTitle},styles:{list:P.list,listTitle:P.itemTitle},mode:L,selectable:_,onClick:z,...M,inlineCollapsed:H,style:P.root,className:Q,prefixCls:V,direction:T,defaultMotions:J,expandIcon:le,ref:t,rootClassName:Y(p,te,r.rootClassName,j,G,B.root),_internalComponents:nM})))}),Mo=b.forwardRef((e,t)=>{const n=b.useRef(null),r=g.useContext(cd);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=Mx;Mo.SubMenu=Ax;Mo.Divider=Nx;Mo.ItemGroup=fs;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`]:{...Jh,paddingInline:f}}}]},Yp=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`]:{..._u()},[`&${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"}}}},Qp=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)})`}}}}},QN=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]:{...nc(),"&-hidden":{display:"none"}}},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:{...Io(e),...nc(),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,...Jh},[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"}},...Yp(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,...Yp(e),...Qp(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}},...Qp(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"}}}]},ZN=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,T=e.activeBarWidth??0,O=e.activeBarBorderWidth??u,k=e.itemMarginInline??e.marginXXS,N=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:T,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:O,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:N,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:C,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:N,darkItemHoverColor:C,darkDangerItemHoverColor:I,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:n,itemWidth:T?`calc(100% + ${O}px)`:`calc(100% - ${k*2}px)`}},JN=(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,T=o.calc(s).div(7).mul(5).equal(),O=yt(o,{menuArrowSize:T,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(T).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:C}),k=yt(O,{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[QN(O),GN(O),YN(O),Gp(O,"light"),Gp(k,"dark"),KN(O),DR(O),io(O,"slide-up"),io(O,"slide-down"),Yu(O,"zoom-big")]},ZN,{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:Y(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:Y(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 eM={item:Tx,submenu:Nx,divider:Px},tM=b.forwardRef((e,t)=>{var q;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:T,className:O,style:k,classNames:N,styles:D}=Kn("menu"),A=C(),M=Yt(E,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const oe=At("Menu");process.env.NODE_ENV!=="production"&&oe(!("inlineCollapsed"in e&&h!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),oe.deprecated("items"in e&&!e.children,"children","items")}(q=r.validator)==null||q.call(r,{mode:h});const z=Ke((...oe)=>{var ie;w==null||w(...oe),(ie=r.onClick)==null||ie.call(r)}),L=r.mode||h,j=m??r.selectable,H=d??f,F={...e,mode:L,inlineCollapsed:H,selectable:j,theme:s},R=kt(k),X=kt(a),[B,P]=Pn([N,$],[D,R,x,X],{props:F},{popup:{_default:"root"},subMenu:{_default:"item"}}),J={horizontal:{motionName:`${A}-slide-up`},inline:wR(A),other:{motionName:`${A}-zoom-big`}},V=C("menu",o||r.prefixCls),G=Ro(V),[te,_]=JN(V,G,!n),Q=Y(`${V}-${s}`,O,i),le=g.useMemo(()=>{var ie;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 oe=l??(r==null?void 0:r.expandIcon)??(v==null?void 0:v.expandIcon);return Dn(oe,{className:Y(`${V}-submenu-expand-icon`,g.isValidElement(oe)?(ie=oe.props)==null?void 0:ie.className:void 0)})},[l,r==null?void 0:r.expandIcon,v==null?void 0:v.expandIcon,V]),fe=g.useMemo(()=>({prefixCls:V,inlineCollapsed:H||!1,direction:T,firstLevel:!0,theme:s,mode:L,disableMenuItemTitleTooltip:c,tooltip:u,classNames:B,styles:P}),[V,H,T,c,s,L,B,P,u]);return g.createElement(La.Provider,{value:null},g.createElement(Da.Provider,{value:fe},g.createElement(Ei,{getPopupContainer:I,overflowedIndicator:g.createElement(ld,null),overflowedIndicatorPopupClassName:Y(V,`${V}-${s}`,y),classNames:{list:B.list,listTitle:B.itemTitle},styles:{list:P.list,listTitle:P.itemTitle},mode:L,selectable:j,onClick:z,...M,inlineCollapsed:H,style:P.root,className:Q,prefixCls:V,direction:T,defaultMotions:J,expandIcon:le,ref:t,rootClassName:Y(p,te,r.rootClassName,_,G,B.root),_internalComponents:eM})))}),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(tM,{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 nM=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}}}}}},rM=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:Ob},[`&${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:Lb},[`&${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:Db},[`&${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:Fb},[`&${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:_b},[`&${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:Bb},[`&${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:jb},[`&${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:Wb}}},px(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"),Tp(e,"move-up"),Tp(e,"move-down"),Zu(e,"zoom-big")]]},aM=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...nd({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...dx(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:C,styles:v,destroyPopupOnHide:I,destroyOnHidden:T}=e,{getPrefixCls:O,direction:k,getPopupContainer:N,className:D,style:A,classNames:M,styles:z}=Kn("dropdown"),L={...e,mouseEnterDelay:w,mouseLeaveDelay:y,autoAdjustOverflow:$},_=kt(A),H=kt(p),[F,R]=Pn([M,C],[z,_,v,H],{props:L}),X={...R.root},B=c||l,P=At("Dropdown");process.env.NODE_ENV!=="production"&&(Object.entries({dropdownRender:"popupRender",destroyPopupOnHide:"destroyOnHidden",overlayClassName:"classNames.root",overlayStyle:"styles.root"}).forEach(([K,ue])=>{P.deprecated(!(K in e),K,ue)}),x.includes("Center")&&P.deprecated(!x.includes("Center"),`placement: ${x}`,`placement: ${x.slice(0,x.indexOf("Center"))}`));const J=g.useMemo(()=>{const W=O();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`},[O,x,E]),V=g.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:k==="rtl"?"bottomRight":"bottomLeft",[x,k]),G=O("dropdown",o),te=Ro(G),[j,Q]=sM(G,te),[,le]=Cr(),fe=g.Children.only($I(i)?g.createElement("span",null,i):i),q=Hr(t,cr(fe)),oe=On(fe,{className:Y(`${G}-trigger`,{[`${G}-rtl`]:k==="rtl"},fe.props.className),disabled:fe.props.disabled??s,ref:q}),ie=s?[]:a,Ce=!!(ie!=null&&ie.includes("contextMenu")),[re,ne]=un(!1,h),se=Ke(W=>{m==null||m(W,{source:"trigger"}),ne(W)}),ye=Y(d,f,j,Q,te,D,F.root,{[`${G}-rtl`]:k==="rtl"}),ae=mx({arrowPointAtCenter:rn(r)&&r.pointAtCenter,autoAdjustOverflow:$,offset:le.marginXXS,arrowWidth:r?le.sizePopupArrow:0,borderRadius:le.borderRadius}),he=Ke(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),ne(!1))}),ce=()=>{const W=Yt(F,["root"]),K=Yt(R,["root"]);let ue;return n!=null&&n.items&&(ue=g.createElement(Mo,{...n,classNames:{...W,subMenu:{...W}},styles:{...K,subMenu:{...K}}})),B&&(ue=B(ue)),br(ue)?ue=g.createElement("span",null,ue):g.isValidElement(ue)||(ue=g.createElement(g.Fragment,null,ue)),g.createElement(KN,{prefixCls:`${G}-menu`,rootClassName:Y(Q,te),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:he,validator:({mode:be})=>{process.env.NODE_ENV!=="production"&&P(!be||be==="vertical","usage",`mode="${be}" is not supported for Dropdown's Menu.`)}},ue)},[Ne,$e]=Qu("Dropdown",X.zIndex);let Pe=g.createElement(hN,{alignPoint:Ce,...Yt(e,["rootClassName","onOpenChange"]),mouseEnterDelay:w,mouseLeaveDelay:y,visible:re,builtinPlacements:ae,arrow:!!r,overlayClassName:ye,prefixCls:G,getPopupContainer:u||N,transitionName:J,trigger:ie,overlay:ce,placement:V,onVisibleChange:se,overlayStyle:{...X,zIndex:Ne},autoDestroy:T??I},oe);return Ne&&(Pe=g.createElement(ss.Provider,{value:$e},Pe)),Pe}),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:C,inputFontSizeLG:v,inputFontSizeSM:I}=e,T=C||n,O=I||T,k=v||l,N=Math.round((t-T*r)/2*10)/10-o,D=Math.round((a-O*r)/2*10)/10-o,A=Math.ceil((s-k*c)/2*10)/10-o;return{lineWidthFocus:i===0?0:o,paddingBlock:Math.max(N,0),paddingBlockSM:Math.max(D,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:T,inputFontSizeLG:k,inputFontSizeSM:O}},uM=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),dd=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}))}}),zx=(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}}),em=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...zx(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":{...zx(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...dd(e)},...em(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...em(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarningAffix}),...t}}),tm=(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}},...tm(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...tm(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...dd(e)}}}}),Ox="&:focus-visible, &:has(input:focus-visible), &:has(textarea:focus-visible)",Dx=(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(", ")}),nm=(e,t)=>({"&, & input, & textarea":{color:t.color},[Ox]:Dx(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"},[Ox]:Dx(e,e.activeBorderColor),[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:nm(e,{color:e.colorError,affixColor:e.colorErrorAffix}),[`&${n}-status-warning`]:nm(e,{color:e.colorWarning,affixColor:e.colorWarningAffix}),...t}}},Lx=(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}}),rm=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Lx(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),mM=(e,t)=>({"&-filled":{...Lx(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...dd(e)},...rm(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorErrorAffix}),...rm(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarningAffix}),...t}}),om=(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"}},...om(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...om(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}`}}}}}),Fx=(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}}),im=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Fx(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":{...Fx(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"},...im(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorErrorAffix}),...im(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"}}),_x=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:`${xe(t)} ${xe(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},jx=e=>({padding:`${xe(e.paddingBlockSM)} ${xe(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Bx=(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":{..._x(e),...t.largeStyle},"&-sm":{...jx(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`]:{..._x(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...jx(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",...oc(),[`${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: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")]]},oM=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...ed({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...cx(e)}),iM=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[rM(i),nM(i)]},oM,{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:T}=e,{getPrefixCls:O,direction:k,getPopupContainer:N,className:D,style:A,classNames:M,styles:z}=Kn("dropdown"),L={...e,mouseEnterDelay:w,mouseLeaveDelay:y,autoAdjustOverflow:$},j=kt(A),H=kt(p),[F,R]=Pn([M,v],[z,j,C,H],{props:L}),X={...R.root},B=c||l,P=At("Dropdown");process.env.NODE_ENV!=="production"&&(Object.entries({dropdownRender:"popupRender",destroyPopupOnHide:"destroyOnHidden",overlayClassName:"classNames.root",overlayStyle:"styles.root"}).forEach(([K,ue])=>{P.deprecated(!(K in e),K,ue)}),x.includes("Center")&&P.deprecated(!x.includes("Center"),`placement: ${x}`,`placement: ${x.slice(0,x.indexOf("Center"))}`));const J=g.useMemo(()=>{const W=O();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`},[O,x,E]),V=g.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:k==="rtl"?"bottomRight":"bottomLeft",[x,k]),G=O("dropdown",o),te=Ro(G),[_,Q]=iM(G,te),[,le]=Cr(),fe=g.Children.only(SI(i)?g.createElement("span",null,i):i),q=Hr(t,cr(fe)),oe=Dn(fe,{className:Y(`${G}-trigger`,{[`${G}-rtl`]:k==="rtl"},fe.props.className),disabled:fe.props.disabled??s,ref:q}),ie=s?[]:a,Ce=!!(ie!=null&&ie.includes("contextMenu")),[ne,re]=un(!1,h),se=Ke(W=>{m==null||m(W,{source:"trigger"}),re(W)}),ye=Y(d,f,_,Q,te,D,F.root,{[`${G}-rtl`]:k==="rtl"}),ae=fx({arrowPointAtCenter:rn(r)&&r.pointAtCenter,autoAdjustOverflow:$,offset:le.marginXXS,arrowWidth:r?le.sizePopupArrow:0,borderRadius:le.borderRadius}),he=Ke(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),re(!1))}),ce=()=>{const W=Yt(F,["root"]),K=Yt(R,["root"]);let ue;return n!=null&&n.items&&(ue=g.createElement(Mo,{...n,classNames:{...W,subMenu:{...W}},styles:{...K,subMenu:{...K}}})),B&&(ue=B(ue)),br(ue)?ue=g.createElement("span",null,ue):g.isValidElement(ue)||(ue=g.createElement(g.Fragment,null,ue)),g.createElement(UN,{prefixCls:`${G}-menu`,rootClassName:Y(Q,te),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:he,validator:({mode:be})=>{process.env.NODE_ENV!=="production"&&P(!be||be==="vertical","usage",`mode="${be}" is not supported for Dropdown's Menu.`)}},ue)},[Ne,$e]=Ku("Dropdown",X.zIndex);let Pe=g.createElement(mN,{alignPoint:Ce,...Yt(e,["rootClassName","onOpenChange"]),mouseEnterDelay:w,mouseLeaveDelay:y,visible:ne,builtinPlacements:ae,arrow:!!r,overlayClassName:ye,prefixCls:G,getPopupContainer:u||N,transitionName:J,trigger:ie,overlay:ce,placement:V,onVisibleChange:se,overlayStyle:{...X,zIndex:Ne},autoDestroy:T??I},oe);return Ne&&(Pe=g.createElement(is.Provider,{value:$e},Pe)),Pe}),aM=FT($i,"align",void 0,"dropdown",e=>e),sM=e=>g.createElement(aM,{...e},g.createElement("span",null));$i._InternalPanelDoNotUseOrYouWillBeFired=sM;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,T=v||n,O=I||T,k=C||l,N=Math.round((t-T*r)/2*10)/10-o,D=Math.round((a-O*r)/2*10)/10-o,A=Math.ceil((s-k*c)/2*10)/10-o;return{lineWidthFocus:i===0?0:o,paddingBlock:Math.max(N,0),paddingBlockSM:Math.max(D,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:T,inputFontSizeLG:k,inputFontSizeSM:O}},lM=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])":{...lM(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}}),cM=(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}}}),uM=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}}),dM=(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}}}),fM=(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}}}),pM=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`}}),mM=(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}}),gM=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}`,...gM(e.colorTextPlaceholder),"&-lg":{...Lx(e),...t.largeStyle},"&-sm":{...Fx(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),hM=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},[`
|
|
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),...Bx(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,...Hu(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]:{...Bx(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}}}},Hx=on(["Input","Shared"],e=>{const t=yt(e,ki(e));return[yM(t),vM(t)]},Ii,{resetFont:!1}),Vx=on(["Input","Component"],e=>{const t=yt(e,ki(e));return[CM(t),SM(t),ed(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),ed(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),$=Y(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 am(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=am(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=am(t,e,r),n(o);return}n(o)}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 Wx=b.forwardRef((e,t)=>{var F,R,X;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:C,styles:v,components:I,onClear:T}=e,O=r??n,k=(I==null?void 0:I.affixWrapper)||"span",N=(I==null?void 0:I.groupWrapper)||"span",D=(I==null?void 0:I.wrapper)||"span",A=(I==null?void 0:I.groupAddon)||"span",M=b.useRef(null),z=B=>{var P;(P=M.current)!=null&&P.contains(B.target)&&(h==null||h())},L=RM(e);let _=b.cloneElement(O,{value:w,className:Y((F=O.props)==null?void 0:F.className,!L&&(E==null?void 0:E.variant))||null});const H=b.useRef(null);if(b.useImperativeHandle(t,()=>({nativeElement:H.current||M.current})),L){let B=null;if(m){const G=!d&&!f&&w&&!(typeof m=="object"&&m.disabled),te=`${o}-clear-icon`,j=typeof m=="object"&&(m!=null&&m.clearIcon)?m.clearIcon:"✖";B=b.createElement("button",{type:"button",onClick:Q=>{y==null||y(Q),T==null||T()},onMouseDown:Q=>Q.preventDefault(),className:Y(te,{[`${te}-hidden`]:!G,[`${te}-has-suffix`]:!!a},E==null?void 0:E.clear),style:v==null?void 0:v.clear},j)}const P=`${o}-affix-wrapper`,J=Y(P,{[`${o}-disabled`]:d,[`${P}-disabled`]:d,[`${P}-focused`]:p,[`${P}-readonly`]:f,[`${P}-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),V=(a||m)&&b.createElement("span",{className:Y(`${o}-suffix`,E==null?void 0:E.suffix),style:v==null?void 0:v.suffix},B,a);_=b.createElement(k,Wc({className:J,style:v==null?void 0:v.affixWrapper,onClick:z},C==null?void 0:C.affixWrapper,{ref:M}),i&&b.createElement("span",{className:Y(`${o}-prefix`,E==null?void 0:E.prefix),style:v==null?void 0:v.prefix},i),_,V)}if(IM(e)){const B=`${o}-group`,P=`${B}-addon`,J=`${B}-wrapper`,V=Y(`${o}-wrapper`,B,x==null?void 0:x.wrapper,E==null?void 0:E.wrapper),G=Y(J,{[`${J}-disabled`]:d},x==null?void 0:x.group,E==null?void 0:E.groupWrapper);_=b.createElement(N,{className:G,ref:H},b.createElement(D,{className:V},s&&b.createElement(A,{className:P},s),_,l&&b.createElement(A,{className:P},l)))}return b.cloneElement(_,{className:Y((R=_.props)==null?void 0:R.className,c)||null,style:{...(X=_.props)==null?void 0:X.style,...u},hidden:$})});function qx(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 Xx({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 Ux({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 Gx(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:C,onCompositionEnd:v,...I}=e,[T,O]=b.useState(!1),k=b.useRef(!1),N=b.useRef(!1),D=b.useRef(null),A=b.useRef(null),M=q=>{D.current&&eh(D.current,q)},{setValue:z,formatValue:L}=Gx(e.defaultValue,e.value),_=qx(w,m),{isOutOfRange:H,dataCount:F}=Xx({countConfig:_,value:L,maxLength:p}),R=Ux({countConfig:_,getTarget:()=>D.current});b.useImperativeHandle(t,()=>{var q;return{focus:M,blur:()=>{var oe;(oe=D.current)==null||oe.blur()},setSelectionRange:(oe,ie,Ce)=>{var re;(re=D.current)==null||re.setSelectionRange(oe,ie,Ce)},select:()=>{var oe;(oe=D.current)==null||oe.select()},input:D.current,nativeElement:((q=A.current)==null?void 0:q.nativeElement)||D.current}}),b.useEffect(()=>{N.current&&(N.current=!1),O(q=>q&&u?!1:q)},[u]);const X=(q,oe,ie)=>{const Ce=R(oe,k.current);ie.source==="compositionEnd"&&oe===Ce||(z(Ce),D.current&&Fa(D.current,q,r,Ce))},B=q=>{X(q,q.target.value,{source:"change"})},P=q=>{k.current=!1,X(q,q.currentTarget.value,{source:"compositionEnd"}),v==null||v(q)},J=q=>{a&&q.key==="Enter"&&!N.current&&!q.nativeEvent.isComposing&&(N.current=!0,a(q)),s==null||s(q)},V=q=>{q.key==="Enter"&&(N.current=!1),l==null||l(q)},G=q=>{O(!0),o==null||o(q)},te=q=>{N.current&&(N.current=!1),O(!1),i==null||i(q)},j=q=>{z(""),M(),D.current&&Fa(D.current,q,r)},Q=H&&`${c}-out-of-range`,le=()=>{const q=Yt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return b.createElement("input",_a({autoComplete:n},q,{onChange:B,onFocus:G,onBlur:te,onKeyDown:J,onKeyUp:V,className:Y(c,{[`${c}-disabled`]:u},x==null?void 0:x.input),style:E==null?void 0:E.input,ref:D,size:d,type:y,onCompositionStart:oe=>{k.current=!0,C==null||C(oe)},onCompositionEnd:P}))},fe=()=>h||_.show?b.createElement(b.Fragment,null,_.show&&b.createElement("span",{className:Y(`${c}-show-count-suffix`,{[`${c}-show-count-has-suffix`]:!!h},x==null?void 0:x.count),style:{...E==null?void 0:E.count}},F),h):null;return b.createElement(Wx,_a({},I,{prefixCls:c,className:Y(f,Q),handleReset:j,value:L,focused:T,triggerFocus:M,suffix:fe(),disabled:u,classes:$,classNames:x,styles:E,ref:A}),le())}),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`]:{}}}}},bM=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),...cM(e),...fM(e),...dM(e),...mM(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"}}}},xM=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)}`}}}},yM=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}}},...xM(e)},[`${t}-underlined`]:{borderRadius:0},[l]:{[`${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},wM=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...Io(e),...hM(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}},...uM(e),...pM(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}}}}}},vM=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[bM(t),yM(t)]},Ii,{resetFont:!1}),Bx=on(["Input","Component"],e=>{const t=yt(e,ki(e));return[wM(t),vM(t),Zu(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},Ii,{resetFont:!1}),CM=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}}]}},SM=on("Addon",e=>[CM(e),Zu(e,{focus:!1})]),EM=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]=SM(f),{compactItemClassnames:m,compactSize:w}=To(f,d),y=Na(f,l),$=Y(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 $M(e){return!!(e.addonBefore||e.addonAfter)}function kM(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 F,R,X;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:T}=e,O=r??n,k=(I==null?void 0:I.affixWrapper)||"span",N=(I==null?void 0:I.groupWrapper)||"span",D=(I==null?void 0:I.wrapper)||"span",A=(I==null?void 0:I.groupAddon)||"span",M=b.useRef(null),z=B=>{var P;(P=M.current)!=null&&P.contains(B.target)&&(h==null||h())},L=kM(e);let j=b.cloneElement(O,{value:w,className:Y((F=O.props)==null?void 0:F.className,!L&&(E==null?void 0:E.variant))||null});const H=b.useRef(null);if(b.useImperativeHandle(t,()=>({nativeElement:H.current||M.current})),L){let B=null;if(m){const G=!d&&!f&&w&&!(typeof m=="object"&&m.disabled),te=`${o}-clear-icon`,_=typeof m=="object"&&(m!=null&&m.clearIcon)?m.clearIcon:"✖";B=b.createElement("button",{type:"button",onClick:Q=>{y==null||y(Q),T==null||T()},onMouseDown:Q=>Q.preventDefault(),className:Y(te,{[`${te}-hidden`]:!G,[`${te}-has-suffix`]:!!a},E==null?void 0:E.clear),style:C==null?void 0:C.clear},_)}const P=`${o}-affix-wrapper`,J=Y(P,{[`${o}-disabled`]:d,[`${P}-disabled`]:d,[`${P}-focused`]:p,[`${P}-readonly`]:f,[`${P}-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),V=(a||m)&&b.createElement("span",{className:Y(`${o}-suffix`,E==null?void 0:E.suffix),style:C==null?void 0:C.suffix},B,a);j=b.createElement(k,Hc({className:J,style:C==null?void 0:C.affixWrapper,onClick:z},v==null?void 0:v.affixWrapper,{ref:M}),i&&b.createElement("span",{className:Y(`${o}-prefix`,E==null?void 0:E.prefix),style:C==null?void 0:C.prefix},i),j,V)}if($M(e)){const B=`${o}-group`,P=`${B}-addon`,J=`${B}-wrapper`,V=Y(`${o}-wrapper`,B,x==null?void 0:x.wrapper,E==null?void 0:E.wrapper),G=Y(J,{[`${J}-disabled`]:d},x==null?void 0:x.group,E==null?void 0:E.groupWrapper);j=b.createElement(N,{className:G,ref:H},b.createElement(D,{className:V},s&&b.createElement(A,{className:P},s),j,l&&b.createElement(A,{className:P},l)))}return b.cloneElement(j,{className:Y((R=j.props)==null?void 0:R.className,c)||null,style:{...(X=j.props)==null?void 0:X.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 IM=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,[T,O]=b.useState(!1),k=b.useRef(!1),N=b.useRef(!1),D=b.useRef(null),A=b.useRef(null),M=q=>{D.current&&Zg(D.current,q)},{setValue:z,formatValue:L}=Xx(e.defaultValue,e.value),j=Vx(w,m),{isOutOfRange:H,dataCount:F}=Wx({countConfig:j,value:L,maxLength:p}),R=qx({countConfig:j,getTarget:()=>D.current});b.useImperativeHandle(t,()=>{var q;return{focus:M,blur:()=>{var oe;(oe=D.current)==null||oe.blur()},setSelectionRange:(oe,ie,Ce)=>{var ne;(ne=D.current)==null||ne.setSelectionRange(oe,ie,Ce)},select:()=>{var oe;(oe=D.current)==null||oe.select()},input:D.current,nativeElement:((q=A.current)==null?void 0:q.nativeElement)||D.current}}),b.useEffect(()=>{N.current&&(N.current=!1),O(q=>q&&u?!1:q)},[u]);const X=(q,oe,ie)=>{const Ce=R(oe,k.current);ie.source==="compositionEnd"&&oe===Ce||(z(Ce),D.current&&Fa(D.current,q,r,Ce))},B=q=>{X(q,q.target.value,{source:"change"})},P=q=>{k.current=!1,X(q,q.currentTarget.value,{source:"compositionEnd"}),C==null||C(q)},J=q=>{a&&q.key==="Enter"&&!N.current&&!q.nativeEvent.isComposing&&(N.current=!0,a(q)),s==null||s(q)},V=q=>{q.key==="Enter"&&(N.current=!1),l==null||l(q)},G=q=>{O(!0),o==null||o(q)},te=q=>{N.current&&(N.current=!1),O(!1),i==null||i(q)},_=q=>{z(""),M(),D.current&&Fa(D.current,q,r)},Q=H&&`${c}-out-of-range`,le=()=>{const q=Yt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return b.createElement("input",_a({autoComplete:n},q,{onChange:B,onFocus:G,onBlur:te,onKeyDown:J,onKeyUp:V,className:Y(c,{[`${c}-disabled`]:u},x==null?void 0:x.input),style:E==null?void 0:E.input,ref:D,size:d,type:y,onCompositionStart:oe=>{k.current=!0,v==null||v(oe)},onCompositionEnd:P}))},fe=()=>h||j.show?b.createElement(b.Fragment,null,j.show&&b.createElement("span",{className:Y(`${c}-show-count-suffix`,{[`${c}-show-count-has-suffix`]:!!h},x==null?void 0:x.count),style:{...E==null?void 0:E.count}},F),h):null;return b.createElement(Hx,_a({},I,{prefixCls:c,className:Y(f,Q),handleReset:_,value:L,focused:T,triggerFocus:M,suffix:fe(),disabled:u,classes:$,classNames:x,styles:E,ref:A}),le())}),RM=`
|
|
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"],sl={};let gn;function MM(e,t=!1){const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&sl[n])return sl[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&&(sl[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 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 ll=0,cl=1,ul=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=z=>{h(z.target.value),u==null||u(z)},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,[C,v]=g.useState(ul),[I,T]=g.useState(),O=()=>{v(ll),process.env.NODE_ENV==="test"&&(d==null||d())};Bt(()=>{E&&O()},[o,$,x,E]),Bt(()=>{if(C===ll)v(cl);else if(C===cl){const z=AM(y.current,!1,$,x);v(ul),T(z)}},[C]);const k=g.useRef(void 0),N=()=>{k.current!==void 0&&xt.cancel(k.current)},D=z=>{C===ul&&(a==null||a(z),i&&(N(),k.current=xt(()=>{O()})))};g.useEffect(()=>N,[]);const M={...l,...E?I:null};return(C===ll||C===cl)&&(M.overflowY="hidden",M.overflowX="hidden"),g.createElement(ko,{onResize:D,disabled:!(i||a)},g.createElement("textarea",qc({},f,{ref:y,style:M,className:Y(n,s,{[`${n}-disabled`]:c}),disabled:c,value:m,onChange:w})))});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 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:C,readOnly:v,autoSize:I,onKeyDown:T,...O},k)=>{const[N,D]=b.useState(!1),A=b.useRef(!1),[M,z]=b.useState(null),L=b.useRef(null),_=b.useRef(null),H=()=>{var ne;return((ne=_.current)==null?void 0:ne.textArea)||null},{setValue:F,formatValue:R}=Gx(e,t),X=qx(f,d),{isOutOfRange:B,dataCount:P}=Xx({countConfig:X,value:R,maxLength:a}),J=Ux({countConfig:X,getTarget:()=>{var ne;return((ne=_.current)==null?void 0:ne.textArea)||null}}),V=()=>{var ne;(ne=H())==null||ne.focus()};b.useImperativeHandle(k,()=>{var ne;return{resizableTextArea:_.current,focus:V,blur:()=>{var se;(se=H())==null||se.blur()},nativeElement:((ne=L.current)==null?void 0:ne.nativeElement)||H()}}),b.useEffect(()=>{D(ne=>!m&&ne)},[m]);const G=(ne,se)=>{const ye=J(se,A.current);F(ye),Fa(ne.currentTarget,ne,o,ye)},te=ne=>{A.current=!0,s==null||s(ne)},j=ne=>{A.current=!1,G(ne,ne.currentTarget.value),l==null||l(ne)},Q=ne=>{G(ne,ne.target.value)},le=ne=>{ne.key==="Enter"&&C&&!ne.nativeEvent.isComposing&&C(ne),T==null||T(ne)},fe=ne=>{D(!0),n==null||n(ne)},q=ne=>{D(!1),r==null||r(ne)},oe=ne=>{F(""),V();const se=H();se&&Fa(se,ne,o)};let ie=c;X.show&&(ie=b.createElement(b.Fragment,null,ie,b.createElement("span",{className:Y(`${u}-data-count`,y==null?void 0:y.count),style:$==null?void 0:$.count},P)));const Ce=ne=>{var se;x==null||x(ne),(se=H())!=null&&se.style.height&&z(!0)},re=!I&&!d&&!i;return b.createElement(Wx,{ref:L,value:R,allowClear:i,handleReset:oe,suffix:ie,prefixCls:u,classNames:{...y,affixWrapper:Y(y==null?void 0:y.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:i})},disabled:m,focused:N,className:Y(p,B&&`${u}-out-of-range`),style:{...h,...M&&!re?{height:"auto"}:{}},dataAttrs:typeof P=="string"?{affixWrapper:{"data-count":P}}:void 0,styles:$,hidden:w,readOnly:v,onClear:E},b.createElement(zM,Xc({},O,{autoSize:I,maxLength:a,onKeyDown:le,onChange:Q,onFocus:fe,onBlur:q,onCompositionStart:te,onCompositionEnd:j,className:Y(y==null?void 0:y.textarea),style:{resize:h==null?void 0:h.resize,...$==null?void 0:$.textarea},disabled:m,prefixCls:u,onResize:Ce,ref:_,readOnly:v})))});function Kx(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:ce}=At("Input");[["bordered","variant"],["addonAfter","Space.Compact"],["addonBefore","Space.Compact"]].forEach(([Ne,$e])=>{ce(!(Ne in e),Ne,$e)})}const{getPrefixCls:C,direction:v,allowClear:I,autoComplete:T,className:O,style:k,classNames:N,styles:D}=Kn("input"),A=C("input",n),M=b.useRef(null),z=Ro(A),[L,_]=Hx(A,w);Vx(A,z);const{compactSize:H,compactItemClassnames:F}=To(A,v),R=Po(ce=>i??H??ce),X=b.useContext(yr),B=a??X,P={...e,size:R,disabled:B},J=kt(k),V=kt(h),[G,te]=Pn([N,$],[D,J,m,V],{props:P}),{status:j,hasFeedback:Q,feedbackIcon:le}=b.useContext(sr),fe=td(j,o),q=DM(e)||!!Q,oe=b.useRef(q);if(process.env.NODE_ENV!=="production"){const ce=At("Input");b.useEffect(()=>{var Ne;q&&!oe.current&&process.env.NODE_ENV!=="production"&&ce(document.activeElement===((Ne=M.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"),oe.current=q},[q])}const ie=Kx(M,!0),Ce=ce=>{ie(),s==null||s(ce)},re=ce=>{ie(),l==null||l(ce)},ne=ce=>{ie(),y==null||y(ce)},se=(Q||c)&&b.createElement(b.Fragment,null,c,Q&&le),ye=Tb({allowClear:u,contextAllowClear:I,componentName:"Input"}),[ae,he]=wo("input",x,r);return b.createElement(PM,{ref:Gn(t,M),prefixCls:A,autoComplete:T,...E,disabled:B,onBlur:Ce,onFocus:re,style:te.root,styles:te,suffix:se,allowClear:ye,className:Y(p,w,_,z,F,O,G.root),onChange:ne,addonBefore:f&&b.createElement(Pa,{form:!0,space:!0},f),addonAfter:d&&b.createElement(Pa,{form:!0,space:!0},d),classNames:{...G,input:Y({[`${A}-sm`]:R==="small",[`${A}-lg`]:R==="large",[`${A}-rtl`]:v==="rtl"},G.input,L),variant:Y({[`${A}-${ae}`]:he},Na(A,fe)),affixWrapper:Y({[`${A}-affix-wrapper-sm`]:R==="small",[`${A}-affix-wrapper-lg`]:R==="large",[`${A}-affix-wrapper-rtl`]:v==="rtl"},L),wrapper:Y({[`${A}-group-rtl`]:v==="rtl"},L),groupWrapper:Y({[`${A}-group-wrapper-sm`]:R==="small",[`${A}-group-wrapper-lg`]:R==="large",[`${A}-group-wrapper-rtl`]:v==="rtl",[`${A}-group-wrapper-${ae}`]:he},Na(`${A}-group-wrapper`,fe,Q),L)}})});process.env.NODE_ENV!=="production"&&(Ri.displayName="Input");function ja(e){return["small","middle","medium","large"].includes(e)}function sm(e){return e?rs(e):!1}const Yx=b.createContext({latestIndex:0}),LM=Yx.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(Yx);return xi(o)?g.createElement(g.Fragment,null,g.createElement("div",{className:t,style:a},o),r<c&&i&&g.createElement("span",{className:Y(`${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:C=!1,classNames:v,styles:I,...T}=e,[O,k]=Array.isArray(c)?c:[c,c],N=ja(k),D=ja(O),A=sm(k),M=sm(O),z=or(p,{keepEmpty:!0}),[L,_]=Yu(m,E,h),H=u===void 0&&!_?"center":u,F=$??y,R=n("space",w),[X,B]=BM(R),P={...e,size:c,orientation:L,align:H},J=kt(a),V=kt(x),[G,te]=Pn([s,v],[l,J,I,V],{props:P}),j=Y(R,i,X,`${R}-${L}`,{[`${R}-rtl`]:r==="rtl",[`${R}-align-${H}`]:H,[`${R}-gap-row-${k}`]:N,[`${R}-gap-col-${O}`]:D},d,f,B,G.root),Q=Y(`${R}-item`,G.item),le=z.map((oe,ie)=>{const Ce=(oe==null?void 0:oe.key)||`${Q}-${ie}`;return g.createElement(FM,{prefix:R,classNames:G,styles:te,className:Q,key:Ce,index:ie,separator:F,style:te.item},oe)});if(process.env.NODE_ENV!=="production"){const oe=At("Space");[["direction","orientation"],["split","separator"]].forEach(([ie,Ce])=>{oe.deprecated(!(ie in e),ie,Ce)})}const fe=g.useMemo(()=>({latestIndex:z.reduce((ie,Ce,re)=>xi(Ce)?re:ie,0)}),[z]);if(z.length===0)return null;const q={};return C&&(q.flexWrap="wrap"),!D&&M&&(q.columnGap=O),!N&&A&&(q.rowGap=k),g.createElement("div",{ref:t,className:j,style:{...q,...te.root},...T},g.createElement(LM,{value:fe},le))}),Pi=HM;Pi.Compact=zb;Pi.Addon=kM;process.env.NODE_ENV!=="production"&&(Pi.displayName="Space");const Qx=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:C,href:v,icon:I=g.createElement(ud,null),title:T,buttonsRender:O=le=>le,mouseEnterDelay:k,mouseLeaveDelay:N,overlayClassName:D,overlayStyle:A,destroyOnHidden:M,destroyPopupOnHide:z,dropdownRender:L,popupRender:_,...H}=e,F=n("dropdown",o),R=`${F}-button`,B={menu:p,arrow:h,autoFocus:m,align:y,disabled:s,trigger:s?[]:w,onOpenChange:x,getPopupContainer:C||t,mouseEnterDelay:k,mouseLeaveDelay:N,classNames:{root:D},styles:{root:A},destroyOnHidden:M,popupRender:_||L},{compactSize:P,compactItemClassnames:J}=To(F,r),V=Y(R,J,f);"destroyPopupOnHide"in e&&(B.destroyPopupOnHide=z),"open"in e&&(B.open=$),"placement"in e?B.placement=E:B.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:v,title:T},d),te=g.createElement(ar,{type:i,danger:a,icon:I}),[j,Q]=O([G,te]);return g.createElement(Pi.Compact,{className:V,size:P,block:!0,...H},j,g.createElement($i,{...B},Q))};Qx.__ANT_BUTTON=!0;const Zx=$i;Zx.Button=Qx;const Jx=["wrap","nowrap","wrap-reverse"],e0=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],t0=["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&&Jx.includes(n)}},WM=(e,t)=>{const n={};return t0.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},qM=(e,t)=>{const n={};return e0.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n},XM=(e,t)=>Y({...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 Jx.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r}}),n},YM=e=>{const{componentCls:t}=e,n={};return t0.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r}}),n},QM=e=>{const{componentCls:t}=e,n={};return e0.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}),n0=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]=Yu(c,l??(p==null?void 0:p.vertical)),E=Y(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}),C={...p==null?void 0:p.style,...i};return Nl(a)&&(C.flex=a),Nl(s)&&!ja(s)&&(C.gap=s),b.createElement(u,{ref:t,className:E,style:C,...Yt(f,["justify","wrap","align"])},d)});process.env.NODE_ENV!=="production"&&(n0.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]=Vx(a),c=Y(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:C,metaKey:v}=x;E==="ArrowLeft"?i(a-1):E==="ArrowRight"?i(a+1):E==="z"&&(C||v)?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:Y(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:Y(`${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:C,className:v,style:I,...T}=e;if(process.env.NODE_ENV!=="production"){const ae=At("Input.OTP");process.env.NODE_ENV!=="production"&&ae(!(typeof h=="string"&&h.length>1),"usage","`mask` prop should be a single character.")}const{classNames:O,styles:k,getPrefixCls:N,direction:D,style:A,className:M}=Kn("otp"),z=N("otp",n),[L]=wo("otp",u,void 0,"input"),_={...e,length:r,variant:L},H=kt(A),F=kt(I),[R,X]=Pn([O,E],[k,H,C,F],{props:_}),B=rh(T,{aria:!0,data:!0,attr:!0}),[P,J]=nA(z),V=Po(ae=>o??ae),G=g.useContext(sr),te=td(G.status,f),j=g.useMemo(()=>({...G,status:te,hasFeedback:!1,feedbackIcon:null}),[G,te]),Q=g.useRef(null),le=g.useRef({});g.useImperativeHandle(t,()=>({focus:()=>{var ae;(ae=le.current[0])==null||ae.focus()},blur:()=>{var ae;for(let he=0;he<r;he+=1)(ae=le.current[he])==null||ae.blur()},nativeElement:Q.current}));const fe=ae=>l?l(ae):ae,[q,oe]=g.useState(()=>Yi(fe(i||"")));g.useEffect(()=>{a!==void 0&&oe(Yi(a))},[a]);const ie=Ke(ae=>{oe(ae),y&&y(ae),s&&ae.length===r&&ae.every(he=>he)&&ae.some((he,ce)=>q[ce]!==he)&&s(ae.join(""))}),Ce=Ke((ae,he)=>{let ce=jr(q);for(let $e=0;$e<ae;$e+=1)ce[$e]||(ce[$e]="");he.length<=1?ce[ae]=he:ce=ce.slice(0,ae).concat(Yi(he)),ce=ce.slice(0,r);for(let $e=ce.length-1;$e>=0&&!ce[$e];$e-=1)ce.pop();const Ne=fe(ce.map($e=>$e||" ").join(""));return ce=Yi(Ne).map(($e,Pe)=>$e===" "&&!ce[Pe]?ce[Pe]:$e),ce}),re=(ae,he)=>{var $e;const ce=Ce(ae,he),Ne=Math.min(ae+he.length,r-1);Ne!==ae&&ce[ae]!==void 0&&(($e=le.current[Ne])==null||$e.focus()),ie(ce)},ne=ae=>{var he;(he=le.current[ae])==null||he.focus()},se=(ae,he)=>{var ce,Ne,$e;for(let Pe=0;Pe<he;Pe+=1)if(!((Ne=(ce=le.current[Pe])==null?void 0:ce.input)!=null&&Ne.value)){($e=le.current[Pe])==null||$e.focus();break}$==null||$(ae)},ye={variant:L,disabled:d,status:te,mask:h,type:m,inputMode:x,autoComplete:w};return g.createElement("div",{...B,ref:Q,className:Y(v,z,{[`${z}-sm`]:V==="small",[`${z}-lg`]:V==="large",[`${z}-rtl`]:D==="rtl"},J,P,M,R.root),style:X.root,role:"group"},g.createElement(sr.Provider,{value:j},Array.from({length:r}).map((ae,he)=>{const ce=`otp-${he}`,Ne=q[he]||"";return g.createElement(g.Fragment,{key:ce},g.createElement(oA,{ref:$e=>{le.current[he]=$e},index:he,size:V,htmlSize:1,className:Y(R.input,`${z}-input`),style:X.input,onChange:re,value:Ne,onActiveChange:ne,autoFocus:he===0&&p,onFocus:$e=>se($e,he),...ye}),he<r-1&&g.createElement(iA,{separator:c,index:he,prefixCls:z,className:Y(R.separator),style:X.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 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 lA=(e,t)=>g.createElement(Jt,Uc({},e,{ref:t,icon:sA})),r0=g.forwardRef(lA);process.env.NODE_ENV!=="production"&&(r0.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 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 uA=(e,t)=>g.createElement(Jt,Gc({},e,{ref:t,icon:cA})),o0=g.forwardRef(uA);process.env.NODE_ENV!=="production"&&(o0.displayName="EyeOutlined");const dA=e=>e?g.createElement(o0,null):g.createElement(r0,null),fA={click:"onClick",hover:"onMouseOver"},i0=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"),[C]=wo("inputPassword",p,e.bordered,"input"),[v]=zI("global"),I=g.useContext(yr),T=n??I,O={...e,disabled:T,variant:C},k=kt(y),N=kt(u),[D,A]=Pn([$,d],[x,k,f,N],{props:O}),M=rn(o)&&o.visible!==void 0,[z,L]=b.useState(()=>M?o.visible:!1),_=b.useRef(null);g.useEffect(()=>{M&&L(o.visible)},[M,o]);const H=Kx(_),F=()=>{var te;if(T)return;z&&H();const G=!z;M||L(G),rn(o)&&((te=o.onVisibleChange)==null||te.call(o,G))},R=G=>{const te=fA[r]||"",Q=(i||E||dA)(z),le=rn(o)?o.tabIndex:void 0;return g.createElement("span",{key:"passwordIcon",role:"button",tabIndex:T?-1:le??0,className:`${G}-icon`,"aria-disabled":T,"aria-pressed":z,"aria-label":z?v.hide:v.show,onMouseDown:fe=>{fe.preventDefault()},onMouseUp:fe=>{fe.preventDefault()},onKeyDown:fe=>{(fe.key==="Enter"||fe.key===" ")&&(fe.preventDefault(),fe.repeat||F())},[te]:F},Q)},X=m("input",s),B=m("input-password",a),P=o&&R(B),J=Y(B,w,c,{[`${B}-${e.size}`]:!!e.size}),V={...h,type:z?"text":"password",prefixCls:X,suffix:g.createElement(g.Fragment,null,P,l),disabled:T,className:J,classNames:D,styles:A,variant:C};return g.createElement(Ri,{ref:Gn(t,_),...V})});process.env.NODE_ENV!=="production"&&(i0.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),a0=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,...C}=e,{direction:v,getPrefixCls:I,className:T,style:O,classNames:k,styles:N,searchIcon:D}=Kn("inputSearch"),A=g.useContext(yr),M=d??A,[z,,L]=wo("inputSearch",w,e.bordered),_=L?z:void 0,[H]=wo("inputSearch",w,e.bordered,"input"),F={...e,enterButton:s,variant:_},R=kt(O),X=kt(a),[B,P]=Pn([k,$],[N,R,x,X],{props:F},{button:{_default:"root"}}),J=g.useRef(!1),V=I("input-search",n),G=I("input",r),[te,j]=mA(V),{compactSize:Q}=To(V,v),le=Po(K=>i??Q??K),fe=g.useRef(null),q=K=>{K!=null&&K.target&&K.type==="click"&&f&&f(K.target.value,K,{source:"clear"}),p==null||p(K)},oe=K=>{var ue;document.activeElement===((ue=fe.current)==null?void 0:ue.input)&&K.preventDefault()},ie=K=>{var ue,be;f&&f((be=(ue=fe.current)==null?void 0:ue.input)==null?void 0:be.value,K,{source:"input"})},Ce=K=>{J.current||u||(y==null||y(K),ie(K))},re=typeof s=="boolean"?Pb(l,D,g.createElement(cx,null)):null,ne=`${V}-btn`,se=Y(ne,{[`${ne}-${_}`]:_});let ye;const ae=s||{},he=ae.type&&ae.type.__ANT_BUTTON===!0;if(he||ae.type==="button"){const K=ae.props;ye=On(ae,{disabled:M||K.disabled||!he&&u,onMouseDown:ue=>{var be;(be=K.onMouseDown)==null||be.call(K,ue),oe(ue)},onClick:ue=>{var be,Se;(Se=(be=ae==null?void 0:ae.props)==null?void 0:be.onClick)==null||Se.call(be,ue),ie(ue)},key:"enterButton",...he?{className:Y(se,K.className),loading:u||K.loading,size:le}:{}})}else ye=g.createElement(ar,{classNames:B.button,styles:P.button,className:se,color:s?"primary":"default",size:le,disabled:d,key:"enterButton",onMouseDown:oe,onClick:ie,loading:u,icon:re,variant:_==="borderless"||_==="filled"||_==="underlined"?"text":s?"solid":void 0},s);c&&(ye=[ye,On(c,{key:"addonAfter"})]);const ce=Y(V,j,{[`${V}-rtl`]:v==="rtl",[`${V}-${le}`]:!!le,[`${V}-with-button`]:!!s},o,T,te,B.root),Ne=K=>{J.current=!0,h==null||h(K)},$e=K=>{J.current=!1,m==null||m(K)},Pe=rh(C,{data:!0}),W=Yt({...C,classNames:Yt(B,["button","root"]),styles:Yt(P,["button","root"]),prefixCls:G,type:"search",size:le,variant:H,onPressEnter:Ce,onCompositionStart:Ne,onCompositionEnd:$e,onChange:q,disabled:d},Object.keys(Pe));return g.createElement(zb,{className:ce,style:P.root,...Pe,hidden:E},g.createElement(Ri,{ref:Gn(fe,t),...W}),ye)});process.env.NODE_ENV!=="production"&&(a0.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
|
+
`,PM=["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 TM(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:PM.map(c=>`${c}:${r.getPropertyValue(c)}`).join(";"),paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(il[n]=l),l}function NM(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}=TM(e,t);gn.setAttribute("style",`${s};${RM}`),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,MM=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=z=>{h(z.target.value),u==null||u(z)},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,T]=g.useState(),O=()=>{C(al),process.env.NODE_ENV==="test"&&(d==null||d())};Bt(()=>{E&&O()},[o,$,x,E]),Bt(()=>{if(v===al)C(sl);else if(v===sl){const z=NM(y.current,!1,$,x);C(ll),T(z)}},[v]);const k=g.useRef(void 0),N=()=>{k.current!==void 0&&xt.cancel(k.current)},D=z=>{v===ll&&(a==null||a(z),i&&(N(),k.current=xt(()=>{O()})))};g.useEffect(()=>N,[]);const M={...l,...E?I:null};return(v===al||v===sl)&&(M.overflowY="hidden",M.overflowX="hidden"),g.createElement(ko,{onResize:D,disabled:!(i||a)},g.createElement("textarea",Vc({},f,{ref:y,style:M,className:Y(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 AM=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:T,...O},k)=>{const[N,D]=b.useState(!1),A=b.useRef(!1),[M,z]=b.useState(null),L=b.useRef(null),j=b.useRef(null),H=()=>{var re;return((re=j.current)==null?void 0:re.textArea)||null},{setValue:F,formatValue:R}=Xx(e,t),X=Vx(f,d),{isOutOfRange:B,dataCount:P}=Wx({countConfig:X,value:R,maxLength:a}),J=qx({countConfig:X,getTarget:()=>{var re;return((re=j.current)==null?void 0:re.textArea)||null}}),V=()=>{var re;(re=H())==null||re.focus()};b.useImperativeHandle(k,()=>{var re;return{resizableTextArea:j.current,focus:V,blur:()=>{var se;(se=H())==null||se.blur()},nativeElement:((re=L.current)==null?void 0:re.nativeElement)||H()}}),b.useEffect(()=>{D(re=>!m&&re)},[m]);const G=(re,se)=>{const ye=J(se,A.current);F(ye),Fa(re.currentTarget,re,o,ye)},te=re=>{A.current=!0,s==null||s(re)},_=re=>{A.current=!1,G(re,re.currentTarget.value),l==null||l(re)},Q=re=>{G(re,re.target.value)},le=re=>{re.key==="Enter"&&v&&!re.nativeEvent.isComposing&&v(re),T==null||T(re)},fe=re=>{D(!0),n==null||n(re)},q=re=>{D(!1),r==null||r(re)},oe=re=>{F(""),V();const se=H();se&&Fa(se,re,o)};let ie=c;X.show&&(ie=b.createElement(b.Fragment,null,ie,b.createElement("span",{className:Y(`${u}-data-count`,y==null?void 0:y.count),style:$==null?void 0:$.count},P)));const Ce=re=>{var se;x==null||x(re),(se=H())!=null&&se.style.height&&z(!0)},ne=!I&&!d&&!i;return b.createElement(Hx,{ref:L,value:R,allowClear:i,handleReset:oe,suffix:ie,prefixCls:u,classNames:{...y,affixWrapper:Y(y==null?void 0:y.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:i})},disabled:m,focused:N,className:Y(p,B&&`${u}-out-of-range`),style:{...h,...M&&!ne?{height:"auto"}:{}},dataAttrs:typeof P=="string"?{affixWrapper:{"data-count":P}}:void 0,styles:$,hidden:w,readOnly:C,onClear:E},b.createElement(MM,Wc({},O,{autoSize:I,maxLength:a,onKeyDown:le,onChange:Q,onFocus:fe,onBlur:q,onCompositionStart:te,onCompositionEnd:_,className:Y(y==null?void 0:y.textarea),style:{resize:h==null?void 0:h.resize,...$==null?void 0:$.textarea},disabled:m,prefixCls:u,onResize:Ce,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 zM(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:ce}=At("Input");[["bordered","variant"],["addonAfter","Space.Compact"],["addonBefore","Space.Compact"]].forEach(([Ne,$e])=>{ce(!(Ne in e),Ne,$e)})}const{getPrefixCls:v,direction:C,allowClear:I,autoComplete:T,className:O,style:k,classNames:N,styles:D}=Kn("input"),A=v("input",n),M=b.useRef(null),z=Ro(A),[L,j]=jx(A,w);Bx(A,z);const{compactSize:H,compactItemClassnames:F}=To(A,C),R=Po(ce=>i??H??ce),X=b.useContext(yr),B=a??X,P={...e,size:R,disabled:B},J=kt(k),V=kt(h),[G,te]=Pn([N,$],[D,J,m,V],{props:P}),{status:_,hasFeedback:Q,feedbackIcon:le}=b.useContext(sr),fe=Ju(_,o),q=zM(e)||!!Q,oe=b.useRef(q);if(process.env.NODE_ENV!=="production"){const ce=At("Input");b.useEffect(()=>{var Ne;q&&!oe.current&&process.env.NODE_ENV!=="production"&&ce(document.activeElement===((Ne=M.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"),oe.current=q},[q])}const ie=Ux(M,!0),Ce=ce=>{ie(),s==null||s(ce)},ne=ce=>{ie(),l==null||l(ce)},re=ce=>{ie(),y==null||y(ce)},se=(Q||c)&&b.createElement(b.Fragment,null,c,Q&&le),ye=Rb({allowClear:u,contextAllowClear:I,componentName:"Input"}),[ae,he]=wo("input",x,r);return b.createElement(IM,{ref:Gn(t,M),prefixCls:A,autoComplete:T,...E,disabled:B,onBlur:Ce,onFocus:ne,style:te.root,styles:te,suffix:se,allowClear:ye,className:Y(p,w,j,z,F,O,G.root),onChange:re,addonBefore:f&&b.createElement(Pa,{form:!0,space:!0},f),addonAfter:d&&b.createElement(Pa,{form:!0,space:!0},d),classNames:{...G,input:Y({[`${A}-sm`]:R==="small",[`${A}-lg`]:R==="large",[`${A}-rtl`]:C==="rtl"},G.input,L),variant:Y({[`${A}-${ae}`]:he},Na(A,fe)),affixWrapper:Y({[`${A}-affix-wrapper-sm`]:R==="small",[`${A}-affix-wrapper-lg`]:R==="large",[`${A}-affix-wrapper-rtl`]:C==="rtl"},L),wrapper:Y({[`${A}-group-rtl`]:C==="rtl"},L),groupWrapper:Y({[`${A}-group-wrapper-sm`]:R==="small",[`${A}-group-wrapper-lg`]:R==="large",[`${A}-group-wrapper-rtl`]:C==="rtl",[`${A}-group-wrapper-${ae}`]:he},Na(`${A}-group-wrapper`,fe,Q),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}),OM=Gx.Provider,DM=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:Y(`${n}-item-separator`,s==null?void 0:s.separator),style:l==null?void 0:l.separator},i)):null},LM=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"}}}},FM=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}}}},_M=on("Space",e=>{const t=yt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[LM(t),FM(t)]},()=>({}),{resetStyle:!1}),jM=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,...T}=e,[O,k]=Array.isArray(c)?c:[c,c],N=ja(k),D=ja(O),A=im(k),M=im(O),z=or(p,{keepEmpty:!0}),[L,j]=Gu(m,E,h),H=u===void 0&&!j?"center":u,F=$??y,R=n("space",w),[X,B]=_M(R),P={...e,size:c,orientation:L,align:H},J=kt(a),V=kt(x),[G,te]=Pn([s,C],[l,J,I,V],{props:P}),_=Y(R,i,X,`${R}-${L}`,{[`${R}-rtl`]:r==="rtl",[`${R}-align-${H}`]:H,[`${R}-gap-row-${k}`]:N,[`${R}-gap-col-${O}`]:D},d,f,B,G.root),Q=Y(`${R}-item`,G.item),le=z.map((oe,ie)=>{const Ce=(oe==null?void 0:oe.key)||`${Q}-${ie}`;return g.createElement(DM,{prefix:R,classNames:G,styles:te,className:Q,key:Ce,index:ie,separator:F,style:te.item},oe)});if(process.env.NODE_ENV!=="production"){const oe=At("Space");[["direction","orientation"],["split","separator"]].forEach(([ie,Ce])=>{oe.deprecated(!(ie in e),ie,Ce)})}const fe=g.useMemo(()=>({latestIndex:z.reduce((ie,Ce,ne)=>xi(Ce)?ne:ie,0)}),[z]);if(z.length===0)return null;const q={};return v&&(q.flexWrap="wrap"),!D&&M&&(q.columnGap=O),!N&&A&&(q.rowGap=k),g.createElement("div",{ref:t,className:_,style:{...q,...te.root},...T},g.createElement(OM,{value:fe},le))}),Pi=jM;Pi.Compact=Mb;Pi.Addon=EM;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:T,buttonsRender:O=le=>le,mouseEnterDelay:k,mouseLeaveDelay:N,overlayClassName:D,overlayStyle:A,destroyOnHidden:M,destroyPopupOnHide:z,dropdownRender:L,popupRender:j,...H}=e,F=n("dropdown",o),R=`${F}-button`,B={menu:p,arrow:h,autoFocus:m,align:y,disabled:s,trigger:s?[]:w,onOpenChange:x,getPopupContainer:v||t,mouseEnterDelay:k,mouseLeaveDelay:N,classNames:{root:D},styles:{root:A},destroyOnHidden:M,popupRender:j||L},{compactSize:P,compactItemClassnames:J}=To(F,r),V=Y(R,J,f);"destroyPopupOnHide"in e&&(B.destroyPopupOnHide=z),"open"in e&&(B.open=$),"placement"in e?B.placement=E:B.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:T},d),te=g.createElement(ar,{type:i,danger:a,icon:I}),[_,Q]=O([G,te]);return g.createElement(Pi.Compact,{className:V,size:P,block:!0,...H},_,g.createElement($i,{...B},Q))};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"],BM=(e,t)=>{const n=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${n}`]:n&&Qx.includes(n)}},HM=(e,t)=>{const n={};return Jx.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},VM=(e,t)=>{const n={};return Zx.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n},WM=(e,t)=>Y({...BM(e,t),...HM(e,t),...VM(e,t)}),qM=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},XM=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},UM=e=>{const{componentCls:t}=e,n={};return Qx.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r}}),n},GM=e=>{const{componentCls:t}=e,n={};return Jx.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r}}),n},KM=e=>{const{componentCls:t}=e,n={};return Zx.forEach(r=>{n[`${t}-justify-${r}`]={justifyContent:r}}),n},YM=()=>({}),QM=on("Flex",e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,o=yt(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return[qM(o),XM(o),UM(o),GM(o),KM(o)]},YM,{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,$]=QM(w),[,x]=Gu(c,l??(p==null?void 0:p.vertical)),E=Y(o,r,p==null?void 0:p.className,w,y,$,WM(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 ZM=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=Y(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))},JM=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}}}},eA=on(["Input","OTP"],e=>{const t=yt(e,ki(e));return JM(t)},Ii),tA="•",nA=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:tA,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:Y(n,{[`${f}-mask-input`]:s})}))});function Yi(e){return(e||"").split("")}const rA=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:Y(`${n}-separator`,o),style:i},a):null},oA=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,...T}=e;if(process.env.NODE_ENV!=="production"){const ae=At("Input.OTP");process.env.NODE_ENV!=="production"&&ae(!(typeof h=="string"&&h.length>1),"usage","`mask` prop should be a single character.")}const{classNames:O,styles:k,getPrefixCls:N,direction:D,style:A,className:M}=Kn("otp"),z=N("otp",n),[L]=wo("otp",u,void 0,"input"),j={...e,length:r,variant:L},H=kt(A),F=kt(I),[R,X]=Pn([O,E],[k,H,v,F],{props:j}),B=th(T,{aria:!0,data:!0,attr:!0}),[P,J]=eA(z),V=Po(ae=>o??ae),G=g.useContext(sr),te=Ju(G.status,f),_=g.useMemo(()=>({...G,status:te,hasFeedback:!1,feedbackIcon:null}),[G,te]),Q=g.useRef(null),le=g.useRef({});g.useImperativeHandle(t,()=>({focus:()=>{var ae;(ae=le.current[0])==null||ae.focus()},blur:()=>{var ae;for(let he=0;he<r;he+=1)(ae=le.current[he])==null||ae.blur()},nativeElement:Q.current}));const fe=ae=>l?l(ae):ae,[q,oe]=g.useState(()=>Yi(fe(i||"")));g.useEffect(()=>{a!==void 0&&oe(Yi(a))},[a]);const ie=Ke(ae=>{oe(ae),y&&y(ae),s&&ae.length===r&&ae.every(he=>he)&&ae.some((he,ce)=>q[ce]!==he)&&s(ae.join(""))}),Ce=Ke((ae,he)=>{let ce=jr(q);for(let $e=0;$e<ae;$e+=1)ce[$e]||(ce[$e]="");he.length<=1?ce[ae]=he:ce=ce.slice(0,ae).concat(Yi(he)),ce=ce.slice(0,r);for(let $e=ce.length-1;$e>=0&&!ce[$e];$e-=1)ce.pop();const Ne=fe(ce.map($e=>$e||" ").join(""));return ce=Yi(Ne).map(($e,Pe)=>$e===" "&&!ce[Pe]?ce[Pe]:$e),ce}),ne=(ae,he)=>{var $e;const ce=Ce(ae,he),Ne=Math.min(ae+he.length,r-1);Ne!==ae&&ce[ae]!==void 0&&(($e=le.current[Ne])==null||$e.focus()),ie(ce)},re=ae=>{var he;(he=le.current[ae])==null||he.focus()},se=(ae,he)=>{var ce,Ne,$e;for(let Pe=0;Pe<he;Pe+=1)if(!((Ne=(ce=le.current[Pe])==null?void 0:ce.input)!=null&&Ne.value)){($e=le.current[Pe])==null||$e.focus();break}$==null||$(ae)},ye={variant:L,disabled:d,status:te,mask:h,type:m,inputMode:x,autoComplete:w};return g.createElement("div",{...B,ref:Q,className:Y(C,z,{[`${z}-sm`]:V==="small",[`${z}-lg`]:V==="large",[`${z}-rtl`]:D==="rtl"},J,P,M,R.root),style:X.root,role:"group"},g.createElement(sr.Provider,{value:_},Array.from({length:r}).map((ae,he)=>{const ce=`otp-${he}`,Ne=q[he]||"";return g.createElement(g.Fragment,{key:ce},g.createElement(nA,{ref:$e=>{le.current[he]=$e},index:he,size:V,htmlSize:1,className:Y(R.input,`${z}-input`),style:X.input,onChange:ne,value:Ne,onActiveChange:re,autoFocus:he===0&&p,onFocus:$e=>se($e,he),...ye}),he<r-1&&g.createElement(rA,{separator:c,index:he,prefixCls:z,className:Y(R.separator),style:X.separator}))})))});var iA={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 aA=(e,t)=>g.createElement(Jt,qc({},e,{ref:t,icon:iA})),t0=g.forwardRef(aA);process.env.NODE_ENV!=="production"&&(t0.displayName="EyeInvisibleOutlined");var sA={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 lA=(e,t)=>g.createElement(Jt,Xc({},e,{ref:t,icon:sA})),n0=g.forwardRef(lA);process.env.NODE_ENV!=="production"&&(n0.displayName="EyeOutlined");const cA=e=>e?g.createElement(n0,null):g.createElement(t0,null),uA={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]=MI("global"),I=g.useContext(yr),T=n??I,O={...e,disabled:T,variant:v},k=kt(y),N=kt(u),[D,A]=Pn([$,d],[x,k,f,N],{props:O}),M=rn(o)&&o.visible!==void 0,[z,L]=b.useState(()=>M?o.visible:!1),j=b.useRef(null);g.useEffect(()=>{M&&L(o.visible)},[M,o]);const H=Ux(j),F=()=>{var te;if(T)return;z&&H();const G=!z;M||L(G),rn(o)&&((te=o.onVisibleChange)==null||te.call(o,G))},R=G=>{const te=uA[r]||"",Q=(i||E||cA)(z),le=rn(o)?o.tabIndex:void 0;return g.createElement("span",{key:"passwordIcon",role:"button",tabIndex:T?-1:le??0,className:`${G}-icon`,"aria-disabled":T,"aria-pressed":z,"aria-label":z?C.hide:C.show,onMouseDown:fe=>{fe.preventDefault()},onMouseUp:fe=>{fe.preventDefault()},onKeyDown:fe=>{(fe.key==="Enter"||fe.key===" ")&&(fe.preventDefault(),fe.repeat||F())},[te]:F},Q)},X=m("input",s),B=m("input-password",a),P=o&&R(B),J=Y(B,w,c,{[`${B}-${e.size}`]:!!e.size}),V={...h,type:z?"text":"password",prefixCls:X,suffix:g.createElement(g.Fragment,null,P,l),disabled:T,className:J,classNames:D,styles:A,variant:v};return g.createElement(Ri,{ref:Gn(t,j),...V})});process.env.NODE_ENV!=="production"&&(r0.displayName="Input.Password");const dA=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}}}}},fA=on(["Input","Search"],e=>{const t=yt(e,ki(e));return dA(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:T,style:O,classNames:k,styles:N,searchIcon:D}=Kn("inputSearch"),A=g.useContext(yr),M=d??A,[z,,L]=wo("inputSearch",w,e.bordered),j=L?z:void 0,[H]=wo("inputSearch",w,e.bordered,"input"),F={...e,enterButton:s,variant:j},R=kt(O),X=kt(a),[B,P]=Pn([k,$],[N,R,x,X],{props:F},{button:{_default:"root"}}),J=g.useRef(!1),V=I("input-search",n),G=I("input",r),[te,_]=fA(V),{compactSize:Q}=To(V,C),le=Po(K=>i??Q??K),fe=g.useRef(null),q=K=>{K!=null&&K.target&&K.type==="click"&&f&&f(K.target.value,K,{source:"clear"}),p==null||p(K)},oe=K=>{var ue;document.activeElement===((ue=fe.current)==null?void 0:ue.input)&&K.preventDefault()},ie=K=>{var ue,be;f&&f((be=(ue=fe.current)==null?void 0:ue.input)==null?void 0:be.value,K,{source:"input"})},Ce=K=>{J.current||u||(y==null||y(K),ie(K))},ne=typeof s=="boolean"?Ib(l,D,g.createElement(sx,null)):null,re=`${V}-btn`,se=Y(re,{[`${re}-${j}`]:j});let ye;const ae=s||{},he=ae.type&&ae.type.__ANT_BUTTON===!0;if(he||ae.type==="button"){const K=ae.props;ye=Dn(ae,{disabled:M||K.disabled||!he&&u,onMouseDown:ue=>{var be;(be=K.onMouseDown)==null||be.call(K,ue),oe(ue)},onClick:ue=>{var be,Se;(Se=(be=ae==null?void 0:ae.props)==null?void 0:be.onClick)==null||Se.call(be,ue),ie(ue)},key:"enterButton",...he?{className:Y(se,K.className),loading:u||K.loading,size:le}:{}})}else ye=g.createElement(ar,{classNames:B.button,styles:P.button,className:se,color:s?"primary":"default",size:le,disabled:d,key:"enterButton",onMouseDown:oe,onClick:ie,loading:u,icon:ne,variant:j==="borderless"||j==="filled"||j==="underlined"?"text":s?"solid":void 0},s);c&&(ye=[ye,Dn(c,{key:"addonAfter"})]);const ce=Y(V,_,{[`${V}-rtl`]:C==="rtl",[`${V}-${le}`]:!!le,[`${V}-with-button`]:!!s},o,T,te,B.root),Ne=K=>{J.current=!0,h==null||h(K)},$e=K=>{J.current=!1,m==null||m(K)},Pe=th(v,{data:!0}),W=Yt({...v,classNames:Yt(B,["button","root"]),styles:Yt(P,["button","root"]),prefixCls:G,type:"search",size:le,variant:H,onPressEnter:Ce,onCompositionStart:Ne,onCompositionEnd:$e,onChange:q,disabled:d},Object.keys(Pe));return g.createElement(Mb,{className:ce,style:P.root,...Pe,hidden:E},g.createElement(Ri,{ref:Gn(fe,t),...W}),ye)});process.env.NODE_ENV!=="production"&&(o0.displayName="Search");const pA=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 ne;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:se}=At("TextArea");se(!("bordered"in e),"bordered","variant")}const{getPrefixCls:$,direction:x,allowClear:E,autoComplete:C,className:v,style:I,classNames:T,styles:O}=Kn("textArea"),k=g.useContext(yr),N=i??k,{status:D,hasFeedback:A,feedbackIcon:M}=g.useContext(sr),z=td(D,a),L=kt(I),_=kt(d),[H,F]=Pn([T,l],[O,L,f,_],{props:e}),R=g.useRef(null);g.useImperativeHandle(t,()=>{var se,ye;return{resizableTextArea:(se=R.current)==null?void 0:se.resizableTextArea,focus:ae=>{var he,ce;eh((ce=(he=R.current)==null?void 0:he.resizableTextArea)==null?void 0:ce.textArea,ae)},blur:()=>{var ae;return(ae=R.current)==null?void 0:ae.blur()},nativeElement:((ye=R.current)==null?void 0:ye.nativeElement)||null}});const X=$("input",n),B=Ro(X),[P,J]=Hx(X,c);hA(X,B);const{compactSize:V,compactItemClassnames:G}=To(X,x),te=Po(se=>o??V??se),[j,Q]=wo("textArea",p,r),le=Tb({allowClear:s,contextAllowClear:E,componentName:"TextArea"}),[fe,q]=g.useState(!1),[oe,ie]=g.useState(!1),Ce=se=>{q(!0),m==null||m(se);const ye=()=>{q(!1),document.removeEventListener("mouseup",ye)};document.addEventListener("mouseup",ye)},re=se=>{var ye,ae;if(w==null||w(se),fe&&Qt(getComputedStyle)){const he=(ae=(ye=R.current)==null?void 0:ye.nativeElement)==null?void 0:ae.querySelector("textarea");he&&getComputedStyle(he).resize==="both"&&ie(!0)}};return g.createElement(OM,{autoComplete:C,...y,style:F.root,styles:F,disabled:N,allowClear:le,className:Y(J,B,u,c,G,v,H.root,{[`${X}-textarea-affix-wrapper-resize-dirty`]:oe}),classNames:{...H,textarea:Y({[`${X}-sm`]:te==="small",[`${X}-lg`]:te==="large"},P,H.textarea,fe&&`${X}-mouse-active`),variant:Y({[`${X}-${j}`]:Q},Na(X,z)),affixWrapper:Y(`${X}-textarea-affix-wrapper`,{[`${X}-affix-wrapper-rtl`]:x==="rtl",[`${X}-affix-wrapper-sm`]:te==="small",[`${X}-affix-wrapper-lg`]:te==="large",[`${X}-textarea-show-count`]:h||((ne=e.count)==null?void 0:ne.show)},P)},prefixCls:X,suffix:A&&g.createElement("span",{className:`${X}-textarea-suffix`},M),showCount:h,ref:R,onResize:re,onMouseDown:Ce})}),Vr=Ri;Vr.Group=eA;Vr.Search=a0;Vr.TextArea=bA;Vr.Password=i0;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 Kc(){return Kc=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},Kc.apply(this,arguments)}const yA=(e,t)=>g.createElement(Jt,Kc({},e,{ref:t,icon:xA})),s0=g.forwardRef(yA);process.env.NODE_ENV!=="production"&&(s0.displayName="CaretDownFilled");const Yc={defaultSeed:Ca.token,defaultAlgorithm:Qh,_internalContext:ju};var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.call=pd;var l0=Ln.default=void 0;Ln.note=d0;Ln.noteOnce=p0;Ln.preMessage=void 0;var wA=Ln.resetWarned=f0;Ln.warning=u0;Ln.warningOnce=Ti;let Qc={};const fd=[],c0=e=>{fd.push(e)};Ln.preMessage=c0;function u0(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=fd.reduce((r,o)=>o(r??"","warning"),t);n&&console.error(`Warning: ${n}`)}}function d0(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){const n=fd.reduce((r,o)=>o(r??"","note"),t);n&&console.warn(`Note: ${n}`)}}function f0(){Qc={}}function pd(e,t,n){!t&&!Qc[n]&&(e(!1,n),Qc[n]=!0)}function Ti(e,t){pd(u0,e,t)}function p0(e,t){pd(d0,e,t)}Ti.preMessage=c0;Ti.resetWarned=f0;Ti.noteOnce=p0;l0=Ln.default=Ti;function m0(){}let Qn=null;function vA(){Qn=null,wA()}let tn=m0;process.env.NODE_ENV!=="production"&&(tn=(e,t,n)=>{l0(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 ps={},g0={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})(g0);var md=g0.exports;const EA=qn.getAugmentedNamespace(TI);var ms={},Ni={},Mi={};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.default=void 0;const $A={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};Mi.default=$A;var h0=md.default;Object.defineProperty(Ni,"__esModule",{value:!0});Ni.default=void 0;var kA=h0(os),IA=h0(Mi);const RA={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"],...kA.default},timePickerLocale:{...IA.default}};Ni.default=RA;var PA=md.default;Object.defineProperty(ms,"__esModule",{value:!0});ms.default=void 0;var TA=PA(Ni);ms.default=TA.default;var gs=md.default;Object.defineProperty(ps,"__esModule",{value:!0});ps.default=void 0;var NA=gs(EA),MA=gs(ms),AA=gs(Ni),zA=gs(Mi);const hn="${label} is not a valid ${type}",OA={locale:"en",Pagination:NA.default,DatePicker:AA.default,TimePicker:zA.default,Calendar:MA.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"}};ps.default=OA;var DA=ps;const dl=qn.getDefaultExportFromCjs(DA),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"}},b0=(e,t)=>{const n=g.useContext(SA),r=g.useMemo(()=>{const i=t||(lo==null?void 0:lo[e])||(dl==null?void 0:dl[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 LA={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 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 FA=(e,t)=>g.createElement(Jt,Zc({},e,{ref:t,icon:LA})),x0=g.forwardRef(FA);process.env.NODE_ENV!=="production"&&(x0.displayName="ArrowUpOutlined");var _A={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 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 jA=(e,t)=>g.createElement(Jt,Jc({},e,{ref:t,icon:_A})),y0=g.forwardRef(jA);process.env.NODE_ENV!=="production"&&(y0.displayName="AudioMutedOutlined");var BA={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 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 HA=(e,t)=>g.createElement(Jt,eu({},e,{ref:t,icon:BA})),w0=g.forwardRef(HA);process.env.NODE_ENV!=="production"&&(w0.displayName="AudioOutlined");var VA={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 tu(){return tu=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},tu.apply(this,arguments)}const WA=(e,t)=>g.createElement(Jt,tu({},e,{ref:t,icon:VA})),v0=g.forwardRef(WA);process.env.NODE_ENV!=="production"&&(v0.displayName="ClearOutlined");const Vo=1e3,Wo=4,da=140,lm=da/2,Qi=250,cm=500,Zi=.8;function qA({className:e}){const[t]=b0("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-cm/2;return b.createElement("rect",{fill:"currentColor",rx:lm,ry:lm,height:Qi,width:da,x:i,y:a,key:r},b.createElement("animate",{attributeName:"height",values:`${Qi}; ${cm}; ${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 XA="2.9.0",UA={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"},GA={...UA,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}}}}}},mA=on(["Input","TextArea"],e=>{const t=yt(e,ki(e));return pA(t)},Ii,{resetFont:!1}),gA=b.forwardRef((e,t)=>{var re;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:se}=At("TextArea");se(!("bordered"in e),"bordered","variant")}const{getPrefixCls:$,direction:x,allowClear:E,autoComplete:v,className:C,style:I,classNames:T,styles:O}=Kn("textArea"),k=g.useContext(yr),N=i??k,{status:D,hasFeedback:A,feedbackIcon:M}=g.useContext(sr),z=Ju(D,a),L=kt(I),j=kt(d),[H,F]=Pn([T,l],[O,L,f,j],{props:e}),R=g.useRef(null);g.useImperativeHandle(t,()=>{var se,ye;return{resizableTextArea:(se=R.current)==null?void 0:se.resizableTextArea,focus:ae=>{var he,ce;Zg((ce=(he=R.current)==null?void 0:he.resizableTextArea)==null?void 0:ce.textArea,ae)},blur:()=>{var ae;return(ae=R.current)==null?void 0:ae.blur()},nativeElement:((ye=R.current)==null?void 0:ye.nativeElement)||null}});const X=$("input",n),B=Ro(X),[P,J]=jx(X,c);mA(X,B);const{compactSize:V,compactItemClassnames:G}=To(X,x),te=Po(se=>o??V??se),[_,Q]=wo("textArea",p,r),le=Rb({allowClear:s,contextAllowClear:E,componentName:"TextArea"}),[fe,q]=g.useState(!1),[oe,ie]=g.useState(!1),Ce=se=>{q(!0),m==null||m(se);const ye=()=>{q(!1),document.removeEventListener("mouseup",ye)};document.addEventListener("mouseup",ye)},ne=se=>{var ye,ae;if(w==null||w(se),fe&&Qt(getComputedStyle)){const he=(ae=(ye=R.current)==null?void 0:ye.nativeElement)==null?void 0:ae.querySelector("textarea");he&&getComputedStyle(he).resize==="both"&&ie(!0)}};return g.createElement(AM,{autoComplete:v,...y,style:F.root,styles:F,disabled:N,allowClear:le,className:Y(J,B,u,c,G,C,H.root,{[`${X}-textarea-affix-wrapper-resize-dirty`]:oe}),classNames:{...H,textarea:Y({[`${X}-sm`]:te==="small",[`${X}-lg`]:te==="large"},P,H.textarea,fe&&`${X}-mouse-active`),variant:Y({[`${X}-${_}`]:Q},Na(X,z)),affixWrapper:Y(`${X}-textarea-affix-wrapper`,{[`${X}-affix-wrapper-rtl`]:x==="rtl",[`${X}-affix-wrapper-sm`]:te==="small",[`${X}-affix-wrapper-lg`]:te==="large",[`${X}-textarea-show-count`]:h||((re=e.count)==null?void 0:re.show)},P)},prefixCls:X,suffix:A&&g.createElement("span",{className:`${X}-textarea-suffix`},M),showCount:h,ref:R,onResize:ne,onMouseDown:Ce})}),Vr=Ri;Vr.Group=ZM;Vr.Search=o0;Vr.TextArea=gA;Vr.Password=r0;Vr.OTP=oA;var hA={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 bA=(e,t)=>g.createElement(Jt,Uc({},e,{ref:t,icon:hA})),i0=g.forwardRef(bA);process.env.NODE_ENV!=="production"&&(i0.displayName="CaretDownFilled");const Gc={defaultSeed:Ca.token,defaultAlgorithm:Kh,_internalContext:Fu};var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.call=dd;var a0=Fn.default=void 0;Fn.note=c0;Fn.noteOnce=d0;Fn.preMessage=void 0;var xA=Fn.resetWarned=u0;Fn.warning=l0;Fn.warningOnce=Ti;let Kc={};const ud=[],s0=e=>{ud.push(e)};Fn.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=Fn.default=Ti;function f0(){}let Qn=null;function yA(){Qn=null,xA()}let tn=f0;process.env.NODE_ENV!=="production"&&(tn=(e,t,n)=>{a0(e,`[antdx: ${t}] ${n}`),process.env.NODE_ENV==="test"&&yA()});const wA=g.createContext({});process.env.NODE_ENV;const vA=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 CA=zn.getAugmentedNamespace(RI);var fs={},Ni={};const SA=zn.getAugmentedNamespace(TI);var Mi={};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.default=void 0;const EA={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};Mi.default=EA;var m0=fd.default;Object.defineProperty(Ni,"__esModule",{value:!0});Ni.default=void 0;var $A=m0(SA),kA=m0(Mi);const IA={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"],...$A.default},timePickerLocale:{...kA.default}};Ni.default=IA;var RA=fd.default;Object.defineProperty(fs,"__esModule",{value:!0});fs.default=void 0;var PA=RA(Ni);fs.default=PA.default;var ps=fd.default;Object.defineProperty(ds,"__esModule",{value:!0});ds.default=void 0;var TA=ps(CA),NA=ps(fs),MA=ps(Ni),AA=ps(Mi);const hn="${label} is not a valid ${type}",zA={locale:"en",Pagination:TA.default,DatePicker:MA.default,TimePicker:AA.default,Calendar:NA.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=zA;var OA=ds;const cl=zn.getDefaultExportFromCjs(OA),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(vA),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 DA={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 LA=(e,t)=>g.createElement(Jt,Yc({},e,{ref:t,icon:DA})),h0=g.forwardRef(LA);process.env.NODE_ENV!=="production"&&(h0.displayName="ArrowUpOutlined");var FA={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 _A=(e,t)=>g.createElement(Jt,Qc({},e,{ref:t,icon:FA})),b0=g.forwardRef(_A);process.env.NODE_ENV!=="production"&&(b0.displayName="AudioMutedOutlined");var jA={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 BA=(e,t)=>g.createElement(Jt,Zc({},e,{ref:t,icon:jA})),x0=g.forwardRef(BA);process.env.NODE_ENV!=="production"&&(x0.displayName="AudioOutlined");var HA={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 VA=(e,t)=>g.createElement(Jt,Jc({},e,{ref:t,icon:HA})),y0=g.forwardRef(VA);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 WA({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 qA="2.9.0",XA={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"},UA={...XA,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 ul(e){return e>=0&&e<=255}function Ji(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(ul(u)&&ul(d)&&ul(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 GA(e){const{override:t,...n}=e,r={...t};Object.keys(UA).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:Ji(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:Ji(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Ji(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:Ji(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,C).range||document.createRange()},[u]),w=b.useCallback(x=>{var v;const E=(v=e==null?void 0:e.getEditorValue)!=null&&v.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 C=y(E);return await navigator.clipboard.writeText(C),!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}},um=4.35,s5=(e,t,n)=>{const{token:r}=e5(),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+um)*t.minRows:"auto",maxHeight:t.maxRows?(s+um)*t.maxRows:"auto",overflowY:"auto"}},l5=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=Y(`${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=Y(`${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)}}},c5=new Set(["input","select","custom","content"]),dm=e=>(e==null?void 0:e.reduce((t,n)=>{const{key:r,type:o}=n;if(!r)return t;const i=n.props||{},a=c5.has(o)?i.defaultValue:i.value??i.label;return t[r]=a??"",t},{}))??{},u5=(e,t)=>{e==null||e.forEach(n=>{n.key&&t.set(n.key,n)})},d5=(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}},f5=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)}),u5(e,o.current);const d=dm(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=dm(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=>d5(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 C=$.type==="content"?x:r.current[m]??"";return((E=$.formatResult)==null?void 0:E.call($,C))??C}return x};return[o.current,{getSlotValues:()=>r.current,setSlotValues:a,mergeSlotConfig:s,getNodeInfo:c,getNodeTextValue:u,clear:l}]},k0=({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(qu,{className:`${a}-close-icon`});return b.createElement("div",{className:Y(`${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`}))};k0.displayName="Skill";const I0=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(xs),{direction:C,getPrefixCls:v}=vo(),I=`${v("sender",u)}`,T=Nu("sender"),O=`${I}-input`,k=b.useRef(null),N=b.useRef(new Map),D=b.useRef(!1),A=b.useRef(!1),M=b.useRef(null),z=b.useRef(null),L=b.useRef(null),_={...(Be=T.styles)==null?void 0:Be.input,...d.input},H=s5(_,p,k),R={...Qa(E,{attr:!0,aria:!0,data:!0}),ref:k},[X,{getSlotValues:B,setSlotValues:P,getNodeInfo:J,mergeSlotConfig:V,getNodeTextValue:G,clear:te}]=f5($),[j,Q]=b.useState(new Map),[le,fe]=b.useState(null),{setEndCursor:q,setStartCursor:oe,setAllSelectCursor:ie,setCursorPosition:Ce,setSlotFocus:re,setAfterNodeFocus:ne,getTextBeforeCursor:se,removeAllRanges:ye,getRange:ae,getInsertPosition:he,getEndRange:ce,getStartRange:Ne,getSelection:$e,copySelectionString:Pe,getCleanedText:W}=a5({prefixCls:I,getSlotDom:U=>N.current.get(U),slotConfigMap:X,getNodeInfo:J,getEditorValue:()=>Me()}),{buildSkillSpan:K,buildEditSlotSpan:ue,buildSlotSpan:be,buildSpaceSpan:Se,getSlotDom:de,saveSlotDom:ee,getSlotLastDom:Ee}=l5({prefixCls:I,placeholder:m,slotDomMap:N,slotConfigMap:X}),Ie=U=>{const ge=Me();z.current&&(!(ge!=null&&ge.value)&&ge.slotConfig.length===0&&m?(z.current.setAttribute("contenteditable","true"),z.current.classList.add(`${I}-skill-empty`)):(z.current.setAttribute("contenteditable","false"),z.current.classList.remove(`${I}-skill-empty`))),n==null||n(ge.value,U,ge.slotConfig,ge.skill)},Ge=(U,ge,pe)=>{const we=de(U),Te=X.get(U);if(P(ke=>({...ke,[U]:ge})),we&&Te){const ke=Re(Te,we);Q(Fe=>{const De=new Map(Fe);return De.set(U,ke),De}),Ie(pe)}},Re=(U,ge)=>{if(!U.key)return null;const pe=B()[U.key],we=()=>{var Te,ke,Fe,De,ft,Pt,ht,Ct,mt;switch(U.type){case"content":return ge.innerHTML=pe||"",ge.setAttribute("data-placeholder",((Te=U.props)==null?void 0:Te.placeholder)||""),null;case"input":return b.createElement(Vr,{readOnly:l,className:`${I}-slot-input`,placeholder:((ke=U.props)==null?void 0:ke.placeholder)||"","data-slot-input":U.key,size:"small",variant:"borderless",value:pe||"",tabIndex:0,onKeyDown:Rt,onChange:Lt=>{Ge(U.key,Lt.target.value,Lt)},spellCheck:!1});case"select":return b.createElement(Zx,{disabled:l,menu:{items:(De=(Fe=U.props)==null?void 0:Fe.options)==null?void 0:De.map(Lt=>({label:Lt,key:Lt})),defaultSelectedKeys:(ft=U.props)!=null&&ft.defaultValue?[U.props.defaultValue]:[],selectable:!0,onSelect:({key:Lt,domEvent:Le})=>{Ge(U.key,Lt,Le)}},trigger:["click"]},b.createElement("span",{className:Y(`${I}-slot-select`,{placeholder:!pe,[`${I}-slot-select-selector-value`]:pe})},b.createElement("span",{"data-placeholder":(Pt=U.props)==null?void 0:Pt.placeholder,className:`${I}-slot-select-value`},pe||""),b.createElement("span",{className:`${I}-slot-select-arrow`},b.createElement(s0,null))));case"tag":return b.createElement("span",{className:`${I}-slot-tag`},((ht=U.props)==null?void 0:ht.label)||((Ct=U.props)==null?void 0:Ct.value)||"");case"custom":return(mt=U.customRender)==null?void 0:mt.call(U,pe,Lt=>{Ge(U.key,Lt)},{disabled:s,readOnly:l},U);default:return null}};return po.createPortal(we(),ge)},ze=U=>U.reduce((ge,pe)=>{if(pe.type==="text")return ge.push(document.createTextNode(pe.value||"")),ge;const we=pe.key;if(tn(!!we,"Sender",`Slot key is missing: ${we}`),we){let Te,ke;if(pe.type==="content"){ke=ue(pe);const Fe=Se(we,"before"),De=Se(we,"after");Te=[Fe,ke,De],ee(`${we}_before`,Fe),ee(we,ke),ee(`${we}_after`,De)}else ke=be(we),Te=[ke],ee(we,ke);if(ke){const Fe=Re(pe,ke);Fe&&(Q(De=>{const ft=new Map(De);return ft.set(we,Fe),ft}),ge.push(...Te))}}return ge},[]),Me=()=>{const U=k.current,ge={value:"",slotConfig:[],skill:void 0};if(!U)return ge;const pe=U.childNodes;if(pe.length===0)return U.innerHTML="",z.current=null,ge;const we=!!x,Te=new Array(pe.length),ke=[];let Fe,De=0;for(let Pt=0;Pt<pe.length;Pt++){const ht=pe[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 Bn=X.get(Tt);Bn&&ke.push({...Bn,value:Ct})}}}}const ft=Te.slice(0,De).join("");return Fe||(z.current=null),{value:ft,slotConfig:ke,skill:Fe}},it=()=>{var ge;const U=k.current;U&&(U.innerHTML="",z.current=null,L.current=null,M.current=null,ye(),(ge=N==null?void 0:N.current)==null||ge.clear())},Qe=U=>{U.forEach(ge=>{var pe;(pe=k.current)==null||pe.appendChild(ge)})},It=(U,ge)=>{const pe=k.current;pe&&(pe.querySelectorAll(`[data-slot-key="${U}"]`).forEach(we=>{we.remove()}),N.current.delete(U),P(we=>{const{[U]:Te,...ke}=we;return ke}),Q(we=>{const Te=new Map(we);return Te.delete(U),Te}),Ie(ge))},wt=()=>{if(x&&L.current!==x){Ot(!1),L.current=x;const U=K(x.value),ge=po.createPortal(b.createElement(k0,$t({removeSkill:Ot},x,{prefixCls:I})),U);fe(ge);const pe=document.createRange(),we=k.current;if(!we)return;pe.setStart(we,0),pe.insertNode(U),z.current=U,Ie()}},Ot=(U=!0)=>{var pe;!k.current||!z.current||((pe=z.current)==null||pe.remove(),z.current=null,L.current=null,U&&Ie())},gt=U=>{c!=="enter"||!U||U.querySelectorAll("br").forEach(ge=>{ge.remove()})},_t=()=>{$&&$.length>0&&k.current&&(it(),Qe(ze($)))},jt=U=>{const ge=o==null?void 0:o(U);return A.current||D.current||ge===!1},_e=(U,ge)=>{var Fe,De,ft;if(!k.current)return!1;const{range:pe,selection:we}=ae();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&&pe){const Pt=ke.parentNode,ht=J(Pt),Ct=pe.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 U.preventDefault(),ge==="cut"&&Pe(),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 U.preventDefault(),It(Ct,U),!0;if(mt)return U.preventDefault(),Ot(),!0}}}return!1},pt=U=>{const{key:ge,shiftKey:pe,ctrlKey:we,altKey:Te,metaKey:ke}=U;if(ge!=="Enter")return!1;const Fe=we||Te||ke;return c==="enter"&&!pe&&!Fe||c==="shiftEnter"&&pe&&!Fe},Cn=()=>{if(!z.current||!k.current||z.current.getAttribute("contenteditable")==="false")return;const U=$e();!(U!=null&&U.anchorNode)||!z.current.contains(U.anchorNode)||!k.current.contains(U.anchorNode)||(z.current.setAttribute("contenteditable","false"),z.current.classList.remove(`${I}-skill-empty`),Ze({cursor:"end"}))},Fn=()=>{D.current=!0},_n=()=>{D.current=!1,A.current=!1},Rt=U=>{if(!jt(U)&&!(U.key==="Backspace"&&_e(U,"backspace"))){if(pt(U)){U.preventDefault(),A.current=!0,h==null||h();return}if((U.key==="a"||U.key==="A")&&(U.ctrlKey||U.metaKey)&&!U.shiftKey&&!U.altKey){ie(k.current,z.current),U.preventDefault();return}Cn()}},Sn=U=>{w==null||w(U)},Ht=U=>{A.current&&(A.current=!1);const{range:ge}=ae();M.current=ge;const pe=setTimeout(()=>{M.current=null,clearTimeout(pe)},200);y==null||y(U)},an=U=>{gt(k==null?void 0:k.current),Ie(U)},jn=U=>{_e(U,"cut")},fn=U=>{var we,Te;U.preventDefault();const ge=(we=U.clipboardData)==null?void 0:we.files,pe=(Te=U.clipboardData)==null?void 0:Te.getData("text/plain");if(!pe&&(ge!=null&&ge.length)&&a){a(ge);return}if(pe){let ke=!1;const Fe=W(pe);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(U)},pn=U=>{U.key==="Enter"&&(A.current=!1),r==null||r(U)},en=()=>{const U=k.current,ge=$e();U&&(ge==null?void 0:ge.focusNode)===U&&ge.focusOffset===0&&Me().skill&&Ce(U,k.current,1)},Dt=(U,ge,pe,we)=>{const Te=k.current;if(Te)try{V(U);const ke=ze(U);if(ke.length===0)return;const Fe=at(ge,Te);if(!Fe.range||!Fe.selection)return;const{range:De,selection:ft}=Fe;pe!=null&&pe.length&&Vt(De,pe,Te),De.deleteContents(),vt(ke,De,Fe),Oe(ke,De,ft,we)}catch(ke){tn(!1,"Sender",`Insert operation failed: ${ke}`)}},at=(U,ge)=>{const{type:pe,slotKey:we,slotType:Te,range:ke,selection:Fe}=he(U,k,M);if(!Fe)return{range:null,selection:null,type:pe};let De=null;switch(pe){case"end":De=ce(ge);break;case"start":De=Ne(ge);break;case"slot":De=ae().range;break;case"box":De=ke||null,De&&z.current&&De.collapsed&&De.startOffset===0&&De.setStartAfter(z.current);break}return{range:De,selection:Fe,type:pe,slotKey:we,slotType:Te}},Vt=(U,ge,pe)=>{const{value:we,startContainer:Te,startOffset:ke}=se(pe);we.length>=ge.length&&we.endsWith(ge)&&Te&&ke>=0&&(U.setStart(Te,ke-ge.length),U.setEnd(Te,ke),U.deleteContents())},vt=(U,ge,pe)=>{const{type:we,slotKey:Te,slotType:ke}=pe;let Fe=!0;U.forEach(De=>{if(Fe&&we==="slot"&&(ke!=="content"||De.nodeType!==Node.TEXT_NODE)&&Te){Fe=!1;const ft=Ee(Te);ft&&ge.setStartAfter(ft)}ge.insertNode(De),ge.setStartAfter(De)})},Oe=(U,ge,pe,we)=>{const Te=U[U.length-1];ne(Te,k.current,ge,pe,we),setTimeout(()=>{an(null)},0)},Ze=U=>{const ge={preventScroll:(U==null?void 0:U.preventScroll)??!1,cursor:(U==null?void 0:U.cursor)??"end",key:U==null?void 0:U.key};switch(ge.cursor){case"slot":re(k,U==null?void 0:U.key,ge.preventScroll);break;case"start":oe(k.current,ge.preventScroll);break;case"all":ie(k.current,z.current,ge.preventScroll);break;case"end":q(k.current,ge.preventScroll);break}},st=()=>{var ge;const U=k.current;U&&(U.innerHTML="",L.current=null,z.current=null,te(),wt(),M.current=null,(ge=N==null?void 0:N.current)==null||ge.clear(),an(null))};return b.useEffect(()=>{_t(),x?wt():Ie()},[$]),b.useEffect(()=>{wt()},[x]),b.useImperativeHandle(t,()=>({nativeElement:k.current,focus:Ze,blur:()=>{var U;return(U=k.current)==null?void 0:U.blur()},insert:Dt,clear:st,getValue:Me})),b.createElement(b.Fragment,null,b.createElement("div",$t({},R,{role:"textbox",tabIndex:0,style:{..._,...H},className:Y(O,`${O}-slot`,T.classNames.input,f.input,{[`${I}-rtl`]:C==="rtl"}),"data-placeholder":m,contentEditable:!l,suppressContentEditableWarning:!0,spellCheck:!1,onCut:jn,onKeyDown:Rt,onKeyUp:pn,onPaste:fn,onCompositionStart:Fn,onCompositionEnd:_n,onFocus:Sn,onBlur:Ht,onSelect:en,onInput:an},E)),b.createElement("div",{style:{display:"none"},id:`${I}-slot-placeholders`},Array.from(j.values()),le))});process.env.NODE_ENV!=="production"&&(I0.displayName="SlotTextArea");const R0=g.forwardRef((e,t)=>{const{speechRecording:n,disabled:r,onSpeechDisabled:o,prefixCls:i}=g.useContext(hs),a=e.disabled??r??o;let s=null;return n?s=g.createElement(qA,{className:`${i}-recording-icon`}):a?s=g.createElement(y0,null):s=g.createElement(w0,null),g.createElement(bs,$t({icon:s,variant:"text",color:"primary"},e,{action:"onSpeech",ref:t}))});var P0={};Object.defineProperty(P0,"__esModule",{value:!0});var p5=P0.default=m5;function m5(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 g5(e,t,n){return p5(e,t)||n}const T0=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(xs),C=b.useRef(null),v=(H,F="cursor")=>{var J,V;const R=(V=(J=C.current)==null?void 0:J.resizableTextArea)==null?void 0:V.textArea,X=R.value;let B=X.length,P=X.length;F==="cursor"&&(B=R==null?void 0:R.selectionStart,P=R==null?void 0:R.selectionEnd),F==="start"&&(B=0,P=0),R.value=X.substring(0,B)+H+X.substring(P,X.length),R.selectionStart=B+H.length,R.selectionEnd=B+H.length,R.focus(),r==null||r(R.value)},I=()=>{r==null||r("")},T=()=>({value:n||"",slotConfig:[]});b.useImperativeHandle(t,()=>{var H,F,R,X;return{nativeElement:(F=(H=C.current)==null?void 0:H.resizableTextArea)==null?void 0:F.textArea,focus:(R=C.current)==null?void 0:R.focus,blur:(X=C.current)==null?void 0:X.blur,insert:v,clear:I,getValue:T}});const O=b.useRef(!1),k=()=>{O.current=!0},N=()=>{O.current=!1},D=H=>{const F=i==null?void 0:i(H),{key:R,shiftKey:X,ctrlKey:B,altKey:P,metaKey:J}=H;if(!(O.current||R!=="Enter"||F===!1)&&R==="Enter"){const V=B||P||J;if(u==="enter"&&!X&&!V||u==="shiftEnter"&&X&&!V){H.preventDefault(),w==null||w();return}}},A=H=>{var X,B;const F=(X=H.clipboardData)==null?void 0:X.files;!((B=H.clipboardData)==null?void 0:B.getData("text/plain"))&&(F!=null&&F.length)&&s&&(s(F),H.preventDefault()),a==null||a(H)},M=g5(m,["input"],Vr.TextArea),L={...Qa(E,{attr:!0,aria:!0,data:!0}),ref:C},_=H=>{r==null||r(H.target.value,H)};return b.createElement(M,$t({},L,{disabled:l,style:f.input,className:Y(`${d}-input`,p.input),autoSize:h,value:n,onChange:_,onKeyUp:o,onCompositionStart:k,onCompositionEnd:N,onKeyDown:D,onPaste:A,variant:"borderless",readOnly:c,placeholder:y,onFocus:$,onBlur:x}))});process.env.NODE_ENV!=="production"&&(T0.displayName="TextArea");function h5(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 C=(E=(x=($=y.results)==null?void 0:$[0])==null?void 0:x[0])==null?void 0:E.transcript;n(C)}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 N0=g.createContext({}),fm=()=>({height:0}),pm=e=>({height:e.scrollHeight});function b5(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(N0),{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:fm,onEnterActive:pm,onLeaveStart:pm,onLeaveActive:fm,visible:r,forceRender:d},({className:$,style:x})=>g.createElement("div",{className:Y(m,w,$,i,{[`${w}-rtl`]:p==="rtl"}),style:{...x,...a}},(u!==!1||t)&&g.createElement("div",{className:Y(`${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(qu,null),size:"small",onClick:y}))),o&&g.createElement("div",{className:Y(`${w}-content`,s.content),style:{...l.content}},o)))}const x5=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"}}}}},y5=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%"}}}},w5=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}}}}}},v5=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"}}}},C5=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}},M0=t5("Sender",e=>{const{paddingXS:t,calc:n}=e,r=yt(e,{SenderContentMaxWidth:`calc(100% - ${xe(n(t).add(32).equal())})`});return[v5(r),x5(r),w5(r),y5(r)]},C5),ea={SendButton:$0,ClearButton:r5,LoadingButton:E0,SpeechButton:R0},S5=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:C,allowSpeech:v,prefix:I,footer:T,header:O,onPaste:k,onPasteFile:N,autoSize:D={maxRows:8},placeholder:A,onFocus:M,onBlur:z,skill:L,..._}=e,H=Qa(_,{attr:!0,aria:!0,data:!0}),F=b.useId(),R=Array.isArray(u)||(L==null?void 0:L.value),{direction:X,getPrefixCls:B}=vo(),P=B("sender",n),J=b.useRef(null),V=b.useRef(null);hh(t,()=>{var de;return{nativeElement:J.current,inputElement:(de=V.current)==null?void 0:de.nativeElement,focus:ee=>{var Ee;return(Ee=V.current)==null?void 0:Ee.focus(ee)},blur:()=>{var ee;return(ee=V.current)==null?void 0:ee.blur()},insert:(...ee)=>{var Ee,Ie;return(Ie=(Ee=V.current)==null?void 0:Ee.insert)==null?void 0:Ie.call(Ee,...ee)},clear:()=>{var ee;return(ee=V.current)==null?void 0:ee.clear()},getValue:()=>{var ee;return((ee=V.current)==null?void 0:ee.getValue())??{value:"",slotConfig:[],skill:void 0}}}});const G=Nu("sender"),te=`${P}-input`,[j,Q]=M0(P),le=Y(P,G.className,i,a,G.classNames.root,o.root,j,Q,`${P}-main`,{[`${P}-rtl`]:X==="rtl",[`${P}-disabled`]:C}),fe=`${P}-actions-btn`,q=`${P}-actions-list`,[oe,ie]=un(l||"",c),Ce=(de,ee,Ee,Ie)=>{ie(de),y==null||y(de,ee,Ee??[],Ie)},[re,ne,se]=h5(de=>{var ee,Ee;R?(Ee=(ee=V.current)==null?void 0:ee.insert)==null||Ee.call(ee,[{type:"text",value:de}]):Ce(`${oe} ${de}`)},v),ye=()=>{if(V!=null&&V.current&&p&&!h&&!W){const de=V.current.getValue();p(de.value,de.slotConfig,de.skill)}},ae=()=>{var de,ee;Ce(""),R&&((ee=(de=V.current)==null?void 0:de.clear)==null||ee.call(de))},he=b.createElement(n0,{className:`${q}-presets`},v&&b.createElement(R0,null),h?b.createElement(E0,null):b.createElement($0,null));let ce=he;typeof $=="function"?ce=$(he,{components:ea}):($||$===!1)&&(ce=$);const Ne=typeof I=="function"?I(he,{components:ea}):I||null,$e=typeof O=="function"?O(he,{components:ea}):O||null,Pe=typeof T=="function"?T(he,{components:ea}):T||null,[W,K]=b.useState(!oe),ue={prefixCls:fe,onSend:ye,onSendDisabled:!oe,onClear:ae,onClearDisabled:!oe,onCancel:w,onCancelDisabled:!h,onSpeech:()=>ne(!1),onSpeechDisabled:!re,speechRecording:se,disabled:C,setSubmitDisabled:K},be=b.useMemo(()=>({value:oe,onChange:Ce,slotConfig:u,onKeyUp:x,onKeyDown:E,onPaste:k,onPasteFile:N,disabled:C,readOnly:d,submitType:f,prefixCls:P,styles:r,classNames:o,autoSize:D,components:m,triggerSend:ye,placeholder:A,onFocus:M,onBlur:z,skill:L,..._}),[oe,Ce,u,x,E,k,N,C,d,f,P,r,o,D,m,ye,A,M,z,L,_]),Se=de=>{var ee,Ee,Ie;!R&&de.target!==((ee=J.current)==null?void 0:ee.querySelector(`.${te}`))&&de.preventDefault(),de.target===((Ee=J.current)==null?void 0:Ee.querySelector(`.${te}`))&&((Ie=V.current)==null||Ie.focus())};return b.createElement("div",$t({key:F,ref:J,className:le,style:{...G.style,...s,...G.styles.root,...r.root}},H),b.createElement(xs.Provider,{value:be},b.createElement(hs.Provider,{value:ue},$e&&b.createElement(N0.Provider,{value:{prefixCls:P}},$e),b.createElement("div",{className:Y(`${P}-content`,o.content),style:r.content,onMouseDown:Se},Ne&&b.createElement("div",{className:Y(`${P}-prefix`,G.classNames.prefix,o.prefix),style:{...G.styles.prefix,...r.prefix}},Ne),R?b.createElement(I0,{ref:V}):b.createElement(T0,{ref:V}),ce&&b.createElement("div",{className:Y(q,G.classNames.suffix,o.suffix),style:{...G.styles.suffix,...r.suffix}},ce)),Pe&&b.createElement("div",{className:Y(`${P}-footer`,G.classNames.footer,o.footer),style:{...G.styles.footer,...r.footer}},Pe))))}),A0=S5;process.env.NODE_ENV!=="production"&&(A0.displayName="Sender");const E5=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(xs),C=Qa(y,{attr:!0,aria:!0,data:!0}),v=g.useId(),{direction:I,getPrefixCls:T}=vo(),O=T("sender",w||E),k=`${O}-switch`,[N,D]=M0(O),A=g.useRef(null);hh(t,()=>({nativeElement:A.current}));const[M,z]=un(d,f),L=Nu("sender"),_=Y(O,k,r,c,L.classNames.switch,x.switch,o.root,N,D,{[`${k}-checked`]:M,[`${k}-rtl`]:I==="rtl"});return g.createElement("div",$t({ref:A,className:_,key:v,style:{...s,...L.styles.switch,...$.switch,...i.root}},C),g.createElement(ar,{disabled:m,loading:u,className:Y(`${k}-content`,o.content),style:i.content,styles:{icon:i.icon,content:i.title},classNames:{icon:o.icon,content:o.title},variant:"outlined",color:M?"primary":"default",icon:a,onClick:()=>{const H=!M;z(H),l==null||l(H)}},M?p:h,n))}),gd=A0;gd.Header=b5;gd.Switch=E5;function z0({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 $5({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(z0,{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 k5({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(C=>!d||C.code.toLowerCase().includes(d)||C.name.toLowerCase().includes(d)||C.displayName&&C.displayName.toLowerCase().includes(d)),[r,d]),p=b.useMemo(()=>f.reduce((C,v,I)=>v.selectable?[...C,I]:C,[]),[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(C=>{if(!h.current)return!1;const v=w.current;if(v.length===0)return!1;const I=T=>{const O=v.indexOf(y.current),k=O===-1?v[0]:v[(O+T+v.length)%v.length];l(k)};switch(C.key){case"ArrowDown":return C.preventDefault(),I(1),!0;case"ArrowUp":return C.preventDefault(),I(-1),!0;case"Enter":case"Tab":{const T=m.current[y.current];return!T||!T.selectable?!1:(C.preventDefault(),$.current(T),a(!1),!0)}case"Escape":return C.preventDefault(),a(!1),!0;default:return!1}},[]),E=b.useCallback(()=>a(!1),[]);return{isOpen:i,items:f,activeIndex:s,handleKeyDown:x,close:E}}const I5=10,R5="sa-sender",P5=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);function T5({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 hd(){const{status:e,sendMessage:t,stop:n,sdk:r,attachmentUploader:o,nosUpload:i}=Xn(),[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(M=>M.attachment),y=u.some(M=>!M.attachment&&M.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(z0,{})}),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]),C=b.useCallback((M,z,L,_)=>{s(M),_||c(H=>H&&null)},[]),v=b.useCallback(M=>{c(M),setTimeout(()=>{var z;return(z=f.current)==null?void 0:z.focus()},0)},[]),I=k5({sdk:r,input:a,onSelect:v}),T=b.useCallback(M=>{const z=Array.from(M.target.files??[]);if(M.target.value="",!h||z.length===0)return;const L=I5-u.length,_=z.slice(0,Math.max(0,L));if(_.length===0)return;const H=_.map(F=>({key:`${F.name}_${F.size}_${Date.now()}_${Math.random().toString(36).slice(2,6)}`,file:F,status:"uploading"}));d(F=>[...F,...H]);for(const{key:F,file:R}of H)(o||qn.createNosUploader({baseURL:i.baseURL,headers:i.headers,trunkSize:i.trunkSize,onProgress:B=>d(P=>P.map(J=>J.key===F?{...J,percent:B}:J))}))(R).then(B=>{d(P=>P.map(J=>J.key===F?{...J,attachment:{...B,filename:B.filename||R.name,size:B.size??R.size,mime:B.mime??R.type}}:J))}).catch(B=>{d(P=>P.map(J=>J.key===F?{...J,status:"error",errorMsg:B instanceof Error?B.message:String(B)}:J))})},[o,i,u]),O=b.useCallback(M=>{d(z=>z.filter(L=>L.key!==M))},[]),k=b.useCallback(()=>{var H;if(!x)return;const M=a.trim(),z=w.map(F=>F.attachment),L=l?`/${l.code}${M?` ${M}`:""}`:M,_=l?`/${l.displayName||l.name}${M?` ${M}`:""}`:void 0;t(L,z.length>0?z:void 0,_),(H=f.current)==null||H.clear(),s(""),c(null),d([])},[x,a,l,w,t]),N=b.useCallback(M=>{if(I.handleKeyDown(M))return!1;if(M.key==="Enter")return(M.metaKey||M.ctrlKey)&&(M.preventDefault(),k()),!1},[k,I.handleKeyDown]),D=b.useCallback(()=>{var M;m||(M=f.current)==null||M.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 M;return(M=p.current)==null?void 0:M.click()},children:S.jsx(T5,{size:15})}),S.jsx("input",{ref:p,type:"file",multiple:!0,className:"hidden",onChange:T,"aria-label":"选择附件"}),!m&&S.jsxs("span",{className:"sa-send-hint","aria-hidden":"true",children:[S.jsx("kbd",{className:"sa-send-kbd",children:P5?"⌘":"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($5,{items:I.items,activeIndex:I.activeIndex,onSelect:v}),u.length>0&&S.jsx("div",{className:"sa-attachment-tray mb-1.5",onClick:M=>M.stopPropagation(),children:u.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(We,{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?Bg(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:()=>O(M.key),children:"✕"})]},M.key))}),S.jsx("div",{className:"sa-composer-shell",onClick:D,children:S.jsx(b.Fragment,{children:S.jsx(gd,{ref:f,prefixCls:R5,rootClassName:`sa-input-form ${$?"sa-input-form-active":""} ${m?"sa-input-form-streaming":""}`,skill:E,onChange:C,onKeyDown:N,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生成仅供参考"})]})}function N5({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(ug,{remarkPlugins:[zg],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 M5({artifacts:e,initialArtifact:t,onClose:n}){const[r,o]=b.useState(t?{mode:"preview",artifact:t}:{mode:"list"}),[i,a]=b.useState(!1),s=b.useRef(null),[l,c]=b.useState(340),u=b.useRef(null);b.useEffect(()=>{t&&(s.current&&(clearTimeout(s.current),s.current=null,a(!1)),o({mode:"preview",artifact:t}))},[t]);const d=b.useCallback(()=>{a(!0),s.current=setTimeout(()=>{s.current=null,n()},240)},[n]);b.useEffect(()=>()=>{var m;s.current&&clearTimeout(s.current),(m=u.current)==null||m.call(u)},[]);const f=b.useCallback(m=>{o({mode:"preview",artifact:m})},[]),p=b.useCallback(()=>{o({mode:"list"})},[]);b.useEffect(()=>{const m=w=>{w.key==="Escape"&&d()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[d]);const h=b.useCallback(m=>{m.preventDefault();const w=m.clientX,y=l,$=E=>{const C=w-E.clientX;c(Math.max(240,Math.min(window.innerWidth*.7,y+C)))},x=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",x),document.body.style.cursor="",document.body.style.userSelect="",u.current=null};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",$),document.addEventListener("mouseup",x),u.current=x},[l]);return S.jsxs("div",{className:`sa-artifact-drawer ${i?"sa-drawer-closing":""}`,style:{width:l},children:[S.jsx("div",{className:"sa-drawer-resize-handle",onMouseDown:h}),S.jsxs("div",{className:"sa-artifact-drawer-header",children:[r.mode==="preview"?S.jsxs(S.Fragment,{children:[S.jsx("button",{className:"sa-drawer-btn",onClick:p,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.jsx("span",{className:"sa-artifact-drawer-title",children:r.artifact.filename})]}):S.jsxs(S.Fragment,{children:[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.jsx("div",{style:{flex:1}}),r.mode==="preview"&&S.jsx("button",{className:"sa-drawer-btn",onClick:()=>void fa(r.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"})})}),S.jsx("button",{className:"sa-drawer-btn",onClick:d,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:r.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,w)=>S.jsxs("li",{className:"sa-drawer-file-card",onClick:()=>f(m),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),f(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:wm(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:ym(m.size)})]}),S.jsx("button",{className:"sa-drawer-btn",title:"下载","aria-label":`下载 ${m.filename}`,onClick:y=>{y.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-${w}`))}):S.jsx("div",{className:"sa-drawer-view-enter",children:S.jsx(N5,{artifact:r.artifact})})})]})}function O0({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 A5="mx-auto w-full max-w-[800px]";function D0({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}=Xn();if(a)return S.jsx(O0,{page:a,onBack:s,centered:t});const p=t?A5:"";return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:`${e} ${p}`,children:[l?S.jsxs("div",{className:"sa-messages-loading",children:[S.jsx("span",{className:"sa-loading-spinner"}),"加载对话..."]}):r,i&&c&&S.jsx(M5,{artifacts:u,initialArtifact:d,onClose:f})]}),n?S.jsx("div",{className:`${n} ${p}`,children:o}):o]})}function z5({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:C,allArtifacts:v,activePanel:I,closePanel:T,messages:O,messagesLoading:k,conversations:N,activeConversationId:D,switchConversation:A,newConversation:M,deleteConversation:z,renameConversation:L,hasMore:_,loadMoreConversations:H}=Xn(),{width:F,position:R,hasCustomPosition:X,isMaximized:B,totalWidth:P,windowHeight:J,startWindowDrag:V,startResize:G,toggleMaximize:te,reset:j,setLockedHeight:Q}=K0({defaultWidth:d??Ut.DEFAULT_WIDTH,defaultHeight:f??Ut.DEFAULT_HEIGHT,sidebarWidth:0}),le=b.useRef(null),fe=b.useRef(null),q=!k&&O.length===0,oe=!k&&O.length>0,ie=!!I;b.useEffect(()=>{e||(j(),T())},[e,j,T]),b.useEffect(()=>{x(B?le.current??!0:fe.current??!1)},[B,x]),b.useEffect(()=>{oe||Q(null)},[oe,Q]);const Ce=Y0({enabled:e&&oe&&!B&&!ie,contentSelector:".sa-panel-content",defaultHeight:f??Ut.DEFAULT_HEIGHT,onHeightChange:Q});if(!e)return null;const re=r.Header,ne=r.Composer,se=r.ThreadList,ye=()=>{const Se=!E;$(),B?le.current=Se:fe.current=Se},ae=200,he=E&&!B,ce="var(--sa-radius, 16px)",Ne=he?`0px ${ce} ${ce} 0px`:`${ce} ${ce} ${ce} ${ce}`,$e=X?R.x:window.innerWidth-P-20,Pe=Math.min(ae,Math.max(0,$e-1)),W=X?{width:`${P}px`,height:`${J}px`,left:`${R.x}px`,top:`${R.y}px`}:{width:`${P}px`,height:`${J}px`,right:"20px",bottom:"20px"},K={title:n,onClose:t,onToggleThreadList:ye,isMaximized:B,onToggleMaximize:te,showHome:oe||ie,onHome:ie?T:M,panelTitle:ie?I==null?void 0:I.title:void 0,artifactCount:ie||!s?0:v.length,onToggleArtifactDrawer:ie||!s?void 0:C},ue={conversations:N,activeSessionId:D,onSwitch:A,onNew:M,onDelete:z,onRename:L,hasMore:_,onLoadMore:H},be=S.jsxs("div",{className:`relative z-20 flex min-w-0 flex-col bg-white ${B?"flex-1":"h-full shrink-0"}`,style:B?void 0:{width:`${F}px`,borderRadius:Ne,overflow:"hidden"},children:[q&&!ie&&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 ${q||B?"":"bg-white"} ${B?"cursor-default":"cursor-grab active:cursor-grabbing"}`,onMouseDown:B?void 0:V,children:re?S.jsx(re,{...K}):S.jsx(Em,{...K})}),S.jsx(D0,{contentClassName:`sa-panel-content relative z-[2] ${q?"sa-home-view":""}`,centered:B,composerClassName:"shrink-0",artifactPreview:s,thread:S.jsx(vu,{slots:r,welcomeMessage:o,suggestedPrompts:i,avatar:a,artifactPreview:s,capabilities:l,quickLinks:c,logo:u,showTimestamp:p,collapse:h}),composer:ne?S.jsx(ne,{status:m,onSend:w,onStop:y}):S.jsx(hd,{})})]});return B?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&&(se?S.jsx(se,{...ue}):S.jsx(ml,{width:220})),be]})}):S.jsxs("div",{ref:Ce,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:{...W,borderRadius:Ne},children:[S.jsx("div",{className:"sa-resize-handle absolute bottom-0 left-[-3px] top-0 z-20 w-[6px] cursor-col-resize",onMouseDown:Se=>G(Se)}),he&&(se?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:Pe,transform:`translateX(-${Pe}px)`,borderRadius:`${ce} 0px 0px ${ce}`},children:S.jsx(se,{...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:Pe,transform:`translateX(-${Pe}px)`,borderRadius:`${ce} 0px 0px ${ce}`},children:S.jsx(ml,{width:ae})})),be]})}const mm=()=>{};function O5({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,N)=>{N.stopPropagation(),d===k?(o(k),f(null)):(f(k),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>f(null),3e3))},[d,o]),C=b.useCallback((k,N,D)=>{D.stopPropagation(),h(k),w(N??"")},[]),v=b.useCallback(k=>{m.trim()&&i(k,m.trim()),h(null)},[m,i]),I=b.useRef(null),T=b.useCallback(()=>{const k=I.current;!k||!l||!c||k.scrollHeight-k.scrollTop-k.clientHeight<50&&c()},[l,c]),O=b.useMemo(()=>$m(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:T,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:"暂无记录"}),O.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(N=>{const D=N.sessionId===t,A=d===N.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 ${D?"bg-[#E8F1FE]":"hover:bg-[#E8F1FE]"}`,onClick:()=>{p!==N.sessionId&&n(N.sessionId)},onMouseEnter:M=>{if(p===N.sessionId)return;const z=M.currentTarget.getBoundingClientRect();$({text:N.title||"新会话",x:z.right+8,y:z.top+z.height/2})},onMouseLeave:()=>$(null),children:p===N.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:M=>w(M.target.value),onBlur:()=>v(N.sessionId),onKeyDown:M=>{M.key==="Enter"&&v(N.sessionId),M.key==="Escape"&&h(null)},onClick:M=>M.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:N.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:M=>C(N.sessionId,N.title,M),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:M=>E(N.sessionId,M),title:A?"确认删除":"删除",children:S.jsx(We,{name:A?"x":"trash2",size:12})})]})]})},N.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 L0({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:C,toggleArtifactDrawer:v,allArtifacts:I,activePanel:T,closePanel:O,hasMore:k,loadMoreConversations:N,conversationsLoading:D}=Xn(),[A,M]=b.useState(s),z=b.useCallback(()=>M(R=>!R),[]),L=!!T;b.useEffect(()=>()=>O(),[O]);const _=t.ThreadList,H=t.Composer,F=t.Header;return S.jsxs("div",{className:"sa-fullpage",children:[_?S.jsx("div",{className:`sa-fp-sidebar-wrapper ${A?"":"sa-fp-sidebar-wrapper-collapsed"}`,children:S.jsx(_,{conversations:w,activeSessionId:y,onSwitch:$,onNew:x,onDelete:E,onRename:C,hasMore:k,onLoadMore:N})}):S.jsx(O5,{conversations:w,activeSessionId:y,onSwitch:$,onNew:x,onDelete:E,onRename:C,isCollapsed:!A,onToggleCollapse:z,hasMore:k,onLoadMore:N,conversationsLoading:D}),S.jsxs("div",{className:"sa-fp-main",children:[F?S.jsx(F,{title:L?(T==null?void 0:T.title)??e:e,panelTitle:L?T==null?void 0:T.title:void 0,onClose:l??mm,onToggleThreadList:z,showHome:L,onHome:L?O:mm,artifactCount:L||!u?0:I.length,onToggleArtifactDrawer:L||!u?void 0:v}):S.jsxs("div",{className:"sa-fp-header",children:[S.jsx("div",{className:"sa-fp-header-title",children:L?(T==null?void 0:T.title)??e:e}),S.jsxs("div",{className:"sa-fp-header-actions",children:[L&&S.jsx("button",{className:"sa-fp-header-btn",onClick:O,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:v,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(D0,{contentClassName:"sa-fp-content-row",artifactPreview:u,thread:S.jsx(vu,{slots:t,welcomeMessage:n,suggestedPrompts:r,capabilities:o,quickLinks:i,logo:a,avatar:c,artifactPreview:u,showTimestamp:d,collapse:f}),composer:H?S.jsx(H,{status:p,onSend:h,onStop:m}):S.jsx(hd,{})})]})]})}function F0(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:C}=e,[v,I]=b.useState(l);b.useEffect(()=>{I(l)},[l]);const T=b.useCallback(()=>{var D,A;const N=!v;I(N),c==null||c(N),N?(D=o.onOpen)==null||D.call(o):(A=o.onClose)==null||A.call(o)},[v,o,c]),O=b.useCallback(()=>{var N;I(!1),c==null||c(!1),(N=o.onClose)==null||N.call(o)},[o,c]),k=r.Trigger??Sm;return n==="fullpage"?v?S.jsx(pl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,children:S.jsx(L0,{title:s,slots:r,welcomeMessage:i,suggestedPrompts:a,capabilities:p,quickLinks:h,logo:m,sidebarDefaultOpen:u,onClose:O,avatar:d,artifactPreview:f,showTimestamp:$,collapse:C})}):null:S.jsxs(pl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,children:[S.jsx(k,{isOpen:v,onClick:T,triggerLogo:w}),S.jsx(z5,{isOpen:v,onClose:O,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:C})]})}const _0=`
|
|
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 KA={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},YA={motionBase:!0,motionUnit:!0},QA=ya(Gc.defaultAlgorithm),ZA={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},w0=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o,...i}=t;let a={...r,override:o};return a=GA(a),i&&Object.entries(i).forEach(([s,l])=>{const{theme:c,...u}=l;let d=u;c&&(d=w0({...a,...u},{override:u},c)),a[s]=d}),a};function v0(){const{token:e,hashed:t,theme:n,override:r,cssVar:o,zeroRuntime:i}=b.useContext(Gc._internalContext),a={prefix:(o==null?void 0:o.prefix)??"ant",key:(o==null?void 0:o.key)??"css-var-root"},s=n||QA,[l,c,u]=xh(s,[Gc.defaultSeed,e],{salt:`${qA}-${t||""}`,override:r,getComputedToken:w0,cssVar:{...a,unitless:KA,ignore:YA,preserve:ZA}});return[s,u,t?c:"",l,a,!!i]}function JA(){const[e,t,n]=v0();return{theme:e,token:t,hashId:n}}const{genStyleHooks:e5}=Wh({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=vo();return{iconPrefixCls:t,rootPrefixCls:e()}},useToken:()=>{const[e,t,n,r,o,i]=v0();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o,zeroRuntime:i}},useCSP:()=>{const{csp:e}=vo();return e??{}},layer:{name:"antdx"}}),ms=b.createContext(null),gs=b.forwardRef((e,t)=>{const{className:n,action:r,onClick:o,...i}=e,a=b.useContext(ms),{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:Y(s,n,{[`${s}-disabled`]:u})}))});function t5(e,t){return g.createElement(gs,$t({icon:g.createElement(y0,null)},e,{action:"onClear",ref:t}))}const n5=g.forwardRef(t5),r5=b.memo(e=>{const{className:t}=e,[n]=g0("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"})))}),C0=g.forwardRef((e,t)=>{const{prefixCls:n}=g.useContext(ms),{className:r}=e;return g.createElement(gs,$t({icon:g.createElement(r5,{className:`${n}-loading-icon`}),color:"primary",variant:"text",shape:"circle"},e,{className:Y(r,`${n}-loading-button`),action:"onCancel",ref:t}))});function o5(e,t){return g.createElement(gs,$t({icon:g.createElement(h0,null),type:"primary",shape:"circle"},e,{action:"onSend",ref:t}))}const S0=g.forwardRef(o5),hs=b.createContext({}),i5=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(T){tn(!1,"Sender",`Failed to select all content: ${T}`)}},[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:T}=r();if(I&&T)try{const O=Math.min(v,x.childNodes.length);I.setStart(x,O),I.setEnd(x,O),I.collapse(!1),o(I,T)}catch(O){tn(!1,"Sender",`Failed to set cursor position:: ${O}`)}return{range:I,selection:T}},[a,r,o]),d=b.useCallback((x,E,v=!1)=>{if(!e||!(x!=null&&x.current))return;const{getSlotDom:C,slotConfigMap:I}=e,T=N=>{var z;const D=C(N);if(!D)return null;const A=I.get(N);if(!A)return null;if(A.type==="input")return D.querySelector("input");const M=((z=D==null?void 0:D.getAttribute)==null?void 0:z.call(D,"data-node-type"))||"";return A.type==="content"&&M!=="nbsp"?D:null},k=(N=>{var A;const D=x.current;if(!D)return null;if(N)return T(N);for(const M of Array.from(D.childNodes)){const z=(A=M==null?void 0:M.getAttribute)==null?void 0:A.call(M,"data-slot-key");if(z){const L=T(z);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 O=C.endContainer.lastChild;C=document.createRange(),C.setStart(O,O.length),C.setEnd(O,O.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 A=r();C=A.range,I=A.selection}if(!C||!I)return{type:"end",selection:I};const T=E==null?void 0:E.current;if(!T)return{type:"end",selection:I};const O=T.contains(C.endContainer),k=T.contains(C.startContainer);if(!O)return s(T,!0),{type:"end",selection:I};if(!k)return l(T,!0),{type:"start",selection:I};const N=n(C.endContainer,T),D=n(C.startContainer,T);if(N===D&&D!==T&&(e!=null&&e.getNodeInfo)){const{slotKey:A,slotConfig:M,skillKey:z}=e.getNodeInfo(N)||{};if(A)return{type:"slot",slotKey:M==null?void 0:M.key,slotType:M==null?void 0:M.type,range:C,selection:I};if(z)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}},lm=4.35,a5=(e,t,n)=>{const{token:r}=JA(),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"}},s5=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=Y(`${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=Y(`${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)}}},l5=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=l5.has(o)?i.defaultValue:i.value??i.label;return t[r]=a??"",t},{}))??{},c5=(e,t)=>{e==null||e.forEach(n=>{n.key&&t.set(n.key,n)})},u5=(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}},d5=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)}),c5(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=>u5(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:Y(`${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)}`,T=Pu("sender"),O=`${I}-input`,k=b.useRef(null),N=b.useRef(new Map),D=b.useRef(!1),A=b.useRef(!1),M=b.useRef(null),z=b.useRef(null),L=b.useRef(null),j={...(Be=T.styles)==null?void 0:Be.input,...d.input},H=a5(j,p,k),R={...Qa(E,{attr:!0,aria:!0,data:!0}),ref:k},[X,{getSlotValues:B,setSlotValues:P,getNodeInfo:J,mergeSlotConfig:V,getNodeTextValue:G,clear:te}]=d5($),[_,Q]=b.useState(new Map),[le,fe]=b.useState(null),{setEndCursor:q,setStartCursor:oe,setAllSelectCursor:ie,setCursorPosition:Ce,setSlotFocus:ne,setAfterNodeFocus:re,getTextBeforeCursor:se,removeAllRanges:ye,getRange:ae,getInsertPosition:he,getEndRange:ce,getStartRange:Ne,getSelection:$e,copySelectionString:Pe,getCleanedText:W}=i5({prefixCls:I,getSlotDom:U=>N.current.get(U),slotConfigMap:X,getNodeInfo:J,getEditorValue:()=>Me()}),{buildSkillSpan:K,buildEditSlotSpan:ue,buildSlotSpan:be,buildSpaceSpan:Se,getSlotDom:de,saveSlotDom:ee,getSlotLastDom:Ee}=s5({prefixCls:I,placeholder:m,slotDomMap:N,slotConfigMap:X}),Ie=U=>{const ge=Me();z.current&&(!(ge!=null&&ge.value)&&ge.slotConfig.length===0&&m?(z.current.setAttribute("contenteditable","true"),z.current.classList.add(`${I}-skill-empty`)):(z.current.setAttribute("contenteditable","false"),z.current.classList.remove(`${I}-skill-empty`))),n==null||n(ge.value,U,ge.slotConfig,ge.skill)},Ge=(U,ge,pe)=>{const we=de(U),Te=X.get(U);if(P(ke=>({...ke,[U]:ge})),we&&Te){const ke=Re(Te,we);Q(Fe=>{const De=new Map(Fe);return De.set(U,ke),De}),Ie(pe)}},Re=(U,ge)=>{if(!U.key)return null;const pe=B()[U.key],we=()=>{var Te,ke,Fe,De,ft,Pt,ht,Ct,mt;switch(U.type){case"content":return ge.innerHTML=pe||"",ge.setAttribute("data-placeholder",((Te=U.props)==null?void 0:Te.placeholder)||""),null;case"input":return b.createElement(Vr,{readOnly:l,className:`${I}-slot-input`,placeholder:((ke=U.props)==null?void 0:ke.placeholder)||"","data-slot-input":U.key,size:"small",variant:"borderless",value:pe||"",tabIndex:0,onKeyDown:Rt,onChange:Lt=>{Ge(U.key,Lt.target.value,Lt)},spellCheck:!1});case"select":return b.createElement(Yx,{disabled:l,menu:{items:(De=(Fe=U.props)==null?void 0:Fe.options)==null?void 0:De.map(Lt=>({label:Lt,key:Lt})),defaultSelectedKeys:(ft=U.props)!=null&&ft.defaultValue?[U.props.defaultValue]:[],selectable:!0,onSelect:({key:Lt,domEvent:Le})=>{Ge(U.key,Lt,Le)}},trigger:["click"]},b.createElement("span",{className:Y(`${I}-slot-select`,{placeholder:!pe,[`${I}-slot-select-selector-value`]:pe})},b.createElement("span",{"data-placeholder":(Pt=U.props)==null?void 0:Pt.placeholder,className:`${I}-slot-select-value`},pe||""),b.createElement("span",{className:`${I}-slot-select-arrow`},b.createElement(i0,null))));case"tag":return b.createElement("span",{className:`${I}-slot-tag`},((ht=U.props)==null?void 0:ht.label)||((Ct=U.props)==null?void 0:Ct.value)||"");case"custom":return(mt=U.customRender)==null?void 0:mt.call(U,pe,Lt=>{Ge(U.key,Lt)},{disabled:s,readOnly:l},U);default:return null}};return po.createPortal(we(),ge)},ze=U=>U.reduce((ge,pe)=>{if(pe.type==="text")return ge.push(document.createTextNode(pe.value||"")),ge;const we=pe.key;if(tn(!!we,"Sender",`Slot key is missing: ${we}`),we){let Te,ke;if(pe.type==="content"){ke=ue(pe);const Fe=Se(we,"before"),De=Se(we,"after");Te=[Fe,ke,De],ee(`${we}_before`,Fe),ee(we,ke),ee(`${we}_after`,De)}else ke=be(we),Te=[ke],ee(we,ke);if(ke){const Fe=Re(pe,ke);Fe&&(Q(De=>{const ft=new Map(De);return ft.set(we,Fe),ft}),ge.push(...Te))}}return ge},[]),Me=()=>{const U=k.current,ge={value:"",slotConfig:[],skill:void 0};if(!U)return ge;const pe=U.childNodes;if(pe.length===0)return U.innerHTML="",z.current=null,ge;const we=!!x,Te=new Array(pe.length),ke=[];let Fe,De=0;for(let Pt=0;Pt<pe.length;Pt++){const ht=pe[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 Hn=X.get(Tt);Hn&&ke.push({...Hn,value:Ct})}}}}const ft=Te.slice(0,De).join("");return Fe||(z.current=null),{value:ft,slotConfig:ke,skill:Fe}},it=()=>{var ge;const U=k.current;U&&(U.innerHTML="",z.current=null,L.current=null,M.current=null,ye(),(ge=N==null?void 0:N.current)==null||ge.clear())},Qe=U=>{U.forEach(ge=>{var pe;(pe=k.current)==null||pe.appendChild(ge)})},It=(U,ge)=>{const pe=k.current;pe&&(pe.querySelectorAll(`[data-slot-key="${U}"]`).forEach(we=>{we.remove()}),N.current.delete(U),P(we=>{const{[U]:Te,...ke}=we;return ke}),Q(we=>{const Te=new Map(we);return Te.delete(U),Te}),Ie(ge))},wt=()=>{if(x&&L.current!==x){Ot(!1),L.current=x;const U=K(x.value),ge=po.createPortal(b.createElement(E0,$t({removeSkill:Ot},x,{prefixCls:I})),U);fe(ge);const pe=document.createRange(),we=k.current;if(!we)return;pe.setStart(we,0),pe.insertNode(U),z.current=U,Ie()}},Ot=(U=!0)=>{var pe;!k.current||!z.current||((pe=z.current)==null||pe.remove(),z.current=null,L.current=null,U&&Ie())},gt=U=>{c!=="enter"||!U||U.querySelectorAll("br").forEach(ge=>{ge.remove()})},_t=()=>{$&&$.length>0&&k.current&&(it(),Qe(ze($)))},jt=U=>{const ge=o==null?void 0:o(U);return A.current||D.current||ge===!1},_e=(U,ge)=>{var Fe,De,ft;if(!k.current)return!1;const{range:pe,selection:we}=ae();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&&pe){const Pt=ke.parentNode,ht=J(Pt),Ct=pe.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 U.preventDefault(),ge==="cut"&&Pe(),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 U.preventDefault(),It(Ct,U),!0;if(mt)return U.preventDefault(),Ot(),!0}}}return!1},pt=U=>{const{key:ge,shiftKey:pe,ctrlKey:we,altKey:Te,metaKey:ke}=U;if(ge!=="Enter")return!1;const Fe=we||Te||ke;return c==="enter"&&!pe&&!Fe||c==="shiftEnter"&&pe&&!Fe},Cn=()=>{if(!z.current||!k.current||z.current.getAttribute("contenteditable")==="false")return;const U=$e();!(U!=null&&U.anchorNode)||!z.current.contains(U.anchorNode)||!k.current.contains(U.anchorNode)||(z.current.setAttribute("contenteditable","false"),z.current.classList.remove(`${I}-skill-empty`),Ze({cursor:"end"}))},_n=()=>{D.current=!0},jn=()=>{D.current=!1,A.current=!1},Rt=U=>{if(!jt(U)&&!(U.key==="Backspace"&&_e(U,"backspace"))){if(pt(U)){U.preventDefault(),A.current=!0,h==null||h();return}if((U.key==="a"||U.key==="A")&&(U.ctrlKey||U.metaKey)&&!U.shiftKey&&!U.altKey){ie(k.current,z.current),U.preventDefault();return}Cn()}},Sn=U=>{w==null||w(U)},Ht=U=>{A.current&&(A.current=!1);const{range:ge}=ae();M.current=ge;const pe=setTimeout(()=>{M.current=null,clearTimeout(pe)},200);y==null||y(U)},an=U=>{gt(k==null?void 0:k.current),Ie(U)},Bn=U=>{_e(U,"cut")},fn=U=>{var we,Te;U.preventDefault();const ge=(we=U.clipboardData)==null?void 0:we.files,pe=(Te=U.clipboardData)==null?void 0:Te.getData("text/plain");if(!pe&&(ge!=null&&ge.length)&&a){a(ge);return}if(pe){let ke=!1;const Fe=W(pe);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(U)},pn=U=>{U.key==="Enter"&&(A.current=!1),r==null||r(U)},en=()=>{const U=k.current,ge=$e();U&&(ge==null?void 0:ge.focusNode)===U&&ge.focusOffset===0&&Me().skill&&Ce(U,k.current,1)},Dt=(U,ge,pe,we)=>{const Te=k.current;if(Te)try{V(U);const ke=ze(U);if(ke.length===0)return;const Fe=at(ge,Te);if(!Fe.range||!Fe.selection)return;const{range:De,selection:ft}=Fe;pe!=null&&pe.length&&Vt(De,pe,Te),De.deleteContents(),vt(ke,De,Fe),Oe(ke,De,ft,we)}catch(ke){tn(!1,"Sender",`Insert operation failed: ${ke}`)}},at=(U,ge)=>{const{type:pe,slotKey:we,slotType:Te,range:ke,selection:Fe}=he(U,k,M);if(!Fe)return{range:null,selection:null,type:pe};let De=null;switch(pe){case"end":De=ce(ge);break;case"start":De=Ne(ge);break;case"slot":De=ae().range;break;case"box":De=ke||null,De&&z.current&&De.collapsed&&De.startOffset===0&&De.setStartAfter(z.current);break}return{range:De,selection:Fe,type:pe,slotKey:we,slotType:Te}},Vt=(U,ge,pe)=>{const{value:we,startContainer:Te,startOffset:ke}=se(pe);we.length>=ge.length&&we.endsWith(ge)&&Te&&ke>=0&&(U.setStart(Te,ke-ge.length),U.setEnd(Te,ke),U.deleteContents())},vt=(U,ge,pe)=>{const{type:we,slotKey:Te,slotType:ke}=pe;let Fe=!0;U.forEach(De=>{if(Fe&&we==="slot"&&(ke!=="content"||De.nodeType!==Node.TEXT_NODE)&&Te){Fe=!1;const ft=Ee(Te);ft&&ge.setStartAfter(ft)}ge.insertNode(De),ge.setStartAfter(De)})},Oe=(U,ge,pe,we)=>{const Te=U[U.length-1];re(Te,k.current,ge,pe,we),setTimeout(()=>{an(null)},0)},Ze=U=>{const ge={preventScroll:(U==null?void 0:U.preventScroll)??!1,cursor:(U==null?void 0:U.cursor)??"end",key:U==null?void 0:U.key};switch(ge.cursor){case"slot":ne(k,U==null?void 0:U.key,ge.preventScroll);break;case"start":oe(k.current,ge.preventScroll);break;case"all":ie(k.current,z.current,ge.preventScroll);break;case"end":q(k.current,ge.preventScroll);break}},st=()=>{var ge;const U=k.current;U&&(U.innerHTML="",L.current=null,z.current=null,te(),wt(),M.current=null,(ge=N==null?void 0:N.current)==null||ge.clear(),an(null))};return b.useEffect(()=>{_t(),x?wt():Ie()},[$]),b.useEffect(()=>{wt()},[x]),b.useImperativeHandle(t,()=>({nativeElement:k.current,focus:Ze,blur:()=>{var U;return(U=k.current)==null?void 0:U.blur()},insert:Dt,clear:st,getValue:Me})),b.createElement(b.Fragment,null,b.createElement("div",$t({},R,{role:"textbox",tabIndex:0,style:{...j,...H},className:Y(O,`${O}-slot`,T.classNames.input,f.input,{[`${I}-rtl`]:v==="rtl"}),"data-placeholder":m,contentEditable:!l,suppressContentEditableWarning:!0,spellCheck:!1,onCut:Bn,onKeyDown:Rt,onKeyUp:pn,onPaste:fn,onCompositionStart:_n,onCompositionEnd:jn,onFocus:Sn,onBlur:Ht,onSelect:en,onInput:an},E)),b.createElement("div",{style:{display:"none"},id:`${I}-slot-placeholders`},Array.from(_.values()),le))});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(WA,{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 f5=I0.default=p5;function p5(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 m5(e,t,n){return f5(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=(H,F="cursor")=>{var J,V;const R=(V=(J=v.current)==null?void 0:J.resizableTextArea)==null?void 0:V.textArea,X=R.value;let B=X.length,P=X.length;F==="cursor"&&(B=R==null?void 0:R.selectionStart,P=R==null?void 0:R.selectionEnd),F==="start"&&(B=0,P=0),R.value=X.substring(0,B)+H+X.substring(P,X.length),R.selectionStart=B+H.length,R.selectionEnd=B+H.length,R.focus(),r==null||r(R.value)},I=()=>{r==null||r("")},T=()=>({value:n||"",slotConfig:[]});b.useImperativeHandle(t,()=>{var H,F,R,X;return{nativeElement:(F=(H=v.current)==null?void 0:H.resizableTextArea)==null?void 0:F.textArea,focus:(R=v.current)==null?void 0:R.focus,blur:(X=v.current)==null?void 0:X.blur,insert:C,clear:I,getValue:T}});const O=b.useRef(!1),k=()=>{O.current=!0},N=()=>{O.current=!1},D=H=>{const F=i==null?void 0:i(H),{key:R,shiftKey:X,ctrlKey:B,altKey:P,metaKey:J}=H;if(!(O.current||R!=="Enter"||F===!1)&&R==="Enter"){const V=B||P||J;if(u==="enter"&&!X&&!V||u==="shiftEnter"&&X&&!V){H.preventDefault(),w==null||w();return}}},A=H=>{var X,B;const F=(X=H.clipboardData)==null?void 0:X.files;!((B=H.clipboardData)==null?void 0:B.getData("text/plain"))&&(F!=null&&F.length)&&s&&(s(F),H.preventDefault()),a==null||a(H)},M=m5(m,["input"],Vr.TextArea),L={...Qa(E,{attr:!0,aria:!0,data:!0}),ref:v},j=H=>{r==null||r(H.target.value,H)};return b.createElement(M,$t({},L,{disabled:l,style:f.input,className:Y(`${d}-input`,p.input),autoSize:h,value:n,onChange:j,onKeyUp:o,onCompositionStart:k,onCompositionEnd:N,onKeyDown:D,onPaste:A,variant:"borderless",readOnly:c,placeholder:y,onFocus:$,onBlur:x}))});process.env.NODE_ENV!=="production"&&(R0.displayName="TextArea");function g5(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 h5(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:Y(m,w,$,i,{[`${w}-rtl`]:p==="rtl"}),style:{...x,...a}},(u!==!1||t)&&g.createElement("div",{className:Y(`${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:Y(`${w}-content`,s.content),style:{...l.content}},o)))}const b5=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"}}}}},x5=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%"}}}},y5=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}}}}}},w5=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"}}}},v5=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=e5("Sender",e=>{const{paddingXS:t,calc:n}=e,r=yt(e,{SenderContentMaxWidth:`calc(100% - ${xe(n(t).add(32).equal())})`});return[w5(r),b5(r),y5(r),x5(r)]},v5),ea={SendButton:S0,ClearButton:n5,LoadingButton:C0,SpeechButton:k0},C5=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:T,header:O,onPaste:k,onPasteFile:N,autoSize:D={maxRows:8},placeholder:A,onFocus:M,onBlur:z,skill:L,...j}=e,H=Qa(j,{attr:!0,aria:!0,data:!0}),F=b.useId(),R=Array.isArray(u)||(L==null?void 0:L.value),{direction:X,getPrefixCls:B}=vo(),P=B("sender",n),J=b.useRef(null),V=b.useRef(null);mh(t,()=>{var de;return{nativeElement:J.current,inputElement:(de=V.current)==null?void 0:de.nativeElement,focus:ee=>{var Ee;return(Ee=V.current)==null?void 0:Ee.focus(ee)},blur:()=>{var ee;return(ee=V.current)==null?void 0:ee.blur()},insert:(...ee)=>{var Ee,Ie;return(Ie=(Ee=V.current)==null?void 0:Ee.insert)==null?void 0:Ie.call(Ee,...ee)},clear:()=>{var ee;return(ee=V.current)==null?void 0:ee.clear()},getValue:()=>{var ee;return((ee=V.current)==null?void 0:ee.getValue())??{value:"",slotConfig:[],skill:void 0}}}});const G=Pu("sender"),te=`${P}-input`,[_,Q]=T0(P),le=Y(P,G.className,i,a,G.classNames.root,o.root,_,Q,`${P}-main`,{[`${P}-rtl`]:X==="rtl",[`${P}-disabled`]:v}),fe=`${P}-actions-btn`,q=`${P}-actions-list`,[oe,ie]=un(l||"",c),Ce=(de,ee,Ee,Ie)=>{ie(de),y==null||y(de,ee,Ee??[],Ie)},[ne,re,se]=g5(de=>{var ee,Ee;R?(Ee=(ee=V.current)==null?void 0:ee.insert)==null||Ee.call(ee,[{type:"text",value:de}]):Ce(`${oe} ${de}`)},C),ye=()=>{if(V!=null&&V.current&&p&&!h&&!W){const de=V.current.getValue();p(de.value,de.slotConfig,de.skill)}},ae=()=>{var de,ee;Ce(""),R&&((ee=(de=V.current)==null?void 0:de.clear)==null||ee.call(de))},he=b.createElement(e0,{className:`${q}-presets`},C&&b.createElement(k0,null),h?b.createElement(C0,null):b.createElement(S0,null));let ce=he;typeof $=="function"?ce=$(he,{components:ea}):($||$===!1)&&(ce=$);const Ne=typeof I=="function"?I(he,{components:ea}):I||null,$e=typeof O=="function"?O(he,{components:ea}):O||null,Pe=typeof T=="function"?T(he,{components:ea}):T||null,[W,K]=b.useState(!oe),ue={prefixCls:fe,onSend:ye,onSendDisabled:!oe,onClear:ae,onClearDisabled:!oe,onCancel:w,onCancelDisabled:!h,onSpeech:()=>re(!1),onSpeechDisabled:!ne,speechRecording:se,disabled:v,setSubmitDisabled:K},be=b.useMemo(()=>({value:oe,onChange:Ce,slotConfig:u,onKeyUp:x,onKeyDown:E,onPaste:k,onPasteFile:N,disabled:v,readOnly:d,submitType:f,prefixCls:P,styles:r,classNames:o,autoSize:D,components:m,triggerSend:ye,placeholder:A,onFocus:M,onBlur:z,skill:L,...j}),[oe,Ce,u,x,E,k,N,v,d,f,P,r,o,D,m,ye,A,M,z,L,j]),Se=de=>{var ee,Ee,Ie;!R&&de.target!==((ee=J.current)==null?void 0:ee.querySelector(`.${te}`))&&de.preventDefault(),de.target===((Ee=J.current)==null?void 0:Ee.querySelector(`.${te}`))&&((Ie=V.current)==null||Ie.focus())};return b.createElement("div",$t({key:F,ref:J,className:le,style:{...G.style,...s,...G.styles.root,...r.root}},H),b.createElement(hs.Provider,{value:be},b.createElement(ms.Provider,{value:ue},$e&&b.createElement(P0.Provider,{value:{prefixCls:P}},$e),b.createElement("div",{className:Y(`${P}-content`,o.content),style:r.content,onMouseDown:Se},Ne&&b.createElement("div",{className:Y(`${P}-prefix`,G.classNames.prefix,o.prefix),style:{...G.styles.prefix,...r.prefix}},Ne),R?b.createElement($0,{ref:V}):b.createElement(R0,{ref:V}),ce&&b.createElement("div",{className:Y(q,G.classNames.suffix,o.suffix),style:{...G.styles.suffix,...r.suffix}},ce)),Pe&&b.createElement("div",{className:Y(`${P}-footer`,G.classNames.footer,o.footer),style:{...G.styles.footer,...r.footer}},Pe))))}),N0=C5;process.env.NODE_ENV!=="production"&&(N0.displayName="Sender");const S5=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:T}=vo(),O=T("sender",w||E),k=`${O}-switch`,[N,D]=T0(O),A=g.useRef(null);mh(t,()=>({nativeElement:A.current}));const[M,z]=un(d,f),L=Pu("sender"),j=Y(O,k,r,c,L.classNames.switch,x.switch,o.root,N,D,{[`${k}-checked`]:M,[`${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:Y(`${k}-content`,o.content),style:i.content,styles:{icon:i.icon,content:i.title},classNames:{icon:o.icon,content:o.title},variant:"outlined",color:M?"primary":"default",icon:a,onClick:()=>{const H=!M;z(H),l==null||l(H)}},M?p:h,n))}),pd=N0;pd.Header=h5;pd.Switch=S5;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 E5({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 $5({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=T=>{const O=C.indexOf(y.current),k=O===-1?C[0]:C[(O+T+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 T=m.current[y.current];return!T||!T.selectable?!1:(v.preventDefault(),$.current(T),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 k5=10,I5="sa-sender",R5=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent);function P5({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}=Xn(),[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(M=>M.attachment),y=u.some(M=>!M.attachment&&M.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((M,z,L,j)=>{s(M),j||c(H=>H&&null)},[]),C=b.useCallback(M=>{c(M),setTimeout(()=>{var z;return(z=f.current)==null?void 0:z.focus()},0)},[]),I=$5({sdk:r,input:a,onSelect:C}),T=b.useCallback(M=>{const z=Array.from(M.target.files??[]);if(M.target.value="",!h||z.length===0)return;const L=k5-u.length,j=z.slice(0,Math.max(0,L));if(j.length===0)return;const H=j.map(F=>({key:`${F.name}_${F.size}_${Date.now()}_${Math.random().toString(36).slice(2,6)}`,file:F,status:"uploading"}));d(F=>[...F,...H]);for(const{key:F,file:R}of H)(o||zn.createNosUploader({baseURL:i.baseURL,headers:i.headers,trunkSize:i.trunkSize,onProgress:B=>d(P=>P.map(J=>J.key===F?{...J,percent:B}:J))}))(R).then(B=>{d(P=>P.map(J=>J.key===F?{...J,attachment:{...B,filename:B.filename||R.name,size:B.size??R.size,mime:B.mime??R.type}}:J))}).catch(B=>{d(P=>P.map(J=>J.key===F?{...J,status:"error",errorMsg:B instanceof Error?B.message:String(B)}:J))})},[o,i,u]),O=b.useCallback(M=>{d(z=>z.filter(L=>L.key!==M))},[]),k=b.useCallback(()=>{var H;if(!x)return;const M=a.trim(),z=w.map(F=>F.attachment),L=l?`/${l.code}${M?` ${M}`:""}`:M,j=l?`/${l.displayName||l.name}${M?` ${M}`:""}`:void 0;t(L,z.length>0?z:void 0,j),(H=f.current)==null||H.clear(),s(""),c(null),d([])},[x,a,l,w,t]),N=b.useCallback(M=>{if(I.handleKeyDown(M))return!1;if(M.key==="Enter")return(M.metaKey||M.ctrlKey)&&(M.preventDefault(),k()),!1},[k,I.handleKeyDown]),D=b.useCallback(()=>{var M;m||(M=f.current)==null||M.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 M;return(M=p.current)==null?void 0:M.click()},children:S.jsx(P5,{size:15})}),S.jsx("input",{ref:p,type:"file",multiple:!0,className:"hidden",onChange:T,"aria-label":"选择附件"}),!m&&S.jsxs("span",{className:"sa-send-hint","aria-hidden":"true",children:[S.jsx("kbd",{className:"sa-send-kbd",children:R5?"⌘":"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(E5,{items:I.items,activeIndex:I.activeIndex,onSelect:C}),u.length>0&&S.jsx("div",{className:"sa-attachment-tray mb-1.5",onClick:M=>M.stopPropagation(),children:u.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(We,{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?_g(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:()=>O(M.key),children:"✕"})]},M.key))}),S.jsx("div",{className:"sa-composer-shell",onClick:D,children:S.jsx(b.Fragment,{children:S.jsx(pd,{ref:f,prefixCls:I5,rootClassName:`sa-input-form ${$?"sa-input-form-active":""} ${m?"sa-input-form-streaming":""}`,skill:E,onChange:v,onKeyDown:N,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生成仅供参考"})]})}function T5({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 N5({artifacts:e,initialArtifact:t,onClose:n}){const[r,o]=b.useState(t?{mode:"preview",artifact:t}:{mode:"list"}),[i,a]=b.useState(!1),s=b.useRef(null),[l,c]=b.useState(340),u=b.useRef(null);b.useEffect(()=>{t&&(s.current&&(clearTimeout(s.current),s.current=null,a(!1)),o({mode:"preview",artifact:t}))},[t]);const d=b.useCallback(()=>{a(!0),s.current=setTimeout(()=>{s.current=null,n()},240)},[n]);b.useEffect(()=>()=>{var m;s.current&&clearTimeout(s.current),(m=u.current)==null||m.call(u)},[]);const f=b.useCallback(m=>{o({mode:"preview",artifact:m})},[]),p=b.useCallback(()=>{o({mode:"list"})},[]);b.useEffect(()=>{const m=w=>{w.key==="Escape"&&d()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[d]);const h=b.useCallback(m=>{m.preventDefault();const w=m.clientX,y=l,$=E=>{const v=w-E.clientX;c(Math.max(240,Math.min(window.innerWidth*.7,y+v)))},x=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",x),document.body.style.cursor="",document.body.style.userSelect="",u.current=null};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",$),document.addEventListener("mouseup",x),u.current=x},[l]);return S.jsxs("div",{className:`sa-artifact-drawer ${i?"sa-drawer-closing":""}`,style:{width:l},children:[S.jsx("div",{className:"sa-drawer-resize-handle",onMouseDown:h}),S.jsxs("div",{className:"sa-artifact-drawer-header",children:[r.mode==="preview"?S.jsxs(S.Fragment,{children:[S.jsx("button",{className:"sa-drawer-btn",onClick:p,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.jsx("span",{className:"sa-artifact-drawer-title",children:r.artifact.filename})]}):S.jsxs(S.Fragment,{children:[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.jsx("div",{style:{flex:1}}),r.mode==="preview"&&S.jsx("button",{className:"sa-drawer-btn",onClick:()=>void fa(r.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"})})}),S.jsx("button",{className:"sa-drawer-btn",onClick:d,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:r.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,w)=>S.jsxs("li",{className:"sa-drawer-file-card",onClick:()=>f(m),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),f(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:y=>{y.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-${w}`))}):S.jsx("div",{className:"sa-drawer-view-enter",children:S.jsx(T5,{artifact:r.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 M5="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}=Xn();if(a)return S.jsx(A0,{page:a,onBack:s,centered:t});const p=t?M5:"";return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:`${e} ${p}`,children:[l?S.jsxs("div",{className:"sa-messages-loading",children:[S.jsx("span",{className:"sa-loading-spinner"}),"加载对话..."]}):r,i&&c&&S.jsx(N5,{artifacts:u,initialArtifact:d,onClose:f})]}),n?S.jsx("div",{className:`${n} ${p}`,children:o}):o]})}function A5({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,allArtifacts:C,activePanel:I,closePanel:T,messages:O,messagesLoading:k,conversations:N,activeConversationId:D,switchConversation:A,newConversation:M,deleteConversation:z,renameConversation:L,hasMore:j,loadMoreConversations:H}=Xn(),{width:F,position:R,hasCustomPosition:X,isMaximized:B,totalWidth:P,windowHeight:J,startWindowDrag:V,startResize:G,toggleMaximize:te,reset:_,setLockedHeight:Q}=U0({defaultWidth:d??Ut.DEFAULT_WIDTH,defaultHeight:f??Ut.DEFAULT_HEIGHT,sidebarWidth:0}),le=b.useRef(null),fe=b.useRef(null),q=!k&&O.length===0,oe=!k&&O.length>0,ie=!!I;b.useEffect(()=>{e||(_(),T())},[e,_,T]),b.useEffect(()=>{x(B?le.current??!0:fe.current??!1)},[B,x]),b.useEffect(()=>{oe||Q(null)},[oe,Q]);const Ce=G0({enabled:e&&oe&&!B&&!ie,contentSelector:".sa-panel-content",defaultHeight:f??Ut.DEFAULT_HEIGHT,onHeightChange:Q});if(!e)return null;const ne=r.Header,re=r.Composer,se=r.ThreadList,ye=()=>{const Se=!E;$(),B?le.current=Se:fe.current=Se},ae=200,he=E&&!B,ce="var(--sa-radius, 16px)",Ne=he?`0px ${ce} ${ce} 0px`:`${ce} ${ce} ${ce} ${ce}`,$e=X?R.x:window.innerWidth-P-20,Pe=Math.min(ae,Math.max(0,$e-1)),W=X?{width:`${P}px`,height:`${J}px`,left:`${R.x}px`,top:`${R.y}px`}:{width:`${P}px`,height:`${J}px`,right:"20px",bottom:"20px"},K={title:n,onClose:t,onToggleThreadList:ye,isMaximized:B,onToggleMaximize:te,showHome:oe||ie,onHome:ie?T:M,panelTitle:ie?I==null?void 0:I.title:void 0,artifactCount:ie||!s?0:C.length,onToggleArtifactDrawer:ie||!s?void 0:v},ue={conversations:N,activeSessionId:D,onSwitch:A,onNew:M,onDelete:z,onRename:L,hasMore:j,onLoadMore:H},be=S.jsxs("div",{className:`relative z-20 flex min-w-0 flex-col bg-white ${B?"flex-1":"h-full shrink-0"}`,style:B?void 0:{width:`${F}px`,borderRadius:Ne,overflow:"hidden"},children:[q&&!ie&&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 ${q||B?"":"bg-white"} ${B?"cursor-default":"cursor-grab active:cursor-grabbing"}`,onMouseDown:B?void 0:V,children:ne?S.jsx(ne,{...K}):S.jsx(Cm,{...K})}),S.jsx(z0,{contentClassName:`sa-panel-content relative z-[2] ${q?"sa-home-view":""}`,centered:B,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:re?S.jsx(re,{status:m,onSend:w,onStop:y}):S.jsx(md,{})})]});return B?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&&(se?S.jsx(se,{...ue}):S.jsx(fl,{width:220})),be]})}):S.jsxs("div",{ref:Ce,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:{...W,borderRadius:Ne},children:[S.jsx("div",{className:"sa-resize-handle absolute bottom-0 left-[-3px] top-0 z-20 w-[6px] cursor-col-resize",onMouseDown:Se=>G(Se)}),he&&(se?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:Pe,transform:`translateX(-${Pe}px)`,borderRadius:`${ce} 0px 0px ${ce}`},children:S.jsx(se,{...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:Pe,transform:`translateX(-${Pe}px)`,borderRadius:`${ce} 0px 0px ${ce}`},children:S.jsx(fl,{width:ae})})),be]})}const fm=()=>{};function z5({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,N)=>{N.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,N,D)=>{D.stopPropagation(),h(k),w(N??"")},[]),C=b.useCallback(k=>{m.trim()&&i(k,m.trim()),h(null)},[m,i]),I=b.useRef(null),T=b.useCallback(()=>{const k=I.current;!k||!l||!c||k.scrollHeight-k.scrollTop-k.clientHeight<50&&c()},[l,c]),O=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:T,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:"暂无记录"}),O.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(N=>{const D=N.sessionId===t,A=d===N.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 ${D?"bg-[#E8F1FE]":"hover:bg-[#E8F1FE]"}`,onClick:()=>{p!==N.sessionId&&n(N.sessionId)},onMouseEnter:M=>{if(p===N.sessionId)return;const z=M.currentTarget.getBoundingClientRect();$({text:N.title||"新会话",x:z.right+8,y:z.top+z.height/2})},onMouseLeave:()=>$(null),children:p===N.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:M=>w(M.target.value),onBlur:()=>C(N.sessionId),onKeyDown:M=>{M.key==="Enter"&&C(N.sessionId),M.key==="Escape"&&h(null)},onClick:M=>M.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:N.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:M=>v(N.sessionId,N.title,M),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:M=>E(N.sessionId,M),title:A?"确认删除":"删除",children:S.jsx(We,{name:A?"x":"trash2",size:12})})]})]})},N.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:T,closePanel:O,hasMore:k,loadMoreConversations:N,conversationsLoading:D}=Xn(),[A,M]=b.useState(s),z=b.useCallback(()=>M(R=>!R),[]),L=!!T;b.useEffect(()=>()=>O(),[O]);const j=t.ThreadList,H=t.Composer,F=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:N})}):S.jsx(z5,{conversations:w,activeSessionId:y,onSwitch:$,onNew:x,onDelete:E,onRename:v,isCollapsed:!A,onToggleCollapse:z,hasMore:k,onLoadMore:N,conversationsLoading:D}),S.jsxs("div",{className:"sa-fp-main",children:[F?S.jsx(F,{title:L?(T==null?void 0:T.title)??e:e,panelTitle:L?T==null?void 0:T.title:void 0,onClose:l??fm,onToggleThreadList:z,showHome:L,onHome:L?O: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?(T==null?void 0:T.title)??e:e}),S.jsxs("div",{className:"sa-fp-header-actions",children:[L&&S.jsx("button",{className:"sa-fp-header-btn",onClick:O,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:H?S.jsx(H,{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 T=b.useCallback(()=>{var D,A;const N=!C;I(N),c==null||c(N),N?(D=o.onOpen)==null||D.call(o):(A=o.onClose)==null||A.call(o)},[C,o,c]),O=b.useCallback(()=>{var N;I(!1),c==null||c(!1),(N=o.onClose)==null||N.call(o)},[o,c]),k=r.Trigger??vm;return n==="fullpage"?C?S.jsx(dl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,children:S.jsx(O0,{title:s,slots:r,welcomeMessage:i,suggestedPrompts:a,capabilities:p,quickLinks:h,logo:m,sidebarDefaultOpen:u,onClose:O,avatar:d,artifactPreview:f,showTimestamp:$,collapse:v})}):null:S.jsxs(dl,{sdk:t,hooks:o,attachmentUploader:x,nosUpload:E,children:[S.jsx(k,{isOpen:C,onClick:T,triggerLogo:w}),S.jsx(A5,{isOpen:C,onClose:O,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=`
|
|
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);
|
|
@@ -1633,5 +1633,5 @@ html body {
|
|
|
1633
1633
|
from { opacity: 0; transform: translateY(10px); }
|
|
1634
1634
|
to { opacity: 1; transform: translateY(0); }
|
|
1635
1635
|
}
|
|
1636
|
-
`,D5='[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-\\[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}',j0={primaryColor:"#6366f1",backgroundColor:"#ffffff",fontFamily:"system-ui, -apple-system, sans-serif",borderRadius:16,panelWidth:400,panelHeight:648,zIndex:9999};function L5(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 F5(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 B0(e){const t={...j0,...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: ${L5(n,.15)}`,`--sa-primary-light: ${F5(n,.9)}`,`--sa-surface: ${r}`,"--sa-border: #e5e7eb","--sa-hover: #f4f4f5","--sa-text: #374151","--sa-text-muted: #9ca3af","--sa-text-light: #6b7280"].join("; ")}function _5(e){return typeof e=="string"?e:e.id?`#${e.id}`:""}function j5(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=B0(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=`${_0}
|
|
1637
|
-
${
|
|
1636
|
+
`,O5='[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-\\[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 D5(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 L5(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: ${D5(n,.15)}`,`--sa-primary-light: ${L5(n,.9)}`,`--sa-surface: ${r}`,"--sa-border: #e5e7eb","--sa-hover: #f4f4f5","--sa-text: #374151","--sa-text-muted: #9ca3af","--sa-text-light: #6b7280"].join("; ")}function F5(e){return typeof e=="string"?e:e.id?`#${e.id}`:""}function _5(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}
|
|
1637
|
+
${O5}`,document.head.appendChild(c)}let i=pm.createRoot(r);const a=F5(e);let s=zi(a);const l=c=>{i&&i.render(b.createElement(D0,{...t,initialOpen:c??s,onOpenChange:u=>{s=u,zi(a,u)}}))};return l(s),{open(){s=!0,zi(a,!0),l(!0)},close(){s=!1,zi(a,!1),l(!1)},destroy(){i&&(i.unmount(),i=null),r.remove()}}}exports.ASSETS=Gt;exports.ActionBar=Bg;exports.ChatProvider=dl;exports.ChatWidget=D0;exports.Composer=md;exports.ErrorPart=Fg;exports.FullpageLayout=O0;exports.Header=Cm;exports.Icon=We;exports.InterruptCard=jg;exports.Message=Hg;exports.PageOverlay=A0;exports.TextPart=Ag;exports.ThinkingPart=Og;exports.Thread=yu;exports.ThreadList=fl;exports.ToolCallPart=Dg;exports.ToolResultPart=Lg;exports.Trigger=vm;exports.WelcomeScreen=Vg;exports.defaultTheme=F0;exports.ensureIconFont=zg;exports.mount=_5;exports.themeToCSSVars=_0;exports.useAutoScroll=Em;exports.useChat=mm;exports.useChatContext=Xn;exports.useConversations=hm;exports.widgetStyles=L0;
|