2 lines
61 KiB
JavaScript
2 lines
61 KiB
JavaScript
import{b5 as e,r as t,s as a,t as l,o as s,a as n,O as i,b as r,u as o,b4 as u,b7 as c,_ as d,z as v,E as h,y as p,I as y,ap as g,a5 as m,a6 as f,B as T,C as S,F as k,q as M,H as D,b8 as b,G as w,c as _,e as C,w as I,W as x,b9 as $,N as E}from"./index-CH9-aFWw.js";import"./adapter-vue.FAvEd_HK.js";import{J as Y,z as L,o as O,I as P,a as H,K as R,i as A,W as U,T as V,d as G,Z as j,R as N,E as B}from"./index.C_XD_DK3.js";import{i as F,R as z}from"./index.DzsMB11z.js";import{_ as W}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{d as Z}from"./down-icon.DejhYoTd.js";import{c as K,t as q,J as X,i as J,s as Q,p as ee}from"./video-play.DNCOEYvb.js";import{b as te}from"./constant.BaYkq7sJ.js";import{r as ae}from"./right-icon.-uAfiCH7.js";import{e as le}from"./enableSampleTaskStatus.DI0Y9wcO.js";const se="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.13523%208.8285C7.32854%209.49429%206.29431%209.89425%205.16667%209.89425C2.58933%209.89425%200.5%207.80491%200.5%205.22758C0.5%202.65025%202.58933%200.560913%205.16667%200.560913C7.744%200.560913%209.83333%202.65025%209.83333%205.22758C9.83333%206.38924%209.40889%207.45176%208.70662%208.26852L11.2138%2010.7757C11.344%2010.9059%2011.344%2011.1169%2011.2138%2011.2471L11.1195%2011.3414C10.9894%2011.4716%2010.7783%2011.4716%2010.6481%2011.3414L8.13523%208.8285ZM9.03333%205.22759C9.03333%207.36309%207.30217%209.09425%205.16666%209.09425C3.03116%209.09425%201.3%207.36309%201.3%205.22759C1.3%203.09208%203.03116%201.36092%205.16666%201.36092C7.30217%201.36092%209.03333%203.09208%209.03333%205.22759Z'%20fill='black'%20style='fill:black;fill:black;fill-opacity:1;'/%3e%3c/g%3e%3c/svg%3e",ne="data:image/svg+xml,%3csvg%20width='15'%20height='14'%20viewBox='0%200%2015%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.5%2014C11.366%2014%2014.5%2010.866%2014.5%207C14.5%203.13401%2011.366%200%207.5%200C3.63401%200%200.5%203.13401%200.5%207C0.5%2010.866%203.63401%2014%207.5%2014ZM9.98528%203.47487L11.0459%204.53553L8.57107%207.01041L11.0459%209.48528L9.98528%2010.5459L7.51041%208.07107L5.03553%2010.5459L3.97487%209.48528L6.44975%207.01041L3.97487%204.53553L5.03553%203.47487L7.51041%205.94975L9.98528%203.47487Z'%20fill='%23B2B2B2'%20style='fill:%23B2B2B2;fill:color(display-p3%200.6980%200.6980%200.6980);fill-opacity:1;'/%3e%3c/svg%3e",ie=W(e({__name:"index",props:{placeholder:{type:String,default:()=>Y.t("TUISearch.搜索")},searchType:{type:String,default:"global",validator:e=>["global","conversation"].includes(e)}},setup(e){const g=e,m=t(""),f=t(""),T=t(!1);function S(e){(null==e?void 0:e.searchType)===(null==g?void 0:g.searchType)&&(f.value=null==e?void 0:e.value,m.value=null==e?void 0:e.value)}function k(e){(null==e?void 0:e.searchType)===(null==g?void 0:g.searchType)&&(T.value=null==e?void 0:e.isSearching)}a((()=>{L.watch(O.SEARCH,{currentSearchInputValue:S,currentSearchingStatus:k})})),l((()=>{L.unwatch(O.SEARCH,{currentSearchInputValue:S,currentSearchingStatus:k})}));const M=()=>{m.value!==f.value&&L.update(O.SEARCH,"currentSearchInputValue",{value:m.value,searchType:g.searchType})},D=()=>{T.value=!1,L.update(O.SEARCH,"currentSearchingStatus",{isSearching:!1,searchType:g.searchType}),L.update(O.SEARCH,"currentSearchInputValue",{value:"",searchType:g.searchType})},b=()=>{L.update(O.SEARCH,"currentSearchingStatus",{isSearching:!0,searchType:g.searchType})},w=()=>{var e,t;null==(t=null==(e=F)?void 0:e.hideKeyboard)||t.call(e)};return(e,t)=>{const a=y;return s(),n("div",{class:h(["tui-search-input-container",!o(H)&&"tui-search-input-container-h5","global"===g.searchType?"tui-search-input-container-global":"tui-search-input-container-conversation"])},[i("div",{class:h(["tui-search-input",!o(H)&&"tui-search-input-h5"])},[i("div",{class:"tui-search-input-left"},[r(P,{class:"icon",file:o(se),width:"14px",height:"14px"},null,8,["file"])]),r(a,{modelValue:o(m),"onUpdate:modelValue":t[0]||(t[0]=e=>u(m)?m.value=e:null),class:"tui-search-input-main",type:"text",placeholder:g.placeholder,focus:!1,enterkeyhint:"search",onBlur:w,onKeyup:c(M,["enter"]),onConfirm:M,onClick:d(b,["stop","prevent"])},null,8,["modelValue","placeholder"]),o(T)?(s(),n("div",{key:0,class:"tui-search-input-right",onClick:D},[r(P,{class:"icon",file:o(ne),width:"14px",height:"14px"},null,8,["file"])])):v("",!0)],2),!o(H)&&o(T)&&"global"===g.searchType?(s(),n("div",{key:0,class:h(["tui-search-input-cancel",!o(H)&&"tui-search-input-h5-cancel"]),onClick:D},p(o(Y).t("TUISearch.取消")),3)):v("",!0)],2)}}}),[["__scopeId","data-v-6d9c2069"]]),re={allMessage:{key:"allMessage",label:"全部",value:[R.TYPES.MSG_TEXT,R.TYPES.MSG_FILE,R.TYPES.MSG_IMAGE,R.TYPES.MSG_VIDEO,R.TYPES.MSG_AUDIO,R.TYPES.MSG_LOCATION,R.TYPES.MSG_CUSTOM,R.TYPES.MSG_MERGER]},textMessage:{key:"textMessage",label:"文本",value:[R.TYPES.MSG_TEXT]},fileMessage:{key:"fileMessage",label:"文件",value:[R.TYPES.MSG_FILE]},imageMessage:{key:"imageMessage",label:"图片/视频",value:[R.TYPES.MSG_IMAGE,R.TYPES.MSG_VIDEO]},otherMessage:{key:"otherMessage",label:"其他",value:[R.TYPES.MSG_AUDIO,R.TYPES.MSG_LOCATION,R.TYPES.MSG_CUSTOM,R.TYPES.MSG_MERGER]}};Object.keys(re).filter((e=>"all"!==e));const oe={global:re.allMessage,conversation:re.textMessage},ue=["allMessage","textMessage","fileMessage","otherMessage"],ce=Object.keys(re).filter((e=>null==ue?void 0:ue.includes(e))).reduce(((e,t)=>(e[t]=re[t],e)),{}),de=["textMessage","fileMessage","imageMessage","otherMessage"],ve=Object.keys(re).filter((e=>null==de?void 0:de.includes(e))).reduce(((e,t)=>(e[t]=re[t],e)),{}),he=86400,pe={all:{key:"all",label:"全部",value:{timePosition:0,timePeriod:0}},oneDay:{key:"today",label:"今天",value:{timePosition:0,timePeriod:he}},threeDay:{key:"threeDays",label:"近三天",value:{timePosition:0,timePeriod:259200}},sevenDay:{key:"sevenDays",label:"近七天",value:{timePosition:0,timePeriod:604800}}},ye=pe.all;var ge={exports:{}},me=ge.exports=function(){var e=1e3,t=6e4,a=36e5,l="millisecond",s="second",n="minute",i="hour",r="day",o="week",u="month",c="quarter",d="year",v="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],a=e%100;return"["+e+(t[(a-20)%10]||t[a]||t[0])+"]"}},m=function(e,t,a){var l=String(e);return!l||l.length>=t?e:""+Array(t+1-l.length).join(a)+e},f={s:m,z:function(e){var t=-e.utcOffset(),a=Math.abs(t),l=Math.floor(a/60),s=a%60;return(t<=0?"+":"-")+m(l,2,"0")+":"+m(s,2,"0")},m:function e(t,a){if(t.date()<a.date())return-e(a,t);var l=12*(a.year()-t.year())+(a.month()-t.month()),s=t.clone().add(l,u),n=a-s<0,i=t.clone().add(l+(n?-1:1),u);return+(-(l+(a-s)/(n?s-i:i-s))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:o,d:r,D:v,h:i,m:n,s:s,ms:l,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},T="en",S={};S[T]=g;var k="$isDayjsObject",M=function(e){return e instanceof _||!(!e||!e[k])},D=function e(t,a,l){var s;if(!t)return T;if("string"==typeof t){var n=t.toLowerCase();S[n]&&(s=n),a&&(S[n]=a,s=n);var i=t.split("-");if(!s&&i.length>1)return e(i[0])}else{var r=t.name;S[r]=t,s=r}return!l&&s&&(T=s),s||!l&&T},b=function(e,t){if(M(e))return e.clone();var a="object"==typeof t?t:{};return a.date=e,a.args=arguments,new _(a)},w=f;w.l=D,w.i=M,w.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var _=function(){function g(e){this.$L=D(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[k]=!0}var m=g.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,a=e.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var l=t.match(p);if(l){var s=l[2]-1||0,n=(l[7]||"0").substring(0,3);return a?new Date(Date.UTC(l[1],s,l[3]||1,l[4]||0,l[5]||0,l[6]||0,n)):new Date(l[1],s,l[3]||1,l[4]||0,l[5]||0,l[6]||0,n)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return w},m.isValid=function(){return!(this.$d.toString()===h)},m.isSame=function(e,t){var a=b(e);return this.startOf(t)<=a&&a<=this.endOf(t)},m.isAfter=function(e,t){return b(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<b(e)},m.$g=function(e,t,a){return w.u(e)?this[t]:this.set(a,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,t){var a=this,l=!!w.u(t)||t,c=w.p(e),h=function(e,t){var s=w.w(a.$u?Date.UTC(a.$y,t,e):new Date(a.$y,t,e),a);return l?s:s.endOf(r)},p=function(e,t){return w.w(a.toDate()[e].apply(a.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),a)},y=this.$W,g=this.$M,m=this.$D,f="set"+(this.$u?"UTC":"");switch(c){case d:return l?h(1,0):h(31,11);case u:return l?h(1,g):h(0,g+1);case o:var T=this.$locale().weekStart||0,S=(y<T?y+7:y)-T;return h(l?m-S:m+(6-S),g);case r:case v:return p(f+"Hours",0);case i:return p(f+"Minutes",1);case n:return p(f+"Seconds",2);case s:return p(f+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(e,t){var a,o=w.p(e),c="set"+(this.$u?"UTC":""),h=(a={},a[r]=c+"Date",a[v]=c+"Date",a[u]=c+"Month",a[d]=c+"FullYear",a[i]=c+"Hours",a[n]=c+"Minutes",a[s]=c+"Seconds",a[l]=c+"Milliseconds",a)[o],p=o===r?this.$D+(t-this.$W):t;if(o===u||o===d){var y=this.clone().set(v,1);y.$d[h](p),y.init(),this.$d=y.set(v,Math.min(this.$D,y.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[w.p(e)]()},m.add=function(l,c){var v,h=this;l=Number(l);var p=w.p(c),y=function(e){var t=b(h);return w.w(t.date(t.date()+Math.round(e*l)),h)};if(p===u)return this.set(u,this.$M+l);if(p===d)return this.set(d,this.$y+l);if(p===r)return y(1);if(p===o)return y(7);var g=(v={},v[n]=t,v[i]=a,v[s]=e,v)[p]||1,m=this.$d.getTime()+l*g;return w.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,a=this.$locale();if(!this.isValid())return a.invalidDate||h;var l=e||"YYYY-MM-DDTHH:mm:ssZ",s=w.z(this),n=this.$H,i=this.$m,r=this.$M,o=a.weekdays,u=a.months,c=a.meridiem,d=function(e,a,s,n){return e&&(e[a]||e(t,l))||s[a].slice(0,n)},v=function(e){return w.s(n%12||12,e,"0")},p=c||function(e,t,a){var l=e<12?"AM":"PM";return a?l.toLowerCase():l};return l.replace(y,(function(e,l){return l||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return w.s(t.$y,4,"0");case"M":return r+1;case"MM":return w.s(r+1,2,"0");case"MMM":return d(a.monthsShort,r,u,3);case"MMMM":return d(u,r);case"D":return t.$D;case"DD":return w.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(a.weekdaysMin,t.$W,o,2);case"ddd":return d(a.weekdaysShort,t.$W,o,3);case"dddd":return o[t.$W];case"H":return String(n);case"HH":return w.s(n,2,"0");case"h":return v(1);case"hh":return v(2);case"a":return p(n,i,!0);case"A":return p(n,i,!1);case"m":return String(i);case"mm":return w.s(i,2,"0");case"s":return String(t.$s);case"ss":return w.s(t.$s,2,"0");case"SSS":return w.s(t.$ms,3,"0");case"Z":return s}return null}(e)||s.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(l,v,h){var p,y=this,g=w.p(v),m=b(l),f=(m.utcOffset()-this.utcOffset())*t,T=this-m,S=function(){return w.m(y,m)};switch(g){case d:p=S()/12;break;case u:p=S();break;case c:p=S()/3;break;case o:p=(T-f)/6048e5;break;case r:p=(T-f)/864e5;break;case i:p=T/a;break;case n:p=T/t;break;case s:p=T/e;break;default:p=T}return h?p:w.a(p)},m.daysInMonth=function(){return this.endOf(u).$D},m.$locale=function(){return S[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var a=this.clone(),l=D(e,t,!0);return l&&(a.$L=l),a},m.clone=function(){return w.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},g}(),C=_.prototype;return b.prototype=C,[["$ms",l],["$s",s],["$m",n],["$H",i],["$W",r],["$M",u],["$y",d],["$D",v]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),b.extend=function(e,t){return e.$i||(e(t,_,b),e.$i=!0),b},b.locale=D,b.isDayjs=M,b.unix=function(e){return b(1e3*e)},b.en=S[T],b.Ls=S,b.p={},b}();const fe=m(me);var Te={exports:{}};const Se=m(Te.exports=function(e,t,a){var l=t.prototype,s=function(e){return e&&(e.indexOf?e:e.s)},n=function(e,t,a,l,n){var i=e.name?e:e.$locale(),r=s(i[t]),o=s(i[a]),u=r||o.map((function(e){return e.slice(0,l)}));if(!n)return u;var c=i.weekStart;return u.map((function(e,t){return u[(t+(c||0))%7]}))},i=function(){return a.Ls[a.locale()]},r=function(e,t){return e.formats[t]||e.formats[t.toUpperCase()].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,a){return t||a.slice(1)}))},o=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):n(e,"months")},monthsShort:function(t){return t?t.format("MMM"):n(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):n(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):n(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):n(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return r(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};l.localeData=function(){return o.bind(this)()},a.localeData=function(){var e=i();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return a.weekdays()},weekdaysShort:function(){return a.weekdaysShort()},weekdaysMin:function(){return a.weekdaysMin()},months:function(){return a.months()},monthsShort:function(){return a.monthsShort()},longDateFormat:function(t){return r(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},a.months=function(){return n(i(),"months")},a.monthsShort=function(){return n(i(),"monthsShort","months",3)},a.weekdays=function(e){return n(i(),"weekdays",null,null,e)},a.weekdaysShort=function(e){return n(i(),"weekdaysShort","weekdays",3,e)},a.weekdaysMin=function(e){return n(i(),"weekdaysMin","weekdays",2,e)}});var ke={exports:{}};const Me=m(ke.exports=function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}});var De={exports:{}};const be=m(De.exports=function(e,t){t.prototype.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)}});!function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),l={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,t){return"W"===t?e+"周":e+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,t){var a=100*e+t;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};a.default.locale(l,null,!0)}(me);const we=W(e({__name:"date-table",props:{type:{type:String,default:"range"},currentPanelDate:{type:me.Dayjs,default:()=>fe()},date:{type:me.Dayjs,default:null},startDate:{type:me.Dayjs,default:null},endDate:{type:me.Dayjs,default:null}},emits:["pick"],setup(e,{emit:a}){const l=e,r=a,u=D(),c=t([[],[],[],[],[],[]]),d=t(fe(l.currentPanelDate||null)),v=t(fe(l.date||null)),y=t(fe(l.startDate||null)),g=t(fe(l.endDate||null)),m=f((()=>fe.weekdaysShort())),b=f((()=>m.value.map((e=>e.substring(1))))),w=f((()=>{var e;const t=null==(e=d.value)?void 0:e.startOf("month");return null==t?void 0:t.subtract((null==t?void 0:t.day())||7,"day")})),_=f((()=>{var e,t,a,s,n;const i=c.value,r=b.value.length,o=null==(e=d.value)?void 0:e.startOf("month"),u=(null==o?void 0:o.day())||7,h=null==o?void 0:o.daysInMonth();let p=1;for(let d=0;d<c.value.length;d++)for(let e=0;e<r;e++){const r=null==(t=w.value)?void 0:t.add(p,"day"),o=null==r?void 0:r.date(),c="single"===l.type&&(null==r?void 0:r.format("YYYY-MM-DD"))===(null==(a=v.value)?void 0:a.format("YYYY-MM-DD")),m="range"===l.type&&(null==r?void 0:r.format("YYYY-MM-DD"))===(null==(s=y.value)?void 0:s.format("YYYY-MM-DD")),f="range"===l.type&&(null==r?void 0:r.format("YYYY-MM-DD"))===(null==(n=g.value)?void 0:n.format("YYYY-MM-DD")),T=(null==r?void 0:r.isSameOrBefore(g.value,"day"))&&(null==r?void 0:r.isSameOrAfter(y.value,"day"));let S="normal";p<u?S="prev-month":p-u>=h&&(S="next-month"),i[d][e]={type:S,date:r,text:o,isSelected:c||m||f,isSelectedStart:m,isSelectedEnd:f,isInRange:T},p++}return i}));return T((()=>[l.currentPanelDate,l.date,l.startDate,l.endDate]),(()=>{d.value=fe(l.currentPanelDate||null),v.value=fe(l.date||null),y.value=fe(l.startDate||null),g.value=fe(l.endDate||null),S((()=>{var e;null==(e=null==u?void 0:u.proxy)||e.$forceUpdate()}))}),{deep:!0,immediate:!0}),(e,t)=>(s(),n("table",{class:h(["tui-date-table",!o(H)&&"tui-date-table-h5"]),cellspacing:"0",cellpadding:"0",role:"grid"},[i("tbody",{class:"tui-date-table-body"},[i("tr",{class:"tui-date-table-body-weeks"},[(s(!0),n(k,null,M(o(b),(e=>(s(),n("th",{key:e,class:"tui-date-table-body-weeks-item","aria-label":e+"",scope:"col"},p(o(Y).t(`time.${e}`)),9,["aria-label"])))),128))]),(s(!0),n(k,null,M(o(_),((e,t)=>(s(),n("tr",{key:t,class:"tui-date-table-body-days"},[(s(!0),n(k,null,M(e,((e,t)=>(s(),n("td",{key:t,class:h(["tui-date-table-body-days-item",e.type])},[i("div",{class:h(["tui-date-table-body-days-item-cell",e.isSelected&&"selected",e.isSelectedStart&&"selected-start",e.isSelectedEnd&&"selected-end",e.isInRange&&"range"]),onClick:t=>{var a;"normal"===(null==(a=e)?void 0:a.type)&&r("pick",a)}},[i("span",{class:"tui-date-table-body-days-item-cell-text"},p(e.text),1)],10,["onClick"])],2)))),128))])))),128))])],2))}}),[["__scopeId","data-v-f07c449d"]]),_e=W(e({__name:"date-picker-panel",props:{type:{type:String,default:"range"},date:{type:me.Dayjs,default:()=>fe()},startDate:{type:me.Dayjs,default:null},endDate:{type:me.Dayjs,default:null},rangeType:{type:String,default:""},currentOtherPanelValue:{type:me.Dayjs,default:null}},emits:["pick","change"],setup(e,{emit:a}){const l=e,u=a,c=e=>e?["tui-date-picker-panel-"+e,!H&&"tui-date-picker-panel-h5-"+e]:["tui-date-picker-panel",!H&&"tui-date-picker-panel-h5"],y=t(),g=f((()=>{var e;return null==(e=y.value)?void 0:e.get("year")})),m=f((()=>{var e;return null==(e=y.value)?void 0:e.format("MMMM")})),T=f((()=>{var e,t,a;const s=(null==(e=l.currentOtherPanelValue)?void 0:e.year())-1,n=null==(t=l.currentOtherPanelValue)?void 0:t.year(s);return"right"===l.rangeType||(null==(a=y.value)?void 0:a.isBefore(n,"year"))})),S=f((()=>{var e,t,a;const s=(null==(e=l.currentOtherPanelValue)?void 0:e.month())-1,n=null==(t=l.currentOtherPanelValue)?void 0:t.month(s);return"right"===l.rangeType||(null==(a=y.value)?void 0:a.isBefore(n,"month"))})),k=f((()=>{var e,t,a;const s=(null==(e=l.currentOtherPanelValue)?void 0:e.year())+1,n=null==(t=l.currentOtherPanelValue)?void 0:t.year(s);return"left"===l.rangeType||(null==(a=y.value)?void 0:a.isAfter(n,"year"))})),M=f((()=>{var e,t,a;const s=(null==(e=l.currentOtherPanelValue)?void 0:e.month())+1,n=null==(t=l.currentOtherPanelValue)?void 0:t.month(s);return"left"===l.rangeType||(null==(a=y.value)?void 0:a.isAfter(n,"month"))}));function D(e){u("pick",e)}function w(e,t){y.value=fe(y.value.toDate()).add(t,e),u("change",y.value)}return b((()=>{switch(l.type){case"single":y.value=(l.date&&(null==(e=fe(l.date))?void 0:e.isValid())?{date:null==l?void 0:l.date}:{date:fe()}).date,u("change",y.value);break;case"range":y.value=(()=>{var e;switch(l.rangeType){case"left":return l.startDate&&fe.isDayjs(l.startDate)?{date:null==l?void 0:l.startDate}:{date:fe()};case"right":if(l.endDate&&fe.isDayjs(l.endDate)&&(null==(e=null==l?void 0:l.endDate)?void 0:e.isAfter(l.startDate,"month")))return{date:null==l?void 0:l.endDate};{const e=(l.startDate||fe()).month();return{date:(l.startDate||fe()).month(e+1)}}default:return{date:fe()}}})().date,u("change",y.value)}var e})),(e,t)=>(s(),n("div",{class:h([c("")]),onMouseup:t[4]||(t[4]=d((()=>{}),["stop"]))},[i("div",{class:h([c("body")])},[i("div",{class:h([c("body-header")])},[i("div",{class:h([c("body-header-prev")])},[o(k)?(s(),n("div",{key:0,class:h([c("icon")]),onClick:t[0]||(t[0]=e=>w("year",-1))},[r(P,{file:o("data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='%23444444'%20style='fill:%23444444;fill:color(display-p3%200.2667%200.2667%200.2667);fill-opacity:1;'%20d='M529.408%20149.376a29.12%2029.12%200%200%201%2041.728%200%2030.592%2030.592%200%200%201%200%2042.688L259.264%20511.936l311.872%20319.936a30.592%2030.592%200%200%201-.512%2043.264%2029.12%2029.12%200%200%201-41.216-.512L197.76%20534.272a32%2032%200%200%201%200-44.672l331.648-340.224zm256%200a29.12%2029.12%200%200%201%2041.728%200%2030.592%2030.592%200%200%201%200%2042.688L515.264%20511.936l311.872%20319.936a30.592%2030.592%200%200%201-.512%2043.264%2029.12%2029.12%200%200%201-41.216-.512L453.76%20534.272a32%2032%200%200%201%200-44.672l331.648-340.224z'%3e%3c/path%3e%3c/svg%3e"),width:"12px",height:"12px"},null,8,["file"])],2)):v("",!0),o(M)?(s(),n("div",{key:1,class:h([c("icon")]),onClick:t[1]||(t[1]=e=>w("month",-1))},[r(P,{file:o("data:image/svg+xml,%3csvg%20width='8'%20height='14'%20viewBox='0%200%208%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.1614%207.00004L7.64211%2012.2881L6.5614%2013.3308L1.0807%208.04275L0%207.00004L1.0807%205.95733L6.5614%200.669312L7.64211%201.71202L2.1614%207.00004Z'%20fill='%23444444'%20style='fill:%23444444;fill:color(display-p3%200.2667%200.2667%200.2667);fill-opacity:1;'%20/%3e%3c/svg%3e"),width:"10px",height:"10px"},null,8,["file"])],2)):v("",!0)],2),i("div",{class:h([c("body-header-label")])},[i("div",{class:h([c("body-header-label-item")])},p(o(g)),3),i("div",{class:h([c("body-header-label-item")])},p(o(Y).t(`time.${o(m)}`)),3)],2),i("div",{class:h([c("body-header-next")])},[o(S)?(s(),n("div",{key:0,class:h([c("icon")]),onClick:t[2]||(t[2]=e=>w("month",1))},[r(P,{file:o("data:image/svg+xml,%3csvg%20width='9'%20height='14'%20viewBox='0%200%209%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2200_23553)'%3e%3cpath%20d='M6.48068%206.83073L0.999983%2012.1188L2.08069%2013.1615L7.56139%207.87344L8.64209%206.83073L7.56139%205.78802L2.08069%200.5L0.999983%201.54271L6.48068%206.83073Z'%20fill='%23444444'%20style='fill:%23444444;fill:color(display-p3%200.2667%200.2667%200.2667);fill-opacity:1;'%20/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2200_23553'%3e%3crect%20width='8'%20height='13'%20fill='white'%20style='fill:white;fill:white;fill-opacity:1;'%20transform='matrix(-1%200%200%201%208.64209%200.5)'%20/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"),width:"10px",height:"10px"},null,8,["file"])],2)):v("",!0),o(T)?(s(),n("div",{key:1,class:h([c("icon")]),onClick:t[3]||(t[3]=e=>w("year",1))},[r(P,{file:o("data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='%23444444'%20style='fill:%23444444;fill:color(display-p3%200.2667%200.2667%200.2667);fill-opacity:1;'%20d='M452.864%20149.312a29.12%2029.12%200%200%201%2041.728.064L826.24%20489.664a32%2032%200%200%201%200%2044.672L494.592%20874.624a29.12%2029.12%200%200%201-41.728%200%2030.592%2030.592%200%200%201%200-42.752L764.736%20512%20452.864%20192a30.592%2030.592%200%200%201%200-42.688zm-256%200a29.12%2029.12%200%200%201%2041.728.064L570.24%20489.664a32%2032%200%200%201%200%2044.672L238.592%20874.624a29.12%2029.12%200%200%201-41.728%200%2030.592%2030.592%200%200%201%200-42.752L508.736%20512%20196.864%20192a30.592%2030.592%200%200%201%200-42.688z'%3e%3c/path%3e%3c/svg%3e"),width:"12px",height:"12px"},null,8,["file"])],2)):v("",!0)],2)],2),i("div",{class:h([c("body-content")])},[r(we,{type:l.type,date:l.date,startDate:l.startDate,endDate:l.endDate,currentPanelDate:o(y),onPick:D},null,8,["type","date","startDate","endDate","currentPanelDate"])],2)],2)],34))}}),[["__scopeId","data-v-4ecd5d3b"]]),Ce=W(e({__name:"index",props:{type:{type:String,default:"range"},rangeTableType:{type:String,default:"one"},startPlaceholder:{type:String,default:()=>Y.t("开始时间")},endPlaceholder:{type:String,default:()=>Y.t("开始时间")},popupPosition:{type:String,default:"bottom"},defaultSingleDate:{type:me.Dayjs,default:null,required:!1}},emits:["pick","change"],setup(e,{emit:a}){fe.extend(Se),fe.extend(Me),fe.extend(be),fe.locale("zh-cn");const l=a,c=e,d=t(!1),p=t("single"===c.type?null==c?void 0:c.defaultSingleDate:null),g=t("single"===c.type?null==c?void 0:c.defaultSingleDate:null),m=t("single"===c.type?null==c?void 0:c.defaultSingleDate:null),T=f((()=>{var e;return null==(e=null==g?void 0:g.value)?void 0:e.format("YYYY/MM/DD")})),S=f((()=>{var e;return null==(e=null==m?void 0:m.value)?void 0:e.format("YYYY/MM/DD")})),k=c.startPlaceholder,M=c.endPlaceholder,D=t(),b=t(),C=e=>{d.value=e},I=e=>{const t=[];return e.forEach((e=>{e?(t.push("tui-date-picker-"+e),!H&&t.push("tui-date-picker-h5-"+e)):(t.push("tui-date-picker"),!H&&t.push("tui-date-picker-h5"))})),t},x=e=>{var t,a,s;switch(c.type){case"single":g.value=e.date,m.value=e.date,p.value=e.date,l("change",e),l("pick",p.value),setTimeout((()=>{C(!1)}),300);break;case"range":(null==g?void 0:g.value)?(null==m?void 0:m.value)?(g.value=e.date,m.value=null):((null==(t=null==g?void 0:g.value)?void 0:t.isSameOrBefore(e.date,"day"))?m.value=e.date:(m.value=g.value,g.value=e.date),l("pick",{startDate:null==(a=null==g?void 0:g.value)?void 0:a.startOf("date"),endDate:null==(s=null==m?void 0:m.value)?void 0:s.endOf("date")}),setTimeout((()=>{C(!1)}),200)):g.value=e.date,l("change",{startDate:g.value,endDate:m.value,leftCurrentPanel:D.value,rightCurrentPanel:D.value})}},$=e=>{D.value=e,l("change",{startDate:g.value,endDate:m.value,leftCurrentPanel:D.value,rightCurrentPanel:D.value})},E=e=>{b.value=e,l("change",{startDate:g.value,endDate:m.value,leftCurrentPanel:D.value,rightCurrentPanel:D.value})};return(t,a)=>{const l=y;return s(),n("div",{class:h([I([""])])},[i("div",{class:h([I(["input"]),o(d)&&I(["input-active"])]),onClick:a[2]||(a[2]=e=>C(!o(d)))},[w(t.$slots,"start-icon",{},void 0,!0),r(l,{modelValue:o(T),"onUpdate:modelValue":a[0]||(a[0]=e=>u(T)?T.value=e:null),placeholder:o(k),class:h([I(["input-start"])]),style:{"pointer-events":"none"},type:"text",readonly:!0,disabled:o(A),autocomplete:"false"},null,8,["modelValue","placeholder","class","disabled"]),"single"!==e.type?(s(),n("span",{key:0},"-")):v("",!0),"single"!==e.type?(s(),_(l,{key:1,modelValue:o(S),"onUpdate:modelValue":a[1]||(a[1]=e=>u(S)?S.value=e:null),placeholder:o(M),class:h([I(["input-end"])]),style:{"pointer-events":"none"},type:"text",readonly:!0,disabled:o(A),autocomplete:"false"},null,8,["modelValue","placeholder","class","disabled"])):v("",!0),w(t.$slots,"end-icon",{},void 0,!0)],2),o(d)?(s(),n("div",{key:0,class:h([I(["dialog"])])},[i("div",{class:h([I(["dialog-container","dialog-container-"+e.rangeTableType,"dialog-container-"+e.popupPosition])])},[r(_e,{type:c.type,rangeType:"left",date:o(p),startDate:o(g),endDate:o(m),currentOtherPanelValue:o(b),onPick:x,onChange:$},null,8,["type","date","startDate","endDate","currentOtherPanelValue"]),"range"===c.type&&o(H)&&"two"===e.rangeTableType?(s(),_(_e,{key:0,type:c.type,rangeType:"right",date:o(p),startDate:o(g),endDate:o(m),currentOtherPanelValue:o(D),onPick:x,onChange:E},null,8,["type","date","startDate","endDate","currentOtherPanelValue"])):v("",!0)],2)],2)):v("",!0)],2)}}}),[["__scopeId","data-v-b0775539"]]),Ie=W(e({__name:"index",props:{popupPosition:{type:String,default:"bottom"},searchType:{type:String,default:"global",validator:e=>["global","conversation"].includes(e)}},emits:["searchConfigChange","closeInConversationSearch"],setup(e,{emit:u}){const c=e,y=u,g=f((()=>"conversation"===(null==c?void 0:c.searchType)?ve:ce)),m=t(oe[null==c?void 0:c.searchType]),T=t(ye),S=f((()=>"contact"!==m.value.key&&"group"!==m.value.key)),D=f((()=>H&&"global"===c.searchType&&!A?"two":"one")),b=t(!1);function I(e){(null==e?void 0:e.searchType)===(null==c?void 0:c.searchType)&&(m.value=(null==e?void 0:e.value)||oe[null==c?void 0:c.searchType])}function x(e){(null==e?void 0:e.searchType)===(null==c?void 0:c.searchType)&&(T.value=(null==e?void 0:e.value)||ye)}a((()=>{L.watch(O.SEARCH,{currentSearchMessageType:I,currentSearchMessageTime:x})})),l((()=>{L.unwatch(O.SEARCH,{currentSearchMessageType:I,currentSearchMessageTime:x})}));const $=()=>{var e;"all"!==(null==(e=T.value)?void 0:e.key)?L.update(O.SEARCH,"currentSearchMessageTime",{value:ye,searchType:c.searchType}):b.value=!0},E=e=>{var t,a,l;if("all"===(null==(t=T.value)?void 0:t.key)){const{startDate:t,endDate:s}=e,n=Number(((null==(a=null==s?void 0:s.toDate())?void 0:a.getTime())/1e3).toFixed(0)),i=n-Number(((null==(l=null==t?void 0:t.toDate())?void 0:l.getTime())/1e3).toFixed(0)),r={key:T.value.key,label:T.value.label,value:{timePosition:n,timePeriod:i}};L.update(O.SEARCH,"currentSearchMessageTime",{value:r,searchType:c.searchType})}},R=()=>{var e;b.value=!1,"all"===(null==(e=T.value)?void 0:e.key)&&L.update(O.SEARCH,"currentSearchMessageTime",{value:ye,searchType:c.searchType})},U=()=>{y("closeInConversationSearch")};return(e,t)=>(s(),n("div",{class:h(["tui-search-container",!o(H)&&"tui-search-container-h5",o(H)&&`container-${c.popupPosition}`,`container-${c.searchType}`])},[i("div",{class:h([o(H)&&`tui-search-container-${c.popupPosition}`,!o(H)&&"tui-search-container-h5-main"])},["conversation"!==c.searchType||o(A)?v("",!0):(s(),n("div",{key:0,class:"tui-search-header"},[i("div",{class:"tui-search-header-title"},p(o(Y).t("TUISearch.搜索会话内容")),1),i("div",{class:"tui-search-header-close",onClick:U},[r(P,{file:o(K),width:"14px",height:"14px"},null,8,["file"])])])),i("div",{class:"tui-search-tabs"},[(s(!0),n(k,null,M(o(g),((e,t)=>(s(),n("div",{key:t,class:h(["tui-search-tabs-item",o(m).key===e.key&&"tui-search-tabs-item-selected"]),onClick:t=>{return a=e,void L.update(O.SEARCH,"currentSearchMessageType",{value:a,searchType:c.searchType});var a}},p(o(Y).t(`TUISearch.${e.label}`)),11,["onClick"])))),128))]),w(e.$slots,"input",{},void 0,!0),o(S)?(s(),n("div",{key:1,class:"tui-search-time"},[(s(!0),n(k,null,M(o(pe),((e,a)=>(s(),n("div",{key:a,class:h(["tui-search-time-item",o(T).key===e.key&&"tui-search-time-item-selected"]),onClick:t=>{return a=e,void(b.value&&"all"===a.key?b.value=!1:(b.value=!1,L.update(O.SEARCH,"currentSearchMessageTime",{value:a,searchType:c.searchType})));var a}},["all"===e.key?(s(),n("div",{key:0,class:"tui-search-time-item-picker"},[o(b)?v("",!0):(s(),n("div",{key:0,class:"tui-search-time-item-all",onClick:d($,["stop"])},[C(p(o(Y).t("TUISearch.选择时间")+": "+o(Y).t("TUISearch.全部"))+" ",1),r(P,{file:o(Z),width:"14px",height:"14px"},null,8,["file"])])),i("div",{onClick:t[0]||(t[0]=d((()=>{}),["stop"]))},[o(b)?(s(),_(Ce,{key:0,type:"range",rangeTableType:o(D),onPick:E},null,8,["rangeTableType"])):v("",!0)]),o(b)?(s(),n("div",{key:1,class:"tui-search-time-item-close",onClick:R},[r(P,{class:"icon",file:o(ne),width:"14px",height:"14px"},null,8,["file"])])):v("",!0)])):(s(),n("div",{key:1},p(o(Y).t(`TUISearch.${e.label}`)),1))],10,["onClick"])))),128))])):v("",!0),w(e.$slots,"result",{},void 0,!0)],2)],2))}}),[["__scopeId","data-v-440f7fd2"]]),xe=W(e({__name:"message-abstract-text",props:{content:{default:()=>[]},highlightType:{default:"font"},displayType:{default:"info"}},setup(e){const a=t(e.content);return(e,t)=>(s(),n("div",{class:h(["message-abstract-text",`message-abstract-text-${e.highlightType}`,`message-abstract-text-${e.displayType}`])},[(s(!0),n(k,null,M(o(a),((e,t)=>(s(),n("span",{key:t,class:h([e&&e.isHighlight?"highlight":"normal"])},p(o(q)(e.text)),3)))),128))],2))}}),[["__scopeId","data-v-ae182fbb"]]),$e=W(e({__name:"message-abstract-file",props:{contentText:{default:()=>[]},messageContent:{default:()=>({})},displayType:{default:"bubble"}},setup(e){const a=e,l=t(a.contentText),r=f((()=>{var e;const t=null==(e=null==a?void 0:a.messageContent)?void 0:e.url,l=null==t?void 0:t.lastIndexOf("."),s=null==t?void 0:t.substring(l+1);return c(s)})),u=f((()=>{var e;return null==(e=null==a?void 0:a.messageContent)?void 0:e.size})),c=e=>{const t="https://web.sdk.qcloud.com/component/TUIKit/assets/file-",a=["image","pdf","text","ppt","presentation","sheet","zip","word","video","unknown"];let l="",s="";return null==a||a.forEach((a=>{(null==e?void 0:e.includes(a))&&(l=t+a+".svg",s=a)})),{iconSrc:l||t+"unknown.svg",iconType:s||"unknown"}};return(e,t)=>(s(),n("div",{class:h(["message-abstract-file",`message-abstract-file-${e.displayType}`])},[i("div",{class:h(["message-abstract-file-left"])},[i("img",{class:h(["message-abstract-file-left-icon"]),src:o(r).iconSrc},null,8,["src"])]),i("div",{class:h(["message-abstract-file-main"])},[i("div",{class:h(["message-abstract-file-main-name"])},[(s(!0),n(k,null,M(o(l),((e,t)=>(s(),n("span",{key:t,class:h([e&&e.isHighlight?"highlight":"normal"])},p(e.text),3)))),128))]),i("div",{class:h(["message-abstract-file-main-size"])},p(o(u)),1)])],2))}}),[["__scopeId","data-v-5d509f53"]]),Ee=W(e({__name:"message-abstract-custom",props:{contentText:{default:()=>[]},message:{default:()=>({})},messageContent:{default:()=>({})}},setup(e){var a,l;const u=e,c=t(null==(a=null==u?void 0:u.message)?void 0:a.payload),y=f((()=>{var e,t;return(null==(e=null==c?void 0:c.value)?void 0:e.data)?X(c.value.data):null==(t=null==c?void 0:c.value)?void 0:t.data})),g=f((()=>{var e;return null==(e=null==y?void 0:y.value)?void 0:e.businessID})),m=t(null==u?void 0:u.contentText),T=t((null==(l=null==u?void 0:u.messageContent)?void 0:l.custom)||"[自定义消息]");return(e,t)=>{const a=x;return s(),n("div",{class:h(["message-abstract-custom"]),onClickCapture:t[0]||(t[0]=d((()=>{}),["stop"]))},[o(g)===o(te).SERVICE?(s(),n("div",{key:0,class:h(["service"])},[i("h1",{class:h(["service-header"])},[r(a,{class:h(["service-header-title"])},{default:I((()=>[C(p(o(y).title),1)])),_:1}),o(y).hyperlinks_text?(s(),n("a",{key:0,class:h(["service-header-link","link"]),href:o(y).hyperlinks_text.value,target:"view_window"},p(o(y).hyperlinks_text.key),9,["href"])):v("",!0)]),o(y).item&&o(y).item.length>0?(s(),n("ul",{key:0,class:h(["service-list"])},[(s(!0),n(k,null,M(o(y).item,((e,t)=>(s(),n("li",{key:t,class:h(["service-list-item"])},[o(J)(e.value)?(s(),n("a",{key:0,class:h(["service-list-item-link","link"]),href:e.value,target:"view_window"},p(e.key),9,["href"])):(s(),n("p",{key:1,class:h(["service-list-item-key"])},p(e.key),1))])))),128))])):v("",!0),i("div",{class:h(["service-description","description"])},[(s(!0),n(k,null,M(o(m),((e,t)=>(s(),n("span",{key:t,class:h([e&&e.isHighlight?"highlight":"normal"])},p(e.text),3)))),128))])])):o(g)===o(te).EVALUATE?(s(),n("div",{key:1,class:"evaluate"},[i("div",{class:h(["evaluate-description","description"])},[(s(!0),n(k,null,M(o(m),((e,t)=>(s(),n("span",{key:t,class:h([e&&e.isHighlight?"highlight":"normal"])},p(e.text),3)))),128))]),o(y).score?(s(),n("ul",{key:0,class:"evaluate-list"},[(s(!0),n(k,null,M(Math.max(o(y).score,0),((e,t)=>(s(),n("li",{key:t,class:"evaluate-list-item"},[r(P,{file:o(Q),class:"file-icon"},null,8,["file"])])))),128))])):v("",!0),i("article",null,p(o(y).comment),1)])):o(g)===o(te).ORDER?(s(),n("div",{key:2,class:"order"},[i("img",{class:"order-image",src:o(y).imageUrl,alt:""},null,8,["src"]),i("main",{class:"order-main"},[i("h1",{class:"order-main-title"},p(o(y).title),1),i("div",{class:h(["order-main-description","description"])},[(s(!0),n(k,null,M(o(m),((e,t)=>(s(),n("span",{key:t,class:h([e&&e.isHighlight?"highlight":"normal"])},p(e.text),3)))),128))]),i("span",{class:"order-main-price"},p(o(y).price),1)])])):o(g)===o(te).LINK?(s(),n("div",{key:3,class:"text-link"},[i("div",{class:h(["text-link-description","description"])},[i("p",null,p(o(y).text),1)]),i("a",{class:h(["link"]),href:o(y).link,target:"view_window"},p(o(Y).t("message.custom.查看详情>>")),9,["href"])])):(s(),n("span",{key:4},p(o(T)),1))],32)}}}),[["__scopeId","data-v-b32422fa"]]),Ye=W(e({__name:"message-abstract-image",props:{messageContent:{default:()=>({})}},setup(e){const t=e,a=f((()=>t.messageContent.url||""));return(e,t)=>(s(),n("div",{class:h(["message-abstract-image-container"])},[i("img",{class:h(["message-abstract-image"]),src:o(a)},null,8,["src"])]))}}),[["__scopeId","data-v-a6a350bc"]]),Le=W(e({__name:"message-abstract-video",props:{messageContent:{default:()=>({})}},setup(e){const t=e,a=f((()=>t.messageContent.snapshotUrl||t.messageContent.url));return(e,t)=>(s(),n("div",{class:h(["message-abstract-video"])},[i("div",{class:"message-abstract-video-box"},[i("img",{src:o(a),class:h(["video-snapshot"])},null,8,["src"]),r(P,{file:o(ee),class:"video-play"},null,8,["file"])])]))}}),[["__scopeId","data-v-1a98d7b0"]]),Oe={[R.TYPES.MSG_TEXT]:"[文本]",[R.TYPES.MSG_IMAGE]:"[图片]",[R.TYPES.MSG_AUDIO]:"[语音]",[R.TYPES.MSG_VIDEO]:"[视频]",[R.TYPES.MSG_FILE]:"[文件]",[R.TYPES.MSG_CUSTOM]:"[自定义消息]",[R.TYPES.MSG_SYSTEM]:"[系统消息]",[R.TYPES.MSG_MERGER]:"[合并消息]",[R.TYPES.MSG_LOCATION]:"[位置消息]"},Pe=e=>{const t=(null==e?void 0:e.conversationID)||((null==e?void 0:e.groupID)?`GROUP${null==e?void 0:e.groupID}`:`C2C${null==e?void 0:e.userID}`);U.switchConversation(t).then((()=>{var e;L.update(O.SEARCH,"currentSearchingStatus",{isSearching:!1,searchType:"global"}),L.update(O.SEARCH,"currentSearchInputValue",{value:"",searchType:"global"}),A&&(null==(e=F)||e.navigateTo({url:"/TUIKit/components/TUIChat/index"}))})).catch((e=>{console.warn("switch conversation failed:",null==e?void 0:e.message),V({message:Y.t("TUISearch.进入会话失败"),type:G.ERROR,duration:1e3})}))},He=(e,t)=>{var a;if(!e||!t||!t.length)return[{text:e||"",isHighlight:!1}];const l=[];for(let o=0;o<t.length;o++){const s=null==(a=t[o])?void 0:a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(s,"gi");let i;for(;null!==(i=n.exec(e));){const e=i.index,t=i.index+i[0].length-1;l.push([e,t])}}const s=[l[0]];if(l.length>1){l.sort(((e,t)=>e[0]-t[0]));for(let e=1;e<l.length;e++){const t=l[e],a=s[s.length-1];t[0]-1<=a[1]?a[1]=Math.max(a[1],t[1]):s.push(t)}}if(!s[0])return[{text:e,isHighlight:!1}];const n=[];let i=0;for(let o=0;o<s.length;o++){const t=e.substring(i,s[o][0]);t&&n.push({text:t,isHighlight:!1});const a=e.substring(s[o][0],s[o][1]+1);a&&n.push({text:a,isHighlight:!0}),i=s[o][1]+1}const r=e.substring(i);return r&&n.push({text:r,isHighlight:!1}),n},Re=e=>{const t=new Date(1e3*e);return`${t.getFullYear()}-${("0"+(t.getMonth()+1)).slice(-2)}-${("0"+t.getDate()).slice(-2)}`},Ae=W(e({__name:"index",props:{listItem:{default:()=>({})},listItemContent:{default:()=>({})},type:{default:"allMessage"},displayType:{default:"info"},keywordList:{default:()=>[]}},emits:["showResultDetail","navigateToChatPosition"],setup(e,{emit:a}){const l=e,u=a,c=t(R.TYPES),y=t(""),g=t(""),m=t([]),f=t(""),T=t(!1);$((()=>{var e,t;y.value=(e=>{var t,a,l,s;return e?e.ID?e.avatar||"https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png":e.groupID?e.avatar||`https://web.sdk.qcloud.com/im/assets/images/${null==e?void 0:e.type}.svg`:e.userID?e.avatar||"https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png":(null==(t=null==e?void 0:e.conversation)?void 0:t.conversationID)?"function"==typeof e.conversation.getAvatar?null==(a=e.conversation)?void 0:a.getAvatar():null==(s=null==(l=L.getConversationModel(e.conversation.conversationID))?void 0:l.getAvatar)?void 0:s.call(l):"":""})(l.listItem),g.value=((e,t)=>{var a,l,s;return e?e.ID?null==t?void 0:t.showName:e.groupID?e.name||e.groupID:e.userID?e.remark||e.nick||e.userID||"":(null==(a=e.conversation)?void 0:a.conversationID)?"function"==typeof e.conversation.getShowName?e.conversation.getShowName():(null==(s=null==(l=L.getConversationModel(e.conversation.conversationID))?void 0:l.getShowName)?void 0:s.call(l))||e.conversation.conversationID:"":""})(l.listItem,null==l?void 0:l.listItemContent),m.value=((e,t,a,l=!0)=>{var s,n,i,r;if(null==e?void 0:e.groupID)return[{text:"groupID: ",isHighlight:!1},{text:e.groupID,isHighlight:!0}];if(null==e?void 0:e.userID)return[{text:"userID: ",isHighlight:!1},{text:e.userID,isHighlight:!0}];if((null==e?void 0:e.conversation)||(null==e?void 0:e.flow)){if(1===(null==e?void 0:e.messageCount)||(null==e?void 0:e.flow)){const t=(null==e?void 0:e.flow)?e:null==e?void 0:e.messageList[0],r=(null==(s=null==t?void 0:t.payload)?void 0:s.text)||(null==(n=null==t?void 0:t.payload)?void 0:n.fileName)||(null==(i=null==t?void 0:t.payload)?void 0:i.description),o=[];return(null==t?void 0:t.type)&&l&&t.type!==R.TYPES.MSG_TEXT&&o.push({text:Y.t(`TUISearch.${Oe[t.type]}`),isHighlight:!1}),o.push(...He(r,a)),o}return[{text:`${null==e?void 0:e.messageCount}${Y.t("TUISearch.条相关")}${Y.t(`TUISearch.${"allMessage"===t?"结果":null==(r=re[t])?void 0:r.label}`)}`,isHighlight:!1}]}return[]})(l.listItem,l.type,l.keywordList,"info"===(null==l?void 0:l.displayType)),f.value=(null==(e=l.listItem)?void 0:e.time)?(e=>{const t=(new Date).setHours(0,0,0,0),a=new Date((new Date).getFullYear(),0,1,0,0,0,0).getTime(),l=new Date(e),s=864e5,n=t-l.getTime();function i(e){return e<10?"0"+e:e.toString()}if(n<=0)return`${i(l.getHours())}:${i(l.getMinutes())}`;if(n<=s)return`${Y.t("time.昨天")} ${i(l.getHours())}:${i(l.getMinutes())}`;if(n<=5184e5){const e=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][l.getDay()];return`${Y.t("time."+e)} ${i(l.getHours())}:${i(l.getMinutes())}`}return l.getTime()>=a?`${l.getMonth()+1}/${l.getDate()} ${i(l.getHours())}:${i(l.getMinutes())}`:`${l.getFullYear()}/${l.getMonth()+1}/${l.getDate()} ${i(l.getHours())}:${i(l.getMinutes())}`})(1e3*(null==(t=l.listItem)?void 0:t.time)):""}));const S=()=>{var e;"contact"===l.type||"group"===l.type?Pe(l.listItem):"info"!==l.displayType||(null==(e=l.listItem)?void 0:e.ID)?M():u("showResultDetail",!0,l.type,l.listItem)},k=e=>{T.value=e},M=()=>{u("navigateToChatPosition",l.listItem)};return(e,t)=>{return s(),n("div",{class:h(["search-result-list-item",!o(H)&&"search-result-list-item-h5","search-result-list-item-"+e.displayType,o(T)&&"hover-"+e.displayType]),onClick:S,onMouseenter:t[0]||(t[0]=e=>k(!0)),onMouseleave:t[1]||(t[1]=e=>k(!1))},["info"===e.displayType||"bubble"===e.displayType?(s(),n("div",{key:0,class:h([e.displayType])},[i("div",{class:h(e.displayType+"-left")},[i("img",{class:h(e.displayType+"-left-avatar"),src:o(y)||"",onerror:"this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"},null,10,["src"])],2),i("div",{class:h([e.displayType+"-main"])},[i("div",{class:h([e.displayType+"-main-name"])},p(o(g)),3),i("div",{class:h([e.displayType+"-main-content"])},["info"===e.displayType||e.listItem.type===o(c).MSG_TEXT?(s(),_(xe,{key:0,content:o(m),highlightType:"info"===e.displayType?"font":"background",displayType:e.displayType},null,8,["content","highlightType","displayType"])):e.listItem.type===o(c).MSG_FILE?(s(),_($e,{key:1,contentText:o(m),messageContent:e.listItemContent,displayType:e.displayType},null,8,["contentText","messageContent","displayType"])):e.listItem.type===o(c).MSG_IMAGE?(s(),n("div",{key:2})):e.listItem.type===o(c).MSG_VIDEO?(s(),n("div",{key:3})):e.listItem.type===o(c).MSG_CUSTOM?(s(),_(Ee,{key:4,contentText:o(m),message:e.listItem,messageContent:e.listItemContent},null,8,["contentText","message","messageContent"])):(s(),n("div",{key:5},p((a=e.listItem,(null==a?void 0:a.type)?Y.t(`TUISearch.${Oe[a.type]}`):Y.t("TUISearch.[合并消息]"))),1))],2)],2),i("div",{class:h(e.displayType+"-right")},[i("div",{class:h(e.displayType+"-right-time")},p(o(f)),3),"bubble"===e.displayType&&o(T)?(s(),n("div",{key:0,class:h(e.displayType+"-right-to"),onClick:d(M,["stop"])},p(o(Y).t("TUISearch.定位到聊天位置")),3)):v("",!0)],2)],2)):"file"===e.displayType?(s(),n("div",{key:1,class:h([e.displayType])},[i("div",{class:h([e.displayType+"-header"])},[i("img",{class:h(e.displayType+"-header-avatar"),src:o(y),onerror:"this.onerror=null;this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"},null,10,["src"]),i("div",{class:h([e.displayType+"-header-name"])},p(o(g)),3),o(T)?(s(),n("div",{key:0,class:h(e.displayType+"-header-to"),onClick:d(M,["stop"])},p(o(Y).t("TUISearch.定位到聊天位置")),3)):v("",!0),i("div",{class:h(e.displayType+"-header-time")},p(o(f)),3)],2),i("div",{class:h([e.displayType+"-main-content"])},[r($e,{contentText:o(m),messageContent:e.listItemContent,displayType:"bubble"},null,8,["contentText","messageContent"])],2)],2)):"image"===e.displayType?(s(),n("div",{key:2,class:h([e.displayType])},[i("div",{class:"image-container",onClick:d(M,["stop"])},[e.listItem.type===o(c).MSG_IMAGE?(s(),_(Ye,{key:0,messageContent:e.listItemContent},null,8,["messageContent"])):e.listItem.type===o(c).MSG_VIDEO?(s(),_(Le,{key:1,messageContent:e.listItemContent},null,8,["messageContent"])):v("",!0),o(T)?(s(),n("div",{key:2,class:"image-container-hover"},[i("div",{class:"image-container-hover-text"},p(o(Y).t("TUISearch.定位到聊天位置")),1)])):v("",!0)])],2)):v("",!0)],34);var a}}}),[["__scopeId","data-v-4eb143e0"]]),Ue=W(e({__name:"index",setup:e=>(e,t)=>(s(),n("div",{class:h(["search-result-default",!o(H)&&"search-result-default-h5"])},[i("div",{class:"search-result-default-main"},[r(P,{file:o("/assets/search-default-C7_-km8O.svg"),width:"88px",height:"75px"},null,8,["file"]),i("div",{class:"default-text"},p(o(Y).t("TUISearch.暂无搜索结果")),1)])],2))}),[["__scopeId","data-v-727e3884"]]),Ve=W(e({__name:"index",props:{width:{type:String,default:"30px"},height:{type:String,default:"30px"},color:{type:String,default:"#D9D9D9"}},setup(e){const t=e;return(e,a)=>(s(),n("div",{class:"tui-loading",style:E({width:t.width,height:t.height,border:`2px solid ${t.color}`,borderTopColor:"transparent"})},null,4))}}),[["__scopeId","data-v-0f42b926"]]),Ge=W(e({__name:"index",setup:e=>(e,t)=>(s(),n("div",{class:h(["search-result-loading",!o(H)&&"search-result-loading-h5"])},[r(Ve,{width:"40px",height:"40px"})],2))}),[["__scopeId","data-v-36180e9c"]]),je=W(e({__name:"index",props:{searchType:{type:String,default:"global",validator:e=>["global","conversation"].includes(e)}},setup(e){var u,c;const d=e,y=t([]),g=t(null==(u=oe[d.searchType])?void 0:u.value),m=t(0),S=t(0),D=t("and"),b=t(null==(c=oe[d.searchType])?void 0:c.key),w=t({}),C=t([]),I=t(0),x=t(""),$=t(),E=t([]),R=t(),N=t([]),B=t(!1),z=t(!1),W=t(!1),Z=f((()=>{var e,t,a;return!z.value&&("global"===d.searchType?!(!(null==(e=null==y?void 0:y.value)?void 0:e.length)||(null==(t=null==Object?void 0:Object.keys(w.value))?void 0:t.length)):!(null==(a=null==E?void 0:E.value)?void 0:a.length))}));function K(e){"conversation"===d.searchType&&(x.value=e)}function q(e){(null==e?void 0:e.searchType)===(null==d?void 0:d.searchType)&&(y.value=(null==e?void 0:e.value)?e.value.trim().split(/\s+/):[])}function X(e){var t,a,l,s;(null==e?void 0:e.searchType)===(null==d?void 0:d.searchType)&&(b.value=(null==(t=null==e?void 0:e.value)?void 0:t.key)||(null==(a=oe[d.searchType])?void 0:a.key),g.value=(null==(l=null==e?void 0:e.value)?void 0:l.value)||(null==(s=oe[d.searchType])?void 0:s.value))}function J(e){var t,a,l,s;(null==e?void 0:e.searchType)===(null==d?void 0:d.searchType)&&(m.value=null==(a=null==(t=null==e?void 0:e.value)?void 0:t.value)?void 0:a.timePosition,S.value=null==(s=null==(l=null==e?void 0:e.value)?void 0:l.value)?void 0:s.timePeriod)}a((()=>{L.watch(O.CONV,{currentConversationID:K}),L.watch(O.SEARCH,{currentSearchInputValue:q,currentSearchMessageType:X,currentSearchMessageTime:J})})),l((()=>{L.unwatch(O.CONV,{currentConversationID:K}),L.unwatch(O.SEARCH,{currentSearchInputValue:q,currentSearchMessageType:X,currentSearchMessageTime:J})}));const Q=e=>{var t,a;(a={keywordList:(null==(t=null==y?void 0:y.value)?void 0:t.length)?y.value:void 0,messageTypeList:"string"==typeof g.value?[g.value]:g.value,timePosition:m.value,timePeriod:S.value,conversationID:(null==e?void 0:e.conversationID)||void 0,cursor:(null==e?void 0:e.cursor)||void 0,keywordListMatchType:D.value},j.searchCloudMessages(a).then((e=>e)).catch((e=>(V({message:Y.t("TUISearch.消息云端搜索失败:")+(null==e?void 0:e.message),type:G.ERROR,duration:3e3}),null)))).then((t=>{var a,l,s,n,i,r,o,u,c,v;if(le("searchCloudMessage"),null==e?void 0:e.conversationID)$.value=null==t?void 0:t.data,(null==e?void 0:e.cursor)?E.value=[...E.value,...null==(o=null==(r=null==t?void 0:t.data)?void 0:r.searchResultList[0])?void 0:o.messageList]:E.value=null==(c=null==(u=null==t?void 0:t.data)?void 0:u.searchResultList[0])?void 0:c.messageList,R.value=null==(v=null==t?void 0:t.data)?void 0:v.totalCount,"conversation"!==(null==d?void 0:d.searchType)||"fileMessage"!==b.value&&"imageMessage"!==b.value?N.value=[]:N.value=de(E.value);else{(null==e?void 0:e.cursor)?C.value=[...C.value,...t.data.searchResultList]:C.value=null==(a=null==t?void 0:t.data)?void 0:a.searchResultList,I.value=null==(l=null==t?void 0:t.data)?void 0:l.totalCount;const r="all"===b.value?"allMessage":b.value;(null==(s=null==C?void 0:C.value)?void 0:s.length)&&"contact"!==b.value&&"group"!==b.value?w.value=Object.assign({},w.value,{[r]:{key:r,label:re[r].label,list:"all"===b.value?null==(n=null==C?void 0:C.value)?void 0:n.slice(0,3):null==C?void 0:C.value,cursor:(null==(i=null==t?void 0:t.data)?void 0:i.cursor)||null}}):null==w||delete w.value[r]}z.value=!1,W.value=!1}))},ee=((e,t)=>{let a=null;return(...l)=>{null!==a&&(clearTimeout(a),a=null),a=setTimeout((()=>e(...l)),t)}})(Q,500),te=()=>{w.value={},$.value={},E.value=[],N.value=[]};T((()=>[y.value,b.value,m.value,S.value]),((e,t)=>{var a,l,s;if(e!==t)if((null==(a=null==y?void 0:y.value)?void 0:a.length)||"global"!==(null==d?void 0:d.searchType))if(z.value=!0,"conversation"===d.searchType)te(),Q({conversationID:x.value});else{if(t&&"all"===t[1]&&e&&"allMessage"===e[1])return(null==(l=null==w?void 0:w.value.allMessage)?void 0:l.list)&&(w.value.allMessage.list=null==C?void 0:C.value),null==(s=null==Object?void 0:Object.keys(null==w?void 0:w.value))||s.forEach((e=>{"allMessage"!==e&&(null==w||delete w.value[e])})),void(z.value=!1);B.value=!1,te(),ee()}else te()}),{immediate:!0});const ne=()=>{var e;Q({cursor:null==(e=null==$?void 0:$.value)?void 0:e.cursor,conversationID:null==x?void 0:x.value})},ie=(e,t,a)=>{var l;B.value=e,t&&L.update(O.SEARCH,"currentSearchMessageType",{value:re[t],searchType:d.searchType}),x.value=(null==(l=null==a?void 0:a.conversation)?void 0:l.conversationID)||"",R.value=null==a?void 0:a.messageCount,a&&(W.value=!0,ee({conversationID:x.value}))},ue=e=>{var t;return x.value===(null==(t=null==e?void 0:e.conversation)?void 0:t.conversationID)?["list-item","list-item-selected"]:["list-item"]},ce=()=>"conversation"===d.searchType&&"fileMessage"===b.value?"file":"conversation"===d.searchType&&"imageMessage"===b.value?"image":H?"bubble":"info",de=e=>{var t,a,l,s;const n=[];if(!(null==e?void 0:e.length))return n;if(1===(null==e?void 0:e.length))return n.push({date:Re(null==(t=e[0])?void 0:t.time),list:e}),n;let i="",r="";for(let o=0;o<(null==e?void 0:e.length);o++)r=Re(null==(a=e[o])?void 0:a.time),i!==r?n.push({date:r,list:[e[o]]}):null==(s=null==(l=n[(null==n?void 0:n.length)-1])?void 0:l.list)||s.push(e[o]),i=r;return n},ve=e=>{var t;"global"===d.searchType?(L.update(O.SEARCH,"currentSearchingStatus",{isSearching:!1,searchType:d.searchType}),U.switchConversation(null==e?void 0:e.conversationID).then((()=>{var t;L.update(O.CHAT,"messageSource",e),A&&(null==(t=F)||t.navigateTo({url:"/TUIKit/components/TUIChat/index"}))}))):"conversation"===d.searchType&&(L.update(O.SEARCH,"isShowInConversationSearch",!1),L.update(O.CHAT,"messageSource",e),A&&(null==(t=F)||t.navigateBack()))},he=e=>`${b}-${e}`;return(e,t)=>o(z)?(s(),_(Ge,{key:0,class:h(["search-result-loading",!o(H)&&"search-result-loading-h5"])},null,8,["class"])):o(Z)?(s(),_(Ue,{key:1,class:h(["search-result-default",!o(H)&&"search-result-default-h5"])},null,8,["class"])):(s(),n("div",{key:2,class:h(["tui-search-result",!o(H)&&"tui-search-result-h5",o(H)&&o(B)&&"tui-search-result-with-border"])},["conversation"===d.searchType||!o(H)&&o(B)?v("",!0):(s(),n("div",{key:0,class:"tui-search-result-main"},[i("div",{class:"tui-search-result-list"},[(s(!0),n(k,null,M(o(w),(e=>(s(),n("div",{key:e.key,class:"tui-search-result-list-item"},["global"===d.searchType?(s(),n("div",{key:0,class:"header"},p(o(Y).t(`TUISearch.${e.label}`)),1)):v("",!0),i("div",{class:"list"},[(s(!0),n(k,null,M(e.list,(t=>(s(),n("div",{key:t.conversation.conversationID,class:h([ue(t)])},["contact"===e.key||"group"===e.key||t.conversation?(s(),_(Ae,{key:0,listItem:t,type:e.key,displayType:"info",keywordList:o(y),onShowResultDetail:ie,onNavigateToChatPosition:ve},null,8,["listItem","type","keywordList"])):v("",!0)],2)))),128))]),"all"===o(b)||e.cursor?(s(),n("div",{key:1,class:"more",onClick:t=>(e=>{"all"===b.value?L.update(O.SEARCH,"currentSearchMessageType",{value:re[e.key],searchType:d.searchType}):Q({cursor:(null==e?void 0:e.cursor)||void 0})})(e)},[r(P,{class:"more-icon",file:o(se),width:"12px",height:"12px"},null,8,["file"]),i("div",{class:"more-text"},[i("span",null,p(o(Y).t("TUISearch.查看更多")),1),i("span",null,p(o(Y).t(`TUISearch.${e.label}`)),1)])],8,["onClick"])):v("",!0)])))),128))])])),o(B)||"conversation"===d.searchType?(s(),n("div",{key:1,class:h(["tui-search-result-detail","conversation"===d.searchType&&"tui-search-result-in-conversation"])},[o(W)?(s(),_(Ge,{key:0,class:h(["search-result-loading",!o(H)&&"search-result-loading-h5"])},null,8,["class"])):v("",!0),!o(W)&&o(B)&&"conversation"!==d.searchType?(s(),n("div",{key:1,class:"tui-search-message-header"},[i("div",{class:"header-content"},[i("div",{class:"header-content-count normal"},[i("span",null,p(o(R)),1),i("span",null,p(o(Y).t("TUISearch.条与")),1)]),i("div",{class:"header-content-keyword"},[(s(!0),n(k,null,M(o(y),((e,t)=>(s(),n("span",{key:t},[i("span",{class:"normal"},'"'),i("span",{class:"highlight"},p(e),1),i("span",{class:"normal"},'"')])))),128))]),i("div",{class:"header-content-type normal"},[i("span",null,p(o(Y).t("TUISearch.相关的")),1),i("span",null,p(o(Y).t(`TUISearch.${"allMessage"===o(b)?"结果":o(re)[o(b)].label}`)),1)])]),i("div",{class:"header-enter",onClick:t[0]||(t[0]=e=>o(Pe)({conversationID:o(x)}))},[i("span",null,p(o(Y).t("TUISearch.进入聊天")),1),r(P,{class:"enter-icon",file:o(ae),width:"14px",height:"14px"},null,8,["file"])])])):v("",!0),!o(W)&&o(E)&&o(E)[0]?(s(),n("div",{key:2,class:"tui-search-message-list"},["global"===d.searchType||"imageMessage"!==o(b)&&"fileMessage"!==o(b)?(s(!0),n(k,{key:0},M(o(E),(e=>(s(),n("div",{key:he(e.ID),class:h(["list-item"])},[r(Ae,{listItem:e,listItemContent:e.getMessageContent(),type:o(b),displayType:ce(),keywordList:o(y),onShowResultDetail:ie,onNavigateToChatPosition:ve},null,8,["listItem","listItemContent","type","displayType","keywordList"])])))),128)):(s(!0),n(k,{key:1},M(o(N),(e=>(s(),n("div",{key:he(e.date),class:h(["list-group","fileMessage"===o(b)?"list-group-file":"list-group-image"])},[i("div",{class:h(["list-group-date"])},p(e.date),1),(s(!0),n(k,null,M(e.list,(e=>(s(),n("div",{key:he(e.ID),class:h(["list-group-item"])},[r(Ae,{listItem:e,listItemContent:e.getMessageContent(),type:o(b),displayType:ce(),keywordList:o(y),onShowResultDetail:ie,onNavigateToChatPosition:ve},null,8,["listItem","listItemContent","type","displayType","keywordList"])])))),128))],2)))),128)),o($)&&o($).cursor?(s(),n("div",{key:2,class:"more",onClick:ne},[r(P,{class:"more-icon",file:o(se),width:"12px",height:"12px"},null,8,["file"]),i("div",{class:"more-text"},p(o(Y).t("TUISearch.查看更多历史记录")),1)])):v("",!0)])):v("",!0)],2)):v("",!0)],2))}}),[["__scopeId","data-v-5a557b27"]]),Ne=W(e({__name:"index",props:{searchType:{type:String,default:"global",validator:e=>["global","conversation"].includes(e)}},setup(e){const l=e,u=t(),c=t(!1),d=()=>{c.value=!c.value,!A&&c.value&&z.listen({domRefs:u.value,handler:g})},y=t([]),g=()=>{c.value=!1};return a((()=>{y.value=[...N.getExtensionList(B.TUISearch.EXTENSION.SEARCH_MORE.EXT_ID)],N.callService({serviceName:B.TUIConversation.SERVICE.NAME,method:B.TUIConversation.SERVICE.METHOD.HIDE_CONVERSATION_HEADER,params:{}})})),T((()=>c.value),(()=>{c.value&&L.update(O.SEARCH,"currentSearchingStatus",{isSearching:!1,searchType:l.searchType})})),(e,t)=>(s(),n("div",{ref_key:"searchMoreRef",ref:u,class:h(["tui-search-more",!o(H)&&"tui-search-more-h5"])},[i("div",{class:"more",onClick:t[0]||(t[0]=e=>d())},[r(P,{class:"more-icon",file:o("data:image/svg+xml,%3csvg%20width='25'%20height='25'%20viewBox='0%200%2025%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.5%204.5C0.5%202.29086%202.29086%200.5%204.5%200.5L20.5%200.5C22.7091%200.5%2024.5%202.29086%2024.5%204.5V20.5C24.5%2022.7091%2022.7091%2024.5%2020.5%2024.5H4.5C2.29086%2024.5%200.5%2022.7091%200.5%2020.5V4.5Z'%20fill='%23F4F5F9'%20style='fill:%23F4F5F9;fill:color(display-p3%200.9569%200.9608%200.9765);fill-opacity:1;'/%3e%3cg%20opacity='0.80492'%3e%3crect%20x='5.75'%20y='12.25'%20width='13.5'%20height='0.5'%20rx='0.25'%20stroke='%23232832'%20style='stroke:%23232832;stroke:color(display-p3%200.1360%200.1574%200.1949);stroke-opacity:1;'%20stroke-width='0.5'/%3e%3crect%20x='12.25'%20y='19.25'%20width='13.5'%20height='0.5'%20rx='0.25'%20transform='rotate(-90%2012.25%2019.25)'%20stroke='%23232832'%20style='stroke:%23232832;stroke:color(display-p3%200.1360%200.1574%200.1949);stroke-opacity:1;'%20stroke-width='0.5'/%3e%3c/g%3e%3c/svg%3e"),width:o(H)?"28px":"34px",height:o(H)?"28px":"34px"},null,8,["file","width","height"])]),o(c)?(s(),n("ul",{key:0,class:"tui-search-more-list"},[(s(!0),n(k,null,M(o(y),((e,t)=>(s(),n("li",{key:t,class:"list-item",onClick:t=>(e=>{var t;const{listener:a={onClicked:()=>{}}}=e;null==(t=null==a?void 0:a.onClicked)||t.call(a,e),d()})(e)},[e.icon?(s(),_(P,{key:0,class:"list-item-icon",file:e.icon},null,8,["file"])):v("",!0),i("div",{class:"list-item-title"},p(e.text),1)],8,["onClick"])))),128))])):v("",!0)],2))}}),[["__scopeId","data-v-2dda292a"]]),Be=W(e({__name:"index",props:{searchType:{default:()=>A?"conversation":"global"}},setup(e){const u=e,c=t(),d=t(""),p=t(!1),y=t(A),g=f((()=>!H&&("global"===u.searchType&&p.value||"conversation"===u.searchType&&y.value))),m=e=>{L.update(O.SEARCH,"currentSearchInputValue",{value:"",searchType:e}),L.update(O.SEARCH,"currentSearchMessageType",{value:oe[e],searchType:e}),L.update(O.SEARCH,"currentSearchMessageTime",{value:ye,searchType:e})};function T(e){A||d.value===e||D(),d.value=e}function S(e){var t,a,l,s;(null==e?void 0:e.searchType)===u.searchType&&(p.value=null==e?void 0:e.isSearching,"global"===(null==e?void 0:e.searchType)&&c.value&&H&&e.isSearching&&z.listen({domRefs:c.value,handler:M}),"global"===(null==e?void 0:e.searchType)&&A&&(e.isSearching?null==(a=null==(t=F)?void 0:t.hideTabBar())||a.catch((()=>{})):null==(s=null==(l=F)?void 0:l.showTabBar())||s.catch((()=>{}))))}function k(e){y.value=!!e,y.value&&m(u.searchType)}function M(){L.update(O.SEARCH,"currentSearchingStatus",{isSearching:!1,searchType:u.searchType})}function D(){L.update(O.SEARCH,"isShowInConversationSearch",!1)}return a((()=>{["global","conversation"].forEach((e=>{m(e)})),L.watch(O.CONV,{currentConversationID:T}),L.watch(O.SEARCH,{currentSearchingStatus:S,isShowInConversationSearch:k})})),l((()=>{L.unwatch(O.CONV,{currentConversationID:T}),L.unwatch(O.SEARCH,{currentSearchingStatus:S,isShowInConversationSearch:k})})),(e,t)=>"global"===e.searchType||("conversation"===e.searchType||!e.searchType&&o(A))&&o(y)?(s(),n("div",{key:0,class:h(["tui-search",!o(H)&&"tui-search-h5",`tui-search-main-${e.searchType?e.searchType:"conversation"}`,o(g)&&"tui-search-h5-full-screen"])},["global"===e.searchType?(s(),n("div",{key:0,ref_key:"globalSearchRef",ref:c,class:h(["tui-search-global",!o(H)&&"tui-search-h5-global"])},[i("div",{class:h(["tui-search-global-header",!o(H)&&"tui-search-h5-global-header"])},[r(ie,{class:"search-input",searchType:e.searchType},null,8,["searchType"]),o(H)||!o(p)?(s(),_(Ne,{key:0,class:"search-more",searchType:e.searchType},null,8,["searchType"])):v("",!0)],2),o(p)?(s(),_(Ie,{key:0,class:"search-container",popupPosition:"bottom",searchType:e.searchType},{result:I((()=>[r(je,{class:"search-result",searchType:e.searchType},null,8,["searchType"])])),_:1},8,["searchType"])):v("",!0)],2)):"conversation"===e.searchType&&o(y)||o(A)?(s(),n("div",{key:1,class:h(["tui-search-conversation",!o(H)&&"tui-search-h5-conversation"])},[r(Ie,{class:"search-container",popupPosition:"aside",searchType:e.searchType?e.searchType:"conversation",onCloseInConversationSearch:D},{input:I((()=>[r(ie,{searchType:e.searchType?e.searchType:"conversation"},null,8,["searchType"])])),result:I((()=>[r(je,{class:"search-result",searchType:e.searchType?e.searchType:"conversation"},null,8,["searchType"])])),_:1},8,["searchType"])],2)):v("",!0)],2)):v("",!0)}}),[["__scopeId","data-v-18dff187"]]);export{Be as default};
|