ysyt-react-agent-lib 1.1.31 → 1.1.32

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.
@@ -1,6 +1,6 @@
1
- import { j as e, M as l, E as r, S as i, Y as d } from "./index-uFheUVRz.mjs";
1
+ import { j as e, M as l, E as r, S as i, Y as d } from "./index-Dw2e48Je.mjs";
2
2
  import { memo as m, useState as g, useEffect as x } from "react";
3
- import { M as p, T as j } from "./index-DBFR3H0v.mjs";
3
+ import { M as p, T as j } from "./index-BQ2MdGm2.mjs";
4
4
  const E = m(({ open: t, onCallBack: a, queryFetch: o }) => {
5
5
  const [n, c] = g([]);
6
6
  return x(() => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BJk1deek.js"),s=require("react"),i=require("./index-VEfSbaW9.js"),c=s.memo(({open:n,onCallBack:r,queryFetch:x})=>{const[o,a]=s.useState([]);return s.useEffect(()=>{(async()=>{try{await x({success:t=>{a(t.data||[])}})}catch(t){console.log(t)}})()},[n]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(i.Modal,{open:n,title:"咨询",footer:!1,onCancel:()=>r(),children:e.jsxRuntimeExports.jsx(e.ModelBody,{children:o.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE,description:"暂无咨询坐席"}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:o.map(t=>e.jsxRuntimeExports.jsx(i.Tag,{color:"processing",onClick:()=>r(t.agent_no),children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"zixun"}),e.jsxRuntimeExports.jsxs("span",{style:{marginLeft:10},children:["咨询坐席: ",t.agent_name]})]})},t.agent_no))})})})})});exports.default=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DTnvB7Ie.js"),s=require("react"),i=require("./index-C4PgQJG8.js"),c=s.memo(({open:n,onCallBack:r,queryFetch:x})=>{const[o,a]=s.useState([]);return s.useEffect(()=>{(async()=>{try{await x({success:t=>{a(t.data||[])}})}catch(t){console.log(t)}})()},[n]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(i.Modal,{open:n,title:"咨询",footer:!1,onCancel:()=>r(),children:e.jsxRuntimeExports.jsx(e.ModelBody,{children:o.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE,description:"暂无咨询坐席"}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:o.map(t=>e.jsxRuntimeExports.jsx(i.Tag,{color:"processing",onClick:()=>r(t.agent_no),children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"zixun"}),e.jsxRuntimeExports.jsxs("span",{style:{marginLeft:10},children:["咨询坐席: ",t.agent_name]})]})},t.agent_no))})})})})});exports.default=c;
@@ -1,6 +1,6 @@
1
- import { j as e, M as h, R as j, a as f, E as d, S as y, Y as c, I as v } from "./index-uFheUVRz.mjs";
1
+ import { j as e, M as h, R as j, a as f, E as d, S as y, Y as c, I as v } from "./index-Dw2e48Je.mjs";
2
2
  import { memo as E, useState as n, useEffect as T } from "react";
