ant-design-x-vue 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +108 -119
- package/dist/index.umd.js +2 -2
- package/dist/resolver/index.d.ts +25 -0
- package/dist/resolver/index.js +49 -0
- package/package.json +7 -3
package/dist/index.umd.js
CHANGED
|
@@ -265,7 +265,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
265
265
|
${c}:focus,
|
|
266
266
|
&.picture ${c}
|
|
267
267
|
`]:{opacity:1},[o]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${o}`]:{color:e.colorText}},[`${t}-icon ${o}`]:{color:e.colorTextDescription,fontSize:r},[`${l}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:r+e.paddingXS,fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${l}:hover ${c}`]:{opacity:1,color:e.colorText},[`${l}-error`]:{color:e.colorError,[`${l}-name, ${t}-icon ${o}`]:{color:e.colorError},[s]:{[`${o}, ${o}:hover`]:{color:e.colorError},[c]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Ch=new ue("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),Sh=new ue("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),YE=e=>{const{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:Ch},[`${n}-leave`]:{animationName:Sh}}},Ch,Sh]},ZE=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:o,uploadProgressOffset:r}=e,a=`${t}-list`,l=`${a}-item`;return{[`${t}-wrapper`]:{[`${a}${a}-picture, ${a}${a}-picture-card`]:{[l]:{position:"relative",height:o+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${l}-thumbnail`]:h(h({},on),{width:o,height:o,lineHeight:`${o+e.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${l}-progress`]:{bottom:r,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:o+e.paddingXS}},[`${l}-error`]:{borderColor:e.colorError,[`${l}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${l}-uploading`]:{borderStyle:"dashed",[`${l}-name`]:{marginBottom:r}}}}}},QE=e=>{const{componentCls:t,iconCls:n,fontSizeLG:o,colorTextLightSolid:r}=e,a=`${t}-list`,l=`${a}-item`,s=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:h(h({},To()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:s,height:s,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${a}${a}-picture-card`]:{[`${a}-item-container`]:{display:"inline-block",width:s,height:s,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[l]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${l}:hover`]:{[`&::before, ${l}-actions`]:{opacity:1}},[`${l}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:o,margin:`0 ${e.marginXXS}px`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`}},[`${l}-actions, ${l}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new xe(r).setAlpha(.65).toRgbString(),"&:hover":{color:r}}},[`${l}-thumbnail, ${l}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${l}-name`]:{display:"none",textAlign:"center"},[`${l}-file + ${l}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${e.paddingXS*2}px)`},[`${l}-uploading`]:{[`&${l}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${l}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${e.paddingXS*2}px)`,paddingInlineStart:0}}})}},JE=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},e6=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:h(h({},Ve(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},t6=Ne("Upload",e=>{const{fontSizeHeading3:t,fontSize:n,lineHeight:o,lineWidth:r,controlHeightLG:a}=e,l=Math.round(n*o),s=ve(e,{uploadThumbnailSize:t*2,uploadProgressOffset:l/2+r,uploadPicCardSize:a*2.55});return[e6(s),GE(s),ZE(s),QE(s),qE(s),YE(s),JE(s),Hp(s)]});var n6=function(e,t,n,o){function r(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function s(d){try{u(o.next(d))}catch(f){l(f)}}function c(d){try{u(o.throw(d))}catch(f){l(f)}}function u(d){d.done?a(d.value):r(d.value).then(s,c)}u((o=o.apply(e,t||[])).next())})},o6=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};const lr=`__LIST_IGNORE_${Date.now()}__`,ji=i.defineComponent({compatConfig:{MODE:3},name:"AUpload",inheritAttrs:!1,props:Be(vh(),{type:"select",multiple:!1,action:"",data:{},accept:"",showUploadList:!0,listType:"text",supportServerRender:!0}),setup(e,t){let{slots:n,attrs:o,expose:r}=t;const a=di(),{prefixCls:l,direction:s,disabled:c}=be("upload",e),[u,d]=t6(l),f=Yt(),p=i.computed(()=>{var R;return(R=c.value)!==null&&R!==void 0?R:f.value}),[m,v]=Xn(e.defaultFileList||[],{value:i.toRef(e,"fileList"),postState:R=>{const B=Date.now();return(R??[]).map((M,z)=>(!M.uid&&!Object.isFrozen(M)&&(M.uid=`__AUTO__${B}_${z}__`),M))}}),g=i.ref("drop"),y=i.ref(null);i.onMounted(()=>{Oe(e.fileList!==void 0||o.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),Oe(e.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),Oe(e.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const C=(R,B,M)=>{var z,O;let T=[...B];e.maxCount===1?T=T.slice(-1):e.maxCount&&(T=T.slice(0,e.maxCount)),v(T);const D={file:R,fileList:T};M&&(D.event=M),(z=e["onUpdate:fileList"])===null||z===void 0||z.call(e,D.fileList),(O=e.onChange)===null||O===void 0||O.call(e,D),a.onFieldChange()},S=(R,B)=>n6(this,void 0,void 0,function*(){const{beforeUpload:M,transformFile:z}=e;let O=R;if(M){const T=yield M(R,B);if(T===!1)return!1;if(delete R[lr],T===lr)return Object.defineProperty(R,lr,{value:!0,configurable:!0}),!1;typeof T=="object"&&T&&(O=T)}return z&&(O=yield z(O)),O}),$=R=>{const B=R.filter(O=>!O.file[lr]);if(!B.length)return;const M=B.map(O=>Fi(O.file));let z=[...m.value];M.forEach(O=>{z=Hi(O,z)}),M.forEach((O,T)=>{let D=O;if(B[T].parsedFile)O.status="uploading";else{const{originFileObj:L}=O;let N;try{N=new File([L],L.name,{type:L.type})}catch{N=new Blob([L],{type:L.type}),N.name=L.name,N.lastModifiedDate=new Date,N.lastModified=new Date().getTime()}N.uid=O.uid,D=N}C(D,z)})},x=(R,B,M)=>{try{typeof R=="string"&&(R=JSON.parse(R))}catch{}if(!Ws(B,m.value))return;const z=Fi(B);z.status="done",z.percent=100,z.response=R,z.xhr=M;const O=Hi(z,m.value);C(z,O)},w=(R,B)=>{if(!Ws(B,m.value))return;const M=Fi(B);M.status="uploading",M.percent=R.percent;const z=Hi(M,m.value);C(M,z,R)},P=(R,B,M)=>{if(!Ws(M,m.value))return;const z=Fi(M);z.error=R,z.response=B,z.status="error";const O=Hi(z,m.value);C(z,O)},b=R=>{let B;const M=e.onRemove||e.remove;Promise.resolve(typeof M=="function"?M(R):M).then(z=>{var O,T;if(z===!1)return;const D=zE(R,m.value);D&&(B=h(h({},R),{status:"removed"}),(O=m.value)===null||O===void 0||O.forEach(L=>{const N=B.uid!==void 0?"uid":"name";L[N]===B[N]&&!Object.isFrozen(L)&&(L.status="removed")}),(T=y.value)===null||T===void 0||T.abort(B),C(B,D))})},I=R=>{var B;g.value=R.type,R.type==="drop"&&((B=e.onDrop)===null||B===void 0||B.call(e,R))};r({onBatchStart:$,onSuccess:x,onProgress:w,onError:P,fileList:m,upload:y});const[E]=dy("Upload",Zt.Upload,i.computed(()=>e.locale)),A=(R,B)=>{const{removeIcon:M,previewIcon:z,downloadIcon:O,previewFile:T,onPreview:D,onDownload:L,isImageUrl:N,progress:H,itemRender:_,iconRender:Y,showUploadList:Z}=e,{showDownloadIcon:X,showPreviewIcon:J,showRemoveIcon:te}=typeof Z=="boolean"?{}:Z;return Z?i.createVNode(XE,{prefixCls:l.value,listType:e.listType,items:m.value,previewFile:T,onPreview:D,onDownload:L,onRemove:b,showRemoveIcon:!p.value&&te,showPreviewIcon:J,showDownloadIcon:X,removeIcon:M,previewIcon:z,downloadIcon:O,iconRender:Y,locale:E.value,isImageUrl:N,progress:H,itemRender:_,appendActionVisible:B,appendAction:R},h({},n)):R==null?void 0:R()};return()=>{var R,B,M;const{listType:z,type:O}=e,{class:T,style:D}=o,L=o6(o,["class","style"]),N=h(h(h({onBatchStart:$,onError:P,onProgress:w,onSuccess:x},L),e),{id:(R=e.id)!==null&&R!==void 0?R:a.id.value,prefixCls:l.value,beforeUpload:S,onChange:void 0,disabled:p.value});delete N.remove,(!n.default||p.value)&&delete N.id;const H={[`${l.value}-rtl`]:s.value==="rtl"};if(O==="drag"){const X=ee(l.value,{[`${l.value}-drag`]:!0,[`${l.value}-drag-uploading`]:m.value.some(J=>J.status==="uploading"),[`${l.value}-drag-hover`]:g.value==="dragover",[`${l.value}-disabled`]:p.value,[`${l.value}-rtl`]:s.value==="rtl"},o.class,d.value);return u(i.createVNode("span",F(F({},o),{},{class:ee(`${l.value}-wrapper`,H,T,d.value)}),[i.createVNode("div",{class:X,onDrop:I,onDragover:I,onDragleave:I,style:o.style},[i.createVNode(ph,F(F({},N),{},{ref:y,class:`${l.value}-btn`}),F({default:()=>[i.createVNode("div",{class:`${l.value}-drag-container`},[(B=n.default)===null||B===void 0?void 0:B.call(n)])]},n))]),A()]))}const _=ee(l.value,{[`${l.value}-select`]:!0,[`${l.value}-select-${z}`]:!0,[`${l.value}-disabled`]:p.value,[`${l.value}-rtl`]:s.value==="rtl"}),Y=Ae((M=n.default)===null||M===void 0?void 0:M.call(n)),Z=X=>i.createVNode("div",{class:_,style:X},[i.createVNode(ph,F(F({},N),{},{ref:y}),n)]);return u(z==="picture-card"?i.createVNode("span",F(F({},o),{},{class:ee(`${l.value}-wrapper`,`${l.value}-picture-card-wrapper`,H,o.class,d.value)}),[A(Z,!!Y.length)]):i.createVNode("span",F(F({},o),{},{class:ee(`${l.value}-wrapper`,H,o.class,d.value)}),[Z(Y.length?void 0:{display:"none"}),A()]))}}});var wh=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};const Ks=i.defineComponent({compatConfig:{MODE:3},name:"AUploadDragger",inheritAttrs:!1,props:vh(),setup(e,t){let{slots:n,attrs:o}=t;return()=>{const{height:r}=e,a=wh(e,["height"]),{style:l}=o,s=wh(o,["style"]),c=h(h(h({},a),s),{type:"drag",style:h(h({},l),{height:typeof r=="number"?`${r}px`:r})});return i.createVNode(ji,c,n)}}}),$h=h(ji,{Dragger:Ks,LIST_IGNORE:lr,install(e){return e.component(ji.name,ji),e.component(Ks.name,Ks),e}});var r6={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 xh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){i6(e,r,n[r])})}return e}function i6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Us=function(t,n){var o=xh({},t,n.attrs);return i.createVNode(ae,xh({},o,{icon:r6}),null)};Us.displayName="ArrowUpOutlined",Us.inheritAttrs=!1;var a6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{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 Oh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){l6(e,r,n[r])})}return e}function l6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xs=function(t,n){var o=Oh({},t,n.attrs);return i.createVNode(ae,Oh({},o,{icon:a6}),null)};Xs.displayName="AudioMutedOutlined",Xs.inheritAttrs=!1;var s6={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 Ph(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){c6(e,r,n[r])})}return e}function c6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gs=function(t,n){var o=Ph({},t,n.attrs);return i.createVNode(ae,Ph({},o,{icon:s6}),null)};Gs.displayName="AudioOutlined",Gs.inheritAttrs=!1;var u6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{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 Ih(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){d6(e,r,n[r])})}return e}function d6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qs=function(t,n){var o=Ih({},t,n.attrs);return i.createVNode(ae,Ih({},o,{icon:u6}),null)};qs.displayName="ClearOutlined",qs.inheritAttrs=!1;var f6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM575.34 477.84l-61.22 102.3L452.3 477.8a12 12 0 00-10.27-5.79h-38.44a12 12 0 00-6.4 1.85 12 12 0 00-3.75 16.56l82.34 130.42-83.45 132.78a12 12 0 00-1.84 6.39 12 12 0 0012 12h34.46a12 12 0 0010.21-5.7l62.7-101.47 62.3 101.45a12 12 0 0010.23 5.72h37.48a12 12 0 006.48-1.9 12 12 0 003.62-16.58l-83.83-130.55 85.3-132.47a12 12 0 001.9-6.5 12 12 0 00-12-12h-35.7a12 12 0 00-10.29 5.84z"}}]},name:"file-excel",theme:"filled"};function Th(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){p6(e,r,n[r])})}return e}function p6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ys=function(t,n){var o=Th({},t,n.attrs);return i.createVNode(ae,Th({},o,{icon:f6}),null)};Ys.displayName="FileExcelFilled",Ys.inheritAttrs=!1;var m6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7L639.4 73.4c-6-6-14.2-9.4-22.7-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.6-9.4-22.6zM400 402c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zm296 294H328c-6.7 0-10.4-7.7-6.3-12.9l99.8-127.2a8 8 0 0112.6 0l41.1 52.4 77.8-99.2a8 8 0 0112.6 0l136.5 174c4.3 5.2.5 12.9-6.1 12.9zm-94-370V137.8L790.2 326H602z"}}]},name:"file-image",theme:"filled"};function Nh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){g6(e,r,n[r])})}return e}function g6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zs=function(t,n){var o=Nh({},t,n.attrs);return i.createVNode(ae,Nh({},o,{icon:m6}),null)};Zs.displayName="FileImageFilled",Zs.inheritAttrs=!1;var h6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM426.13 600.93l59.11 132.97a16 16 0 0014.62 9.5h24.06a16 16 0 0014.63-9.51l59.1-133.35V758a16 16 0 0016.01 16H641a16 16 0 0016-16V486a16 16 0 00-16-16h-34.75a16 16 0 00-14.67 9.62L512.1 662.2l-79.48-182.59a16 16 0 00-14.67-9.61H383a16 16 0 00-16 16v272a16 16 0 0016 16h27.13a16 16 0 0016-16V600.93z"}}]},name:"file-markdown",theme:"filled"};function Eh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){v6(e,r,n[r])})}return e}function v6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qs=function(t,n){var o=Eh({},t,n.attrs);return i.createVNode(ae,Eh({},o,{icon:h6}),null)};Qs.displayName="FileMarkdownFilled",Qs.inheritAttrs=!1;var y6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM633.22 637.26c-15.18-.5-31.32.67-49.65 2.96-24.3-14.99-40.66-35.58-52.28-65.83l1.07-4.38 1.24-5.18c4.3-18.13 6.61-31.36 7.3-44.7.52-10.07-.04-19.36-1.83-27.97-3.3-18.59-16.45-29.46-33.02-30.13-15.45-.63-29.65 8-33.28 21.37-5.91 21.62-2.45 50.07 10.08 98.59-15.96 38.05-37.05 82.66-51.2 107.54-18.89 9.74-33.6 18.6-45.96 28.42-16.3 12.97-26.48 26.3-29.28 40.3-1.36 6.49.69 14.97 5.36 21.92 5.3 7.88 13.28 13 22.85 13.74 24.15 1.87 53.83-23.03 86.6-79.26 3.29-1.1 6.77-2.26 11.02-3.7l11.9-4.02c7.53-2.54 12.99-4.36 18.39-6.11 23.4-7.62 41.1-12.43 57.2-15.17 27.98 14.98 60.32 24.8 82.1 24.8 17.98 0 30.13-9.32 34.52-23.99 3.85-12.88.8-27.82-7.48-36.08-8.56-8.41-24.3-12.43-45.65-13.12zM385.23 765.68v-.36l.13-.34a54.86 54.86 0 015.6-10.76c4.28-6.58 10.17-13.5 17.47-20.87 3.92-3.95 8-7.8 12.79-12.12 1.07-.96 7.91-7.05 9.19-8.25l11.17-10.4-8.12 12.93c-12.32 19.64-23.46 33.78-33 43-3.51 3.4-6.6 5.9-9.1 7.51a16.43 16.43 0 01-2.61 1.42c-.41.17-.77.27-1.13.3a2.2 2.2 0 01-1.12-.15 2.07 2.07 0 01-1.27-1.91zM511.17 547.4l-2.26 4-1.4-4.38c-3.1-9.83-5.38-24.64-6.01-38-.72-15.2.49-24.32 5.29-24.32 6.74 0 9.83 10.8 10.07 27.05.22 14.28-2.03 29.14-5.7 35.65zm-5.81 58.46l1.53-4.05 2.09 3.8c11.69 21.24 26.86 38.96 43.54 51.31l3.6 2.66-4.39.9c-16.33 3.38-31.54 8.46-52.34 16.85 2.17-.88-21.62 8.86-27.64 11.17l-5.25 2.01 2.8-4.88c12.35-21.5 23.76-47.32 36.05-79.77zm157.62 76.26c-7.86 3.1-24.78.33-54.57-12.39l-7.56-3.22 8.2-.6c23.3-1.73 39.8-.45 49.42 3.07 4.1 1.5 6.83 3.39 8.04 5.55a4.64 4.64 0 01-1.36 6.31 6.7 6.7 0 01-2.17 1.28z"}}]},name:"file-pdf",theme:"filled"};function Rh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){b6(e,r,n[r])})}return e}function b6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Js=function(t,n){var o=Rh({},t,n.attrs);return i.createVNode(ae,Rh({},o,{icon:y6}),null)};Js.displayName="FilePdfFilled",Js.inheritAttrs=!1;var C6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM468.53 760v-91.54h59.27c60.57 0 100.2-39.65 100.2-98.12 0-58.22-39.58-98.34-99.98-98.34H424a12 12 0 00-12 12v276a12 12 0 0012 12h32.53a12 12 0 0012-12zm0-139.33h34.9c47.82 0 67.19-12.93 67.19-50.33 0-32.05-18.12-50.12-49.87-50.12h-52.22v100.45z"}}]},name:"file-ppt",theme:"filled"};function Ah(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){S6(e,r,n[r])})}return e}function S6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ec=function(t,n){var o=Ah({},t,n.attrs);return i.createVNode(ae,Ah({},o,{icon:C6}),null)};ec.displayName="FilePptFilled",ec.inheritAttrs=!1;var w6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM320 482a8 8 0 00-8 8v48a8 8 0 008 8h384a8 8 0 008-8v-48a8 8 0 00-8-8H320zm0 136a8 8 0 00-8 8v48a8 8 0 008 8h184a8 8 0 008-8v-48a8 8 0 00-8-8H320z"}}]},name:"file-text",theme:"filled"};function Mh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){$6(e,r,n[r])})}return e}function $6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tc=function(t,n){var o=Mh({},t,n.attrs);return i.createVNode(ae,Mh({},o,{icon:w6}),null)};tc.displayName="FileTextFilled",tc.inheritAttrs=!1;var x6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM512 566.1l52.81 197a12 12 0 0011.6 8.9h31.77a12 12 0 0011.6-8.88l74.37-276a12 12 0 00.4-3.12 12 12 0 00-12-12h-35.57a12 12 0 00-11.7 9.31l-45.78 199.1-49.76-199.32A12 12 0 00528.1 472h-32.2a12 12 0 00-11.64 9.1L434.6 680.01 388.5 481.3a12 12 0 00-11.68-9.29h-35.39a12 12 0 00-3.11.41 12 12 0 00-8.47 14.7l74.17 276A12 12 0 00415.6 772h31.99a12 12 0 0011.59-8.9l52.81-197z"}}]},name:"file-word",theme:"filled"};function Vh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){O6(e,r,n[r])})}return e}function O6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nc=function(t,n){var o=Vh({},t,n.attrs);return i.createVNode(ae,Vh({},o,{icon:x6}),null)};nc.displayName="FileWordFilled",nc.inheritAttrs=!1;var P6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM296 136v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm64 64v64h64v-64h-64zm-64 64v64h64v-64h-64zm0 64v160h128V584H296zm48 48h32v64h-32v-64z"}}]},name:"file-zip",theme:"filled"};function Dh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){I6(e,r,n[r])})}return e}function I6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oc=function(t,n){var o=Dh({},t,n.attrs);return i.createVNode(ae,Dh({},o,{icon:P6}),null)};oc.displayName="FileZipFilled",oc.inheritAttrs=!1;const Bh=["wrap","nowrap","wrap-reverse"],Lh=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],zh=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],T6=(e,t)=>{const n={};return Bh.forEach(o=>{n[`${e}-wrap-${o}`]=t.wrap===o}),n},N6=(e,t)=>{const n={};return zh.forEach(o=>{n[`${e}-align-${o}`]=t.align===o}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},E6=(e,t)=>{const n={};return Lh.forEach(o=>{n[`${e}-justify-${o}`]=t.justify===o}),n};function R6(e,t){return ee(h(h(h({},T6(e,t)),N6(e,t)),E6(e,t)))}const A6=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},M6=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},V6=e=>{const{componentCls:t}=e,n={};return Bh.forEach(o=>{n[`${t}-wrap-${o}`]={flexWrap:o}}),n},D6=e=>{const{componentCls:t}=e,n={};return zh.forEach(o=>{n[`${t}-align-${o}`]={alignItems:o}}),n},B6=e=>{const{componentCls:t}=e,n={};return Lh.forEach(o=>{n[`${t}-justify-${o}`]={justifyContent:o}}),n},L6=Ne("Flex",e=>{const t=ve(e,{flexGapSM:e.paddingXS,flexGap:e.padding,flexGapLG:e.paddingLG});return[A6(t),M6(t),V6(t),D6(t),B6(t)]});function Fh(e){return["small","middle","large"].includes(e)}const z6=()=>({prefixCls:Te(),vertical:he(),wrap:Te(),justify:Te(),align:Te(),flex:it([Number,String]),gap:it([Number,String]),component:De()});var F6=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};const H6=i.defineComponent({name:"AFlex",inheritAttrs:!1,props:z6(),setup(e,t){let{slots:n,attrs:o}=t;const{flex:r,direction:a}=ho(),{prefixCls:l}=be("flex",e),[s,c]=L6(l),u=i.computed(()=>{var d;return[l.value,c.value,R6(l.value,e),{[`${l.value}-rtl`]:a.value==="rtl",[`${l.value}-gap-${e.gap}`]:Fh(e.gap),[`${l.value}-vertical`]:(d=e.vertical)!==null&&d!==void 0?d:r==null?void 0:r.value.vertical}]});return()=>{var d;const{flex:f,gap:p,component:m="div"}=e,v=F6(e,["flex","gap","component"]),g={};return f&&(g.flex=f),p&&!Fh(p)&&(g.gap=`${p}px`),s(i.createVNode(m,F({class:[o.class,u.value],style:[o.style,g]},we(v,["justify","wrap","align","vertical"])),{default:()=>[(d=n.default)===null||d===void 0?void 0:d.call(n)]}))}}}),sr=Vt(H6),Kt=(e,t)=>new xe(e).setAlpha(t).toRgbString(),ao=(e,t)=>new xe(e).lighten(t).toHexString(),j6=e=>{const t=$t(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},_6=(e,t)=>{const n=e||"#000",o=t||"#fff";return{colorBgBase:n,colorTextBase:o,colorText:Kt(o,.85),colorTextSecondary:Kt(o,.65),colorTextTertiary:Kt(o,.45),colorTextQuaternary:Kt(o,.25),colorFill:Kt(o,.18),colorFillSecondary:Kt(o,.12),colorFillTertiary:Kt(o,.08),colorFillQuaternary:Kt(o,.04),colorBgElevated:ao(n,12),colorBgContainer:ao(n,8),colorBgLayout:ao(n,0),colorBgSpotlight:ao(n,26),colorBorder:ao(n,26),colorBorderSecondary:ao(n,19)}},W6=(e,t)=>{const n=Object.keys(Na).map(r=>{const a=$t(e[r],{theme:"dark"});return new Array(10).fill(1).reduce((l,s,c)=>(l[`${r}-${c+1}`]=a[c],l),{})}).reduce((r,a)=>(r=h(h({},r),a),r),{}),o=t??zr(e);return h(h(h({},o),n),id(e,{generateColorPalettes:j6,generateNeutralColorPalettes:_6}))};function k6(e){const{sizeUnit:t,sizeStep:n}=e,o=n-2;return{sizeXXL:t*(o+10),sizeXL:t*(o+6),sizeLG:t*(o+2),sizeMD:t*(o+2),sizeMS:t*(o+1),size:t*o,sizeSM:t*o,sizeXS:t*(o-1),sizeXXS:t*(o-1)}}const K6=(e,t)=>{const n=t??zr(e),o=n.fontSizeSM,r=n.controlHeight-4;return h(h(h(h(h({},n),k6(t??e)),ad(o)),{controlHeight:r}),rd(h(h({},n),{controlHeight:r})))};function U6(){const[e,t,n]=rn();return{theme:e,token:t,hashId:n}}const cr={defaultConfig:No,defaultSeed:No.token,useToken:U6,defaultAlgorithm:zr,darkAlgorithm:W6,compactAlgorithm:K6},X6=i.defineComponent({name:"AXConfigProvider",inheritAttrs:!1,__name:"index",props:{bubble:{},conversations:{},prompts:{},sender:{},suggestion:{},thoughtChain:{},attachments:{},welcome:{},iconPrefixCls:{},getTargetContainer:{},getPopupContainer:{},prefixCls:{},getPrefixCls:{},renderEmpty:{},transformCellText:{},csp:{},input:{},autoInsertSpaceInButton:{type:Boolean},locale:{},pageHeader:{},componentSize:{},componentDisabled:{type:Boolean},direction:{},space:{},virtual:{type:Boolean},dropdownMatchSelectWidth:{},form:{},pagination:{},theme:{},select:{},wave:{}},setup(e){const t=He(e,["attachments","bubble","conversations","prompts","suggestion","thoughtChain","welcome"]),n=i.useSlots(),o=i.computed(()=>({attachments:e.attachments,bubble:e.bubble,conversations:e.conversations,prompts:e.prompts,suggestion:e.suggestion,thoughtChain:e.thoughtChain,welcome:e.welcome})),{theme:r}=Ke(),a=i.computed(()=>({...(r==null?void 0:r.value)||{},...t.theme})),l=i.computed(()=>{var s;return(s=n.default)==null?void 0:s.call(n)});return()=>i.createVNode(wv,{value:o.value},{default:()=>[i.createVNode(io,i.mergeProps(t,{theme:a.value}),{default:()=>[l.value]})]})}}),G6={classNames:{},styles:{},className:"",style:{}},Ut=e=>{const t=Sv();return i.computed(()=>({...G6,...i.unref(t)[e]}))};function Ie(e){const t=typeof e=="function"?e():e,n=i.ref(t);function o(r){n.value=r}return[n,o]}function wn(e){return typeof e=="string"}const q6=(e,t,n,o)=>{const[r,a]=Ie(""),[l,s]=Ie(1),c=i.computed(()=>t.value&&wn(e.value));return i.watch(e,()=>{const d=i.unref(r);a(e.value),!c.value&&wn(e.value)?s(e.value.length):wn(e.value)&&wn(d)&&e.value.indexOf(d)!==0&&s(1)}),i.watch([l,t,e],()=>{if(c.value&&wn(e.value)&&i.unref(l)<e.value.length){const d=setTimeout(()=>{s(i.unref(l)+n.value)},o.value);i.onWatcherCleanup(()=>{clearTimeout(d)})}},{immediate:!0}),[i.computed(()=>c.value&&wn(e.value)?e.value.slice(0,i.unref(l)):e.value),i.computed(()=>c.value&&wn(e.value)&&i.unref(l)<e.value.length)]};function Y6(e){const t=i.computed(()=>!!i.toValue(e)),n={step:1,interval:50,suffix:null},o=i.computed(()=>{const r=i.toValue(e);return{...n,...typeof r=="object"?r:{}}});return[t,i.computed(()=>o.value.step),i.computed(()=>o.value.interval),i.computed(()=>o.value.suffix)]}const Z6=i.defineComponent({name:"AXBubbleLoading",__name:"loading",props:{prefixCls:null},setup(e){return()=>i.createVNode("span",{class:`${e.prefixCls}-dot`},[i.createVNode("i",{class:`${e.prefixCls}-dot-item`,key:"item-1"},null),i.createVNode("i",{class:`${e.prefixCls}-dot-item`,key:"item-2"},null),i.createVNode("i",{class:`${e.prefixCls}-dot-item`,key:"item-3"},null)])}}),Hh="%";class Q6{constructor(t){this.cache=new Map,this.instanceId=t}get(t){return this.cache.get(Array.isArray(t)?t.join(Hh):t)||null}update(t,n){const o=Array.isArray(t)?t.join(Hh):t,r=this.cache.get(o),a=n(r);a===null?this.cache.delete(o):this.cache.set(o,a)}}const jh="data-token-hash",Xt="data-css-hash",J6="data-cache-path",lo="__cssinjs_instance__";function ur(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${Xt}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(r=>{r[lo]=r[lo]||e,r[lo]===e&&document.head.insertBefore(r,n)});const o={};Array.from(document.querySelectorAll(`style[${Xt}]`)).forEach(r=>{var l;const a=r.getAttribute(Xt);o[a]?r[lo]===e&&((l=r.parentNode)==null||l.removeChild(r)):o[a]=!0})}return new Q6(e)}const _h=Symbol("StyleContextKey"),e3=()=>{var n,o,r;const e=i.getCurrentInstance();let t;if(e&&e.appContext){const a=(r=(o=(n=e.appContext)==null?void 0:n.config)==null?void 0:o.globalProperties)==null?void 0:r.__ANTDV_CSSINJS_CACHE__;a?t=a:(t=ur(),e.appContext.config.globalProperties&&(e.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=t))}else t=ur();return t},Wh={cache:ur(),defaultCache:!0,hashPriority:"low"},dr=()=>{const e=e3();return i.inject(_h,i.shallowRef({...Wh,cache:e}))},kh=e=>{const t=dr(),n=i.shallowRef({...Wh,cache:ur()});return i.watch([()=>i.unref(e),t],()=>{const o={...t.value},r=i.unref(e);Object.keys(r).forEach(l=>{const s=r[l];r[l]!==void 0&&(o[l]=s)});const{cache:a}=r;o.cache=o.cache||ur(),o.defaultCache=!a&&t.value.defaultCache,n.value=o},{immediate:!0}),i.provide(_h,n),n},t3=()=>({autoClear:oa(),mock:Wc(),cache:St(),defaultCache:oa(),hashPriority:Wc(),container:bv(),ssrInline:oa(),transformers:_c(),linters:_c()}),n3=vv(i.defineComponent({name:"AStyleProvider",inheritAttrs:!1,props:t3(),setup(e,{slots:t}){return kh(e),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}})),o3={useStyleInject:dr,useStyleProvider:kh,StyleProvider:n3};function r3(){return!1}let rc=!1;function i3(){return rc}const a3=process.env.NODE_ENV==="production"?r3:i3;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const e=window;if(typeof e.webpackHotUpdate=="function"){const t=e.webpackHotUpdate;e.webpackHotUpdate=(...n)=>(rc=!0,setTimeout(()=>{rc=!1},0),t(...n))}}function ic(e,t,n,o){const r=dr(),a=i.shallowRef(""),l=i.shallowRef();i.watchEffect(()=>{a.value=[e,...t.value].join("%")});const s=a3(),c=u=>{r.value.cache.update(u,d=>{const[f=0,p]=d||[];return f-1===0?(o==null||o(p,!1),null):[f-1,p]})};return i.watch(a,(u,d)=>{d&&c(d),r.value.cache.update(u,f=>{const[p=0,m]=f||[];let v=m;process.env.NODE_ENV!=="production"&&m&&s&&(o==null||o(v,s),v=null);const g=v||n();return[p+1,g]}),l.value=r.value.cache.get(a.value)[1]},{immediate:!0}),i.onBeforeUnmount(()=>{c(a.value)}),l}function so(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function l3(e,t){return e&&e.contains?e.contains(t):!1}const Kh="data-vc-order",s3="vc-util-key",ac=new Map;function Uh({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:s3}function _i(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function c3(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Xh(e){return Array.from((ac.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function Gh(e,t={}){if(!so())return null;const{csp:n,prepend:o}=t,r=document.createElement("style");r.setAttribute(Kh,c3(o)),n!=null&&n.nonce&&(r.nonce=n==null?void 0:n.nonce),r.innerHTML=e;const a=_i(t),{firstChild:l}=a;if(o){if(o==="queue"){const s=Xh(a).filter(c=>["prepend","prependQueue"].includes(c.getAttribute(Kh)));if(s.length)return a.insertBefore(r,s[s.length-1].nextSibling),r}a.insertBefore(r,l)}else a.appendChild(r);return r}function qh(e,t={}){const n=_i(t);return Xh(n).find(o=>o.getAttribute(Uh(t))===e)}function lc(e,t={}){const n=qh(e,t);n&&_i(t).removeChild(n)}function u3(e,t){const n=ac.get(e);if(!n||!l3(document,n)){const o=Gh("",t),{parentNode:r}=o;ac.set(e,r),e.removeChild(o)}}function sc(e,t,n={}){var l,s,c;const o=_i(n);u3(o,n);const r=qh(t,n);if(r)return(l=n.csp)!=null&&l.nonce&&r.nonce!==((s=n.csp)==null?void 0:s.nonce)&&(r.nonce=(c=n.csp)==null?void 0:c.nonce),r.innerHTML!==e&&(r.innerHTML=e),r;const a=Gh(e,n);return a.setAttribute(Uh(n),t),a}function d3(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 fo=class fo{constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(t,n=!1){let o={map:this.cache};return t.forEach(r=>{var a;o?o=(a=o==null?void 0:o.map)==null?void 0:a.get(r):o=void 0}),o!=null&&o.value&&n&&(o.value[1]=this.cacheCallTimes++),o==null?void 0:o.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>fo.MAX_CACHE_SIZE+fo.MAX_CACHE_OFFSET){const[r]=this.keys.reduce((a,l)=>{const[,s]=a;return this.internalGet(l)[1]<s?[l,this.internalGet(l)[1]]:a},[this.keys[0],this.cacheCallTimes]);this.delete(r)}this.keys.push(t)}let o=this.cache;t.forEach((r,a)=>{if(a===t.length-1)o.set(r,{value:[n,this.cacheCallTimes++]});else{const l=o.get(r);l?l.map||(l.map=new Map):o.set(r,{map:new Map}),o=o.get(r).map}})}deleteByPath(t,n){var a;const o=t.get(n[0]);if(n.length===1)return o.map?t.set(n[0],{map:o.map}):t.delete(n[0]),(a=o.value)==null?void 0:a[0];const r=this.deleteByPath(o.map,n.slice(1));return(!o.map||o.map.size===0)&&!o.value&&t.delete(n[0]),r}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!d3(n,t)),this.deleteByPath(this.cache,t)}};fo.MAX_CACHE_SIZE=20,fo.MAX_CACHE_OFFSET=5;let cc=fo,uc={};function Yh(e,t){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error(`Warning: ${t}`)}function f3(){uc={}}function p3(e,t,n){!t&&!uc[n]&&(e(!1,n),uc[n]=!0)}function Zh(e,t){p3(Yh,e,t)}function Qh(){}let Mt=null;function m3(){Mt=null,f3()}let dc=Qh;process.env.NODE_ENV!=="production"&&(dc=(e,t,n)=>{Zh(e,`[antd: ${t}] ${n}`),process.env.NODE_ENV==="test"&&m3()});const Jh=Symbol("WarningContext"),fc=i.shallowRef(),g3=e=>{i.provide(Jh,e),i.watch(e,()=>{fc.value=i.unref(e),i.triggerRef(fc)},{immediate:!0,deep:!0})},h3=()=>i.inject(Jh,i.computed(()=>fc.value||{}));i.defineComponent({props:{value:St()},setup(e,{slots:t}){return g3(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),process.env.NODE_ENV;const v3=dc;let e0=0;class t0{constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=e0,t.length===0&&v3(t.length>0,"[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."),e0+=1}getDerivativeToken(t){return this.derivatives.reduce((n,o)=>o(t,n),void 0)}}const pc=new cc;function y3(e){const t=Array.isArray(e)?e:[e];return pc.has(t)||pc.set(t,new t0(t)),pc.get(t)}const n0=new WeakMap;function Wi(e){let t=n0.get(e)||"";return t||(Object.keys(e).forEach(n=>{const o=e[n];t+=n,o instanceof t0?t+=o.id:o&&typeof o=="object"?t+=Wi(o):t+=o}),n0.set(e,t)),t}function b3(e,t){return Mn(`${t}_${Wi(e)}`)}const fr=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),o0="_bAmBoO_";function C3(e,t,n){var o,r;if(so()){sc(e,fr);const a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",t==null||t(a),document.body.appendChild(a),process.env.NODE_ENV!=="production"&&(a.innerHTML="Test",a.style.zIndex="9999999");const l=n?n(a):(o=getComputedStyle(a).content)==null?void 0:o.includes(o0);return(r=a.parentNode)==null||r.removeChild(a),lc(fr),l}return!1}let mc;function S3(){return mc===void 0&&(mc=C3(`@layer ${fr} { .${fr} { content: "${o0}"!important; } }`,e=>{e.className=fr})),mc}const w3=so();function ft(e){return typeof e=="number"?`${e}px`:e}const ki=(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(),$3=(e,t,n)=>Object.keys(e).length?`.${t}${n!=null&&n.scope?`.${n.scope}`:""}{${Object.entries(e).map(([o,r])=>`${o}:${r};`).join("")}}`:"",x3=(e,t,n)=>{const o={},r={};return Object.entries(e).forEach(([a,l])=>{var s,c,u;if((s=n==null?void 0:n.preserve)!=null&&s[a])r[a]=l;else if((typeof l=="string"||typeof l=="number")&&!((c=n==null?void 0:n.ignore)!=null&&c[a])){const d=ki(a,n==null?void 0:n.prefix);o[d]=typeof l=="number"&&!((u=n==null?void 0:n.unitless)!=null&&u[a])?`${l}px`:String(l),r[a]=`var(${d})`}}),[r,$3(o,t,{scope:n==null?void 0:n.scope})]},r0={},O3=process.env.NODE_ENV==="production",P3=process.env.NODE_ENV==="prerender",I3=!O3&&!P3?"css-dev-only-do-not-override":"css",$n=new Map;function T3(e){$n.set(e,($n.get(e)||0)+1)}function N3(e,t){typeof document<"u"&&document.querySelectorAll(`style[${jh}="${e}"]`).forEach(o=>{var r;o[lo]===t&&((r=o.parentNode)==null||r.removeChild(o))})}const E3=0;function R3(e,t){$n.set(e,($n.get(e)||0)-1);const n=Array.from($n.keys()),o=n.filter(r=>($n.get(r)||0)<=0);n.length-o.length>E3&&o.forEach(r=>{N3(r,t),$n.delete(r)})}const A3=(e,t,n,o)=>{let a={...n==null?void 0:n.getDerivativeToken(e),...t};return o&&(a=o(a)),a};function M3(e,t,n=i.ref({})){const o=dr(),r=i.computed(()=>Object.assign({},...t.value||[])),a=i.computed(()=>Wi(r.value)),l=i.computed(()=>{var c;return Wi(((c=n.value)==null?void 0:c.override)||r0)});return ic("token",i.computed(()=>{var c,u;return[((c=n.value)==null?void 0:c.salt)||"",(u=e.value)==null?void 0:u.id,a.value,l.value]}),()=>{const{salt:c="",override:u=r0,formatToken:d,getComputedToken:f}=n.value||{},p=f?f(r.value,u,e.value):A3(r.value,u,e.value,d),m=b3(p,c);p._tokenKey=m,T3(m);const v=`${I3}-${Mn(m)}`;return p._hashId=v,[p,v]},c=>{var u;R3(c[0]._tokenKey,(u=o.value)==null?void 0:u.cache.instanceId)})}var V3={animationIterationCount:1,aspectRatio: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,scale: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};function i0(e,t){const{path:n,parentSelectors:o}=t;Zh(!1,`[Ant Design Vue CSS-in-JS] ${n?`Error in '${n}': `:""}${e}${o.length?` Selector info: ${o.join(" -> ")}`:""}`)}const D3=(e,t,n)=>{if(e==="content"){const o=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;(typeof t!="string"||["normal","none","initial","inherit","unset"].indexOf(t)===-1&&!o.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||t.charAt(0)!=='"'&&t.charAt(0)!=="'"))&&i0(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${t}"'\`.`,n)}},B3=(e,t,n)=>{e==="animation"&&n.hashId&&t!=="none"&&i0(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`,n)},a0="data-ant-cssinjs-cache-path",L3="_FILE_STYLE__";let xn,l0=!0;function z3(){var e;if(!xn&&(xn={},so())){const t=document.createElement("div");t.className=a0,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(r=>{const[a,l]=r.split(":");xn[a]=l});const o=document.querySelector(`style[${a0}]`);o&&(l0=!1,(e=o.parentNode)==null||e.removeChild(o)),document.body.removeChild(t)}}function F3(e){return z3(),!!xn[e]}function H3(e){const t=xn[e];let n=null;if(t&&so())if(l0)n=L3;else{const o=document.querySelector(`style[${Xt}="${xn[e]}"]`);o?n=o.innerHTML:delete xn[e]}return[n,t]}const s0=so(),c0="_skip_check_",u0="_multi_value_";function d0(e){return Ar(Lu(e),Hu).replace(/\{%%%\:[^;];}/g,";")}function j3(e){return typeof e=="object"&&e&&(c0 in e||u0 in e)}function _3(e,t,n){if(!t)return e;const o=`.${t}`,r=n==="low"?`:where(${o})`:o;return e.split(",").map(l=>{var d;const s=l.trim().split(/\s+/);let c=s[0]||"";const u=((d=c.match(/^\w+/))==null?void 0:d[0])||"";return c=`${u}${r}${c.slice(u.length)}`,[c,...s.slice(1)].join(" ")}).join(",")}const gc=new Set;process.env.NODE_ENV;const hc=(e,t={},{root:n,injectHash:o,parentSelectors:r}={root:!0,parentSelectors:[]})=>{const{hashId:a,layer:l,path:s,hashPriority:c,transformers:u=[],linters:d=[]}=t;let f="",p={};function m(y){const C=y.getName(a);if(!p[C]){const[S]=hc(y.style,t,{root:!1,parentSelectors:r});p[C]=`@keyframes ${y.getName(a)}${S}`}}function v(y,C=[]){return y.forEach(S=>{Array.isArray(S)?v(S,C):S&&C.push(S)}),C}return v(Array.isArray(e)?e:[e]).forEach(y=>{const C=typeof y=="string"&&!n?{}:y;if(typeof C=="string")f+=`${C}
|
|
268
|
-
`;else if(C._keyframe)m(C);else{const S=u.reduce(($,x)=>{var w;return((w=x==null?void 0:x.visit)==null?void 0:w.call(x,$))||$},C);Object.keys(S).forEach($=>{const x=S[$];if(typeof x=="object"&&x&&($!=="animationName"||!x._keyframe)&&!j3(x)){let w=!1,P=$.trim(),b=!1;(n||o)&&a?P.startsWith("@")?w=!0:P=_3($,a,c):n&&!a&&(P==="&"||P==="")&&(P="",b=!0);const[I,E]=hc(x,t,{root:b,injectHash:w,parentSelectors:[...r,P]});p={...p,...E},f+=`${P}${I}`}else{let w=function(b,I){process.env.NODE_ENV!=="production"&&(typeof x!="object"||!(x!=null&&x[c0]))&&[D3,B3,...d].forEach(R=>R(b,I,{path:s,hashId:a,parentSelectors:r}));const E=b.replace(/[A-Z]/g,R=>`-${R.toLowerCase()}`);let A=I;!V3[b]&&typeof A=="number"&&A!==0&&(A=`${A}px`),b==="animationName"&&(I!=null&&I._keyframe)&&(m(I),A=I.getName(a)),f+=`${E}:${A};`};const P=(x==null?void 0:x.value)??x;typeof x=="object"&&(x!=null&&x[u0])&&Array.isArray(P)?P.forEach(b=>{w($,b)}):w($,P)}})}}),n?l&&S3():f=`{${f}}`,[f,p]};function f0(e,t){return Mn(`${e.join("%")}${t}`)}function p0(e,t){const n=dr(),o=i.computed(()=>{var l;return(l=e.value)==null?void 0:l.token._tokenKey}),r=i.computed(()=>{var l;return[o.value,...((l=e.value)==null?void 0:l.path)||[]]});let a=s0;return process.env.NODE_ENV!=="production"&&n.value.mock!==void 0&&(a=n.value.mock==="client"),ic("style",r,()=>{const{path:l,hashId:s,layer:c,nonce:u,clientOnly:d,order:f=0}=e.value||{},p=r.value.join("|");if(F3(p)){const[b,I]=H3(p);if(b)return[b,o.value,I,{},d,f]}const m=t(),{hashPriority:v,container:g,transformers:y,linters:C,cache:S}=n.value,[$,x]=hc(m,{hashId:s,hashPriority:v,layer:c,path:l==null?void 0:l.join("-"),transformers:y,linters:C}),w=d0($),P=f0(r.value,w);if(a){const b={mark:Xt,prepend:"queue",attachTo:g,priority:f},I=typeof u=="function"?u():u;I&&(b.csp={nonce:I});const E=sc(w,P,b);E[lo]=S.instanceId,E.setAttribute(jh,o.value),process.env.NODE_ENV!=="production"&&E.setAttribute(J6,r.value.join("|")),Object.keys(x).forEach(A=>{gc.has(A)||(gc.add(A),sc(d0(x[A]),`_effect-${A}`,{mark:Xt,prepend:"queue",attachTo:g}))})}return[w,o.value,P,x,d,f]},([,,l],s)=>{(s||n.value.autoClear)&&s0&&lc(l,{mark:Xt})}),l=>l}const W3="cssVar",k3=(e,t)=>{const{key:n,prefix:o,unitless:r,ignore:a,token:l,scope:s=""}=e;useContext(o3);const{_tokenKey:c}=l,u=[...e.path,n,s,c];return ic(W3,u,()=>{const f=t(),[p,m]=x3(f,n,{prefix:o,unitless:r,ignore:a,scope:s}),v=f0(u,m);return[p,m,v,n]},([,,f])=>{w3&&lc(f,{mark:Xt})})};class m0{constructor(t,n){this._keyframe=!0,this.name=t,this.style=n}getName(t=""){return t?`${t}-${this.name}`:this.name}}function co(e){return e.notSplit=!0,e}co(["borderTop","borderBottom"]),co(["borderTop"]),co(["borderBottom"]),co(["borderLeft","borderRight"]),co(["borderLeft"]),co(["borderRight"]);class g0{}const h0="CALC_UNIT",K3=new RegExp(h0,"g");function vc(e){return typeof e=="number"?`${e}${h0}`:e}class On extends g0{constructor(t,n){super(),this.result="";const o=typeof t;this.unitlessCssVar=n,t instanceof On?this.result=`(${t.result})`:o==="number"?this.result=vc(t):o==="string"&&(this.result=t)}add(t){return t instanceof On?this.result=`${this.result} + ${t.getResult()}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} + ${vc(t)}`),this.lowPriority=!0,this}sub(t){return t instanceof On?this.result=`${this.result} - ${t.getResult()}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} - ${vc(t)}`),this.lowPriority=!0,this}mul(t){return this.lowPriority&&(this.result=`(${this.result})`),t instanceof On?this.result=`${this.result} * ${t.getResult(!0)}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} * ${t}`),this.lowPriority=!1,this}div(t){return this.lowPriority&&(this.result=`(${this.result})`),t instanceof On?this.result=`${this.result} / ${t.getResult(!0)}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} / ${t}`),this.lowPriority=!1,this}getResult(t){return this.lowPriority||t?`(${this.result})`:this.result}equal(t){const{unit:n}=t||{};let o=!0;return typeof n=="boolean"?o=n:Array.from(this.unitlessCssVar).some(r=>this.result.includes(r))&&(o=!1),this.result=this.result.replace(K3,o?"px":""),typeof this.lowPriority<"u"?`calc(${this.result})`:this.result}}class Pn extends g0{constructor(t){super(),this.result=0,t instanceof Pn?this.result=t.result:typeof t=="number"&&(this.result=t)}add(t){return t instanceof Pn?this.result+=t.result:typeof t=="number"&&(this.result+=t),this}sub(t){return t instanceof Pn?this.result-=t.result:typeof t=="number"&&(this.result-=t),this}mul(t){return t instanceof Pn?this.result*=t.result:typeof t=="number"&&(this.result*=t),this}div(t){return t instanceof Pn?this.result/=t.result:typeof t=="number"&&(this.result/=t),this}equal(){return this.result}}const U3=(e,t)=>{const n=e==="css"?On:Pn;return o=>new n(o,t)},v0=(e,t)=>`${[t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-")}`;function y0(e,t={},n,o){const r={...t[e]};if(o!=null&&o.deprecatedTokens){const{deprecatedTokens:l}=o;l.forEach(([s,c])=>{process.env.NODE_ENV!=="production"&&Yh(!(r!=null&&r[s]),`Component Token \`${String(s)}\` of ${String(e)} is deprecated. Please use \`${String(c)}\` instead.`),(r!=null&&r[s]||r!=null&&r[c])&&(r[c]??(r[c]=r==null?void 0:r[s]))})}const a={...n,...r};return Object.keys(a).forEach(l=>{a[l]===t[l]&&delete a[l]}),a}const b0=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u";let yc=!0;function Ct(...e){if(!b0)return Object.assign({},...e);yc=!1;const t={};return e.forEach(n=>{if(typeof n!="object")return;Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get:()=>n[r]})})}),yc=!0,t}const C0={};function X3(){}const G3=e=>{let t,n=e,o=X3;return b0&&typeof Proxy<"u"&&(t=new Set,n=new Proxy(e,{get(r,a){return yc&&(t==null||t.add(a)),r[a]}}),o=(r,a)=>{var l;C0[r]={global:Array.from(t),component:{...(l=C0[r])==null?void 0:l.component,...a}}}),{token:n,keys:t,flush:o}};function S0(e,t={},n){return typeof n=="function"?n(Ct(t,t[e]??{})):n??{}}function q3(e){return e==="js"?{max:Math.max,min:Math.min}:{max:(...t)=>`max(${t.map(n=>ft(n)).join(",")})`,min:(...t)=>`min(${t.map(n=>ft(n)).join(",")})`}}const Y3=1e3*60*10;class Z3{constructor(){mo(this,"map",new Map);mo(this,"objectIDMap",new WeakMap);mo(this,"nextID",0);mo(this,"lastAccessBeat",new Map);mo(this,"accessBeat",0)}set(t,n){this.clear();const o=this.getCompositeKey(t);this.map.set(o,n),this.lastAccessBeat.set(o,Date.now())}get(t){const n=this.getCompositeKey(t),o=this.map.get(n);return this.lastAccessBeat.set(n,Date.now()),this.accessBeat+=1,o}getCompositeKey(t){return t.map(o=>o&&typeof o=="object"?`obj_${this.getObjectID(o)}`:`${typeof o}_${o}`).join("|")}getObjectID(t){if(this.objectIDMap.has(t))return this.objectIDMap.get(t);const n=this.nextID;return this.objectIDMap.set(t,n),this.nextID+=1,n}clear(){if(this.accessBeat>1e4){const t=Date.now();this.lastAccessBeat.forEach((n,o)=>{t-n>Y3&&(this.map.delete(o),this.lastAccessBeat.delete(o))}),this.accessBeat=0}}}const w0=new Z3;function Q3(e,t){return i.computed(()=>{const n=w0.get(t);if(n)return n;const o=e();return w0.set(t,o),o})}const J3=()=>({});function e8(e){const{useCSP:t=J3,useToken:n,usePrefix:o,getResetStyles:r,getCommonStyle:a,getCompUnitless:l}=e;function s(f,p,m,v){const g=Array.isArray(f)?f[0]:f;function y(b){return`${String(g)}${b.slice(0,1).toUpperCase()}${b.slice(1)}`}const C=(v==null?void 0:v.unitless)||{},$={...typeof l=="function"?l(f):{},[y("zIndexPopup")]:!0};Object.keys(C).forEach(b=>{$[y(b)]=C[b]});const x={...v,unitless:$,prefixToken:y},w=u(f,p,m,x),P=c(g,m,x);return(b,I=i.toValue(b))=>{const[,E]=w(i.toValue(b),I),[A,R]=P(I);return[A,E,R]}}function c(f,p,m){const{unitless:v,injectStyle:g=!0,prefixToken:y,ignore:C}=m,S=({rootCls:x,cssVar:w={}})=>{const{realToken:P}=n();return k3({path:[f],prefix:w.prefix,key:w.key,unitless:v,ignore:C,token:P,scope:x},()=>{const b=S0(f,P,p),I=y0(f,P,b,{deprecatedTokens:m==null?void 0:m.deprecatedTokens});return Object.keys(b).forEach(E=>{I[y(E)]=I[E],delete I[E]}),I}),null};return x=>{const{cssVar:w}=n();return[P=>g&&w?i.createVNode(i.Fragment,null,[i.createVNode(S,{rootCls:x,cssVar:w,component:f},null),P]):P,w==null?void 0:w.key]}}function u(f,p,m,v={}){const g=Array.isArray(f)?f:[f,f],[y]=g,C=g.join("-"),S=e.layer||{name:"antd"};return($,x=$)=>{const{theme:w,realToken:P,hashId:b,token:I,cssVar:E}=n(),{rootPrefixCls:A,iconPrefixCls:R}=o(),B=t(),M=E?"css":"js",z=i.unref(Q3(()=>{const N=new Set;return E&&Object.keys(v.unitless||{}).forEach(H=>{N.add(ki(H,E.prefix)),N.add(ki(H,v0(y,E.prefix)))}),U3(M,N)},[M,y,E==null?void 0:E.prefix])),{max:O,min:T}=q3(M),D=i.computed(()=>({theme:w.value,token:I.value,hashId:b.value,nonce:()=>B.nonce,clientOnly:v.clientOnly,layer:S,order:v.order||-999}));return typeof r=="function"&&p0(i.computed(()=>({...D.value,clientOnly:!1,path:["Shared",A]})),()=>r(I.value,{prefix:{rootPrefixCls:A,iconPrefixCls:R},csp:B})),[p0(i.computed(()=>({...D.value,path:[C,$,R]})),()=>{if(v.injectStyle===!1)return[];const{token:N,flush:H}=G3(I),_=S0(y,P,m),Y=`.${$}`,Z=y0(y,P,_,{deprecatedTokens:v.deprecatedTokens});E&&_&&typeof _=="object"&&Object.keys(_).forEach(U=>{_[U]=`var(${ki(U,v0(y,E.prefix))})`});const X=i.computed(()=>Ct(N.value,{componentCls:Y,prefixCls:$,iconCls:`.${R}`,antCls:`.${A}`,calc:z,max:O,min:T},E?_:Z)),J=i.computed(()=>p(X.value,{hashId:b.value,prefixCls:$,rootPrefixCls:A,iconPrefixCls:R}));H(y,Z);const te=typeof a=="function"?a(X.value,$,x,v.resetFont):null;return[v.resetStyle===!1?null:te,J.value]}),b]}}function d(f,p,m,v={}){const g=u(f,p,m,{resetStyle:!1,order:-998,...v});return({prefixCls:C,rootCls:S=C})=>(g(C,S),null)}return{genStyleHooks:s,genSubStyleComponent:d,genComponentStyleHook:u}}const t8={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},n8={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},o8="1.0.3",r8=y3(cr.defaultAlgorithm),i8={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},$0=(e,t,n)=>{const o=n.getDerivativeToken(e),{override:r,...a}=t;let l={...o,override:r};return l=ld(l),a&&Object.entries(a).forEach(([s,c])=>{const{theme:u,...d}=c;let f=d;u&&(f=$0({...l,...d},{override:d},u)),l[s]=f}),l};function a8(){const e=jb(),{override:t,cssVar:n}=i.unref(e),o=i.computed(()=>e.value.token),r=i.computed(()=>e.value.hashed),a=i.computed(()=>e.value.theme??r8),l=M3(i.computed(()=>a.value),i.computed(()=>[cr.defaultSeed,o.value]),i.computed(()=>({salt:`${o8}-${r.value||""}`,override:t,getComputedToken:$0,cssVar:n&&{prefix:n.prefix,key:n.key,unitless:n8,ignore:t8,preserve:i8}}))),[s,c,u]=i.unref(l),d=i.computed(()=>l.value[0]),f=i.computed(()=>r.value?l.value[1]:"");return[a,u,f,d,n]}const{genStyleHooks:Gt,genComponentStyleHook:h5,genSubStyleComponent:v5}=e8({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=Ke();return{iconPrefixCls:i.unref(t),rootPrefixCls:e()}},useToken:()=>{const[e,t,n,o,r]=a8();return{theme:e,realToken:t,hashId:n,token:o,cssVar:r}},useCSP:()=>{const{csp:e}=Ke();return(e==null?void 0:e.value)??{}},layer:{name:"antdx",dependencies:["antd"]}}),l8=e=>{const{componentCls:t,paddingSM:n,padding:o}=e;return{[t]:{[`${t}-content`]:{"&-filled,&-outlined,&-shadow":{padding:`${ft(n)} ${ft(o)}`,borderRadius:e.borderRadiusLG},"&-filled":{backgroundColor:e.colorFillContent},"&-outlined":{border:`1px solid ${e.colorBorderSecondary}`},"&-shadow":{boxShadow:e.boxShadowTertiary}}}}},s8=e=>{const{componentCls:t,fontSize:n,lineHeight:o,paddingSM:r,padding:a,calc:l}=e,s=l(n).mul(o).div(2).add(r).equal(),c=`${t}-content`;return{[t]:{[c]:{"&-round":{borderRadius:{_skip_check_:!0,value:s},paddingInline:l(a).mul(1.25).equal()}},[`&-start ${c}-corner`]:{borderStartStartRadius:e.borderRadiusXS},[`&-end ${c}-corner`]:{borderStartEndRadius:e.borderRadiusXS}}}},c8=e=>{const{componentCls:t,padding:n}=e;return{[`${t}-list`]:{display:"flex",flexDirection:"column",gap:n,overflowY:"auto"}}},u8=new m0("loadingMove",{"0%":{transform:"translateY(0)"},"10%":{transform:"translateY(4px)"},"20%":{transform:"translateY(0)"},"30%":{transform:"translateY(-4px)"},"40%":{transform:"translateY(0)"}}),d8=new m0("cursorBlink",{"0%":{opacity:1},"50%":{opacity:0},"100%":{opacity:1}}),f8=e=>{const{componentCls:t,fontSize:n,lineHeight:o,paddingSM:r,colorText:a,calc:l}=e;return{[t]:{display:"flex",columnGap:r,[`&${t}-end`]:{justifyContent:"end",flexDirection:"row-reverse",[`& ${t}-content-wrapper`]:{alignItems:"flex-end"}},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-typing ${t}-content:last-child::after`]:{content:'"|"',fontWeight:900,userSelect:"none",opacity:1,marginInlineStart:"0.1em",animationName:d8,animationDuration:"0.8s",animationIterationCount:"infinite",animationTimingFunction:"linear"},[`& ${t}-avatar`]:{display:"inline-flex",justifyContent:"center",alignSelf:"flex-start"},[`& ${t}-header, & ${t}-footer`]:{fontSize:n,lineHeight:o,color:e.colorText},[`& ${t}-header`]:{marginBottom:e.paddingXXS},[`& ${t}-footer`]:{marginTop:r},[`& ${t}-content-wrapper`]:{flex:"auto",display:"flex",flexDirection:"column",alignItems:"flex-start",minWidth:0,maxWidth:"100%"},[`& ${t}-content`]:{position:"relative",boxSizing:"border-box",minWidth:0,maxWidth:"100%",color:a,fontSize:e.fontSize,lineHeight:e.lineHeight,minHeight:l(r).mul(2).add(l(o).mul(n)).equal(),wordBreak:"break-word",[`& ${t}-dot`]:{position:"relative",height:"100%",display:"flex",alignItems:"center",columnGap:e.marginXS,padding:`0 ${ft(e.paddingXXS)}`,"&-item":{backgroundColor:e.colorPrimary,borderRadius:"100%",width:4,height:4,animationName:u8,animationDuration:"2s",animationIterationCount:"infinite",animationTimingFunction:"linear","&:nth-child(1)":{animationDelay:"0s"},"&:nth-child(2)":{animationDelay:"0.2s"},"&:nth-child(3)":{animationDelay:"0.4s"}}}}}}},x0=Gt("Bubble",e=>{const t=Ct(e,{});return[f8(t),c8(t),l8(t),s8(t)]},()=>({})),O0=Symbol("BubbleContext"),bc=i.shallowRef(),p8=e=>{i.provide(O0,e),i.watch(e,()=>{bc.value=i.unref(e),i.triggerRef(bc)},{immediate:!0,deep:!0})},m8=()=>i.inject(O0,i.computed(()=>bc.value||{})),g8=i.defineComponent({props:{value:St()},setup(e,{slots:t}){return p8(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),P0=i.defineComponent({name:"AXBubble",__name:"Bubble",props:i.mergeDefaults({prefixCls:null,rootClassName:null,styles:null,classNames:null,avatar:null,placement:null,loading:{type:Boolean},typing:null,content:null,messageRender:{type:Function},loadingRender:{type:Function},variant:null,shape:null,onTypingComplete:null,header:null,footer:null},{classNames:()=>({}),styles:()=>({}),placement:"start",loading:!1,content:"",variant:"filled"}),setup(e,{expose:t}){const n=He(e,["prefixCls","rootClassName","classNames","styles","avatar","placement","loading","loadingRender","typing","content","messageRender","variant","shape","onTypingComplete","header","footer"]);i.toRef(e,"content"),i.toRef(e,"prefixCls");const o=i.useSlots(),r=i.ref(e.content);i.watch(()=>e.content,()=>{r.value=e.content});const{onUpdate:a}=i.unref(m8()),l=i.ref(null),{direction:s,getPrefixCls:c}=Ke(),u=c("bubble",e.prefixCls),d=Ut("bubble"),[f,p,m,v]=Y6(()=>e.typing),[g,y]=q6(r,f,p,m),C=i.ref(!1);i.watch(g,()=>{a==null||a()}),i.watchEffect(()=>{var A;!y.value&&!e.loading?C.value||(C.value=!0,(A=e.onTypingComplete)==null||A.call(e)):C.value=!1});const[S,$,x]=x0(()=>u),w=i.computed(()=>[u,e.rootClassName,d.value.className,$.value,x,`${u}-${e.placement}`,{[`${u}-rtl`]:s.value==="rtl"},{[`${u}-typing`]:y.value&&!e.loading&&!e.messageRender&&!o.message&&!v.value}]),P=i.computed(()=>o.avatar?o.avatar():i.isVNode(e.avatar)?e.avatar:i.createVNode(vn,e.avatar,null)),b=i.computed(()=>o.message?o.message({content:g.value}):e.messageRender?e.messageRender(g.value):g.value),I=i.computed(()=>e.loading?o.loading?o.loading():e.loadingRender?e.loadingRender():i.createVNode(Z6,{prefixCls:u},null):i.createVNode(i.Fragment,null,[b.value,y.value&&i.toValue(v)])),E=i.computed(()=>{const A=i.createVNode("div",{style:{...d.value.styles.content,...e.styles.content},class:[`${u}-content`,`${u}-content-${e.variant}`,{[`${u}-content-${e.shape}`]:e.shape},d.value.classNames.content,e.classNames.content]},[i.toValue(I)]),R=o.header?o.header():e.header,B=o.footer?o.footer():e.footer;return R||B?i.createVNode("div",{class:`${u}-content-wrapper`},[R&&i.createVNode("div",{class:[`${u}-header`,d.value.classNames.header,e.classNames.header],style:{...d.value.styles.header,...e.styles.header}},[R]),A,B&&i.createVNode("div",{class:[`${u}-footer`,d.value.classNames.footer,e.classNames.footer],style:{...d.value.styles.footer,...e.styles.footer}},[B])]):A});return t({nativeElement:l}),()=>S(i.createVNode("div",i.mergeProps({style:{...d.value.style},class:i.toValue(w)},n,{ref:l}),[e.avatar&&i.createVNode("div",{style:{...d.value.styles.avatar,...e.styles.avatar},class:[`${u}-avatar`,d.value.classNames.avatar,e.classNames.avatar]},[i.toValue(P)]),i.toValue(E)]))}});var I0={exports:{}};/*!
|
|
268
|
+
`;else if(C._keyframe)m(C);else{const S=u.reduce(($,x)=>{var w;return((w=x==null?void 0:x.visit)==null?void 0:w.call(x,$))||$},C);Object.keys(S).forEach($=>{const x=S[$];if(typeof x=="object"&&x&&($!=="animationName"||!x._keyframe)&&!j3(x)){let w=!1,P=$.trim(),b=!1;(n||o)&&a?P.startsWith("@")?w=!0:P=_3($,a,c):n&&!a&&(P==="&"||P==="")&&(P="",b=!0);const[I,E]=hc(x,t,{root:b,injectHash:w,parentSelectors:[...r,P]});p={...p,...E},f+=`${P}${I}`}else{let w=function(b,I){process.env.NODE_ENV!=="production"&&(typeof x!="object"||!(x!=null&&x[c0]))&&[D3,B3,...d].forEach(R=>R(b,I,{path:s,hashId:a,parentSelectors:r}));const E=b.replace(/[A-Z]/g,R=>`-${R.toLowerCase()}`);let A=I;!V3[b]&&typeof A=="number"&&A!==0&&(A=`${A}px`),b==="animationName"&&(I!=null&&I._keyframe)&&(m(I),A=I.getName(a)),f+=`${E}:${A};`};const P=(x==null?void 0:x.value)??x;typeof x=="object"&&(x!=null&&x[u0])&&Array.isArray(P)?P.forEach(b=>{w($,b)}):w($,P)}})}}),n?l&&S3():f=`{${f}}`,[f,p]};function f0(e,t){return Mn(`${e.join("%")}${t}`)}function p0(e,t){const n=dr(),o=i.computed(()=>{var l;return(l=e.value)==null?void 0:l.token._tokenKey}),r=i.computed(()=>{var l;return[o.value,...((l=e.value)==null?void 0:l.path)||[]]});let a=s0;return process.env.NODE_ENV!=="production"&&n.value.mock!==void 0&&(a=n.value.mock==="client"),ic("style",r,()=>{const{path:l,hashId:s,layer:c,nonce:u,clientOnly:d,order:f=0}=e.value||{},p=r.value.join("|");if(F3(p)){const[b,I]=H3(p);if(b)return[b,o.value,I,{},d,f]}const m=t(),{hashPriority:v,container:g,transformers:y,linters:C,cache:S}=n.value,[$,x]=hc(m,{hashId:s,hashPriority:v,layer:c,path:l==null?void 0:l.join("-"),transformers:y,linters:C}),w=d0($),P=f0(r.value,w);if(a){const b={mark:Xt,prepend:"queue",attachTo:g,priority:f},I=typeof u=="function"?u():u;I&&(b.csp={nonce:I});const E=sc(w,P,b);E[lo]=S.instanceId,E.setAttribute(jh,o.value),process.env.NODE_ENV!=="production"&&E.setAttribute(J6,r.value.join("|")),Object.keys(x).forEach(A=>{gc.has(A)||(gc.add(A),sc(d0(x[A]),`_effect-${A}`,{mark:Xt,prepend:"queue",attachTo:g}))})}return[w,o.value,P,x,d,f]},([,,l],s)=>{(s||n.value.autoClear)&&s0&&lc(l,{mark:Xt})}),l=>l}const W3="cssVar",k3=(e,t)=>{const{key:n,prefix:o,unitless:r,ignore:a,token:l,scope:s=""}=e;useContext(o3);const{_tokenKey:c}=l,u=[...e.path,n,s,c];return ic(W3,u,()=>{const f=t(),[p,m]=x3(f,n,{prefix:o,unitless:r,ignore:a,scope:s}),v=f0(u,m);return[p,m,v,n]},([,,f])=>{w3&&lc(f,{mark:Xt})})};class m0{constructor(t,n){this._keyframe=!0,this.name=t,this.style=n}getName(t=""){return t?`${t}-${this.name}`:this.name}}function co(e){return e.notSplit=!0,e}co(["borderTop","borderBottom"]),co(["borderTop"]),co(["borderBottom"]),co(["borderLeft","borderRight"]),co(["borderLeft"]),co(["borderRight"]);class g0{}const h0="CALC_UNIT",K3=new RegExp(h0,"g");function vc(e){return typeof e=="number"?`${e}${h0}`:e}class On extends g0{constructor(t,n){super(),this.result="";const o=typeof t;this.unitlessCssVar=n,t instanceof On?this.result=`(${t.result})`:o==="number"?this.result=vc(t):o==="string"&&(this.result=t)}add(t){return t instanceof On?this.result=`${this.result} + ${t.getResult()}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} + ${vc(t)}`),this.lowPriority=!0,this}sub(t){return t instanceof On?this.result=`${this.result} - ${t.getResult()}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} - ${vc(t)}`),this.lowPriority=!0,this}mul(t){return this.lowPriority&&(this.result=`(${this.result})`),t instanceof On?this.result=`${this.result} * ${t.getResult(!0)}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} * ${t}`),this.lowPriority=!1,this}div(t){return this.lowPriority&&(this.result=`(${this.result})`),t instanceof On?this.result=`${this.result} / ${t.getResult(!0)}`:(typeof t=="number"||typeof t=="string")&&(this.result=`${this.result} / ${t}`),this.lowPriority=!1,this}getResult(t){return this.lowPriority||t?`(${this.result})`:this.result}equal(t){const{unit:n}=t||{};let o=!0;return typeof n=="boolean"?o=n:Array.from(this.unitlessCssVar).some(r=>this.result.includes(r))&&(o=!1),this.result=this.result.replace(K3,o?"px":""),typeof this.lowPriority<"u"?`calc(${this.result})`:this.result}}class Pn extends g0{constructor(t){super(),this.result=0,t instanceof Pn?this.result=t.result:typeof t=="number"&&(this.result=t)}add(t){return t instanceof Pn?this.result+=t.result:typeof t=="number"&&(this.result+=t),this}sub(t){return t instanceof Pn?this.result-=t.result:typeof t=="number"&&(this.result-=t),this}mul(t){return t instanceof Pn?this.result*=t.result:typeof t=="number"&&(this.result*=t),this}div(t){return t instanceof Pn?this.result/=t.result:typeof t=="number"&&(this.result/=t),this}equal(){return this.result}}const U3=(e,t)=>{const n=e==="css"?On:Pn;return o=>new n(o,t)},v0=(e,t)=>`${[t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-")}`;function y0(e,t={},n,o){const r={...t[e]};if(o!=null&&o.deprecatedTokens){const{deprecatedTokens:l}=o;l.forEach(([s,c])=>{process.env.NODE_ENV!=="production"&&Yh(!(r!=null&&r[s]),`Component Token \`${String(s)}\` of ${String(e)} is deprecated. Please use \`${String(c)}\` instead.`),(r!=null&&r[s]||r!=null&&r[c])&&(r[c]??(r[c]=r==null?void 0:r[s]))})}const a={...n,...r};return Object.keys(a).forEach(l=>{a[l]===t[l]&&delete a[l]}),a}const b0=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u";let yc=!0;function Ct(...e){if(!b0)return Object.assign({},...e);yc=!1;const t={};return e.forEach(n=>{if(typeof n!="object")return;Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get:()=>n[r]})})}),yc=!0,t}const C0={};function X3(){}const G3=e=>{let t,n=e,o=X3;return b0&&typeof Proxy<"u"&&(t=new Set,n=new Proxy(e,{get(r,a){return yc&&(t==null||t.add(a)),r[a]}}),o=(r,a)=>{var l;C0[r]={global:Array.from(t),component:{...(l=C0[r])==null?void 0:l.component,...a}}}),{token:n,keys:t,flush:o}};function S0(e,t={},n){return typeof n=="function"?n(Ct(t,t[e]??{})):n??{}}function q3(e){return e==="js"?{max:Math.max,min:Math.min}:{max:(...t)=>`max(${t.map(n=>ft(n)).join(",")})`,min:(...t)=>`min(${t.map(n=>ft(n)).join(",")})`}}const Y3=1e3*60*10;class Z3{constructor(){mo(this,"map",new Map);mo(this,"objectIDMap",new WeakMap);mo(this,"nextID",0);mo(this,"lastAccessBeat",new Map);mo(this,"accessBeat",0)}set(t,n){this.clear();const o=this.getCompositeKey(t);this.map.set(o,n),this.lastAccessBeat.set(o,Date.now())}get(t){const n=this.getCompositeKey(t),o=this.map.get(n);return this.lastAccessBeat.set(n,Date.now()),this.accessBeat+=1,o}getCompositeKey(t){return t.map(o=>o&&typeof o=="object"?`obj_${this.getObjectID(o)}`:`${typeof o}_${o}`).join("|")}getObjectID(t){if(this.objectIDMap.has(t))return this.objectIDMap.get(t);const n=this.nextID;return this.objectIDMap.set(t,n),this.nextID+=1,n}clear(){if(this.accessBeat>1e4){const t=Date.now();this.lastAccessBeat.forEach((n,o)=>{t-n>Y3&&(this.map.delete(o),this.lastAccessBeat.delete(o))}),this.accessBeat=0}}}const w0=new Z3;function Q3(e,t){return i.computed(()=>{const n=w0.get(t);if(n)return n;const o=e();return w0.set(t,o),o})}const J3=()=>({});function e8(e){const{useCSP:t=J3,useToken:n,usePrefix:o,getResetStyles:r,getCommonStyle:a,getCompUnitless:l}=e;function s(f,p,m,v){const g=Array.isArray(f)?f[0]:f;function y(b){return`${String(g)}${b.slice(0,1).toUpperCase()}${b.slice(1)}`}const C=(v==null?void 0:v.unitless)||{},$={...typeof l=="function"?l(f):{},[y("zIndexPopup")]:!0};Object.keys(C).forEach(b=>{$[y(b)]=C[b]});const x={...v,unitless:$,prefixToken:y},w=u(f,p,m,x),P=c(g,m,x);return(b,I=i.toValue(b))=>{const[,E]=w(i.toValue(b),I),[A,R]=P(I);return[A,E,R]}}function c(f,p,m){const{unitless:v,injectStyle:g=!0,prefixToken:y,ignore:C}=m,S=({rootCls:x,cssVar:w={}})=>{const{realToken:P}=n();return k3({path:[f],prefix:w.prefix,key:w.key,unitless:v,ignore:C,token:P,scope:x},()=>{const b=S0(f,P,p),I=y0(f,P,b,{deprecatedTokens:m==null?void 0:m.deprecatedTokens});return Object.keys(b).forEach(E=>{I[y(E)]=I[E],delete I[E]}),I}),null};return x=>{const{cssVar:w}=n();return[P=>g&&w?i.createVNode(i.Fragment,null,[i.createVNode(S,{rootCls:x,cssVar:w,component:f},null),P]):P,w==null?void 0:w.key]}}function u(f,p,m,v={}){const g=Array.isArray(f)?f:[f,f],[y]=g,C=g.join("-"),S=e.layer||{name:"antd"};return($,x=$)=>{const{theme:w,realToken:P,hashId:b,token:I,cssVar:E}=n(),{rootPrefixCls:A,iconPrefixCls:R}=o(),B=t(),M=E?"css":"js",z=i.unref(Q3(()=>{const N=new Set;return E&&Object.keys(v.unitless||{}).forEach(H=>{N.add(ki(H,E.prefix)),N.add(ki(H,v0(y,E.prefix)))}),U3(M,N)},[M,y,E==null?void 0:E.prefix])),{max:O,min:T}=q3(M),D=i.computed(()=>({theme:w.value,token:I.value,hashId:b.value,nonce:()=>B.nonce,clientOnly:v.clientOnly,layer:S,order:v.order||-999}));return typeof r=="function"&&p0(i.computed(()=>({...D.value,clientOnly:!1,path:["Shared",A]})),()=>r(I.value,{prefix:{rootPrefixCls:A,iconPrefixCls:R},csp:B})),[p0(i.computed(()=>({...D.value,path:[C,$,R]})),()=>{if(v.injectStyle===!1)return[];const{token:N,flush:H}=G3(I),_=S0(y,P,m),Y=`.${$}`,Z=y0(y,P,_,{deprecatedTokens:v.deprecatedTokens});E&&_&&typeof _=="object"&&Object.keys(_).forEach(U=>{_[U]=`var(${ki(U,v0(y,E.prefix))})`});const X=i.computed(()=>Ct(N.value,{componentCls:Y,prefixCls:$,iconCls:`.${R}`,antCls:`.${A}`,calc:z,max:O,min:T},E?_:Z)),J=i.computed(()=>p(X.value,{hashId:b.value,prefixCls:$,rootPrefixCls:A,iconPrefixCls:R}));H(y,Z);const te=typeof a=="function"?a(X.value,$,x,v.resetFont):null;return[v.resetStyle===!1?null:te,J.value]}),b]}}function d(f,p,m,v={}){const g=u(f,p,m,{resetStyle:!1,order:-998,...v});return({prefixCls:C,rootCls:S=C})=>(g(C,S),null)}return{genStyleHooks:s,genSubStyleComponent:d,genComponentStyleHook:u}}const t8={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},n8={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},o8="1.0.3",r8=y3(cr.defaultAlgorithm),i8={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},$0=(e,t,n)=>{const o=n.getDerivativeToken(e),{override:r,...a}=t;let l={...o,override:r};return l=ld(l),a&&Object.entries(a).forEach(([s,c])=>{const{theme:u,...d}=c;let f=d;u&&(f=$0({...l,...d},{override:d},u)),l[s]=f}),l};function a8(){const e=jb(),{override:t,cssVar:n}=i.unref(e),o=i.computed(()=>e.value.token),r=i.computed(()=>e.value.hashed),a=i.computed(()=>e.value.theme??r8),l=M3(i.computed(()=>a.value),i.computed(()=>[cr.defaultSeed,o.value]),i.computed(()=>({salt:`${o8}-${r.value||""}`,override:t,getComputedToken:$0,cssVar:n&&{prefix:n.prefix,key:n.key,unitless:n8,ignore:t8,preserve:i8}}))),[s,c,u]=i.unref(l),d=i.computed(()=>l.value[0]),f=i.computed(()=>r.value?l.value[1]:"");return[a,u,f,d,n]}const{genStyleHooks:Gt,genComponentStyleHook:h5,genSubStyleComponent:v5}=e8({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=Ke();return{iconPrefixCls:i.unref(t),rootPrefixCls:e()}},useToken:()=>{const[e,t,n,o,r]=a8();return{theme:e,realToken:t,hashId:n,token:o,cssVar:r}},useCSP:()=>{const{csp:e}=Ke();return(e==null?void 0:e.value)??{}},layer:{name:"antdx",dependencies:["antd"]}}),l8=e=>{const{componentCls:t,paddingSM:n,padding:o}=e;return{[t]:{[`${t}-content`]:{"&-filled,&-outlined,&-shadow":{padding:`${ft(n)} ${ft(o)}`,borderRadius:e.borderRadiusLG},"&-filled":{backgroundColor:e.colorFillContent},"&-outlined":{border:`1px solid ${e.colorBorderSecondary}`},"&-shadow":{boxShadow:e.boxShadowTertiary}}}}},s8=e=>{const{componentCls:t,fontSize:n,lineHeight:o,paddingSM:r,padding:a,calc:l}=e,s=l(n).mul(o).div(2).add(r).equal(),c=`${t}-content`;return{[t]:{[c]:{"&-round":{borderRadius:{_skip_check_:!0,value:s},paddingInline:l(a).mul(1.25).equal()}},[`&-start ${c}-corner`]:{borderStartStartRadius:e.borderRadiusXS},[`&-end ${c}-corner`]:{borderStartEndRadius:e.borderRadiusXS}}}},c8=e=>{const{componentCls:t,padding:n}=e;return{[`${t}-list`]:{display:"flex",flexDirection:"column",gap:n,overflowY:"auto"}}},u8=new m0("loadingMove",{"0%":{transform:"translateY(0)"},"10%":{transform:"translateY(4px)"},"20%":{transform:"translateY(0)"},"30%":{transform:"translateY(-4px)"},"40%":{transform:"translateY(0)"}}),d8=new m0("cursorBlink",{"0%":{opacity:1},"50%":{opacity:0},"100%":{opacity:1}}),f8=e=>{const{componentCls:t,fontSize:n,lineHeight:o,paddingSM:r,colorText:a,calc:l}=e;return{[t]:{display:"flex",columnGap:r,[`&${t}-end`]:{justifyContent:"end",flexDirection:"row-reverse",[`& ${t}-content-wrapper`]:{alignItems:"flex-end"}},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-typing ${t}-content:last-child::after`]:{content:'"|"',fontWeight:900,userSelect:"none",opacity:1,marginInlineStart:"0.1em",animationName:d8,animationDuration:"0.8s",animationIterationCount:"infinite",animationTimingFunction:"linear"},[`& ${t}-avatar`]:{display:"inline-flex",justifyContent:"center",alignSelf:"flex-start"},[`& ${t}-header, & ${t}-footer`]:{fontSize:n,lineHeight:o,color:e.colorText},[`& ${t}-header`]:{marginBottom:e.paddingXXS},[`& ${t}-footer`]:{marginTop:r},[`& ${t}-content-wrapper`]:{flex:"auto",display:"flex",flexDirection:"column",alignItems:"flex-start",minWidth:0,maxWidth:"100%"},[`& ${t}-content`]:{position:"relative",boxSizing:"border-box",minWidth:0,maxWidth:"100%",color:a,fontSize:e.fontSize,lineHeight:e.lineHeight,minHeight:l(r).mul(2).add(l(o).mul(n)).equal(),wordBreak:"break-word",[`& ${t}-dot`]:{position:"relative",height:"100%",display:"flex",alignItems:"center",columnGap:e.marginXS,padding:`0 ${ft(e.paddingXXS)}`,"&-item":{backgroundColor:e.colorPrimary,borderRadius:"100%",width:4,height:4,animationName:u8,animationDuration:"2s",animationIterationCount:"infinite",animationTimingFunction:"linear","&:nth-child(1)":{animationDelay:"0s"},"&:nth-child(2)":{animationDelay:"0.2s"},"&:nth-child(3)":{animationDelay:"0.4s"}}}}}}},x0=Gt("Bubble",e=>{const t=Ct(e,{});return[f8(t),c8(t),l8(t),s8(t)]},()=>({})),O0=Symbol("BubbleContext"),bc=i.shallowRef(),p8=e=>{i.provide(O0,e),i.watch(e,()=>{bc.value=i.unref(e),i.triggerRef(bc)},{immediate:!0,deep:!0})},m8=()=>i.inject(O0,i.computed(()=>bc.value||{})),g8=i.defineComponent({props:{value:St()},setup(e,{slots:t}){return p8(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),P0=i.defineComponent({name:"AXBubble",__name:"Bubble",props:i.mergeDefaults({prefixCls:null,rootClassName:null,styles:null,classNames:null,avatar:null,placement:null,loading:{type:Boolean},typing:null,content:null,messageRender:{type:Function},loadingRender:{type:Function},variant:null,shape:null,onTypingComplete:null,header:null,footer:null},{classNames:()=>({}),styles:()=>({}),placement:"start",loading:!1,content:"",variant:"filled"}),setup(e,{expose:t}){const n=He(e,["prefixCls","rootClassName","classNames","styles","avatar","placement","loading","loadingRender","typing","content","messageRender","variant","shape","onTypingComplete","header","footer"]);i.toRef(e,"content"),i.toRef(e,"prefixCls");const o=i.useSlots(),r=i.ref(e.content);i.watch(()=>e.content,()=>{r.value=e.content});const{onUpdate:a}=i.unref(m8()),l=i.ref(null),{direction:s,getPrefixCls:c}=Ke(),u=c("bubble",e.prefixCls),d=Ut("bubble"),[f,p,m,v]=Y6(()=>e.typing),[g,y]=q6(r,f,p,m),C=i.ref(!1);i.watch(g,()=>{a==null||a()}),i.watchEffect(()=>{var A;!y.value&&!e.loading?C.value||(C.value=!0,(A=e.onTypingComplete)==null||A.call(e)):C.value=!1});const[S,$,x]=x0(()=>u),w=i.computed(()=>[u,e.rootClassName,d.value.className,$.value,x,`${u}-${e.placement}`,{[`${u}-rtl`]:s.value==="rtl"},{[`${u}-typing`]:y.value&&!e.loading&&!e.messageRender&&!o.message&&!v.value}]),P=i.computed(()=>o.avatar?o.avatar():i.isVNode(e.avatar)?e.avatar:i.createVNode(vn,e.avatar,null)),b=i.computed(()=>o.message?o.message({content:g.value}):e.messageRender?e.messageRender(g.value):g.value),I=i.computed(()=>e.loading?o.loading?o.loading():e.loadingRender?e.loadingRender():i.createVNode(Z6,{prefixCls:u},null):i.createVNode(i.Fragment,null,[b.value,y.value&&i.toValue(v)])),E=i.computed(()=>{const A=i.createVNode("div",{style:{...d.value.styles.content,...e.styles.content},class:[`${u}-content`,`${u}-content-${e.variant}`,{[`${u}-content-${e.shape}`]:e.shape},d.value.classNames.content,e.classNames.content]},[i.toValue(I)]),R=o.header?o.header():e.header,B=o.footer?o.footer():e.footer;return R||B?i.createVNode("div",{class:`${u}-content-wrapper`},[R&&i.createVNode("div",{class:[`${u}-header`,d.value.classNames.header,e.classNames.header],style:{...d.value.styles.header,...e.styles.header}},[R]),A,B&&i.createVNode("div",{class:[`${u}-footer`,d.value.classNames.footer,e.classNames.footer],style:{...d.value.styles.footer,...e.styles.footer}},[B])]):A});return t({nativeElement:l}),()=>S(i.createVNode("div",i.mergeProps({style:{...d.value.style},class:i.toValue(w)},n,{ref:l}),[i.toValue(P)&&i.createVNode("div",{style:{...d.value.styles.avatar,...e.styles.avatar},class:[`${u}-avatar`,d.value.classNames.avatar,e.classNames.avatar]},[i.toValue(P)]),i.toValue(E)]))}});var I0={exports:{}};/*!
|
|
269
269
|
Copyright (c) 2018 Jed Watson.
|
|
270
270
|
Licensed under the MIT License (MIT), see
|
|
271
271
|
http://jedwatson.github.io/classnames
|
|
@@ -286,7 +286,7 @@ summary tabindex target title type usemap value width wmode wrap onCopy onCut on
|
|
|
286
286
|
onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
|
|
287
287
|
onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
|
|
288
288
|
onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
|
|
289
|
-
onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`.split(/[\s\n]+/),v8="aria-",y8="data-";function N0(e,t){return e.indexOf(t)===0}function uo(e,t=!1){let n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n={...t};const o={};return Object.keys(e).forEach(r=>{(n.aria&&(r==="role"||N0(r,v8))||n.data&&N0(r,y8)||n.attr&&(T0.includes(r)||T0.includes(r.toLowerCase())))&&(o[r]=e[r])}),o}function b8(e){const[t,n]=Ie(e.value.length),o=i.computed(()=>e.value.slice(0,i.unref(t))),r=i.computed(()=>{const l=i.unref(o)[i.unref(o).length-1];return l?l.key:null});i.watch(e,()=>{var l;if(!(i.unref(o).length&&i.unref(o).every((s,c)=>{var u;return s.key===((u=e.value[c])==null?void 0:u.key)}))){if(i.unref(o).length===0)n(1);else for(let s=0;s<i.unref(o).length;s+=1)if(i.unref(o)[s].key!==((l=e.value[s])==null?void 0:l.key)){n(s);break}}},{immediate:!0,deep:!0});const a=Ki(l=>{l===i.unref(r)&&n(i.unref(t)+1)});return[o,a]}function C8(e,t){const n=(r,a)=>{var l;return typeof t.value=="function"?t.value(r,a):t?((l=t.value)==null?void 0:l[r.role])||{}:{}};return i.computed(()=>(e.value||[]).map((r,a)=>{const l=r.key??`preset_${a}`;return{...n(r,a),...r,key:l}}))}const S8=1,E0=i.defineComponent({name:"AXBubbleList",inheritAttrs:!1,__name:"BubbleList",props:i.mergeDefaults({prefixCls:null,rootClassName:null,items:null,autoScroll:{type:Boolean},roles:null},{autoScroll:!0}),setup(e,{expose:t}){const n=He(e,["prefixCls","rootClassName","items","autoScroll","roles"]);i.toRef(e,"roles"),i.toRef(e,"items"),i.toRef(e,"prefixCls");const o=i.useAttrs(),r=uo(i.mergeProps(n,o),{attr:!0,aria:!0}),a=i.ref(e.items),l=i.ref(e.roles);i.watch(()=>e.items,()=>{a.value=e.items}),i.watch(()=>e.roles,()=>{l.value=e.roles});const s=i.ref(null),c=i.ref({}),{getPrefixCls:u}=Ke(),d=u("bubble",e.prefixCls),f=`${d}-list`,[p,m,v]=x0(d),[g,y]=Ie(!1);i.watchEffect(()=>{y(!0),i.onWatcherCleanup(()=>{y(!1)})});const C=C8(a,l),[S,$]=b8(C),[x,w]=Ie(!0),[P,b]=Ie(0),I=R=>{const B=R.target;w(B.scrollHeight-Math.abs(B.scrollTop)-B.clientHeight<=S8)};i.watch(P,()=>{e.autoScroll&&i.unref(s)&&i.unref(x)&&i.nextTick(()=>{i.unref(s).scrollTo({top:i.unref(s).scrollHeight})})}),i.watch(()=>i.unref(S).length,()=>{var R;if(e.autoScroll){const B=(R=i.unref(S)[i.unref(S).length-2])==null?void 0:R.key,M=i.unref(c)[B];if(M){const{nativeElement:z}=M,{top:O=0,bottom:T=0}=(z==null?void 0:z.getBoundingClientRect())??{},{top:D,bottom:L}=i.unref(s).getBoundingClientRect();O<L&&T>D&&(b(i.unref(P)+1),w(!0))}}});const E=Ki(()=>{e.autoScroll&&b(i.unref(P)+1)}),A=i.computed(()=>({onUpdate:E}));return t({nativeElement:s,scrollTo:({key:R,offset:B,behavior:M="smooth",block:z})=>{if(typeof B=="number")i.unref(s).scrollTo({top:B,behavior:M});else if(R!==void 0){const O=i.unref(c)[R];if(O){const T=i.unref(S).findIndex(D=>D.key===R);w(T===i.unref(S).length-1),O.nativeElement.scrollIntoView({behavior:M,block:z})}}}}),()=>p(i.createVNode(g8,{value:A.value},{default:()=>[i.createVNode("div",i.mergeProps(r,{class:re(f,e.rootClassName,m.value,v,{[`${f}-reach-end`]:x.value}),ref:s,onScroll:I}),[i.unref(S).map(({key:R,onTypingComplete:B,...M})=>i.createVNode(P0,i.mergeProps(M,{key:R,ref:z=>{z?c.value[R]=z:delete c.value[R]},typing:g.value?M.typing:!1,onTypingComplete:()=>{B==null||B(),$(R)}}),null))])]}))}}),w8=Object.assign(P0,{List:E0}),$8=i.defineComponent({name:"AXConversationsItem",__name:"ConversationsItem",props:{info:null,prefixCls:null,direction:null,menu:null,active:{type:Boolean},onClick:{type:Function}},setup(e){const t=He(e,["prefixCls","info","class","direction","onClick","active","menu"]);i.toRef(e,"class");const n=i.computed(()=>uo(t,{aria:!0,data:!0,attr:!0})),o=p=>{p.stopPropagation()},r=i.computed(()=>e.info.disabled),[a,l]=Ie(!1),[s,c]=Ie(!1),u=i.computed(()=>re(e.class,`${e.prefixCls}-item`,{[`${e.prefixCls}-item-active`]:e.active&&!r.value},{[`${e.prefixCls}-item-disabled`]:r.value})),d=()=>{!r.value&&e.onClick&&e.onClick(e.info)},f=p=>{p&&c(!p)};return()=>i.createVNode(Ht,{title:e.info.label,open:a.value&&s.value,onOpenChange:c,placement:e.direction==="rtl"?"left":"right"},{default:()=>[i.createVNode("li",i.mergeProps(n.value,{class:u.value,onClick:d}),[e.info.icon&&i.createVNode("div",{class:`${e.prefixCls}-icon`},[e.info.icon]),i.createVNode($e.Text,{class:`${e.prefixCls}-label`,ellipsis:{onEllipsis:l}},{default:()=>[e.info.label]}),e.menu&&!r.value&&i.createVNode(bn,{placement:e.direction==="rtl"?"bottomLeft":"bottomRight",trigger:["click"],disabled:r.value,onOpenChange:f},{default:()=>i.createVNode(Ko,{onClick:o,disabled:r.value,class:`${e.prefixCls}-menu-icon`},null),overlay:()=>i.createVNode(_t,e.menu,null)})])]})}}),R0=Symbol("GroupTitleContext"),Cc=i.shallowRef(),x8=e=>{i.provide(R0,e),i.watch(e,()=>{Cc.value=i.unref(e),i.triggerRef(Cc)},{immediate:!0,deep:!0})},O8=()=>i.inject(R0,i.computed(()=>Cc.value||{})),P8=i.defineComponent({props:{value:St()},setup(e,{slots:t}){return x8(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),A0=i.defineComponent({name:"AXConversationsGroupTitle",__name:"GroupTitle",setup(e){const t=i.useSlots(),n=O8(),o=i.computed(()=>{var r;return(r=t.default)==null?void 0:r.call(t)});return()=>i.createVNode("div",{class:re(`${n.value.prefixCls}-group-title`)},[o.value&&i.createVNode($e.Text,null,{default:()=>[o.value]})])}});function M0(e,t){const{defaultValue:n,value:o=i.ref()}=t||{};let r=typeof e=="function"?e():e;o.value!==void 0&&(r=i.unref(o)),n!==void 0&&(r=typeof n=="function"?n():n);const a=i.ref(r),l=i.ref(r);i.watchEffect(()=>{let c=o.value!==void 0?o.value:a.value;t.postState&&(c=t.postState(c)),l.value=c});function s(c){const u=l.value;a.value=c,i.toRaw(l.value)!==c&&t.onChange&&t.onChange(c,u)}return i.watch(o,()=>{a.value=o.value}),[l,s]}const Sc="__ungrouped",I8=(e,t=[])=>{const n=i.computed(()=>{if(!i.toValue(e))return{enableGroup:!1,sort:void 0,title:void 0};let o={sort:void 0,title:void 0};return typeof i.toValue(e)=="object"&&(o={...o,...i.toValue(e)}),{enableGroup:!0,sort:o.sort,title:o.title}});return i.computed(()=>{if(!n.value.enableGroup)return{groupList:[{name:Sc,data:i.toValue(t),title:void 0}],enableGroup:n.value.enableGroup};const o=i.toValue(t).reduce((l,s)=>{const c=s.group||Sc;return l[c]||(l[c]=[]),l[c].push(s),l},{});return{groupList:(n.value.sort?Object.keys(o).sort(n.value.sort):Object.keys(o)).map(l=>({name:l===Sc?void 0:l,title:n.value.title,data:o[l]})),enableGroup:n.value.enableGroup}})},T8=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",gap:e.paddingXXS,overflowY:"auto",padding:e.paddingSM,[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-list`]:{display:"flex",gap:e.paddingXXS,flexDirection:"column",paddingLeft:0,[`& ${t}-item`]:{paddingInlineStart:e.paddingXL},[`& ${t}-label`]:{color:e.colorTextDescription}},[`& ${t}-item`]:{display:"flex",height:e.controlHeightLG,minHeight:e.controlHeightLG,gap:e.paddingXS,padding:`0 ${ft(e.paddingXS)}`,alignItems:"center",borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,"&:hover":{backgroundColor:e.colorBgTextHover},"&-active":{backgroundColor:e.colorBgTextHover,[`& ${t}-label, ${t}-menu-icon`]:{color:e.colorText}},"&-disabled":{cursor:"not-allowed",[`& ${t}-label`]:{color:e.colorTextDisabled}},"&:hover, &-active":{[`& ${t}-menu-icon`]:{opacity:1}}},[`& ${t}-label`]:{flex:1,color:e.colorText},[`& ${t}-menu-icon`]:{opacity:0,fontSize:e.fontSizeXL},[`& ${t}-group-title`]:{display:"flex",alignItems:"center",height:e.controlHeightLG,minHeight:e.controlHeightLG,padding:`0 ${ft(e.paddingXS)}`}}}},N8=Gt("Conversations",e=>{const t=Ct(e,{});return T8(t)},()=>({})),E8=i.defineComponent({name:"AXConversations",__name:"Conversations",props:i.mergeDefaults({items:null,activeKey:null,defaultActiveKey:null,onActiveChange:{type:Function},menu:{type:Function},groupable:{type:Boolean},styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({})}),setup(e){const t=He(e,["prefixCls","rootClassName","items","activeKey","defaultActiveKey","onActiveChange","menu","styles","classNames","groupable","class","style"]);i.toRef(e,"class"),i.toRef(e,"activeKey"),i.toRef(e,"prefixCls");const n=i.ref(e.activeKey),o=i.computed(()=>uo(t,{attr:!0,aria:!0,data:!0})),[r,a]=M0(e.defaultActiveKey,{value:n});i.watch(()=>e.activeKey,()=>{n.value=e.activeKey});const l=I8(()=>e.groupable,()=>e.items),{getPrefixCls:s,direction:c}=Ke(),u=i.computed(()=>s("conversations",e.prefixCls)),d=Ut("conversations"),[f,p,m]=N8(u),v=i.computed(()=>re(u.value,d.value.className,e.class,e.rootClassName,p.value,m,{[`${u.value}-rtl`]:c.value==="rtl"})),g=y=>{a(y.key),e.onActiveChange&&e.onActiveChange(y.key)};return()=>f(i.createVNode("ul",i.mergeProps(o.value,{style:{...typeof d.value.style=="object"?d.value.style:{},...typeof e.style=="object"?e.style:{}},class:v.value}),[l.value.groupList.map((y,C)=>{const S=y.data.map(($,x)=>i.createVNode($8,{key:$.key||`key-${x}`,info:$,prefixCls:u.value,direction:c.value,class:re(e.classNames.item,d.value.classNames.item),style:{...d.value.styles.item,...e.styles.item},menu:typeof e.menu=="function"?e.menu($):e.menu,active:r.value===$.key,onClick:g},null));return l.value.enableGroup?i.createVNode("li",{key:y.name||`key-${C}`},[i.createVNode(P8,{value:{prefixCls:u.value}},{default:()=>{var $;return[(($=y.title)==null?void 0:$.call(y,y.name,{components:{GroupTitle:A0}}))||i.createVNode(A0,{key:y.name},{default:()=>[y.name]})]}}),i.createVNode("ul",{class:`${u.value}-list`},[S])]):S})]))}}),R8=e=>{const{componentCls:t,calc:n}=e,o=n(e.fontSizeHeading3).mul(e.lineHeightHeading3).equal(),r=n(e.fontSize).mul(e.lineHeight).equal();return{[t]:{gap:e.padding,[`${t}-icon`]:{height:n(o).add(r).add(e.paddingXXS).equal(),display:"flex",img:{height:"100%"}},[`${t}-content-wrapper`]:{gap:e.paddingXS,flex:"auto",minWidth:0,[`${t}-title-wrapper`]:{gap:e.paddingXS},[`${t}-title`]:{margin:0},[`${t}-extra`]:{marginInlineStart:"auto"}}}}},A8=e=>{const{componentCls:t}=e;return{[t]:{"&-filled":{paddingInline:e.padding,paddingBlock:e.paddingSM,background:e.colorFillContent,borderRadius:e.borderRadiusLG},"&-borderless":{[`${t}-title`]:{fontSize:e.fontSizeHeading3,lineHeight:e.lineHeightHeading3}}}}},M8=Gt("Welcome",e=>{const t=Ct(e,{});return[R8(t),A8(t)]},()=>({}));function V8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const D8=i.defineComponent({name:"AXWelcome",__name:"Welcome",props:i.mergeDefaults({prefixCls:null,rootClassName:null,className:null,style:null,variant:null,classNames:null,styles:null,icon:null,title:null,description:null,extra:null},{variant:"filled",classNames:()=>({}),styles:()=>({})}),setup(e){i.toRef(e,"prefixCls");const t=i.useSlots(),{direction:n,getPrefixCls:o}=Ke(),r=o("welcome",e.prefixCls),a=Ut("welcome"),[l,s,c]=M8(r),u=i.computed(()=>{const m=t.icon?t.icon():e.icon;if(!m)return null;let v=m;return typeof m=="string"&&m.startsWith("http")&&(v=i.createVNode("img",{src:m,alt:"icon"},null)),i.createVNode("div",{class:re(`${r}-icon`,a.value.classNames.icon,e.classNames.icon),style:e.styles.icon},[v])}),d=i.computed(()=>{const m=t.title?t.title():e.title;return m?i.createVNode($e.Title,{level:4,class:re(`${r}-title`,a.value.classNames.title,e.classNames.title),style:e.styles.title},V8(m)?m:{default:()=>[m]}):null}),f=i.computed(()=>t.description?t.description():e.description),p=i.computed(()=>{const m=t.extra?t.extra():e.extra;return m?i.createVNode("div",{class:re(`${r}-extra`,a.value.classNames.extra,e.classNames.extra),style:e.styles.extra},[m]):null});return()=>l(i.createVNode(sr,{class:re(r,a.value.className,e.className,e.rootClassName,s.value,c,`${r}-${e.variant}`,{[`${r}-rtl`]:n.value==="rtl"}),style:e.style},{default:()=>[u.value,i.createVNode(sr,{vertical:!0,class:`${r}-content-wrapper`},{default:()=>[t.extra||e.extra?i.createVNode(sr,{align:"flex-start",class:`${r}-title-wrapper`},{default:()=>[d.value,p.value]}):d.value,f.value&&i.createVNode($e.Text,{class:re(`${r}-description`,a.value.classNames.description,e.classNames.description),style:e.styles.description},{default:()=>[f.value]})]})]}))}}),B8=e=>{const{componentCls:t}=e;return{[t]:{"&, & *":{boxSizing:"border-box"},maxWidth:"100%",[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-title`]:{marginBlockStart:0,fontWeight:"normal",color:e.colorTextTertiary},[`& ${t}-list`]:{display:"flex",gap:e.paddingSM,overflowX:"scroll","&::-webkit-scrollbar":{display:"none"},listStyle:"none",paddingInlineStart:0,marginBlock:0,alignItems:"stretch","&-wrap":{flexWrap:"wrap"},"&-vertical":{flexDirection:"column",alignItems:"flex-start"}},[`${t}-item`]:{flex:"none",display:"flex",gap:e.paddingXS,height:"auto",paddingBlock:e.paddingSM,paddingInline:e.padding,alignItems:"flex-start",justifyContent:"flex-start",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,transition:["border","background"].map(n=>`${n} ${e.motionDurationSlow}`).join(","),border:`${ft(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,[`&:not(${t}-item-has-nest)`]:{"&:hover":{cursor:"pointer",background:e.colorFillTertiary},"&:active":{background:e.colorFill}},[`${t}-content`]:{flex:"auto",minWidth:0,display:"flex",gap:e.paddingXXS,flexDirection:"column",alignItems:"flex-start"},[`${t}-icon, ${t}-label, ${t}-desc`]:{margin:0,padding:0,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start",whiteSpace:"normal"},[`${t}-label`]:{color:e.colorTextHeading,fontWeight:500},[`${t}-label + ${t}-desc`]:{color:e.colorTextTertiary},[`&${t}-item-disabled`]:{pointerEvents:"none",background:e.colorBgContainerDisabled,[`${t}-label, ${t}-desc`]:{color:e.colorTextTertiary}}}}}},L8=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-item-has-nest`]:{[`> ${t}-content`]:{[`> ${t}-label`]:{fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}}},[`&${t}-nested`]:{marginTop:e.paddingXS,alignSelf:"stretch",[`${t}-list`]:{alignItems:"stretch"},[`${t}-item`]:{border:0,background:e.colorFillQuaternary}}}}},z8=Gt("Prompts",e=>{const t=Ct(e,{});return[B8(t),L8(t)]},()=>({})),V0=i.defineComponent({name:"AXPrompts",__name:"Prompts",props:i.mergeDefaults({items:null,title:null,onItemClick:{type:Function},vertical:{type:Boolean},wrap:{type:Boolean},styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({})}),setup(e){const t=He(e,["prefixCls","title","class","items","onItemClick","vertical","wrap","rootClassName","styles","classNames","style"]);i.toRef(e,"class"),i.toRef(e,"prefixCls");const n=i.useSlots(),{getPrefixCls:o,direction:r}=Ke(),a=o("prompts",e.prefixCls),l=Ut("prompts"),[s,c,u]=z8(a),d=i.computed(()=>re(a,l.value.className,e.class,e.rootClassName,c.value,u,{[`${a}-rtl`]:r.value==="rtl"})),f=i.computed(()=>re(`${a}-list`,l.value.classNames.list,e.classNames.list,{[`${a}-list-wrap`]:e.wrap},{[`${a}-list-vertical`]:e.vertical})),p=i.computed(()=>n.title?n.title():e.title);return()=>{var m;return s(i.createVNode("div",i.mergeProps(t,{class:d.value,style:{...typeof e.style=="object"?e.style:{},...typeof l.value.style=="object"?l.value.style:{}}}),[p.value&&i.createVNode($e.Title,{level:5,class:re(`${a}-title`,l.value.classNames.title,e.classNames.title),style:{...l.value.styles.title,...e.styles.title}},{default:()=>[p.value]}),i.createVNode("div",{class:f.value,style:{...l.value.styles.list,...e.styles.list}},[(m=e.items)==null?void 0:m.map((v,g)=>{const y=v.children&&v.children.length>0;return i.createVNode("div",{key:v.key||`key_${g}`,style:{...l.value.styles.item,...e.styles.item},class:re(`${a}-item`,l.value.classNames.item,e.classNames.item,{[`${a}-item-disabled`]:v.disabled,[`${a}-item-has-nest`]:y}),onClick:()=>{!y&&e.onItemClick&&e.onItemClick({data:v})}},[v.icon&&i.createVNode("div",{class:`${a}-icon`},[v.icon]),i.createVNode("div",{class:re(`${a}-content`,l.value.classNames.itemContent,e.classNames.itemContent),style:{...l.value.styles.itemContent,...e.styles.itemContent}},[v.label&&i.createVNode("h6",{class:`${a}-label`},[v.label]),v.description&&i.createVNode("p",{class:`${a}-desc`},[v.description]),y&&i.createVNode(V0,{class:`${a}-nested`,items:v.children,vertical:!0,onItemClick:e.onItemClick,classNames:{list:e.classNames.subList,item:e.classNames.subItem},styles:{list:e.styles.subList,item:e.styles.subItem}},null)])])})])]))}}}),F8=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{[`${n}-cascader-menus ${n}-cascader-menu`]:{height:"auto"},[`${t}-item`]:{"&-icon":{marginInlineEnd:e.paddingXXS},"&-extra":{marginInlineStart:e.padding}},[`&${t}-block`]:{[`${t}-item-extra`]:{marginInlineStart:"auto"}}}}},H8=Gt("Suggestion",e=>{const t=Ct(e,{});return F8(t)},()=>({}));function j8(e,t,n,o,r){const[a,l]=Ie([]),s=(m,v=a.value)=>{let g=i.toValue(e);for(let y=0;y<m-1;y+=1){const C=v[y],S=g.find($=>$.value===C);if(!S)break;g=S.children||[]}return g},c=m=>m.map((v,g)=>{const C=s(g+1,m).find(S=>S.value===v);return C==null?void 0:C.value}),u=m=>{const v=a.value.length||1,g=s(v),y=g.findIndex($=>$.value===a.value[v-1]),C=g.length,S=g[(y+m+C)%C];l([...a.value.slice(0,v-1),S.value])},d=()=>{a.value.length>1&&l(a.value.slice(0,a.value.length-1))},f=()=>{const m=s(a.value.length+1);m.length&&l([...a.value,m[0].value])},p=Ki(m=>{if(i.toValue(t))switch(console.log("e.key",m),m.key){case"ArrowDown":u(1),m.preventDefault();break;case"ArrowUp":u(-1),m.preventDefault();break;case"ArrowRight":i.toValue(n)?d():f(),m.preventDefault();break;case"ArrowLeft":i.toValue(n)?f():d(),m.preventDefault();break;case"Enter":s(a.value.length+1).length||o(c(a.value)),m.preventDefault();break;case"Escape":r(),m.preventDefault();break}});return i.watch(()=>i.toValue(t),()=>{i.toValue(t)&&l([i.toValue(e)[0].value])},{immediate:!0}),[a,p]}const _8=i.defineComponent({name:"AXSuggestion",__name:"Suggestion",props:i.mergeDefaults({prefixCls:null,className:null,rootClassName:null,style:null,children:{type:Function},open:{type:Boolean},onOpenChange:{type:Function},items:{type:Function},onSelect:{type:Function},block:{type:Boolean},styles:null,classNames:null},{open:!1}),setup(e){i.toRef(e,"prefixCls");const t=i.useSlots(),{direction:n,getPrefixCls:o}=Ke(),r=i.computed(()=>o("suggestion",e.prefixCls));`${r.value}`;const a=i.computed(()=>n.value==="rtl"),l=Ut("suggestion"),[s,c,u]=H8(r),[d,f]=Ie(e.open),[p,m]=Ie(),v=P=>{var b;f(P),(b=e.onOpenChange)==null||b.call(e,P)},g=P=>{P===!1?v(!1):(m(P),v(!0))},y=()=>{v(!1)},C=i.computed(()=>typeof e.items=="function"?e.items(p.value):e.items),S=P=>{e.onSelect&&e.onSelect(P[P.length-1]),v(!1)},[$,x]=j8(C,d,a,S,y),w=i.computed(()=>{var P;return t.default?t.default({onTrigger:g,onKeyDown:x}):(P=e.children)==null?void 0:P.call(e,{onTrigger:g,onKeyDown:x})});return()=>s(i.createVNode(X4,{options:C.value,open:d.value,value:$.value,placement:a.value?"topRight":"topLeft",onDropdownVisibleChange:P=>{P||y()},class:re(e.rootClassName,r.value,c,u,{[`${r.value}-block`]:e.block}),onChange:S,dropdownMatchSelectWidth:e.block},{default:()=>i.createVNode("div",{class:re(r.value,l.value.className,e.rootClassName,e.className,`${r.value}-wrapper`,c.value,u),style:{...l.value.style,...e.style}},[w.value])}))}}),D0=Symbol("SenderHeaderContext"),wc=i.shallowRef(),W8=e=>{i.provide(D0,e),i.watch(e,()=>{wc.value=i.unref(e),i.triggerRef(wc)},{immediate:!0,deep:!0})},k8=()=>i.inject(D0,i.computed(()=>wc.value||{})),K8=i.defineComponent({props:{value:St()},setup(e,{slots:t}){return W8(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),B0=Symbol("ActionButtonContext"),$c=i.shallowRef(),U8=e=>{i.provide(B0,e),i.watch(e,()=>{$c.value=i.unref(e),i.triggerRef($c)},{immediate:!0,deep:!0})},xc=()=>i.inject(B0,i.computed(()=>$c.value||{})),X8=i.defineComponent({props:{value:St()},setup(e,{slots:t}){return U8(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),Ui=i.defineComponent({name:"AXSenderActionButton",__name:"index",props:i.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null,action:null},{type:"text",disabled:void 0}),setup(e){const t=He(e,["action","type","disabled","onClick"]);i.toRef(e,"onClick"),i.toRef(e,"disabled");const n=i.useSlots(),o=xc(),r=i.computed(()=>{var u;const s=o.value.disabled,c=(u=o.value)==null?void 0:u[`${e.action}Disabled`];return s??e.disabled??c}),a=i.computed(()=>o.value.prefixCls),l=i.computed(()=>{var s;return(s=o.value)==null?void 0:s[e.action]});return()=>i.createVNode(We,i.mergeProps({type:e.type},t,{onClick:s=>{r.value||(l.value&&l.value(),e.onClick&&!Array.isArray(e.onClick)&&e.onClick(s))},class:re(a.value,{[`${a.value}-disabled`]:r.value})}),{icon:()=>n.default()})}}),G8=i.defineComponent({name:"AXSenderClearButton",__name:"ClearButton",props:i.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null},{disabled:void 0}),setup(e){const t=He(e,["disabled"]);return()=>i.createVNode(Ui,i.mergeProps({disabled:e.disabled},t,{action:"onClear"}),{default:()=>[i.createVNode(qs,null,null)]})}}),q8=i.defineComponent({name:"AXSenderStopLoading",__name:"StopLoading",props:{className:null},setup(e){const t=e;return()=>i.createVNode("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",class:t.className},[i.createVNode("title",null,[i.createTextVNode("Stop Loading")]),i.createVNode("rect",{fill:"currentColor",height:"250",rx:"24",ry:"24",width:"250",x:"375",y:"375"},null),i.createVNode("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor","stroke-width":"100",opacity:"0.45"},null),i.createVNode("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor","stroke-width":"100","stroke-dasharray":"600 9999999"},[i.createVNode("animateTransform",{attributeName:"transform",dur:"1s",from:"0 500 500",repeatCount:"indefinite",to:"360 500 500",type:"rotate"},null)])])}}),L0=i.defineComponent({name:"AXSenderLoadingButton",__name:"LoadingButton",props:i.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null},{type:"primary",shape:"circle",icon:null,disabled:void 0}),setup(e){const t=He(e,["type","shape","icon","disabled"]),n=xc(),{token:o}=cr.useToken();return()=>i.createVNode(Ui,i.mergeProps({type:e.type,disabled:e.disabled,shape:e.shape},t,{style:{backgroundColor:"transparent",color:o.value.colorPrimary},class:re(`${n.value.prefixCls}-loading-button`),action:"onCancel"}),{default:()=>[i.createVNode(q8,{className:`${n.value.prefixCls}-loading-icon`},null)]})}}),z0=i.defineComponent({name:"AXSenderLoadingButton",__name:"SendButton",props:i.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null},{type:"primary",shape:"circle",disabled:void 0}),setup(e){const t=He(e,["type","shape","disabled"]);return()=>i.createVNode(Ui,i.mergeProps({type:e.type,shape:e.shape,disabled:e.disabled},t,{action:"onSend"}),{default:()=>[i.createVNode(Us,null,null)]})}}),pr=1e3,mr=4,Xi=140,Gi=250,F0=500,qi=.8,Y8=i.defineComponent({name:"AXSenderRecordingIcon",__name:"RecordingIcon",props:{className:null},setup(e){const t=Xi/2;return()=>i.createVNode("svg",{color:"currentColor",viewBox:`0 0 ${pr} ${pr}`,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",class:e.className},[i.createVNode("title",null,[i.createTextVNode("Speech Recording")]),Array.from({length:mr}).map((n,o)=>{const r=(pr-Xi*mr)/(mr-1),a=o*(r+Xi),l=pr/2-Gi/2,s=pr/2-F0/2;return i.createVNode("rect",{fill:"currentColor",rx:t,ry:t,height:Gi,width:Xi,x:a,y:l,key:o},[i.createVNode("animate",{attributeName:"height",values:`${Gi}; ${F0}; ${Gi}`,keyTimes:"0; 0.5; 1",dur:`${qi}s`,begin:`${qi/mr*o}s`,repeatCount:"indefinite"},null),i.createVNode("animate",{attributeName:"y",values:`${l}; ${s}; ${l}`,keyTimes:"0; 0.5; 1",dur:`${qi}s`,begin:`${qi/mr*o}s`,repeatCount:"indefinite"},null)])})])}}),H0=i.defineComponent({name:"AXSenderSpeechButton",__name:"index",props:i.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null},{type:"text",disabled:void 0}),setup(e){const t=He(e,["type","disabled"]),n=xc(),{token:o}=cr.useToken(),r=i.computed(()=>n.value.speechRecording),a=i.computed(()=>n.value.prefixCls),l=i.computed(()=>{let s;return r.value?s=i.createVNode(Y8,{className:`${a.value}-recording-icon`},null):n.value.onSpeechDisabled?s=i.createVNode(Xs,null,null):s=i.createVNode(Gs,null,null),s});return()=>i.createVNode(Ui,i.mergeProps({type:e.type,disabled:e.disabled},t,{style:{display:"flex",justifyContent:"center",alignItems:"center",color:o.value.colorPrimary},action:"onSpeech"}),{default:()=>[l.value]})}}),gr=i.defineComponent({name:"AXTransitionCollapse",__name:"TransitionCollapse",props:{prefixCls:{default:"ax"}},setup(e){const t=e,n=i.useSlots(),o=i.computed(()=>t.prefixCls+"-transition-collapse"),r={beforeEnter(a){a.dataset||(a.dataset={}),a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.style.maxHeight="0",a.style.paddingTop="0",a.style.paddingBottom="0"},enter(a){a.dataset.oldOverflow=a.style.overflow,a.scrollHeight!==0?(a.style.maxHeight=`${a.scrollHeight}px`,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom):(a.style.maxHeight=`${a.dataset.oldMaxHeight||"999"}px`,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom),a.style.overflow="hidden"},afterEnter(a){a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow},beforeLeave(a){a.dataset||(a.dataset={}),a.dataset.oldMaxHeight=a.scrollHeight,a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.dataset.oldOverflow=a.style.overflow,a.style.overflow="hidden",a.style.maxHeight=`${a.scrollHeight}px`},leave(a){a.scrollHeight!==0&&(a.style.maxHeight="0",a.style.paddingTop="0",a.style.paddingBottom="0")},afterLeave(a){a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom}};return()=>i.createVNode(i.Transition,{name:o.value,onBeforeEnter:r.beforeEnter,onEnter:r.enter,onAfterEnter:r.afterEnter,onBeforeLeave:r.beforeLeave,onLeave:r.leave,onAfterLeave:r.afterLeave},{default:()=>{var a;return[(a=n.default)==null?void 0:a.call(n)]}})}}),j0=e=>{const{componentCls:t}=e,n=`${t}-transition-collapse`;return{[t]:{[n]:{"&-enter-active":{transition:["max-height","padding-top","padding-bottom"].map(o=>`${o} ${e.motionDurationSlow} ${e.motionEaseInOut}`).join(",")},"&-leave-active":{transition:["max-height","padding-top","padding-bottom"].map(o=>`${o} ${e.motionDurationSlow} ${e.motionEaseInOut}`).join(",")}}}}};gr.install=function(e){return e.component(gr.name,gr),e};const Z8=e=>{const{componentCls:t,calc:n}=e,o=`${t}-header`;return{[t]:{[o]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorder,"&-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",[`${o}-title`]:{flex:"auto"}},"&-content":{padding:e.padding},"&-motion":{transition:["height","border"].map(r=>`${r} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}}}}}},Q8=e=>{const{componentCls:t,padding:n,paddingSM:o,paddingXS:r,lineWidth:a,lineWidthBold:l,calc:s}=e;return{[t]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,transition:`background ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:s(e.borderRadius).mul(2).equal()},borderColor:e.colorBorder,borderWidth:0,borderStyle:"solid","&:after":{content:'""',position:"absolute",inset:0,pointerEvents:"none",transition:`border-color ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:"inherit"},borderStyle:"inherit",borderColor:"inherit",borderWidth:a},"&:focus-within":{boxShadow:`${e.boxShadowSecondary}`,borderColor:e.colorPrimary,"&:after":{borderWidth:l}},"&-disabled":{background:e.colorBgContainerDisabled},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{display:"flex",gap:r,width:"100%",paddingBlock:o,paddingInlineStart:n,paddingInlineEnd:o,boxSizing:"border-box",alignItems:"flex-end"},[`${t}-prefix`]:{flex:"none"},[`${t}-input`]:{padding:0,borderRadius:0,flex:"auto",alignSelf:"center",minHeight:"auto"},[`${t}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${t}-actions-btn`]:{"&-disabled":{opacity:.45},"&-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"}}}}},J8=Gt("Sender",e=>{const{paddingXS:t,calc:n}=e,o=Ct(e,{SenderContentMaxWidth:`calc(100% - ${ft(n(t).add(32).equal())})`});return[Q8(o),Z8(o),j0(o)]},()=>({}));let Yi;!Yi&&typeof window<"u"&&(Yi=window.SpeechRecognition||window.webkitSpeechRecognition);function eR(e,t){const n=e,o=i.computed(()=>{const g=i.toValue(t);return typeof g=="object"?{controlledRecording:g.recording,onControlledRecordingChange:g.onRecordingChange,speechInControlled:typeof g.recording=="boolean"}:{controlledRecording:void 0,onControlledRecordingChange:void 0,speechInControlled:!1}}),r=i.computed(()=>o.value.controlledRecording),a=o.value.onControlledRecordingChange,l=o.value.speechInControlled,s=i.ref(null);i.watchEffect(()=>{if(typeof navigator<"u"&&"permissions"in navigator){let g=null;navigator.permissions.query({name:"microphone"}).then(y=>{s.value=y.state,y.onchange=function(){s.value=this.state},g=y}),i.onWatcherCleanup(()=>{g&&(g.onchange=null)})}});const c=i.computed(()=>Yi&&s.value!=="denied"),u=i.ref(null),[d,f]=M0(!1,{value:r}),p=i.ref(!1),m=()=>{if(c.value&&!u.value){const g=new Yi;g.onstart=()=>{f(!0)},g.onend=()=>{f(!1)},g.onresult=y=>{var C,S,$;if(!p.value){const x=($=(S=(C=y.results)==null?void 0:C[0])==null?void 0:S[0])==null?void 0:$.transcript;n(x)}p.value=!1},u.value=g}};return{speechPermission:c,triggerSpeech:g=>{g&&!d.value||(p.value=g,l?a==null||a(!d.value):(m(),u.value&&(d.value?(u.value.stop(),a==null||a(!1)):(u.value.start(),a==null||a(!0)))))},recording:d}}function tR(e,t){for(var n=e,o=0;o<t.length;o+=1){if(n==null)return;n=n[t[o]]}return n}const nR=i.defineComponent({name:"AXSender",__name:"Sender",props:i.mergeDefaults({onKeyPress:{type:Function},prefixCls:null,defaultValue:null,value:null,loading:{type:Boolean},placeholder:null,readOnly:{type:Boolean},submitType:{type:[String,Boolean]},disabled:{type:Boolean},onSubmit:{type:Function},onChange:{type:Function},onCancel:null,onKeyDown:{type:Function},onPaste:{type:Function},onPasteFile:{type:Function},components:null,styles:null,rootClassName:null,classNames:null,style:null,className:null,actions:{type:Function},allowSpeech:null,prefix:null,header:null},{styles:()=>({}),classNames:()=>({}),submitType:"enter",disabled:void 0}),emits:["update:value"],setup(e,{expose:t,emit:n}){const o=He(e,["prefixCls","styles","classNames","className","rootClassName","style","defaultValue","value","placeholder","readOnly","submitType","onSubmit","loading","components","onCancel","onChange","actions","onKeyPress","onKeyDown","disabled","allowSpeech","prefix","header","onPaste","onPasteFile"]);i.toRef(e,"prefixCls");function r(X,J,te){return tR(X,J)||te}const a=n,l=i.useSlots(),{direction:s,getPrefixCls:c}=Ke(),u=i.computed(()=>c("sender",e.prefixCls)),d=i.ref(null),f=i.ref(null),p=Ut("sender"),m=i.computed(()=>`${u.value}-input`),[v,g,y]=J8(u.value),C=i.computed(()=>re(u.value,p.value.className,e.className,e.rootClassName,g.value,y,{[`${u.value}-rtl`]:s.value==="rtl",[`${u.value}-disabled`]:e.disabled})),S=i.computed(()=>`${u.value}-actions-btn`),$=i.computed(()=>`${u.value}-actions-list`),x=i.ref(e.value??e.defaultValue??""),w=X=>{x.value=X};i.watch(()=>e.value,()=>{w(e.value)});const P=(X,J)=>{w(X),a("update:value",X),e.onChange&&e.onChange(X,J)},{speechPermission:b,triggerSpeech:I,recording:E}=eR(X=>{P(`${x.value} ${X}`)},()=>e.allowSpeech),A=r(e.components,["input"],Ee.TextArea),R=i.computed(()=>uo(o,{attr:!0,aria:!0,data:!0})),B=i.computed(()=>({...R.value,ref:f})),M=()=>{x.value&&e.onSubmit&&!e.loading&&e.onSubmit(x.value)},z=()=>{P("")},O=i.ref(!1),T=()=>{O.value=!0},D=()=>{O.value=!1},L=X=>{const J=X.key==="Enter"&&!O.value;switch(e.submitType){case"enter":J&&!X.shiftKey&&(X.preventDefault(),M());break;case"shiftEnter":J&&X.shiftKey&&(X.preventDefault(),M());break}e.onKeyPress&&e.onKeyPress(X)},N=X=>{var te,U;const J=(te=X.clipboardData)==null?void 0:te.files[0];J&&e.onPasteFile&&(e.onPasteFile(J),X.preventDefault()),(U=e.onPaste)==null||U.call(e,X)},H=X=>{var J,te;X.target!==((J=d.value)==null?void 0:J.querySelector(`.${m.value}`))&&X.preventDefault(),(te=f.value)==null||te.focus()},_=i.computed(()=>{let X=i.createVNode(sr,{class:`${$.value}-presets`},{default:()=>[e.allowSpeech&&i.createVNode(H0,null,null),e.loading?i.createVNode(L0,null,null):i.createVNode(z0,null,null)]});const J={components:{SendButton:z0,ClearButton:G8,LoadingButton:L0,SpeechButton:H0}};return l.actions?X=l.actions({ori:X,info:J}):typeof e.actions=="function"?X=e.actions(X,J):e.actions&&(X=e.actions),X}),Y=i.computed(()=>l.header?l.header():e.header),Z=i.computed(()=>l.prefix?l.prefix():e.prefix);return t({nativeElement:d.value,focus:X=>{var J;return(J=f.value)==null?void 0:J.focus(X)},blur:()=>{var X;return(X=f.value)==null?void 0:X.blur()}}),()=>v(i.createVNode("div",{ref:d,class:C.value,style:{...p.value.style,...e.style}},[Y.value&&i.createVNode(K8,{value:{prefixCls:u.value}},{default:()=>[Y.value]}),i.createVNode("div",{class:`${u.value}-content`,onMousedown:H},[Z.value&&i.createVNode("div",{class:re(`${u.value}-prefix`,p.value.classNames.prefix,e.classNames.prefix),style:{...p.value.styles.prefix,...e.styles.prefix}},[Z.value]),i.createVNode(A,i.mergeProps(B.value,{disabled:e.disabled,style:{...p.value.styles.input,...e.styles.input},class:re(m.value,p.value.classNames.input,e.classNames.input),autoSize:{maxRows:8},value:x.value,onChange:X=>{P(X.target.value,X),I(!0)},onPressEnter:L,onCompositionstart:T,onCompositionend:D,onKeydown:e.onKeyDown,placeholder:e.placeholder,onPaste:N,bordered:!1,readOnly:e.readOnly}),null),i.createVNode("div",{class:re($.value,p.value.classNames.actions,e.classNames.actions),style:{...p.value.styles.actions,...e.styles.actions}},[i.createVNode(X8,{value:{prefixCls:S.value,onSend:M,onSendDisabled:!x.value,onClear:z,onClearDisabled:!x.value,onCancel:e.onCancel,onCancelDisabled:!e.loading,onSpeech:()=>I(!1),onSpeechDisabled:!b.value,speechRecording:E.value,disabled:e.disabled}},{default:()=>[_.value]})])])]))}}),oR=i.defineComponent({name:"AXSenderHeader",inheritAttrs:!1,__name:"SenderHeader",props:i.mergeDefaults({forceRender:{type:Boolean},open:{type:Boolean},onOpenChange:{type:Function},title:null,children:null,className:null,style:null,classNames:null,styles:null,closable:{type:Boolean}},{classNames:()=>({}),styles:()=>({})}),setup(e){i.toRef(e,"classNames");const t=i.useSlots(),n=k8(),o=i.computed(()=>`${n.value.prefixCls}-header`),r=i.useAttrs();return()=>i.createVNode(gr,{prefixCls:n.value.prefixCls},{default:()=>{var a;return[e.open||e.forceRender?i.withDirectives(i.createVNode("div",i.mergeProps(r,{class:re(o.value,e.className),style:{...e.style}}),[(e.closable!==!1||e.title)&&i.createVNode("div",{class:re(`${o.value}-header`,e.classNames.header),style:{...e.styles.header}},[i.createVNode("div",{class:`${o.value}-title`},[e.title]),e.closable!==!1&&i.createVNode("div",{class:`${o.value}-close`},[i.createVNode(We,{type:"text",icon:i.createVNode(Ft,null,null),size:"small",onClick:()=>{var l;(l=e.onOpenChange)==null||l.call(e,!e.open)}},null)])]),t.default&&i.createVNode("div",{class:re(`${o.value}-content`,e.classNames.content),style:{...e.styles.content}},[(a=t.default)==null?void 0:a.call(t)])]),[[i.vShow,e.open]]):null]}})}}),rR=Object.assign(nR,{Header:oR}),_0=Symbol("AttachmentContext"),Oc=i.shallowRef(),iR=e=>{i.provide(_0,e),i.watch(e,()=>{Oc.value=i.unref(e),i.triggerRef(Oc)},{immediate:!0,deep:!0})},Zi=()=>i.inject(_0,i.computed(()=>Oc.value||{})),aR=i.defineComponent({inheritAttrs:!1,props:{value:St()},setup(e,{slots:t}){return iR(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),lR=i.defineComponent({name:"AXAttachmentsPlaceholderUploader",__name:"PlaceholderUploader",props:i.mergeDefaults({prefixCls:null,placeholder:null,upload:null,className:null,style:null},{placeholder:()=>({})}),setup(e,{expose:t}){const n=`${e.prefixCls}-placeholder`,o=i.computed(()=>e.placeholder||{}),r=i.useTemplateRef("upload-dragger"),a=Zi(),[l,s]=Ie(!1),c=()=>{s(!0)},u=m=>{m.currentTarget.contains(m.relatedTarget)||s(!1)},d=()=>{s(!1)};t({nativeElement:r});const f=m=>Array.isArray(m)&&m.every(i.isVNode),p=i.computed(()=>i.isVNode(e.placeholder)||f(e.placeholder)?e.placeholder:i.createVNode(sr,{align:"center",justify:"center",vertical:!0,class:`${n}-inner`},{default:()=>[i.createVNode($e.Text,{class:`${n}-icon`},{default:()=>[o.value.icon]}),i.createVNode($e.Title,{class:`${n}-title`,level:5},{default:()=>[o.value.title]}),i.createVNode($e.Text,{class:`${n}-description`,type:"secondary"},{default:()=>[o.value.description]})]}));return()=>i.createVNode("div",{class:re(n,{[`${n}-drag-in`]:l.value,[`${n}-disabled`]:a.value.disabled},e.className),onDragenter:c,onDragleave:u,onDrop:d,"aria-hidden":a.value.disabled,style:e.style},[i.createVNode($h.Dragger,i.mergeProps({showUploadList:!1},e.upload,{ref:"upload-dragger",style:{padding:0,border:0,background:"transparent"}}),{default:()=>[p.value]})])}}),W0=i.defineComponent({name:"AXAttachmentsDropArea",__name:"DropArea",props:{prefixCls:null,className:null,getDropContainer:{type:Function},children:null},setup(e){const t=Zi(),[n,o]=Ie(),[r,a]=Ie(null);i.onMounted(()=>{var c;o((c=e.getDropContainer)==null?void 0:c.call(e))}),i.watch(()=>i.toValue(e.getDropContainer),()=>{var u;const c=(u=e.getDropContainer)==null?void 0:u.call(e);n.value!==c&&o(c)}),i.watch(()=>!!n.value,()=>{if(n.value){const c=()=>{a(!0)},u=p=>{p.preventDefault()},d=p=>{p.relatedTarget||a(!1)},f=p=>{a(!1),p.preventDefault()};document.addEventListener("dragenter",c),document.addEventListener("dragover",u),document.addEventListener("dragleave",d),document.addEventListener("drop",f),i.onWatcherCleanup(()=>{document.removeEventListener("dragenter",c),document.removeEventListener("dragover",u),document.removeEventListener("dragleave",d),document.removeEventListener("drop",f)})}});const l=i.computed(()=>e.getDropContainer&&n.value&&!t.value.disabled),s=`${e.prefixCls}-drop-area`;return()=>l.value?i.createVNode(i.Teleport,{to:n.value},{default:()=>[i.createVNode("div",{class:re(s,e.className,{[`${s}-on-body`]:n.value.tagName==="BODY"}),style:{display:r.value?"block":"none"}},[e.children])]}):null}}),k0=i.defineComponent({name:"AXAttachmentsSilentUploader",__name:"SilentUploader",props:{children:null,upload:null,rootClassName:null},setup(e,{expose:t}){const n=i.useTemplateRef("upload");return t({nativeElement:n}),()=>i.createVNode($h,i.mergeProps(e.upload,{showUploadList:!1,ref:"upload"}),{default:()=>[e.children]})}}),K0=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},sR={},cR={width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function uR(e,t){return i.openBlock(),i.createElementBlock("svg",cR,t[0]||(t[0]=[i.createElementVNode("title",null,"audio",-1),i.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[i.createElementVNode("path",{d:"M14.1178571,4.0125 C14.225,4.11964286 14.2857143,4.26428571 14.2857143,4.41607143 L14.2857143,15.4285714 C14.2857143,15.7446429 14.0303571,16 13.7142857,16 L2.28571429,16 C1.96964286,16 1.71428571,15.7446429 1.71428571,15.4285714 L1.71428571,0.571428571 C1.71428571,0.255357143 1.96964286,0 2.28571429,0 L9.86964286,0 C10.0214286,0 10.1678571,0.0607142857 10.275,0.167857143 L14.1178571,4.0125 Z M10.7315824,7.11216117 C10.7428131,7.15148751 10.7485063,7.19218979 10.7485063,7.23309113 L10.7485063,8.07742614 C10.7484199,8.27364959 10.6183424,8.44607275 10.4296853,8.50003683 L8.32984514,9.09986306 L8.32984514,11.7071803 C8.32986605,12.5367078 7.67249692,13.217028 6.84345686,13.2454634 L6.79068592,13.2463395 C6.12766108,13.2463395 5.53916361,12.8217001 5.33010655,12.1924966 C5.1210495,11.563293 5.33842118,10.8709227 5.86959669,10.4741173 C6.40077221,10.0773119 7.12636292,10.0652587 7.67042486,10.4442027 L7.67020842,7.74937024 L7.68449368,7.74937024 C7.72405122,7.59919041 7.83988806,7.48101083 7.98924584,7.4384546 L10.1880418,6.81004755 C10.42156,6.74340323 10.6648954,6.87865515 10.7315824,7.11216117 Z M9.60714286,1.31785714 L12.9678571,4.67857143 L9.60714286,4.67857143 L9.60714286,1.31785714 Z",fill:"currentColor"})],-1)]))}const dR=K0(sR,[["render",uR]]),fR={},pR={width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function mR(e,t){return i.openBlock(),i.createElementBlock("svg",pR,t[0]||(t[0]=[i.createElementVNode("title",null,"video",-1),i.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[i.createElementVNode("path",{d:"M14.1178571,4.0125 C14.225,4.11964286 14.2857143,4.26428571 14.2857143,4.41607143 L14.2857143,15.4285714 C14.2857143,15.7446429 14.0303571,16 13.7142857,16 L2.28571429,16 C1.96964286,16 1.71428571,15.7446429 1.71428571,15.4285714 L1.71428571,0.571428571 C1.71428571,0.255357143 1.96964286,0 2.28571429,0 L9.86964286,0 C10.0214286,0 10.1678571,0.0607142857 10.275,0.167857143 L14.1178571,4.0125 Z M12.9678571,4.67857143 L9.60714286,1.31785714 L9.60714286,4.67857143 L12.9678571,4.67857143 Z M10.5379461,10.3101106 L6.68957555,13.0059749 C6.59910784,13.0693494 6.47439406,13.0473861 6.41101953,12.9569184 C6.3874624,12.9232903 6.37482581,12.8832269 6.37482581,12.8421686 L6.37482581,7.45043999 C6.37482581,7.33998304 6.46436886,7.25043999 6.57482581,7.25043999 C6.61588409,7.25043999 6.65594753,7.26307658 6.68957555,7.28663371 L10.5379461,9.98249803 C10.6284138,10.0458726 10.6503772,10.1705863 10.5870027,10.2610541 C10.5736331,10.2801392 10.5570312,10.2967411 10.5379461,10.3101106 Z",fill:"currentColor"})],-1)]))}const gR=K0(fR,[["render",mR]]),hR=e=>e.indexOf("image/")===0,Qi=200;function vR(e){return new Promise(t=>{if(!e||!e.type||!hR(e.type)){t("");return}const n=new Image;if(n.onload=()=>{const{width:o,height:r}=n,a=o/r,l=a>1?Qi:Qi*a,s=a>1?Qi/a:Qi,c=document.createElement("canvas");c.width=l,c.height=s,c.style.cssText=`position: fixed; left: 0; top: 0; width: ${l}px; height: ${s}px; z-index: 9999; display: none;`,document.body.appendChild(c),c.getContext("2d").drawImage(n,0,0,l,s);const d=c.toDataURL();document.body.removeChild(c),window.URL.revokeObjectURL(n.src),t(d)},n.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const o=new FileReader;o.onload=()=>{o.result&&typeof o.result=="string"&&(n.src=o.result)},o.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const o=new FileReader;o.onload=()=>{o.result&&t(o.result)},o.readAsDataURL(e)}else n.src=window.URL.createObjectURL(e)})}const Re=Math.round;function Pc(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],o=n.map(r=>parseFloat(r));for(let r=0;r<3;r+=1)o[r]=t(o[r]||0,n[r]||"",r);return n[3]?o[3]=n[3].includes("%")?o[3]/100:o[3]:o[3]=1,o}const U0=(e,t,n)=>n===0?e:e/100;function hr(e,t){const n=t||255;return e>n?n:e<0?0:e}class Ic{constructor(t){Xe(this,"isValid",!0),Xe(this,"r",0),Xe(this,"g",0),Xe(this,"b",0),Xe(this,"a",1),Xe(this,"_h",void 0),Xe(this,"_s",void 0),Xe(this,"_l",void 0),Xe(this,"_v",void 0),Xe(this,"_max",void 0),Xe(this,"_min",void 0),Xe(this,"_brightness",void 0);function n(o){return o[0]in t&&o[1]in t&&o[2]in t}if(t)if(typeof t=="string"){let r=function(a){return o.startsWith(a)};const o=t.trim();/^#?[A-F\d]{3,8}$/i.test(o)?this.fromHexString(o):r("rgb")?this.fromRgbString(o):r("hsl")?this.fromHslString(o):(r("hsv")||r("hsb"))&&this.fromHsvString(o)}else if(t instanceof Ic)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=hr(t.r),this.g=hr(t.g),this.b=hr(t.b),this.a=typeof t.a=="number"?hr(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(a){const l=a/255;return l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)}const n=t(this.r),o=t(this.g),r=t(this.b);return .2126*n+.7152*o+.0722*r}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Re(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(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._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(),o=this.getSaturation();let r=this.getLightness()-t/100;return r<0&&(r=0),this._c({h:n,s:o,l:r,a:this.a})}lighten(t=10){const n=this.getHue(),o=this.getSaturation();let r=this.getLightness()+t/100;return r>1&&(r=1),this._c({h:n,s:o,l:r,a:this.a})}mix(t,n=50){const o=this._c(t),r=n/100,a=s=>(o[s]-this[s])*r+this[s],l={r:Re(a("r")),g:Re(a("g")),b:Re(a("b")),a:Re(a("a")*100)/100};return this._c(l)}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),o=this.a+n.a*(1-this.a),r=a=>Re((this[a]*this.a+n[a]*n.a*(1-this.a))/o);return this._c({r:r("r"),g:r("g"),b:r("b"),a:o})}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 o=(this.g||0).toString(16);t+=o.length===2?o:"0"+o;const r=(this.b||0).toString(16);if(t+=r.length===2?r:"0"+r,typeof this.a=="number"&&this.a>=0&&this.a<1){const a=Re(this.a*255).toString(16);t+=a.length===2?a:"0"+a}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Re(this.getSaturation()*100),o=Re(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${o}%,${this.a})`:`hsl(${t},${n}%,${o}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),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,o){const r=this.clone();return r[t]=hr(n,o),r}_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 o(r,a){return parseInt(n[r]+n[a||r],16)}n.length<6?(this.r=o(0),this.g=o(1),this.b=o(2),this.a=n[3]?o(3)/255:1):(this.r=o(0,1),this.g=o(2,3),this.b=o(4,5),this.a=n[6]?o(6,7)/255:1)}fromHsl({h:t,s:n,l:o,a:r}){if(this._h=t%360,this._s=n,this._l=o,this.a=typeof r=="number"?r:1,n<=0){const p=Re(o*255);this.r=p,this.g=p,this.b=p}let a=0,l=0,s=0;const c=t/60,u=(1-Math.abs(2*o-1))*n,d=u*(1-Math.abs(c%2-1));c>=0&&c<1?(a=u,l=d):c>=1&&c<2?(a=d,l=u):c>=2&&c<3?(l=u,s=d):c>=3&&c<4?(l=d,s=u):c>=4&&c<5?(a=d,s=u):c>=5&&c<6&&(a=u,s=d);const f=o-u/2;this.r=Re((a+f)*255),this.g=Re((l+f)*255),this.b=Re((s+f)*255)}fromHsv({h:t,s:n,v:o,a:r}){this._h=t%360,this._s=n,this._v=o,this.a=typeof r=="number"?r:1;const a=Re(o*255);if(this.r=a,this.g=a,this.b=a,n<=0)return;const l=t/60,s=Math.floor(l),c=l-s,u=Re(o*(1-n)*255),d=Re(o*(1-n*c)*255),f=Re(o*(1-n*(1-c))*255);switch(s){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=Pc(t,U0);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=Pc(t,U0);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=Pc(t,(o,r)=>r.includes("%")?Re(o/100*255):o);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}const yR=e=>{const{componentCls:t,calc:n}=e,o=`${t}-list-card`,r=n(e.fontSize).mul(e.lineHeight).mul(2).add(e.paddingSM).add(e.paddingSM).equal();return{[o]:{borderRadius:e.borderRadius,position:"relative",background:e.colorFillContent,borderWidth:e.lineWidth,borderStyle:"solid",borderColor:"transparent",flex:"none",[`${o}-name,${o}-desc`]:{display:"flex",flexWrap:"nowrap",maxWidth:"100%"},[`${o}-ellipsis-prefix`]:{flex:"0 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},[`${o}-ellipsis-suffix`]:{flex:"none"},"&-type-overview":{padding:n(e.paddingSM).sub(e.lineWidth).equal(),paddingInlineStart:n(e.padding).add(e.lineWidth).equal(),display:"flex",flexWrap:"nowrap",gap:e.paddingXS,alignItems:"flex-start",width:236,[`${o}-icon`]:{fontSize:n(e.fontSizeLG).mul(2).equal(),lineHeight:1,paddingTop:n(e.paddingXXS).mul(1.5).equal(),flex:"none"},[`${o}-content`]:{flex:"auto",minWidth:0,display:"flex",flexDirection:"column",alignItems:"stretch"},[`${o}-desc`]:{color:e.colorTextTertiary}},"&-type-preview":{width:r,height:r,lineHeight:1,[`&:not(${o}-status-error)`]:{border:0},img:{width:"100%",height:"100%",verticalAlign:"top",objectFit:"cover",borderRadius:"inherit"},[`${o}-img-mask`]:{position:"absolute",inset:0,display:"flex",justifyContent:"center",alignItems:"center",background:`rgba(0, 0, 0, ${e.opacityLoading})`,borderRadius:"inherit"},[`&${o}-status-error`]:{[`img, ${o}-img-mask`]:{borderRadius:n(e.borderRadius).sub(e.lineWidth).equal()},[`${o}-desc`]:{paddingInline:e.paddingXXS}},[`${o}-progress`]:{}},[`${o}-remove`]:{position:"absolute",top:0,insetInlineEnd:0,border:0,padding:e.paddingXXS,background:"transparent",lineHeight:1,transform:"translate(50%, -50%)",fontSize:e.fontSize,cursor:"pointer",opacity:e.opacityLoading,display:"none","&:dir(rtl)":{transform:"translate(-50%, -50%)"},"&:hover":{opacity:1},"&:active":{opacity:e.opacityLoading}},[`&:hover ${o}-remove`]:{display:"block"},"&-status-error":{borderColor:e.colorError,[`${o}-desc`]:{color:e.colorError}},"&-motion":{overflow:"hidden",transition:["opacity","width","margin","padding"].map(a=>`${a} ${e.motionDurationSlow}`).join(","),[`${o}-remove`]:{display:"none !important"},"&-appear-start":{width:0,transition:"none"},"&-leave-active":{opacity:0,width:0,paddingInline:0,borderInlineWidth:0,marginInlineEnd:n(e.paddingSM).mul(-1).equal()}}}}},Tc={"&, *":{boxSizing:"border-box"}},bR=e=>{const{componentCls:t,calc:n,antCls:o}=e,r=`${t}-drop-area`,a=`${t}-placeholder`;return{[r]:{position:"absolute",inset:0,zIndex:e.zIndexPopupBase,...Tc,"&-on-body":{position:"fixed",inset:0},"&-hide-placement":{[`${a}-inner`]:{display:"none"}},[a]:{padding:0}},"&":{[a]:{height:"100%",borderRadius:e.borderRadius,borderWidth:e.lineWidthBold,borderStyle:"dashed",borderColor:"transparent",padding:e.padding,position:"relative",backdropFilter:"blur(10px)",...Tc,[`${o}-upload-wrapper ${o}-upload${o}-upload-btn`]:{padding:0},[`&${a}-drag-in`]:{borderColor:e.colorPrimaryHover},[`&${a}-disabled`]:{opacity:.25,pointerEvents:"none"},[`${a}-inner`]:{gap:n(e.paddingXXS).div(2).equal()},[`${a}-icon`]:{fontSize:e.fontSizeHeading2,lineHeight:1},[`${a}-title${a}-title`]:{margin:0,fontSize:e.fontSize,lineHeight:e.lineHeight},[`${a}-description`]:{}}}}},CR=e=>{const{componentCls:t,calc:n}=e,o=`${t}-list`,r=n(e.fontSize).mul(e.lineHeight).mul(2).add(e.paddingSM).add(e.paddingSM).equal();return{[t]:{position:"relative",width:"100%",...Tc,[o]:{display:"flex",flexWrap:"wrap",gap:e.paddingSM,fontSize:e.fontSize,lineHeight:e.lineHeight,color:e.colorText,paddingBlock:e.paddingSM,paddingInline:e.padding,width:"100%",background:e.colorBgContainer,scrollbarWidth:"none","-ms-overflow-style":"none","&::-webkit-scrollbar":{display:"none"},"&-overflow-scrollX, &-overflow-scrollY":{"&:before, &:after":{content:'""',position:"absolute",opacity:0,transition:`opacity ${e.motionDurationSlow}`,zIndex:1}},"&-overflow-ping-start:before":{opacity:1},"&-overflow-ping-end:after":{opacity:1},"&-overflow-scrollX":{overflowX:"auto",overflowY:"hidden",flexWrap:"nowrap","&:before, &:after":{insetBlock:0,width:8},"&:before":{insetInlineStart:0,background:"linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{insetInlineEnd:0,background:"linear-gradient(to left, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:dir(rtl)":{"&:before":{background:"linear-gradient(to left, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{background:"linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0));"}}},"&-overflow-scrollY":{overflowX:"hidden",overflowY:"auto",maxHeight:n(r).mul(3).equal(),"&:before, &:after":{insetInline:0,height:8},"&:before":{insetBlockStart:0,background:"linear-gradient(to bottom, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{insetBlockEnd:0,background:"linear-gradient(to top, rgba(0,0,0,0.06), rgba(0,0,0,0));"}},"&-upload-btn":{width:r,height:r,fontSize:e.fontSizeHeading2,color:"#999"},"&-prev-btn, &-next-btn":{position:"absolute",top:"50%",transform:"translateY(-50%)",boxShadow:e.boxShadowTertiary,opacity:0,pointerEvents:"none"},"&-prev-btn":{left:{_skip_check_:!0,value:e.padding}},"&-next-btn":{right:{_skip_check_:!0,value:e.padding}},"&:dir(ltr)":{[`&${o}-overflow-ping-start ${o}-prev-btn`]:{opacity:1,pointerEvents:"auto"},[`&${o}-overflow-ping-end ${o}-next-btn`]:{opacity:1,pointerEvents:"auto"}},"&:dir(rtl)":{[`&${o}-overflow-ping-end ${o}-prev-btn`]:{opacity:1,pointerEvents:"auto"},[`&${o}-overflow-ping-start ${o}-next-btn`]:{opacity:1,pointerEvents:"auto"}}}}}},X0=Gt("Attachments",e=>{const t=Ct(e,{});return[bR(t),CR(t),yR(t)]},e=>{const{colorBgContainer:t}=e;return{colorBgPlaceholderHover:new Ic(t).setA(.85).toRgbString()}}),Nc=" ",Ec="#8c8c8c",G0=i.defineComponent({name:"AXAttachmentsFileListCard",__name:"FileListCard",props:{prefixCls:null,item:null,onRemove:{type:Function},className:null,style:null},setup(e,{expose:t}){i.toRef(e,"prefixCls");const n=["png","jpg","jpeg","gif","bmp","webp","svg"],o=[{icon:i.createVNode(Ys,null,null),color:"#22b35e",ext:["xlsx","xls"]},{icon:i.createVNode(Zs,null,null),color:Ec,ext:n},{icon:i.createVNode(Qs,null,null),color:Ec,ext:["md","mdx"]},{icon:i.createVNode(Js,null,null),color:"#ff4d4f",ext:["pdf"]},{icon:i.createVNode(ec,null,null),color:"#ff6e31",ext:["ppt","pptx"]},{icon:i.createVNode(nc,null,null),color:"#1677ff",ext:["doc","docx"]},{icon:i.createVNode(oc,null,null),color:"#fab714",ext:["zip","rar","7z","tar","gz"]},{icon:i.createVNode(gR,null,null),color:"#ff4d4f",ext:["mp4","avi","mov","wmv","flv","mkv"]},{icon:i.createVNode(dR,null,null),color:"#8c8c8c",ext:["mp3","wav","flac","ape","aac","ogg"]}];function r(M,z){return z.some(O=>M.toLowerCase()===`.${O}`)}function a(M){let z=M;const O=["B","KB","MB","GB","TB","PB","EB"];let T=0;for(;z>=1024&&T<O.length-1;)z/=1024,T++;return`${z.toFixed(0)} ${O[T]}`}const l=Zi(),s=i.computed(()=>l.value.disabled),c=i.computed(()=>e.item.name),u=i.computed(()=>e.item.size),d=i.computed(()=>e.item.percent),f=i.computed(()=>e.item.status||"done"),p=i.computed(()=>e.item.description),{getPrefixCls:m}=Ke(),v=i.computed(()=>m("attachment",e.prefixCls)),g=`${v.value}-list-card`,[y,C,S]=X0(v),$=i.useTemplateRef("file-list-card-container"),x=i.computed(()=>{const M=c.value||"",z=M.match(/^(.*)\.[^.]+$/);return{namePrefix:z?z[1]:M,nameSuffix:z?M.slice(z[1].length):""}}),w=i.computed(()=>r(x.value.nameSuffix,n)),P=i.computed(()=>p.value?p.value:f.value==="uploading"?`${d.value||0}%`:f.value==="error"?e.item.response||Nc:u.value?a(u.value):Nc),b=i.computed(()=>{for(const{ext:M,icon:z,color:O}of o)if(r(x.value.nameSuffix,M))return{icon:z,iconColor:O};return{icon:i.createVNode(tc,{key:"defaultIcon"},null),iconColor:Ec}}),[I,E]=Ie();i.watch(()=>e.item.originFileObj,()=>{if(e.item.originFileObj){let M=!0;vR(e.item.originFileObj).then(z=>{M&&E(z)}),i.onWatcherCleanup(()=>{M=!1})}E(void 0)},{immediate:!0});const A=i.computed(()=>e.item.thumbUrl||e.item.url||I.value),R=i.computed(()=>w.value&&(e.item.originFileObj||A.value)),B=i.computed(()=>R.value?i.createVNode(i.Fragment,null,[A.value&&i.createVNode("img",{alt:"preview",src:A.value},null),f.value!=="done"&&i.createVNode("div",{class:`${g}-img-mask`},[f.value==="uploading"&&d.value!==void 0&&i.createVNode(nh,{percent:d.value,prefixCls:g},null),f.value==="error"&&i.createVNode("div",{class:`${g}-desc`},[i.createVNode("div",{class:`${g}-ellipsis-prefix`},[P.value])])])]):i.createVNode(i.Fragment,null,[i.createVNode("div",{class:`${g}-icon`,style:{color:b.value.iconColor}},[b.value.icon]),i.createVNode("div",{class:`${g}-content`},[i.createVNode("div",{class:`${g}-name`},[i.createVNode("div",{class:`${g}-ellipsis-prefix`},[x.value.namePrefix??Nc]),i.createVNode("div",{class:`${g}-ellipsis-suffix`},[x.value.nameSuffix])]),i.createVNode("div",{class:`${g}-desc`},[i.createVNode("div",{class:`${g}-ellipsis-prefix`},[P.value])])])]));return t({nativeElement:$}),()=>y(i.createVNode("div",{class:re(g,{[`${g}-status-${f.value}`]:f.value,[`${g}-type-preview`]:R.value,[`${g}-type-overview`]:!R.value},e.className,C.value,S),style:e.style,ref:"file-list-card-container"},[B.value,!s.value&&e.onRemove&&i.createVNode("button",{type:"button",class:`${g}-remove`,onClick:()=>{e.onRemove(e.item)}},[i.createVNode(dt,null,null)])]))}}),q0=1,SR=i.defineComponent({name:"AXAttachmentsFileList",__name:"FileList",props:{prefixCls:null,items:null,onRemove:{type:Function},overflow:null,upload:null,listClassName:null,listStyle:null,itemClassName:null,itemStyle:null},setup(e){const t=i.computed(()=>`${e.prefixCls}-list`),n=i.useTemplateRef("file-list-container"),[o,r]=Ie(!1),a=Zi();i.watchEffect(()=>{r(!0),i.onWatcherCleanup(()=>{r(!1)})});const[l,s]=Ie(!1),[c,u]=Ie(!1),d=()=>{const v=n.value;v&&(e.overflow==="scrollX"?(s(Math.abs(v.scrollLeft)>=q0),u(v.scrollWidth-v.clientWidth-Math.abs(v.scrollLeft)>=q0)):e.overflow==="scrollY"&&(s(v.scrollTop!==0),u(v.scrollHeight-v.clientHeight!==v.scrollTop)))};i.watch(()=>e.overflow,()=>{d()},{immediate:!0});const f=v=>{const g=n.value;g&&g.scrollTo({left:g.scrollLeft+v*g.clientWidth,behavior:"smooth"})},p=()=>{f(-1)},m=()=>{f(1)};return()=>i.createVNode("div",{class:re(t.value,{[`${t.value}-overflow-${e.overflow}`]:e.overflow,[`${t.value}-overflow-ping-start`]:l.value,[`${t.value}-overflow-ping-end`]:c.value},e.listClassName),ref:"file-list-container",onScroll:d,style:e.listStyle},[e.items.map(v=>i.createVNode(G0,{key:v.uid,prefixCls:e.prefixCls,item:v,onRemove:e.onRemove,className:re(e.itemClassName),style:{...e.itemStyle}},null)),!a.value.disabled&&i.createVNode(k0,{upload:e.upload,children:i.createVNode(We,{class:`${t.value}-upload-btn`,type:"dashed"},{default:()=>[i.createVNode(ms,{class:`${t.value}-upload-btn-icon`},null)]})},null),e.overflow==="scrollX"&&i.createVNode(i.Fragment,null,[i.createVNode(We,{size:"small",shape:"circle",class:`${t.value}-prev-btn`,icon:i.createVNode(Zo,null,null),onClick:p},null),i.createVNode(We,{size:"small",shape:"circle",class:`${t.value}-next-btn`,icon:i.createVNode(yn,null,null),onClick:m},null)])])}}),wR=i.defineComponent({name:"AXAttachments",__name:"Attachments",props:i.mergeDefaults({capture:null,type:null,name:null,defaultFileList:null,action:null,directory:null,data:null,method:null,headers:null,showUploadList:null,multiple:null,accept:null,beforeUpload:null,onChange:{type:Function},"onUpdate:fileList":null,onDrop:null,listType:null,onPreview:null,onDownload:null,onReject:null,onRemove:null,remove:null,supportServerRender:null,disabled:{type:Boolean},prefixCls:null,customRequest:null,withCredentials:null,openFileDialogOnClick:null,locale:null,id:null,previewFile:null,transformFile:null,iconRender:null,isImageUrl:null,progress:null,itemRender:null,maxCount:null,height:null,removeIcon:null,downloadIcon:null,previewIcon:null,rootClassName:null,rootStyle:null,style:null,className:null,classNames:null,styles:null,children:null,placeholder:{type:Function},getDropContainer:{type:Function},items:null,overflow:null},{items:()=>[],classNames:()=>({}),styles:()=>({})}),setup(e,{expose:t}){const n=He(e,["prefixCls","rootClassName","rootStyle","className","style","items","children","getDropContainer","placeholder","onChange","overflow","disabled","classNames","styles"]);i.toRef(e,"prefixCls");const o=i.useSlots(),{getPrefixCls:r,direction:a}=Ke(),l=r("attachment",e.prefixCls),s=Ut("attachments"),c=i.computed(()=>s.value.classNames),u=i.computed(()=>s.value.styles),d=i.useTemplateRef("attachments-container"),f=i.useTemplateRef("attachments-upload"),[p,m,v]=X0(l),g=i.computed(()=>re(m.value,v)),[y,C]=Ie(e.items);i.watch(()=>e.items,()=>{C(e.items)});const S=b=>{var I;C(b.fileList),(I=e.onChange)==null||I.call(e,b)},$=i.computed(()=>({...n,fileList:y.value,onChange:S})),x=b=>{const I=y.value.filter(E=>E.uid!==b.uid);S({file:b,fileList:I})},w=(b,I,E)=>{const A=o.placeholder?o.placeholder({type:b}):typeof e.placeholder=="function"?e.placeholder(b):e.placeholder;return i.createVNode(lR,{placeholder:A,upload:$.value,prefixCls:l,className:re(c.value.placeholder,e.classNames.placeholder),style:{...u.value.placeholder,...e.styles.placeholder,...I==null?void 0:I.style}},null)},P=i.computed(()=>y.value.length>0);return t({nativeElement:d.value,upload:b=>{var E,A;const I=(A=(E=f.value)==null?void 0:E.nativeElement)==null?void 0:A.querySelector('input[type="file"]');if(I){const R=new DataTransfer;R.items.add(b),I.files=R.files,I.dispatchEvent(new Event("change",{bubbles:!0}))}}}),()=>p(i.createVNode(aR,{value:{disabled:e.disabled}},{default:()=>[e.children?i.createVNode(i.Fragment,null,[i.createVNode(k0,{upload:$.value,rootClassName:e.rootClassName,ref:"attachments-upload",children:e.children},null),i.createVNode(W0,{getDropContainer:e.getDropContainer,prefixCls:l,className:re(g.value,e.rootClassName),children:w("drop")},null)]):i.createVNode("div",{class:re(l,g.value,{[`${l}-rtl`]:a.value==="rtl"},e.className,e.rootClassName),style:{...e.rootStyle,...e.style},dir:a.value||"ltr",ref:"attachments-container"},[i.createVNode(SR,{prefixCls:l,items:y.value,onRemove:x,overflow:e.overflow,upload:$.value,listClassName:re(c.value.list,e.classNames.list),listStyle:{...u.value.list,...e.styles.list,...!P.value&&{display:"none"}},itemClassName:re(c.value.item,e.classNames.item),itemStyle:{...u.value.item,...e.styles.item}},null),w("inline",P.value?{style:{display:"none"}}:{},f.value),i.createVNode(W0,{getDropContainer:e.getDropContainer||(()=>d.value),prefixCls:l,className:g.value,children:w("drop")},null)])]}))}}),$R=Object.assign(wR,{FileCard:G0}),xR=(e,t,n)=>{const o=i.computed(()=>{const s=i.toValue(e);let c={expandedKeys:[],onExpand:()=>{}};return s?(typeof s=="object"&&(c={...c,...s}),{enableCollapse:!0,customizeExpandedKeys:c.expandedKeys,customizeOnExpand:c.onExpand}):{enableCollapse:!1,customizeExpandedKeys:c.expandedKeys,customizeOnExpand:c.onExpand}}),[r,a]=Ie(o.value.customizeExpandedKeys),l=s=>{var u,d;if(!o.value.enableCollapse)return;const c=r.value.includes(s)?r.value.filter(f=>f!==s):[...r.value,s];(d=(u=o.value).customizeOnExpand)==null||d.call(u,c),a(c)};return[i.computed(()=>o.value.enableCollapse),r,l]};var Ji=(e=>(e.PENDING="pending",e.SUCCESS="success",e.ERROR="error",e))(Ji||{});const OR=e=>{const{componentCls:t}=e,n=`${t}-item`,o={[Ji.PENDING]:e.colorPrimaryText,[Ji.SUCCESS]:e.colorSuccessText,[Ji.ERROR]:e.colorErrorText},r=Object.keys(o);return r.reduce((a,l)=>{const s=o[l];return r.forEach(c=>{const u=`& ${n}-${l}-${c}`,d=l===c?{}:{backgroundColor:"none !important",backgroundImage:`linear-gradient(${s}, ${o[c]})`};a[u]={[`& ${n}-icon, & > *::before`]:{backgroundColor:`${s} !important`},"& > :last-child::before":d}}),a},{})},PR=e=>{const{calc:t,componentCls:n}=e,o=`${n}-item`,r={content:'""',width:t(e.lineWidth).mul(2).equal(),display:"block",position:"absolute",insetInlineEnd:"none",backgroundColor:e.colorTextPlaceholder};return{"& > :last-child > :last-child":{"&::before":{display:"none !important"},[`&${o}-footer`]:{"&::before":{display:"block !important",bottom:0}}},[`& > ${o}`]:{[`& ${o}-header, & ${o}-content, & ${o}-footer`]:{position:"relative","&::before":{bottom:t(e.itemGap).mul(-1).equal()}},[`& ${o}-header, & ${o}-content`]:{marginInlineStart:t(e.itemSize).mul(-1).equal(),"&::before":{...r,insetInlineStart:t(e.itemSize).div(2).sub(e.lineWidth).equal()}},[`& ${o}-header::before`]:{top:e.itemSize,bottom:t(e.itemGap).mul(-2).equal()},[`& ${o}-content::before`]:{top:"100%"},[`& ${o}-footer::before`]:{...r,top:0,insetInlineStart:t(e.itemSize).div(-2).sub(e.lineWidth).equal()}}}},IR=e=>{const{componentCls:t}=e,n=`${t}-item`;return{[n]:{display:"flex",flexDirection:"column",[`& ${n}-collapsible`]:{cursor:"pointer"},[`& ${n}-header`]:{display:"flex",marginBottom:e.itemGap,gap:e.itemGap,alignItems:"flex-start",[`& ${n}-icon`]:{height:e.itemSize,width:e.itemSize,fontSize:e.itemFontSize,display:"flex",justifyContent:"center",alignItems:"center"},[`& ${n}-extra`]:{height:e.itemSize,maxHeight:e.itemSize},[`& ${n}-header-box`]:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden",[`& ${n}-title`]:{height:e.itemSize,lineHeight:`${ft(e.itemSize)}`,maxHeight:e.itemSize,fontSize:e.itemFontSize,[`& ${n}-collapse-icon`]:{marginInlineEnd:e.marginXS}},[`& ${n}-desc`]:{fontSize:e.itemFontSize}}},[`& ${n}-content`]:{[`& ${n}-content-hidden`]:{display:"none"},[`& ${n}-content-box`]:{padding:e.itemGap,display:"inline-block",maxWidth:`calc(100% - ${e.itemSize})`,borderRadius:e.borderRadiusLG,backgroundColor:e.colorBgContainer,border:`${ft(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}},[`& ${n}-footer`]:{marginTop:e.itemGap,display:"inline-flex"}}}},Rc=(e,t="middle")=>{const{componentCls:n}=e,o={large:{itemSize:e.itemSizeLG,itemGap:e.itemGapLG,itemFontSize:e.itemFontSizeLG},middle:{itemSize:e.itemSize,itemGap:e.itemGap,itemFontSize:e.itemFontSize},small:{itemSize:e.itemSizeSM,itemGap:e.itemGapSM,itemFontSize:e.itemFontSizeSM}}[t];return{[`&${n}-${t}`]:{paddingInlineStart:o.itemSize,gap:o.itemGap,...IR({...e,...o}),...PR({...e,...o})}}},TR=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",...OR(e),...Rc(e),...Rc(e,"large"),...Rc(e,"small"),[`&${t}-rtl`]:{direction:"rtl"}}}},NR=Gt("ThoughtChain",e=>{const t=Ct(e,{itemFontSizeSM:e.fontSizeSM,itemSizeSM:e.calc(e.controlHeightXS).add(e.controlHeightSM).div(2).equal(),itemGapSM:e.marginSM,itemFontSize:e.fontSize,itemSize:e.calc(e.controlHeightSM).add(e.controlHeight).div(2).equal(),itemGap:e.margin,itemFontSizeLG:e.fontSizeLG,itemSizeLG:e.calc(e.controlHeight).add(e.controlHeightLG).div(2).equal(),itemGapLG:e.marginLG});return[TR(t),j0(t)]}),Y0=Symbol("ThoughtChainNodeContext"),Ac=i.shallowRef(),ER=e=>{i.provide(Y0,e),i.watch(e,()=>{Ac.value=i.unref(e),i.triggerRef(Ac)},{immediate:!0,deep:!0})},RR=()=>i.inject(Y0,i.computed(()=>Ac.value||{})),AR=i.defineComponent({props:{value:St()},setup(e,{slots:t}){return ER(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),MR=i.defineComponent({name:"AXThoughtChainNode",__name:"item",props:i.mergeDefaults({info:null,nextStatus:null,onClick:{type:Function}},{info:()=>({})}),setup(e){const t=He(e,["info","nextStatus","onClick"]),n=i.computed(()=>uo(t,{attr:!0,aria:!0,data:!0})),o=RR(),r=i.computed(()=>o.value.prefixCls),a=i.computed(()=>o.value.enableCollapse),l=i.computed(()=>o.value.expandedKeys),s=i.computed(()=>o.value.direction),c=i.computed(()=>o.value.classNames),u=i.computed(()=>o.value.styles),d=i.useId(),f=i.computed(()=>e.info.key??d),p=i.computed(()=>e.info.icon),m=i.computed(()=>e.info.title),v=i.computed(()=>e.info.extra),g=i.computed(()=>e.info.content),y=i.computed(()=>e.info.footer),C=i.computed(()=>e.info.status),S=i.computed(()=>e.info.description),$=i.computed(()=>`${r.value}-item`),x=()=>{var b;return(b=e.onClick)==null?void 0:b.call(e,f.value)},w=i.computed(()=>{var b;return(b=l.value)==null?void 0:b.includes(f.value)}),P=i.computed(()=>a.value?w.value:!0);return()=>i.createVNode("div",i.mergeProps(n.value,{class:re($.value,{[`${$.value}-${C.value}${e.nextStatus?`-${e.nextStatus}`:""}`]:C.value},t.class),style:t.style}),[i.createVNode("div",{class:re(`${$.value}-header`,c.value.itemHeader),style:u.value.itemHeader,onClick:x},[i.createVNode(vn,{icon:p.value,class:`${$.value}-icon`},null),i.createVNode("div",{class:re(`${$.value}-header-box`,{[`${$.value}-collapsible`]:a.value&&g.value})},[i.createVNode($e.Text,{strong:!0,ellipsis:{tooltip:{placement:s.value==="rtl"?"topRight":"topLeft",title:m.value}},class:`${$.value}-title`},{default:()=>[a.value&&g.value&&(s.value==="rtl"?i.createVNode(Zo,{class:`${$.value}-collapse-icon`,rotate:w.value?-90:0},null):i.createVNode(yn,{class:`${$.value}-collapse-icon`,rotate:w.value?90:0},null)),m.value]}),S.value&&i.createVNode($e.Text,{class:`${$.value}-desc`,ellipsis:{tooltip:{placement:s.value==="rtl"?"topRight":"topLeft",title:S.value}},type:"secondary"},{default:()=>[S.value]})]),v.value&&i.createVNode("div",{class:`${$.value}-extra`},[v.value])]),i.createVNode(gr,{prefixCls:r.value},{default:()=>[g.value&&i.withDirectives(i.createVNode("div",{class:re(`${$.value}-content`)},[i.createVNode("div",{class:re(`${$.value}-content-box`,c.value.itemContent),style:u.value.itemContent},[g.value])]),[[i.vShow,P.value]])]}),y.value&&i.createVNode("div",{class:re(`${$.value}-footer`,c.value.itemFooter),style:u.value.itemFooter},[y.value])])}}),VR=i.defineComponent({name:"AXThoughtChain",__name:"ThoughtChain",props:i.mergeDefaults({items:null,collapsible:{type:Boolean},size:null,styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({}),size:"middle"}),setup(e){const t=He(e,["prefixCls","rootClassName","class","items","collapsible","styles","style","classNames","size"]);i.toRef(e,"class"),i.toRef(e,"prefixCls");const n=i.computed(()=>uo(t,{attr:!0,aria:!0,data:!0})),{getPrefixCls:o,direction:r}=Ke(),a=i.computed(()=>o()),l=i.computed(()=>o("thought-chain",e.prefixCls)),s=Ut("thoughtChain"),[c,u,d]=xR(()=>e.collapsible,l.value,a.value),[f,p,m]=NR(l),v=i.computed(()=>re(e.class,e.rootClassName,l.value,s.value.className,p.value,m,{[`${l.value}-rtl`]:r.value==="rtl"},`${l.value}-${e.size}`));return()=>f(i.createVNode("div",i.mergeProps(n.value,{class:v.value,style:{...typeof s.value.style=="object"?s.value.style:{},...typeof e.style=="object"?e.style:{}}}),[i.createVNode(AR,{value:{prefixCls:l.value,enableCollapse:c.value,expandedKeys:u.value,direction:r.value,classNames:{itemHeader:re(s.value.classNames.itemHeader,e.classNames.itemHeader),itemContent:re(s.value.classNames.itemContent,e.classNames.itemContent),itemFooter:re(s.value.classNames.itemFooter,e.classNames.itemFooter)},styles:{itemHeader:{...s.value.styles.itemHeader,...e.styles.itemHeader},itemContent:{...s.value.styles.itemContent,...e.styles.itemContent},itemFooter:{...s.value.styles.itemFooter,...e.styles.itemFooter}}}},{default:()=>{var g;return[(g=e.items)==null?void 0:g.map((y,C)=>{var S;return i.createVNode(MR,{key:y.key||`key_${C}`,class:re(s.value.classNames.item,e.classNames.item),style:{...s.value.styles.item,...e.styles.item},info:{...y,icon:y.icon||C+1},onClick:d,nextStatus:((S=e.items[C+1])==null?void 0:S.status)||y.status},null)})]}})]))}}),DR=`
|
|
289
|
+
onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`.split(/[\s\n]+/),v8="aria-",y8="data-";function N0(e,t){return e.indexOf(t)===0}function uo(e,t=!1){let n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n={...t};const o={};return Object.keys(e).forEach(r=>{(n.aria&&(r==="role"||N0(r,v8))||n.data&&N0(r,y8)||n.attr&&(T0.includes(r)||T0.includes(r.toLowerCase())))&&(o[r]=e[r])}),o}function b8(e){const[t,n]=Ie(e.value.length),o=i.computed(()=>e.value.slice(0,i.unref(t))),r=i.computed(()=>{const l=i.unref(o)[i.unref(o).length-1];return l?l.key:null});i.watch(e,()=>{var l;if(!(i.unref(o).length&&i.unref(o).every((s,c)=>{var u;return s.key===((u=e.value[c])==null?void 0:u.key)}))){if(i.unref(o).length===0)n(1);else for(let s=0;s<i.unref(o).length;s+=1)if(i.unref(o)[s].key!==((l=e.value[s])==null?void 0:l.key)){n(s);break}}},{immediate:!0,deep:!0});const a=Ki(l=>{l===i.unref(r)&&n(i.unref(t)+1)});return[o,a]}function C8(e,t){const n=(r,a)=>{var l;return typeof t.value=="function"?t.value(r,a):t?((l=t.value)==null?void 0:l[r.role])||{}:{}};return i.computed(()=>(e.value||[]).map((r,a)=>{const l=r.key??`preset_${a}`;return{...n(r,a),...r,key:l}}))}const S8=1,E0=i.defineComponent({name:"AXBubbleList",inheritAttrs:!1,__name:"BubbleList",props:i.mergeDefaults({prefixCls:null,rootClassName:null,items:null,autoScroll:{type:Boolean},roles:null},{autoScroll:!0}),setup(e,{expose:t}){const n=He(e,["prefixCls","rootClassName","items","autoScroll","roles"]);i.toRef(e,"roles"),i.toRef(e,"items"),i.toRef(e,"prefixCls");const o=i.useAttrs(),r=uo(i.mergeProps(n,o),{attr:!0,aria:!0}),a=i.ref(e.items),l=i.ref(e.roles);i.watch(()=>e.items,()=>{a.value=e.items}),i.watch(()=>e.roles,()=>{l.value=e.roles});const s=i.ref(null),c=i.ref({}),{getPrefixCls:u}=Ke(),d=u("bubble",e.prefixCls),f=`${d}-list`,[p,m,v]=x0(d),[g,y]=Ie(!1);i.watchEffect(()=>{y(!0),i.onWatcherCleanup(()=>{y(!1)})});const C=C8(a,l),[S,$]=b8(C),[x,w]=Ie(!0),[P,b]=Ie(0),I=R=>{const B=R.target;w(B.scrollHeight-Math.abs(B.scrollTop)-B.clientHeight<=S8)};i.watch(P,()=>{e.autoScroll&&i.unref(s)&&i.unref(x)&&i.nextTick(()=>{i.unref(s).scrollTo({top:i.unref(s).scrollHeight})})}),i.watch(()=>i.unref(S).length,()=>{var R;if(e.autoScroll){const B=(R=i.unref(S)[i.unref(S).length-2])==null?void 0:R.key,M=i.unref(c)[B];if(M){const{nativeElement:z}=M,{top:O=0,bottom:T=0}=(z==null?void 0:z.getBoundingClientRect())??{},{top:D,bottom:L}=i.unref(s).getBoundingClientRect();O<L&&T>D&&(b(i.unref(P)+1),w(!0))}}});const E=Ki(()=>{e.autoScroll&&b(i.unref(P)+1)}),A=i.computed(()=>({onUpdate:E}));return t({nativeElement:s,scrollTo:({key:R,offset:B,behavior:M="smooth",block:z})=>{if(typeof B=="number")i.unref(s).scrollTo({top:B,behavior:M});else if(R!==void 0){const O=i.unref(c)[R];if(O){const T=i.unref(S).findIndex(D=>D.key===R);w(T===i.unref(S).length-1),O.nativeElement.scrollIntoView({behavior:M,block:z})}}}}),()=>p(i.createVNode(g8,{value:A.value},{default:()=>[i.createVNode("div",i.mergeProps(r,{class:re(f,e.rootClassName,m.value,v,{[`${f}-reach-end`]:x.value}),ref:s,onScroll:I}),[i.unref(S).map(({key:R,onTypingComplete:B,...M})=>i.createVNode(P0,i.mergeProps(M,{key:R,ref:z=>{z?c.value[R]=z:delete c.value[R]},typing:g.value?M.typing:!1,onTypingComplete:()=>{B==null||B(),$(R)}}),null))])]}))}}),w8=Object.assign(P0,{List:E0}),$8=i.defineComponent({name:"AXConversationsItem",__name:"ConversationsItem",props:{info:null,prefixCls:null,direction:null,menu:null,active:{type:Boolean},onClick:{type:Function}},setup(e){const t=He(e,["prefixCls","info","class","direction","onClick","active","menu"]);i.toRef(e,"class");const n=i.computed(()=>uo(t,{aria:!0,data:!0,attr:!0})),o=p=>{p.stopPropagation()},r=i.computed(()=>e.info.disabled),[a,l]=Ie(!1),[s,c]=Ie(!1),u=i.computed(()=>re(e.class,`${e.prefixCls}-item`,{[`${e.prefixCls}-item-active`]:e.active&&!r.value},{[`${e.prefixCls}-item-disabled`]:r.value})),d=()=>{!r.value&&e.onClick&&e.onClick(e.info)},f=p=>{p&&c(!p)};return()=>i.createVNode(Ht,{title:e.info.label,open:a.value&&s.value,onOpenChange:c,placement:e.direction==="rtl"?"left":"right"},{default:()=>[i.createVNode("li",i.mergeProps(n.value,{class:u.value,onClick:d}),[e.info.icon&&i.createVNode("div",{class:`${e.prefixCls}-icon`},[e.info.icon]),i.createVNode($e.Text,{class:`${e.prefixCls}-label`,ellipsis:{onEllipsis:l}},{default:()=>[e.info.label]}),e.menu&&!r.value&&i.createVNode(bn,{placement:e.direction==="rtl"?"bottomLeft":"bottomRight",trigger:["click"],disabled:r.value,onOpenChange:f},{default:()=>i.createVNode(Ko,{onClick:o,disabled:r.value,class:`${e.prefixCls}-menu-icon`},null),overlay:()=>i.createVNode(_t,e.menu,null)})])]})}}),R0=Symbol("GroupTitleContext"),Cc=i.shallowRef(),x8=e=>{i.provide(R0,e),i.watch(e,()=>{Cc.value=i.unref(e),i.triggerRef(Cc)},{immediate:!0,deep:!0})},O8=()=>i.inject(R0,i.computed(()=>Cc.value||{})),P8=i.defineComponent({props:{value:St()},setup(e,{slots:t}){return x8(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),A0=i.defineComponent({name:"AXConversationsGroupTitle",__name:"GroupTitle",setup(e){const t=i.useSlots(),n=O8(),o=i.computed(()=>{var r;return(r=t.default)==null?void 0:r.call(t)});return()=>i.createVNode("div",{class:re(`${n.value.prefixCls}-group-title`)},[o.value&&i.createVNode($e.Text,null,{default:()=>[o.value]})])}});function M0(e,t){const{defaultValue:n,value:o=i.ref()}=t||{};let r=typeof e=="function"?e():e;o.value!==void 0&&(r=i.unref(o)),n!==void 0&&(r=typeof n=="function"?n():n);const a=i.ref(r),l=i.ref(r);i.watchEffect(()=>{let c=o.value!==void 0?o.value:a.value;t.postState&&(c=t.postState(c)),l.value=c});function s(c){const u=l.value;a.value=c,i.toRaw(l.value)!==c&&t.onChange&&t.onChange(c,u)}return i.watch(o,()=>{a.value=o.value}),[l,s]}const Sc="__ungrouped",I8=(e,t=[])=>{const n=i.computed(()=>{if(!i.toValue(e))return{enableGroup:!1,sort:void 0,title:void 0};let o={sort:void 0,title:void 0};return typeof i.toValue(e)=="object"&&(o={...o,...i.toValue(e)}),{enableGroup:!0,sort:o.sort,title:o.title}});return i.computed(()=>{if(!n.value.enableGroup)return{groupList:[{name:Sc,data:i.toValue(t),title:void 0}],enableGroup:n.value.enableGroup};const o=i.toValue(t).reduce((l,s)=>{const c=s.group||Sc;return l[c]||(l[c]=[]),l[c].push(s),l},{});return{groupList:(n.value.sort?Object.keys(o).sort(n.value.sort):Object.keys(o)).map(l=>({name:l===Sc?void 0:l,title:n.value.title,data:o[l]})),enableGroup:n.value.enableGroup}})},T8=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",gap:e.paddingXXS,overflowY:"auto",padding:e.paddingSM,[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-list`]:{display:"flex",gap:e.paddingXXS,flexDirection:"column",paddingLeft:0,[`& ${t}-item`]:{paddingInlineStart:e.paddingXL},[`& ${t}-label`]:{color:e.colorTextDescription}},[`& ${t}-item`]:{display:"flex",height:e.controlHeightLG,minHeight:e.controlHeightLG,gap:e.paddingXS,padding:`0 ${ft(e.paddingXS)}`,alignItems:"center",borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,"&:hover":{backgroundColor:e.colorBgTextHover},"&-active":{backgroundColor:e.colorBgTextHover,[`& ${t}-label, ${t}-menu-icon`]:{color:e.colorText}},"&-disabled":{cursor:"not-allowed",[`& ${t}-label`]:{color:e.colorTextDisabled}},"&:hover, &-active":{[`& ${t}-menu-icon`]:{opacity:1}}},[`& ${t}-label`]:{flex:1,overflow:"hidden",textOverflow:"ellipsis",color:e.colorText},[`& ${t}-menu-icon`]:{opacity:0,fontSize:e.fontSizeXL},[`& ${t}-group-title`]:{display:"flex",alignItems:"center",height:e.controlHeightLG,minHeight:e.controlHeightLG,padding:`0 ${ft(e.paddingXS)}`}}}},N8=Gt("Conversations",e=>{const t=Ct(e,{});return T8(t)},()=>({})),E8=i.defineComponent({name:"AXConversations",__name:"Conversations",props:i.mergeDefaults({items:null,activeKey:null,defaultActiveKey:null,onActiveChange:{type:Function},menu:{type:Function},groupable:{type:Boolean},styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({})}),setup(e){const t=He(e,["prefixCls","rootClassName","items","activeKey","defaultActiveKey","onActiveChange","menu","styles","classNames","groupable","class","style"]);i.toRef(e,"class"),i.toRef(e,"activeKey"),i.toRef(e,"prefixCls");const n=i.ref(e.activeKey),o=i.computed(()=>uo(t,{attr:!0,aria:!0,data:!0})),[r,a]=M0(e.defaultActiveKey,{value:n});i.watch(()=>e.activeKey,()=>{n.value=e.activeKey});const l=I8(()=>e.groupable,()=>e.items),{getPrefixCls:s,direction:c}=Ke(),u=i.computed(()=>s("conversations",e.prefixCls)),d=Ut("conversations"),[f,p,m]=N8(u),v=i.computed(()=>re(u.value,d.value.className,e.class,e.rootClassName,p.value,m,{[`${u.value}-rtl`]:c.value==="rtl"})),g=y=>{a(y.key),e.onActiveChange&&e.onActiveChange(y.key)};return()=>f(i.createVNode("ul",i.mergeProps(o.value,{style:{...typeof d.value.style=="object"?d.value.style:{},...typeof e.style=="object"?e.style:{}},class:v.value}),[l.value.groupList.map((y,C)=>{const S=y.data.map(($,x)=>i.createVNode($8,{key:$.key||`key-${x}`,info:$,prefixCls:u.value,direction:c.value,class:re(e.classNames.item,d.value.classNames.item),style:{...d.value.styles.item,...e.styles.item},menu:typeof e.menu=="function"?e.menu($):e.menu,active:r.value===$.key,onClick:g},null));return l.value.enableGroup?i.createVNode("li",{key:y.name||`key-${C}`},[i.createVNode(P8,{value:{prefixCls:u.value}},{default:()=>{var $;return[(($=y.title)==null?void 0:$.call(y,y.name,{components:{GroupTitle:A0}}))||i.createVNode(A0,{key:y.name},{default:()=>[y.name]})]}}),i.createVNode("ul",{class:`${u.value}-list`},[S])]):S})]))}}),R8=e=>{const{componentCls:t,calc:n}=e,o=n(e.fontSizeHeading3).mul(e.lineHeightHeading3).equal(),r=n(e.fontSize).mul(e.lineHeight).equal();return{[t]:{gap:e.padding,[`${t}-icon`]:{height:n(o).add(r).add(e.paddingXXS).equal(),display:"flex",img:{height:"100%"}},[`${t}-content-wrapper`]:{gap:e.paddingXS,flex:"auto",minWidth:0,[`${t}-title-wrapper`]:{gap:e.paddingXS},[`${t}-title`]:{margin:0},[`${t}-extra`]:{marginInlineStart:"auto"}}}}},A8=e=>{const{componentCls:t}=e;return{[t]:{"&-filled":{paddingInline:e.padding,paddingBlock:e.paddingSM,background:e.colorFillContent,borderRadius:e.borderRadiusLG},"&-borderless":{[`${t}-title`]:{fontSize:e.fontSizeHeading3,lineHeight:e.lineHeightHeading3}}}}},M8=Gt("Welcome",e=>{const t=Ct(e,{});return[R8(t),A8(t)]},()=>({}));function V8(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!i.isVNode(e)}const D8=i.defineComponent({name:"AXWelcome",__name:"Welcome",props:i.mergeDefaults({prefixCls:null,rootClassName:null,className:null,style:null,variant:null,classNames:null,styles:null,icon:null,title:null,description:null,extra:null},{variant:"filled",classNames:()=>({}),styles:()=>({})}),setup(e){i.toRef(e,"prefixCls");const t=i.useSlots(),{direction:n,getPrefixCls:o}=Ke(),r=o("welcome",e.prefixCls),a=Ut("welcome"),[l,s,c]=M8(r),u=i.computed(()=>{const m=t.icon?t.icon():e.icon;if(!m)return null;let v=m;return typeof m=="string"&&m.startsWith("http")&&(v=i.createVNode("img",{src:m,alt:"icon"},null)),i.createVNode("div",{class:re(`${r}-icon`,a.value.classNames.icon,e.classNames.icon),style:e.styles.icon},[v])}),d=i.computed(()=>{const m=t.title?t.title():e.title;return m?i.createVNode($e.Title,{level:4,class:re(`${r}-title`,a.value.classNames.title,e.classNames.title),style:e.styles.title},V8(m)?m:{default:()=>[m]}):null}),f=i.computed(()=>t.description?t.description():e.description),p=i.computed(()=>{const m=t.extra?t.extra():e.extra;return m?i.createVNode("div",{class:re(`${r}-extra`,a.value.classNames.extra,e.classNames.extra),style:e.styles.extra},[m]):null});return()=>l(i.createVNode(sr,{class:re(r,a.value.className,e.className,e.rootClassName,s.value,c,`${r}-${e.variant}`,{[`${r}-rtl`]:n.value==="rtl"}),style:e.style},{default:()=>[u.value,i.createVNode(sr,{vertical:!0,class:`${r}-content-wrapper`},{default:()=>[t.extra||e.extra?i.createVNode(sr,{align:"flex-start",class:`${r}-title-wrapper`},{default:()=>[d.value,p.value]}):d.value,f.value&&i.createVNode($e.Text,{class:re(`${r}-description`,a.value.classNames.description,e.classNames.description),style:e.styles.description},{default:()=>[f.value]})]})]}))}}),B8=e=>{const{componentCls:t}=e;return{[t]:{"&, & *":{boxSizing:"border-box"},maxWidth:"100%",[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-title`]:{marginBlockStart:0,fontWeight:"normal",color:e.colorTextTertiary},[`& ${t}-list`]:{display:"flex",gap:e.paddingSM,overflowX:"scroll","&::-webkit-scrollbar":{display:"none"},listStyle:"none",paddingInlineStart:0,marginBlock:0,alignItems:"stretch","&-wrap":{flexWrap:"wrap"},"&-vertical":{flexDirection:"column",alignItems:"flex-start"}},[`${t}-item`]:{flex:"none",display:"flex",gap:e.paddingXS,height:"auto",paddingBlock:e.paddingSM,paddingInline:e.padding,alignItems:"flex-start",justifyContent:"flex-start",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,transition:["border","background"].map(n=>`${n} ${e.motionDurationSlow}`).join(","),border:`${ft(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,[`&:not(${t}-item-has-nest)`]:{"&:hover":{cursor:"pointer",background:e.colorFillTertiary},"&:active":{background:e.colorFill}},[`${t}-content`]:{flex:"auto",minWidth:0,display:"flex",gap:e.paddingXXS,flexDirection:"column",alignItems:"flex-start"},[`${t}-icon, ${t}-label, ${t}-desc`]:{margin:0,padding:0,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start",whiteSpace:"normal"},[`${t}-label`]:{color:e.colorTextHeading,fontWeight:500},[`${t}-label + ${t}-desc`]:{color:e.colorTextTertiary},[`&${t}-item-disabled`]:{pointerEvents:"none",background:e.colorBgContainerDisabled,[`${t}-label, ${t}-desc`]:{color:e.colorTextTertiary}}}}}},L8=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-item-has-nest`]:{[`> ${t}-content`]:{[`> ${t}-label`]:{fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}}},[`&${t}-nested`]:{marginTop:e.paddingXS,alignSelf:"stretch",[`${t}-list`]:{alignItems:"stretch"},[`${t}-item`]:{border:0,background:e.colorFillQuaternary}}}}},z8=Gt("Prompts",e=>{const t=Ct(e,{});return[B8(t),L8(t)]},()=>({})),V0=i.defineComponent({name:"AXPrompts",__name:"Prompts",props:i.mergeDefaults({items:null,title:null,onItemClick:{type:Function},vertical:{type:Boolean},wrap:{type:Boolean},styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({})}),setup(e){const t=He(e,["prefixCls","title","class","items","onItemClick","vertical","wrap","rootClassName","styles","classNames","style"]);i.toRef(e,"class"),i.toRef(e,"prefixCls");const n=i.useSlots(),{getPrefixCls:o,direction:r}=Ke(),a=o("prompts",e.prefixCls),l=Ut("prompts"),[s,c,u]=z8(a),d=i.computed(()=>re(a,l.value.className,e.class,e.rootClassName,c.value,u,{[`${a}-rtl`]:r.value==="rtl"})),f=i.computed(()=>re(`${a}-list`,l.value.classNames.list,e.classNames.list,{[`${a}-list-wrap`]:e.wrap},{[`${a}-list-vertical`]:e.vertical})),p=i.computed(()=>n.title?n.title():e.title);return()=>{var m;return s(i.createVNode("div",i.mergeProps(t,{class:d.value,style:{...typeof e.style=="object"?e.style:{},...typeof l.value.style=="object"?l.value.style:{}}}),[p.value&&i.createVNode($e.Title,{level:5,class:re(`${a}-title`,l.value.classNames.title,e.classNames.title),style:{...l.value.styles.title,...e.styles.title}},{default:()=>[p.value]}),i.createVNode("div",{class:f.value,style:{...l.value.styles.list,...e.styles.list}},[(m=e.items)==null?void 0:m.map((v,g)=>{const y=v.children&&v.children.length>0;return i.createVNode("div",{key:v.key||`key_${g}`,style:{...l.value.styles.item,...e.styles.item},class:re(`${a}-item`,l.value.classNames.item,e.classNames.item,{[`${a}-item-disabled`]:v.disabled,[`${a}-item-has-nest`]:y}),onClick:()=>{!y&&e.onItemClick&&e.onItemClick({data:v})}},[v.icon&&i.createVNode("div",{class:`${a}-icon`},[v.icon]),i.createVNode("div",{class:re(`${a}-content`,l.value.classNames.itemContent,e.classNames.itemContent),style:{...l.value.styles.itemContent,...e.styles.itemContent}},[v.label&&i.createVNode("h6",{class:`${a}-label`},[v.label]),v.description&&i.createVNode("p",{class:`${a}-desc`},[v.description]),y&&i.createVNode(V0,{class:`${a}-nested`,items:v.children,vertical:!0,onItemClick:e.onItemClick,classNames:{list:e.classNames.subList,item:e.classNames.subItem},styles:{list:e.styles.subList,item:e.styles.subItem}},null)])])})])]))}}}),F8=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{[`${n}-cascader-menus ${n}-cascader-menu`]:{height:"auto"},[`${t}-item`]:{"&-icon":{marginInlineEnd:e.paddingXXS},"&-extra":{marginInlineStart:e.padding}},[`&${t}-block`]:{[`${t}-item-extra`]:{marginInlineStart:"auto"}}}}},H8=Gt("Suggestion",e=>{const t=Ct(e,{});return F8(t)},()=>({}));function j8(e,t,n,o,r){const[a,l]=Ie([]),s=(m,v=a.value)=>{let g=i.toValue(e);for(let y=0;y<m-1;y+=1){const C=v[y],S=g.find($=>$.value===C);if(!S)break;g=S.children||[]}return g},c=m=>m.map((v,g)=>{const C=s(g+1,m).find(S=>S.value===v);return C==null?void 0:C.value}),u=m=>{const v=a.value.length||1,g=s(v),y=g.findIndex($=>$.value===a.value[v-1]),C=g.length,S=g[(y+m+C)%C];l([...a.value.slice(0,v-1),S.value])},d=()=>{a.value.length>1&&l(a.value.slice(0,a.value.length-1))},f=()=>{const m=s(a.value.length+1);m.length&&l([...a.value,m[0].value])},p=Ki(m=>{if(i.toValue(t))switch(console.log("e.key",m),m.key){case"ArrowDown":u(1),m.preventDefault();break;case"ArrowUp":u(-1),m.preventDefault();break;case"ArrowRight":i.toValue(n)?d():f(),m.preventDefault();break;case"ArrowLeft":i.toValue(n)?f():d(),m.preventDefault();break;case"Enter":s(a.value.length+1).length||o(c(a.value)),m.preventDefault();break;case"Escape":r(),m.preventDefault();break}});return i.watch(()=>i.toValue(t),()=>{i.toValue(t)&&l([i.toValue(e)[0].value])},{immediate:!0}),[a,p]}const _8=i.defineComponent({name:"AXSuggestion",__name:"Suggestion",props:i.mergeDefaults({prefixCls:null,className:null,rootClassName:null,style:null,children:{type:Function},open:{type:Boolean},onOpenChange:{type:Function},items:{type:Function},onSelect:{type:Function},block:{type:Boolean},styles:null,classNames:null},{open:!1}),setup(e){i.toRef(e,"prefixCls");const t=i.useSlots(),{direction:n,getPrefixCls:o}=Ke(),r=i.computed(()=>o("suggestion",e.prefixCls));`${r.value}`;const a=i.computed(()=>n.value==="rtl"),l=Ut("suggestion"),[s,c,u]=H8(r),[d,f]=Ie(e.open),[p,m]=Ie(),v=P=>{var b;f(P),(b=e.onOpenChange)==null||b.call(e,P)},g=P=>{P===!1?v(!1):(m(P),v(!0))},y=()=>{v(!1)},C=i.computed(()=>typeof e.items=="function"?e.items(p.value):e.items),S=P=>{e.onSelect&&e.onSelect(P[P.length-1]),v(!1)},[$,x]=j8(C,d,a,S,y),w=i.computed(()=>{var P;return t.default?t.default({onTrigger:g,onKeyDown:x}):(P=e.children)==null?void 0:P.call(e,{onTrigger:g,onKeyDown:x})});return()=>s(i.createVNode(X4,{options:C.value,open:d.value,value:$.value,placement:a.value?"topRight":"topLeft",onDropdownVisibleChange:P=>{P||y()},class:re(e.rootClassName,r.value,c,u,{[`${r.value}-block`]:e.block}),onChange:S,dropdownMatchSelectWidth:e.block},{default:()=>i.createVNode("div",{class:re(r.value,l.value.className,e.rootClassName,e.className,`${r.value}-wrapper`,c.value,u),style:{...l.value.style,...e.style}},[w.value])}))}}),D0=Symbol("SenderHeaderContext"),wc=i.shallowRef(),W8=e=>{i.provide(D0,e),i.watch(e,()=>{wc.value=i.unref(e),i.triggerRef(wc)},{immediate:!0,deep:!0})},k8=()=>i.inject(D0,i.computed(()=>wc.value||{})),K8=i.defineComponent({props:{value:St()},setup(e,{slots:t}){return W8(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),B0=Symbol("ActionButtonContext"),$c=i.shallowRef(),U8=e=>{i.provide(B0,e),i.watch(e,()=>{$c.value=i.unref(e),i.triggerRef($c)},{immediate:!0,deep:!0})},xc=()=>i.inject(B0,i.computed(()=>$c.value||{})),X8=i.defineComponent({props:{value:St()},setup(e,{slots:t}){return U8(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),Ui=i.defineComponent({name:"AXSenderActionButton",__name:"index",props:i.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null,action:null},{type:"text",disabled:void 0}),setup(e){const t=He(e,["action","type","disabled","onClick"]);i.toRef(e,"onClick"),i.toRef(e,"disabled");const n=i.useSlots(),o=xc(),r=i.computed(()=>{var u;const s=o.value.disabled,c=(u=o.value)==null?void 0:u[`${e.action}Disabled`];return s??e.disabled??c}),a=i.computed(()=>o.value.prefixCls),l=i.computed(()=>{var s;return(s=o.value)==null?void 0:s[e.action]});return()=>i.createVNode(We,i.mergeProps({type:e.type},t,{onClick:s=>{r.value||(l.value&&l.value(),e.onClick&&!Array.isArray(e.onClick)&&e.onClick(s))},class:re(a.value,{[`${a.value}-disabled`]:r.value})}),{icon:()=>n.default()})}}),G8=i.defineComponent({name:"AXSenderClearButton",__name:"ClearButton",props:i.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null},{disabled:void 0}),setup(e){const t=He(e,["disabled"]);return()=>i.createVNode(Ui,i.mergeProps({disabled:e.disabled},t,{action:"onClear"}),{default:()=>[i.createVNode(qs,null,null)]})}}),q8=i.defineComponent({name:"AXSenderStopLoading",__name:"StopLoading",props:{className:null},setup(e){const t=e;return()=>i.createVNode("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",class:t.className},[i.createVNode("title",null,[i.createTextVNode("Stop Loading")]),i.createVNode("rect",{fill:"currentColor",height:"250",rx:"24",ry:"24",width:"250",x:"375",y:"375"},null),i.createVNode("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor","stroke-width":"100",opacity:"0.45"},null),i.createVNode("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor","stroke-width":"100","stroke-dasharray":"600 9999999"},[i.createVNode("animateTransform",{attributeName:"transform",dur:"1s",from:"0 500 500",repeatCount:"indefinite",to:"360 500 500",type:"rotate"},null)])])}}),L0=i.defineComponent({name:"AXSenderLoadingButton",__name:"LoadingButton",props:i.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null},{type:"primary",shape:"circle",icon:null,disabled:void 0}),setup(e){const t=He(e,["type","shape","icon","disabled"]),n=xc(),{token:o}=cr.useToken();return()=>i.createVNode(Ui,i.mergeProps({type:e.type,disabled:e.disabled,shape:e.shape},t,{style:{backgroundColor:"transparent",color:o.value.colorPrimary},class:re(`${n.value.prefixCls}-loading-button`),action:"onCancel"}),{default:()=>[i.createVNode(q8,{className:`${n.value.prefixCls}-loading-icon`},null)]})}}),z0=i.defineComponent({name:"AXSenderLoadingButton",__name:"SendButton",props:i.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null},{type:"primary",shape:"circle",disabled:void 0}),setup(e){const t=He(e,["type","shape","disabled"]);return()=>i.createVNode(Ui,i.mergeProps({type:e.type,shape:e.shape,disabled:e.disabled},t,{action:"onSend"}),{default:()=>[i.createVNode(Us,null,null)]})}}),pr=1e3,mr=4,Xi=140,Gi=250,F0=500,qi=.8,Y8=i.defineComponent({name:"AXSenderRecordingIcon",__name:"RecordingIcon",props:{className:null},setup(e){const t=Xi/2;return()=>i.createVNode("svg",{color:"currentColor",viewBox:`0 0 ${pr} ${pr}`,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",class:e.className},[i.createVNode("title",null,[i.createTextVNode("Speech Recording")]),Array.from({length:mr}).map((n,o)=>{const r=(pr-Xi*mr)/(mr-1),a=o*(r+Xi),l=pr/2-Gi/2,s=pr/2-F0/2;return i.createVNode("rect",{fill:"currentColor",rx:t,ry:t,height:Gi,width:Xi,x:a,y:l,key:o},[i.createVNode("animate",{attributeName:"height",values:`${Gi}; ${F0}; ${Gi}`,keyTimes:"0; 0.5; 1",dur:`${qi}s`,begin:`${qi/mr*o}s`,repeatCount:"indefinite"},null),i.createVNode("animate",{attributeName:"y",values:`${l}; ${s}; ${l}`,keyTimes:"0; 0.5; 1",dur:`${qi}s`,begin:`${qi/mr*o}s`,repeatCount:"indefinite"},null)])})])}}),H0=i.defineComponent({name:"AXSenderSpeechButton",__name:"index",props:i.mergeDefaults({prefixCls:null,type:null,htmlType:null,shape:null,size:null,loading:null,disabled:null,ghost:null,block:null,danger:null,icon:null,href:null,target:null,title:null,onClick:null,onMousedown:null},{type:"text",disabled:void 0}),setup(e){const t=He(e,["type","disabled"]),n=xc(),{token:o}=cr.useToken(),r=i.computed(()=>n.value.speechRecording),a=i.computed(()=>n.value.prefixCls),l=i.computed(()=>{let s;return r.value?s=i.createVNode(Y8,{className:`${a.value}-recording-icon`},null):n.value.onSpeechDisabled?s=i.createVNode(Xs,null,null):s=i.createVNode(Gs,null,null),s});return()=>i.createVNode(Ui,i.mergeProps({type:e.type,disabled:e.disabled},t,{style:{display:"flex",justifyContent:"center",alignItems:"center",color:o.value.colorPrimary},action:"onSpeech"}),{default:()=>[l.value]})}}),gr=i.defineComponent({name:"AXTransitionCollapse",__name:"TransitionCollapse",props:{prefixCls:{default:"ax"}},setup(e){const t=e,n=i.useSlots(),o=i.computed(()=>t.prefixCls+"-transition-collapse"),r={beforeEnter(a){a.dataset||(a.dataset={}),a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.style.maxHeight="0",a.style.paddingTop="0",a.style.paddingBottom="0"},enter(a){a.dataset.oldOverflow=a.style.overflow,a.scrollHeight!==0?(a.style.maxHeight=`${a.scrollHeight}px`,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom):(a.style.maxHeight=`${a.dataset.oldMaxHeight||"999"}px`,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom),a.style.overflow="hidden"},afterEnter(a){a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow},beforeLeave(a){a.dataset||(a.dataset={}),a.dataset.oldMaxHeight=a.scrollHeight,a.dataset.oldPaddingTop=a.style.paddingTop,a.dataset.oldPaddingBottom=a.style.paddingBottom,a.dataset.oldOverflow=a.style.overflow,a.style.overflow="hidden",a.style.maxHeight=`${a.scrollHeight}px`},leave(a){a.scrollHeight!==0&&(a.style.maxHeight="0",a.style.paddingTop="0",a.style.paddingBottom="0")},afterLeave(a){a.style.maxHeight="",a.style.overflow=a.dataset.oldOverflow,a.style.paddingTop=a.dataset.oldPaddingTop,a.style.paddingBottom=a.dataset.oldPaddingBottom}};return()=>i.createVNode(i.Transition,{name:o.value,onBeforeEnter:r.beforeEnter,onEnter:r.enter,onAfterEnter:r.afterEnter,onBeforeLeave:r.beforeLeave,onLeave:r.leave,onAfterLeave:r.afterLeave},{default:()=>{var a;return[(a=n.default)==null?void 0:a.call(n)]}})}}),j0=e=>{const{componentCls:t}=e,n=`${t}-transition-collapse`;return{[t]:{[n]:{"&-enter-active":{transition:["max-height","padding-top","padding-bottom"].map(o=>`${o} ${e.motionDurationSlow} ${e.motionEaseInOut}`).join(",")},"&-leave-active":{transition:["max-height","padding-top","padding-bottom"].map(o=>`${o} ${e.motionDurationSlow} ${e.motionEaseInOut}`).join(",")}}}}};gr.install=function(e){return e.component(gr.name,gr),e};const Z8=e=>{const{componentCls:t,calc:n}=e,o=`${t}-header`;return{[t]:{[o]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorder,"&-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",[`${o}-title`]:{flex:"auto"}},"&-content":{padding:e.padding},"&-motion":{transition:["height","border"].map(r=>`${r} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}}}}}},Q8=e=>{const{componentCls:t,padding:n,paddingSM:o,paddingXS:r,lineWidth:a,lineWidthBold:l,calc:s}=e;return{[t]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,transition:`background ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:s(e.borderRadius).mul(2).equal()},borderColor:e.colorBorder,borderWidth:0,borderStyle:"solid","&:after":{content:'""',position:"absolute",inset:0,pointerEvents:"none",transition:`border-color ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:"inherit"},borderStyle:"inherit",borderColor:"inherit",borderWidth:a},"&:focus-within":{boxShadow:`${e.boxShadowSecondary}`,borderColor:e.colorPrimary,"&:after":{borderWidth:l}},"&-disabled":{background:e.colorBgContainerDisabled},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{display:"flex",gap:r,width:"100%",paddingBlock:o,paddingInlineStart:n,paddingInlineEnd:o,boxSizing:"border-box",alignItems:"flex-end"},[`${t}-prefix`]:{flex:"none"},[`${t}-input`]:{padding:0,borderRadius:0,flex:"auto",alignSelf:"center",minHeight:"auto"},[`${t}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${t}-actions-btn`]:{"&-disabled":{opacity:.45},"&-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"}}}}},J8=Gt("Sender",e=>{const{paddingXS:t,calc:n}=e,o=Ct(e,{SenderContentMaxWidth:`calc(100% - ${ft(n(t).add(32).equal())})`});return[Q8(o),Z8(o),j0(o)]},()=>({}));let Yi;!Yi&&typeof window<"u"&&(Yi=window.SpeechRecognition||window.webkitSpeechRecognition);function eR(e,t){const n=e,o=i.computed(()=>{const g=i.toValue(t);return typeof g=="object"?{controlledRecording:g.recording,onControlledRecordingChange:g.onRecordingChange,speechInControlled:typeof g.recording=="boolean"}:{controlledRecording:void 0,onControlledRecordingChange:void 0,speechInControlled:!1}}),r=i.computed(()=>o.value.controlledRecording),a=o.value.onControlledRecordingChange,l=o.value.speechInControlled,s=i.ref(null);i.watchEffect(()=>{if(typeof navigator<"u"&&"permissions"in navigator){let g=null;navigator.permissions.query({name:"microphone"}).then(y=>{s.value=y.state,y.onchange=function(){s.value=this.state},g=y}),i.onWatcherCleanup(()=>{g&&(g.onchange=null)})}});const c=i.computed(()=>Yi&&s.value!=="denied"),u=i.ref(null),[d,f]=M0(!1,{value:r}),p=i.ref(!1),m=()=>{if(c.value&&!u.value){const g=new Yi;g.onstart=()=>{f(!0)},g.onend=()=>{f(!1)},g.onresult=y=>{var C,S,$;if(!p.value){const x=($=(S=(C=y.results)==null?void 0:C[0])==null?void 0:S[0])==null?void 0:$.transcript;n(x)}p.value=!1},u.value=g}};return{speechPermission:c,triggerSpeech:g=>{g&&!d.value||(p.value=g,l?a==null||a(!d.value):(m(),u.value&&(d.value?(u.value.stop(),a==null||a(!1)):(u.value.start(),a==null||a(!0)))))},recording:d}}function tR(e,t){for(var n=e,o=0;o<t.length;o+=1){if(n==null)return;n=n[t[o]]}return n}const nR=i.defineComponent({name:"AXSender",__name:"Sender",props:{onKeyPress:{},prefixCls:{},defaultValue:{},value:{},loading:{type:Boolean},placeholder:{},readOnly:{type:Boolean},submitType:{type:[String,Boolean],default:"enter"},disabled:{type:Boolean,default:void 0},onSubmit:{},onChange:{},onCancel:{},onKeyDown:{},onPaste:{},onPasteFile:{},components:{},styles:{default:()=>({})},rootClassName:{},classNames:{default:()=>({})},style:{},className:{},actions:{},allowSpeech:{},prefix:{},header:{}},emits:["update:value"],setup(e,{expose:t,emit:n}){const o=He(e,["prefixCls","styles","classNames","className","rootClassName","style","defaultValue","value","placeholder","readOnly","submitType","onSubmit","loading","components","onCancel","onChange","actions","onKeyPress","onKeyDown","disabled","allowSpeech","prefix","header","onPaste","onPasteFile"]);i.toRef(e,"prefixCls");function r(X,J,te){return tR(X,J)||te}const a=n,l=i.useSlots(),{direction:s,getPrefixCls:c}=Ke(),u=i.computed(()=>c("sender",e.prefixCls)),d=i.ref(null),f=i.ref(null),p=Ut("sender"),m=i.computed(()=>`${u.value}-input`),[v,g,y]=J8(u.value),C=i.computed(()=>re(u.value,p.value.className,e.className,e.rootClassName,g.value,y,{[`${u.value}-rtl`]:s.value==="rtl",[`${u.value}-disabled`]:e.disabled})),S=i.computed(()=>`${u.value}-actions-btn`),$=i.computed(()=>`${u.value}-actions-list`),x=i.ref(e.value??e.defaultValue??""),w=X=>{x.value=X};i.watch(()=>e.value,()=>{w(e.value)});const P=(X,J)=>{w(X),a("update:value",X),e.onChange&&e.onChange(X,J)},{speechPermission:b,triggerSpeech:I,recording:E}=eR(X=>{P(`${x.value} ${X}`)},()=>e.allowSpeech),A=r(e.components,["input"],Ee.TextArea),R=i.computed(()=>uo(o,{attr:!0,aria:!0,data:!0})),B=i.computed(()=>({...R.value,ref:f})),M=()=>{x.value&&e.onSubmit&&!e.loading&&e.onSubmit(x.value)},z=()=>{P("")},O=i.ref(!1),T=()=>{O.value=!0},D=()=>{O.value=!1},L=X=>{const J=X.key==="Enter"&&!O.value;switch(e.submitType){case"enter":J&&!X.shiftKey&&(X.preventDefault(),M());break;case"shiftEnter":J&&X.shiftKey&&(X.preventDefault(),M());break}e.onKeyPress&&e.onKeyPress(X)},N=X=>{var te,U;const J=(te=X.clipboardData)==null?void 0:te.files[0];J&&e.onPasteFile&&(e.onPasteFile(J),X.preventDefault()),(U=e.onPaste)==null||U.call(e,X)},H=X=>{var J,te;X.target!==((J=d.value)==null?void 0:J.querySelector(`.${m.value}`))&&X.preventDefault(),(te=f.value)==null||te.focus()},_=i.computed(()=>{let X=i.createVNode(sr,{class:`${$.value}-presets`},{default:()=>[e.allowSpeech&&i.createVNode(H0,null,null),e.loading?i.createVNode(L0,null,null):i.createVNode(z0,null,null)]});const J={components:{SendButton:z0,ClearButton:G8,LoadingButton:L0,SpeechButton:H0}};return l.actions?X=l.actions({ori:X,info:J}):typeof e.actions=="function"?X=e.actions(X,J):e.actions&&(X=e.actions),X}),Y=i.computed(()=>l.header?l.header():e.header),Z=i.computed(()=>l.prefix?l.prefix():e.prefix);return t({nativeElement:d.value,focus:X=>{var J;return(J=f.value)==null?void 0:J.focus(X)},blur:()=>{var X;return(X=f.value)==null?void 0:X.blur()}}),()=>v(i.createVNode("div",{ref:d,class:C.value,style:{...p.value.style,...e.style}},[Y.value&&i.createVNode(K8,{value:{prefixCls:u.value}},{default:()=>[Y.value]}),i.createVNode("div",{class:`${u.value}-content`,onMousedown:H},[Z.value&&i.createVNode("div",{class:re(`${u.value}-prefix`,p.value.classNames.prefix,e.classNames.prefix),style:{...p.value.styles.prefix,...e.styles.prefix}},[Z.value]),i.createVNode(A,i.mergeProps(B.value,{disabled:e.disabled,style:{...p.value.styles.input,...e.styles.input},class:re(m.value,p.value.classNames.input,e.classNames.input),autoSize:{maxRows:8},value:x.value,onChange:X=>{P(X.target.value,X),I(!0)},onPressEnter:L,onCompositionstart:T,onCompositionend:D,onKeydown:e.onKeyDown,placeholder:e.placeholder,onPaste:N,bordered:!1,readOnly:e.readOnly}),null),i.createVNode("div",{class:re($.value,p.value.classNames.actions,e.classNames.actions),style:{...p.value.styles.actions,...e.styles.actions}},[i.createVNode(X8,{value:{prefixCls:S.value,onSend:M,onSendDisabled:!x.value,onClear:z,onClearDisabled:!x.value,onCancel:e.onCancel,onCancelDisabled:!e.loading,onSpeech:()=>I(!1),onSpeechDisabled:!b.value,speechRecording:E.value,disabled:e.disabled}},{default:()=>[_.value]})])])]))}}),oR=i.defineComponent({name:"AXSenderHeader",inheritAttrs:!1,__name:"SenderHeader",props:i.mergeDefaults({forceRender:{type:Boolean},open:{type:Boolean},onOpenChange:{type:Function},title:null,children:null,className:null,style:null,classNames:null,styles:null,closable:{type:Boolean}},{classNames:()=>({}),styles:()=>({})}),setup(e){i.toRef(e,"classNames");const t=i.useSlots(),n=k8(),o=i.computed(()=>`${n.value.prefixCls}-header`),r=i.useAttrs();return()=>i.createVNode(gr,{prefixCls:n.value.prefixCls},{default:()=>{var a;return[e.open||e.forceRender?i.withDirectives(i.createVNode("div",i.mergeProps(r,{class:re(o.value,e.className),style:{...e.style}}),[(e.closable!==!1||e.title)&&i.createVNode("div",{class:re(`${o.value}-header`,e.classNames.header),style:{...e.styles.header}},[i.createVNode("div",{class:`${o.value}-title`},[e.title]),e.closable!==!1&&i.createVNode("div",{class:`${o.value}-close`},[i.createVNode(We,{type:"text",icon:i.createVNode(Ft,null,null),size:"small",onClick:()=>{var l;(l=e.onOpenChange)==null||l.call(e,!e.open)}},null)])]),t.default&&i.createVNode("div",{class:re(`${o.value}-content`,e.classNames.content),style:{...e.styles.content}},[(a=t.default)==null?void 0:a.call(t)])]),[[i.vShow,e.open]]):null]}})}}),rR=Object.assign(nR,{Header:oR}),_0=Symbol("AttachmentContext"),Oc=i.shallowRef(),iR=e=>{i.provide(_0,e),i.watch(e,()=>{Oc.value=i.unref(e),i.triggerRef(Oc)},{immediate:!0,deep:!0})},Zi=()=>i.inject(_0,i.computed(()=>Oc.value||{})),aR=i.defineComponent({inheritAttrs:!1,props:{value:St()},setup(e,{slots:t}){return iR(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),lR=i.defineComponent({name:"AXAttachmentsPlaceholderUploader",__name:"PlaceholderUploader",props:i.mergeDefaults({prefixCls:null,placeholder:null,upload:null,className:null,style:null},{placeholder:()=>({})}),setup(e,{expose:t}){const n=`${e.prefixCls}-placeholder`,o=i.computed(()=>e.placeholder||{}),r=i.useTemplateRef("upload-dragger"),a=Zi(),[l,s]=Ie(!1),c=()=>{s(!0)},u=m=>{m.currentTarget.contains(m.relatedTarget)||s(!1)},d=()=>{s(!1)};t({nativeElement:r});const f=m=>Array.isArray(m)&&m.every(i.isVNode),p=i.computed(()=>i.isVNode(e.placeholder)||f(e.placeholder)?e.placeholder:i.createVNode(sr,{align:"center",justify:"center",vertical:!0,class:`${n}-inner`},{default:()=>[i.createVNode($e.Text,{class:`${n}-icon`},{default:()=>[o.value.icon]}),i.createVNode($e.Title,{class:`${n}-title`,level:5},{default:()=>[o.value.title]}),i.createVNode($e.Text,{class:`${n}-description`,type:"secondary"},{default:()=>[o.value.description]})]}));return()=>i.createVNode("div",{class:re(n,{[`${n}-drag-in`]:l.value,[`${n}-disabled`]:a.value.disabled},e.className),onDragenter:c,onDragleave:u,onDrop:d,"aria-hidden":a.value.disabled,style:e.style},[i.createVNode($h.Dragger,i.mergeProps({showUploadList:!1},e.upload,{ref:"upload-dragger",style:{padding:0,border:0,background:"transparent"}}),{default:()=>[p.value]})])}}),W0=i.defineComponent({name:"AXAttachmentsDropArea",__name:"DropArea",props:{prefixCls:null,className:null,getDropContainer:{type:Function},children:null},setup(e){const t=Zi(),[n,o]=Ie(),[r,a]=Ie(null);i.onMounted(()=>{var c;o((c=e.getDropContainer)==null?void 0:c.call(e))}),i.watch(()=>i.toValue(e.getDropContainer),()=>{var u;const c=(u=e.getDropContainer)==null?void 0:u.call(e);n.value!==c&&o(c)}),i.watch(()=>!!n.value,()=>{if(n.value){const c=()=>{a(!0)},u=p=>{p.preventDefault()},d=p=>{p.relatedTarget||a(!1)},f=p=>{a(!1),p.preventDefault()};document.addEventListener("dragenter",c),document.addEventListener("dragover",u),document.addEventListener("dragleave",d),document.addEventListener("drop",f),i.onWatcherCleanup(()=>{document.removeEventListener("dragenter",c),document.removeEventListener("dragover",u),document.removeEventListener("dragleave",d),document.removeEventListener("drop",f)})}});const l=i.computed(()=>e.getDropContainer&&n.value&&!t.value.disabled),s=`${e.prefixCls}-drop-area`;return()=>l.value?i.createVNode(i.Teleport,{to:n.value},{default:()=>[i.createVNode("div",{class:re(s,e.className,{[`${s}-on-body`]:n.value.tagName==="BODY"}),style:{display:r.value?"block":"none"}},[e.children])]}):null}}),k0=i.defineComponent({name:"AXAttachmentsSilentUploader",__name:"SilentUploader",props:{children:null,upload:null,rootClassName:null},setup(e,{expose:t}){const n=i.useTemplateRef("upload");return t({nativeElement:n}),()=>i.createVNode($h,i.mergeProps(e.upload,{showUploadList:!1,ref:"upload"}),{default:()=>[e.children]})}}),K0=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},sR={},cR={width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function uR(e,t){return i.openBlock(),i.createElementBlock("svg",cR,t[0]||(t[0]=[i.createElementVNode("title",null,"audio",-1),i.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[i.createElementVNode("path",{d:"M14.1178571,4.0125 C14.225,4.11964286 14.2857143,4.26428571 14.2857143,4.41607143 L14.2857143,15.4285714 C14.2857143,15.7446429 14.0303571,16 13.7142857,16 L2.28571429,16 C1.96964286,16 1.71428571,15.7446429 1.71428571,15.4285714 L1.71428571,0.571428571 C1.71428571,0.255357143 1.96964286,0 2.28571429,0 L9.86964286,0 C10.0214286,0 10.1678571,0.0607142857 10.275,0.167857143 L14.1178571,4.0125 Z M10.7315824,7.11216117 C10.7428131,7.15148751 10.7485063,7.19218979 10.7485063,7.23309113 L10.7485063,8.07742614 C10.7484199,8.27364959 10.6183424,8.44607275 10.4296853,8.50003683 L8.32984514,9.09986306 L8.32984514,11.7071803 C8.32986605,12.5367078 7.67249692,13.217028 6.84345686,13.2454634 L6.79068592,13.2463395 C6.12766108,13.2463395 5.53916361,12.8217001 5.33010655,12.1924966 C5.1210495,11.563293 5.33842118,10.8709227 5.86959669,10.4741173 C6.40077221,10.0773119 7.12636292,10.0652587 7.67042486,10.4442027 L7.67020842,7.74937024 L7.68449368,7.74937024 C7.72405122,7.59919041 7.83988806,7.48101083 7.98924584,7.4384546 L10.1880418,6.81004755 C10.42156,6.74340323 10.6648954,6.87865515 10.7315824,7.11216117 Z M9.60714286,1.31785714 L12.9678571,4.67857143 L9.60714286,4.67857143 L9.60714286,1.31785714 Z",fill:"currentColor"})],-1)]))}const dR=K0(sR,[["render",uR]]),fR={},pR={width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function mR(e,t){return i.openBlock(),i.createElementBlock("svg",pR,t[0]||(t[0]=[i.createElementVNode("title",null,"video",-1),i.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[i.createElementVNode("path",{d:"M14.1178571,4.0125 C14.225,4.11964286 14.2857143,4.26428571 14.2857143,4.41607143 L14.2857143,15.4285714 C14.2857143,15.7446429 14.0303571,16 13.7142857,16 L2.28571429,16 C1.96964286,16 1.71428571,15.7446429 1.71428571,15.4285714 L1.71428571,0.571428571 C1.71428571,0.255357143 1.96964286,0 2.28571429,0 L9.86964286,0 C10.0214286,0 10.1678571,0.0607142857 10.275,0.167857143 L14.1178571,4.0125 Z M12.9678571,4.67857143 L9.60714286,1.31785714 L9.60714286,4.67857143 L12.9678571,4.67857143 Z M10.5379461,10.3101106 L6.68957555,13.0059749 C6.59910784,13.0693494 6.47439406,13.0473861 6.41101953,12.9569184 C6.3874624,12.9232903 6.37482581,12.8832269 6.37482581,12.8421686 L6.37482581,7.45043999 C6.37482581,7.33998304 6.46436886,7.25043999 6.57482581,7.25043999 C6.61588409,7.25043999 6.65594753,7.26307658 6.68957555,7.28663371 L10.5379461,9.98249803 C10.6284138,10.0458726 10.6503772,10.1705863 10.5870027,10.2610541 C10.5736331,10.2801392 10.5570312,10.2967411 10.5379461,10.3101106 Z",fill:"currentColor"})],-1)]))}const gR=K0(fR,[["render",mR]]),hR=e=>e.indexOf("image/")===0,Qi=200;function vR(e){return new Promise(t=>{if(!e||!e.type||!hR(e.type)){t("");return}const n=new Image;if(n.onload=()=>{const{width:o,height:r}=n,a=o/r,l=a>1?Qi:Qi*a,s=a>1?Qi/a:Qi,c=document.createElement("canvas");c.width=l,c.height=s,c.style.cssText=`position: fixed; left: 0; top: 0; width: ${l}px; height: ${s}px; z-index: 9999; display: none;`,document.body.appendChild(c),c.getContext("2d").drawImage(n,0,0,l,s);const d=c.toDataURL();document.body.removeChild(c),window.URL.revokeObjectURL(n.src),t(d)},n.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const o=new FileReader;o.onload=()=>{o.result&&typeof o.result=="string"&&(n.src=o.result)},o.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const o=new FileReader;o.onload=()=>{o.result&&t(o.result)},o.readAsDataURL(e)}else n.src=window.URL.createObjectURL(e)})}const Re=Math.round;function Pc(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],o=n.map(r=>parseFloat(r));for(let r=0;r<3;r+=1)o[r]=t(o[r]||0,n[r]||"",r);return n[3]?o[3]=n[3].includes("%")?o[3]/100:o[3]:o[3]=1,o}const U0=(e,t,n)=>n===0?e:e/100;function hr(e,t){const n=t||255;return e>n?n:e<0?0:e}class Ic{constructor(t){Xe(this,"isValid",!0),Xe(this,"r",0),Xe(this,"g",0),Xe(this,"b",0),Xe(this,"a",1),Xe(this,"_h",void 0),Xe(this,"_s",void 0),Xe(this,"_l",void 0),Xe(this,"_v",void 0),Xe(this,"_max",void 0),Xe(this,"_min",void 0),Xe(this,"_brightness",void 0);function n(o){return o[0]in t&&o[1]in t&&o[2]in t}if(t)if(typeof t=="string"){let r=function(a){return o.startsWith(a)};const o=t.trim();/^#?[A-F\d]{3,8}$/i.test(o)?this.fromHexString(o):r("rgb")?this.fromRgbString(o):r("hsl")?this.fromHslString(o):(r("hsv")||r("hsb"))&&this.fromHsvString(o)}else if(t instanceof Ic)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=hr(t.r),this.g=hr(t.g),this.b=hr(t.b),this.a=typeof t.a=="number"?hr(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(a){const l=a/255;return l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4)}const n=t(this.r),o=t(this.g),r=t(this.b);return .2126*n+.7152*o+.0722*r}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Re(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(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._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(),o=this.getSaturation();let r=this.getLightness()-t/100;return r<0&&(r=0),this._c({h:n,s:o,l:r,a:this.a})}lighten(t=10){const n=this.getHue(),o=this.getSaturation();let r=this.getLightness()+t/100;return r>1&&(r=1),this._c({h:n,s:o,l:r,a:this.a})}mix(t,n=50){const o=this._c(t),r=n/100,a=s=>(o[s]-this[s])*r+this[s],l={r:Re(a("r")),g:Re(a("g")),b:Re(a("b")),a:Re(a("a")*100)/100};return this._c(l)}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),o=this.a+n.a*(1-this.a),r=a=>Re((this[a]*this.a+n[a]*n.a*(1-this.a))/o);return this._c({r:r("r"),g:r("g"),b:r("b"),a:o})}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 o=(this.g||0).toString(16);t+=o.length===2?o:"0"+o;const r=(this.b||0).toString(16);if(t+=r.length===2?r:"0"+r,typeof this.a=="number"&&this.a>=0&&this.a<1){const a=Re(this.a*255).toString(16);t+=a.length===2?a:"0"+a}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Re(this.getSaturation()*100),o=Re(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${o}%,${this.a})`:`hsl(${t},${n}%,${o}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),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,o){const r=this.clone();return r[t]=hr(n,o),r}_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 o(r,a){return parseInt(n[r]+n[a||r],16)}n.length<6?(this.r=o(0),this.g=o(1),this.b=o(2),this.a=n[3]?o(3)/255:1):(this.r=o(0,1),this.g=o(2,3),this.b=o(4,5),this.a=n[6]?o(6,7)/255:1)}fromHsl({h:t,s:n,l:o,a:r}){if(this._h=t%360,this._s=n,this._l=o,this.a=typeof r=="number"?r:1,n<=0){const p=Re(o*255);this.r=p,this.g=p,this.b=p}let a=0,l=0,s=0;const c=t/60,u=(1-Math.abs(2*o-1))*n,d=u*(1-Math.abs(c%2-1));c>=0&&c<1?(a=u,l=d):c>=1&&c<2?(a=d,l=u):c>=2&&c<3?(l=u,s=d):c>=3&&c<4?(l=d,s=u):c>=4&&c<5?(a=d,s=u):c>=5&&c<6&&(a=u,s=d);const f=o-u/2;this.r=Re((a+f)*255),this.g=Re((l+f)*255),this.b=Re((s+f)*255)}fromHsv({h:t,s:n,v:o,a:r}){this._h=t%360,this._s=n,this._v=o,this.a=typeof r=="number"?r:1;const a=Re(o*255);if(this.r=a,this.g=a,this.b=a,n<=0)return;const l=t/60,s=Math.floor(l),c=l-s,u=Re(o*(1-n)*255),d=Re(o*(1-n*c)*255),f=Re(o*(1-n*(1-c))*255);switch(s){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=Pc(t,U0);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=Pc(t,U0);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=Pc(t,(o,r)=>r.includes("%")?Re(o/100*255):o);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}const yR=e=>{const{componentCls:t,calc:n}=e,o=`${t}-list-card`,r=n(e.fontSize).mul(e.lineHeight).mul(2).add(e.paddingSM).add(e.paddingSM).equal();return{[o]:{borderRadius:e.borderRadius,position:"relative",background:e.colorFillContent,borderWidth:e.lineWidth,borderStyle:"solid",borderColor:"transparent",flex:"none",[`${o}-name,${o}-desc`]:{display:"flex",flexWrap:"nowrap",maxWidth:"100%"},[`${o}-ellipsis-prefix`]:{flex:"0 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},[`${o}-ellipsis-suffix`]:{flex:"none"},"&-type-overview":{padding:n(e.paddingSM).sub(e.lineWidth).equal(),paddingInlineStart:n(e.padding).add(e.lineWidth).equal(),display:"flex",flexWrap:"nowrap",gap:e.paddingXS,alignItems:"flex-start",width:236,[`${o}-icon`]:{fontSize:n(e.fontSizeLG).mul(2).equal(),lineHeight:1,paddingTop:n(e.paddingXXS).mul(1.5).equal(),flex:"none"},[`${o}-content`]:{flex:"auto",minWidth:0,display:"flex",flexDirection:"column",alignItems:"stretch"},[`${o}-desc`]:{color:e.colorTextTertiary}},"&-type-preview":{width:r,height:r,lineHeight:1,[`&:not(${o}-status-error)`]:{border:0},img:{width:"100%",height:"100%",verticalAlign:"top",objectFit:"cover",borderRadius:"inherit"},[`${o}-img-mask`]:{position:"absolute",inset:0,display:"flex",justifyContent:"center",alignItems:"center",background:`rgba(0, 0, 0, ${e.opacityLoading})`,borderRadius:"inherit"},[`&${o}-status-error`]:{[`img, ${o}-img-mask`]:{borderRadius:n(e.borderRadius).sub(e.lineWidth).equal()},[`${o}-desc`]:{paddingInline:e.paddingXXS}},[`${o}-progress`]:{}},[`${o}-remove`]:{position:"absolute",top:0,insetInlineEnd:0,border:0,padding:e.paddingXXS,background:"transparent",lineHeight:1,transform:"translate(50%, -50%)",fontSize:e.fontSize,cursor:"pointer",opacity:e.opacityLoading,display:"none","&:dir(rtl)":{transform:"translate(-50%, -50%)"},"&:hover":{opacity:1},"&:active":{opacity:e.opacityLoading}},[`&:hover ${o}-remove`]:{display:"block"},"&-status-error":{borderColor:e.colorError,[`${o}-desc`]:{color:e.colorError}},"&-motion":{overflow:"hidden",transition:["opacity","width","margin","padding"].map(a=>`${a} ${e.motionDurationSlow}`).join(","),[`${o}-remove`]:{display:"none !important"},"&-appear-start":{width:0,transition:"none"},"&-leave-active":{opacity:0,width:0,paddingInline:0,borderInlineWidth:0,marginInlineEnd:n(e.paddingSM).mul(-1).equal()}}}}},Tc={"&, *":{boxSizing:"border-box"}},bR=e=>{const{componentCls:t,calc:n,antCls:o}=e,r=`${t}-drop-area`,a=`${t}-placeholder`;return{[r]:{position:"absolute",inset:0,zIndex:e.zIndexPopupBase,...Tc,"&-on-body":{position:"fixed",inset:0},"&-hide-placement":{[`${a}-inner`]:{display:"none"}},[a]:{padding:0}},"&":{[a]:{height:"100%",borderRadius:e.borderRadius,borderWidth:e.lineWidthBold,borderStyle:"dashed",borderColor:"transparent",padding:e.padding,position:"relative",backdropFilter:"blur(10px)",...Tc,[`${o}-upload-wrapper ${o}-upload${o}-upload-btn`]:{padding:0},[`&${a}-drag-in`]:{borderColor:e.colorPrimaryHover},[`&${a}-disabled`]:{opacity:.25,pointerEvents:"none"},[`${a}-inner`]:{gap:n(e.paddingXXS).div(2).equal()},[`${a}-icon`]:{fontSize:e.fontSizeHeading2,lineHeight:1},[`${a}-title${a}-title`]:{margin:0,fontSize:e.fontSize,lineHeight:e.lineHeight},[`${a}-description`]:{}}}}},CR=e=>{const{componentCls:t,calc:n}=e,o=`${t}-list`,r=n(e.fontSize).mul(e.lineHeight).mul(2).add(e.paddingSM).add(e.paddingSM).equal();return{[t]:{position:"relative",width:"100%",...Tc,[o]:{display:"flex",flexWrap:"wrap",gap:e.paddingSM,fontSize:e.fontSize,lineHeight:e.lineHeight,color:e.colorText,paddingBlock:e.paddingSM,paddingInline:e.padding,width:"100%",background:e.colorBgContainer,scrollbarWidth:"none","-ms-overflow-style":"none","&::-webkit-scrollbar":{display:"none"},"&-overflow-scrollX, &-overflow-scrollY":{"&:before, &:after":{content:'""',position:"absolute",opacity:0,transition:`opacity ${e.motionDurationSlow}`,zIndex:1}},"&-overflow-ping-start:before":{opacity:1},"&-overflow-ping-end:after":{opacity:1},"&-overflow-scrollX":{overflowX:"auto",overflowY:"hidden",flexWrap:"nowrap","&:before, &:after":{insetBlock:0,width:8},"&:before":{insetInlineStart:0,background:"linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{insetInlineEnd:0,background:"linear-gradient(to left, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:dir(rtl)":{"&:before":{background:"linear-gradient(to left, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{background:"linear-gradient(to right, rgba(0,0,0,0.06), rgba(0,0,0,0));"}}},"&-overflow-scrollY":{overflowX:"hidden",overflowY:"auto",maxHeight:n(r).mul(3).equal(),"&:before, &:after":{insetInline:0,height:8},"&:before":{insetBlockStart:0,background:"linear-gradient(to bottom, rgba(0,0,0,0.06), rgba(0,0,0,0));"},"&:after":{insetBlockEnd:0,background:"linear-gradient(to top, rgba(0,0,0,0.06), rgba(0,0,0,0));"}},"&-upload-btn":{width:r,height:r,fontSize:e.fontSizeHeading2,color:"#999"},"&-prev-btn, &-next-btn":{position:"absolute",top:"50%",transform:"translateY(-50%)",boxShadow:e.boxShadowTertiary,opacity:0,pointerEvents:"none"},"&-prev-btn":{left:{_skip_check_:!0,value:e.padding}},"&-next-btn":{right:{_skip_check_:!0,value:e.padding}},"&:dir(ltr)":{[`&${o}-overflow-ping-start ${o}-prev-btn`]:{opacity:1,pointerEvents:"auto"},[`&${o}-overflow-ping-end ${o}-next-btn`]:{opacity:1,pointerEvents:"auto"}},"&:dir(rtl)":{[`&${o}-overflow-ping-end ${o}-prev-btn`]:{opacity:1,pointerEvents:"auto"},[`&${o}-overflow-ping-start ${o}-next-btn`]:{opacity:1,pointerEvents:"auto"}}}}}},X0=Gt("Attachments",e=>{const t=Ct(e,{});return[bR(t),CR(t),yR(t)]},e=>{const{colorBgContainer:t}=e;return{colorBgPlaceholderHover:new Ic(t).setA(.85).toRgbString()}}),Nc=" ",Ec="#8c8c8c",G0=i.defineComponent({name:"AXAttachmentsFileListCard",__name:"FileListCard",props:{prefixCls:null,item:null,onRemove:{type:Function},className:null,style:null},setup(e,{expose:t}){i.toRef(e,"prefixCls");const n=["png","jpg","jpeg","gif","bmp","webp","svg"],o=[{icon:i.createVNode(Ys,null,null),color:"#22b35e",ext:["xlsx","xls"]},{icon:i.createVNode(Zs,null,null),color:Ec,ext:n},{icon:i.createVNode(Qs,null,null),color:Ec,ext:["md","mdx"]},{icon:i.createVNode(Js,null,null),color:"#ff4d4f",ext:["pdf"]},{icon:i.createVNode(ec,null,null),color:"#ff6e31",ext:["ppt","pptx"]},{icon:i.createVNode(nc,null,null),color:"#1677ff",ext:["doc","docx"]},{icon:i.createVNode(oc,null,null),color:"#fab714",ext:["zip","rar","7z","tar","gz"]},{icon:i.createVNode(gR,null,null),color:"#ff4d4f",ext:["mp4","avi","mov","wmv","flv","mkv"]},{icon:i.createVNode(dR,null,null),color:"#8c8c8c",ext:["mp3","wav","flac","ape","aac","ogg"]}];function r(M,z){return z.some(O=>M.toLowerCase()===`.${O}`)}function a(M){let z=M;const O=["B","KB","MB","GB","TB","PB","EB"];let T=0;for(;z>=1024&&T<O.length-1;)z/=1024,T++;return`${z.toFixed(0)} ${O[T]}`}const l=Zi(),s=i.computed(()=>l.value.disabled),c=i.computed(()=>e.item.name),u=i.computed(()=>e.item.size),d=i.computed(()=>e.item.percent),f=i.computed(()=>e.item.status||"done"),p=i.computed(()=>e.item.description),{getPrefixCls:m}=Ke(),v=i.computed(()=>m("attachment",e.prefixCls)),g=`${v.value}-list-card`,[y,C,S]=X0(v),$=i.useTemplateRef("file-list-card-container"),x=i.computed(()=>{const M=c.value||"",z=M.match(/^(.*)\.[^.]+$/);return{namePrefix:z?z[1]:M,nameSuffix:z?M.slice(z[1].length):""}}),w=i.computed(()=>r(x.value.nameSuffix,n)),P=i.computed(()=>p.value?p.value:f.value==="uploading"?`${d.value||0}%`:f.value==="error"?e.item.response||Nc:u.value?a(u.value):Nc),b=i.computed(()=>{for(const{ext:M,icon:z,color:O}of o)if(r(x.value.nameSuffix,M))return{icon:z,iconColor:O};return{icon:i.createVNode(tc,{key:"defaultIcon"},null),iconColor:Ec}}),[I,E]=Ie();i.watch(()=>e.item.originFileObj,()=>{if(e.item.originFileObj){let M=!0;vR(e.item.originFileObj).then(z=>{M&&E(z)}),i.onWatcherCleanup(()=>{M=!1})}E(void 0)},{immediate:!0});const A=i.computed(()=>e.item.thumbUrl||e.item.url||I.value),R=i.computed(()=>w.value&&(e.item.originFileObj||A.value)),B=i.computed(()=>R.value?i.createVNode(i.Fragment,null,[A.value&&i.createVNode("img",{alt:"preview",src:A.value},null),f.value!=="done"&&i.createVNode("div",{class:`${g}-img-mask`},[f.value==="uploading"&&d.value!==void 0&&i.createVNode(nh,{percent:d.value,prefixCls:g},null),f.value==="error"&&i.createVNode("div",{class:`${g}-desc`},[i.createVNode("div",{class:`${g}-ellipsis-prefix`},[P.value])])])]):i.createVNode(i.Fragment,null,[i.createVNode("div",{class:`${g}-icon`,style:{color:b.value.iconColor}},[b.value.icon]),i.createVNode("div",{class:`${g}-content`},[i.createVNode("div",{class:`${g}-name`},[i.createVNode("div",{class:`${g}-ellipsis-prefix`},[x.value.namePrefix??Nc]),i.createVNode("div",{class:`${g}-ellipsis-suffix`},[x.value.nameSuffix])]),i.createVNode("div",{class:`${g}-desc`},[i.createVNode("div",{class:`${g}-ellipsis-prefix`},[P.value])])])]));return t({nativeElement:$}),()=>y(i.createVNode("div",{class:re(g,{[`${g}-status-${f.value}`]:f.value,[`${g}-type-preview`]:R.value,[`${g}-type-overview`]:!R.value},e.className,C.value,S),style:e.style,ref:"file-list-card-container"},[B.value,!s.value&&e.onRemove&&i.createVNode("button",{type:"button",class:`${g}-remove`,onClick:()=>{e.onRemove(e.item)}},[i.createVNode(dt,null,null)])]))}}),q0=1,SR=i.defineComponent({name:"AXAttachmentsFileList",__name:"FileList",props:{prefixCls:null,items:null,onRemove:{type:Function},overflow:null,upload:null,listClassName:null,listStyle:null,itemClassName:null,itemStyle:null},setup(e){const t=i.computed(()=>`${e.prefixCls}-list`),n=i.useTemplateRef("file-list-container"),[o,r]=Ie(!1),a=Zi();i.watchEffect(()=>{r(!0),i.onWatcherCleanup(()=>{r(!1)})});const[l,s]=Ie(!1),[c,u]=Ie(!1),d=()=>{const v=n.value;v&&(e.overflow==="scrollX"?(s(Math.abs(v.scrollLeft)>=q0),u(v.scrollWidth-v.clientWidth-Math.abs(v.scrollLeft)>=q0)):e.overflow==="scrollY"&&(s(v.scrollTop!==0),u(v.scrollHeight-v.clientHeight!==v.scrollTop)))};i.watch(()=>e.overflow,()=>{d()},{immediate:!0});const f=v=>{const g=n.value;g&&g.scrollTo({left:g.scrollLeft+v*g.clientWidth,behavior:"smooth"})},p=()=>{f(-1)},m=()=>{f(1)};return()=>i.createVNode("div",{class:re(t.value,{[`${t.value}-overflow-${e.overflow}`]:e.overflow,[`${t.value}-overflow-ping-start`]:l.value,[`${t.value}-overflow-ping-end`]:c.value},e.listClassName),ref:"file-list-container",onScroll:d,style:e.listStyle},[e.items.map(v=>i.createVNode(G0,{key:v.uid,prefixCls:e.prefixCls,item:v,onRemove:e.onRemove,className:re(e.itemClassName),style:{...e.itemStyle}},null)),!a.value.disabled&&i.createVNode(k0,{upload:e.upload,children:i.createVNode(We,{class:`${t.value}-upload-btn`,type:"dashed"},{default:()=>[i.createVNode(ms,{class:`${t.value}-upload-btn-icon`},null)]})},null),e.overflow==="scrollX"&&i.createVNode(i.Fragment,null,[i.createVNode(We,{size:"small",shape:"circle",class:`${t.value}-prev-btn`,icon:i.createVNode(Zo,null,null),onClick:p},null),i.createVNode(We,{size:"small",shape:"circle",class:`${t.value}-next-btn`,icon:i.createVNode(yn,null,null),onClick:m},null)])])}}),wR=i.defineComponent({name:"AXAttachments",__name:"Attachments",props:i.mergeDefaults({capture:null,type:null,name:null,defaultFileList:null,action:null,directory:null,data:null,method:null,headers:null,showUploadList:null,multiple:null,accept:null,beforeUpload:null,onChange:{type:Function},"onUpdate:fileList":null,onDrop:null,listType:null,onPreview:null,onDownload:null,onReject:null,onRemove:null,remove:null,supportServerRender:null,disabled:{type:Boolean},prefixCls:null,customRequest:null,withCredentials:null,openFileDialogOnClick:null,locale:null,id:null,previewFile:null,transformFile:null,iconRender:null,isImageUrl:null,progress:null,itemRender:null,maxCount:null,height:null,removeIcon:null,downloadIcon:null,previewIcon:null,rootClassName:null,rootStyle:null,style:null,className:null,classNames:null,styles:null,children:null,placeholder:{type:Function},getDropContainer:{type:Function},items:null,overflow:null},{items:()=>[],classNames:()=>({}),styles:()=>({})}),setup(e,{expose:t}){const n=He(e,["prefixCls","rootClassName","rootStyle","className","style","items","children","getDropContainer","placeholder","onChange","overflow","disabled","classNames","styles"]);i.toRef(e,"prefixCls");const o=i.useSlots(),{getPrefixCls:r,direction:a}=Ke(),l=r("attachment",e.prefixCls),s=Ut("attachments"),c=i.computed(()=>s.value.classNames),u=i.computed(()=>s.value.styles),d=i.useTemplateRef("attachments-container"),f=i.useTemplateRef("attachments-upload"),[p,m,v]=X0(l),g=i.computed(()=>re(m.value,v)),[y,C]=Ie(e.items);i.watch(()=>e.items,()=>{C(e.items)});const S=b=>{var I;C(b.fileList),(I=e.onChange)==null||I.call(e,b)},$=i.computed(()=>({...n,fileList:y.value,onChange:S})),x=b=>{const I=y.value.filter(E=>E.uid!==b.uid);S({file:b,fileList:I})},w=(b,I,E)=>{const A=o.placeholder?o.placeholder({type:b}):typeof e.placeholder=="function"?e.placeholder(b):e.placeholder;return i.createVNode(lR,{placeholder:A,upload:$.value,prefixCls:l,className:re(c.value.placeholder,e.classNames.placeholder),style:{...u.value.placeholder,...e.styles.placeholder,...I==null?void 0:I.style}},null)},P=i.computed(()=>y.value.length>0);return t({nativeElement:d.value,upload:b=>{var E,A;const I=(A=(E=f.value)==null?void 0:E.nativeElement)==null?void 0:A.querySelector('input[type="file"]');if(I){const R=new DataTransfer;R.items.add(b),I.files=R.files,I.dispatchEvent(new Event("change",{bubbles:!0}))}}}),()=>p(i.createVNode(aR,{value:{disabled:e.disabled}},{default:()=>[e.children?i.createVNode(i.Fragment,null,[i.createVNode(k0,{upload:$.value,rootClassName:e.rootClassName,ref:"attachments-upload",children:e.children},null),i.createVNode(W0,{getDropContainer:e.getDropContainer,prefixCls:l,className:re(g.value,e.rootClassName),children:w("drop")},null)]):i.createVNode("div",{class:re(l,g.value,{[`${l}-rtl`]:a.value==="rtl"},e.className,e.rootClassName),style:{...e.rootStyle,...e.style},dir:a.value||"ltr",ref:"attachments-container"},[i.createVNode(SR,{prefixCls:l,items:y.value,onRemove:x,overflow:e.overflow,upload:$.value,listClassName:re(c.value.list,e.classNames.list),listStyle:{...u.value.list,...e.styles.list,...!P.value&&{display:"none"}},itemClassName:re(c.value.item,e.classNames.item),itemStyle:{...u.value.item,...e.styles.item}},null),w("inline",P.value?{style:{display:"none"}}:{},f.value),i.createVNode(W0,{getDropContainer:e.getDropContainer||(()=>d.value),prefixCls:l,className:g.value,children:w("drop")},null)])]}))}}),$R=Object.assign(wR,{FileCard:G0}),xR=(e,t,n)=>{const o=i.computed(()=>{const s=i.toValue(e);let c={expandedKeys:[],onExpand:()=>{}};return s?(typeof s=="object"&&(c={...c,...s}),{enableCollapse:!0,customizeExpandedKeys:c.expandedKeys,customizeOnExpand:c.onExpand}):{enableCollapse:!1,customizeExpandedKeys:c.expandedKeys,customizeOnExpand:c.onExpand}}),[r,a]=Ie(o.value.customizeExpandedKeys),l=s=>{var u,d;if(!o.value.enableCollapse)return;const c=r.value.includes(s)?r.value.filter(f=>f!==s):[...r.value,s];(d=(u=o.value).customizeOnExpand)==null||d.call(u,c),a(c)};return[i.computed(()=>o.value.enableCollapse),r,l]};var Ji=(e=>(e.PENDING="pending",e.SUCCESS="success",e.ERROR="error",e))(Ji||{});const OR=e=>{const{componentCls:t}=e,n=`${t}-item`,o={[Ji.PENDING]:e.colorPrimaryText,[Ji.SUCCESS]:e.colorSuccessText,[Ji.ERROR]:e.colorErrorText},r=Object.keys(o);return r.reduce((a,l)=>{const s=o[l];return r.forEach(c=>{const u=`& ${n}-${l}-${c}`,d=l===c?{}:{backgroundColor:"none !important",backgroundImage:`linear-gradient(${s}, ${o[c]})`};a[u]={[`& ${n}-icon, & > *::before`]:{backgroundColor:`${s} !important`},"& > :last-child::before":d}}),a},{})},PR=e=>{const{calc:t,componentCls:n}=e,o=`${n}-item`,r={content:'""',width:t(e.lineWidth).mul(2).equal(),display:"block",position:"absolute",insetInlineEnd:"none",backgroundColor:e.colorTextPlaceholder};return{"& > :last-child > :last-child":{"&::before":{display:"none !important"},[`&${o}-footer`]:{"&::before":{display:"block !important",bottom:0}}},[`& > ${o}`]:{[`& ${o}-header, & ${o}-content, & ${o}-footer`]:{position:"relative","&::before":{bottom:t(e.itemGap).mul(-1).equal()}},[`& ${o}-header, & ${o}-content`]:{marginInlineStart:t(e.itemSize).mul(-1).equal(),"&::before":{...r,insetInlineStart:t(e.itemSize).div(2).sub(e.lineWidth).equal()}},[`& ${o}-header::before`]:{top:e.itemSize,bottom:t(e.itemGap).mul(-2).equal()},[`& ${o}-content::before`]:{top:"100%"},[`& ${o}-footer::before`]:{...r,top:0,insetInlineStart:t(e.itemSize).div(-2).sub(e.lineWidth).equal()}}}},IR=e=>{const{componentCls:t}=e,n=`${t}-item`;return{[n]:{display:"flex",flexDirection:"column",[`& ${n}-collapsible`]:{cursor:"pointer"},[`& ${n}-header`]:{display:"flex",marginBottom:e.itemGap,gap:e.itemGap,alignItems:"flex-start",[`& ${n}-icon`]:{height:e.itemSize,width:e.itemSize,fontSize:e.itemFontSize,display:"flex",justifyContent:"center",alignItems:"center"},[`& ${n}-extra`]:{height:e.itemSize,maxHeight:e.itemSize},[`& ${n}-header-box`]:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden",[`& ${n}-title`]:{height:e.itemSize,lineHeight:`${ft(e.itemSize)}`,maxHeight:e.itemSize,fontSize:e.itemFontSize,[`& ${n}-collapse-icon`]:{marginInlineEnd:e.marginXS}},[`& ${n}-desc`]:{fontSize:e.itemFontSize}}},[`& ${n}-content`]:{[`& ${n}-content-hidden`]:{display:"none"},[`& ${n}-content-box`]:{padding:e.itemGap,display:"inline-block",maxWidth:`calc(100% - ${e.itemSize})`,borderRadius:e.borderRadiusLG,backgroundColor:e.colorBgContainer,border:`${ft(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}},[`& ${n}-footer`]:{marginTop:e.itemGap,display:"inline-flex"}}}},Rc=(e,t="middle")=>{const{componentCls:n}=e,o={large:{itemSize:e.itemSizeLG,itemGap:e.itemGapLG,itemFontSize:e.itemFontSizeLG},middle:{itemSize:e.itemSize,itemGap:e.itemGap,itemFontSize:e.itemFontSize},small:{itemSize:e.itemSizeSM,itemGap:e.itemGapSM,itemFontSize:e.itemFontSizeSM}}[t];return{[`&${n}-${t}`]:{paddingInlineStart:o.itemSize,gap:o.itemGap,...IR({...e,...o}),...PR({...e,...o})}}},TR=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",...OR(e),...Rc(e),...Rc(e,"large"),...Rc(e,"small"),[`&${t}-rtl`]:{direction:"rtl"}}}},NR=Gt("ThoughtChain",e=>{const t=Ct(e,{itemFontSizeSM:e.fontSizeSM,itemSizeSM:e.calc(e.controlHeightXS).add(e.controlHeightSM).div(2).equal(),itemGapSM:e.marginSM,itemFontSize:e.fontSize,itemSize:e.calc(e.controlHeightSM).add(e.controlHeight).div(2).equal(),itemGap:e.margin,itemFontSizeLG:e.fontSizeLG,itemSizeLG:e.calc(e.controlHeight).add(e.controlHeightLG).div(2).equal(),itemGapLG:e.marginLG});return[TR(t),j0(t)]}),Y0=Symbol("ThoughtChainNodeContext"),Ac=i.shallowRef(),ER=e=>{i.provide(Y0,e),i.watch(e,()=>{Ac.value=i.unref(e),i.triggerRef(Ac)},{immediate:!0,deep:!0})},RR=()=>i.inject(Y0,i.computed(()=>Ac.value||{})),AR=i.defineComponent({props:{value:St()},setup(e,{slots:t}){return ER(i.computed(()=>e.value)),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),MR=i.defineComponent({name:"AXThoughtChainNode",__name:"item",props:i.mergeDefaults({info:null,nextStatus:null,onClick:{type:Function}},{info:()=>({})}),setup(e){const t=He(e,["info","nextStatus","onClick"]),n=i.computed(()=>uo(t,{attr:!0,aria:!0,data:!0})),o=RR(),r=i.computed(()=>o.value.prefixCls),a=i.computed(()=>o.value.enableCollapse),l=i.computed(()=>o.value.expandedKeys),s=i.computed(()=>o.value.direction),c=i.computed(()=>o.value.classNames),u=i.computed(()=>o.value.styles),d=i.useId(),f=i.computed(()=>e.info.key??d),p=i.computed(()=>e.info.icon),m=i.computed(()=>e.info.title),v=i.computed(()=>e.info.extra),g=i.computed(()=>e.info.content),y=i.computed(()=>e.info.footer),C=i.computed(()=>e.info.status),S=i.computed(()=>e.info.description),$=i.computed(()=>`${r.value}-item`),x=()=>{var b;return(b=e.onClick)==null?void 0:b.call(e,f.value)},w=i.computed(()=>{var b;return(b=l.value)==null?void 0:b.includes(f.value)}),P=i.computed(()=>a.value?w.value:!0);return()=>i.createVNode("div",i.mergeProps(n.value,{class:re($.value,{[`${$.value}-${C.value}${e.nextStatus?`-${e.nextStatus}`:""}`]:C.value},t.class),style:t.style}),[i.createVNode("div",{class:re(`${$.value}-header`,c.value.itemHeader),style:u.value.itemHeader,onClick:x},[i.createVNode(vn,{icon:p.value,class:`${$.value}-icon`},null),i.createVNode("div",{class:re(`${$.value}-header-box`,{[`${$.value}-collapsible`]:a.value&&g.value})},[i.createVNode($e.Text,{strong:!0,ellipsis:{tooltip:{placement:s.value==="rtl"?"topRight":"topLeft",title:m.value}},class:`${$.value}-title`},{default:()=>[a.value&&g.value&&(s.value==="rtl"?i.createVNode(Zo,{class:`${$.value}-collapse-icon`,rotate:w.value?-90:0},null):i.createVNode(yn,{class:`${$.value}-collapse-icon`,rotate:w.value?90:0},null)),m.value]}),S.value&&i.createVNode($e.Text,{class:`${$.value}-desc`,ellipsis:{tooltip:{placement:s.value==="rtl"?"topRight":"topLeft",title:S.value}},type:"secondary"},{default:()=>[S.value]})]),v.value&&i.createVNode("div",{class:`${$.value}-extra`},[v.value])]),i.createVNode(gr,{prefixCls:r.value},{default:()=>[g.value&&i.withDirectives(i.createVNode("div",{class:re(`${$.value}-content`)},[i.createVNode("div",{class:re(`${$.value}-content-box`,c.value.itemContent),style:u.value.itemContent},[g.value])]),[[i.vShow,P.value]])]}),y.value&&i.createVNode("div",{class:re(`${$.value}-footer`,c.value.itemFooter),style:u.value.itemFooter},[y.value])])}}),VR=i.defineComponent({name:"AXThoughtChain",__name:"ThoughtChain",props:i.mergeDefaults({items:null,collapsible:{type:Boolean},size:null,styles:null,classNames:null,prefixCls:null,rootClassName:null},{styles:()=>({}),classNames:()=>({}),size:"middle"}),setup(e){const t=He(e,["prefixCls","rootClassName","class","items","collapsible","styles","style","classNames","size"]);i.toRef(e,"class"),i.toRef(e,"prefixCls");const n=i.computed(()=>uo(t,{attr:!0,aria:!0,data:!0})),{getPrefixCls:o,direction:r}=Ke(),a=i.computed(()=>o()),l=i.computed(()=>o("thought-chain",e.prefixCls)),s=Ut("thoughtChain"),[c,u,d]=xR(()=>e.collapsible,l.value,a.value),[f,p,m]=NR(l),v=i.computed(()=>re(e.class,e.rootClassName,l.value,s.value.className,p.value,m,{[`${l.value}-rtl`]:r.value==="rtl"},`${l.value}-${e.size}`));return()=>f(i.createVNode("div",i.mergeProps(n.value,{class:v.value,style:{...typeof s.value.style=="object"?s.value.style:{},...typeof e.style=="object"?e.style:{}}}),[i.createVNode(AR,{value:{prefixCls:l.value,enableCollapse:c.value,expandedKeys:u.value,direction:r.value,classNames:{itemHeader:re(s.value.classNames.itemHeader,e.classNames.itemHeader),itemContent:re(s.value.classNames.itemContent,e.classNames.itemContent),itemFooter:re(s.value.classNames.itemFooter,e.classNames.itemFooter)},styles:{itemHeader:{...s.value.styles.itemHeader,...e.styles.itemHeader},itemContent:{...s.value.styles.itemContent,...e.styles.itemContent},itemFooter:{...s.value.styles.itemFooter,...e.styles.itemFooter}}}},{default:()=>{var g;return[(g=e.items)==null?void 0:g.map((y,C)=>{var S;return i.createVNode(MR,{key:y.key||`key_${C}`,class:re(s.value.classNames.item,e.classNames.item),style:{...s.value.styles.item,...e.styles.item},info:{...y,icon:y.icon||C+1},onClick:d,nextStatus:((S=e.items[C+1])==null?void 0:S.status)||y.status},null)})]}})]))}}),DR=`
|
|
290
290
|
|
|
291
291
|
`,BR=`
|
|
292
292
|
`,Z0=":",Mc=e=>(e??"").trim()!=="";function LR(){let e="";return new TransformStream({transform(t,n){e+=t;const o=e.split(DR);o.slice(0,-1).forEach(r=>{Mc(r)&&n.enqueue(r)}),e=o[o.length-1]},flush(t){Mc(e)&&t.enqueue(e)}})}function zR(){return new TransformStream({transform(e,t){const o=e.split(BR).reduce((r,a)=>{const l=a.indexOf(Z0);if(l===-1)throw new Error(`The key-value separator "${Z0}" is not found in the sse line chunk!`);const s=a.slice(0,l);if(!Mc(s))return r;const c=a.slice(l+1);return{...r,[s]:c}},{});Object.keys(o).length!==0&&t.enqueue(o)}})}function Vc(e){const{readableStream:t,transformStream:n}=e;if(!(t instanceof ReadableStream))throw new Error("The options.readableStream must be an instance of ReadableStream.");const o=new TextDecoderStream,r=n?t.pipeThrough(o).pipeThrough(n):t.pipeThrough(o).pipeThrough(LR()).pipeThrough(zR());return r[Symbol.asyncIterator]=async function*(){const a=this.getReader();for(;;){const{done:l,value:s}=await a.read();if(l)break;s&&(yield s)}},r}const Q0=async(e,t={})=>{const{fetch:n=globalThis.fetch,middlewares:o={},...r}=t;if(typeof n!="function")throw new Error("The options.fetch must be a typeof fetch function!");let a=[e,r];typeof o.onRequest=="function"&&(a=await o.onRequest(...a));let l=await n(...a);if(typeof o.onResponse=="function"){const s=await o.onResponse(l);if(!(s instanceof Response))throw new Error("The options.onResponse must return a Response instance!");l=s}if(!l.ok)throw new Error(`Fetch failed with status ${l.status}`);if(!l.body)throw new Error("The response body is empty.");return l},In=class In{constructor(t){this.create=async(l,s,c)=>{var d;const u={method:"POST",body:JSON.stringify({model:this.model,...l}),headers:this.defaultHeaders};try{const f=await Q0(this.baseURL,{fetch:this.customOptions.fetch,...u});if(c){await this.customResponseHandler(f,s,c);return}const p=f.headers.get("content-type")||"";switch(p.split(";")[0].trim()){case"text/event-stream":await this.sseResponseHandler(f,s);break;case"application/json":await this.jsonResponseHandler(f,s);break;default:throw new Error(`The response content-type: ${p} is not support!`)}}catch(f){const p=f instanceof Error?f:new Error("Unknown error!");throw(d=s==null?void 0:s.onError)==null||d.call(s,p),p}},this.customResponseHandler=async(l,s,c)=>{var d,f;const u=[];for await(const p of Vc({readableStream:l.body,transformStream:c}))u.push(p),(d=s==null?void 0:s.onUpdate)==null||d.call(s,p);(f=s==null?void 0:s.onSuccess)==null||f.call(s,u)},this.sseResponseHandler=async(l,s)=>{var u,d;const c=[];for await(const f of Vc({readableStream:l.body}))c.push(f),(u=s==null?void 0:s.onUpdate)==null||u.call(s,f);(d=s==null?void 0:s.onSuccess)==null||d.call(s,c)},this.jsonResponseHandler=async(l,s)=>{var u,d;const c=await l.json();(u=s==null?void 0:s.onUpdate)==null||u.call(s,c),(d=s==null?void 0:s.onSuccess)==null||d.call(s,[c])};const{baseURL:n,model:o,dangerouslyApiKey:r,...a}=t;this.baseURL=t.baseURL,this.model=t.model,this.defaultHeaders={"Content-Type":"application/json",...t.dangerouslyApiKey&&{Authorization:t.dangerouslyApiKey}},this.customOptions=a}static init(t){if(!t.baseURL||typeof t.baseURL!="string")throw new Error("The baseURL is not valid!");const n=t.fetch||t.baseURL;return In.instanceBuffer.has(n)||In.instanceBuffer.set(n,new In(t)),In.instanceBuffer.get(n)}};In.instanceBuffer=new Map;let Dc=In;const J0=Dc.init;let ev=0;class tv{constructor(t){this.requestingMap={},this.request=(n,o)=>{const{request:r}=this.config,{onUpdate:a,onSuccess:l,onError:s}=o,c=ev;ev+=1,this.requestingMap[c]=!0,r==null||r(n,{onUpdate:u=>{this.requestingMap[c]&&a(u)},onSuccess:u=>{this.requestingMap[c]&&(l(u),this.finishRequest(c))},onError:u=>{this.requestingMap[c]&&(s(u),this.finishRequest(c))}})},this.config=t}finishRequest(t){delete this.requestingMap[t]}isRequesting(){return Object.keys(this.requestingMap).length>0}}function FR(e){const{request:t,...n}=e;return[i.computed(()=>new tv({request:t||J0({baseURL:n.baseURL,model:n.model,dangerouslyApiKey:n.dangerouslyApiKey}).create,...n}))]}function HR(e,t){const n=i.ref(e);function o(r){const a=typeof r=="function"?r(n.value):r;a!==n.value&&t(a,n.value),n.value=a}return[n,o]}function jR(e){return Array.isArray(e)?e:[e]}function _R(e){const{defaultMessages:t,agent:n,requestFallback:o,requestPlaceholder:r,parser:a}=e,l=i.ref(0),s=i.computed(()=>(t||[]).map((g,y)=>({id:`default_${y}`,status:"local",...g}))),[c,u]=HR(s.value,()=>{}),d=(g,y)=>{const C={id:`msg_${l.value}`,message:g,status:y};return l.value+=1,C},f=i.computed(()=>{const g=[];return c.value.forEach(y=>{const C=a?a(y.message):y.message,S=jR(C);S.forEach(($,x)=>{let w=y.id;S.length>1&&(w=`${w}_${x}`),g.push({id:w,message:$,status:y.status})})}),g}),p=g=>g.filter(y=>y.status!=="loading"&&y.status!=="error").map(y=>y.message),m=()=>p(c.value);return{onRequest:Ki(g=>{if(!n)throw new Error("The agent parameter is required when using the onRequest method in an agent generated by useXAgent.");let y=null;u($=>{let x=[...$,d(g,"local")];if(r){let w;typeof r=="function"?w=r(g,{messages:p(x)}):w=r;const P=d(w,"loading");y=P.id,x=[...x,P]}return x});let C=null;const S=($,x)=>{let w=c.value.find(P=>P.id===C);return w?u(P=>P.map(b=>b.id===C?{...b,message:$,status:x}:b)):(w=d($,x),u(P=>[...P.filter(I=>I.id!==y),w]),C=w.id),w};n.request({message:g,messages:m()},{onUpdate:$=>{S($,"loading")},onSuccess:$=>{S($,"success")},onError:async $=>{if(o){let x;typeof o=="function"?x=await o(g,{error:$,messages:m()}):x=o,u(w=>[...w.filter(P=>P.id!==y&&P.id!==C),d(x,"error")])}else u(x=>x.filter(w=>w.id!==y&&w.id!==C))}})}),messages:c,parsedMessages:f,setMessages:u}}ce.Attachments=$R,ce.Bubble=w8,ce.BubbleList=E0,ce.Conversations=E8,ce.Prompts=V0,ce.Sender=rR,ce.Suggestion=_8,ce.ThoughtChain=VR,ce.Welcome=D8,ce.XAgent=tv,ce.XFetch=Q0,ce.XProvider=X6,ce.XRequest=J0,ce.XStream=Vc,ce.defaultPrefixCls=hv,ce.theme=cr,ce.useXAgent=FR,ce.useXChat=_R,ce.useXProviderContext=Ke,Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"})});
|