3
- import { M as I, T as M } from "./index-DBFR3H0v.mjs";
3
+ import { M as I, T as M } from "./index-BQ2MdGm2.mjs";
4
4
  const _ = E(({ open: l, onCallBack: a, queryFetch: p }) => {
5
5
  const [o, g] = n([]), [t, x] = n(0), [r, m] = n(""), [u, i] = n(!1);
6
6
  return T(() => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BJk1deek.js"),t=require("react"),l=require("./index-VEfSbaW9.js"),m=t.memo(({open:o,onCallBack:n,queryFetch:u})=>{const[x,p]=t.useState([]),[r,c]=t.useState(0),[i,d]=t.useState(""),[j,a]=t.useState(!1);return t.useEffect(()=>{(async()=>{a(!0);try{await u({success:s=>{p(s.data||[])}})}catch(s){console.log(s)}a(!1)})()},[o]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(l.Modal,{open:o,title:"转接",footer:!1,onCancel:()=>n(),children:e.jsxRuntimeExports.jsxs(e.ModelBody,{children:[e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(e.Radio.Group,{options:[{label:"转接坐席",value:0},{label:"转接外线",value:1}],value:r,onChange:s=>c(s.target.value)})}),e.jsxRuntimeExports.jsx(e.Spin,{spinning:j,children:e.jsxRuntimeExports.jsxs("div",{style:{borderTop:"1px solid #eee",marginTop:10,paddingTop:10},children:[r===0&&e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:x.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE,description:"暂无转接坐席"}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:x.map(s=>e.jsxRuntimeExports.jsx(l.Tag,{color:"processing",onClick:()=>n(s.agent_no,0),children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"zixun"}),e.jsxRuntimeExports.jsxs("span",{style:{marginRight:10},children:["转接坐席: ",s.agent_name]})]})},s.agent_no))})}),r===1&&e.jsxRuntimeExports.jsxs("div",{style:{width:"100%",display:"flex",alignItems:"center",gap:"0 5px"},children:[e.jsxRuntimeExports.jsx(e.Input,{style:{flex:1},value:i,onChange:s=>d(s.target.value),placeholder:"请输入外线号码, 回车转接",onPressEnter:()=>{n(i,1)}}),e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"boda",color:"#1D92E9",size:25,onClick:()=>{n(i,1)}})]})]})})]})})})});exports.default=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DTnvB7Ie.js"),t=require("react"),l=require("./index-C4PgQJG8.js"),m=t.memo(({open:o,onCallBack:n,queryFetch:u})=>{const[x,p]=t.useState([]),[r,c]=t.useState(0),[i,d]=t.useState(""),[j,a]=t.useState(!1);return t.useEffect(()=>{(async()=>{a(!0);try{await u({success:s=>{p(s.data||[])}})}catch(s){console.log(s)}a(!1)})()},[o]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(l.Modal,{open:o,title:"转接",footer:!1,onCancel:()=>n(),children:e.jsxRuntimeExports.jsxs(e.ModelBody,{children:[e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(e.Radio.Group,{options:[{label:"转接坐席",value:0},{label:"转接外线",value:1}],value:r,onChange:s=>c(s.target.value)})}),e.jsxRuntimeExports.jsx(e.Spin,{spinning:j,children:e.jsxRuntimeExports.jsxs("div",{style:{borderTop:"1px solid #eee",marginTop:10,paddingTop:10},children:[r===0&&e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:x.length===0?e.jsxRuntimeExports.jsx(e.Empty,{image:e.Empty.PRESENTED_IMAGE_SIMPLE,description:"暂无转接坐席"}):e.jsxRuntimeExports.jsx(e.Space,{wrap:!0,children:x.map(s=>e.jsxRuntimeExports.jsx(l.Tag,{color:"processing",onClick:()=>n(s.agent_no,0),children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"zixun"}),e.jsxRuntimeExports.jsxs("span",{style:{marginRight:10},children:["转接坐席: ",s.agent_name]})]})},s.agent_no))})}),r===1&&e.jsxRuntimeExports.jsxs("div",{style:{width:"100%",display:"flex",alignItems:"center",gap:"0 5px"},children:[e.jsxRuntimeExports.jsx(e.Input,{style:{flex:1},value:i,onChange:s=>d(s.target.value),placeholder:"请输入外线号码, 回车转接",onPressEnter:()=>{n(i,1)}}),e.jsxRuntimeExports.jsx(e.YsytIconSvg,{name:"boda",color:"#1D92E9",size:25,onClick:()=>{n(i,1)}})]})]})})]})})})});exports.default=m;
@@ -1,6 +1,6 @@
1
1
  import * as r from "react";
2
2
  import $, { useContext as re, useRef as Z, useMemo as Lt, useEffect as De } from "react";
3
- import { i as Dt, K as Ne, g as se, F as kt, m as fe, u as N, r as nt, b as Pe, p as je, C as q, c as O, d as Ie, e as At, o as ge, f as Ce, h as _t, k as Vt, l as Wt, W as qt, n as Gt, B as Te, q as ot, s as Xt, _ as R, t as ke, v as Y, w as Me, x as at, y as Ae, z as Ut, A as _e, D as Ve, P as Kt, G as Qt, H as K, J as Zt, L as Yt, N as Re, O as Jt, Q as lt, T as en, U as tn, V as rt, X as nn, Z as on, $ as an, a0 as ue, a1 as ln, a2 as st, a3 as rn, a4 as sn, a5 as cn, a6 as dn, a7 as un, a8 as mn, a9 as fn, aa as gn, ab as Cn, ac as it, ad as pn, ae as vn } from "./index-uFheUVRz.mjs";
3
+ import { i as Dt, K as Ne, g as se, F as kt, m as fe, u as N, r as nt, b as Pe, p as je, C as q, c as O, d as Ie, e as At, o as ge, f as Ce, h as _t, k as Vt, l as Wt, W as qt, n as Gt, B as Te, q as ot, s as Xt, _ as R, t as ke, v as Y, w as Me, x as at, y as Ae, z as Ut, A as _e, D as Ve, P as Kt, G as Qt, H as K, J as Zt, L as Yt, N as Re, O as Jt, Q as lt, T as en, U as tn, V as rt, X as nn, Z as on, $ as an, a0 as ue, a1 as ln, a2 as st, a3 as rn, a4 as sn, a5 as cn, a6 as dn, a7 as un, a8 as mn, a9 as fn, aa as gn, ab as Cn, ac as it, ad as pn, ae as vn } from "./index-Dw2e48Je.mjs";
4
4
  const bn = new Ne("antFadeIn", {
5
5
  "0%": {
6
6
  opacity: 0
@@ -1,4 +1,4 @@
1
- "use strict";const b=require("react"),a=require("./index-BJk1deek.js");function st(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const s=st(b),it=new a.Keyframe("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),ct=new a.Keyframe("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),dt=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:o}=e,n=`${o}-fade`,r=t?"&":"";return[a.initMotion(n,it,ct,e.motionDurationMid,t),{[`
1
+ "use strict";const b=require("react"),a=require("./index-DTnvB7Ie.js");function st(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const s=st(b),it=new a.Keyframe("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),ct=new a.Keyframe("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),dt=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:o}=e,n=`${o}-fade`,r=t?"&":"";return[a.initMotion(n,it,ct,e.motionDurationMid,t),{[`
2
2
  ${r}${n}-enter,
3
3
  ${r}${n}-appear
4
4
  `]:{opacity:0,animationTimingFunction:"linear"},[`${r}${n}-leave`]:{animationTimingFunction:"linear"}}]},ut=e=>{const{paddingXXS:t,lineWidth:o,tagPaddingHorizontal:n,componentCls:r,calc:l}=e,i=l(n).sub(o).equal(),u=l(t).sub(o).equal();return{[r]:Object.assign(Object.assign({},a.resetComponent(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${a.unit(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${r}-close-icon`]:{marginInlineStart:u,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},Ce=e=>{const{lineWidth:t,fontSizeIcon:o,calc:n}=e,r=e.fontSizeSM;return a.merge(e,{tagFontSize:r,tagLineHeight:a.unit(n(e.lineHeightSM).mul(r).equal()),tagIconSize:n(o).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},pe=e=>({defaultBg:new a.FastColor(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),Re=a.genStyleHooks("Tag",e=>{const t=Ce(e);return ut(t)},pe);function oe(e){if(e)return{closable:e.closable,closeIcon:e.closeIcon}}function $e(e){const{closable:t,closeIcon:o}=e||{};return b.useMemo(()=>{if(!t&&(t===!1||o===!1||o===null))return!1;if(t===void 0&&o===void 0)return null;let n={closeIcon:typeof o!="boolean"&&o!==null?o:void 0};return t&&typeof t=="object"&&(n=Object.assign(Object.assign({},n),t)),n},[t,o])}function xe(){const e={};for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return o.forEach(r=>{r&&Object.keys(r).forEach(l=>{r[l]!==void 0&&(e[l]=r[l])})}),e}const mt={};function Be(e,t){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mt;const n=$e(e),r=$e(t),l=typeof n!="boolean"?!!(n!=null&&n.disabled):!1,i=b.useMemo(()=>Object.assign({closeIcon:b.createElement(a.RefIcon,null)},o),[o]),u=b.useMemo(()=>n===!1?!1:n?xe(i,r,n):r===!1?!1:r?xe(i,r):i.closable?i:!1,[n,r,i]);return b.useMemo(()=>{if(u===!1)return[!1,null,l];const{closeIconRender:c}=i,{closeIcon:g}=u;let d=g;if(d!=null){c&&(d=c(g));const m=a.pickAttrs(u,!0);Object.keys(m).length&&(d=b.isValidElement(d)?b.cloneElement(d,m):b.createElement("span",Object.assign({},m),d))}return[!0,d,l]},[u,i])}var ft=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};const gt=s.forwardRef((e,t)=>{const{prefixCls:o,style:n,className:r,checked:l,onChange:i,onClick:u}=e,c=ft(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:g,tag:d}=s.useContext(a.ConfigContext),m=y=>{i==null||i(!l),u==null||u(y)},f=g("tag",o),[v,x,C]=Re(f),p=a.classNames(f,`${f}-checkable`,{[`${f}-checkable-checked`]:l},d==null?void 0:d.className,r,x,C);return v(s.createElement("span",Object.assign({},c,{ref:t,style:Object.assign(Object.assign({},n),d==null?void 0:d.style),className:p,onClick:m})))}),Ct=e=>a.genPresetColor(e,(t,o)=>{let{textColor:n,lightBorderColor:r,lightColor:l,darkColor:i}=o;return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:l,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),pt=a.genSubStyleComponent(["Tag","preset"],e=>{const t=Ce(e);return Ct(t)},pe);function bt(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const ne=(e,t,o)=>{const n=bt(o);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${o}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},vt=a.genSubStyleComponent(["Tag","status"],e=>{const t=Ce(e);return[ne(t,"success","Success"),ne(t,"processing","Info"),ne(t,"error","Error"),ne(t,"warning","Warning")]},pe);var ht=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};const yt=s.forwardRef((e,t)=>{const{prefixCls:o,className:n,rootClassName:r,style:l,children:i,icon:u,color:c,onClose:g,bordered:d=!0,visible:m}=e,f=ht(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:v,direction:x,tag:C}=s.useContext(a.ConfigContext),[p,y]=s.useState(!0),h=a.omit(f,["closeIcon","closable"]);process.env.NODE_ENV!=="production"&&a.devUseWarning("Tag").deprecated(!("visible"in e),"visible","visible && <Tag />"),s.useEffect(()=>{m!==void 0&&y(m)},[m]);const S=a.isPresetColor(c),N=a.isPresetStatusColor(c),E=S||N,O=Object.assign(Object.assign({backgroundColor:c&&!E?c:void 0},C==null?void 0:C.style),l),$=v("tag",o),[P,j,H]=Re($),B=a.classNames($,C==null?void 0:C.className,{[`${$}-${c}`]:E,[`${$}-has-color`]:c&&!E,[`${$}-hidden`]:!p,[`${$}-rtl`]:x==="rtl",[`${$}-borderless`]:!d},n,r,j,H),_=I=>{I.stopPropagation(),g==null||g(I),!I.defaultPrevented&&y(!1)},[,V]=Be(oe(e),oe(C),{closable:!1,closeIconRender:I=>{const X=s.createElement("span",{className:`${$}-close-icon`,onClick:_},I);return a.replaceElement(I,X,M=>({onClick:q=>{var R;(R=M==null?void 0:M.onClick)===null||R===void 0||R.call(M,q),_(q)},className:a.classNames(M==null?void 0:M.className,`${$}-close-icon`)}))}}),A=typeof f.onClick=="function"||i&&i.type==="a",z=u||null,W=z?s.createElement(s.Fragment,null,z,i&&s.createElement("span",null,i)):i,L=s.createElement("span",Object.assign({},h,{ref:t,className:B,style:O}),W,V,S&&s.createElement(pt,{key:"preset",prefixCls:$}),N&&s.createElement(vt,{key:"status",prefixCls:$}));return P(A?s.createElement(a.Wave,{component:"Tag"},L):L)}),be=yt;process.env.NODE_ENV!=="production"&&(be.displayName="Tag");be.CheckableTag=gt;function ie(e){return!!(e!=null&&e.then)}const _e=e=>{const{type:t,children:o,prefixCls:n,buttonProps:r,close:l,autoFocus:i,emitEvent:u,isSilent:c,quitOnNullishReturnValue:g,actionFn:d}=e,m=s.useRef(!1),f=s.useRef(null),[v,x]=a.useSafeState(!1),C=function(){l==null||l.apply(void 0,arguments)};s.useEffect(()=>{let h=null;return i&&(h=setTimeout(()=>{var S;(S=f.current)===null||S===void 0||S.focus({preventScroll:!0})})),()=>{h&&clearTimeout(h)}},[]);const p=h=>{ie(h)&&(x(!0),h.then(function(){x(!1,!0),C.apply(void 0,arguments),m.current=!1},S=>{if(x(!1,!0),m.current=!1,!(c!=null&&c()))return Promise.reject(S)}))},y=h=>{if(m.current)return;if(m.current=!0,!d){C();return}let S;if(u){if(S=d(h),g&&!ie(S)){m.current=!1,C(h);return}}else if(d.length)S=d(l),m.current=!1;else if(S=d(),!ie(S)){C();return}p(S)};return s.createElement(a.Button,Object.assign({},a.convertLegacyProps(t),{onClick:y,loading:v,prefixCls:n},r,{ref:f}),o)},ee=b.createContext({}),{Provider:He}=ee,Se=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:o,isSilent:n,mergedOkCancel:r,rootPrefixCls:l,close:i,onCancel:u,onConfirm:c}=b.useContext(ee);return r?b.createElement(_e,{isSilent:n,actionFn:u,close:function(){i==null||i.apply(void 0,arguments),c==null||c(!1)},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${l}-btn`},o):null},Oe=()=>{const{autoFocusButton:e,close:t,isSilent:o,okButtonProps:n,rootPrefixCls:r,okTextLocale:l,okType:i,onConfirm:u,onOk:c}=b.useContext(ee);return b.createElement(_e,{isSilent:o,type:i||"primary",actionFn:c,close:function(){t==null||t.apply(void 0,arguments),u==null||u(!0)},autoFocus:e==="ok",buttonProps:n,prefixCls:`${r}-btn`},l)};var ze=s.createContext({});function Ne(e,t,o){var n=t;return!n&&o&&(n="".concat(e,"-").concat(o)),n}function Ee(e,t){var o=e["page".concat(t?"Y":"X","Offset")],n="scroll".concat(t?"Top":"Left");if(typeof o!="number"){var r=e.document;o=r.documentElement[n],typeof o!="number"&&(o=r.body[n])}return o}function $t(e){var t=e.getBoundingClientRect(),o={left:t.left,top:t.top},n=e.ownerDocument,r=n.defaultView||n.parentWindow;return o.left+=Ee(r),o.top+=Ee(r,!0),o}const xt=s.memo(function(e){var t=e.children;return t},function(e,t){var o=t.shouldUpdate;return!o});var St={width:0,height:0,overflow:"hidden",outline:"none"},Ot={outline:"none"},ve=b.forwardRef(function(e,t){var o=e.prefixCls,n=e.className,r=e.style,l=e.title,i=e.ariaId,u=e.footer,c=e.closable,g=e.closeIcon,d=e.onClose,m=e.children,f=e.bodyStyle,v=e.bodyProps,x=e.modalRender,C=e.onMouseDown,p=e.onMouseUp,y=e.holderRef,h=e.visible,S=e.forceRender,N=e.width,E=e.height,O=e.classNames,$=e.styles,P=b.useContext(ze),j=P.panel,H=a.useComposeRef(y,j),B=b.useRef(),_=b.useRef();b.useImperativeHandle(t,function(){return{focus:function(){var R;(R=B.current)===null||R===void 0||R.focus({preventScroll:!0})},changeActive:function(R){var Y=document,G=Y.activeElement;R&&G===_.current?B.current.focus({preventScroll:!0}):!R&&G===B.current&&_.current.focus({preventScroll:!0})}}});var V={};N!==void 0&&(V.width=N),E!==void 0&&(V.height=E);var A=u?b.createElement("div",{className:a.classNames("".concat(o,"-footer"),O==null?void 0:O.footer),style:a._objectSpread2({},$==null?void 0:$.footer)},u):null,z=l?b.createElement("div",{className:a.classNames("".concat(o,"-header"),O==null?void 0:O.header),style:a._objectSpread2({},$==null?void 0:$.header)},b.createElement("div",{className:"".concat(o,"-title"),id:i},l)):null,W=b.useMemo(function(){return a._typeof(c)==="object"&&c!==null?c:c?{closeIcon:g??b.createElement("span",{className:"".concat(o,"-close-x")})}:{}},[c,g,o]),L=a.pickAttrs(W,!0),I=a._typeof(c)==="object"&&c.disabled,X=c?b.createElement("button",a._extends({type:"button",onClick:d,"aria-label":"Close"},L,{className:"".concat(o,"-close"),disabled:I}),W.closeIcon):null,M=b.createElement("div",{className:a.classNames("".concat(o,"-content"),O==null?void 0:O.content),style:$==null?void 0:$.content},X,z,b.createElement("div",a._extends({className:a.classNames("".concat(o,"-body"),O==null?void 0:O.body),style:a._objectSpread2(a._objectSpread2({},f),$==null?void 0:$.body)},v),m),A);return b.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":l?i:null,"aria-modal":"true",ref:H,style:a._objectSpread2(a._objectSpread2({},r),V),className:a.classNames(o,n),onMouseDown:C,onMouseUp:p},b.createElement("div",{ref:B,tabIndex:0,style:Ot},b.createElement(xt,{shouldUpdate:h||S},x?x(M):M)),b.createElement("div",{tabIndex:0,ref:_,style:St}))});process.env.NODE_ENV!=="production"&&(ve.displayName="Panel");var Ae=s.forwardRef(function(e,t){var o=e.prefixCls,n=e.title,r=e.style,l=e.className,i=e.visible,u=e.forceRender,c=e.destroyOnClose,g=e.motionName,d=e.ariaId,m=e.onVisibleChanged,f=e.mousePosition,v=b.useRef(),x=s.useState(),C=a._slicedToArray(x,2),p=C[0],y=C[1],h={};p&&(h.transformOrigin=p);function S(){var N=$t(v.current);y(f&&(f.x||f.y)?"".concat(f.x-N.left,"px ").concat(f.y-N.top,"px"):"")}return s.createElement(a.CSSMotion,{visible:i,onVisibleChanged:m,onAppearPrepare:S,onEnterPrepare:S,forceRender:u,motionName:g,removeOnLeave:c,ref:v},function(N,E){var O=N.className,$=N.style;return s.createElement(ve,a._extends({},e,{ref:t,title:n,ariaId:d,prefixCls:o,holderRef:E,style:a._objectSpread2(a._objectSpread2(a._objectSpread2({},$),r),h),className:a.classNames(l,O)}))})});Ae.displayName="Content";var Nt=function(t){var o=t.prefixCls,n=t.style,r=t.visible,l=t.maskProps,i=t.motionName,u=t.className;return s.createElement(a.CSSMotion,{key:"mask",visible:r,motionName:i,leavedClassName:"".concat(o,"-mask-hidden")},function(c,g){var d=c.className,m=c.style;return s.createElement("div",a._extends({ref:g,style:a._objectSpread2(a._objectSpread2({},m),n),className:a.classNames("".concat(o,"-mask"),d,u)},l))})},Et=function(t){var o=t.prefixCls,n=o===void 0?"rc-dialog":o,r=t.zIndex,l=t.visible,i=l===void 0?!1:l,u=t.keyboard,c=u===void 0?!0:u,g=t.focusTriggerAfterClose,d=g===void 0?!0:g,m=t.wrapStyle,f=t.wrapClassName,v=t.wrapProps,x=t.onClose,C=t.afterOpenChange,p=t.afterClose,y=t.transitionName,h=t.animation,S=t.closable,N=S===void 0?!0:S,E=t.mask,O=E===void 0?!0:E,$=t.maskTransitionName,P=t.maskAnimation,j=t.maskClosable,H=j===void 0?!0:j,B=t.maskStyle,_=t.maskProps,V=t.rootClassName,A=t.classNames,z=t.styles;process.env.NODE_ENV!=="production"&&(["wrapStyle","bodyStyle","maskStyle"].forEach(function(w){a.warning(!(w in t),"".concat(w," is deprecated, please use styles instead."))}),"wrapClassName"in t&&a.warning(!1,"wrapClassName is deprecated, please use classNames instead."));var W=b.useRef(),L=b.useRef(),I=b.useRef(),X=s.useState(i),M=a._slicedToArray(X,2),q=M[0],R=M[1],Y=a.useId();function G(){a.contains(L.current,document.activeElement)||(W.current=document.activeElement)}function le(){if(!a.contains(L.current,document.activeElement)){var w;(w=I.current)===null||w===void 0||w.focus()}}function k(w){if(w)le();else{if(R(!1),O&&W.current&&d){try{W.current.focus({preventScroll:!0})}catch{}W.current=null}q&&(p==null||p())}C==null||C(w)}function T(w){x==null||x(w)}var D=b.useRef(!1),J=b.useRef(),ot=function(){clearTimeout(J.current),D.current=!0},at=function(){J.current=setTimeout(function(){D.current=!1})},ye=null;H&&(ye=function(se){D.current?D.current=!1:L.current===se.target&&T(se)});function rt(w){if(c&&w.keyCode===a.KeyCode.ESC){w.stopPropagation(),T(w);return}i&&w.keyCode===a.KeyCode.TAB&&I.current.changeActive(!w.shiftKey)}b.useEffect(function(){i&&(R(!0),G())},[i]),b.useEffect(function(){return function(){clearTimeout(J.current)}},[]);var lt=a._objectSpread2(a._objectSpread2(a._objectSpread2({zIndex:r},m),z==null?void 0:z.wrapper),{},{display:q?null:"none"});return s.createElement("div",a._extends({className:a.classNames("".concat(n,"-root"),V)},a.pickAttrs(t,{data:!0})),s.createElement(Nt,{prefixCls:n,visible:O&&i,motionName:Ne(n,$,P),style:a._objectSpread2(a._objectSpread2({zIndex:r},B),z==null?void 0:z.mask),maskProps:_,className:A==null?void 0:A.mask}),s.createElement("div",a._extends({tabIndex:-1,onKeyDown:rt,className:a.classNames("".concat(n,"-wrap"),f,A==null?void 0:A.wrapper),ref:L,onClick:ye,style:lt},v),s.createElement(Ae,a._extends({},t,{onMouseDown:ot,onMouseUp:at,ref:I,closable:N,ariaId:Y,prefixCls:n,visible:i&&q,onClose:T,onVisibleChanged:k,motionName:Ne(n,y,h)}))))},Le=function(t){var o=t.visible,n=t.getContainer,r=t.forceRender,l=t.destroyOnClose,i=l===void 0?!1:l,u=t.afterClose,c=t.panelRef,g=s.useState(o),d=a._slicedToArray(g,2),m=d[0],f=d[1],v=s.useMemo(function(){return{panel:c}},[c]);return s.useEffect(function(){o&&f(!0)},[o]),!r&&i&&!m?null:s.createElement(ze.Provider,{value:v},s.createElement(a.Portal,{open:o||r||m,autoDestroy:!1,getContainer:n,autoLock:o||m},s.createElement(Et,a._extends({},t,{destroyOnClose:i,afterClose:function(){u==null||u(),f(!1)}}))))};Le.displayName="Dialog";const wt=()=>a.canUseDom()&&window.document.documentElement,ae=e=>{const{prefixCls:t,className:o,style:n,size:r,shape:l}=e,i=a.classNames({[`${t}-lg`]:r==="large",[`${t}-sm`]:r==="small"}),u=a.classNames({[`${t}-circle`]:l==="circle",[`${t}-square`]:l==="square",[`${t}-round`]:l==="round"}),c=s.useMemo(()=>typeof r=="number"?{width:r,height:r,lineHeight:`${r}px`}:{},[r]);return s.createElement("span",{className:a.classNames(t,i,u,o),style:Object.assign(Object.assign({},c),n)})},jt=new a.Keyframe("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),re=e=>({height:e,lineHeight:a.unit(e)}),Q=e=>Object.assign({width:e},re(e)),Pt=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:jt,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),ce=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},re(e)),It=e=>{const{skeletonAvatarCls:t,gradientFromColor:o,controlHeight:n,controlHeightLG:r,controlHeightSM:l}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:o},Q(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},Q(r)),[`${t}${t}-sm`]:Object.assign({},Q(l))}},Tt=e=>{const{controlHeight:t,borderRadiusSM:o,skeletonInputCls:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:i,calc:u}=e;return{[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:o},ce(t,u)),[`${n}-lg`]:Object.assign({},ce(r,u)),[`${n}-sm`]:Object.assign({},ce(l,u))}},we=e=>Object.assign({width:e},re(e)),Mt=e=>{const{skeletonImageCls:t,imageSizeBase:o,gradientFromColor:n,borderRadiusSM:r,calc:l}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:n,borderRadius:r},we(l(o).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},we(o)),{maxWidth:l(o).mul(4).equal(),maxHeight:l(o).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},de=(e,t,o)=>{const{skeletonButtonCls:n}=e;return{[`${o}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${o}${n}-round`]:{borderRadius:t}}},ue=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},re(e)),Rt=e=>{const{borderRadiusSM:t,skeletonButtonCls:o,controlHeight:n,controlHeightLG:r,controlHeightSM:l,gradientFromColor:i,calc:u}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[o]:Object.assign({display:"inline-block",verticalAlign:"top",background:i,borderRadius:t,width:u(n).mul(2).equal(),minWidth:u(n).mul(2).equal()},ue(n,u))},de(e,n,o)),{[`${o}-lg`]:Object.assign({},ue(r,u))}),de(e,r,`${o}-lg`)),{[`${o}-sm`]:Object.assign({},ue(l,u))}),de(e,l,`${o}-sm`))},Bt=e=>{const{componentCls:t,skeletonAvatarCls:o,skeletonTitleCls:n,skeletonParagraphCls:r,skeletonButtonCls:l,skeletonInputCls:i,skeletonImageCls:u,controlHeight:c,controlHeightLG:g,controlHeightSM:d,gradientFromColor:m,padding:f,marginSM:v,borderRadius:x,titleHeight:C,blockRadius:p,paragraphLiHeight:y,controlHeightXS:h,paragraphMarginTop:S}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[o]:Object.assign({display:"inline-block",verticalAlign:"top",background:m},Q(c)),[`${o}-circle`]:{borderRadius:"50%"},[`${o}-lg`]:Object.assign({},Q(g)),[`${o}-sm`]:Object.assign({},Q(d))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:C,background:m,borderRadius:p,[`+ ${r}`]:{marginBlockStart:d}},[r]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:m,borderRadius:p,"+ li":{marginBlockStart:h}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${r} > li`]:{borderRadius:x}}},[`${t}-with-avatar ${t}-content`]:{[n]:{marginBlockStart:v,[`+ ${r}`]:{marginBlockStart:S}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Rt(e)),It(e)),Tt(e)),Mt(e)),[`${t}${t}-block`]:{width:"100%",[l]:{width:"100%"},[i]:{width:"100%"}},[`${t}${t}-active`]:{[`
@@ -1556,7 +1556,7 @@ html body {
1556
1556
  &:hover {
1557
1557
  opacity: 0.9;
1558
1558
  }
1559
- `;function PF({title:e,content:A,icon:t,onOk:n,onCancel:r}){const i=document.createElement("div");document.body.appendChild(i);const o=NF.createRoot(i),a=()=>{o.unmount(),i.remove()},s=async()=>{n&&await n(),a()},l=()=>{r==null||r(),a()};o.render(lA.jsx(ZF,{children:lA.jsxs(KF,{children:[lA.jsxs(jF,{children:[t&&lA.jsx(LF,{children:t}),e]}),lA.jsx(HF,{children:A}),lA.jsxs(JF,{children:[lA.jsx(eq,{onClick:l,children:"取消"}),lA.jsx(eq,{primary:!0,onClick:s,children:"确定"})]})]})}))}const WF={1:lA.jsx(Me,{name:"ruandianhua"}),2:lA.jsx(Me,{name:"pnhone"}),3:lA.jsx(Me,{name:"sip-phone"})},zF={call_number:"",answer:"接听",reject:"拒接",hangup:"挂机",dtmf:"DTMF",unhold:"取消保持",hold:"保持",mute:"静音",unmute:"取消静音",satisfaction:"满意度",consult:"咨询",consult_transfer:"咨询转接",consult_retrieve:"取回通话",conference:"三方会议",whisper:"耳语",cancel_whisper:"取消耳语",force_insert:"强插",force_disconnect:"强拆"},XF={空闲:1,离线:0,未注册:4},_F=x.lazy(()=>Promise.resolve().then(()=>require("./ConsultModel-tRp-i940.js"))),$F=x.lazy(()=>Promise.resolve().then(()=>require("./TransferModel-DXKknAbe.js"))),du=lt.div`
1559
+ `;function PF({title:e,content:A,icon:t,onOk:n,onCancel:r}){const i=document.createElement("div");document.body.appendChild(i);const o=NF.createRoot(i),a=()=>{o.unmount(),i.remove()},s=async()=>{n&&await n(),a()},l=()=>{r==null||r(),a()};o.render(lA.jsx(ZF,{children:lA.jsxs(KF,{children:[lA.jsxs(jF,{children:[t&&lA.jsx(LF,{children:t}),e]}),lA.jsx(HF,{children:A}),lA.jsxs(JF,{children:[lA.jsx(eq,{onClick:l,children:"取消"}),lA.jsx(eq,{primary:!0,onClick:s,children:"确定"})]})]})}))}const WF={1:lA.jsx(Me,{name:"ruandianhua"}),2:lA.jsx(Me,{name:"pnhone"}),3:lA.jsx(Me,{name:"sip-phone"})},zF={call_number:"",answer:"接听",reject:"拒接",hangup:"挂机",dtmf:"DTMF",unhold:"取消保持",hold:"保持",mute:"静音",unmute:"取消静音",satisfaction:"满意度",consult:"咨询",consult_transfer:"咨询转接",consult_retrieve:"取回通话",conference:"三方会议",whisper:"耳语",cancel_whisper:"取消耳语",force_insert:"强插",force_disconnect:"强拆"},XF={空闲:1,离线:0,未注册:4},_F=x.lazy(()=>Promise.resolve().then(()=>require("./ConsultModel-CzMCpABR.js"))),$F=x.lazy(()=>Promise.resolve().then(()=>require("./TransferModel-C_h0SaCH.js"))),du=lt.div`
1560
1560
  width: 25px;
1561
1561
  height: 25px;
1562
1562
  background: ${({bg:e})=>e};
@@ -1565,4 +1565,4 @@ html body {
1565
1565
  justify-content: center;
1566
1566
  align-items: center;
1567
1567
  //margin-bottom: 5px;
1568
- `,AO=e=>{var YA,ZA,UA;const{style:A,logBuiltinEnabled:t,browserAlertTime:n,enableBrowserAlert:r,agentNo:i,appKey:o,appSecret:a,url:s,onCallBack:l,ringingCardShow:u=!0,onLoginCancel:V,isCheckLogin:d,...h}=e,{height:m,busy:C,idle:f,unavailable:q,selectOutNumberColor:y}=A||{},w=x.useRef(),B=x.useRef(),[M,g]=x.useState(new Audio(GF)),[Q,v]=x.useState(new Audio(kF)),[E,p]=x.useState(),[I,R]=x.useState(),[S,D]=x.useState(!1),[T,F]=x.useState(new Date().getTime()),[O,Y]=x.useState(),[K,H]=x.useState(),[Z,k]=x.useState([]),[_,J]=x.useState([]),[z,W]=x.useState(""),[eA,X]=x.useState(!1),[iA,aA]=x.useState([]),[cA,nA]=x.useState(""),[hA,P]=x.useState(""),[uA,sA]=x.useState(!1),[CA,IA]=x.useState(!1),[fA,QA]=x.useState(),[TA,FA]=x.useState(new Date().getTime()),[EA,gA]=x.useState(!0),SA=b=>{switch(b){case ve.IDLE:return f||"#1D92E9";case ve.BUSY:return C||"#F5212D";case ve.UNREGISTERED:return q||"#faad14";case ve.OFFLINE:return q||"#8c8c8c";default:return"#1D92E9"}};x.useEffect(()=>((async()=>(D(!0),w.current=Ft.getInstance({agentNo:i,appKey:o,appSecret:a,url:s}),KA(),w.current.on(OA.PHONE_BAR_OPERATION,b=>{k(b)}),d?await w.current.agent_api.checkAgentLogin({data:{agent_no:i},success:async b=>{b.data.is_login?PF({title:"当前账号已登录!",icon:lA.jsx(Me,{name:"wing",size:20}),content:"是否继续登录",onOk:async()=>{await w.current.init({...h,logBuiltinEnabled:t,browserAlertTime:n,enableBrowserAlert:r}),B.current=w.current.getAgentData()},onCancel:()=>{V==null||V()}}):(await w.current.init({...h,logBuiltinEnabled:t,browserAlertTime:n,enableBrowserAlert:r}),B.current=w.current.getAgentData())}}):(await w.current.init({...h,logBuiltinEnabled:t,browserAlertTime:n,enableBrowserAlert:r}),B.current=w.current.getAgentData()),F(new Date().getTime()),D(!1)))(),()=>{var b;(b=w.current)==null||b.destroy()}),[]);const KA=()=>{var b,j;(b=w.current)==null||b.on(OA.EVENT_ALL,({event:L,data:pA})=>{switch(L){case tA.OUT_SUCCESS:case tA.CONSULT_RINGING:{WA(M),QA("out");return}case tA.OUT_INCOMING_CALL:{l==null||l(tA.OUT_INCOMING_CALL,{customer_phone:pA.customer_phone,session_id:pA.session_id});return}case tA.PREVIEW_OUT_INCOMING_CALL:{l==null||l(tA.PREVIEW_OUT_INCOMING_CALL,{customer_phone:pA.customer_phone,session_id:pA.session_id,preview_task_id:pA.preview_task_id});return}case tA.OUT_OFF_ANSWER:case tA.OUT_FAILED:case tA.CONSULT_FAILED:case tA.OUT_RINGING:case tA.CONSULT_OFF_HOOK:{zA(M);return}case tA.CONSULT_INCOMING:case tA.TRANSFER_INCOMING_CALL:case tA.LISTEN_INCOMING_CALL:case tA.INCOMING_CALL:{QA("in"),(L===tA.CONSULT_INCOMING||L===tA.TRANSFER_INCOMING_CALL)&&(l==null||l(L,{agent_no:pA.agent_no,agent_name:pA.agent_name,session_id:pA.session_id})),L===tA.INCOMING_CALL&&(l==null||l(tA.INCOMING_CALL,{customer_phone:pA.customer_phone,session_id:pA.session_id})),L===tA.LISTEN_INCOMING_CALL&&(l==null||l(tA.LISTEN_INCOMING_CALL,{session_id:pA.session_id})),WA(Q);return}case tA.PREDICT_INCOMING_CALL:{QA("out"),L===tA.PREDICT_INCOMING_CALL&&(l==null||l(tA.PREDICT_INCOMING_CALL,{customer_phone:pA.customer_phone,session_id:pA.session_id})),WA(Q);return}case tA.TRANSFER_OFF_HOOK:case tA.LISTEN_INCOMING_CALL_OFF_HOOK:case tA.CONSULT_CALL_IN_SUCCESS:case tA.INCOMING_CALL_OFF_HOOK:{L===tA.LISTEN_INCOMING_CALL_OFF_HOOK?l==null||l(L,{session_id:pA.session_id,monitored_agent_no:pA.monitored_agent_no}):l==null||l(L,{session_id:pA.session_id}),zA(Q);return}case tA.OUT_HANGUP:case tA.LISTEN_HANGUP:case tA.LISTEN_CALL_FAILED:case tA.TRANSFER_END:case tA.THREE_WAY_OUR_SIDE_HANGUP:case tA.OUR_SIDE_CONSULT_HANGUP:case tA.OTHER_SIDE_CONSULT_HANGUP:case tA.INCOMING_CALL_END:{l==null||l(L,{session_id:pA.session_id}),zA(Q),zA(M),QA(void 0),sA(!1),IA(!1);return}case tA.REJECT:l==null||l(L,{session_id:pA.session_id});return;default:return null}}),(j=w.current)==null||j.on(tA.AGENT_STATE,L=>{H(L.state_name),F(new Date().getTime()),l==null||l(tA.AGENT_STATE,L)}).on(tA.CALL_PROGRESS,L=>{W(L)}).on(OA.WEBSITE_DELAY,L=>{p(L)}).on(tA.CUSTOMER_INFO,L=>{console.log(L),R(L),L&&gA(!0)}).on(OA.AGENT_INIT_STATUS,L=>{if(L){const{default_device:pA,init_state:NA,out_display_select_switch:ne,out_display_data:JA}=w.current.getAgentData();X(ne===1),ne===1&&aA((JA||"").split("#")),Y(pA),H(NA===1?"空闲":"忙碌"),ue()}}).on(OA.SELECT_EXTERNAL_NUMBER,L=>{nA(L)}).on(OA.FAIL_NOTIFICATION,L=>{be.error(L)}).on(OA.KICK_OFF,()=>{l?l==null||l(OA.KICK_OFF):be.warning("您的座席账号已在别处登录,请重新登录。如非您本人操作,请及时修改密码。"),H("")}).on(OA.DESTROY,()=>{l==null||l(OA.DESTROY),be.success("已离线")}).on(OA.NETWORK_OFFLINE,()=>{be.warning("网络已断开,请检查网络设置。")}).on(OA.NETWORK_ONLINE,()=>{be.success("网络已恢复")}).on(OA.SIGN_OUT,()=>{l==null||l(OA.SIGN_OUT),be.success("已被签出")}).on(tA.LISTEN_CALL_FAILED,()=>{l==null||l(tA.LISTEN_CALL_FAILED),be.error("监听失败")}).on(tA.EAR_SPEECH_SUCCESS,({monitored_agent_no:L})=>{l==null||l(tA.EAR_SPEECH_SUCCESS,{monitored_agent_no:L}),be.success("正在耳语")}).on(tA.EAR_SPEECH_BE_SUCCESS,({monitor_agent_no:L})=>{l==null||l(tA.EAR_SPEECH_BE_SUCCESS,{monitor_agent_no:L}),be.success(`${L}正在与你耳语`)}).on(tA.EAR_SPEECH_FAILED,()=>{l==null||l(tA.EAR_SPEECH_FAILED),be.error("耳语失败")}).on(tA.STOP_EAR_SPEECH_SUCCESS,()=>{l==null||l(tA.STOP_EAR_SPEECH_SUCCESS),be.success("停止耳语")}).on(tA.CALL_FORCE_INSERT_SUCCESS,({monitored_agent_no:L,monitor_agent_no:pA})=>{l==null||l(tA.CALL_FORCE_INSERT_SUCCESS,{monitored_agent_no:L,monitor_agent_no:pA}),be.success("强插成功")}).on(tA.CALL_FORCE_INSERT_SUCCESS_LISTENER,({monitored_agent_no:L,monitor_agent_no:pA})=>{l==null||l(tA.CALL_FORCE_INSERT_SUCCESS_LISTENER,{monitored_agent_no:L,monitor_agent_no:pA}),be.success(`${pA}强插`)}).on(OA.SIGN_IN_SWITCH_DEVICE,L=>{l==null||l(OA.SIGN_IN_SWITCH_DEVICE),be.success(`已被切换${L.answer_device===2?"手机模式":"SIP 话机"}设备`)})};x.useEffect(()=>{var b;(b=w.current)==null||b.setBrowserAlertTime(n||3)},[n]),x.useEffect(()=>{var b;(b=w.current)==null||b.setBrowserAlert(r||!1)},[r]);const WA=b=>{b.currentTime=0,b.loop=!0,b.play()},zA=b=>{b.pause()},jA=async b=>{var j;try{await((j=w.current)==null?void 0:j.agent_api.changeDevice({data:{device:b},success:()=>{Y(b),be.success("切换设备成功")}}))}catch{}},GA=async(b,j)=>{var L;try{await((L=w.current)==null?void 0:L.agent_api.changeState({data:{state:b,state_name:j},success:()=>{H(j),be.success("切换状态成功")}}))}catch{}},XA=async b=>{var j;try{await((j=w.current)==null?void 0:j.agent_api.setAgentExplicit({data:{number:b},success:()=>{be.success(`切换[${b}]外显号码成功`)}}))}catch{}},ue=async()=>{var b;try{await((b=w.current)==null?void 0:b.agent_api.getAgentState({success:j=>{J(j.data)}}))}catch{}},Ae=async b=>{var j;try{await((j=w.current)==null?void 0:j.call_api.makeCall(b))}catch(L){const{msg:pA}=JSON.parse(L.message);be.warning(pA)}},bA=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.answerCall())}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},wA=async()=>{var b;try{(b=w.current)==null||b.call_api.cancelCall()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},se=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.hangup())}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},le=async()=>{var b;try{(b=w.current)==null||b.call_api.holdCall()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},qe=()=>{var b;(b=w.current)==null||b.call_api.unholdCall()},De=async b=>{var j;try{await((j=w.current)==null?void 0:j.call_api.consultCall(b))}catch(L){const{msg:pA}=JSON.parse(L.message);be.warning(pA)}},_e=async()=>{var b;try{(b=w.current)==null||b.call_api.consultRetrieve()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},ze=async()=>{var b;try{(b=w.current)==null||b.call_api.consultTransfer()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},tt=()=>{var b;try{(b=w.current)==null||b.call_api.mute()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},$e=()=>{var b;try{(b=w.current)==null||b.call_api.unmute()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},He=()=>{var b;try{(b=w.current)==null||b.call_api.satisfactionEvaluation()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},Qe=()=>{var b;try{(b=w.current)==null||b.call_api.startConference()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},fe=async b=>{var j;try{await((j=w.current)==null?void 0:j.call_api.transferAgent(b))}catch(L){const{msg:pA}=JSON.parse(L.message);be.warning(pA)}},LA=async b=>{var j;try{await((j=w.current)==null?void 0:j.call_api.transferOutline(b))}catch(L){const{msg:pA}=JSON.parse(L.message);be.warning(pA)}},_A=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.earSpeakStart({success:()=>{}}))}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},MA=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.earSpeakStop({success:()=>{}}))}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},re=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.forceInsert({}))}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},me=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.forceDisconnect({}))}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},RA=lA.jsx(TF,{onPressEnter:b=>{b&&Ae(b)}},TA),vA=x.useMemo(()=>[{name:"call_number",icon:lA.jsx(ra,{trigger:"click",rootClassName:"call-number-popover",destroyTooltipOnHide:!0,onOpenChange:j=>{FA(new Date().getTime())},content:RA,children:lA.jsx("span",{children:lA.jsx(Me,{name:"boda",color:"#48D866",size:25})})})},{name:"answer",icon:lA.jsx(Me,{name:"jieting",onClick:bA,size:25})},{name:"hold",icon:lA.jsx(Me,{name:"baochi",color:"#1D92E9",onClick:le,size:25})},{name:"unhold",icon:lA.jsx(Me,{name:"quxiaobaochi",color:"#1D92E9",onClick:qe,size:25})},{name:"mute",icon:lA.jsx(Me,{name:"mk",onClick:tt,color:"#1D92E9",size:25})},{name:"unmute",icon:lA.jsx(Me,{name:"guanbimk",onClick:$e,color:"#1D92E9",size:25})},{name:"satisfaction",icon:lA.jsx(Me,{name:"manyidu",onClick:He,size:25})},{name:"consult",icon:lA.jsx(Me,{name:"zixun",onClick:()=>{sA(!0)},size:25})},{name:"consult_transfer",icon:lA.jsx(Me,{name:"zhuanjie",onClick:ze,size:25})},{name:"transfer",icon:lA.jsx(Me,{size:25,name:"zhuanjie",onClick:()=>{IA(!0)}})},{name:"consult_retrieve",icon:lA.jsx(Me,{name:"fanhui",color:"#ffc53d",size:25,onClick:_e})},{name:"conference",icon:lA.jsx(Me,{name:"huiyi",onClick:Qe,size:25})},{name:"whisper",icon:lA.jsx(du,{bg:"#1D92E9",children:lA.jsx(Me,{name:"whisper",size:15,color:"#fff",onClick:_A})})},{name:"cancel_whisper",icon:lA.jsx(du,{bg:"red",children:lA.jsx(Me,{name:"cancel_whisper",size:15,color:"#fff",onClick:MA})})},{name:"force_insert",icon:lA.jsx(du,{bg:"#1D92E9",children:lA.jsx(Me,{name:"force_insert",size:15,color:"#fff",onClick:re})})},{name:"force_disconnect",icon:lA.jsx(Me,{name:"force_disconnect",onClick:me,size:25})},{name:"reject",icon:lA.jsx(Me,{name:"jujie",color:"red",onClick:wA,size:25})},{name:"hangup",icon:lA.jsx(Me,{name:"guaji",color:"red",onClick:se,size:25})}].filter(({name:j})=>Z.includes(j)),[Z]);return lA.jsx(lA.Fragment,{children:lA.jsxs(rr,{prefixCls:"ysyt",theme:{components:{Select:{selectorBg:"none"}}},children:[K?lA.jsx(Vc,{spinning:S,children:lA.jsxs(IS,{height:m,children:[lA.jsx(yS,{children:lA.jsx(yi,{variant:"underlined",value:O,onChange:b=>{jA(b)},options:(((YA=B.current)==null?void 0:YA.answer_devices)||[]).map(b=>({...b,label:lA.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[WF[b.value],lA.jsx("span",{style:{marginLeft:5},children:b.label})]})})),style:{width:140}})}),lA.jsxs(wS,{background:SA(XF[K]??2),children:[lA.jsxs("div",{className:"ysyt-strip",children:[lA.jsx("div",{children:z?lA.jsx("span",{className:"ysyt-strip-state-name",children:z}):lA.jsx(cE,{trigger:["click"],menu:{items:_.map(b=>({label:lA.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[b.state===1?lA.jsx(Me,{name:"kongxian",color:"#7cb305",size:16}):lA.jsx(Me,{name:"manglu",color:"#f5222d",size:16}),lA.jsx("span",{style:{marginLeft:10},children:b.state_name})]}),key:b.state_name,onClick:()=>{GA(b.state,b.state_name)}}))},children:lA.jsxs("div",{style:{color:"#fff",cursor:"pointer",display:"flex",alignItems:"center"},children:[K==="空闲"?lA.jsx(Me,{name:"kongxian",color:"#fff",size:20}):lA.jsx(lA.Fragment,{children:K==="未注册"?lA.jsx(Me,{name:"unregistered",size:20}):lA.jsx(Me,{name:"manglu2",size:20})}),lA.jsx("span",{style:{margin:"0 10px"},children:K}),lA.jsx(Me,{name:"xia",color:"#fff"})]})})}),lA.jsx("div",{className:"ysyt-strip-time",children:lA.jsx(UF,{},T)}),u&&I&&lA.jsx("div",{className:"ysyt-strip-call-card",onClick:()=>gA(!EA),children:EA?lA.jsx(Me,{name:"unopen",color:"#fff"}):lA.jsx(Me,{name:"open",color:"#fff"})})]}),lA.jsx("div",{className:"ysyt-action",children:vA.map(({name:b,icon:j})=>lA.jsx(Ka,{title:zF[b],children:j},b))}),eA&&lA.jsx(FS,{children:lA.jsx("div",{children:lA.jsx(ra,{trigger:"click",title:"外显号码池",onOpenChange:b=>{b||P("")},content:lA.jsxs(OS,{children:[lA.jsx("div",{children:lA.jsx(_r,{value:hA,placeholder:"请输入外显号码",onChange:b=>P(b.target.value)})}),lA.jsx("div",{className:"ysyt-number-content",children:lA.jsx(Ua.Group,{value:cA,onChange:b=>{XA(b.target.value)},options:iA.filter(b=>b.includes(hA)).map(b=>({label:lA.jsx(US,{style:{color:cA===b?"#1D92E9":""},children:b},b),value:b}))})})]}),children:lA.jsxs("div",{style:{fontSize:14,cursor:"pointer",color:y||"#333",display:"flex",alignItems:"center"},children:[lA.jsx(Me,{name:"external",color:y||"#333"}),lA.jsx("span",{style:{margin:"0 5px"},children:"外显号码"}),lA.jsx(Me,{name:"xia",color:y||"#333"})]})})})})]}),lA.jsx(RS,{children:E&&E.rtt&&lA.jsx("div",{children:lA.jsx(ra,{content:lA.jsxs("div",{children:[lA.jsxs("div",{children:["延迟: ",E.rtt,"ms"]}),E.jitter&&lA.jsxs("div",{children:["抖动: ",E.jitter,"ms"]}),lA.jsxs("div",{children:["丢包: ",E.packetsLost||0]}),E.packetsReceived?lA.jsxs("div",{children:["接收: ",E.packetsReceived]}):null,E.packetsSent?lA.jsxs("div",{children:["发送: ",E.packetsSent]}):null,E.sendBitrate?lA.jsxs("div",{children:["发送码率: ",E.sendBitrate,"KB/s"]}):null,E.recvBitrate?lA.jsxs("div",{children:["接收码率: ",E.recvBitrate,"KB/s"]}):null]}),placement:"bottomLeft",children:lA.jsxs("div",{style:{padding:"0 10px"},children:[E.rtt>=250?lA.jsx(Me,{name:"wifi1"}):"",E.rtt>=121&&E.rtt<250?lA.jsx(Me,{name:"wifi2"}):"",E.rtt<=120?lA.jsx(Me,{name:"wifi3"}):""]})})})}),u&&lA.jsxs(TS,{height:m,show:!!I&&EA,children:[lA.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:10},children:[lA.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[(I==null?void 0:I.is_vip)===1&&lA.jsx(Me,{name:"vip"}),lA.jsx("span",{style:{marginLeft:5},children:I==null?void 0:I.customer_name})]}),lA.jsx("b",{children:I==null?void 0:I.phone})]}),lA.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[lA.jsxs("span",{children:[I==null?void 0:I.province,"-",I==null?void 0:I.city]}),fA&&lA.jsxs("span",{children:["当月",fA==="out"?"呼出次数:":"呼入次数:",lA.jsx("span",{style:{color:"#1D92E9"},children:fA==="out"?I==null?void 0:I.contact_count_month:I==null?void 0:I.in_contact_count_month})]})]}),lA.jsx("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center"},children:fA&&lA.jsxs("span",{children:["总",fA==="out"?"呼出次数:":"呼入次数:",lA.jsx("span",{style:{color:"#1D92E9"},children:fA==="out"?(I==null?void 0:I.contact_count)||0:(I==null?void 0:I.in_contact_count)||0})]})})]})]})}):lA.jsx(lA.Fragment,{}),lA.jsx(x.Suspense,{children:uA&&((ZA=w.current)==null?void 0:ZA.agent_api)&&lA.jsx(_F,{open:uA,queryFetch:w.current.agent_api.getIdleAgentList,onCallBack:b=>{sA(!1),b&&De(b)}})}),lA.jsx(x.Suspense,{children:CA&&((UA=w.current)==null?void 0:UA.agent_api)&&lA.jsx($F,{open:CA,queryFetch:w.current.agent_api.getIdleAgentList,onCallBack:(b,j)=>{IA(!1),b&&(j===0?fe(b):j===1&&LA(b))}})})]})})},eO=e=>{var A;return(A=Ft.getInstance())==null?void 0:A.call_api.makeCall(e)},tO=()=>{var e;return(e=Ft.getInstance())==null?void 0:e.getRealTimeCustomerInfo()},nO=async e=>{var A,t;if(e!==ve.IDLE&&e!==ve.BUSY)throw new Error("Invalid agent state");try{await((t=(A=Ft.getInstance())==null?void 0:A.agent_api)==null?void 0:t.changeState({data:{state:e,state_name:e===ve.IDLE?"空闲":"忙碌"}}))}catch(n){console.error(n)}},rO=async e=>{var A,t;try{await((t=(A=Ft.getInstance())==null?void 0:A.agent_api)==null?void 0:t.changeDevice({data:{device:e}}))}catch(n){console.error(n)}},iO=async(e=!1,A)=>{var t,n;try{await((n=(t=Ft.getInstance())==null?void 0:t.agent_api)==null?void 0:n.agentLogout({data:{offline_answer:e},success:()=>{A==null||A()}}))}catch(r){console.log(r)}},oO=async(e,A)=>{var t,n;(n=(t=Ft.getInstance())==null?void 0:t.call_api)==null||n.previewMakeCall(e,A)},aO=async e=>{var A,t;try{await((t=(A=Ft.getInstance())==null?void 0:A.agent_api)==null?void 0:t.listenAgentCall({data:{monitored_agent_no:e},success:()=>{be.success("监听坐席通话成功")}}))}catch(n){console.error(n)}},sO=async()=>{var e,A;try{await((A=(e=Ft.getInstance())==null?void 0:e.call_api)==null?void 0:A.earSpeakStart({}))}catch(t){console.log(t)}},lO=async()=>{var e,A;try{await((A=(e=Ft.getInstance())==null?void 0:e.call_api)==null?void 0:A.earSpeakStop({}))}catch(t){console.log(t)}},cO=async()=>{var e,A;try{await((A=(e=Ft.getInstance())==null?void 0:e.call_api)==null?void 0:A.forceInsert({}))}catch(t){console.log(t)}},uO=async()=>{var e,A;try{await((A=(e=Ft.getInstance())==null?void 0:e.call_api)==null?void 0:A.forceDisconnect({}))}catch(t){console.log(t)}};exports.Button=qi;exports.CONTAINER_MAX_OFFSET=ig;exports.CSSMotion=vi;exports.ConfigContext=Ge;exports.ConfigProvider=rr;exports.ContextIsolator=Ca;exports.DisabledContextProvider=A0;exports.Empty=hr;exports.FastColor=je;exports.Input=_r;exports.KeyCode=oe;exports.Keyframe=Ue;exports.ModelBody=bS;exports.Portal=nc;exports.Radio=Ua;exports.RefIcon=lc;exports.RefIcon$1=wg;exports.RefIcon$2=Ga;exports.RefIcon$3=yg;exports.RefIcon$4=Mg;exports.Space=sc;exports.Spin=Vc;exports.Wave=Ll;exports.YsytBarPhone=AO;exports.YsytIconSvg=Me;exports._extends=DA;exports._objectSpread2=G;exports._slicedToArray=AA;exports._toConsumableArray=yA;exports._typeof=te;exports.agentLogout=iO;exports.callForceInsert=cO;exports.callForceSplit=uO;exports.canUseDom=kt;exports.classNames=oA;exports.clearFix=Zs;exports.contains=lq;exports.convertLegacyProps=Sx;exports.devUseWarning=st;exports.genFocusStyle=Ks;exports.genPresetColor=Pq;exports.genStyleHooks=Rt;exports.genSubStyleComponent=Jq;exports.getConfirmLocale=ny;exports.getCustomerInfo=tO;exports.getReactRender=lg;exports.getTransitionName=zl;exports.globalConfig=Fd;exports.initMotion=Zl;exports.initZoomMotion=Ra;exports.isPresetColor=rE;exports.isPresetStatusColor=e2;exports.jsxRuntimeExports=lA;exports.listenCall=aO;exports.localeValues=hi;exports.makeCall=eO;exports.merge=Pe;exports.omit=nn;exports.pickAttrs=Hr;exports.previewMakeCall=oO;exports.replaceElement=jC;exports.resetComponent=Pt;exports.setAgentDevice=rO;exports.setAgentInitState=nO;exports.startEarSpeak=sO;exports.stopEarSpeak=lO;exports.unit=mA;exports.useCSSVarCls=Ln;exports.useComponentConfig=nr;exports.useComposeRef=Wr;exports.useEvent=rt;exports.useId=Hl;exports.useLocale=Sl;exports.useSafeState=lo;exports.useToken=pn;exports.useZIndex=Da;exports.warnContext=h0;exports.warning=Kr;exports.withPureRenderTheme=Gv;exports.zIndexContext=xa;
1568
+ `,AO=e=>{var YA,ZA,UA;const{style:A,logBuiltinEnabled:t,browserAlertTime:n,enableBrowserAlert:r,agentNo:i,appKey:o,appSecret:a,url:s,onCallBack:l,ringingCardShow:u=!0,onLoginCancel:V,isCheckLogin:d,...h}=e,{height:m,busy:C,idle:f,unavailable:q,selectOutNumberColor:y}=A||{},w=x.useRef(),B=x.useRef(),[M,g]=x.useState(new Audio(GF)),[Q,v]=x.useState(new Audio(kF)),[E,p]=x.useState(),[I,R]=x.useState(),[S,D]=x.useState(!1),[T,F]=x.useState(new Date().getTime()),[O,Y]=x.useState(),[K,H]=x.useState(),[Z,k]=x.useState([]),[_,J]=x.useState([]),[z,W]=x.useState(""),[eA,X]=x.useState(!1),[iA,aA]=x.useState([]),[cA,nA]=x.useState(""),[hA,P]=x.useState(""),[uA,sA]=x.useState(!1),[CA,IA]=x.useState(!1),[fA,QA]=x.useState(),[TA,FA]=x.useState(new Date().getTime()),[EA,gA]=x.useState(!0),SA=b=>{switch(b){case ve.IDLE:return f||"#1D92E9";case ve.BUSY:return C||"#F5212D";case ve.UNREGISTERED:return q||"#faad14";case ve.OFFLINE:return q||"#8c8c8c";default:return"#1D92E9"}};x.useEffect(()=>((async()=>(D(!0),w.current=Ft.getInstance({agentNo:i,appKey:o,appSecret:a,url:s}),KA(),w.current.on(OA.PHONE_BAR_OPERATION,b=>{k(b)}),d?await w.current.agent_api.checkAgentLogin({data:{agent_no:i},success:async b=>{b.data.is_login?PF({title:"当前账号已登录!",icon:lA.jsx(Me,{name:"wing",size:20}),content:"是否继续登录",onOk:async()=>{await w.current.init({...h,logBuiltinEnabled:t,browserAlertTime:n,enableBrowserAlert:r}),B.current=w.current.getAgentData()},onCancel:()=>{V==null||V()}}):(await w.current.init({...h,logBuiltinEnabled:t,browserAlertTime:n,enableBrowserAlert:r}),B.current=w.current.getAgentData())}}):(await w.current.init({...h,logBuiltinEnabled:t,browserAlertTime:n,enableBrowserAlert:r}),B.current=w.current.getAgentData()),F(new Date().getTime()),D(!1)))(),()=>{var b;(b=w.current)==null||b.destroy()}),[]);const KA=()=>{var b,j;(b=w.current)==null||b.on(OA.EVENT_ALL,({event:L,data:pA})=>{switch(L){case tA.OUT_SUCCESS:case tA.CONSULT_RINGING:{WA(M),QA("out");return}case tA.OUT_INCOMING_CALL:{l==null||l(tA.OUT_INCOMING_CALL,{customer_phone:pA.customer_phone,session_id:pA.session_id});return}case tA.PREVIEW_OUT_INCOMING_CALL:{l==null||l(tA.PREVIEW_OUT_INCOMING_CALL,{customer_phone:pA.customer_phone,session_id:pA.session_id,preview_task_id:pA.preview_task_id});return}case tA.OUT_OFF_ANSWER:case tA.OUT_FAILED:case tA.CONSULT_FAILED:case tA.OUT_RINGING:case tA.CONSULT_OFF_HOOK:{zA(M);return}case tA.CONSULT_INCOMING:case tA.TRANSFER_INCOMING_CALL:case tA.LISTEN_INCOMING_CALL:case tA.INCOMING_CALL:{QA("in"),(L===tA.CONSULT_INCOMING||L===tA.TRANSFER_INCOMING_CALL)&&(l==null||l(L,{agent_no:pA.agent_no,agent_name:pA.agent_name,session_id:pA.session_id})),L===tA.INCOMING_CALL&&(l==null||l(tA.INCOMING_CALL,{customer_phone:pA.customer_phone,session_id:pA.session_id})),L===tA.LISTEN_INCOMING_CALL&&(l==null||l(tA.LISTEN_INCOMING_CALL,{session_id:pA.session_id})),WA(Q);return}case tA.PREDICT_INCOMING_CALL:{QA("out"),L===tA.PREDICT_INCOMING_CALL&&(l==null||l(tA.PREDICT_INCOMING_CALL,{customer_phone:pA.customer_phone,session_id:pA.session_id})),WA(Q);return}case tA.TRANSFER_OFF_HOOK:case tA.LISTEN_INCOMING_CALL_OFF_HOOK:case tA.CONSULT_CALL_IN_SUCCESS:case tA.INCOMING_CALL_OFF_HOOK:{L===tA.LISTEN_INCOMING_CALL_OFF_HOOK?l==null||l(L,{session_id:pA.session_id,monitored_agent_no:pA.monitored_agent_no}):l==null||l(L,{session_id:pA.session_id}),zA(Q);return}case tA.OUT_HANGUP:case tA.LISTEN_HANGUP:case tA.LISTEN_CALL_FAILED:case tA.TRANSFER_END:case tA.THREE_WAY_OUR_SIDE_HANGUP:case tA.OUR_SIDE_CONSULT_HANGUP:case tA.OTHER_SIDE_CONSULT_HANGUP:case tA.INCOMING_CALL_END:{l==null||l(L,{session_id:pA.session_id}),zA(Q),zA(M),QA(void 0),sA(!1),IA(!1);return}case tA.REJECT:l==null||l(L,{session_id:pA.session_id});return;default:return null}}),(j=w.current)==null||j.on(tA.AGENT_STATE,L=>{H(L.state_name),F(new Date().getTime()),l==null||l(tA.AGENT_STATE,L)}).on(tA.CALL_PROGRESS,L=>{W(L)}).on(OA.WEBSITE_DELAY,L=>{p(L)}).on(tA.CUSTOMER_INFO,L=>{console.log(L),R(L),L&&gA(!0)}).on(OA.AGENT_INIT_STATUS,L=>{if(L){const{default_device:pA,init_state:NA,out_display_select_switch:ne,out_display_data:JA}=w.current.getAgentData();X(ne===1),ne===1&&aA((JA||"").split("#")),Y(pA),H(NA===1?"空闲":"忙碌"),ue()}}).on(OA.SELECT_EXTERNAL_NUMBER,L=>{nA(L)}).on(OA.FAIL_NOTIFICATION,L=>{be.error(L)}).on(OA.KICK_OFF,()=>{l?l==null||l(OA.KICK_OFF):be.warning("您的座席账号已在别处登录,请重新登录。如非您本人操作,请及时修改密码。"),H("")}).on(OA.DESTROY,()=>{l==null||l(OA.DESTROY),be.success("已离线")}).on(OA.NETWORK_OFFLINE,()=>{be.warning("网络已断开,请检查网络设置。")}).on(OA.NETWORK_ONLINE,()=>{be.success("网络已恢复")}).on(OA.SIGN_OUT,()=>{l==null||l(OA.SIGN_OUT),be.success("已被签出")}).on(tA.LISTEN_CALL_FAILED,()=>{l==null||l(tA.LISTEN_CALL_FAILED),be.error("监听失败")}).on(tA.EAR_SPEECH_SUCCESS,({monitored_agent_no:L})=>{l==null||l(tA.EAR_SPEECH_SUCCESS,{monitored_agent_no:L}),be.success("正在耳语")}).on(tA.EAR_SPEECH_BE_SUCCESS,({monitor_agent_no:L})=>{l==null||l(tA.EAR_SPEECH_BE_SUCCESS,{monitor_agent_no:L}),be.success(`${L}正在与你耳语`)}).on(tA.EAR_SPEECH_FAILED,()=>{l==null||l(tA.EAR_SPEECH_FAILED),be.error("耳语失败")}).on(tA.STOP_EAR_SPEECH_SUCCESS,()=>{l==null||l(tA.STOP_EAR_SPEECH_SUCCESS),be.success("停止耳语")}).on(tA.CALL_FORCE_INSERT_SUCCESS,({monitored_agent_no:L,monitor_agent_no:pA})=>{l==null||l(tA.CALL_FORCE_INSERT_SUCCESS,{monitored_agent_no:L,monitor_agent_no:pA}),be.success("强插成功")}).on(tA.CALL_FORCE_INSERT_SUCCESS_LISTENER,({monitored_agent_no:L,monitor_agent_no:pA})=>{l==null||l(tA.CALL_FORCE_INSERT_SUCCESS_LISTENER,{monitored_agent_no:L,monitor_agent_no:pA}),be.success(`${pA}强插`)}).on(OA.SIGN_IN_SWITCH_DEVICE,L=>{l==null||l(OA.SIGN_IN_SWITCH_DEVICE),be.success(`已被切换${L.answer_device===2?"手机模式":"SIP 话机"}设备`)})};x.useEffect(()=>{var b;(b=w.current)==null||b.setBrowserAlertTime(n||3)},[n]),x.useEffect(()=>{var b;(b=w.current)==null||b.setBrowserAlert(r||!1)},[r]);const WA=b=>{b.currentTime=0,b.loop=!0,b.play()},zA=b=>{b.pause()},jA=async b=>{var j;try{await((j=w.current)==null?void 0:j.agent_api.changeDevice({data:{device:b},success:()=>{Y(b),be.success("切换设备成功")}}))}catch{}},GA=async(b,j)=>{var L;try{await((L=w.current)==null?void 0:L.agent_api.changeState({data:{state:b,state_name:j},success:()=>{H(j),be.success("切换状态成功")}}))}catch{}},XA=async b=>{var j;try{await((j=w.current)==null?void 0:j.agent_api.setAgentExplicit({data:{number:b},success:()=>{be.success(`切换[${b}]外显号码成功`)}}))}catch{}},ue=async()=>{var b;try{await((b=w.current)==null?void 0:b.agent_api.getAgentState({success:j=>{J(j.data)}}))}catch{}},Ae=async b=>{var j;try{await((j=w.current)==null?void 0:j.call_api.makeCall(b))}catch(L){const{msg:pA}=JSON.parse(L.message);be.warning(pA)}},bA=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.answerCall())}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},wA=async()=>{var b;try{(b=w.current)==null||b.call_api.cancelCall()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},se=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.hangup())}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},le=async()=>{var b;try{(b=w.current)==null||b.call_api.holdCall()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},qe=()=>{var b;(b=w.current)==null||b.call_api.unholdCall()},De=async b=>{var j;try{await((j=w.current)==null?void 0:j.call_api.consultCall(b))}catch(L){const{msg:pA}=JSON.parse(L.message);be.warning(pA)}},_e=async()=>{var b;try{(b=w.current)==null||b.call_api.consultRetrieve()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},ze=async()=>{var b;try{(b=w.current)==null||b.call_api.consultTransfer()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},tt=()=>{var b;try{(b=w.current)==null||b.call_api.mute()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},$e=()=>{var b;try{(b=w.current)==null||b.call_api.unmute()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},He=()=>{var b;try{(b=w.current)==null||b.call_api.satisfactionEvaluation()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},Qe=()=>{var b;try{(b=w.current)==null||b.call_api.startConference()}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},fe=async b=>{var j;try{await((j=w.current)==null?void 0:j.call_api.transferAgent(b))}catch(L){const{msg:pA}=JSON.parse(L.message);be.warning(pA)}},LA=async b=>{var j;try{await((j=w.current)==null?void 0:j.call_api.transferOutline(b))}catch(L){const{msg:pA}=JSON.parse(L.message);be.warning(pA)}},_A=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.earSpeakStart({success:()=>{}}))}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},MA=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.earSpeakStop({success:()=>{}}))}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},re=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.forceInsert({}))}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},me=async()=>{var b;try{await((b=w.current)==null?void 0:b.call_api.forceDisconnect({}))}catch(j){const{msg:L}=JSON.parse(j.message);be.warning(L)}},RA=lA.jsx(TF,{onPressEnter:b=>{b&&Ae(b)}},TA),vA=x.useMemo(()=>[{name:"call_number",icon:lA.jsx(ra,{trigger:"click",rootClassName:"call-number-popover",destroyTooltipOnHide:!0,onOpenChange:j=>{FA(new Date().getTime())},content:RA,children:lA.jsx("span",{children:lA.jsx(Me,{name:"boda",color:"#48D866",size:25})})})},{name:"answer",icon:lA.jsx(Me,{name:"jieting",onClick:bA,size:25})},{name:"hold",icon:lA.jsx(Me,{name:"baochi",color:"#1D92E9",onClick:le,size:25})},{name:"unhold",icon:lA.jsx(Me,{name:"quxiaobaochi",color:"#1D92E9",onClick:qe,size:25})},{name:"mute",icon:lA.jsx(Me,{name:"mk",onClick:tt,color:"#1D92E9",size:25})},{name:"unmute",icon:lA.jsx(Me,{name:"guanbimk",onClick:$e,color:"#1D92E9",size:25})},{name:"satisfaction",icon:lA.jsx(Me,{name:"manyidu",onClick:He,size:25})},{name:"consult",icon:lA.jsx(Me,{name:"zixun",onClick:()=>{sA(!0)},size:25})},{name:"consult_transfer",icon:lA.jsx(Me,{name:"zhuanjie",onClick:ze,size:25})},{name:"transfer",icon:lA.jsx(Me,{size:25,name:"zhuanjie",onClick:()=>{IA(!0)}})},{name:"consult_retrieve",icon:lA.jsx(Me,{name:"fanhui",color:"#ffc53d",size:25,onClick:_e})},{name:"conference",icon:lA.jsx(Me,{name:"huiyi",onClick:Qe,size:25})},{name:"whisper",icon:lA.jsx(du,{bg:"#1D92E9",children:lA.jsx(Me,{name:"whisper",size:15,color:"#fff",onClick:_A})})},{name:"cancel_whisper",icon:lA.jsx(du,{bg:"red",children:lA.jsx(Me,{name:"cancel_whisper",size:15,color:"#fff",onClick:MA})})},{name:"force_insert",icon:lA.jsx(du,{bg:"#1D92E9",children:lA.jsx(Me,{name:"force_insert",size:15,color:"#fff",onClick:re})})},{name:"force_disconnect",icon:lA.jsx(Me,{name:"force_disconnect",onClick:me,size:25})},{name:"reject",icon:lA.jsx(Me,{name:"jujie",color:"red",onClick:wA,size:25})},{name:"hangup",icon:lA.jsx(Me,{name:"guaji",color:"red",onClick:se,size:25})}].filter(({name:j})=>Z.includes(j)),[Z]);return lA.jsx(lA.Fragment,{children:lA.jsxs(rr,{prefixCls:"ysyt",theme:{components:{Select:{selectorBg:"none"}}},children:[K?lA.jsx(Vc,{spinning:S,children:lA.jsxs(IS,{height:m,children:[lA.jsx(yS,{children:lA.jsx(yi,{variant:"underlined",value:O,onChange:b=>{jA(b)},options:(((YA=w.current.getAgentData())==null?void 0:YA.answer_devices)||[]).map(b=>({...b,label:lA.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[WF[b.value],lA.jsx("span",{style:{marginLeft:5},children:b.label})]})})),style:{width:140}})}),lA.jsxs(wS,{background:SA(XF[K]??2),children:[lA.jsxs("div",{className:"ysyt-strip",children:[lA.jsx("div",{children:z?lA.jsx("span",{className:"ysyt-strip-state-name",children:z}):lA.jsx(cE,{trigger:["click"],menu:{items:_.map(b=>({label:lA.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[b.state===1?lA.jsx(Me,{name:"kongxian",color:"#7cb305",size:16}):lA.jsx(Me,{name:"manglu",color:"#f5222d",size:16}),lA.jsx("span",{style:{marginLeft:10},children:b.state_name})]}),key:b.state_name,onClick:()=>{GA(b.state,b.state_name)}}))},children:lA.jsxs("div",{style:{color:"#fff",cursor:"pointer",display:"flex",alignItems:"center"},children:[K==="空闲"?lA.jsx(Me,{name:"kongxian",color:"#fff",size:20}):lA.jsx(lA.Fragment,{children:K==="未注册"?lA.jsx(Me,{name:"unregistered",size:20}):lA.jsx(Me,{name:"manglu2",size:20})}),lA.jsx("span",{style:{margin:"0 10px"},children:K}),lA.jsx(Me,{name:"xia",color:"#fff"})]})})}),lA.jsx("div",{className:"ysyt-strip-time",children:lA.jsx(UF,{},T)}),u&&I&&lA.jsx("div",{className:"ysyt-strip-call-card",onClick:()=>gA(!EA),children:EA?lA.jsx(Me,{name:"unopen",color:"#fff"}):lA.jsx(Me,{name:"open",color:"#fff"})})]}),lA.jsx("div",{className:"ysyt-action",children:vA.map(({name:b,icon:j})=>lA.jsx(Ka,{title:zF[b],children:j},b))}),eA&&lA.jsx(FS,{children:lA.jsx("div",{children:lA.jsx(ra,{trigger:"click",title:"外显号码池",onOpenChange:b=>{b||P("")},content:lA.jsxs(OS,{children:[lA.jsx("div",{children:lA.jsx(_r,{value:hA,placeholder:"请输入外显号码",onChange:b=>P(b.target.value)})}),lA.jsx("div",{className:"ysyt-number-content",children:lA.jsx(Ua.Group,{value:cA,onChange:b=>{XA(b.target.value)},options:iA.filter(b=>b.includes(hA)).map(b=>({label:lA.jsx(US,{style:{color:cA===b?"#1D92E9":""},children:b},b),value:b}))})})]}),children:lA.jsxs("div",{style:{fontSize:14,cursor:"pointer",color:y||"#333",display:"flex",alignItems:"center"},children:[lA.jsx(Me,{name:"external",color:y||"#333"}),lA.jsx("span",{style:{margin:"0 5px"},children:"外显号码"}),lA.jsx(Me,{name:"xia",color:y||"#333"})]})})})})]}),lA.jsx(RS,{children:E&&E.rtt&&lA.jsx("div",{children:lA.jsx(ra,{content:lA.jsxs("div",{children:[lA.jsxs("div",{children:["延迟: ",E.rtt,"ms"]}),E.jitter&&lA.jsxs("div",{children:["抖动: ",E.jitter,"ms"]}),lA.jsxs("div",{children:["丢包: ",E.packetsLost||0]}),E.packetsReceived?lA.jsxs("div",{children:["接收: ",E.packetsReceived]}):null,E.packetsSent?lA.jsxs("div",{children:["发送: ",E.packetsSent]}):null,E.sendBitrate?lA.jsxs("div",{children:["发送码率: ",E.sendBitrate,"KB/s"]}):null,E.recvBitrate?lA.jsxs("div",{children:["接收码率: ",E.recvBitrate,"KB/s"]}):null]}),placement:"bottomLeft",children:lA.jsxs("div",{style:{padding:"0 10px"},children:[E.rtt>=250?lA.jsx(Me,{name:"wifi1"}):"",E.rtt>=121&&E.rtt<250?lA.jsx(Me,{name:"wifi2"}):"",E.rtt<=120?lA.jsx(Me,{name:"wifi3"}):""]})})})}),u&&lA.jsxs(TS,{height:m,show:!!I&&EA,children:[lA.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:10},children:[lA.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[(I==null?void 0:I.is_vip)===1&&lA.jsx(Me,{name:"vip"}),lA.jsx("span",{style:{marginLeft:5},children:I==null?void 0:I.customer_name})]}),lA.jsx("b",{children:I==null?void 0:I.phone})]}),lA.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[lA.jsxs("span",{children:[I==null?void 0:I.province,"-",I==null?void 0:I.city]}),fA&&lA.jsxs("span",{children:["当月",fA==="out"?"呼出次数:":"呼入次数:",lA.jsx("span",{style:{color:"#1D92E9"},children:fA==="out"?I==null?void 0:I.contact_count_month:I==null?void 0:I.in_contact_count_month})]})]}),lA.jsx("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center"},children:fA&&lA.jsxs("span",{children:["总",fA==="out"?"呼出次数:":"呼入次数:",lA.jsx("span",{style:{color:"#1D92E9"},children:fA==="out"?(I==null?void 0:I.contact_count)||0:(I==null?void 0:I.in_contact_count)||0})]})})]})]})}):lA.jsx(lA.Fragment,{}),lA.jsx(x.Suspense,{children:uA&&((ZA=w.current)==null?void 0:ZA.agent_api)&&lA.jsx(_F,{open:uA,queryFetch:w.current.agent_api.getIdleAgentList,onCallBack:b=>{sA(!1),b&&De(b)}})}),lA.jsx(x.Suspense,{children:CA&&((UA=w.current)==null?void 0:UA.agent_api)&&lA.jsx($F,{open:CA,queryFetch:w.current.agent_api.getIdleAgentList,onCallBack:(b,j)=>{IA(!1),b&&(j===0?fe(b):j===1&&LA(b))}})})]})})},eO=e=>{var A;return(A=Ft.getInstance())==null?void 0:A.call_api.makeCall(e)},tO=()=>{var e;return(e=Ft.getInstance())==null?void 0:e.getRealTimeCustomerInfo()},nO=async e=>{var A,t;if(e!==ve.IDLE&&e!==ve.BUSY)throw new Error("Invalid agent state");try{await((t=(A=Ft.getInstance())==null?void 0:A.agent_api)==null?void 0:t.changeState({data:{state:e,state_name:e===ve.IDLE?"空闲":"忙碌"}}))}catch(n){console.error(n)}},rO=async e=>{var A,t;try{await((t=(A=Ft.getInstance())==null?void 0:A.agent_api)==null?void 0:t.changeDevice({data:{device:e}}))}catch(n){console.error(n)}},iO=async(e=!1,A)=>{var t,n;try{await((n=(t=Ft.getInstance())==null?void 0:t.agent_api)==null?void 0:n.agentLogout({data:{offline_answer:e},success:()=>{A==null||A()}}))}catch(r){console.log(r)}},oO=async(e,A)=>{var t,n;(n=(t=Ft.getInstance())==null?void 0:t.call_api)==null||n.previewMakeCall(e,A)},aO=async e=>{var A,t;try{await((t=(A=Ft.getInstance())==null?void 0:A.agent_api)==null?void 0:t.listenAgentCall({data:{monitored_agent_no:e},success:()=>{be.success("监听坐席通话成功")}}))}catch(n){console.error(n)}},sO=async()=>{var e,A;try{await((A=(e=Ft.getInstance())==null?void 0:e.call_api)==null?void 0:A.earSpeakStart({}))}catch(t){console.log(t)}},lO=async()=>{var e,A;try{await((A=(e=Ft.getInstance())==null?void 0:e.call_api)==null?void 0:A.earSpeakStop({}))}catch(t){console.log(t)}},cO=async()=>{var e,A;try{await((A=(e=Ft.getInstance())==null?void 0:e.call_api)==null?void 0:A.forceInsert({}))}catch(t){console.log(t)}},uO=async()=>{var e,A;try{await((A=(e=Ft.getInstance())==null?void 0:e.call_api)==null?void 0:A.forceDisconnect({}))}catch(t){console.log(t)}};exports.Button=qi;exports.CONTAINER_MAX_OFFSET=ig;exports.CSSMotion=vi;exports.ConfigContext=Ge;exports.ConfigProvider=rr;exports.ContextIsolator=Ca;exports.DisabledContextProvider=A0;exports.Empty=hr;exports.FastColor=je;exports.Input=_r;exports.KeyCode=oe;exports.Keyframe=Ue;exports.ModelBody=bS;exports.Portal=nc;exports.Radio=Ua;exports.RefIcon=lc;exports.RefIcon$1=wg;exports.RefIcon$2=Ga;exports.RefIcon$3=yg;exports.RefIcon$4=Mg;exports.Space=sc;exports.Spin=Vc;exports.Wave=Ll;exports.YsytBarPhone=AO;exports.YsytIconSvg=Me;exports._extends=DA;exports._objectSpread2=G;exports._slicedToArray=AA;exports._toConsumableArray=yA;exports._typeof=te;exports.agentLogout=iO;exports.callForceInsert=cO;exports.callForceSplit=uO;exports.canUseDom=kt;exports.classNames=oA;exports.clearFix=Zs;exports.contains=lq;exports.convertLegacyProps=Sx;exports.devUseWarning=st;exports.genFocusStyle=Ks;exports.genPresetColor=Pq;exports.genStyleHooks=Rt;exports.genSubStyleComponent=Jq;exports.getConfirmLocale=ny;exports.getCustomerInfo=tO;exports.getReactRender=lg;exports.getTransitionName=zl;exports.globalConfig=Fd;exports.initMotion=Zl;exports.initZoomMotion=Ra;exports.isPresetColor=rE;exports.isPresetStatusColor=e2;exports.jsxRuntimeExports=lA;exports.listenCall=aO;exports.localeValues=hi;exports.makeCall=eO;exports.merge=Pe;exports.omit=nn;exports.pickAttrs=Hr;exports.previewMakeCall=oO;exports.replaceElement=jC;exports.resetComponent=Pt;exports.setAgentDevice=rO;exports.setAgentInitState=nO;exports.startEarSpeak=sO;exports.stopEarSpeak=lO;exports.unit=mA;exports.useCSSVarCls=Ln;exports.useComponentConfig=nr;exports.useComposeRef=Wr;exports.useEvent=rt;exports.useId=Hl;exports.useLocale=Sl;exports.useSafeState=lo;exports.useToken=pn;exports.useZIndex=Da;exports.warnContext=h0;exports.warning=Kr;exports.withPureRenderTheme=Gv;exports.zIndexContext=xa;
@@ -34717,7 +34717,7 @@ const dO = {
34717
34717
  空闲: 1,
34718
34718
  离线: 0,
34719
34719
  未注册: 4
34720
- }, pO = cq(() => import("./ConsultModel-xPnpi3TO.mjs")), fO = cq(() => import("./TransferModel-BXJN7H-8.mjs")), uu = ut.div`
34720
+ }, pO = cq(() => import("./ConsultModel-CRV3XXIG.mjs")), fO = cq(() => import("./TransferModel-BOnZLhRO.mjs")), uu = ut.div`
34721
34721
  width: 25px;
34722
34722
  height: 25px;
34723
34723
  background: ${({
@@ -35439,7 +35439,7 @@ const dO = {
35439
35439
  onChange: (b) => {
35440
35440
  LA(b);
35441
35441
  },
35442
- options: (((NA = B.current) == null ? void 0 : NA.answer_devices) || []).map((b) => ({
35442
+ options: (((NA = w.current.getAgentData()) == null ? void 0 : NA.answer_devices) || []).map((b) => ({
35443
35443
  ...b,
35444
35444
  label: /* @__PURE__ */ uA.jsxs("div", {
35445
35445
  style: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-BJk1deek.js");exports.YsytAgentLogout=e.agentLogout;exports.YsytCallForceInsert=e.callForceInsert;exports.YsytCallForceSplit=e.callForceSplit;exports.YsytGetCustomerInfo=e.getCustomerInfo;exports.YsytListenCall=e.listenCall;exports.YsytMakeCall=e.makeCall;exports.YsytPreviewMakeCall=e.previewMakeCall;exports.YsytSetAgentDevice=e.setAgentDevice;exports.YsytSetAgentInitState=e.setAgentInitState;exports.YsytStartEarSpeak=e.startEarSpeak;exports.YsytStopEarSpeak=e.stopEarSpeak;exports.default=e.YsytBarPhone;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-DTnvB7Ie.js");exports.YsytAgentLogout=e.agentLogout;exports.YsytCallForceInsert=e.callForceInsert;exports.YsytCallForceSplit=e.callForceSplit;exports.YsytGetCustomerInfo=e.getCustomerInfo;exports.YsytListenCall=e.listenCall;exports.YsytMakeCall=e.makeCall;exports.YsytPreviewMakeCall=e.previewMakeCall;exports.YsytSetAgentDevice=e.setAgentDevice;exports.YsytSetAgentInitState=e.setAgentInitState;exports.YsytStartEarSpeak=e.startEarSpeak;exports.YsytStopEarSpeak=e.stopEarSpeak;exports.default=e.YsytBarPhone;
@@ -1,4 +1,4 @@
1
- import { ak as s, ap as e, aq as l, ah as y, am as Y, ag as o, al as r, aj as n, ai as S, an as i, ao as p, af as C } from "./index-uFheUVRz.mjs";
1
+ import { ak as s, ap as e, aq as l, ah as y, am as Y, ag as o, al as r, aj as n, ai as S, an as i, ao as p, af as C } from "./index-Dw2e48Je.mjs";
2
2
  export {
3
3
  s as YsytAgentLogout,
4
4
  e as YsytCallForceInsert,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ysyt-react-agent-lib",
3
- "version": "1.1.31",
3
+ "version": "1.1.32",
4
4
  "description": "",
5
5
  "main": "dist/ysyt-react-agent-lib.cjs.js",
6
6
  "module": "dist/ysyt-react-agent-lib.es.js",