var hx=Object.defineProperty;var gx=(e,t,n)=>t in e?hx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Xt=(e,t,n)=>(gx(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function eC(e,t){const n=Object.create(null),r=e.split(",");for(let o=0;o!!n[o.toLowerCase()]:o=>!!n[o]}const Cr={},sf=[],Ws=()=>{},mx=()=>!1,vx=/^on[^a-z]/,Ey=e=>vx.test(e),tC=e=>e.startsWith("onUpdate:"),no=Object.assign,nC=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},yx=Object.prototype.hasOwnProperty,Wn=(e,t)=>yx.call(e,t),jt=Array.isArray,af=e=>mg(e)==="[object Map]",Gf=e=>mg(e)==="[object Set]",Qw=e=>mg(e)==="[object Date]",gn=e=>typeof e=="function",$r=e=>typeof e=="string",Uh=e=>typeof e=="symbol",fr=e=>e!==null&&typeof e=="object",aL=e=>fr(e)&&gn(e.then)&&gn(e.catch),lL=Object.prototype.toString,mg=e=>lL.call(e),_x=e=>mg(e).slice(8,-1),uL=e=>mg(e)==="[object Object]",rC=e=>$r(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,tv=eC(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ay=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},bx=/-(\w)/g,Ea=Ay(e=>e.replace(bx,(t,n)=>n?n.toUpperCase():"")),Mx=/\B([A-Z])/g,ad=Ay(e=>e.replace(Mx,"-$1").toLowerCase()),Ly=Ay(e=>e.charAt(0).toUpperCase()+e.slice(1)),w1=Ay(e=>e?`on${Ly(e)}`:""),Fh=(e,t)=>!Object.is(e,t),nv=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Sv=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ix=e=>{const t=$r(e)?Number(e):NaN;return isNaN(t)?e:t};let eS;const hM=()=>eS||(eS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function No(e){if(jt(e)){const t={};for(let n=0;n{if(n){const r=n.split(Tx);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function lt(e){let t="";if($r(e))t=e;else if(jt(e))for(let n=0;nQc(n,t))}const De=e=>$r(e)?e:e==null?"":jt(e)||fr(e)&&(e.toString===lL||!gn(e.toString))?JSON.stringify(e,dL,2):String(e),dL=(e,t)=>t&&t.__v_isRef?dL(e,t.value):af(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o])=>(n[`${r} =>`]=o,n),{})}:Gf(t)?{[`Set(${t.size})`]:[...t.values()]}:fr(t)&&!jt(t)&&!uL(t)?String(t):t;let is;class Lx{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=is,!t&&is&&(this.index=(is.scopes||(is.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=is;try{return is=this,t()}finally{is=n}}}on(){is=this}off(){is=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},pL=e=>(e.w&bu)>0,hL=e=>(e.n&bu)>0,Rx=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(g==="length"||g>=d)&&u.push(f)})}else switch(n!==void 0&&u.push(s.get(n)),t){case"add":jt(e)?rC(n)&&u.push(s.get("length")):(u.push(s.get(xc)),af(e)&&u.push(s.get(mM)));break;case"delete":jt(e)||(u.push(s.get(xc)),af(e)&&u.push(s.get(mM)));break;case"set":af(e)&&u.push(s.get(xc));break}if(u.length===1)u[0]&&vM(u[0]);else{const d=[];for(const f of u)f&&d.push(...f);vM(sC(d))}}function vM(e,t){const n=jt(e)?e:[...e];for(const r of n)r.computed&&nS(r);for(const r of n)r.computed||nS(r)}function nS(e,t){(e!==zs||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function Px(e,t){var n;return(n=kv.get(e))==null?void 0:n.get(t)}const xx=eC("__proto__,__v_isRef,__isVue"),vL=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Uh)),Ux=lC(),Fx=lC(!1,!0),$x=lC(!0),rS=Gx();function Gx(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=qn(this);for(let i=0,s=this.length;i{e[t]=function(...n){Bf();const r=qn(this)[t].apply(this,n);return Hf(),r}}),e}function Bx(e){const t=qn(this);return Ji(t,"has",e),t.hasOwnProperty(e)}function lC(e=!1,t=!1){return function(r,o,i){if(o==="__v_isReactive")return!e;if(o==="__v_isReadonly")return e;if(o==="__v_isShallow")return t;if(o==="__v_raw"&&i===(e?t?rU:IL:t?ML:bL).get(r))return r;const s=jt(r);if(!e){if(s&&Wn(rS,o))return Reflect.get(rS,o,i);if(o==="hasOwnProperty")return Bx}const u=Reflect.get(r,o,i);return(Uh(o)?vL.has(o):xx(o))||(e||Ji(r,"get",o),t)?u:br(u)?s&&rC(o)?u:u.value:fr(u)?e?$h(u):Wt(u):u}}const Hx=yL(),qx=yL(!0);function yL(e=!1){return function(n,r,o,i){let s=n[r];if(Cf(s)&&br(s)&&!br(o))return!1;if(!e&&(!Dv(o)&&!Cf(o)&&(s=qn(s),o=qn(o)),!jt(n)&&br(s)&&!br(o)))return s.value=o,!0;const u=jt(n)&&rC(r)?Number(r)e,Oy=e=>Reflect.getPrototypeOf(e);function hm(e,t,n=!1,r=!1){e=e.__v_raw;const o=qn(e),i=qn(t);n||(t!==i&&Ji(o,"get",t),Ji(o,"get",i));const{has:s}=Oy(o),u=r?uC:n?pC:Gh;if(s.call(o,t))return u(e.get(t));if(s.call(o,i))return u(e.get(i));e!==o&&e.get(t)}function gm(e,t=!1){const n=this.__v_raw,r=qn(n),o=qn(e);return t||(e!==o&&Ji(r,"has",e),Ji(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function mm(e,t=!1){return e=e.__v_raw,!t&&Ji(qn(e),"iterate",xc),Reflect.get(e,"size",e)}function oS(e){e=qn(e);const t=qn(this);return Oy(t).has.call(t,e)||(t.add(e),vl(t,"add",e,e)),this}function iS(e,t){t=qn(t);const n=qn(this),{has:r,get:o}=Oy(n);let i=r.call(n,e);i||(e=qn(e),i=r.call(n,e));const s=o.call(n,e);return n.set(e,t),i?Fh(t,s)&&vl(n,"set",e,t):vl(n,"add",e,t),this}function sS(e){const t=qn(this),{has:n,get:r}=Oy(t);let o=n.call(t,e);o||(e=qn(e),o=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return o&&vl(t,"delete",e,void 0),i}function aS(){const e=qn(this),t=e.size!==0,n=e.clear();return t&&vl(e,"clear",void 0,void 0),n}function vm(e,t){return function(r,o){const i=this,s=i.__v_raw,u=qn(s),d=t?uC:e?pC:Gh;return!e&&Ji(u,"iterate",xc),s.forEach((f,g)=>r.call(o,d(f),d(g),i))}}function ym(e,t,n){return function(...r){const o=this.__v_raw,i=qn(o),s=af(i),u=e==="entries"||e===Symbol.iterator&&s,d=e==="keys"&&s,f=o[e](...r),g=n?uC:t?pC:Gh;return!t&&Ji(i,"iterate",d?mM:xc),{next(){const{value:v,done:_}=f.next();return _?{value:v,done:_}:{value:u?[g(v[0]),g(v[1])]:g(v),done:_}},[Symbol.iterator](){return this}}}}function Ll(e){return function(...t){return e==="delete"?!1:this}}function Yx(){const e={get(i){return hm(this,i)},get size(){return mm(this)},has:gm,add:oS,set:iS,delete:sS,clear:aS,forEach:vm(!1,!1)},t={get(i){return hm(this,i,!1,!0)},get size(){return mm(this)},has:gm,add:oS,set:iS,delete:sS,clear:aS,forEach:vm(!1,!0)},n={get(i){return hm(this,i,!0)},get size(){return mm(this,!0)},has(i){return gm.call(this,i,!0)},add:Ll("add"),set:Ll("set"),delete:Ll("delete"),clear:Ll("clear"),forEach:vm(!0,!1)},r={get(i){return hm(this,i,!0,!0)},get size(){return mm(this,!0)},has(i){return gm.call(this,i,!0)},add:Ll("add"),set:Ll("set"),delete:Ll("delete"),clear:Ll("clear"),forEach:vm(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=ym(i,!1,!1),n[i]=ym(i,!0,!1),t[i]=ym(i,!1,!0),r[i]=ym(i,!0,!0)}),[e,n,t,r]}const[Jx,Xx,Zx,Qx]=Yx();function cC(e,t){const n=t?e?Qx:Zx:e?Xx:Jx;return(r,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Wn(n,o)&&o in r?n:r,o,i)}const eU={get:cC(!1,!1)},tU={get:cC(!1,!0)},nU={get:cC(!0,!1)},bL=new WeakMap,ML=new WeakMap,IL=new WeakMap,rU=new WeakMap;function oU(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function iU(e){return e.__v_skip||!Object.isExtensible(e)?0:oU(_x(e))}function Wt(e){return Cf(e)?e:dC(e,!1,_L,eU,bL)}function sU(e){return dC(e,!1,Kx,tU,ML)}function $h(e){return dC(e,!0,Wx,nU,IL)}function dC(e,t,n,r,o){if(!fr(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=o.get(e);if(i)return i;const s=iU(e);if(s===0)return e;const u=new Proxy(e,s===2?r:n);return o.set(e,u),u}function lf(e){return Cf(e)?lf(e.__v_raw):!!(e&&e.__v_isReactive)}function Cf(e){return!!(e&&e.__v_isReadonly)}function Dv(e){return!!(e&&e.__v_isShallow)}function CL(e){return lf(e)||Cf(e)}function qn(e){const t=e&&e.__v_raw;return t?qn(t):e}function fC(e){return wv(e,"__v_skip",!0),e}const Gh=e=>fr(e)?Wt(e):e,pC=e=>fr(e)?$h(e):e;function hC(e){uu&&zs&&(e=qn(e),mL(e.dep||(e.dep=sC())))}function gC(e,t){e=qn(e);const n=e.dep;n&&vM(n)}function br(e){return!!(e&&e.__v_isRef===!0)}function Ne(e){return wL(e,!1)}function TL(e){return wL(e,!0)}function wL(e,t){return br(e)?e:new aU(e,t)}class aU{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:qn(t),this._value=n?t:Gh(t)}get value(){return hC(this),this._value}set value(t){const n=this.__v_isShallow||Dv(t)||Cf(t);t=n?t:qn(t),Fh(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Gh(t),gC(this))}}function Oe(e){return br(e)?e.value:e}const lU={get:(e,t,n)=>Oe(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return br(o)&&!br(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function SL(e){return lf(e)?e:new Proxy(e,lU)}class uU{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>hC(this),()=>gC(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function cU(e){return new uU(e)}function Yt(e){const t=jt(e)?new Array(e.length):{};for(const n in e)t[n]=kL(e,n);return t}class dU{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Px(qn(this._object),this._key)}}class fU{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Kn(e,t,n){return br(e)?e:gn(e)?new fU(e):fr(e)&&arguments.length>1?kL(e,t,n):Ne(e)}function kL(e,t,n){const r=e[t];return br(r)?r:new dU(e,t,n)}class pU{constructor(t,n,r,o){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new aC(t,()=>{this._dirty||(this._dirty=!0,gC(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=qn(this);return hC(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function hU(e,t,n=!1){let r,o;const i=gn(e);return i?(r=e,o=Ws):(r=e.get,o=e.set),new pU(r,o,i||!o,n)}function cu(e,t,n,r){let o;try{o=r?e(...r):e()}catch(i){Ry(i,t,n)}return o}function Es(e,t,n,r){if(gn(e)){const i=cu(e,t,n,r);return i&&aL(i)&&i.catch(s=>{Ry(s,t,n)}),i}const o=[];for(let i=0;i>>1;Hh(fi[r])va&&fi.splice(t,1)}function yU(e){jt(e)?uf.push(...e):(!Za||!Za.includes(e,e.allowRecurse?ic+1:ic))&&uf.push(e),EL()}function lS(e,t=Bh?va+1:0){for(;tHh(n)-Hh(r)),ic=0;ice.id==null?1/0:e.id,_U=(e,t)=>{const n=Hh(e)-Hh(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function LL(e){yM=!1,Bh=!0,fi.sort(_U);const t=Ws;try{for(va=0;va$r(M)?M.trim():M)),v&&(o=n.map(Sv))}let u,d=r[u=w1(t)]||r[u=w1(Ea(t))];!d&&i&&(d=r[u=w1(ad(t))]),d&&Es(d,e,6,o);const f=r[u+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,Es(f,e,6,o)}}function OL(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const i=e.emits;let s={},u=!1;if(!gn(e)){const d=f=>{const g=OL(f,t,!0);g&&(u=!0,no(s,g))};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!i&&!u?(fr(e)&&r.set(e,null),null):(jt(i)?i.forEach(d=>s[d]=null):no(s,i),fr(e)&&r.set(e,s),s)}function Ny(e,t){return!e||!Ey(t)?!1:(t=t.slice(2).replace(/Once$/,""),Wn(e,t[0].toLowerCase()+t.slice(1))||Wn(e,ad(t))||Wn(e,t))}let Zo=null,Py=null;function Ev(e){const t=Zo;return Zo=e,Py=e&&e.type.__scopeId||null,t}function pr(e){Py=e}function hr(){Py=null}function Ct(e,t=Zo,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&MS(-1);const i=Ev(t);let s;try{s=e(...o)}finally{Ev(i),r._d&&MS(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function S1(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:i,propsOptions:[s],slots:u,attrs:d,emit:f,render:g,renderCache:v,data:_,setupState:M,ctx:I,inheritAttrs:k}=e;let w,S;const L=Ev(e);try{if(n.shapeFlag&4){const O=o||r;w=ha(g.call(O,O,v,i,M,_,I)),S=d}else{const O=t;w=ha(O.length>1?O(i,{attrs:d,slots:u,emit:f}):O(i,null)),S=t.props?d:MU(d)}}catch(O){uh.length=0,Ry(O,e,1),w=It(Ei)}let A=w;if(S&&k!==!1){const O=Object.keys(S),{shapeFlag:H}=A;O.length&&H&7&&(s&&O.some(tC)&&(S=IU(S,s)),A=Aa(A,S))}return n.dirs&&(A=Aa(A),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&(A.transition=n.transition),w=A,Ev(L),w}const MU=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ey(n))&&((t||(t={}))[n]=e[n]);return t},IU=(e,t)=>{const n={};for(const r in e)(!tC(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function CU(e,t,n){const{props:r,children:o,component:i}=e,{props:s,children:u,patchFlag:d}=t,f=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&d>=0){if(d&1024)return!0;if(d&16)return r?uS(r,s,f):!!s;if(d&8){const g=t.dynamicProps;for(let v=0;ve.__isSuspense;function SU(e,t){t&&t.pendingBranch?jt(e)?t.effects.push(...e):t.effects.push(e):yU(e)}function nn(e,t){return yC(e,null,t)}const _m={};function Bt(e,t,n){return yC(e,t,n)}function yC(e,t,{immediate:n,deep:r,flush:o,onTrack:i,onTrigger:s}=Cr){var u;const d=iC()===((u=Oo)==null?void 0:u.scope)?Oo:null;let f,g=!1,v=!1;if(br(e)?(f=()=>e.value,g=Dv(e)):lf(e)?(f=()=>e,r=!0):jt(e)?(v=!0,g=e.some(O=>lf(O)||Dv(O)),f=()=>e.map(O=>{if(br(O))return O.value;if(lf(O))return hc(O);if(gn(O))return cu(O,d,2)})):gn(e)?t?f=()=>cu(e,d,2):f=()=>{if(!(d&&d.isUnmounted))return _&&_(),Es(e,d,3,[M])}:f=Ws,t&&r){const O=f;f=()=>hc(O())}let _,M=O=>{_=L.onStop=()=>{cu(O,d,4)}},I;if(Wh)if(M=Ws,t?n&&Es(t,d,3,[f(),v?[]:void 0,M]):f(),o==="sync"){const O=h7();I=O.__watcherHandles||(O.__watcherHandles=[])}else return Ws;let k=v?new Array(e.length).fill(_m):_m;const w=()=>{if(L.active)if(t){const O=L.run();(r||g||(v?O.some((H,q)=>Fh(H,k[q])):Fh(O,k)))&&(_&&_(),Es(t,d,3,[O,k===_m?void 0:v&&k[0]===_m?[]:k,M]),k=O)}else L.run()};w.allowRecurse=!!t;let S;o==="sync"?S=w:o==="post"?S=()=>qi(w,d&&d.suspense):(w.pre=!0,d&&(w.id=d.uid),S=()=>vC(w));const L=new aC(f,S);t?n?w():k=L.run():o==="post"?qi(L.run.bind(L),d&&d.suspense):L.run();const A=()=>{L.stop(),d&&d.scope&&nC(d.scope.effects,L)};return I&&I.push(A),A}function kU(e,t,n){const r=this.proxy,o=$r(e)?e.includes(".")?RL(r,e):()=>r[e]:e.bind(r,r);let i;gn(t)?i=t:(i=t.handler,n=t);const s=Oo;Tf(this);const u=yC(o,i.bind(r),n);return s?Tf(s):Uc(),u}function RL(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o{hc(n,t)});else if(uL(e))for(const n in e)hc(e[n],t);return e}function Bn(e,t){const n=Zo;if(n===null)return e;const r=$y(n)||n.proxy,o=e.dirs||(e.dirs=[]);for(let i=0;i{e.isMounted=!0}),yi(()=>{e.isUnmounting=!0}),e}const ys=[Function,Array],PL={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ys,onEnter:ys,onAfterEnter:ys,onEnterCancelled:ys,onBeforeLeave:ys,onLeave:ys,onAfterLeave:ys,onLeaveCancelled:ys,onBeforeAppear:ys,onAppear:ys,onAfterAppear:ys,onAppearCancelled:ys},DU={name:"BaseTransition",props:PL,setup(e,{slots:t}){const n=Xi(),r=NL();let o;return()=>{const i=t.default&&_C(t.default(),!0);if(!i||!i.length)return;let s=i[0];if(i.length>1){for(const k of i)if(k.type!==Ei){s=k;break}}const u=qn(e),{mode:d}=u;if(r.isLeaving)return k1(s);const f=cS(s);if(!f)return k1(s);const g=qh(f,u,r,n);Vh(f,g);const v=n.subTree,_=v&&cS(v);let M=!1;const{getTransitionKey:I}=f.type;if(I){const k=I();o===void 0?o=k:k!==o&&(o=k,M=!0)}if(_&&_.type!==Ei&&(!sc(f,_)||M)){const k=qh(_,u,r,n);if(Vh(_,k),d==="out-in")return r.isLeaving=!0,k.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},k1(s);d==="in-out"&&f.type!==Ei&&(k.delayLeave=(w,S,L)=>{const A=xL(r,_);A[String(_.key)]=_,w._leaveCb=()=>{S(),w._leaveCb=void 0,delete g.delayedLeave},g.delayedLeave=L})}return s}}},EU=DU;function xL(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function qh(e,t,n,r){const{appear:o,mode:i,persisted:s=!1,onBeforeEnter:u,onEnter:d,onAfterEnter:f,onEnterCancelled:g,onBeforeLeave:v,onLeave:_,onAfterLeave:M,onLeaveCancelled:I,onBeforeAppear:k,onAppear:w,onAfterAppear:S,onAppearCancelled:L}=t,A=String(e.key),O=xL(n,e),H=(B,j)=>{B&&Es(B,r,9,j)},q=(B,j)=>{const $=j[1];H(B,j),jt(B)?B.every(R=>R.length<=1)&&$():B.length<=1&&$()},P={mode:i,persisted:s,beforeEnter(B){let j=u;if(!n.isMounted)if(o)j=k||u;else return;B._leaveCb&&B._leaveCb(!0);const $=O[A];$&&sc(e,$)&&$.el._leaveCb&&$.el._leaveCb(),H(j,[B])},enter(B){let j=d,$=f,R=g;if(!n.isMounted)if(o)j=w||d,$=S||f,R=L||g;else return;let T=!1;const x=B._enterCb=Z=>{T||(T=!0,Z?H(R,[B]):H($,[B]),P.delayedLeave&&P.delayedLeave(),B._enterCb=void 0)};j?q(j,[B,x]):x()},leave(B,j){const $=String(e.key);if(B._enterCb&&B._enterCb(!0),n.isUnmounting)return j();H(v,[B]);let R=!1;const T=B._leaveCb=x=>{R||(R=!0,j(),x?H(I,[B]):H(M,[B]),B._leaveCb=void 0,O[$]===e&&delete O[$])};O[$]=e,_?q(_,[B,T]):T()},clone(B){return qh(B,t,n,r)}};return P}function k1(e){if(xy(e))return e=Aa(e),e.children=null,e}function cS(e){return xy(e)?e.children?e.children[0]:void 0:e}function Vh(e,t){e.shapeFlag&6&&e.component?Vh(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function _C(e,t=!1,n){let r=[],o=0;for(let i=0;i1)for(let i=0;ino({name:e.name},t,{setup:e}))():e}const sh=e=>!!e.type.__asyncLoader,xy=e=>e.type.__isKeepAlive;function UL(e,t){$L(e,"a",t)}function FL(e,t){$L(e,"da",t)}function $L(e,t,n=Oo){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Uy(t,r,n),n){let o=n.parent;for(;o&&o.parent;)xy(o.parent.vnode)&&AU(r,t,n,o),o=o.parent}}function AU(e,t,n,r){const o=Uy(t,e,r,!0);_l(()=>{nC(r[t],o)},n)}function Uy(e,t,n=Oo,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;Bf(),Tf(n);const u=Es(t,n,e,s);return Uc(),Hf(),u});return r?o.unshift(i):o.push(i),i}}const yl=e=>(t,n=Oo)=>(!Wh||e==="sp")&&Uy(e,(...r)=>t(...r),n),qf=yl("bm"),Rn=yl("m"),GL=yl("bu"),BL=yl("u"),yi=yl("bum"),_l=yl("um"),LU=yl("sp"),OU=yl("rtg"),RU=yl("rtc");function NU(e,t=Oo){Uy("ec",e,t)}const bC="components",PU="directives";function xt(e,t){return MC(bC,e,!0,t)||e}const HL=Symbol.for("v-ndc");function cf(e){return $r(e)?MC(bC,e,!1)||e:e||HL}function xU(e){return MC(PU,e)}function MC(e,t,n=!0,r=!1){const o=Zo||Oo;if(o){const i=o.type;if(e===bC){const u=d7(i,!1);if(u&&(u===t||u===Ea(t)||u===Ly(Ea(t))))return i}const s=dS(o[e]||i[e],t)||dS(o.appContext[e],t);return!s&&r?i:s}}function dS(e,t){return e&&(e[t]||e[Ea(t)]||e[Ly(Ea(t))])}function zt(e,t,n,r){let o;const i=n&&n[r];if(jt(e)||$r(e)){o=new Array(e.length);for(let s=0,u=e.length;st(s,u,void 0,i&&i[u]));else{const s=Object.keys(e);o=new Array(s.length);for(let u=0,d=s.length;u{const i=r.fn(...o);return i&&(i.key=r.key),i}:r.fn)}return e}function Ft(e,t,n={},r,o){if(Zo.isCE||Zo.parent&&sh(Zo.parent)&&Zo.parent.isCE)return t!=="default"&&(n.name=t),It("slot",n,r&&r());let i=e[t];i&&i._c&&(i._d=!1),J();const s=i&&qL(i(n)),u=_t(ft,{key:n.key||s&&s.key||`_${t}`},s||(r?r():[]),s&&e._===1?64:-2);return!o&&u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),i&&i._c&&(i._d=!0),u}function qL(e){return e.some(t=>jh(t)?!(t.type===Ei||t.type===ft&&!qL(t.children)):!0)?e:null}const _M=e=>e?eO(e)?$y(e)||e.proxy:_M(e.parent):null,ah=no(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>_M(e.parent),$root:e=>_M(e.root),$emit:e=>e.emit,$options:e=>IC(e),$forceUpdate:e=>e.f||(e.f=()=>vC(e.update)),$nextTick:e=>e.n||(e.n=wr.bind(e.proxy)),$watch:e=>kU.bind(e)}),D1=(e,t)=>e!==Cr&&!e.__isScriptSetup&&Wn(e,t),UU={get({_:e},t){const{ctx:n,setupState:r,data:o,props:i,accessCache:s,type:u,appContext:d}=e;let f;if(t[0]!=="$"){const M=s[t];if(M!==void 0)switch(M){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(D1(r,t))return s[t]=1,r[t];if(o!==Cr&&Wn(o,t))return s[t]=2,o[t];if((f=e.propsOptions[0])&&Wn(f,t))return s[t]=3,i[t];if(n!==Cr&&Wn(n,t))return s[t]=4,n[t];bM&&(s[t]=0)}}const g=ah[t];let v,_;if(g)return t==="$attrs"&&Ji(e,"get",t),g(e);if((v=u.__cssModules)&&(v=v[t]))return v;if(n!==Cr&&Wn(n,t))return s[t]=4,n[t];if(_=d.config.globalProperties,Wn(_,t))return _[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return D1(o,t)?(o[t]=n,!0):r!==Cr&&Wn(r,t)?(r[t]=n,!0):Wn(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:i}},s){let u;return!!n[s]||e!==Cr&&Wn(e,s)||D1(t,s)||(u=i[0])&&Wn(u,s)||Wn(r,s)||Wn(ah,s)||Wn(o.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Wn(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function vg(){return FU().slots}function FU(){const e=Xi();return e.setupContext||(e.setupContext=nO(e))}function fS(e){return jt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let bM=!0;function $U(e){const t=IC(e),n=e.proxy,r=e.ctx;bM=!1,t.beforeCreate&&pS(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:s,watch:u,provide:d,inject:f,created:g,beforeMount:v,mounted:_,beforeUpdate:M,updated:I,activated:k,deactivated:w,beforeDestroy:S,beforeUnmount:L,destroyed:A,unmounted:O,render:H,renderTracked:q,renderTriggered:P,errorCaptured:B,serverPrefetch:j,expose:$,inheritAttrs:R,components:T,directives:x,filters:Z}=t;if(f&&GU(f,r,null),s)for(const X in s){const ie=s[X];gn(ie)&&(r[X]=ie.bind(n))}if(o){const X=o.call(n,n);fr(X)&&(e.data=Wt(X))}if(bM=!0,i)for(const X in i){const ie=i[X],he=gn(ie)?ie.bind(n,n):gn(ie.get)?ie.get.bind(n,n):Ws,ae=!gn(ie)&&gn(ie.set)?ie.set.bind(n):Ws,de=qe({get:he,set:ae});Object.defineProperty(r,X,{enumerable:!0,configurable:!0,get:()=>de.value,set:Y=>de.value=Y})}if(u)for(const X in u)VL(u[X],r,n,X);if(d){const X=gn(d)?d.call(n):d;Reflect.ownKeys(X).forEach(ie=>{Ao(ie,X[ie])})}g&&pS(g,e,"c");function re(X,ie){jt(ie)?ie.forEach(he=>X(he.bind(n))):ie&&X(ie.bind(n))}if(re(qf,v),re(Rn,_),re(GL,M),re(BL,I),re(UL,k),re(FL,w),re(NU,B),re(RU,q),re(OU,P),re(yi,L),re(_l,O),re(LU,j),jt($))if($.length){const X=e.exposed||(e.exposed={});$.forEach(ie=>{Object.defineProperty(X,ie,{get:()=>n[ie],set:he=>n[ie]=he})})}else e.exposed||(e.exposed={});H&&e.render===Ws&&(e.render=H),R!=null&&(e.inheritAttrs=R),T&&(e.components=T),x&&(e.directives=x)}function GU(e,t,n=Ws){jt(e)&&(e=MM(e));for(const r in e){const o=e[r];let i;fr(o)?"default"in o?i=en(o.from||r,o.default,!0):i=en(o.from||r):i=en(o),br(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:s=>i.value=s}):t[r]=i}}function pS(e,t,n){Es(jt(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function VL(e,t,n,r){const o=r.includes(".")?RL(n,r):()=>n[r];if($r(e)){const i=t[e];gn(i)&&Bt(o,i)}else if(gn(e))Bt(o,e.bind(n));else if(fr(e))if(jt(e))e.forEach(i=>VL(i,t,n,r));else{const i=gn(e.handler)?e.handler.bind(n):t[e.handler];gn(i)&&Bt(o,i,e)}}function IC(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,u=i.get(t);let d;return u?d=u:!o.length&&!n&&!r?d=t:(d={},o.length&&o.forEach(f=>Av(d,f,s,!0)),Av(d,t,s)),fr(t)&&i.set(t,d),d}function Av(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&Av(e,i,n,!0),o&&o.forEach(s=>Av(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const u=BU[s]||n&&n[s];e[s]=u?u(e[s],t[s]):t[s]}return e}const BU={data:hS,props:gS,emits:gS,methods:Xp,computed:Xp,beforeCreate:Ti,created:Ti,beforeMount:Ti,mounted:Ti,beforeUpdate:Ti,updated:Ti,beforeDestroy:Ti,beforeUnmount:Ti,destroyed:Ti,unmounted:Ti,activated:Ti,deactivated:Ti,errorCaptured:Ti,serverPrefetch:Ti,components:Xp,directives:Xp,watch:qU,provide:hS,inject:HU};function hS(e,t){return t?e?function(){return no(gn(e)?e.call(this,this):e,gn(t)?t.call(this,this):t)}:t:e}function HU(e,t){return Xp(MM(e),MM(t))}function MM(e){if(jt(e)){const t={};for(let n=0;n1)return n&&gn(t)?t.call(r&&r.proxy):t}}function jU(e,t,n,r=!1){const o={},i={};wv(i,Fy,1),e.propsDefaults=Object.create(null),jL(e,t,o,i);for(const s in e.propsOptions[0])s in o||(o[s]=void 0);n?e.props=r?o:sU(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function WU(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:s}}=e,u=qn(o),[d]=e.propsOptions;let f=!1;if((r||s>0)&&!(s&16)){if(s&8){const g=e.vnode.dynamicProps;for(let v=0;v{d=!0;const[_,M]=WL(v,t,!0);no(s,_),M&&u.push(...M)};!n&&t.mixins.length&&t.mixins.forEach(g),e.extends&&g(e.extends),e.mixins&&e.mixins.forEach(g)}if(!i&&!d)return fr(e)&&r.set(e,sf),sf;if(jt(i))for(let g=0;g-1,M[1]=k<0||I-1||Wn(M,"default"))&&u.push(v)}}}const f=[s,u];return fr(e)&&r.set(e,f),f}function mS(e){return e[0]!=="$"}function vS(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function yS(e,t){return vS(e)===vS(t)}function _S(e,t){return jt(t)?t.findIndex(n=>yS(n,e)):gn(t)&&yS(t,e)?0:-1}const KL=e=>e[0]==="_"||e==="$stable",CC=e=>jt(e)?e.map(ha):[ha(e)],KU=(e,t,n)=>{if(t._n)return t;const r=Ct((...o)=>CC(t(...o)),n);return r._c=!1,r},YL=(e,t,n)=>{const r=e._ctx;for(const o in e){if(KL(o))continue;const i=e[o];if(gn(i))t[o]=KU(o,i,r);else if(i!=null){const s=CC(i);t[o]=()=>s}}},JL=(e,t)=>{const n=CC(t);e.slots.default=()=>n},YU=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=qn(t),wv(t,"_",n)):YL(t,e.slots={})}else e.slots={},t&&JL(e,t);wv(e.slots,Fy,1)},JU=(e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,s=Cr;if(r.shapeFlag&32){const u=t._;u?n&&u===1?i=!1:(no(o,t),!n&&u===1&&delete o._):(i=!t.$stable,YL(t,o)),s=t}else t&&(JL(e,t),s={default:1});if(i)for(const u in o)!KL(u)&&!(u in s)&&delete o[u]};function CM(e,t,n,r,o=!1){if(jt(e)){e.forEach((_,M)=>CM(_,t&&(jt(t)?t[M]:t),n,r,o));return}if(sh(r)&&!o)return;const i=r.shapeFlag&4?$y(r.component)||r.component.proxy:r.el,s=o?null:i,{i:u,r:d}=e,f=t&&t.r,g=u.refs===Cr?u.refs={}:u.refs,v=u.setupState;if(f!=null&&f!==d&&($r(f)?(g[f]=null,Wn(v,f)&&(v[f]=null)):br(f)&&(f.value=null)),gn(d))cu(d,u,12,[s,g]);else{const _=$r(d),M=br(d);if(_||M){const I=()=>{if(e.f){const k=_?Wn(v,d)?v[d]:g[d]:d.value;o?jt(k)&&nC(k,i):jt(k)?k.includes(i)||k.push(i):_?(g[d]=[i],Wn(v,d)&&(v[d]=g[d])):(d.value=[i],e.k&&(g[e.k]=d.value))}else _?(g[d]=s,Wn(v,d)&&(v[d]=s)):M&&(d.value=s,e.k&&(g[e.k]=s))};s?(I.id=-1,qi(I,n)):I()}}}const qi=SU;function XU(e){return ZU(e)}function ZU(e,t){const n=hM();n.__VUE__=!0;const{insert:r,remove:o,patchProp:i,createElement:s,createText:u,createComment:d,setText:f,setElementText:g,parentNode:v,nextSibling:_,setScopeId:M=Ws,insertStaticContent:I}=e,k=(V,ee,se,Ce=null,le=null,ke=null,Pe=!1,xe=null,He=!!ee.dynamicChildren)=>{if(V===ee)return;V&&!sc(V,ee)&&(Ce=be(V),Y(V,le,ke,!0),V=null),ee.patchFlag===-2&&(He=!1,ee.dynamicChildren=null);const{type:Te,ref:W,shapeFlag:ne}=ee;switch(Te){case Vf:w(V,ee,se,Ce);break;case Ei:S(V,ee,se,Ce);break;case E1:V==null&&L(ee,se,Ce,Pe);break;case ft:T(V,ee,se,Ce,le,ke,Pe,xe,He);break;default:ne&1?H(V,ee,se,Ce,le,ke,Pe,xe,He):ne&6?x(V,ee,se,Ce,le,ke,Pe,xe,He):(ne&64||ne&128)&&Te.process(V,ee,se,Ce,le,ke,Pe,xe,He,ce)}W!=null&&le&&CM(W,V&&V.ref,ke,ee||V,!ee)},w=(V,ee,se,Ce)=>{if(V==null)r(ee.el=u(ee.children),se,Ce);else{const le=ee.el=V.el;ee.children!==V.children&&f(le,ee.children)}},S=(V,ee,se,Ce)=>{V==null?r(ee.el=d(ee.children||""),se,Ce):ee.el=V.el},L=(V,ee,se,Ce)=>{[V.el,V.anchor]=I(V.children,ee,se,Ce,V.el,V.anchor)},A=({el:V,anchor:ee},se,Ce)=>{let le;for(;V&&V!==ee;)le=_(V),r(V,se,Ce),V=le;r(ee,se,Ce)},O=({el:V,anchor:ee})=>{let se;for(;V&&V!==ee;)se=_(V),o(V),V=se;o(ee)},H=(V,ee,se,Ce,le,ke,Pe,xe,He)=>{Pe=Pe||ee.type==="svg",V==null?q(ee,se,Ce,le,ke,Pe,xe,He):j(V,ee,le,ke,Pe,xe,He)},q=(V,ee,se,Ce,le,ke,Pe,xe)=>{let He,Te;const{type:W,props:ne,shapeFlag:ye,transition:Be,dirs:je}=V;if(He=V.el=s(V.type,ke,ne&&ne.is,ne),ye&8?g(He,V.children):ye&16&&B(V.children,He,null,Ce,le,ke&&W!=="foreignObject",Pe,xe),je&&Yu(V,null,Ce,"created"),P(He,V,V.scopeId,Pe,Ce),ne){for(const Fe in ne)Fe!=="value"&&!tv(Fe)&&i(He,Fe,null,ne[Fe],ke,V.children,Ce,le,ve);"value"in ne&&i(He,"value",null,ne.value),(Te=ne.onVnodeBeforeMount)&&la(Te,Ce,V)}je&&Yu(V,null,Ce,"beforeMount");const ct=(!le||le&&!le.pendingBranch)&&Be&&!Be.persisted;ct&&Be.beforeEnter(He),r(He,ee,se),((Te=ne&&ne.onVnodeMounted)||ct||je)&&qi(()=>{Te&&la(Te,Ce,V),ct&&Be.enter(He),je&&Yu(V,null,Ce,"mounted")},le)},P=(V,ee,se,Ce,le)=>{if(se&&M(V,se),Ce)for(let ke=0;ke{for(let Te=He;Te{const xe=ee.el=V.el;let{patchFlag:He,dynamicChildren:Te,dirs:W}=ee;He|=V.patchFlag&16;const ne=V.props||Cr,ye=ee.props||Cr;let Be;se&&Ju(se,!1),(Be=ye.onVnodeBeforeUpdate)&&la(Be,se,ee,V),W&&Yu(ee,V,se,"beforeUpdate"),se&&Ju(se,!0);const je=le&&ee.type!=="foreignObject";if(Te?$(V.dynamicChildren,Te,xe,se,Ce,je,ke):Pe||ie(V,ee,xe,null,se,Ce,je,ke,!1),He>0){if(He&16)R(xe,ee,ne,ye,se,Ce,le);else if(He&2&&ne.class!==ye.class&&i(xe,"class",null,ye.class,le),He&4&&i(xe,"style",ne.style,ye.style,le),He&8){const ct=ee.dynamicProps;for(let Fe=0;Fe{Be&&la(Be,se,ee,V),W&&Yu(ee,V,se,"updated")},Ce)},$=(V,ee,se,Ce,le,ke,Pe)=>{for(let xe=0;xe{if(se!==Ce){if(se!==Cr)for(const xe in se)!tv(xe)&&!(xe in Ce)&&i(V,xe,se[xe],null,Pe,ee.children,le,ke,ve);for(const xe in Ce){if(tv(xe))continue;const He=Ce[xe],Te=se[xe];He!==Te&&xe!=="value"&&i(V,xe,Te,He,Pe,ee.children,le,ke,ve)}"value"in Ce&&i(V,"value",se.value,Ce.value)}},T=(V,ee,se,Ce,le,ke,Pe,xe,He)=>{const Te=ee.el=V?V.el:u(""),W=ee.anchor=V?V.anchor:u("");let{patchFlag:ne,dynamicChildren:ye,slotScopeIds:Be}=ee;Be&&(xe=xe?xe.concat(Be):Be),V==null?(r(Te,se,Ce),r(W,se,Ce),B(ee.children,se,W,le,ke,Pe,xe,He)):ne>0&&ne&64&&ye&&V.dynamicChildren?($(V.dynamicChildren,ye,se,le,ke,Pe,xe),(ee.key!=null||le&&ee===le.subTree)&&TC(V,ee,!0)):ie(V,ee,se,W,le,ke,Pe,xe,He)},x=(V,ee,se,Ce,le,ke,Pe,xe,He)=>{ee.slotScopeIds=xe,V==null?ee.shapeFlag&512?le.ctx.activate(ee,se,Ce,Pe,He):Z(ee,se,Ce,le,ke,Pe,He):K(V,ee,He)},Z=(V,ee,se,Ce,le,ke,Pe)=>{const xe=V.component=a7(V,Ce,le);if(xy(V)&&(xe.ctx.renderer=ce),l7(xe),xe.asyncDep){if(le&&le.registerDep(xe,re),!V.el){const He=xe.subTree=It(Ei);S(null,He,ee,se)}return}re(xe,V,ee,se,le,ke,Pe)},K=(V,ee,se)=>{const Ce=ee.component=V.component;if(CU(V,ee,se))if(Ce.asyncDep&&!Ce.asyncResolved){X(Ce,ee,se);return}else Ce.next=ee,vU(Ce.update),Ce.update();else ee.el=V.el,Ce.vnode=ee},re=(V,ee,se,Ce,le,ke,Pe)=>{const xe=()=>{if(V.isMounted){let{next:W,bu:ne,u:ye,parent:Be,vnode:je}=V,ct=W,Fe;Ju(V,!1),W?(W.el=je.el,X(V,W,Pe)):W=je,ne&&nv(ne),(Fe=W.props&&W.props.onVnodeBeforeUpdate)&&la(Fe,Be,W,je),Ju(V,!0);const at=S1(V),St=V.subTree;V.subTree=at,k(St,at,v(St.el),be(St),V,le,ke),W.el=at.el,ct===null&&TU(V,at.el),ye&&qi(ye,le),(Fe=W.props&&W.props.onVnodeUpdated)&&qi(()=>la(Fe,Be,W,je),le)}else{let W;const{el:ne,props:ye}=ee,{bm:Be,m:je,parent:ct}=V,Fe=sh(ee);if(Ju(V,!1),Be&&nv(Be),!Fe&&(W=ye&&ye.onVnodeBeforeMount)&&la(W,ct,ee),Ju(V,!0),ne&&pe){const at=()=>{V.subTree=S1(V),pe(ne,V.subTree,V,le,null)};Fe?ee.type.__asyncLoader().then(()=>!V.isUnmounted&&at()):at()}else{const at=V.subTree=S1(V);k(null,at,se,Ce,V,le,ke),ee.el=at.el}if(je&&qi(je,le),!Fe&&(W=ye&&ye.onVnodeMounted)){const at=ee;qi(()=>la(W,ct,at),le)}(ee.shapeFlag&256||ct&&sh(ct.vnode)&&ct.vnode.shapeFlag&256)&&V.a&&qi(V.a,le),V.isMounted=!0,ee=se=Ce=null}},He=V.effect=new aC(xe,()=>vC(Te),V.scope),Te=V.update=()=>He.run();Te.id=V.uid,Ju(V,!0),Te()},X=(V,ee,se)=>{ee.component=V;const Ce=V.vnode.props;V.vnode=ee,V.next=null,WU(V,ee.props,Ce,se),JU(V,ee.children,se),Bf(),lS(),Hf()},ie=(V,ee,se,Ce,le,ke,Pe,xe,He=!1)=>{const Te=V&&V.children,W=V?V.shapeFlag:0,ne=ee.children,{patchFlag:ye,shapeFlag:Be}=ee;if(ye>0){if(ye&128){ae(Te,ne,se,Ce,le,ke,Pe,xe,He);return}else if(ye&256){he(Te,ne,se,Ce,le,ke,Pe,xe,He);return}}Be&8?(W&16&&ve(Te,le,ke),ne!==Te&&g(se,ne)):W&16?Be&16?ae(Te,ne,se,Ce,le,ke,Pe,xe,He):ve(Te,le,ke,!0):(W&8&&g(se,""),Be&16&&B(ne,se,Ce,le,ke,Pe,xe,He))},he=(V,ee,se,Ce,le,ke,Pe,xe,He)=>{V=V||sf,ee=ee||sf;const Te=V.length,W=ee.length,ne=Math.min(Te,W);let ye;for(ye=0;yeW?ve(V,le,ke,!0,!1,ne):B(ee,se,Ce,le,ke,Pe,xe,He,ne)},ae=(V,ee,se,Ce,le,ke,Pe,xe,He)=>{let Te=0;const W=ee.length;let ne=V.length-1,ye=W-1;for(;Te<=ne&&Te<=ye;){const Be=V[Te],je=ee[Te]=He?ql(ee[Te]):ha(ee[Te]);if(sc(Be,je))k(Be,je,se,null,le,ke,Pe,xe,He);else break;Te++}for(;Te<=ne&&Te<=ye;){const Be=V[ne],je=ee[ye]=He?ql(ee[ye]):ha(ee[ye]);if(sc(Be,je))k(Be,je,se,null,le,ke,Pe,xe,He);else break;ne--,ye--}if(Te>ne){if(Te<=ye){const Be=ye+1,je=Beye)for(;Te<=ne;)Y(V[Te],le,ke,!0),Te++;else{const Be=Te,je=Te,ct=new Map;for(Te=je;Te<=ye;Te++){const yn=ee[Te]=He?ql(ee[Te]):ha(ee[Te]);yn.key!=null&&ct.set(yn.key,Te)}let Fe,at=0;const St=ye-je+1;let vn=!1,Cn=0;const Tn=new Array(St);for(Te=0;Te=St){Y(yn,le,ke,!0);continue}let nt;if(yn.key!=null)nt=ct.get(yn.key);else for(Fe=je;Fe<=ye;Fe++)if(Tn[Fe-je]===0&&sc(yn,ee[Fe])){nt=Fe;break}nt===void 0?Y(yn,le,ke,!0):(Tn[nt-je]=Te+1,nt>=Cn?Cn=nt:vn=!0,k(yn,ee[nt],se,null,le,ke,Pe,xe,He),at++)}const An=vn?QU(Tn):sf;for(Fe=An.length-1,Te=St-1;Te>=0;Te--){const yn=je+Te,nt=ee[yn],bt=yn+1{const{el:ke,type:Pe,transition:xe,children:He,shapeFlag:Te}=V;if(Te&6){de(V.component.subTree,ee,se,Ce);return}if(Te&128){V.suspense.move(ee,se,Ce);return}if(Te&64){Pe.move(V,ee,se,ce);return}if(Pe===ft){r(ke,ee,se);for(let ne=0;nexe.enter(ke),le);else{const{leave:ne,delayLeave:ye,afterLeave:Be}=xe,je=()=>r(ke,ee,se),ct=()=>{ne(ke,()=>{je(),Be&&Be()})};ye?ye(ke,je,ct):ct()}else r(ke,ee,se)},Y=(V,ee,se,Ce=!1,le=!1)=>{const{type:ke,props:Pe,ref:xe,children:He,dynamicChildren:Te,shapeFlag:W,patchFlag:ne,dirs:ye}=V;if(xe!=null&&CM(xe,null,se,V,!0),W&256){ee.ctx.deactivate(V);return}const Be=W&1&&ye,je=!sh(V);let ct;if(je&&(ct=Pe&&Pe.onVnodeBeforeUnmount)&&la(ct,ee,V),W&6)Re(V.component,se,Ce);else{if(W&128){V.suspense.unmount(se,Ce);return}Be&&Yu(V,null,ee,"beforeUnmount"),W&64?V.type.remove(V,ee,se,le,ce,Ce):Te&&(ke!==ft||ne>0&&ne&64)?ve(Te,ee,se,!1,!0):(ke===ft&&ne&384||!le&&W&16)&&ve(He,ee,se),Ce&&te(V)}(je&&(ct=Pe&&Pe.onVnodeUnmounted)||Be)&&qi(()=>{ct&&la(ct,ee,V),Be&&Yu(V,null,ee,"unmounted")},se)},te=V=>{const{type:ee,el:se,anchor:Ce,transition:le}=V;if(ee===ft){fe(se,Ce);return}if(ee===E1){O(V);return}const ke=()=>{o(se),le&&!le.persisted&&le.afterLeave&&le.afterLeave()};if(V.shapeFlag&1&&le&&!le.persisted){const{leave:Pe,delayLeave:xe}=le,He=()=>Pe(se,ke);xe?xe(V.el,ke,He):He()}else ke()},fe=(V,ee)=>{let se;for(;V!==ee;)se=_(V),o(V),V=se;o(ee)},Re=(V,ee,se)=>{const{bum:Ce,scope:le,update:ke,subTree:Pe,um:xe}=V;Ce&&nv(Ce),le.stop(),ke&&(ke.active=!1,Y(Pe,V,ee,se)),xe&&qi(xe,ee),qi(()=>{V.isUnmounted=!0},ee),ee&&ee.pendingBranch&&!ee.isUnmounted&&V.asyncDep&&!V.asyncResolved&&V.suspenseId===ee.pendingId&&(ee.deps--,ee.deps===0&&ee.resolve())},ve=(V,ee,se,Ce=!1,le=!1,ke=0)=>{for(let Pe=ke;PeV.shapeFlag&6?be(V.component.subTree):V.shapeFlag&128?V.suspense.next():_(V.anchor||V.el),ue=(V,ee,se)=>{V==null?ee._vnode&&Y(ee._vnode,null,null,!0):k(ee._vnode||null,V,ee,null,null,null,se),lS(),AL(),ee._vnode=V},ce={p:k,um:Y,m:de,r:te,mt:Z,mc:B,pc:ie,pbc:$,n:be,o:e};let Ee,pe;return t&&([Ee,pe]=t(ce)),{render:ue,hydrate:Ee,createApp:zU(ue,Ee)}}function Ju({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function TC(e,t,n=!1){const r=e.children,o=t.children;if(jt(r)&&jt(o))for(let i=0;i>1,e[n[u]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,s=n[i-1];i-- >0;)n[i]=s,s=t[s];return n}const e7=e=>e.__isTeleport,lh=e=>e&&(e.disabled||e.disabled===""),bS=e=>typeof SVGElement<"u"&&e instanceof SVGElement,TM=(e,t)=>{const n=e&&e.to;return $r(n)?t?t(n):null:n},t7={__isTeleport:!0,process(e,t,n,r,o,i,s,u,d,f){const{mc:g,pc:v,pbc:_,o:{insert:M,querySelector:I,createText:k,createComment:w}}=f,S=lh(t.props);let{shapeFlag:L,children:A,dynamicChildren:O}=t;if(e==null){const H=t.el=k(""),q=t.anchor=k("");M(H,n,r),M(q,n,r);const P=t.target=TM(t.props,I),B=t.targetAnchor=k("");P&&(M(B,P),s=s||bS(P));const j=($,R)=>{L&16&&g(A,$,R,o,i,s,u,d)};S?j(n,q):P&&j(P,B)}else{t.el=e.el;const H=t.anchor=e.anchor,q=t.target=e.target,P=t.targetAnchor=e.targetAnchor,B=lh(e.props),j=B?n:q,$=B?H:P;if(s=s||bS(q),O?(_(e.dynamicChildren,O,j,o,i,s,u),TC(e,t,!0)):d||v(e,t,j,$,o,i,s,u,!1),S)B||bm(t,n,H,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=t.target=TM(t.props,I);R&&bm(t,R,null,f,0)}else B&&bm(t,q,P,f,1)}XL(t)},remove(e,t,n,r,{um:o,o:{remove:i}},s){const{shapeFlag:u,children:d,anchor:f,targetAnchor:g,target:v,props:_}=e;if(v&&i(g),(s||!lh(_))&&(i(f),u&16))for(let M=0;M0?js||sf:null,r7(),zh>0&&js&&js.push(e),e}function oe(e,t,n,r,o,i){return ZL(G(e,t,n,r,o,i,!0))}function _t(e,t,n,r,o){return ZL(It(e,t,n,r,o,!0))}function jh(e){return e?e.__v_isVNode===!0:!1}function sc(e,t){return e.type===t.type&&e.key===t.key}const Fy="__vInternal",QL=({key:e})=>e??null,rv=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$r(e)||br(e)||gn(e)?{i:Zo,r:e,k:t,f:!!n}:e:null);function G(e,t=null,n=null,r=0,o=null,i=e===ft?0:1,s=!1,u=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&QL(t),ref:t&&rv(t),scopeId:Py,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Zo};return u?(SC(d,n),i&128&&e.normalize(d)):n&&(d.shapeFlag|=$r(n)?8:16),zh>0&&!s&&js&&(d.patchFlag>0||i&6)&&d.patchFlag!==32&&js.push(d),d}const It=o7;function o7(e,t=null,n=null,r=0,o=null,i=!1){if((!e||e===HL)&&(e=Ei),jh(e)){const u=Aa(e,t,!0);return n&&SC(u,n),zh>0&&!i&&js&&(u.shapeFlag&6?js[js.indexOf(e)]=u:js.push(u)),u.patchFlag|=-2,u}if(f7(e)&&(e=e.__vccOpts),t){t=Kl(t);let{class:u,style:d}=t;u&&!$r(u)&&(t.class=lt(u)),fr(d)&&(CL(d)&&!jt(d)&&(d=no({},d)),t.style=No(d))}const s=$r(e)?1:wU(e)?128:e7(e)?64:fr(e)?4:gn(e)?2:0;return G(e,t,n,r,o,s,i,!0)}function Kl(e){return e?CL(e)||Fy in e?no({},e):e:null}function Aa(e,t,n=!1){const{props:r,ref:o,patchFlag:i,children:s}=e,u=t?Lo(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&QL(u),ref:t&&t.ref?n&&o?jt(o)?o.concat(rv(t)):[o,rv(t)]:rv(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ft?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Aa(e.ssContent),ssFallback:e.ssFallback&&Aa(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function mr(e=" ",t=0){return It(Vf,null,e,t)}function Ie(e="",t=!1){return t?(J(),_t(Ei,null,e)):It(Ei,null,e)}function ha(e){return e==null||typeof e=="boolean"?It(Ei):jt(e)?It(ft,null,e.slice()):typeof e=="object"?ql(e):It(Vf,null,String(e))}function ql(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Aa(e)}function SC(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(jt(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),SC(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!(Fy in t)?t._ctx=Zo:o===3&&Zo&&(Zo.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else gn(t)?(t={default:t,_ctx:Zo},n=32):(t=String(t),r&64?(n=16,t=[mr(t)]):n=8);e.children=t,e.shapeFlag|=n}function Lo(...e){const t={};for(let n=0;nOo||Zo;let kC,xd,IS="__VUE_INSTANCE_SETTERS__";(xd=hM()[IS])||(xd=hM()[IS]=[]),xd.push(e=>Oo=e),kC=e=>{xd.length>1?xd.forEach(t=>t(e)):xd[0](e)};const Tf=e=>{kC(e),e.scope.on()},Uc=()=>{Oo&&Oo.scope.off(),kC(null)};function eO(e){return e.vnode.shapeFlag&4}let Wh=!1;function l7(e,t=!1){Wh=t;const{props:n,children:r}=e.vnode,o=eO(e);jU(e,n,o,t),YU(e,r);const i=o?u7(e,t):void 0;return Wh=!1,i}function u7(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=fC(new Proxy(e.ctx,UU));const{setup:r}=n;if(r){const o=e.setupContext=r.length>1?nO(e):null;Tf(e),Bf();const i=cu(r,e,0,[e.props,o]);if(Hf(),Uc(),aL(i)){if(i.then(Uc,Uc),t)return i.then(s=>{CS(e,s,t)}).catch(s=>{Ry(s,e,0)});e.asyncDep=i}else CS(e,i,t)}else tO(e,t)}function CS(e,t,n){gn(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:fr(t)&&(e.setupState=SL(t)),tO(e,n)}let TS;function tO(e,t,n){const r=e.type;if(!e.render){if(!t&&TS&&!r.render){const o=r.template||IC(e).template;if(o){const{isCustomElement:i,compilerOptions:s}=e.appContext.config,{delimiters:u,compilerOptions:d}=r,f=no(no({isCustomElement:i,delimiters:u},s),d);r.render=TS(o,f)}}e.render=r.render||Ws}Tf(e),Bf(),$U(e),Hf(),Uc()}function c7(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return Ji(e,"get","$attrs"),t[n]}}))}function nO(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return c7(e)},slots:e.slots,emit:e.emit,expose:t}}function $y(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(SL(fC(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ah)return ah[n](e)},has(t,n){return n in t||n in ah}}))}function d7(e,t=!0){return gn(e)?e.displayName||e.name:e.name||t&&e.__name}function f7(e){return gn(e)&&"__vccOpts"in e}const qe=(e,t)=>hU(e,t,Wh);function Se(e,t,n){const r=arguments.length;return r===2?fr(t)&&!jt(t)?jh(t)?It(e,null,[t]):It(e,t):It(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&jh(n)&&(n=[n]),It(e,t,n))}const p7=Symbol.for("v-scx"),h7=()=>en(p7),g7="3.3.4",m7="http://www.w3.org/2000/svg",ac=typeof document<"u"?document:null,wS=ac&&ac.createElement("template"),v7={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t?ac.createElementNS(m7,e):ac.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>ac.createTextNode(e),createComment:e=>ac.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ac.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const s=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{wS.innerHTML=r?`${e}`:e;const u=wS.content;if(r){const d=u.firstChild;for(;d.firstChild;)u.appendChild(d.firstChild);u.removeChild(d)}t.insertBefore(u,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function y7(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function _7(e,t,n){const r=e.style,o=$r(n);if(n&&!o){if(t&&!$r(t))for(const i in t)n[i]==null&&wM(r,i,"");for(const i in n)wM(r,i,n[i])}else{const i=r.display;o?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=i)}}const SS=/\s*!important$/;function wM(e,t,n){if(jt(n))n.forEach(r=>wM(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=b7(e,t);SS.test(n)?e.setProperty(ad(r),n.replace(SS,""),"important"):e[r]=n}}const kS=["Webkit","Moz","ms"],A1={};function b7(e,t){const n=A1[t];if(n)return n;let r=Ea(t);if(r!=="filter"&&r in e)return A1[t]=r;r=Ly(r);for(let o=0;oL1||(S7.then(()=>L1=0),L1=Date.now());function D7(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Es(E7(r,n.value),t,5,[r])};return n.value=e,n.attached=k7(),n}function E7(e,t){if(jt(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const AS=/^on[a-z]/,A7=(e,t,n,r,o=!1,i,s,u,d)=>{t==="class"?y7(e,r,o):t==="style"?_7(e,n,r):Ey(t)?tC(t)||T7(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):L7(e,t,r,o))?I7(e,t,r,i,s,u,d):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),M7(e,t,r,o))};function L7(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&AS.test(t)&&gn(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||AS.test(t)&&$r(n)?!1:t in e}const Ol="transition",Up="animation",Mo=(e,{slots:t})=>Se(EU,oO(e),t);Mo.displayName="Transition";const rO={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},O7=Mo.props=no({},PL,rO),Xu=(e,t=[])=>{jt(e)?e.forEach(n=>n(...t)):e&&e(...t)},LS=e=>e?jt(e)?e.some(t=>t.length>1):e.length>1:!1;function oO(e){const t={};for(const T in e)T in rO||(t[T]=e[T]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:u=`${n}-enter-to`,appearFromClass:d=i,appearActiveClass:f=s,appearToClass:g=u,leaveFromClass:v=`${n}-leave-from`,leaveActiveClass:_=`${n}-leave-active`,leaveToClass:M=`${n}-leave-to`}=e,I=R7(o),k=I&&I[0],w=I&&I[1],{onBeforeEnter:S,onEnter:L,onEnterCancelled:A,onLeave:O,onLeaveCancelled:H,onBeforeAppear:q=S,onAppear:P=L,onAppearCancelled:B=A}=t,j=(T,x,Z)=>{Ul(T,x?g:u),Ul(T,x?f:s),Z&&Z()},$=(T,x)=>{T._isLeaving=!1,Ul(T,v),Ul(T,M),Ul(T,_),x&&x()},R=T=>(x,Z)=>{const K=T?P:L,re=()=>j(x,T,Z);Xu(K,[x,re]),OS(()=>{Ul(x,T?d:i),Xa(x,T?g:u),LS(K)||RS(x,r,k,re)})};return no(t,{onBeforeEnter(T){Xu(S,[T]),Xa(T,i),Xa(T,s)},onBeforeAppear(T){Xu(q,[T]),Xa(T,d),Xa(T,f)},onEnter:R(!1),onAppear:R(!0),onLeave(T,x){T._isLeaving=!0;const Z=()=>$(T,x);Xa(T,v),sO(),Xa(T,_),OS(()=>{T._isLeaving&&(Ul(T,v),Xa(T,M),LS(O)||RS(T,r,w,Z))}),Xu(O,[T,Z])},onEnterCancelled(T){j(T,!1),Xu(A,[T])},onAppearCancelled(T){j(T,!0),Xu(B,[T])},onLeaveCancelled(T){$(T),Xu(H,[T])}})}function R7(e){if(e==null)return null;if(fr(e))return[O1(e.enter),O1(e.leave)];{const t=O1(e);return[t,t]}}function O1(e){return Ix(e)}function Xa(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function Ul(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function OS(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let N7=0;function RS(e,t,n,r){const o=e._endId=++N7,i=()=>{o===e._endId&&r()};if(n)return setTimeout(i,n);const{type:s,timeout:u,propCount:d}=iO(e,t);if(!s)return r();const f=s+"end";let g=0;const v=()=>{e.removeEventListener(f,_),i()},_=M=>{M.target===e&&++g>=d&&v()};setTimeout(()=>{g(n[I]||"").split(", "),o=r(`${Ol}Delay`),i=r(`${Ol}Duration`),s=NS(o,i),u=r(`${Up}Delay`),d=r(`${Up}Duration`),f=NS(u,d);let g=null,v=0,_=0;t===Ol?s>0&&(g=Ol,v=s,_=i.length):t===Up?f>0&&(g=Up,v=f,_=d.length):(v=Math.max(s,f),g=v>0?s>f?Ol:Up:null,_=g?g===Ol?i.length:d.length:0);const M=g===Ol&&/\b(transform|all)(,|$)/.test(r(`${Ol}Property`).toString());return{type:g,timeout:v,propCount:_,hasTransform:M}}function NS(e,t){for(;e.lengthPS(n)+PS(e[r])))}function PS(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function sO(){return document.body.offsetHeight}const aO=new WeakMap,lO=new WeakMap,uO={name:"TransitionGroup",props:no({},O7,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Xi(),r=NL();let o,i;return BL(()=>{if(!o.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!$7(o[0].el,n.vnode.el,s))return;o.forEach(x7),o.forEach(U7);const u=o.filter(F7);sO(),u.forEach(d=>{const f=d.el,g=f.style;Xa(f,s),g.transform=g.webkitTransform=g.transitionDuration="";const v=f._moveCb=_=>{_&&_.target!==f||(!_||/transform$/.test(_.propertyName))&&(f.removeEventListener("transitionend",v),f._moveCb=null,Ul(f,s))};f.addEventListener("transitionend",v)})}),()=>{const s=qn(e),u=oO(s);let d=s.tag||ft;o=i,i=t.default?_C(t.default()):[];for(let f=0;fdelete e.mode;uO.props;const cO=uO;function x7(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function U7(e){lO.set(e,e.el.getBoundingClientRect())}function F7(e){const t=aO.get(e),n=lO.get(e),r=t.left-n.left,o=t.top-n.top;if(r||o){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${r}px,${o}px)`,i.transitionDuration="0s",e}}function $7(e,t,n){const r=e.cloneNode();e._vtc&&e._vtc.forEach(s=>{s.split(/\s+/).forEach(u=>u&&r.classList.remove(u))}),n.split(/\s+/).forEach(s=>s&&r.classList.add(s)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:i}=iO(r);return o.removeChild(r),i}const Mu=e=>{const t=e.props["onUpdate:modelValue"]||!1;return jt(t)?n=>nv(t,n):t};function G7(e){e.target.composing=!0}function xS(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const pl={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e._assign=Mu(o);const i=r||o.props&&o.props.type==="number";sl(e,t?"change":"input",s=>{if(s.target.composing)return;let u=e.value;n&&(u=u.trim()),i&&(u=Sv(u)),e._assign(u)}),n&&sl(e,"change",()=>{e.value=e.value.trim()}),t||(sl(e,"compositionstart",G7),sl(e,"compositionend",xS),sl(e,"change",xS))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:o}},i){if(e._assign=Mu(i),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(o||e.type==="number")&&Sv(e.value)===t))return;const s=t??"";e.value!==s&&(e.value=s)}},B7={deep:!0,created(e,t,n){e._assign=Mu(n),sl(e,"change",()=>{const r=e._modelValue,o=wf(e),i=e.checked,s=e._assign;if(jt(r)){const u=oC(r,o),d=u!==-1;if(i&&!d)s(r.concat(o));else if(!i&&d){const f=[...r];f.splice(u,1),s(f)}}else if(Gf(r)){const u=new Set(r);i?u.add(o):u.delete(o),s(u)}else s(dO(e,i))})},mounted:US,beforeUpdate(e,t,n){e._assign=Mu(n),US(e,t,n)}};function US(e,{value:t,oldValue:n},r){e._modelValue=t,jt(t)?e.checked=oC(t,r.props.value)>-1:Gf(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=Qc(t,dO(e,!0)))}const H7={created(e,{value:t},n){e.checked=Qc(t,n.props.value),e._assign=Mu(n),sl(e,"change",()=>{e._assign(wf(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=Mu(r),t!==n&&(e.checked=Qc(t,r.props.value))}},q7={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const o=Gf(t);sl(e,"change",()=>{const i=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?Sv(wf(s)):wf(s));e._assign(e.multiple?o?new Set(i):i:i[0])}),e._assign=Mu(r)},mounted(e,{value:t}){FS(e,t)},beforeUpdate(e,t,n){e._assign=Mu(n)},updated(e,{value:t}){FS(e,t)}};function FS(e,t){const n=e.multiple;if(!(n&&!jt(t)&&!Gf(t))){for(let r=0,o=e.options.length;r-1:i.selected=t.has(s);else if(Qc(wf(i),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function wf(e){return"_value"in e?e._value:e.value}function dO(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const V7={created(e,t,n){Mm(e,t,n,null,"created")},mounted(e,t,n){Mm(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Mm(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Mm(e,t,n,r,"updated")}};function z7(e,t){switch(e){case"SELECT":return q7;case"TEXTAREA":return pl;default:switch(t){case"checkbox":return B7;case"radio":return H7;default:return pl}}}function Mm(e,t,n,r,o){const s=z7(e.tagName,n.props&&n.props.type)[o];s&&s(e,t,n,r)}const j7=["ctrl","shift","alt","meta"],W7={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>j7.some(n=>e[`${n}Key`]&&!t.includes(n))},Mn=(e,t)=>(n,...r)=>{for(let o=0;on=>{if(!("key"in n))return;const r=ad(n.key);if(t.some(o=>o===r||K7[o]===r))return e(n)},to={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Fp(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Fp(e,!0),r.enter(e)):r.leave(e,()=>{Fp(e,!1)}):Fp(e,t))},beforeUnmount(e,{value:t}){Fp(e,t)}};function Fp(e,t){e.style.display=t?e._vod:"none"}const Y7=no({patchProp:A7},v7);let $S;function fO(){return $S||($S=XU(Y7))}const GS=(...e)=>{fO().render(...e)},J7=(...e)=>{const t=fO().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=X7(r);if(!o)return;const i=t._component;!gn(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t};function X7(e){return $r(e)?document.querySelector(e):e}const Z7={theme:"dark"};function Q7(e){e.setCommonStore(Z7)}function eF(e){console.log("app",e)}const tF={name:"TUITheme",plugin:Q7,install:eF};/*! * shared v9.2.0-beta.32 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */const nF=typeof window<"u",rF=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",ku=e=>rF?Symbol(e):e,oF=(e,t,n)=>iF({l:e,k:t,s:n}),iF=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ro=e=>typeof e=="number"&&isFinite(e),sF=e=>EC(e)==="[object Date]",Iu=e=>EC(e)==="[object RegExp]",Gy=e=>fn(e)&&Object.keys(e).length===0;function aF(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const xo=Object.assign;let BS;const ch=()=>BS||(BS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function HS(e){return e.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const lF=Object.prototype.hasOwnProperty;function DC(e,t){return lF.call(e,t)}const Or=Array.isArray,Xr=e=>typeof e=="function",Dt=e=>typeof e=="string",Yn=e=>typeof e=="boolean",jr=e=>e!==null&&typeof e=="object",pO=Object.prototype.toString,EC=e=>pO.call(e),fn=e=>EC(e)==="[object Object]",uF=e=>e==null?"":Or(e)||fn(e)&&e.toString===pO?JSON.stringify(e,null,2):String(e);/*! * message-compiler v9.2.0-beta.32 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */const tr={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15};function By(e,t,n={}){const{domain:r,messages:o,args:i}=n,s=e,u=new SyntaxError(String(s));return u.code=e,t&&(u.location=t),u.domain=r,u}function cF(e){throw e}function dF(e,t,n){return{line:e,column:t,offset:n}}function SM(e,t,n){const r={start:e,end:t};return n!=null&&(r.source=n),r}const ja=" ",fF="\r",wi=` `,pF=String.fromCharCode(8232),hF=String.fromCharCode(8233);function gF(e){const t=e;let n=0,r=1,o=1,i=0;const s=P=>t[P]===fF&&t[P+1]===wi,u=P=>t[P]===wi,d=P=>t[P]===hF,f=P=>t[P]===pF,g=P=>s(P)||u(P)||d(P)||f(P),v=()=>n,_=()=>r,M=()=>o,I=()=>i,k=P=>s(P)||d(P)||f(P)?wi:t[P],w=()=>k(n),S=()=>k(n+i);function L(){return i=0,g(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}function A(){return s(n+i)&&i++,i++,t[n+i]}function O(){n=0,r=1,o=1,i=0}function H(P=0){i=P}function q(){const P=n+i;for(;P!==n;)L();i=0}return{index:v,line:_,column:M,peekOffset:I,charAt:k,currentChar:w,currentPeek:S,next:L,peek:A,reset:O,resetPeek:H,skipToPeek:q}}const Rl=void 0,qS="'",mF="tokenizer";function vF(e,t={}){const n=t.location!==!1,r=gF(e),o=()=>r.index(),i=()=>dF(r.line(),r.column(),r.index()),s=i(),u=o(),d={currentType:14,offset:u,startLoc:s,endLoc:s,lastType:14,lastOffset:u,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},f=()=>d,{onError:g}=t;function v(pe,V,ee,...se){const Ce=f();if(V.column+=ee,V.offset+=ee,g){const le=SM(Ce.startLoc,V),ke=By(pe,le,{domain:mF,args:se});g(ke)}}function _(pe,V,ee){pe.endLoc=i(),pe.currentType=V;const se={type:V};return n&&(se.loc=SM(pe.startLoc,pe.endLoc)),ee!=null&&(se.value=ee),se}const M=pe=>_(pe,14);function I(pe,V){return pe.currentChar()===V?(pe.next(),V):(v(tr.EXPECTED_TOKEN,i(),0,V),"")}function k(pe){let V="";for(;pe.currentPeek()===ja||pe.currentPeek()===wi;)V+=pe.currentPeek(),pe.peek();return V}function w(pe){const V=k(pe);return pe.skipToPeek(),V}function S(pe){if(pe===Rl)return!1;const V=pe.charCodeAt(0);return V>=97&&V<=122||V>=65&&V<=90||V===95}function L(pe){if(pe===Rl)return!1;const V=pe.charCodeAt(0);return V>=48&&V<=57}function A(pe,V){const{currentType:ee}=V;if(ee!==2)return!1;k(pe);const se=S(pe.currentPeek());return pe.resetPeek(),se}function O(pe,V){const{currentType:ee}=V;if(ee!==2)return!1;k(pe);const se=pe.currentPeek()==="-"?pe.peek():pe.currentPeek(),Ce=L(se);return pe.resetPeek(),Ce}function H(pe,V){const{currentType:ee}=V;if(ee!==2)return!1;k(pe);const se=pe.currentPeek()===qS;return pe.resetPeek(),se}function q(pe,V){const{currentType:ee}=V;if(ee!==8)return!1;k(pe);const se=pe.currentPeek()===".";return pe.resetPeek(),se}function P(pe,V){const{currentType:ee}=V;if(ee!==9)return!1;k(pe);const se=S(pe.currentPeek());return pe.resetPeek(),se}function B(pe,V){const{currentType:ee}=V;if(!(ee===8||ee===12))return!1;k(pe);const se=pe.currentPeek()===":";return pe.resetPeek(),se}function j(pe,V){const{currentType:ee}=V;if(ee!==10)return!1;const se=()=>{const le=pe.currentPeek();return le==="{"?S(pe.peek()):le==="@"||le==="%"||le==="|"||le===":"||le==="."||le===ja||!le?!1:le===wi?(pe.peek(),se()):S(le)},Ce=se();return pe.resetPeek(),Ce}function $(pe){k(pe);const V=pe.currentPeek()==="|";return pe.resetPeek(),V}function R(pe,V=!0){const ee=(Ce=!1,le="",ke=!1)=>{const Pe=pe.currentPeek();return Pe==="{"?le==="%"?!1:Ce:Pe==="@"||!Pe?le==="%"?!0:Ce:Pe==="%"?(pe.peek(),ee(Ce,"%",!0)):Pe==="|"?le==="%"||ke?!0:!(le===ja||le===wi):Pe===ja?(pe.peek(),ee(!0,ja,ke)):Pe===wi?(pe.peek(),ee(!0,wi,ke)):!0},se=ee();return V&&pe.resetPeek(),se}function T(pe,V){const ee=pe.currentChar();return ee===Rl?Rl:V(ee)?(pe.next(),ee):null}function x(pe){return T(pe,ee=>{const se=ee.charCodeAt(0);return se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===95||se===36})}function Z(pe){return T(pe,ee=>{const se=ee.charCodeAt(0);return se>=48&&se<=57})}function K(pe){return T(pe,ee=>{const se=ee.charCodeAt(0);return se>=48&&se<=57||se>=65&&se<=70||se>=97&&se<=102})}function re(pe){let V="",ee="";for(;V=Z(pe);)ee+=V;return ee}function X(pe){let V="";for(;;){const ee=pe.currentChar();if(ee==="{"||ee==="}"||ee==="@"||ee==="|"||!ee)break;if(ee==="%")if(R(pe))V+=ee,pe.next();else break;else if(ee===ja||ee===wi)if(R(pe))V+=ee,pe.next();else{if($(pe))break;V+=ee,pe.next()}else V+=ee,pe.next()}return V}function ie(pe){w(pe);let V="",ee="";for(;V=x(pe);)ee+=V;return pe.currentChar()===Rl&&v(tr.UNTERMINATED_CLOSING_BRACE,i(),0),ee}function he(pe){w(pe);let V="";return pe.currentChar()==="-"?(pe.next(),V+=`-${re(pe)}`):V+=re(pe),pe.currentChar()===Rl&&v(tr.UNTERMINATED_CLOSING_BRACE,i(),0),V}function ae(pe){w(pe),I(pe,"'");let V="",ee="";const se=le=>le!==qS&&le!==wi;for(;V=T(pe,se);)V==="\\"?ee+=de(pe):ee+=V;const Ce=pe.currentChar();return Ce===wi||Ce===Rl?(v(tr.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),Ce===wi&&(pe.next(),I(pe,"'")),ee):(I(pe,"'"),ee)}function de(pe){const V=pe.currentChar();switch(V){case"\\":case"'":return pe.next(),`\\${V}`;case"u":return Y(pe,V,4);case"U":return Y(pe,V,6);default:return v(tr.UNKNOWN_ESCAPE_SEQUENCE,i(),0,V),""}}function Y(pe,V,ee){I(pe,V);let se="";for(let Ce=0;CeCe!=="{"&&Ce!=="}"&&Ce!==ja&&Ce!==wi;for(;V=T(pe,se);)ee+=V;return ee}function fe(pe){let V="",ee="";for(;V=x(pe);)ee+=V;return ee}function Re(pe){const V=(ee=!1,se)=>{const Ce=pe.currentChar();return Ce==="{"||Ce==="%"||Ce==="@"||Ce==="|"||!Ce||Ce===ja?se:Ce===wi?(se+=Ce,pe.next(),V(ee,se)):(se+=Ce,pe.next(),V(!0,se))};return V(!1,"")}function ve(pe){w(pe);const V=I(pe,"|");return w(pe),V}function be(pe,V){let ee=null;switch(pe.currentChar()){case"{":return V.braceNest>=1&&v(tr.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),pe.next(),ee=_(V,2,"{"),w(pe),V.braceNest++,ee;case"}":return V.braceNest>0&&V.currentType===2&&v(tr.EMPTY_PLACEHOLDER,i(),0),pe.next(),ee=_(V,3,"}"),V.braceNest--,V.braceNest>0&&w(pe),V.inLinked&&V.braceNest===0&&(V.inLinked=!1),ee;case"@":return V.braceNest>0&&v(tr.UNTERMINATED_CLOSING_BRACE,i(),0),ee=ue(pe,V)||M(V),V.braceNest=0,ee;default:let Ce=!0,le=!0,ke=!0;if($(pe))return V.braceNest>0&&v(tr.UNTERMINATED_CLOSING_BRACE,i(),0),ee=_(V,1,ve(pe)),V.braceNest=0,V.inLinked=!1,ee;if(V.braceNest>0&&(V.currentType===5||V.currentType===6||V.currentType===7))return v(tr.UNTERMINATED_CLOSING_BRACE,i(),0),V.braceNest=0,ce(pe,V);if(Ce=A(pe,V))return ee=_(V,5,ie(pe)),w(pe),ee;if(le=O(pe,V))return ee=_(V,6,he(pe)),w(pe),ee;if(ke=H(pe,V))return ee=_(V,7,ae(pe)),w(pe),ee;if(!Ce&&!le&&!ke)return ee=_(V,13,te(pe)),v(tr.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,ee.value),w(pe),ee;break}return ee}function ue(pe,V){const{currentType:ee}=V;let se=null;const Ce=pe.currentChar();switch((ee===8||ee===9||ee===12||ee===10)&&(Ce===wi||Ce===ja)&&v(tr.INVALID_LINKED_FORMAT,i(),0),Ce){case"@":return pe.next(),se=_(V,8,"@"),V.inLinked=!0,se;case".":return w(pe),pe.next(),_(V,9,".");case":":return w(pe),pe.next(),_(V,10,":");default:return $(pe)?(se=_(V,1,ve(pe)),V.braceNest=0,V.inLinked=!1,se):q(pe,V)||B(pe,V)?(w(pe),ue(pe,V)):P(pe,V)?(w(pe),_(V,12,fe(pe))):j(pe,V)?(w(pe),Ce==="{"?be(pe,V)||se:_(V,11,Re(pe))):(ee===8&&v(tr.INVALID_LINKED_FORMAT,i(),0),V.braceNest=0,V.inLinked=!1,ce(pe,V))}}function ce(pe,V){let ee={type:14};if(V.braceNest>0)return be(pe,V)||M(V);if(V.inLinked)return ue(pe,V)||M(V);const se=pe.currentChar();switch(se){case"{":return be(pe,V)||M(V);case"}":return v(tr.UNBALANCED_CLOSING_BRACE,i(),0),pe.next(),_(V,3,"}");case"@":return ue(pe,V)||M(V);default:if($(pe))return ee=_(V,1,ve(pe)),V.braceNest=0,V.inLinked=!1,ee;if(R(pe))return _(V,0,X(pe));if(se==="%")return pe.next(),_(V,4,"%");break}return ee}function Ee(){const{currentType:pe,offset:V,startLoc:ee,endLoc:se}=d;return d.lastType=pe,d.lastOffset=V,d.lastStartLoc=ee,d.lastEndLoc=se,d.offset=o(),d.startLoc=i(),r.currentChar()===Rl?_(d,14):ce(r,d)}return{nextToken:Ee,currentOffset:o,currentPosition:i,context:f}}const yF="parser",_F=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function bF(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(t||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function MF(e={}){const t=e.location!==!1,{onError:n}=e;function r(S,L,A,O,...H){const q=S.currentPosition();if(q.offset+=O,q.column+=O,n){const P=SM(A,q),B=By(L,P,{domain:yF,args:H});n(B)}}function o(S,L,A){const O={type:S,start:L,end:L};return t&&(O.loc={start:A,end:A}),O}function i(S,L,A,O){S.end=L,O&&(S.type=O),t&&S.loc&&(S.loc.end=A)}function s(S,L){const A=S.context(),O=o(3,A.offset,A.startLoc);return O.value=L,i(O,S.currentOffset(),S.currentPosition()),O}function u(S,L){const A=S.context(),{lastOffset:O,lastStartLoc:H}=A,q=o(5,O,H);return q.index=parseInt(L,10),S.nextToken(),i(q,S.currentOffset(),S.currentPosition()),q}function d(S,L){const A=S.context(),{lastOffset:O,lastStartLoc:H}=A,q=o(4,O,H);return q.key=L,S.nextToken(),i(q,S.currentOffset(),S.currentPosition()),q}function f(S,L){const A=S.context(),{lastOffset:O,lastStartLoc:H}=A,q=o(9,O,H);return q.value=L.replace(_F,bF),S.nextToken(),i(q,S.currentOffset(),S.currentPosition()),q}function g(S){const L=S.nextToken(),A=S.context(),{lastOffset:O,lastStartLoc:H}=A,q=o(8,O,H);return L.type!==12?(r(S,tr.UNEXPECTED_EMPTY_LINKED_MODIFIER,A.lastStartLoc,0),q.value="",i(q,O,H),{nextConsumeToken:L,node:q}):(L.value==null&&r(S,tr.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,ua(L)),q.value=L.value||"",i(q,S.currentOffset(),S.currentPosition()),{node:q})}function v(S,L){const A=S.context(),O=o(7,A.offset,A.startLoc);return O.value=L,i(O,S.currentOffset(),S.currentPosition()),O}function _(S){const L=S.context(),A=o(6,L.offset,L.startLoc);let O=S.nextToken();if(O.type===9){const H=g(S);A.modifier=H.node,O=H.nextConsumeToken||S.nextToken()}switch(O.type!==10&&r(S,tr.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,ua(O)),O=S.nextToken(),O.type===2&&(O=S.nextToken()),O.type){case 11:O.value==null&&r(S,tr.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,ua(O)),A.key=v(S,O.value||"");break;case 5:O.value==null&&r(S,tr.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,ua(O)),A.key=d(S,O.value||"");break;case 6:O.value==null&&r(S,tr.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,ua(O)),A.key=u(S,O.value||"");break;case 7:O.value==null&&r(S,tr.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,ua(O)),A.key=f(S,O.value||"");break;default:r(S,tr.UNEXPECTED_EMPTY_LINKED_KEY,L.lastStartLoc,0);const H=S.context(),q=o(7,H.offset,H.startLoc);return q.value="",i(q,H.offset,H.startLoc),A.key=q,i(A,H.offset,H.startLoc),{nextConsumeToken:O,node:A}}return i(A,S.currentOffset(),S.currentPosition()),{node:A}}function M(S){const L=S.context(),A=L.currentType===1?S.currentOffset():L.offset,O=L.currentType===1?L.endLoc:L.startLoc,H=o(2,A,O);H.items=[];let q=null;do{const j=q||S.nextToken();switch(q=null,j.type){case 0:j.value==null&&r(S,tr.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,ua(j)),H.items.push(s(S,j.value||""));break;case 6:j.value==null&&r(S,tr.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,ua(j)),H.items.push(u(S,j.value||""));break;case 5:j.value==null&&r(S,tr.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,ua(j)),H.items.push(d(S,j.value||""));break;case 7:j.value==null&&r(S,tr.UNEXPECTED_LEXICAL_ANALYSIS,L.lastStartLoc,0,ua(j)),H.items.push(f(S,j.value||""));break;case 8:const $=_(S);H.items.push($.node),q=$.nextConsumeToken||null;break}}while(L.currentType!==14&&L.currentType!==1);const P=L.currentType===1?L.lastOffset:S.currentOffset(),B=L.currentType===1?L.lastEndLoc:S.currentPosition();return i(H,P,B),H}function I(S,L,A,O){const H=S.context();let q=O.items.length===0;const P=o(1,L,A);P.cases=[],P.cases.push(O);do{const B=M(S);q||(q=B.items.length===0),P.cases.push(B)}while(H.currentType!==14);return q&&r(S,tr.MUST_HAVE_MESSAGES_IN_PLURAL,A,0),i(P,S.currentOffset(),S.currentPosition()),P}function k(S){const L=S.context(),{offset:A,startLoc:O}=L,H=M(S);return L.currentType===14?H:I(S,A,O,H)}function w(S){const L=vF(S,xo({},e)),A=L.context(),O=o(0,A.offset,A.startLoc);return t&&O.loc&&(O.loc.source=S),O.body=k(L),A.currentType!==14&&r(L,tr.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,S[A.offset]||""),i(O,L.currentOffset(),L.currentPosition()),O}return{parse:w}}function ua(e){if(e.type===14)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function IF(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function VS(e,t){for(let n=0;ns;function d(k,w){s.code+=k}function f(k,w=!0){const S=w?o:"";d(i?S+" ".repeat(k):S)}function g(k=!0){const w=++s.indentLevel;k&&f(w)}function v(k=!0){const w=--s.indentLevel;k&&f(w)}function _(){f(s.indentLevel)}return{context:u,push:d,indent:g,deindent:v,newline:_,helper:k=>`_${k}`,needIndent:()=>s.needIndent}}function wF(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Sf(e,t.key),t.modifier&&(e.push(", "),Sf(e,t.modifier)),e.push(")")}function SF(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const o=t.items.length;for(let i=0;i1){e.push(`${n("plural")}([`),e.indent(r());const o=t.cases.length;for(let i=0;i{const n=Dt(t.mode)?t.mode:"normal",r=Dt(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,i=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` `,s=t.needIndent?t.needIndent:n!=="arrow",u=e.helpers||[],d=TF(e,{mode:n,filename:r,sourceMap:o,breakLineCode:i,needIndent:s});d.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),d.indent(s),u.length>0&&(d.push(`const { ${u.map(v=>`${v}: _${v}`).join(", ")} } = ctx`),d.newline()),d.push("return "),Sf(d,e),d.deindent(s),d.push("}");const{code:f,map:g}=d.context();return{ast:e,code:f,map:g?g.toJSON():void 0}};function AF(e,t={}){const n=xo({},t),o=MF(n).parse(e);return CF(o,n),EF(o,n)}/*! * devtools-if v9.2.0-beta.32 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */const hO={I18nInit:"i18n:init",FunctionTranslate:"function:translate"};/*! * core-base v9.2.0-beta.32 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */const Du=[];Du[0]={w:[0],i:[3,0],"[":[4],o:[7]};Du[1]={w:[1],".":[2],"[":[4],o:[7]};Du[2]={w:[2],i:[3,0],0:[3,0]};Du[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};Du[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};Du[5]={"'":[4,0],o:8,l:[5,0]};Du[6]={'"':[4,0],o:8,l:[6,0]};const LF=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function OF(e){return LF.test(e)}function RF(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function NF(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function PF(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:OF(t)?RF(t):"*"+t}function xF(e){const t=[];let n=-1,r=0,o=0,i,s,u,d,f,g,v;const _=[];_[0]=()=>{s===void 0?s=u:s+=u},_[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},_[2]=()=>{_[0](),o++},_[3]=()=>{if(o>0)o--,r=4,_[0]();else{if(o=0,s===void 0||(s=PF(s),s===!1))return!1;_[1]()}};function M(){const I=e[n+1];if(r===5&&I==="'"||r===6&&I==='"')return n++,u="\\"+I,_[0](),!0}for(;r!==null;)if(n++,i=e[n],!(i==="\\"&&M())){if(d=NF(i),v=Du[r],f=v[d]||v.l||8,f===8||(r=f[0],f[1]!==void 0&&(g=_[f[1]],g&&(u=i,g()===!1))))return;if(r===7)return t}}const zS=new Map;function UF(e,t){return jr(e)?e[t]:null}function FF(e,t){if(!jr(e))return null;let n=zS.get(t);if(n||(n=xF(t),n&&zS.set(t,n)),!n)return null;const r=n.length;let o=e,i=0;for(;ie,GF=e=>"",BF="text",HF=e=>e.length===0?"":e.join(""),qF=uF;function jS(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function VF(e){const t=Ro(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(Ro(e.named.count)||Ro(e.named.n))?Ro(e.named.count)?e.named.count:Ro(e.named.n)?e.named.n:t:t}function zF(e,t){t.count||(t.count=e),t.n||(t.n=e)}function jF(e={}){const t=e.locale,n=VF(e),r=jr(e.pluralRules)&&Dt(t)&&Xr(e.pluralRules[t])?e.pluralRules[t]:jS,o=jr(e.pluralRules)&&Dt(t)&&Xr(e.pluralRules[t])?jS:void 0,i=S=>S[r(n,S.length,o)],s=e.list||[],u=S=>s[S],d=e.named||{};Ro(e.pluralIndex)&&zF(n,d);const f=S=>d[S];function g(S){const L=Xr(e.messages)?e.messages(S):jr(e.messages)?e.messages[S]:!1;return L||(e.parent?e.parent.message(S):GF)}const v=S=>e.modifiers?e.modifiers[S]:$F,_=fn(e.processor)&&Xr(e.processor.normalize)?e.processor.normalize:HF,M=fn(e.processor)&&Xr(e.processor.interpolate)?e.processor.interpolate:qF,I=(S,L)=>{const A=g(S)(w);return Dt(L)?v(L)(A):A},k=fn(e.processor)&&Dt(e.processor.type)?e.processor.type:BF,w={list:u,named:f,plural:i,linked:I,message:g,type:k,interpolate:M,normalize:_};return w}let Kh=null;function WF(e){Kh=e}function KF(e,t,n){Kh&&Kh.emit(hO.I18nInit,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const YF=JF(hO.FunctionTranslate);function JF(e){return t=>Kh&&Kh.emit(e,t)}function XF(e,t,n){return[...new Set([n,...Or(t)?t:jr(t)?Object.keys(t):Dt(t)?[t]:[n]])]}function gO(e,t,n){const r=Dt(n)?n:yg,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let i=o.__localeChainCache.get(r);if(!i){i=[];let s=[n];for(;Or(s);)s=WS(i,s,t);const u=Or(t)||!fn(t)?t:t.default?t.default:null;s=Dt(u)?[u]:u,Or(s)&&WS(i,s,!1),o.__localeChainCache.set(r,i)}return i}function WS(e,t,n){let r=!0;for(let o=0;oDt(e)?e.toUpperCase():e,lower:e=>Dt(e)?e.toLowerCase():e,capitalize:e=>Dt(e)?`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`:e}}let mO;function n$(e){mO=e}let vO;function r$(e){vO=e}let yO;function o$(e){yO=e}let _O=null;const YS=e=>{_O=e},i$=()=>_O;let bO=null;const JS=e=>{bO=e},s$=()=>bO;let XS=0;function a$(e={}){const t=Dt(e.version)?e.version:e$,n=Dt(e.locale)?e.locale:yg,r=Or(e.fallbackLocale)||fn(e.fallbackLocale)||Dt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:n,o=fn(e.messages)?e.messages:{[n]:{}},i=fn(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=fn(e.numberFormats)?e.numberFormats:{[n]:{}},u=xo({},e.modifiers||{},t$()),d=e.pluralRules||{},f=Xr(e.missing)?e.missing:null,g=Yn(e.missingWarn)||Iu(e.missingWarn)?e.missingWarn:!0,v=Yn(e.fallbackWarn)||Iu(e.fallbackWarn)?e.fallbackWarn:!0,_=!!e.fallbackFormat,M=!!e.unresolving,I=Xr(e.postTranslation)?e.postTranslation:null,k=fn(e.processor)?e.processor:null,w=Yn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter,L=Xr(e.messageCompiler)?e.messageCompiler:mO,A=Xr(e.messageResolver)?e.messageResolver:vO||UF,O=Xr(e.localeFallbacker)?e.localeFallbacker:yO||XF,H=jr(e.fallbackContext)?e.fallbackContext:void 0,q=Xr(e.onWarn)?e.onWarn:aF,P=e,B=jr(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,j=jr(P.__numberFormatters)?P.__numberFormatters:new Map,$=jr(P.__meta)?P.__meta:{};XS++;const R={version:t,cid:XS,locale:n,fallbackLocale:r,messages:o,modifiers:u,pluralRules:d,missing:f,missingWarn:g,fallbackWarn:v,fallbackFormat:_,unresolving:M,postTranslation:I,processor:k,warnHtmlMessage:w,escapeParameter:S,messageCompiler:L,messageResolver:A,localeFallbacker:O,fallbackContext:H,onWarn:q,__meta:$};return R.datetimeFormats=i,R.numberFormats=s,R.__datetimeFormatters=B,R.__numberFormatters=j,__INTLIFY_PROD_DEVTOOLS__&&KF(R,t,$),R}function LC(e,t,n,r,o){const{missing:i,onWarn:s}=e;if(i!==null){const u=i(e,n,t,o);return Dt(u)?u:t}else return t}function $p(e,t,n){const r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}const l$=e=>e;let ZS=Object.create(null);function u$(e,t={}){{const r=(t.onCacheKey||l$)(e),o=ZS[r];if(o)return o;let i=!1;const s=t.onError||cF;t.onError=f=>{i=!0,s(f)};const{code:u}=AF(e,t),d=new Function(`return ${u}`)();return i?d:ZS[r]=d}}let MO=tr.__EXTEND_POINT__;const R1=()=>++MO,Zd={INVALID_ARGUMENT:MO,INVALID_DATE_ARGUMENT:R1(),INVALID_ISO_DATE_ARGUMENT:R1(),__EXTEND_POINT__:R1()};function Qd(e){return By(e,null,void 0)}const QS=()=>"",ga=e=>Xr(e);function ek(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:o,messageCompiler:i,fallbackLocale:s,messages:u}=e,[d,f]=kM(...t),g=Yn(f.missingWarn)?f.missingWarn:e.missingWarn,v=Yn(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,_=Yn(f.escapeParameter)?f.escapeParameter:e.escapeParameter,M=!!f.resolvedMessage,I=Dt(f.default)||Yn(f.default)?Yn(f.default)?d:f.default:n?i?d:()=>d:"",k=n||I!=="",w=Dt(f.locale)?f.locale:e.locale;_&&c$(f);let[S,L,A]=M?[d,w,u[w]||{}]:IO(e,d,w,s,v,g),O=S,H=d;if(!M&&!(Dt(O)||ga(O))&&k&&(O=I,H=O),!M&&(!(Dt(O)||ga(O))||!Dt(L)))return o?Hy:d;let q=!1;const P=()=>{q=!0},B=ga(O)?O:CO(e,d,L,O,H,P);if(q)return O;const j=p$(e,L,A,f),$=jF(j),R=d$(e,B,$),T=r?r(R):R;if(__INTLIFY_PROD_DEVTOOLS__){const x={timestamp:Date.now(),key:Dt(d)?d:ga(O)?O.key:"",locale:L||(ga(O)?O.locale:""),format:Dt(O)?O:ga(O)?O.source:"",message:T};x.meta=xo({},e.__meta,i$()||{}),YF(x)}return T}function c$(e){Or(e.list)?e.list=e.list.map(t=>Dt(t)?HS(t):t):jr(e.named)&&Object.keys(e.named).forEach(t=>{Dt(e.named[t])&&(e.named[t]=HS(e.named[t]))})}function IO(e,t,n,r,o,i){const{messages:s,onWarn:u,messageResolver:d,localeFallbacker:f}=e,g=f(e,r,n);let v={},_,M=null;const I="translate";for(let k=0;k{throw i&&i(s),s},onCacheKey:s=>oF(t,n,s)}}function p$(e,t,n,r){const{modifiers:o,pluralRules:i,messageResolver:s,fallbackLocale:u,fallbackWarn:d,missingWarn:f,fallbackContext:g}=e,_={locale:t,modifiers:o,pluralRules:i,messages:M=>{let I=s(n,M);if(I==null&&g){const[,,k]=IO(g,M,t,u,d,f);I=s(k,M)}if(Dt(I)){let k=!1;const S=CO(e,M,t,I,M,()=>{k=!0});return k?QS:S}else return ga(I)?I:QS}};return e.processor&&(_.processor=e.processor),r.list&&(_.list=r.list),r.named&&(_.named=r.named),Ro(r.plural)&&(_.pluralIndex=r.plural),_}function tk(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,onWarn:i,localeFallbacker:s}=e,{__datetimeFormatters:u}=e,[d,f,g,v]=DM(...t),_=Yn(g.missingWarn)?g.missingWarn:e.missingWarn;Yn(g.fallbackWarn)?g.fallbackWarn:e.fallbackWarn;const M=!!g.part,I=Dt(g.locale)?g.locale:e.locale,k=s(e,o,I);if(!Dt(d)||d==="")return new Intl.DateTimeFormat(I).format(f);let w={},S,L=null;const A="datetime format";for(let q=0;q{s===this.plugin.id&&this.fallbacks.setSettings(u)}),this.proxiedOn=new Proxy({},{get:(s,u)=>this.target?this.target.on[u]:(...d)=>{this.onQueue.push({method:u,args:d})}}),this.proxiedTarget=new Proxy({},{get:(s,u)=>this.target?this.target[u]:u==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(u)?(...d)=>(this.targetQueue.push({method:u,args:d,resolve:()=>{}}),this.fallbacks[u](...d)):(...d)=>new Promise(f=>{this.targetQueue.push({method:u,args:d,resolve:f})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function M$(e,t){const n=e,r=TO(),o=h$(),i=g$&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!i))o.emit(m$,e,t);else{const s=i?new b$(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:s}),s&&t(s.proxiedTarget)}}/*! * vue-i18n v9.2.0-beta.32 * (c) 2022 kazuya kawaguchi * Released under the MIT License. */const I$="9.2.0-beta.32";function C$(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(ch().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(ch().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ch().__INTLIFY_PROD_DEVTOOLS__=!1)}let wO=tr.__EXTEND_POINT__;const Gi=()=>++wO,Io={UNEXPECTED_RETURN_TYPE:wO,INVALID_ARGUMENT:Gi(),MUST_BE_CALL_SETUP_TOP:Gi(),NOT_INSLALLED:Gi(),NOT_AVAILABLE_IN_LEGACY_MODE:Gi(),REQUIRED_VALUE:Gi(),INVALID_VALUE:Gi(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Gi(),NOT_INSLALLED_WITH_PROVIDE:Gi(),UNEXPECTED_ERROR:Gi(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Gi(),BRIDGE_SUPPORT_VUE_2_ONLY:Gi(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Gi(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Gi(),__EXTEND_POINT__:Gi()};function Uo(e,...t){return By(e,null,void 0)}const LM=ku("__transrateVNode"),OM=ku("__datetimeParts"),RM=ku("__numberParts"),SO=ku("__setPluralRules");ku("__intlifyMeta");const kO=ku("__injectWithOption");function NM(e){if(!jr(e))return e;for(const t in e)if(DC(e,t))if(!t.includes("."))jr(e[t])&&NM(e[t]);else{const n=t.split("."),r=n.length-1;let o=e;for(let i=0;i{if("locale"in u&&"resource"in u){const{locale:d,resource:f}=u;d?(s[d]=s[d]||{},dh(f,s[d])):dh(f,s)}else Dt(u)&&dh(JSON.parse(u),s)}),o==null&&i)for(const u in s)DC(s,u)&&NM(s[u]);return s}const Im=e=>!jr(e)||Or(e);function dh(e,t){if(Im(e)||Im(t))throw Uo(Io.INVALID_VALUE);for(const n in e)DC(e,n)&&(Im(e[n])||Im(t[n])?t[n]=e[n]:dh(e[n],t[n]))}function DO(e){return e.type}function EO(e,t,n){let r=jr(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=qy(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(i=>{e.mergeLocaleMessage(i,r[i])});{if(jr(t.datetimeFormats)){const i=Object.keys(t.datetimeFormats);i.length&&i.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(jr(t.numberFormats)){const i=Object.keys(t.numberFormats);i.length&&i.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function ik(e){return It(Vf,null,e,0)}const sk="__INTLIFY_META__";let ak=0;function lk(e){return(t,n,r,o)=>e(n,r,Xi()||void 0,o)}const T$=()=>{const e=Xi();let t=null;return e&&(t=DO(e)[sk])?{[sk]:t}:null};function OC(e={},t){const{__root:n}=e,r=n===void 0;let o=Yn(e.inheritLocale)?e.inheritLocale:!0;const i=Ne(n&&o?n.locale.value:Dt(e.locale)?e.locale:yg),s=Ne(n&&o?n.fallbackLocale.value:Dt(e.fallbackLocale)||Or(e.fallbackLocale)||fn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i.value),u=Ne(qy(i.value,e)),d=Ne(fn(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),f=Ne(fn(e.numberFormats)?e.numberFormats:{[i.value]:{}});let g=n?n.missingWarn:Yn(e.missingWarn)||Iu(e.missingWarn)?e.missingWarn:!0,v=n?n.fallbackWarn:Yn(e.fallbackWarn)||Iu(e.fallbackWarn)?e.fallbackWarn:!0,_=n?n.fallbackRoot:Yn(e.fallbackRoot)?e.fallbackRoot:!0,M=!!e.fallbackFormat,I=Xr(e.missing)?e.missing:null,k=Xr(e.missing)?lk(e.missing):null,w=Xr(e.postTranslation)?e.postTranslation:null,S=n?n.warnHtmlMessage:Yn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,L=!!e.escapeParameter;const A=n?n.modifiers:fn(e.modifiers)?e.modifiers:{};let O=e.pluralRules||n&&n.pluralRules,H;function q(){r&&JS(null);const W={version:I$,locale:i.value,fallbackLocale:s.value,messages:u.value,modifiers:A,pluralRules:O,missing:k===null?void 0:k,missingWarn:g,fallbackWarn:v,fallbackFormat:M,unresolving:!0,postTranslation:w===null?void 0:w,warnHtmlMessage:S,escapeParameter:L,messageResolver:e.messageResolver,__meta:{framework:"vue"}};W.datetimeFormats=d.value,W.numberFormats=f.value,W.__datetimeFormatters=fn(H)?H.__datetimeFormatters:void 0,W.__numberFormatters=fn(H)?H.__numberFormatters:void 0;const ne=a$(W);return r&&JS(ne),ne}H=q(),$p(H,i.value,s.value);function P(){return[i.value,s.value,u.value,d.value,f.value]}const B=qe({get:()=>i.value,set:W=>{i.value=W,H.locale=i.value}}),j=qe({get:()=>s.value,set:W=>{s.value=W,H.fallbackLocale=s.value,$p(H,i.value,W)}}),$=qe(()=>u.value),R=qe(()=>d.value),T=qe(()=>f.value);function x(){return Xr(w)?w:null}function Z(W){w=W,H.postTranslation=W}function K(){return I}function re(W){W!==null&&(k=lk(W)),I=W,H.missing=k}function X(W,ne,ye,Be,je,ct){P();let Fe;if(__INTLIFY_PROD_DEVTOOLS__)try{YS(T$()),r||(H.fallbackContext=n?s$():void 0),Fe=W(H)}finally{YS(null),r||(H.fallbackContext=void 0)}else Fe=W(H);if(Ro(Fe)&&Fe===Hy){const[at,St]=ne();return n&&_?Be(n):je(at)}else{if(ct(Fe))return Fe;throw Uo(Io.UNEXPECTED_RETURN_TYPE)}}function ie(...W){return X(ne=>Reflect.apply(ek,null,[ne,...W]),()=>kM(...W),"translate",ne=>Reflect.apply(ne.t,ne,[...W]),ne=>ne,ne=>Dt(ne))}function he(...W){const[ne,ye,Be]=W;if(Be&&!jr(Be))throw Uo(Io.INVALID_ARGUMENT);return ie(ne,ye,xo({resolvedMessage:!0},Be||{}))}function ae(...W){return X(ne=>Reflect.apply(tk,null,[ne,...W]),()=>DM(...W),"datetime format",ne=>Reflect.apply(ne.d,ne,[...W]),()=>KS,ne=>Dt(ne))}function de(...W){return X(ne=>Reflect.apply(rk,null,[ne,...W]),()=>EM(...W),"number format",ne=>Reflect.apply(ne.n,ne,[...W]),()=>KS,ne=>Dt(ne))}function Y(W){return W.map(ne=>Dt(ne)?ik(ne):ne)}const fe={normalize:Y,interpolate:W=>W,type:"vnode"};function Re(...W){return X(ne=>{let ye;const Be=ne;try{Be.processor=fe,ye=Reflect.apply(ek,null,[Be,...W])}finally{Be.processor=null}return ye},()=>kM(...W),"translate",ne=>ne[LM](...W),ne=>[ik(ne)],ne=>Or(ne))}function ve(...W){return X(ne=>Reflect.apply(rk,null,[ne,...W]),()=>EM(...W),"number format",ne=>ne[RM](...W),()=>[],ne=>Dt(ne)||Or(ne))}function be(...W){return X(ne=>Reflect.apply(tk,null,[ne,...W]),()=>DM(...W),"datetime format",ne=>ne[OM](...W),()=>[],ne=>Dt(ne)||Or(ne))}function ue(W){O=W,H.pluralRules=O}function ce(W,ne){const ye=Dt(ne)?ne:i.value,Be=V(ye);return H.messageResolver(Be,W)!==null}function Ee(W){let ne=null;const ye=gO(H,s.value,i.value);for(let Be=0;Be{o&&(i.value=W,H.locale=W,$p(H,i.value,s.value))}),Bt(n.fallbackLocale,W=>{o&&(s.value=W,H.fallbackLocale=W,$p(H,i.value,s.value))}));const Te={id:ak,locale:B,fallbackLocale:j,get inheritLocale(){return o},set inheritLocale(W){o=W,W&&n&&(i.value=n.locale.value,s.value=n.fallbackLocale.value,$p(H,i.value,s.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:$,get modifiers(){return A},get pluralRules(){return O||{}},get isGlobal(){return r},get missingWarn(){return g},set missingWarn(W){g=W,H.missingWarn=g},get fallbackWarn(){return v},set fallbackWarn(W){v=W,H.fallbackWarn=v},get fallbackRoot(){return _},set fallbackRoot(W){_=W},get fallbackFormat(){return M},set fallbackFormat(W){M=W,H.fallbackFormat=M},get warnHtmlMessage(){return S},set warnHtmlMessage(W){S=W,H.warnHtmlMessage=W},get escapeParameter(){return L},set escapeParameter(W){L=W,H.escapeParameter=W},t:ie,getLocaleMessage:V,setLocaleMessage:ee,mergeLocaleMessage:se,getPostTranslationHandler:x,setPostTranslationHandler:Z,getMissingHandler:K,setMissingHandler:re,[SO]:ue};return Te.datetimeFormats=R,Te.numberFormats=T,Te.rt=he,Te.te=ce,Te.tm=pe,Te.d=ae,Te.n=de,Te.getDateTimeFormat=Ce,Te.setDateTimeFormat=le,Te.mergeDateTimeFormat=ke,Te.getNumberFormat=Pe,Te.setNumberFormat=xe,Te.mergeNumberFormat=He,Te[kO]=e.__injectWithOption,Te[LM]=Re,Te[OM]=be,Te[RM]=ve,Te}function w$(e){const t=Dt(e.locale)?e.locale:yg,n=Dt(e.fallbackLocale)||Or(e.fallbackLocale)||fn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=Xr(e.missing)?e.missing:void 0,o=Yn(e.silentTranslationWarn)||Iu(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,i=Yn(e.silentFallbackWarn)||Iu(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,s=Yn(e.fallbackRoot)?e.fallbackRoot:!0,u=!!e.formatFallbackMessages,d=fn(e.modifiers)?e.modifiers:{},f=e.pluralizationRules,g=Xr(e.postTranslation)?e.postTranslation:void 0,v=Dt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,_=!!e.escapeParameterHtml,M=Yn(e.sync)?e.sync:!0;let I=e.messages;if(fn(e.sharedMessages)){const H=e.sharedMessages;I=Object.keys(H).reduce((P,B)=>{const j=P[B]||(P[B]={});return xo(j,H[B]),P},I||{})}const{__i18n:k,__root:w,__injectWithOption:S}=e,L=e.datetimeFormats,A=e.numberFormats,O=e.flatJson;return{locale:t,fallbackLocale:n,messages:I,flatJson:O,datetimeFormats:L,numberFormats:A,missing:r,missingWarn:o,fallbackWarn:i,fallbackRoot:s,fallbackFormat:u,modifiers:d,pluralRules:f,postTranslation:g,warnHtmlMessage:v,escapeParameter:_,messageResolver:e.messageResolver,inheritLocale:M,__i18n:k,__root:w,__injectWithOption:S}}function PM(e={},t){{const n=OC(w$(e)),r={id:n.id,get locale(){return n.locale.value},set locale(o){n.locale.value=o},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(o){n.fallbackLocale.value=o},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(o){},get missing(){return n.getMissingHandler()},set missing(o){n.setMissingHandler(o)},get silentTranslationWarn(){return Yn(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(o){n.missingWarn=Yn(o)?!o:o},get silentFallbackWarn(){return Yn(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(o){n.fallbackWarn=Yn(o)?!o:o},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(o){n.fallbackFormat=o},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(o){n.setPostTranslationHandler(o)},get sync(){return n.inheritLocale},set sync(o){n.inheritLocale=o},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(o){n.warnHtmlMessage=o!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(o){n.escapeParameter=o},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(o){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...o){const[i,s,u]=o,d={};let f=null,g=null;if(!Dt(i))throw Uo(Io.INVALID_ARGUMENT);const v=i;return Dt(s)?d.locale=s:Or(s)?f=s:fn(s)&&(g=s),Or(u)?f=u:fn(u)&&(g=u),Reflect.apply(n.t,n,[v,f||g||{},d])},rt(...o){return Reflect.apply(n.rt,n,[...o])},tc(...o){const[i,s,u]=o,d={plural:1};let f=null,g=null;if(!Dt(i))throw Uo(Io.INVALID_ARGUMENT);const v=i;return Dt(s)?d.locale=s:Ro(s)?d.plural=s:Or(s)?f=s:fn(s)&&(g=s),Dt(u)?d.locale=u:Or(u)?f=u:fn(u)&&(g=u),Reflect.apply(n.t,n,[v,f||g||{},d])},te(o,i){return n.te(o,i)},tm(o){return n.tm(o)},getLocaleMessage(o){return n.getLocaleMessage(o)},setLocaleMessage(o,i){n.setLocaleMessage(o,i)},mergeLocaleMessage(o,i){n.mergeLocaleMessage(o,i)},d(...o){return Reflect.apply(n.d,n,[...o])},getDateTimeFormat(o){return n.getDateTimeFormat(o)},setDateTimeFormat(o,i){n.setDateTimeFormat(o,i)},mergeDateTimeFormat(o,i){n.mergeDateTimeFormat(o,i)},n(...o){return Reflect.apply(n.n,n,[...o])},getNumberFormat(o){return n.getNumberFormat(o)},setNumberFormat(o,i){n.setNumberFormat(o,i)},mergeNumberFormat(o,i){n.mergeNumberFormat(o,i)},getChoiceIndex(o,i){return-1},__onComponentInstanceCreated(o){const{componentInstanceCreatedListener:i}=e;i&&i(o,r)}};return r}}const RC={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function S$({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,o)=>r=[...r,...Or(o.children)?o.children:[o]],[]):t.reduce((n,r)=>{const o=e[r];return o&&(n[r]=o()),n},{})}function AO(e){return ft}const uk={name:"i18n-t",props:xo({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Ro(e)||!isNaN(e)}},RC),setup(e,t){const{slots:n,attrs:r}=t,o=e.i18n||Vy({useScope:e.scope,__useComponent:!0}),i=Object.keys(n).filter(s=>s!=="_");return()=>{const s={};e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=Dt(e.plural)?+e.plural:e.plural);const u=S$(t,i),d=o[LM](e.keypath,u,s),f=xo({},r),g=Dt(e.tag)||jr(e.tag)?e.tag:AO();return Se(g,f,d)}}};function LO(e,t,n,r){const{slots:o,attrs:i}=t;return()=>{const s={part:!0};let u={};e.locale&&(s.locale=e.locale),Dt(e.format)?s.key=e.format:jr(e.format)&&(Dt(e.format.key)&&(s.key=e.format.key),u=Object.keys(e.format).reduce((_,M)=>n.includes(M)?xo({},_,{[M]:e.format[M]}):_,{}));const d=r(e.value,s,u);let f=[s.key];Or(d)?f=d.map((_,M)=>{const I=o[_.type];return I?I({[_.type]:_.value,index:M,parts:d}):[_.value]}):Dt(d)&&(f=[d]);const g=xo({},i),v=Dt(e.tag)||jr(e.tag)?e.tag:AO();return Se(v,g,f)}}const k$=["localeMatcher","style","unit","unitDisplay","currency","currencyDisplay","useGrouping","numberingSystem","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","notation","formatMatcher"],ck={name:"i18n-n",props:xo({value:{type:Number,required:!0},format:{type:[String,Object]}},RC),setup(e,t){const n=e.i18n||Vy({useScope:"parent",__useComponent:!0});return LO(e,t,k$,(...r)=>n[RM](...r))}},D$=["dateStyle","timeStyle","fractionalSecondDigits","calendar","dayPeriod","numberingSystem","localeMatcher","timeZone","hour12","hourCycle","formatMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName"],dk={name:"i18n-d",props:xo({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},RC),setup(e,t){const n=e.i18n||Vy({useScope:"parent",__useComponent:!0});return LO(e,t,D$,(...r)=>n[OM](...r))}};function E$(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function A$(e){const t=(n,{instance:r,value:o,modifiers:i})=>{if(!r||!r.$)throw Uo(Io.UNEXPECTED_ERROR);const s=E$(e,r.$),u=L$(o);n.textContent=Reflect.apply(s.t,s,[...O$(u)])};return{beforeMount:t,beforeUpdate:t}}function L$(e){if(Dt(e))return{path:e};if(fn(e)){if(!("path"in e))throw Uo(Io.REQUIRED_VALUE,"path");return e}else throw Uo(Io.INVALID_VALUE)}function O$(e){const{path:t,locale:n,args:r,choice:o,plural:i}=e,s={},u=r||{};return Dt(n)&&(s.locale=n),Ro(o)&&(s.plural=o),Ro(i)&&(s.plural=i),[t,u,s]}function R$(e,t,...n){const r=fn(n[0])?n[0]:{},o=!!r.useI18nComponentName;(Yn(r.globalInstall)?r.globalInstall:!0)&&(e.component(o?"i18n":uk.name,uk),e.component(ck.name,ck),e.component(dk.name,dk)),e.directive("t",A$(t))}function N$(e,t,n){return{beforeCreate(){const r=Xi();if(!r)throw Uo(Io.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const i=o.i18n;o.__i18n&&(i.__i18n=o.__i18n),i.__root=t,this===this.$root?this.$i18n=fk(e,i):(i.__injectWithOption=!0,this.$i18n=PM(i))}else o.__i18n?this===this.$root?this.$i18n=fk(e,o):this.$i18n=PM({__i18n:o.__i18n,__injectWithOption:!0,__root:t}):this.$i18n=e;o.__i18nGlobal&&EO(t,o,o),e.__onComponentInstanceCreated(this.$i18n),n.__setInstance(r,this.$i18n),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$tc=(...i)=>this.$i18n.tc(...i),this.$te=(i,s)=>this.$i18n.te(i,s),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i)},mounted(){},unmounted(){const r=Xi();if(!r)throw Uo(Io.UNEXPECTED_ERROR);delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,n.__deleteInstance(r),delete this.$i18n}}}function fk(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[SO](t.pluralizationRules||e.pluralizationRules);const n=qy(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const P$=ku("global-vue-i18n");function x$(e={},t){const n=__VUE_I18N_LEGACY_API__&&Yn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,r=!!e.globalInjection,o=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,i=new Map,s=U$(e,n),u=ku("");function d(v){return i.get(v)||null}function f(v,_){i.set(v,_)}function g(v){i.delete(v)}{const v={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return o},async install(_,...M){_.__VUE_I18N_SYMBOL__=u,_.provide(_.__VUE_I18N_SYMBOL__,v),!n&&r&&j$(_,v.global),__VUE_I18N_FULL_INSTALL__&&R$(_,v,...M),__VUE_I18N_LEGACY_API__&&n&&_.mixin(N$(s,s.__composer,v))},get global(){return s},__instances:i,__getInstance:d,__setInstance:f,__deleteInstance:g};return v}}function Vy(e={}){const t=Xi();if(t==null)throw Uo(Io.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Uo(Io.NOT_INSLALLED);const n=F$(t),r=G$(n),o=DO(t),i=$$(e,o);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw Uo(Io.NOT_AVAILABLE_IN_LEGACY_MODE);return q$(t,i,r,e)}if(i==="global")return EO(r,e,o),r;if(i==="parent"){let d=B$(n,t,e.__useComponent);return d==null&&(d=r),d}const s=n;let u=s.__getInstance(t);if(u==null){const d=xo({},e);"__i18n"in o&&(d.__i18n=o.__i18n),r&&(d.__root=r),u=OC(d),H$(s,t),s.__setInstance(t,u)}return u}function U$(e,t,n){return __VUE_I18N_LEGACY_API__&&t?PM(e):OC(e)}function F$(e){{const t=en(e.isCE?P$:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Uo(e.isCE?Io.NOT_INSLALLED_WITH_PROVIDE:Io.UNEXPECTED_ERROR);return t}}function $$(e,t){return Gy(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function G$(e){return e.mode==="composition"?e.global:e.global.__composer}function B$(e,t,n=!1){let r=null;const o=t.root;let i=t.parent;for(;i!=null;){const s=e;if(e.mode==="composition")r=s.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const u=s.__getInstance(i);u!=null&&(r=u.__composer,n&&r&&!r[kO]&&(r=null))}if(r!=null||o===i)break;i=i.parent}return r}function H$(e,t,n){Rn(()=>{},t),_l(()=>{e.__deleteInstance(t)},t)}function q$(e,t,n,r={}){const o=t==="local",i=TL(null);if(o&&e.proxy&&!e.proxy.$options.i18n)throw Uo(Io.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=Yn(r.inheritLocale)?r.inheritLocale:!0,u=Ne(o&&s?n.locale.value:Dt(r.locale)?r.locale:yg),d=Ne(o&&s?n.fallbackLocale.value:Dt(r.fallbackLocale)||Or(r.fallbackLocale)||fn(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:u.value),f=Ne(qy(u.value,r)),g=Ne(fn(r.datetimeFormats)?r.datetimeFormats:{[u.value]:{}}),v=Ne(fn(r.numberFormats)?r.numberFormats:{[u.value]:{}}),_=o?n.missingWarn:Yn(r.missingWarn)||Iu(r.missingWarn)?r.missingWarn:!0,M=o?n.fallbackWarn:Yn(r.fallbackWarn)||Iu(r.fallbackWarn)?r.fallbackWarn:!0,I=o?n.fallbackRoot:Yn(r.fallbackRoot)?r.fallbackRoot:!0,k=!!r.fallbackFormat,w=Xr(r.missing)?r.missing:null,S=Xr(r.postTranslation)?r.postTranslation:null,L=o?n.warnHtmlMessage:Yn(r.warnHtmlMessage)?r.warnHtmlMessage:!0,A=!!r.escapeParameter,O=o?n.modifiers:fn(r.modifiers)?r.modifiers:{},H=r.pluralRules||o&&n.pluralRules;function q(){return[u.value,d.value,f.value,g.value,v.value]}const P=qe({get:()=>i.value?i.value.locale.value:u.value,set:se=>{i.value&&(i.value.locale.value=se),u.value=se}}),B=qe({get:()=>i.value?i.value.fallbackLocale.value:d.value,set:se=>{i.value&&(i.value.fallbackLocale.value=se),d.value=se}}),j=qe(()=>i.value?i.value.messages.value:f.value),$=qe(()=>g.value),R=qe(()=>v.value);function T(){return i.value?i.value.getPostTranslationHandler():S}function x(se){i.value&&i.value.setPostTranslationHandler(se)}function Z(){return i.value?i.value.getMissingHandler():w}function K(se){i.value&&i.value.setMissingHandler(se)}function re(se){return q(),se()}function X(...se){return i.value?re(()=>Reflect.apply(i.value.t,null,[...se])):re(()=>"")}function ie(...se){return i.value?Reflect.apply(i.value.rt,null,[...se]):""}function he(...se){return i.value?re(()=>Reflect.apply(i.value.d,null,[...se])):re(()=>"")}function ae(...se){return i.value?re(()=>Reflect.apply(i.value.n,null,[...se])):re(()=>"")}function de(se){return i.value?i.value.tm(se):{}}function Y(se,Ce){return i.value?i.value.te(se,Ce):!1}function te(se){return i.value?i.value.getLocaleMessage(se):{}}function fe(se,Ce){i.value&&(i.value.setLocaleMessage(se,Ce),f.value[se]=Ce)}function Re(se,Ce){i.value&&i.value.mergeLocaleMessage(se,Ce)}function ve(se){return i.value?i.value.getDateTimeFormat(se):{}}function be(se,Ce){i.value&&(i.value.setDateTimeFormat(se,Ce),g.value[se]=Ce)}function ue(se,Ce){i.value&&i.value.mergeDateTimeFormat(se,Ce)}function ce(se){return i.value?i.value.getNumberFormat(se):{}}function Ee(se,Ce){i.value&&(i.value.setNumberFormat(se,Ce),v.value[se]=Ce)}function pe(se,Ce){i.value&&i.value.mergeNumberFormat(se,Ce)}const V={get id(){return i.value?i.value.id:-1},locale:P,fallbackLocale:B,messages:j,datetimeFormats:$,numberFormats:R,get inheritLocale(){return i.value?i.value.inheritLocale:s},set inheritLocale(se){i.value&&(i.value.inheritLocale=se)},get availableLocales(){return i.value?i.value.availableLocales:Object.keys(f.value)},get modifiers(){return i.value?i.value.modifiers:O},get pluralRules(){return i.value?i.value.pluralRules:H},get isGlobal(){return i.value?i.value.isGlobal:!1},get missingWarn(){return i.value?i.value.missingWarn:_},set missingWarn(se){i.value&&(i.value.missingWarn=se)},get fallbackWarn(){return i.value?i.value.fallbackWarn:M},set fallbackWarn(se){i.value&&(i.value.missingWarn=se)},get fallbackRoot(){return i.value?i.value.fallbackRoot:I},set fallbackRoot(se){i.value&&(i.value.fallbackRoot=se)},get fallbackFormat(){return i.value?i.value.fallbackFormat:k},set fallbackFormat(se){i.value&&(i.value.fallbackFormat=se)},get warnHtmlMessage(){return i.value?i.value.warnHtmlMessage:L},set warnHtmlMessage(se){i.value&&(i.value.warnHtmlMessage=se)},get escapeParameter(){return i.value?i.value.escapeParameter:A},set escapeParameter(se){i.value&&(i.value.escapeParameter=se)},t:X,getPostTranslationHandler:T,setPostTranslationHandler:x,getMissingHandler:Z,setMissingHandler:K,rt:ie,d:he,n:ae,tm:de,te:Y,getLocaleMessage:te,setLocaleMessage:fe,mergeLocaleMessage:Re,getDateTimeFormat:ve,setDateTimeFormat:be,mergeDateTimeFormat:ue,getNumberFormat:ce,setNumberFormat:Ee,mergeNumberFormat:pe};function ee(se){se.locale.value=u.value,se.fallbackLocale.value=d.value,Object.keys(f.value).forEach(Ce=>{se.mergeLocaleMessage(Ce,f.value[Ce])}),Object.keys(g.value).forEach(Ce=>{se.mergeDateTimeFormat(Ce,g.value[Ce])}),Object.keys(v.value).forEach(Ce=>{se.mergeNumberFormat(Ce,v.value[Ce])}),se.escapeParameter=A,se.fallbackFormat=k,se.fallbackRoot=I,se.fallbackWarn=M,se.missingWarn=_,se.warnHtmlMessage=L}return qf(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw Uo(Io.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const se=i.value=e.proxy.$i18n.__composer;t==="global"?(u.value=se.locale.value,d.value=se.fallbackLocale.value,f.value=se.messages.value,g.value=se.datetimeFormats.value,v.value=se.numberFormats.value):o&&ee(se)}),V}const V$=["locale","fallbackLocale","availableLocales"],z$=["t","rt","d","n","tm"];function j$(e,t){const n=Object.create(null);V$.forEach(r=>{const o=Object.getOwnPropertyDescriptor(t,r);if(!o)throw Uo(Io.UNEXPECTED_ERROR);const i=br(o.value)?{get(){return o.value.value},set(s){o.value.value=s}}:{get(){return o.get&&o.get()}};Object.defineProperty(n,r,i)}),e.config.globalProperties.$i18n=n,z$.forEach(r=>{const o=Object.getOwnPropertyDescriptor(t,r);if(!o||!o.value)throw Uo(Io.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,o)})}n$(u$);r$(FF);o$(gO);C$();if(__INTLIFY_PROD_DEVTOOLS__){const e=ch();e.__INTLIFY__=!0,WF(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const W$={群公告:"Group notice",群成员:"Group member",群管理:"Manage group",好友工作群:"Work",陌生人社交群:"Public",临时会议群:"Meeting",直播群:"AVChatRom",自由加入:"Join freely",需要验证:"Require approval",禁止加群:"Disallow group joining",人:"",群ID:"Group ID",群头像:"Group profile photo",群类型:"Group type",加群方式:"Group joining mode",转让群组:"Transfer ownership",解散群聊:"Disband group",退出群组:"Quit group",群管理员:"Group admin",学生禁言:"Mute All","学生禁言开启后,只允许群主和管理员发言。":"If Mute All is enabled, only the group owner and admin can speak.",单独禁言人员:"Mute a member",删除成员:"Remove member","确定从群聊中删除该成员?":"Are you sure you want to remove this member from the group chat?","确定从群聊中删除所选成员?":"Are you sure you want to remove selected member(s) from the group chat?",暂无公告:"No notice",发布:"Post",编辑:"Edit",群名称:"Group name",查看更多:"View more",管理员:"Admin",群主:"Group owner",我:"me",添加成员:"Add member",新增管理员:"Add admin",移除管理员:"Revoke admin",新增禁言用户:"Add muted member",移除禁言用户:"Remove muted member",修改群聊名称:"Edit group name","修改群聊名称后,将在群内通知其他成员":"After modifying the group chat name, other members will be notified in the group","仅限中文、字母、数字和下划线,2-20个字":"Chinese, letters, numbers and underscores only, 2-20 words","请先注册 TUIGroup 模块":"Please register the TUIGroup module first",该用户不存在:"The user does not exist",该用户不在群组内:"The user is not in the group"},K$={撤回:"Recall message",删除:"Delete message",复制:"Copy",重新发送:"Resend",转发:"Forward",引用:"Reference",回复:"Reply",回复详情:"Replies",条回复:"replies",打开:"Open",已读:"Read",全部已读:"All read",人已读:" read",人未读:" unread",人关闭阅读状态:" read status closed",消息详情:"Message Detail",关闭阅读状态:"Read status closed",该消息不存在:"The message does not exist",无法定位到原消息:"Unable to navigate to the original message",未读:"Unread",您:"You",撤回了一条消息:"recalled a message",重新编辑:"Re-edit",我:"I",查看更多:"View more",转发给:"Forward to",请输入消息:"Enter a message",描述:"Description",经度:"Longitude",纬度:"Latitude",自定义消息:"Custom message",图片:"[photo]",语音:"[audio]",视频:"[video]",表情:"[face]",文件:"[file]",自定义:"[custom message]",管理员开启学生禁言:"The admin enables Mute All",您已被管理员禁言:"You have been muted by the admin","按Enter发送,Ctrl+Enter换行":"Press Enter to send a message and Ctrl+Enter to start a new line",单击下载:"Click download","确认重发该消息?":"Confirm to resend the message?",取消:"Cancel",确定:"Submit",对方正在输入:"Typing...",回到最新位置:"Back to the latest location",条新消息:" new messages",安全提示:"【Security Tips】This APP is only used to experience the functions of Tencent Cloud Instant Messaging products, and cannot be used for business negotiation and expansion. Don't trust money-related information such as remittances and lottery wins, don't make unfamiliar phone calls easily, and beware of being deceived.",点此投诉:"Complain",语音通话:"Voice Call",视频通话:"Video Call",发起群语音:"Make group voice call",发起群视频:"Make group video call",已接听:"Answered",拒绝通话:"Decline Call",无应答:"No Answer",取消通话:"Cancel Call",发起通话:"Start Call",结束群聊:"Edit Group Call",通话时长:"Duration",欢迎使用TUICallKit:"Welcome to TUICallKit","检测到您暂未集成TUICallKit,无法体验音视频通话功能":"It is detected that you have not integrated TUI CallKit yet, so you cannot experience the audio and video call. ",请点击:"Please click",集成TUICallKit:" Integrate TUICallKit ",开通腾讯实时音视频服务:"Integration Tencent Real-Time Communication",进行体验:"to experience.",您当前购买使用的套餐包暂未开通此功能:"The package you purchased does not support this ability.",选择提醒的人:"Select Contact",manage:W$},Y$={发起单聊:"New one-to-one chat",发起群聊:"New group chat",请输入userID:"Enter a user ID",删除会话:"Delete conversation",系统通知:"System notification",置顶会话:"Top conversation",取消置顶:"cancel top conversation",消息免打扰:"Message not disturb",取消免打扰:"cancel not disturb","有人@我":"Someone {'@'} me","@所有人":"{'@'}Everyone",条:"strip",我:"me","网络异常,请您检查网络设置":"Network exception, please check the network settings"},J$={输入groupID搜索:"Enter groupId search",群名称:"Group name",群ID:"Group ID",加入群聊:"Join",解散群聊:"Dissolution",退出群聊:"Quit",群类型:"Group type",请填写验证信息:"Please fill in the verification information",申请加入:"Apply Join",已申请:"Applied"},X$={资料设置:"Edit profile",头像:"Profile photo",昵称:"Name",账号:"Account",个性签名:"Status",性别:"Gender",男:"Male",女:"Female",不显示:"Rather not say",出生年月:"Birthday",取消:"Cancel",保存:"Save",请选择出生日期:"Select the date of birthday",选择头像:"Select Avatar",设置昵称:"Setting Name","仅限中文、字母、数字和下划线,2-20个字":"Chinese, letters, numbers and underscores only, 2-20 words",请输入昵称:"Enter Name",性别选择:"Select gender",请输入内容:"Enter content",用户ID:"userID",暂未设置:"Not set yet"},Z$={群聊通知:"Group Chat Notifications",系统通知:"System Notifications",我的群聊:"My Group Chats","输入群ID,按回车搜索":"Enter a group ID",群名称:"Group name",群ID:"Group ID",加入群聊:"Join group chat",解散群聊:"Disband group chat",退出群聊:"Quit group chat",进入群聊:"Enter group chat",群类型:"Group type",请填写验证信息:"Enter the verification info",申请加入:"Request to join",已申请:"Requested",接受:"Accept",拒绝:"Refuse",已处理:"Handled",添加群聊:"add group chat",已加入:"joined",该群组不存在:"The group does not exist",加群:"join",我的好友:"Friend",发送消息:"Send Message",个性签名:"Signature"},Q$={发起会话:"Start chat",发起单聊:"New one-to-one chat",发起群聊:"New group chat",该用户不存在:"The user does not exist","创建群聊,请注册 TUIGroup 模块":"To create a group chat, please register the TUIGroup module",创建成功:"Creation successful","发起多人会话(群聊)":"New group chat",群头像:"Group profile photo",群名称:"Group name",群ID:"Group ID",群类型:"Group type",选填:"Optional",取消:"Cancel",创建:"Create","类似普通微信群,创建后仅支持已在群内的好友邀请加群,且无需被邀请方同意或群主神奇。详见":"Similar to a WeChat group. Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details.","类似 QQ 群,创建后群主可以指定群管理员,用户搜索群 ID 发起加群申请后,需要群主或管理员审批通过才能入群。详见":"Similar to a QQ group. After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details. ","创建后可以随意进出,且支持查看入群前消息;适合用于音视频会议场景、在线教育场景等与实时音视频产品结合的场景。详见":"After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.","创建后可以随意进出,没有群成员数量上限,但不支持历史消息存储;适合与直播产品结合,用于弹幕聊天场景。详见":"After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details. ",产品文档:"product documentation",设置群名称:"Group name",请输入群名称:"Enter the group name",设置群ID:"Group ID",请输入群ID:"Enter the group ID",选择群类型:"Group type"},eG={群成员:"group members",加入群组:"joined the group",退出群组:"left the group",被:"by",踢出群组:"was kicked out of the group",成为管理员:"was set as an admin",被撤销管理员:"was revoked",被禁言:" was unmuted",被取消禁言:"cancel the prohibition",群提示消息:"group prompt message",管理员:"The admin",开启学生禁言:"enabled Mute All",取消学生禁言:"disabled Mute All",成为新的群主:"became the new group owner",修改群名为:"changed the group name to",发布新公告:"posted a new notice",申请加入群组:"requested to join the group",成功加入群组:"Successfully joined the group",被拒绝:"The request to join the group was refused",你被管理员:"You",群:"group",解散:"disbanded",创建群:"created the group",邀请你加群:"invite you to join the group",你退出群组:"You left the group",你被:"You were",设置为群:"set as group",的管理员:"as an admin",撤销群:"revoked",的管理员身份:"admin role of the group",同意加群:"agreed to join the group",拒接加群:"refused to join the group",自定义群系统通知:"Custom group system notification"},tG={自定义消息:"Custom message",通话时长:"Call duration",结束群聊:"End",切换语音通话:"Switch voice call",切换视频通话:"Switch video call",发起通话:"Start a call",取消通话:"Cancel",已接听:"Answered",拒绝通话:"Decline",无应答:"No answer",对本次服务评价:"Rate this service","查看详情>>":"View details >>"},nG={tip:eG,custom:tG},rG={取消:"Cancel",完成:"Done",已选中:"Selected",人:"",保存:"Save",请输入userID:"Enter a user ID",确定:"submit",全选:"All",已在群聊中:"exists"},oG={周:"week(s) ",天:"day(s)",小时:"hour(s) ",分钟:"minute(s)",刚刚:"Just now",前:" ago",昨天:"Yesterday",星期一:"Monday",星期二:"Tuesday",星期三:"Wednesday",星期四:"Thursday",星期五:"Friday",星期六:"Saturday",星期日:"Sunday"},iG={请对本次服务进行评价:"Please rate this service",提交评价:"Feedback","常用语-快捷回复工具":"Common Expressions - Quick Reply Tool",使用:"Build with",自定义消息:"Custom message",搭建:"","在吗?在吗?在吗?重要的话说三遍。":"Are you there? ","好久没聊天了,快来和我说说话~":"It’s been a long time. How about you?","好的,就这么说定了。":"Okay. It's a deal.","感恩的心,感谢有你。":"So grateful! ","糟糕!是心动的感觉!":"Oh, no. Flipped.","心疼地抱抱自己,我太难了!":"Give myself a warm hug. ","没关系,别在意,事情过去就过去了。":"Take it easy.","早上好,今天也是让人期待的一天呢!":"Good morning. Have a wonderful day.","熬夜有什么用,又没人陪你聊天,早点休息吧。":"It's better to go to bed early."},sG={请对本次服务进行评价:"Please rate this service",提交评价:"Feedback",服务评价工具:"Service rate tool",使用:"Build with",自定义消息:"Custom message",搭建:"",星:"Star"},aG={en:{取消:"Cancel",发送:"Send",系统通知:"System notification",关闭:"Close",确定:"Save",TUIChat:K$,TUIConversation:Y$,TUIGroup:J$,TUIProfile:X$,TUIContact:Z$,message:nG,component:rG,time:oG,Evaluate:sG,Words:iG,TUISearch:Q$}},lG={群公告:"群公告",群成员:"群成员",群管理:"群管理",好友工作群:"好友工作群",陌生人社交群:"陌生人社交群",临时会议群:"临时会议群",直播群:"直播群",自由加入:"自由加入",需要验证:"需要验证",禁止加群:"禁止加群",人:"人",群ID:"群ID",群头像:"群头像",群类型:"群类型",加群方式:"加群方式",转让群组:"转让群组",解散群聊:"解散群聊",退出群组:"退出群组",群管理员:"群管理员",学生禁言:"学生禁言","学生禁言开启后,只允许群主和管理员发言。":"学生禁言开启后,只允许群主和管理员发言。",单独禁言人员:"单独禁言人员",删除成员:"删除成员","确定从群聊中删除该成员?":"确定从群聊中删除该成员?","确定从群聊中删除所选成员?":"确定从群聊中删除所选成员?",暂无公告:"暂无公告",发布:"发布",编辑:"编辑",群名称:"群名称",查看更多:"查看更多",管理员:"管理员",群主:"群主",我:"我",添加成员:"添加成员",新增管理员:"新增管理员",移除管理员:"移除管理员",新增禁言用户:"新增禁言用户",移除禁言用户:"移除禁言用户",修改群聊名称:"修改群聊名称","修改群聊名称后,将在群内通知其他成员":"修改群聊名称后,将在群内通知其他成员","仅限中文、字母、数字和下划线,2-20个字":"仅限中文、字母、数字和下划线,2-20个字","请先注册 TUIGroup 模块":"请先注册 TUIGroup 模块",该用户不存在:"该用户不存在",该用户不在群组内:"该用户不在群组内"},uG={撤回:"撤回",删除:"删除",复制:"复制",重新发送:"重新发送",转发:"转发",引用:"引用",回复:"回复",回复详情:"回复详情",条回复:"条回复",打开:"打开",已读:"已读",未读:"未读",人已读:"人已读",人未读:"人未读",人关闭阅读状态:"人关闭阅读状态",全部已读:"全部已读",消息详情:"消息详情",关闭阅读状态:"关闭",您:"您",撤回了一条消息:"撤回了一条消息",重新编辑:"重新编辑",我:"我",自定义消息:"自定义消息",查看更多:"查看更多","确认重发该消息?":"确认重发该消息?",取消:"取消",确定:"确定",转发给:"转发给",请输入消息:"请输入消息,按Ctrl + ↵ 换行",描述:"描述",经度:"经度",纬度:"纬度",图片:"[图片]",语音:"[语音]",视频:"[视频]",表情:"[表情]",文件:"[文件]",自定义:"[自定义消息]",管理员开启学生禁言:"管理员开启学生禁言",您已被管理员禁言:"您已被管理员禁言","按Enter发送,Ctrl+Enter换行":"按Enter发送,Ctrl+Enter换行",单击下载:"单击下载",该消息不存在:"该消息不存在",无法定位到原消息:"无法定位到原消息",对方正在输入:"对方正在输入...",回到最新位置:"回到最新位置",条新消息:"条新消息",安全提示:"【安全提示】本 APP 仅用于体验腾讯云即时通信 IM 产品功能,不可用于业务洽谈与拓展。请勿轻信汇款、中奖等涉及钱款的信息,勿轻易拨打陌生电话,谨防上当受骗。",点此投诉:"点此投诉",语音通话:"语音通话",视频通话:"视频通话",发起群语音:"发起群语音",发起群视频:"发起群视频",已接听:"已接听",拒绝通话:"拒绝通话",无应答:"无应答",取消通话:"取消通话",发起通话:"发起通话",结束群聊:"结束群聊",通话时长:"通话时长",欢迎使用TUICallKit:"欢迎使用腾讯云音视频通话组件TUICallKit ","检测到您暂未集成TUICallKit,无法体验音视频通话功能":"检测到您暂未集成TUICallKit,无法体验音视频通话功能。",请点击:"请点击",集成TUICallKit:"集成 TUICallKit ",开通腾讯实时音视频服务:"开通腾讯实时音视频服务",进行体验:"进行体验。",您当前购买使用的套餐包暂未开通群消息已读回执功能:"您当前购买使用的套餐包暂未开通【群消息已读回执】功能,请升级至旗舰版进行体验",您当前购买使用的套餐包暂未开通在线用户列表功能:"您当前购买使用的套餐包暂未开通【在线用户列表】功能,请升级至旗舰版进行体验",您当前购买使用的套餐包暂未开通此功能:"您当前购买使用的套餐包暂未开通此功能。",选择提醒的人:"选择提醒的人",manage:lG},cG={发起单聊:"发起单聊",发起群聊:"发起群聊",请输入userID:"请输入userID",删除会话:"删除会话",置顶会话:"置顶会话",取消置顶:"取消置顶",消息免打扰:"消息免打扰",取消免打扰:"取消免打扰",系统通知:"系统通知","有人@我":"有人{'@'}我","@所有人":"{'@'}所有人",条:"条",我:"我","网络异常,请您检查网络设置":"网络异常,请您检查网络设置"},dG={输入groupID搜索:"输入groupID搜索",群名称:"群名称",群ID:"群ID",加入群聊:"加入群聊",解散群聊:"解散群聊",退出群聊:"退出群聊",群类型:"群类型",请填写验证信息:"请填写验证信息",申请加入:"申请加入",已申请:"已申请"},fG={资料设置:"资料设置",头像:"头像",昵称:"昵称",账号:"账号",个性签名:"个性签名",性别:"性别",男:"男",女:"女",不显示:"不显示",出生年月:"出生年月",取消:"取消",保存:"保存",请选择出生日期:"请选择出生日期",选择头像:"选择头像",设置昵称:"设置昵称","仅限中文、字母、数字和下划线,2-20个字":"仅限中文、字母、数字和下划线,2-20个字",请输入昵称:"请输入昵称",性别选择:"性别选择",请输入内容:"请输入内容",用户ID:"用户ID",暂未设置:"暂未设置"},pG={群聊通知:"群聊通知",系统通知:"系统通知",我的群聊:"我的群聊","输入群ID,按回车搜索":"输入群ID,按回车搜索",群名称:"群名称",群ID:"群ID",加入群聊:"加入群聊",解散群聊:"解散群聊",退出群聊:"退出群聊",进入群聊:"进入群聊",群类型:"群类型",请填写验证信息:"请填写验证信息",申请加入:"申请加入",已申请:"已申请",接受:"接受",拒绝:"拒绝",已处理:"已处理",添加群聊:"添加群聊",已加入:"已加入",该群组不存在:"该群组不存在",加群:"加群",我的好友:"我的好友",发送消息:"发送消息",个性签名:"个性签名"},hG={发起会话:"发起会话",发起单聊:"发起单聊",发起群聊:"发起群聊",该用户不存在:"该用户不存在","创建群聊,请注册 TUIGroup 模块":"创建群聊,请注册 TUIGroup 模块",创建成功:"创建成功","发起多人会话(群聊)":"发起多人会话(群聊)",群头像:"群头像",群名称:"群名称",群ID:"群ID",群类型:"群类型",选填:"选填",取消:"取消",创建:"创建","类似普通微信群,创建后仅支持已在群内的好友邀请加群,且无需被邀请方同意或群主神奇。详见":"类似普通微信群,创建后仅支持已在群内的好友邀请加群,且无需被邀请方同意或群主神奇。详见","类似 QQ 群,创建后群主可以指定群管理员,用户搜索群 ID 发起加群申请后,需要群主或管理员审批通过才能入群。详见":"类似 QQ 群,创建后群主可以指定群管理员,用户搜索群 ID 发起加群申请后,需要群主或管理员审批通过才能入群。详见","创建后可以随意进出,且支持查看入群前消息;适合用于音视频会议场景、在线教育场景等与实时音视频产品结合的场景。详见":"创建后可以随意进出,且支持查看入群前消息;适合用于音视频会议场景、在线教育场景等与实时音视频产品结合的场景。详见","创建后可以随意进出,没有群成员数量上限,但不支持历史消息存储;适合与直播产品结合,用于弹幕聊天场景。详见":"创建后可以随意进出,没有群成员数量上限,但不支持历史消息存储;适合与直播产品结合,用于弹幕聊天场景。详见",产品文档:"产品文档",设置群名称:"设置群名称",请输入群名称:"请输入群名称",设置群ID:"设置群ID",请输入群ID:"请输入群ID",选择群类型:"选择群类型"},gG={群成员:"群成员",加入群组:"加入群组",退出群组:"退出群组",被:"被",踢出群组:"移除出群组",成为管理员:"成为管理员",被撤销管理员:"被撤销管理员",被禁言:"被禁言",被取消禁言:"被取消禁言",群提示消息:"群提示消息",管理员:"管理员",开启学生禁言:"开启学生禁言",取消学生禁言:"取消学生禁言",成为新的群主:"成为新的群主",修改群名为:"修改群名为",发布新公告:"发布新公告",申请加入群组:"申请加入群组",成功加入群组:"成功加入群组",被拒绝:"被拒绝",你被管理员:"你被管理员",群:"群",解散:"解散",创建群:"创建群",邀请你加群:"邀请你加群",你退出群组:"你退出群组",你被:"你被",设置为群:"设置为群",的管理员:"的管理员",撤销群:"撤销群",的管理员身份:"的管理员身份",同意加群:"同意加群",拒接加群:"拒接加群",自定义群系统通知:"自定义群系统通知"},mG={自定义消息:"自定义消息",通话时长:"通话时长",结束群聊:"结束群聊",切换语音通话:"切换语音通话",切换视频通话:"切换视频通话",发起通话:"发起通话",取消通话:"取消通话",已接听:"已接听",拒绝通话:"拒绝通话",无应答:"无应答",对本次服务评价:"对本次服务评价","查看详情>>":"查看详情>>"},vG={tip:gG,custom:mG},yG={取消:"取消",完成:"完成",已选中:"已选中",人:"人",保存:"保存",请输入userID:"请输入userID",确定:"确定",全选:"全选",已在群聊中:"已在群聊中"},_G={周:"周",天:"天",小时:"小时",分钟:"分钟",刚刚:"刚刚",前:"前",昨天:"昨天",星期一:"星期一",星期二:"星期二",星期三:"星期三",星期四:"星期四",星期五:"星期五",星期六:"星期六",星期日:"星期日"},bG={"常用语-快捷回复工具":"常用语-快捷回复工具","在吗?在吗?在吗?重要的话说三遍。":"在吗?在吗?在吗?重要的话说三遍。","好久没聊天了,快来和我说说话~":"好久没聊天了,快来和我说说话~","好的,就这么说定了。":"好的,就这么说定了。","感恩的心,感谢有你。":"感恩的心,感谢有你。","糟糕!是心动的感觉!":"糟糕!是心动的感觉!","心疼地抱抱自己,我太难了!":"心疼地抱抱自己,我太难了!","没关系,别在意,事情过去就过去了。":"没关系,别在意,事情过去就过去了。","早上好,今天也是让人期待的一天呢!":"早上好,今天也是让人期待的一天呢!","熬夜有什么用,又没人陪你聊天,早点休息吧。":"熬夜有什么用,又没人陪你聊天,早点休息吧。"},MG={请对本次服务进行评价:"请对本次服务进行评价",提交评价:"提交评价",服务评价工具:"服务评价工具",使用:"使用",自定义消息:"自定义消息",搭建:"搭建",星:"星"},IG={zh_cn:{取消:"取消",发送:"发送",系统通知:"系统通知",关闭:"关闭",确定:"确定",TUIChat:uG,TUIConversation:cG,TUIGroup:dG,TUIProfile:fG,TUIContact:pG,message:vG,component:yG,time:_G,Evaluate:MG,Words:bG,TUISearch:hG}},CG={...aG,...IG},el=class el{constructor(t){Xt(this,"messages",{en:{},zh_cn:{}});Xt(this,"i18n");this.messages=t}static getInstance(){return el.instance||(el.instance=new el(CG)),el.instance}provideMessage(t){return this.messages.en={...this.messages.en,...t.en},this.messages.zh_cn={...this.messages.zh_cn,...t.zh_cn},this.messages}useI18n(){return Vy()}static install(t){const n=el.getInstance();n.i18n=x$({legacy:!1,globalInjection:!0,global:!0,locale:"zh_cn",fallbackLocale:"zh_cn",messages:n.messages}),t.use(n.i18n)}static plugin(t){t.config.i18n=el.getInstance()}};Xt(el,"instance");let xM=el;const Yh=function(){const e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),o=/(?:Firefox)/.test(e),i=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||o&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!i;return{isTablet:i,isPhone:s,isAndroid:r,isPC:!s&&!r&&!n,isH5:s||r||i}},TG=[{name:"TUILongPress",callback:(e,t,n)=>{if(typeof t.value!="function"){const u=n.context.name;let d=`[longpress:] provided expression '${t.expression}' is not afunction, but has to be `;u&&(d+=`Found in component '${u}' `),console.warn(d)}let r=null;const o=u=>{u.type==="click"&&u.button!==0||r===null&&(r=setTimeout(()=>{s(u)},1e3))},i=u=>{r!==null&&(clearTimeout(r),r=null)},s=u=>{t.value(u)};e.addEventListener("mousedown",o,!1),e.addEventListener("touchstart",o,!1),e.addEventListener("click",i),e.addEventListener("mouseout",i),e.addEventListener("touchend",i),e.addEventListener("touchcancel",i)}}],wG=e=>{TG.map(t=>{e.directive(t.name,{beforeMount:t.callback})})};function SG(e){const t=e;let n,r,o,i;return t>=3600?(r=parseInt(`${t/3600}`,10)<10?`0${parseInt(`${t/3600}`,10)}`:parseInt(`${t/3600}`,10),o=parseInt(`${t%60/60}`,10)<10?`0${parseInt(`${t%60/60}`,10)}`:parseInt(`${t%60/60}`,10),i=t%3600<10?`0${t%3600}`:t%3600,i>60&&(o=parseInt(`${i/60}`,10)<10?`0${parseInt(`${i/60}`,10)}`:parseInt(`${i/60}`,10),i=i%60<10?`0${i%60}`:i%60),n=`${r}:${o}:${i}`):t>=60&&t<3600?(o=parseInt(`${t/60}`,10)<10?`0${parseInt(`${t/60}`,10)}`:parseInt(`${t/60}`,10),i=t%60<10?`0${t%60}`:t%60,n=`00:${o}:${i}`):t<60&&(i=t<10?`0${t}`:t,n=`00:00:${i}`),n}const fh="https://web.sdk.qcloud.com/im/assets/emoji/",df={"[NO]":"emoji_0@2x.png","[OK]":"emoji_1@2x.png","[下雨]":"emoji_2@2x.png","[么么哒]":"emoji_3@2x.png","[乒乓]":"emoji_4@2x.png","[便便]":"emoji_5@2x.png","[信封]":"emoji_6@2x.png","[偷笑]":"emoji_7@2x.png","[傲慢]":"emoji_8@2x.png","[再见]":"emoji_9@2x.png","[冷汗]":"emoji_10@2x.png","[凋谢]":"emoji_11@2x.png","[刀]":"emoji_12@2x.png","[删除]":"emoji_13@2x.png","[勾引]":"emoji_14@2x.png","[发呆]":"emoji_15@2x.png","[发抖]":"emoji_16@2x.png","[可怜]":"emoji_17@2x.png","[可爱]":"emoji_18@2x.png","[右哼哼]":"emoji_19@2x.png","[右太极]":"emoji_20@2x.png","[右车头]":"emoji_21@2x.png","[吐]":"emoji_22@2x.png","[吓]":"emoji_23@2x.png","[咒骂]":"emoji_24@2x.png","[咖啡]":"emoji_25@2x.png","[啤酒]":"emoji_26@2x.png","[嘘]":"emoji_27@2x.png","[回头]":"emoji_28@2x.png","[困]":"emoji_29@2x.png","[坏笑]":"emoji_30@2x.png","[多云]":"emoji_31@2x.png","[大兵]":"emoji_32@2x.png","[大哭]":"emoji_33@2x.png","[太阳]":"emoji_34@2x.png","[奋斗]":"emoji_35@2x.png","[奶瓶]":"emoji_36@2x.png","[委屈]":"emoji_37@2x.png","[害羞]":"emoji_38@2x.png","[尴尬]":"emoji_39@2x.png","[左哼哼]":"emoji_40@2x.png","[左太极]":"emoji_41@2x.png","[左车头]":"emoji_42@2x.png","[差劲]":"emoji_43@2x.png","[弱]":"emoji_44@2x.png","[强]":"emoji_45@2x.png","[彩带]":"emoji_46@2x.png","[彩球]":"emoji_47@2x.png","[得意]":"emoji_48@2x.png","[微笑]":"emoji_49@2x.png","[心碎了]":"emoji_50@2x.png","[快哭了]":"emoji_51@2x.png","[怄火]":"emoji_52@2x.png","[怒]":"emoji_53@2x.png","[惊恐]":"emoji_54@2x.png","[惊讶]":"emoji_55@2x.png","[憨笑]":"emoji_56@2x.png","[手枪]":"emoji_57@2x.png","[打哈欠]":"emoji_58@2x.png","[抓狂]":"emoji_59@2x.png","[折磨]":"emoji_60@2x.png","[抠鼻]":"emoji_61@2x.png","[抱抱]":"emoji_62@2x.png","[抱拳]":"emoji_63@2x.png","[拳头]":"emoji_64@2x.png","[挥手]":"emoji_65@2x.png","[握手]":"emoji_66@2x.png","[撇嘴]":"emoji_67@2x.png","[擦汗]":"emoji_68@2x.png","[敲打]":"emoji_69@2x.png","[晕]":"emoji_70@2x.png","[月亮]":"emoji_71@2x.png","[棒棒糖]":"emoji_72@2x.png","[汽车]":"emoji_73@2x.png","[沙发]":"emoji_74@2x.png","[流汗]":"emoji_75@2x.png","[流泪]":"emoji_76@2x.png","[激动]":"emoji_77@2x.png","[灯泡]":"emoji_78@2x.png","[炸弹]":"emoji_79@2x.png","[熊猫]":"emoji_80@2x.png","[爆筋]":"emoji_81@2x.png","[爱你]":"emoji_82@2x.png","[爱心]":"emoji_83@2x.png","[爱情]":"emoji_84@2x.png","[猪头]":"emoji_85@2x.png","[猫咪]":"emoji_86@2x.png","[献吻]":"emoji_87@2x.png","[玫瑰]":"emoji_88@2x.png","[瓢虫]":"emoji_89@2x.png","[疑问]":"emoji_90@2x.png","[白眼]":"emoji_91@2x.png","[皮球]":"emoji_92@2x.png","[睡觉]":"emoji_93@2x.png","[磕头]":"emoji_94@2x.png","[示爱]":"emoji_95@2x.png","[礼品袋]":"emoji_96@2x.png","[礼物]":"emoji_97@2x.png","[篮球]":"emoji_98@2x.png","[米饭]":"emoji_99@2x.png","[糗大了]":"emoji_100@2x.png","[红双喜]":"emoji_101@2x.png","[红灯笼]":"emoji_102@2x.png","[纸巾]":"emoji_103@2x.png","[胜利]":"emoji_104@2x.png","[色]":"emoji_105@2x.png","[药]":"emoji_106@2x.png","[菜刀]":"emoji_107@2x.png","[蛋糕]":"emoji_108@2x.png","[蜡烛]":"emoji_109@2x.png","[街舞]":"emoji_110@2x.png","[衰]":"emoji_111@2x.png","[西瓜]":"emoji_112@2x.png","[调皮]":"emoji_113@2x.png","[象棋]":"emoji_114@2x.png","[跳绳]":"emoji_115@2x.png","[跳跳]":"emoji_116@2x.png","[车厢]":"emoji_117@2x.png","[转圈]":"emoji_118@2x.png","[鄙视]":"emoji_119@2x.png","[酷]":"emoji_120@2x.png","[钞票]":"emoji_121@2x.png","[钻戒]":"emoji_122@2x.png","[闪电]":"emoji_123@2x.png","[闭嘴]":"emoji_124@2x.png","[闹钟]":"emoji_125@2x.png","[阴险]":"emoji_126@2x.png","[难过]":"emoji_127@2x.png","[雨伞]":"emoji_128@2x.png","[青蛙]":"emoji_129@2x.png","[面条]":"emoji_130@2x.png","[鞭炮]":"emoji_131@2x.png","[风车]":"emoji_132@2x.png","[飞吻]":"emoji_133@2x.png","[飞机]":"emoji_134@2x.png","[饥饿]":"emoji_135@2x.png","[香蕉]":"emoji_136@2x.png","[骷髅]":"emoji_137@2x.png","[麦克风]":"emoji_138@2x.png","[麻将]":"emoji_139@2x.png","[鼓掌]":"emoji_140@2x.png","[龇牙]":"emoji_141@2x.png"},OO=["[龇牙]","[调皮]","[流汗]","[偷笑]","[再见]","[敲打]","[擦汗]","[猪头]","[玫瑰]","[流泪]","[大哭]","[嘘]","[酷]","[抓狂]","[委屈]","[便便]","[炸弹]","[菜刀]","[可爱]","[色]","[害羞]","[得意]","[吐]","[微笑]","[怒]","[尴尬]","[惊恐]","[冷汗]","[爱心]","[示爱]","[白眼]","[傲慢]","[难过]","[惊讶]","[疑问]","[困]","[么么哒]","[憨笑]","[爱情]","[衰]","[撇嘴]","[阴险]","[奋斗]","[发呆]","[右哼哼]","[抱抱]","[坏笑]","[飞吻]","[鄙视]","[晕]","[大兵]","[可怜]","[强]","[弱]","[握手]","[胜利]","[抱拳]","[凋谢]","[米饭]","[蛋糕]","[西瓜]","[啤酒]","[瓢虫]","[勾引]","[OK]","[爱你]","[咖啡]","[月亮]","[刀]","[发抖]","[差劲]","[拳头]","[心碎了]","[太阳]","[礼物]","[皮球]","[骷髅]","[挥手]","[闪电]","[饥饿]","[咒骂]","[折磨]","[抠鼻]","[鼓掌]","[糗大了]","[左哼哼]","[打哈欠]","[快哭了]","[吓]","[篮球]","[乒乓]","[NO]","[跳跳]","[怄火]","[转圈]","[磕头]","[回头]","[跳绳]","[激动]","[街舞]","[献吻]","[左太极]","[右太极]","[闭嘴]","[猫咪]","[红双喜]","[鞭炮]","[红灯笼]","[麻将]","[麦克风]","[礼品袋]","[信封]","[象棋]","[彩带]","[蜡烛]","[爆筋]","[棒棒糖]","[奶瓶]","[面条]","[香蕉]","[飞机]","[左车头]","[车厢]","[右车头]","[多云]","[下雨]","[钞票]","[熊猫]","[灯泡]","[风车]","[闹钟]","[雨伞]","[彩球]","[钻戒]","[沙发]","[纸巾]","[手枪]","[青蛙]"],kG="https://web.sdk.qcloud.com/im/assets/face-elem/",DG=[{icon:1,list:["yz00","yz01","yz02","yz03","yz04","yz05","yz06","yz07","yz08","yz09","yz10","yz11","yz12","yz13","yz14","yz15","yz16","yz17"]},{icon:2,list:["ys00","ys01","ys02","ys03","ys04","ys05","ys06","ys07","ys08","ys09","ys10","ys11","ys12","ys13","ys14","ys15"]},{icon:3,list:["gcs00","gcs01","gcs02","gcs03","gcs04","gcs05","gcs06","gcs07","gcs08","gcs09","gcs10","gcs11","gcs12","gcs13","gcs14","gcs15","gcs16"]}];function RO(e){const t=[];let n=e.text,r=-1,o=-1;for(;n!=="";)switch(r=n.indexOf("["),o=n.indexOf("]"),r){case 0:if(o===-1)t.push({name:"text",text:n}),n="";else{const i=n.slice(0,o+1);df[i]?(t.push({name:"img",src:fh+df[i]}),n=n.substring(o+1)):(t.push({name:"text",text:"["}),n=n.slice(1))}break;case-1:t.push({name:"text",text:n}),n="";break;default:t.push({name:"text",text:n.slice(0,r)}),n=n.substring(r);break}return t}var mi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function EG(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var NO={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(mi,function(){function n(D,l){var p=Object.keys(D);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(D);l&&(a=a.filter(function(c){return Object.getOwnPropertyDescriptor(D,c).enumerable})),p.push.apply(p,a)}return p}function r(D){for(var l=1;l"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M(D,l,p){return(M=_()?Reflect.construct.bind():function(a,c,h){var m=[null];m.push.apply(m,c);var y=new(Function.bind.apply(a,m));return h&&v(y,h.prototype),y}).apply(null,arguments)}function I(D){var l=typeof Map=="function"?new Map:void 0;return(I=function(p){if(p===null||(a=p,Function.toString.call(a).indexOf("[native code]")===-1))return p;var a;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(l!==void 0){if(l.has(p))return l.get(p);l.set(p,c)}function c(){return M(p,arguments,g(this).constructor)}return c.prototype=Object.create(p.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v(c,p)})(D)}function k(D,l){if(D==null)return{};var p,a,c=function(m,y){if(m==null)return{};var b,C,E={},N=Object.keys(m);for(C=0;C=0||(E[b]=m[b]);return E}(D,l);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(D);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(D,p)&&(c[p]=D[p])}return c}function w(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function S(D,l){if(l&&(typeof l=="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return w(D)}function L(D){var l=_();return function(){var p,a=g(D);if(l){var c=g(this).constructor;p=Reflect.construct(a,arguments,c)}else p=a.apply(this,arguments);return S(this,p)}}function A(D,l){return H(D)||function(p,a){var c=p==null?null:typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(c!=null){var h,m,y=[],b=!0,C=!1;try{for(c=c.call(p);!(b=(h=c.next()).done)&&(y.push(h.value),!a||y.length!==a);b=!0);}catch(E){C=!0,m=E}finally{try{b||c.return==null||c.return()}finally{if(C)throw m}}return y}}(D,l)||P(D,l)||j()}function O(D){return function(l){if(Array.isArray(l))return B(l)}(D)||q(D)||P(D)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function H(D){if(Array.isArray(D))return D}function q(D){if(typeof Symbol<"u"&&D[Symbol.iterator]!=null||D["@@iterator"]!=null)return Array.from(D)}function P(D,l){if(D){if(typeof D=="string")return B(D,l);var p=Object.prototype.toString.call(D).slice(8,-1);return p==="Object"&&D.constructor&&(p=D.constructor.name),p==="Map"||p==="Set"?Array.from(D):p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p)?B(D,l):void 0}}function B(D,l){(l==null||l>D.length)&&(l=D.length);for(var p=0,a=new Array(l);p=D.length?{done:!0}:{done:!1,value:D[a++]}},e:function(b){throw b},f:c}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h,m=!0,y=!1;return{s:function(){p=p.call(D)},n:function(){var b=p.next();return m=b.done,b},e:function(b){y=!0,h=b},f:function(){try{m||p.return==null||p.return()}finally{if(y)throw h}}}}var R={SDK_READY:"sdkStateReady",SDK_NOT_READY:"sdkStateNotReady",SDK_DESTROY:"sdkDestroy",MESSAGE_RECEIVED:"onMessageReceived",MESSAGE_MODIFIED:"onMessageModified",MESSAGE_REVOKED:"onMessageRevoked",MESSAGE_READ_BY_PEER:"onMessageReadByPeer",MESSAGE_READ_RECEIPT_RECEIVED:"onMessageReadReceiptReceived",MESSAGE_EXTENSIONS_UPDATED:"onMessageExtensionsUpdated",MESSAGE_EXTENSIONS_DELETED:"onMessageExtensionsDeleted",CONVERSATION_LIST_UPDATED:"onConversationListUpdated",TOTAL_UNREAD_MESSAGE_COUNT_UPDATED:"onTotalUnreadMessageCountUpdated",CONVERSATION_GROUP_LIST_UPDATED:"onConversationGroupListUpdated",CONVERSATION_IN_GROUP_UPDATED:"onConversationInGroupUpdated",GROUP_LIST_UPDATED:"onGroupListUpdated",GROUP_ATTRIBUTES_UPDATED:"groupAttributesUpdated",GROUP_COUNTER_UPDATED:"onGroupCounterUpdated",TOPIC_CREATED:"onTopicCreated",TOPIC_DELETED:"onTopicDeleted",TOPIC_UPDATED:"onTopicUpdated",PROFILE_UPDATED:"onProfileUpdated",USER_STATUS_UPDATED:"onUserStatusUpdated",BLACKLIST_UPDATED:"blacklistUpdated",FRIEND_LIST_UPDATED:"onFriendListUpdated",FRIEND_GROUP_LIST_UPDATED:"onFriendGroupListUpdated",FRIEND_APPLICATION_LIST_UPDATED:"onFriendApplicationListUpdated",KICKED_OUT:"kickedOut",ERROR:"error",NET_STATE_CHANGE:"netStateChange"},T={MSG_TEXT:"TIMTextElem",MSG_IMAGE:"TIMImageElem",MSG_SOUND:"TIMSoundElem",MSG_AUDIO:"TIMSoundElem",MSG_FILE:"TIMFileElem",MSG_FACE:"TIMFaceElem",MSG_VIDEO:"TIMVideoFileElem",MSG_GEO:"TIMLocationElem",MSG_LOCATION:"TIMLocationElem",MSG_GRP_TIP:"TIMGroupTipElem",MSG_GRP_SYS_NOTICE:"TIMGroupSystemNoticeElem",MSG_CUSTOM:"TIMCustomElem",MSG_MERGER:"TIMRelayElem",MSG_PRIORITY_HIGH:"High",MSG_PRIORITY_NORMAL:"Normal",MSG_PRIORITY_LOW:"Low",MSG_PRIORITY_LOWEST:"Lowest",CONV_C2C:"C2C",CONV_GROUP:"GROUP",CONV_TOPIC:"TOPIC",CONV_SYSTEM:"@TIM#SYSTEM",CONV_AT_ME:1,CONV_AT_ALL:2,CONV_AT_ALL_AT_ME:3,CONV_MARK_TYPE_STAR:1,CONV_MARK_TYPE_UNREAD:2,CONV_MARK_TYPE_FOLD:4,CONV_MARK_TYPE_HIDE:8,GRP_PRIVATE:"Private",GRP_WORK:"Private",GRP_PUBLIC:"Public",GRP_CHATROOM:"ChatRoom",GRP_MEETING:"ChatRoom",GRP_AVCHATROOM:"AVChatRoom",GRP_COMMUNITY:"Community",GRP_MBR_ROLE_OWNER:"Owner",GRP_MBR_ROLE_ADMIN:"Admin",GRP_MBR_ROLE_MEMBER:"Member",GRP_MBR_ROLE_CUSTOM:"Custom",GRP_TIP_MBR_JOIN:1,GRP_TIP_MBR_QUIT:2,GRP_TIP_MBR_KICKED_OUT:3,GRP_TIP_MBR_SET_ADMIN:4,GRP_TIP_MBR_CANCELED_ADMIN:5,GRP_TIP_GRP_PROFILE_UPDATED:6,GRP_TIP_MBR_PROFILE_UPDATED:7,GRP_TIP_BAN_AVCHATROOM_MEMBER:10,GRP_TIP_UNBAN_AVCHATROOM_MEMBER:11,MSG_REMIND_ACPT_AND_NOTE:"AcceptAndNotify",MSG_REMIND_ACPT_NOT_NOTE:"AcceptNotNotify",MSG_REMIND_DISCARD:"Discard",GENDER_UNKNOWN:"Gender_Type_Unknown",GENDER_FEMALE:"Gender_Type_Female",GENDER_MALE:"Gender_Type_Male",KICKED_OUT_MULT_ACCOUNT:"multipleAccount",KICKED_OUT_MULT_DEVICE:"multipleDevice",KICKED_OUT_USERSIG_EXPIRED:"userSigExpired",KICKED_OUT_REST_API:"REST_API_Kick",ALLOW_TYPE_ALLOW_ANY:"AllowType_Type_AllowAny",ALLOW_TYPE_NEED_CONFIRM:"AllowType_Type_NeedConfirm",ALLOW_TYPE_DENY_ANY:"AllowType_Type_DenyAny",FORBID_TYPE_NONE:"AdminForbid_Type_None",FORBID_TYPE_SEND_OUT:"AdminForbid_Type_SendOut",JOIN_OPTIONS_FREE_ACCESS:"FreeAccess",JOIN_OPTIONS_NEED_PERMISSION:"NeedPermission",JOIN_OPTIONS_DISABLE_APPLY:"DisableApply",JOIN_STATUS_SUCCESS:"JoinedSuccess",JOIN_STATUS_ALREADY_IN_GROUP:"AlreadyInGroup",JOIN_STATUS_WAIT_APPROVAL:"WaitAdminApproval",INVITE_OPTIONS_DISABLE_INVITE:"DisableInvite",INVITE_OPTIONS_NEED_PERMISSION:"NeedPermission",INVITE_OPTIONS_FREE_ACCESS:"FreeAccess",GRP_PROFILE_OWNER_ID:"ownerID",GRP_PROFILE_CREATE_TIME:"createTime",GRP_PROFILE_LAST_INFO_TIME:"lastInfoTime",GRP_PROFILE_MEMBER_NUM:"memberNum",GRP_PROFILE_MAX_MEMBER_NUM:"maxMemberNum",GRP_PROFILE_JOIN_OPTION:"joinOption",GRP_PROFILE_INVITE_OPTION:"inviteOption",GRP_PROFILE_INTRODUCTION:"introduction",GRP_PROFILE_NOTIFICATION:"notification",GRP_PROFILE_MUTE_ALL_MBRS:"muteAllMembers",SNS_ADD_TYPE_SINGLE:"Add_Type_Single",SNS_ADD_TYPE_BOTH:"Add_Type_Both",SNS_DELETE_TYPE_SINGLE:"Delete_Type_Single",SNS_DELETE_TYPE_BOTH:"Delete_Type_Both",SNS_APPLICATION_TYPE_BOTH:"Pendency_Type_Both",SNS_APPLICATION_SENT_TO_ME:"Pendency_Type_ComeIn",SNS_APPLICATION_SENT_BY_ME:"Pendency_Type_SendOut",SNS_APPLICATION_AGREE:"Response_Action_Agree",SNS_APPLICATION_AGREE_AND_ADD:"Response_Action_AgreeAndAdd",SNS_CHECK_TYPE_BOTH:"CheckResult_Type_Both",SNS_CHECK_TYPE_SINGLE:"CheckResult_Type_Single",SNS_TYPE_NO_RELATION:"CheckResult_Type_NoRelation",SNS_TYPE_A_WITH_B:"CheckResult_Type_AWithB",SNS_TYPE_B_WITH_A:"CheckResult_Type_BWithA",SNS_TYPE_BOTH_WAY:"CheckResult_Type_BothWay",NET_STATE_CONNECTED:"connected",NET_STATE_CONNECTING:"connecting",NET_STATE_DISCONNECTED:"disconnected",MSG_AT_ALL:"__kImSDK_MesssageAtALL__",READ_ALL_C2C_MSG:"readAllC2CMessage",READ_ALL_GROUP_MSG:"readAllGroupMessage",READ_ALL_MSG:"readAllMessage",USER_STATUS_UNKNOWN:0,USER_STATUS_ONLINE:1,USER_STATUS_OFFLINE:2,USER_STATUS_UNLOGINED:3},x={NEW_INVITATION_RECEIVED:"newInvitationReceived",INVITEE_ACCEPTED:"ts_invitee_accepted",INVITEE_REJECTED:"ts_invitee_rejected",INVITATION_CANCELLED:"ts_invitation_cancelled",INVITATION_TIMEOUT:"ts_invitation_timeout",INVITATION_MODIFIED:"ts_invitation_modified",ACTION_TYPE_UNKNOWN:0,ACTION_TYPE_INVITE:1,ACTION_TYPE_CANCEL_INVITE:2,ACTION_TYPE_ACCEPT_INVITE:3,ACTION_TYPE_REJECT_INVITE:4,ACTION_TYPE_INVITE_TIMEOUT:5},Z=function(){function D(){i(this,D),this.cache=[],this.options=null}return u(D,[{key:"use",value:function(l){if(typeof l!="function")throw"middleware must be a function";return this.cache.push(l),this}},{key:"next",value:function(l){if(this.middlewares&&this.middlewares.length>0)return this.middlewares.shift().call(this,this.options,this.next.bind(this))}},{key:"run",value:function(l){return this.middlewares=this.cache.map(function(p){return p}),this.options=l,this.next()}}]),D}(),K=function(){function D(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;i(this,D),this.high=l,this.low=p}return u(D,[{key:"equal",value:function(l){return l!==null&&this.low===l.low&&this.high===l.high}},{key:"toString",value:function(){var l=Number(this.high).toString(16),p=Number(this.low).toString(16);if(p.length<8)for(var a=8-p.length;a;)p="0"+p,a--;return l+p}}]),D}(),re={TEST:{CHINA:{DEFAULT:"wss://wss-dev.tim.qq.com"},OVERSEA:{DEFAULT:"wss://wss-dev.tim.qq.com"},SINGAPORE:{DEFAULT:"wss://wsssgp-dev.im.qcloud.com"},KOREA:{DEFAULT:"wss://wsskr-dev.im.qcloud.com"},GERMANY:{DEFAULT:"wss://wssger-dev.im.qcloud.com"},IND:{DEFAULT:"wss://wssind-dev.im.qcloud.com"},JPN:{DEFAULT:"wss://wssjpn-dev.im.qcloud.com"},USA:{DEFAULT:"wss://wssusa-dev.im.qcloud.com"}},PRODUCTION:{CHINA:{DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.tim.qq.com",STAT:"https://events.im.qcloud.com",ANYCAST:"wss://162.14.13.203"},OVERSEA:{DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.my-imcloud.com",STAT:"https://api.my-imcloud.com"},SINGAPORE:{DEFAULT:"wss://wsssgp.im.qcloud.com",BACKUP:"wss://wsssgp.my-imcloud.com",STAT:"https://apisgp.my-imcloud.com"},KOREA:{DEFAULT:"wss://wsskr.im.qcloud.com",BACKUP:"wss://wsskr.my-imcloud.com",STAT:"https://apikr.my-imcloud.com"},GERMANY:{DEFAULT:"wss://wssger.im.qcloud.com",BACKUP:"wss://wssger.my-imcloud.com",STAT:"https://apiger.my-imcloud.com"},IND:{DEFAULT:"wss://wssind.my-imcloud.com",BACKUP:"wss://wssind.im.qcloud.com",STAT:"https://apiind.my-imcloud.com"},JPN:{DEFAULT:"wss://wssjpn.im.qcloud.com",BACKUP:"wss://wssjpn.my-imcloud.com",STAT:"https://apijpn.my-imcloud.com"},USA:{DEFAULT:"wss://wssusa.im.qcloud.com",BACKUP:"wss://wssusa.my-imcloud.com",STAT:"https://apiusa.my-imcloud.com"}}},X={ANDROID:2,IOS:3,MAC:4,WEB:7,WX_MP:8,QQ_MP:9,TT_MP:10,BAIDU_MP:11,ALI_MP:12,IPAD:13,UNI_NATIVE_APP:15},ie="1.7.3",he=537048168,ae="CHINA",de="OVERSEA",Y="SINGAPORE",te="KOREA",fe="GERMANY",Re="IND",ve="JPN",be="USA",ue={HOST:{CURRENT:{DEFAULT:"wss://wss.im.qcloud.com",STAT:"https://events.im.qcloud.com"},setCurrent:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ae;this.CURRENT=re.PRODUCTION[D]}},NAME:{OPEN_IM:"openim",OPEN_IM_MSG_EXT:"openim_msg_ext_http_svc",GROUP:"group_open_http_svc",GROUP_AVCHATROOM:"group_open_avchatroom_http_svc",GROUP_COMMUNITY:"million_group_open_http_svc",GROUP_ATTR:"group_open_attr_http_svc",FRIEND:"sns",PROFILE:"profile",RECENT_CONTACT:"recentcontact",PIC:"openpic",BIG_GROUP_NO_AUTH:"group_open_http_noauth_svc",BIG_GROUP_LONG_POLLING:"group_open_long_polling_http_svc",BIG_GROUP_LONG_POLLING_NO_AUTH:"group_open_long_polling_http_noauth_svc",IM_OPEN_STAT:"imopenstat",WEB_IM:"webim",IM_COS_SIGN:"im_cos_sign_svr",CUSTOM_UPLOAD:"im_cos_msg",HEARTBEAT:"heartbeat",IM_OPEN_PUSH:"im_open_push",IM_OPEN_STATUS:"im_open_status",IM_LONG_MESSAGE:"im_long_msg",IM_CONFIG_MANAGER:"im_sdk_config_mgr",STAT_SERVICE:"StatSvc",OVERLOAD_PUSH:"OverLoadPush",IM_MSG_AUDIT_MGR:"im_msg_audit_mgr",TUIROOM_SVR:"tui_room_svr",IM_OPEN_TRANSLATE:"im_open_translate",MESSAGE_SEARCH:"message_search"},CHANNEL:{SOCKET:1,XHR:2,AUTO:0},NAME_VERSION:{openim:"v4",group_open_http_svc:"v4",sns:"v4",profile:"v4",recentcontact:"v4",openpic:"v4",group_open_http_noauth_svc:"v4",group_open_long_polling_http_svc:"v4",group_open_long_polling_http_noauth_svc:"v4",imopenstat:"v4",im_cos_sign_svr:"v4",im_cos_msg:"v4",webim:"v4",im_open_push:"v4",im_open_status:"v4"}},ce={SEARCH_MSG:new K(0,Math.pow(2,0)).toString(),SEARCH_GRP_SNS:new K(0,Math.pow(2,1)).toString(),AVCHATROOM_HISTORY_MSG:new K(0,Math.pow(2,2)).toString(),GRP_COMMUNITY:new K(0,Math.pow(2,3)).toString(),MSG_TO_SPECIFIED_GRP_MBR:new K(0,Math.pow(2,4)).toString(),AVCHATROOM_MBR_LIST:new K(0,Math.pow(2,6)).toString(),USER_STATUS:new K(0,Math.pow(2,7)).toString(),CONV_MARK:new K(0,Math.pow(2,9)).toString(),CONV_GROUP:new K(0,Math.pow(2,10)).toString(),AVCHATROOM_BAN_MBR:new K(0,Math.pow(2,11)).toString(),MSG_EXT:new K(0,Math.pow(2,13)).toString(),GRP_COUNTER:new K(0,Math.pow(2,15)).toString()},Ee="c2c_text_message",pe="c2c_custom_message",V="group_text_message",ee="group_custom_message",se="user_profile",Ce="sns",le="group_profile",ke="group_member_profile";ue.HOST.setCurrent(ae);var Pe=typeof wx<"u"&&typeof wx.getSystemInfoSync=="function"&&!!wx.getSystemInfoSync().fontSizeSetting,xe=typeof qq<"u"&&typeof qq.getSystemInfoSync=="function"&&!!qq.getSystemInfoSync().fontSizeSetting,He=typeof tt<"u"&&typeof tt.getSystemInfoSync=="function"&&!!tt.getSystemInfoSync().fontSizeSetting,Te=typeof swan<"u"&&typeof swan.getSystemInfoSync=="function"&&!!swan.getSystemInfoSync().fontSizeSetting,W=typeof my<"u"&&typeof my.getSystemInfoSync=="function"&&!!my.getSystemInfoSync().fontSizeSetting,ne=typeof jd<"u"&&typeof jd.getSystemInfoSync=="function",ye=typeof uni<"u"&&typeof window>"u"&&typeof uni.requireNativePlugin=="function",Be=typeof uni<"u",je=Pe||xe||He||Te||W||ye||ne,ct=(typeof uni<"u"||typeof window<"u")&&!je,Fe=xe?qq:He?tt:Te?swan:W?my:Pe?wx:ye?uni:ne?jd:{},at=ct&&window&&window.navigator&&window.navigator.userAgent||"",St=/(micromessenger|webbrowser)/i.test(at),vn=/AppleWebKit\/([\d.]+)/i.exec(at);vn&&parseFloat(vn.pop());var Cn,Tn,An=(Cn="WEB",St?Cn="WEB":xe?Cn="QQ_MP":He?Cn="TT_MP":Te?Cn="BAIDU_MP":W?Cn="ALI_MP":Pe?Cn="WX_MP":ye&&(Cn="UNI_NATIVE_APP"),X[Cn]),yn=/iPad/i.test(at),nt=/iPhone/i.test(at)&&!yn,bt=/iPod/i.test(at),Pt=nt||yn||bt,ln=(Tn=at.match(/OS (\d+)_/i))&&Tn[1]?Tn[1]:null,tn=/Android/i.test(at),wn=function(){var D=at.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!D)return null;var l=D[1]&&parseFloat(D[1]),p=D[2]&&parseFloat(D[2]);return l&&p?parseFloat(D[1]+"."+D[2]):l||null}();(function(){var D=at.match(/Chrome\/(\d+)/);D&&D[1]&&parseFloat(D[1])})();var Vn=/MSIE/.test(at)||at.indexOf("Trident")>-1&&at.indexOf("rv:11.0")>-1,ze=function(){var D=/MSIE\s(\d+)\.\d/.exec(at),l=D&&parseFloat(D[1]);return!l&&/Trident\/7.0/i.test(at)&&/rv:11.0/.test(at)&&(l=11),l}();(function(){var D=at.match(/TBS\/(\d+)/i);D&&D[1]&&D[1]})();var kt,Mt,qt=/Windows/i.test(at),Jt=/MAC OS X/i.test(at),Mr=ct&&typeof Worker<"u"&&!Vn,Sr=tn||Pt,Qo=ct&&window.tencent_cloud_im_csig_flutter_for_web_25F_cy!==void 0;kt=typeof console<"u"?console:typeof mi<"u"&&mi.console?mi.console:typeof window<"u"&&window.console?window.console:{};for(var go=function(){},Ge=["assert","clear","count","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],et=Ge.length;et--;)Mt=Ge[et],console[Mt]||(kt[Mt]=go);var Vt=kt,Sn=0,In=function(){return new Date().getTime()+Sn},xn=function(){Sn=0},Kr=function(){return Math.floor(In()/1e3)},Gr=0;function ro(){return qu()?"%c Chat %c":"Chat"}function ds(){var D,l=((D=new Date).setTime(In()),D);return l.toLocaleTimeString("en-US",{hour12:!1})+"."+function(p){var a;switch(p.toString().length){case 1:a="00"+p;break;case 2:a="0"+p;break;default:a=p}return a}(l.getMilliseconds())}var U={arguments2String:function(D){var l="";if(D.length===1)l=D[0];else for(var p=0,a=D.length;p=0?p[c]=l[c]:p[c]=D(l[c])):p[c]=void 0:p[c]=null;return p};function Uu(D,l){if(!st(D)||!st(l))return!1;var p=!1;return l.forEach(function(a){var c=a.key,h=a.value,m=D.find(function(y){return y.key===c});m?m.value!==h&&(m.value=h,p=!0):(D.push({key:c,value:h}),p=!0)}),p}var Ho=function(D){return D===T.GRP_AVCHATROOM},mo=function(D){var l=D.type,p=D.groupID;return l===T.GRP_COMMUNITY||"".concat(p).startsWith(bd)&&!"".concat(p).includes(oa)},oo=function(D){return"".concat(D).startsWith(bd)&&"".concat(D).includes(oa)},vo=function(D){return At(D)&&D.slice(0,3)===T.CONV_C2C},io=function(D){return At(D)&&D.slice(0,5)===T.CONV_GROUP},Sd=function(D){return At(D)&&D===T.CONV_SYSTEM};function Fu(D,l){var p={};return Object.keys(D).forEach(function(a){p[a]=l(D[a],a)}),p}function $u(D){return je?new Promise(function(l,p){Fe.getImageInfo({src:D,success:function(a){l({width:a.width,height:a.height})},fail:function(){l({width:0,height:0})}})}):Vn&&ze===9?Promise.resolve({width:0,height:0}):new Promise(function(l,p){var a=new Image;a.onload=function(){l({width:this.width,height:this.height}),a=null},a.onerror=function(){l({width:0,height:0}),a=null},a.src=D})}function Ga(){function D(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return"".concat(D()+D()).concat(D()).concat(D()).concat(D()).concat(D()).concat(D()).concat(D())}function xs(){var D="unknown";if(Jt&&(D="mac"),qt&&(D="windows"),Pt&&(D="ios"),tn&&(D="android"),je)try{var l=Fe.getSystemInfoSync().platform;l!==void 0&&(D=l)}catch{}return D}function Og(D,l){D=D.split("."),l=l.split(".");for(var p=Math.max(D.length,l.length);D.lengthh)return 1;if(c-1?"".concat(p,"&"):"".concat(p,"?");C.url="".concat(E,m===198?"imageView2/3/w/198/h/198":"imageView2/3/w/720/h/720")}return $e(p)?(C.url,k(C,up)):C}function Gu(D){var l=D[2];D[2]=D[1],D[1]=l;for(var p=0;p=0;a--)D[a]==="1"&&l.push(Math.pow(2,p-a-1));return l}function qu(){return!Vn&&!je}function Ba(D){return"the length of userIDList cannot exceed ".concat(D)}function Ui(D,l){if(D){var p=D;return l&&(D.startsWith("http://")?p=D.replace(/^http:\/\/[^/]+/,l):D.startsWith("https://")&&(p=D.replace(/^https:\/\/[^/]+/,l))),p}}function ms(D){if(st(D)&&D.length!==0){var l=0;return D.forEach(function(p){l+=p}),l.toFixed(0)}}function hp(D){if(st(D)&&D.length!==0){var l=0;return D.forEach(function(p){l+=p}),(l/D.length).toFixed(0)}}var w0=Object.prototype.hasOwnProperty;function Ye(D){if(D==null)return!0;if(typeof D=="boolean")return!1;if(typeof D=="number")return D===0;if(typeof D=="string"||typeof D=="function"||Array.isArray(D))return D.length===0;if(D instanceof Error)return D.message==="";if(_n(D)){for(var l in D)if(w0.call(D,l))return!1;return!0}return!(!Md(D)&&(p=D,Ps(p)!=="set")&&!Br(D))&&D.size===0;var p}function gp(D,l,p){if(l===void 0)return!0;var a=!0;if(_n(l))Object.keys(l).forEach(function(h){var m=D.length===1?D[0][h]:void 0;a=!!Ha(m,l[h],p,h)&&a});else if(st(l))for(var c=0;c256)||(Xe({api:"setConversationCustomData",param:"customData",desc:Nt("customData",256)}),!1):(Xe({api:"setConversationCustomData",param:"customData",desc:_i()}),!1)}}},markConversation:{conversationIDList:r({},Qn),markType:{type:"number",validator:function(D){return un(D)?D<=0?(Xe({api:"markConversation",param:"markType",desc:(l="markType",p=0,pn("NumberGreaterThanLog",l,p))}),!1):!(D>=Math.pow(2,64))||(Xe({api:"markConversation",param:"markType",desc:Un("markType","Math.pow(2,64)")}),!1):(Xe({api:"markConversation",param:"markType",desc:Vu()}),!1);var l,p}},enableMark:r({},Dd)},createConversationGroup:{conversationIDList:r({},Qn),groupName:r(r({},ut),{},{validator:function(D){return!!D&&(!(D.length>32)||(Xe({api:"createConversationGroup",param:"groupName",desc:Nt("groupName",32)}),!1))}})},deleteConversationGroup:[r({name:"groupName"},ut)],renameConversationGroup:{oldName:r({},ut),newName:r(r({},ut),{},{validator:function(D){return!!D&&(!(D.length>32)||(Xe({api:"renameConversationGroup",param:"newName",desc:Nt("newName",32)}),!1))}})},addConversationsToGroup:{conversationIDList:r({},Qn),groupName:r({},ut)},deleteConversationsFromGroup:{conversationIDList:r({},Qn),groupName:r({},ut)},getGroupList:{groupProfileFilter:{type:"Array"}},getGroupProfile:{groupID:ut,groupCustomFieldFilter:{type:"Array"},memberCustomFieldFilter:{type:"Array"}},getGroupProfileAdvance:{groupIDList:Qn},createGroup:{name:ut},joinGroup:{groupID:ut,type:{type:"String"},applyMessage:{type:"String"}},quitGroup:[r({name:"groupID"},ut)],handleApplication:{message:er,handleAction:ut,handleMessage:{type:"String"}},changeGroupOwner:{groupID:ut,newOwnerID:ut},updateGroupProfile:{groupID:ut,muteAllMembers:{type:"Boolean"}},dismissGroup:[r({name:"groupID"},ut)],searchGroupByID:[r({name:"groupID"},ut)],initGroupAttributes:{groupID:ut,groupAttributes:r(r({},er),{},{validator:function(D){var l=!0;return Object.keys(D).forEach(function(p){if(!At(D[p]))return Xe({api:"initGroupAttributes",param:"groupAttributes",desc:zn("value")}),l=!1}),l}})},setGroupAttributes:{groupID:ut,groupAttributes:r(r({},er),{},{validator:function(D){var l=!0;return Object.keys(D).forEach(function(p){if(!At(D[p]))return Xe({api:"setGroupAttributes",param:"groupAttributes",desc:zn("value")}),l=!1}),l}})},deleteGroupAttributes:{groupID:ut,keyList:{type:"Array",validator:function(D){if($e(D)||!st(D))return Xe({api:"deleteGroupAttributes",param:"keyList",desc:Ae()}),!1;if(!Ye(D)){var l=!0;return D.forEach(function(p){if(!At(p))return Xe({api:"deleteGroupAttributes",param:"keyList",desc:pn("StringArrayRequiredLog")}),l=!1}),l}return!0}}},getGroupAttributes:{groupID:ut,keyList:{type:"Array",validator:function(D){if($e(D)||!st(D))return Xe({api:"getGroupAttributes",param:"keyList",desc:Ae()}),!1;if(!Ye(D)){var l=!0;return D.forEach(function(p){if(!At(p))return Xe({api:"getGroupAttributes",param:"keyList",desc:zn("key")}),l=!1}),l}return!0}}},setGroupCounters:{groupID:ut,counters:er},increaseGroupCounter:{groupID:ut,key:ut,value:zu},decreaseGroupCounter:{groupID:ut,key:ut,value:zu},getGroupCounters:{groupID:ut},getGroupMemberList:{groupID:ut,count:{type:"Number"}},getGroupMemberProfile:{groupID:ut,userIDList:Qn,memberCustomFieldFilter:{type:"Array"}},addGroupMember:{groupID:ut,userIDList:Qn},setGroupMemberRole:{groupID:ut,userID:ut,role:ut},setGroupMemberMuteTime:{groupID:ut,userID:ut,muteTime:{type:"Number",validator:function(D){return D>=0}}},setGroupMemberNameCard:{groupID:ut,userID:{type:"String"},nameCard:{type:"String",validator:function(D){return At(D)?(D.length,!0):(Xe({api:"setGroupMemberNameCard",param:"nameCard",desc:_i()}),!1)}}},setGroupMemberCustomField:{groupID:ut,userID:{type:"String"},memberCustomField:Qn},deleteGroupMember:{groupID:ut},markGroupMemberList:{groupID:ut,markType:{type:"number",validator:function(D){return un(D)?!(D<1e3)||(Xe({api:"markGroupMemberList",param:"markType",desc:(l="markType",p=1e3,pn("NumberGreaterOrEqualLog",l,p))}),!1):(Xe({api:"markGroupMemberList",param:"markType",desc:Vu()}),!1);var l,p}},userIDList:r({},Qn),enableMark:r({},Dd)},createTextMessage:{to:ut,conversationType:ut,payload:r(r({},er),{},{validator:function(D){return _n(D)?At(D.text)?D.text.length!==0||(Xe({api:"createTextMessage",param:"payload.text",desc:Yr()}),!1):(Xe({api:"createTextMessage",param:"payload.text",desc:_i()}),!1):(Xe({api:"createTextMessage",param:"payload",desc:Ln()}),!1)}})},createTextAtMessage:{to:ut,conversationType:ut,payload:r(r({},er),{},{validator:function(D){return _n(D)?At(D.text)?D.text.length===0?(Xe({api:"createTextAtMessage",param:"payload.text",desc:Yr()}),!1):!(D.atUserList&&!st(D.atUserList))||(Xe({api:"createTextAtMessage",param:"payload.atUserList",desc:Ae()}),!1):(Xe({api:"createTextAtMessage",param:"payload.text",desc:_i()}),!1):(Xe({api:"createTextAtMessage",param:"payload",desc:Ln()}),!1)}})},createCustomMessage:{to:ut,conversationType:ut,payload:r(r({},er),{},{validator:function(D){return _n(D)?D.data&&!At(D.data)?(Xe({api:"createCustomMessage",param:"payload.data",desc:_i()}),!1):D.description&&!At(D.description)?(Xe({api:"createCustomMessage",param:"payload.description",desc:_i()}),!1):!(D.extension&&!At(D.extension))||(Xe({api:"createCustomMessage",param:"payload.extension",desc:_i()}),!1):(Xe({api:"createCustomMessage",param:"payload",desc:Ln()}),!1)}})},createImageMessage:{to:ut,conversationType:ut,payload:r(r({},er),{},{validator:function(D){if(!_n(D))return Xe({api:"createImageMessage",param:"payload",desc:Ln()}),!1;if($e(D.file))return Xe({api:"createImageMessage",param:"payload.file",desc:mp()}),!1;if(ct){if(!(D.file instanceof HTMLInputElement||Br(D.file)))return _n(D.file)&&typeof uni<"u"?D.file.tempFilePaths.length!==0&&D.file.tempFiles.length!==0||(Xe({api:"createImageMessage",param:"payload.file",desc:Hr()}),!1):(Xe({api:"createImageMessage",param:"payload.file",desc:vp()}),!1);if(D.file instanceof HTMLInputElement&&D.file.files.length===0)return Xe({api:"createImageMessage",param:"payload.file",desc:Hr()}),!1}return!0},onProgress:{type:"Function",required:!1,validator:function(D){return $e(D)&&Xe({api:"createImageMessage",param:"onProgress",desc:pt()}),!0}}})},createAudioMessage:{to:ut,conversationType:ut,payload:r(r({},er),{},{validator:function(D){return!!_n(D)||(Xe({api:"createAudioMessage",param:"payload",desc:Ln()}),!1)}}),onProgress:{type:"Function",required:!1,validator:function(D){return $e(D)&&Xe({api:"createAudioMessage",param:"onProgress",desc:pt()}),!0}}},createVideoMessage:{to:ut,conversationType:ut,payload:r(r({},er),{},{validator:function(D){if(!_n(D))return Xe({api:"createVideoMessage",param:"payload",desc:Ln()}),!1;if($e(D.file))return Xe({api:"createVideoMessage",param:"payload.file",desc:mp()}),!1;if(ct){if(!(D.file instanceof HTMLInputElement||Br(D.file)))return _n(D.file)&&typeof uni<"u"?!!Br(D.file.tempFile)||(Xe({api:"createVideoMessage",param:"payload.file",desc:Hr()}),!1):(Xe({api:"createVideoMessage",param:"payload.file",desc:vp()}),!1);if(D.file instanceof HTMLInputElement&&D.file.files.length===0)return Xe({api:"createVideoMessage",param:"payload.file",desc:Hr()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(D){return $e(D)&&Xe({api:"createVideoMessage",param:"onProgress",desc:pt()}),!0}}},createFaceMessage:{to:ut,conversationType:ut,payload:r(r({},er),{},{validator:function(D){return _n(D)?un(D.index)?!!At(D.data)||(Xe({api:"createFaceMessage",param:"payload.data",desc:_i()}),!1):(Xe({api:"createFaceMessage",param:"payload.index",desc:Vu()}),!1):(Xe({api:"createFaceMessage",param:"payload",desc:Ln()}),!1)}})},createFileMessage:{to:ut,conversationType:ut,payload:r(r({},er),{},{validator:function(D){if(!_n(D))return Xe({api:"createFileMessage",param:"payload",desc:Ln()}),!1;if($e(D.file))return Xe({api:"createFileMessage",param:"payload.file",desc:mp()}),!1;if(ct){if(!(D.file instanceof HTMLInputElement||Br(D.file)))return _n(D.file)&&typeof uni<"u"?D.file.tempFilePaths.length!==0&&D.file.tempFiles.length!==0||(Xe({api:"createFileMessage",param:"payload.file",desc:Hr()}),!1):(Xe({api:"createFileMessage",param:"payload.file",desc:vp()}),!1);if(D.file instanceof HTMLInputElement&&D.file.files.length===0)return Xe({api:"createFileMessage",param:"payload.file",desc:Hr()}),!1}return!0}}),onProgress:{type:"Function",required:!1,validator:function(D){return $e(D)&&Xe({api:"createFileMessage",param:"onProgress",desc:pt()}),!0}}},createLocationMessage:{to:ut,conversationType:ut,payload:r(r({},er),{},{validator:function(D){return _n(D)?At(D.description)?un(D.longitude)?!!un(D.latitude)||(Xe({api:"createLocationMessage",param:"payload.latitude",desc:Vu()}),!1):(Xe({api:"createLocationMessage",param:"payload.longitude",desc:Vu()}),!1):(Xe({api:"createLocationMessage",param:"payload.description",desc:_i()}),!1):(Xe({api:"createLocationMessage",param:"payload",desc:Ln()}),!1)}})},createMergerMessage:{to:ut,conversationType:ut,payload:r(r({},er),{},{validator:function(D){if(Ye(D.messageList))return Xe({api:"createMergerMessage",param:"payload.messageList",desc:Ke()}),!1;if(Ye(D.compatibleText))return Xe({api:"createMergerMessage",param:"payload.compatibleText",desc:Us("compatibleText")}),!1;var l=!1;return D.messageList.forEach(function(p){p.status===so.FAIL&&(l=!0)}),!l||(Xe({api:"createMergerMessage",param:"payload.messageList",desc:pn("MergeFailedMessageLog")}),!1)}})},revokeMessage:[r(r({name:"message"},er),{},{validator:function(D){return Ye(D)?(Xe({api:"revokeMessage",param:"message",desc:To()}),!1):D.conversationType===T.CONV_SYSTEM?(Xe({api:"revokeMessage",param:"message",desc:pn("MessageCanBeRevokedDesc")}),!1):D.isRevoked!==!0||(Xe({api:"revokeMessage",param:"message",desc:pn("MessageRevokedLog")}),!1)}})],deleteMessage:[r(r({name:"messageList"},Qn),{},{validator:function(D){return!Ye(D)||(Xe({api:"deleteMessage",param:"messageList",desc:Ke()}),!1)}})],translateText:{sourceTextList:Qn,sourceLanguage:ut,targetLanguage:ut},modifyMessage:[r(r({name:"message"},er),{},{validator:function(D){return Ye(D)?(Xe({api:"modifyMessage",param:"message",desc:To()}),!1):D.conversationType===T.CONV_SYSTEM?(Xe({api:"modifyMessage",param:"message",desc:pn("MessageCanBeModifiedLog")}),!1):D._onlineOnlyFlag!==!0||(Xe({api:"modifyMessage",param:"message",desc:pn("OnlineMessageNotSupportLog")}),!1)}})],searchCloudMessages:{keywordList:{type:"Array",required:!1,validator:function(D){return!D||(st(D)?D.length===0?(Xe({api:"searchCloudMessages",param:"keywordList",desc:Ke()}),!1):!(D.length>5)||(Xe({api:"searchCloudMessages",param:"keywordList",desc:bi("keywordList",5)}),!1):(Xe({api:"searchCloudMessages",param:"keywordList",desc:Ae()}),!1))}},keywordListMatchType:{type:"String",required:!1,validator:function(D){return!D||D==="or"||D==="and"||Xe({api:"searchCloudMessages",param:"keywordListMatchType",desc:"".concat(D," is invalid match type")})}},senderUserIDList:{type:"Array",required:!1,validator:function(D){return!D||(st(D)?(D.length===0&&Xe({api:"searchCloudMessages",param:"senderUserIDList",desc:Ke()}),!(D.length>5)||(Xe({api:"searchCloudMessages",param:"senderUserIDList",desc:bi("senderUserIDList",5)}),!1)):(Xe({api:"searchCloudMessages",param:"senderUserIDList",desc:Ae()}),!1))}},messageTypeList:{type:"Array",required:!1,validator:function(D){if(!D)return!0;if(!st(D))return Xe({api:"searchCloudMessages",param:"messageTypeList",desc:Ae()}),!1;D.length===0&&Xe({api:"searchCloudMessages",param:"messageTypeList",desc:Ke()});var l,p=[T.MSG_TEXT,T.MSG_IMAGE,T.MSG_AUDIO,T.MSG_FILE,T.MSG_VIDEO,T.MSG_LOCATION,T.MSG_CUSTOM,T.MSG_MERGER];return!(D.filter(function(a){return p.indexOf(a)===-1}).length>0)||(Xe({api:"searchCloudMessages",param:"messageTypeList",desc:(l="messageTypeList",pn("ContainsUnsupportedMessageTypeLog",l))}),!1)}},conversationID:{type:"String",required:!1,validator:function(D){return!D||sa(D)}},timePosition:{type:"number",required:!1},timePeriod:{type:"number",required:!1},count:{type:"number",required:!1,validator:function(D){return!D||(D>100&&Xe({api:"searchCloudMessages",param:"count",desc:(l="count",p=100,pn("MaximumNumberLog",l,p))}),!0);var l,p}},cursor:{type:"String",required:!1}},getUserProfile:{userIDList:{type:"Array",validator:function(D){return st(D)?(D.length===0&&Xe({api:"getUserProfile",param:"userIDList",desc:Ke()}),!0):(Xe({api:"getUserProfile",param:"userIDList",desc:Ae()}),!1)}}},updateMyProfile:{profileCustomField:{type:"Array",validator:function(D){return!!$e(D)||!!st(D)||(Xe({api:"updateMyProfile",param:"profileCustomField",desc:Ae()}),!1)}}},setSelfStatus:{customStatus:{type:"String",validator:function(D){return!!At(D)||(Xe({api:"setSelfStatus",param:"customStatus",desc:_i()}),!1)}}},getUserStatus:{userIDList:{type:"Array",validator:function(D){return st(D)?D.length!==0||(Xe({api:"getUserStatus",param:"userIDList",desc:Ke()}),!1):(Xe({api:"getUserStatus",param:"userIDList",desc:Ae()}),!1)}}},subscribeUserStatus:{userIDList:{type:"Array",validator:function(D){return st(D)?D.length!==0||(Xe({api:"subscribeUserStatus",param:"userIDList",desc:Ke()}),!1):(Xe({api:"subscribeUserStatus",param:"userIDList",desc:Ae()}),!1)}}},unsubscribeUserStatus:{userIDList:{type:"Array",validator:function(D){return!D||!!st(D)||(Xe({api:"subscribeUserStatus",param:"userIDList",desc:Ae()}),!1)}}},addFriend:{to:ut,source:{type:"String",required:!0,validator:function(D){return!!D&&(D.startsWith("AddSource_Type_")?!(D.replace("AddSource_Type_","").length>8)||(Xe({api:"addFriend",param:"source",desc:Nt("keyword",8)}),!1):(Xe({api:"addFriend",param:"source",desc:pn("SourcePrefixLog")}),!1))}},remark:{type:"String",required:!1,validator:function(D){return!(At(D)&&D.length>96)||(Xe({api:"addFriend",param:"remark",desc:Nt("remark",96)}),!1)}}},deleteFriend:{userIDList:Qn},checkFriend:{userIDList:Qn},getFriendProfile:{userIDList:Qn},updateFriend:{userID:ut,remark:{type:"String",required:!1,validator:function(D){return!(At(D)&&D.length>96)||(Xe({api:"updateFriend",param:"remark",desc:Nt("remark",96)}),!1)}},friendCustomField:{type:"Array",required:!1,validator:function(D){if(D){if(!st(D))return Xe({api:"updateFriend",param:"friendCustomField",desc:Ae()}),!1;var l=!0;return D.forEach(function(p){return At(p.key)&&p.key.indexOf("Tag_SNS_Custom")!==-1?At(p.value)?p.key.replace("Tag_SNS_Custom_","").length>8?(Xe({api:"updateFriend",param:"friendCustomField",desc:Nt("keyword",8)}),l=!1):void 0:(Xe({api:"updateFriend",param:"friendCustomField",desc:zn("value")}),l=!1):(Xe({api:"updateFriend",param:"friendCustomField",desc:pn("FriendCustomFieldPrefixLog")}),l=!1)}),l}return!0}}},acceptFriendApplication:{userID:ut},refuseFriendApplication:{userID:ut},deleteFriendApplication:{userID:ut},createFriendGroup:{name:ut},deleteFriendGroup:{name:ut},addToFriendGroup:{name:ut,userIDList:Qn},removeFromFriendGroup:{name:ut,userIDList:Qn},renameFriendGroup:{oldName:ut,newName:ut},sendMessageReadReceipt:[{name:"messageList",type:"Array",validator:function(D){return st(D)?D.length!==0||(Xe({api:"sendMessageReadReceipt",param:"messageList",desc:Ke()}),!1):(Xe({api:"sendMessageReadReceipt",param:"messageList",desc:Ae()}),!1)}}],getMessageReadReceiptList:[{name:"messageList",type:"Array",validator:function(D){return st(D)?D.length!==0||(Xe({api:"getMessageReadReceiptList",param:"messageList",desc:Ke()}),!1):(Xe({api:"getMessageReadReceiptList",param:"messageList",desc:Ae()}),!1)}}],createTopicInCommunity:{groupID:ut,topicName:ut},deleteTopicFromCommunity:{groupID:ut,topicIDList:{type:"Array",validator:function(D){return!D||!!st(D)||(Xe({api:"deleteTopicFromCommunity",param:"topicIDList",desc:Ae()}),!1)}}},updateTopicProfile:{groupID:ut,topicID:ut},getTopicList:{groupID:ut,topicIDList:{type:"Array",validator:function(D){return!D||!!st(D)||(Xe({api:"getTopicList",param:"topicIDList",desc:Ae()}),!1)}}},addSignalingListener:[{name:"eventName",type:"String",validator:function(D){return typeof D=="string"&&D.length!==0||(Xe({api:"addSignalingListener",param:"eventName",desc:Us("eventName")}),!1)}},{name:"handler",type:"Function",validator:function(D){return typeof D!="function"?(Xe({api:"addSignalingListener",param:"handler",desc:ge()}),!1):(D.name===""&&Xe({api:"addSignalingListener",param:"handler",desc:Dr()}),!0)}}],removeSignalingListener:[{name:"eventName",type:"String",validator:function(D){return typeof D=="string"&&D.length!==0||(Xe({api:"removeSignalingListener",param:"eventName",desc:Us("eventName")}),!1)}},{name:"handler",type:"Function",validator:function(D){return typeof D!="function"?(Xe({api:"removeSignalingListener",param:"handler",desc:ge()}),!1):(D.name===""&&Xe({api:"removeSignalingListener",param:"handler",desc:Dr()}),!0)}}],invite:{userID:ut},inviteSync:[r(r({},er),{},{validator:function(D){return _n(D)?!!At(D.userID)||(Xe({api:"inviteSync",param:"options.userID",desc:_i()}),!1):(Xe({api:"inviteSync",param:"options",desc:Ln()}),!1)}}),{name:"successCb",type:"Function",required:!1,validator:function(D){return $e(D)&&Xe({api:"inviteSync",param:"successCb",desc:ge()}),!0}},{name:"errorCb",type:"Function",required:!1,validator:function(D){return $e(D)&&Xe({api:"inviteSync",param:"errorCb",desc:ge()}),!0}}],inviteInGroup:{groupID:ut,inviteeList:Qn},inviteInGroupSync:[r(r({},er),{},{validator:function(D){return _n(D)?At(D.groupID)?!!st(D.inviteeList)||(Xe({api:"inviteInGroupSync",param:"options.inviteeList",desc:Ae()}),!1):(Xe({api:"inviteInGroupSync",param:"options.groupID",desc:_i()}),!1):(Xe({api:"inviteInGroupSync",param:"options",desc:Ln()}),!1)}}),{name:"successCb",type:"Function",required:!1,validator:function(D){return $e(D)&&Xe({api:"inviteSync",param:"successCb",desc:ge()}),!0}},{name:"errorCb",type:"Function",required:!1,validator:function(D){return $e(D)&&Xe({api:"inviteSync",param:"errorCb",desc:ge()}),!0}}],accept:{inviteID:ut},reject:{inviteID:ut},getSignalingInfo:[r(r({name:"message"},er),{},{validator:function(D){return!Ye(D)||(Xe({api:"getSignalingInfo",param:"message",desc:To()}),!1)}})],modifyInvitation:{inviteID:ut,data:ut}},a6={login:1,logout:1,on:1,once:1,off:1,setLogLevel:1,registerPlugin:1,destroy:1,isReady:1,createTextMessage:1,createTextAtMessage:1,createImageMessage:1,createAudioMessage:1,createVideoMessage:1,createCustomMessage:1,createFaceMessage:1,createFileMessage:1,createLocationMessage:1,createMergerMessage:1,downloadMergerMessage:1,createForwardMessage:1,sendMessage:1,resendMessage:1,revokeMessage:1,deleteMessage:1,translateText:1,modifyMessage:1,searchCloudMessages:1,sendMessageReadReceipt:1,getGroupMessageReadMemberList:1,getMessageReadReceiptList:1,setMessageExtensions:1,getMessageExtensions:1,deleteMessageExtensions:1,getMessageList:1,findMessage:1,getMessageListHopping:1,setMessageRead:1,setAllMessageRead:1,getConversationList:1,getConversationProfile:1,deleteConversation:1,setConversationDraft:1,pinConversation:1,getTotalUnreadMessageCount:1,setConversationCustomData:1,markConversation:1,createConversationGroup:1,getConversationGroupList:1,deleteConversationGroup:1,renameConversationGroup:1,addConversationsToGroup:1,deleteConversationsFromGroup:1,clearHistoryMessage:1,getGroupList:1,getGroupProfile:1,createGroup:1,joinGroup:1,updateGroupProfile:1,quitGroup:1,dismissGroup:1,changeGroupOwner:1,searchGroupByID:1,setMessageRemindType:1,getGroupApplicationList:1,handleGroupApplication:1,initGroupAttributes:1,setGroupAttributes:1,deleteGroupAttributes:1,getGroupAttributes:1,setGroupCounters:1,increaseGroupCounter:1,decreaseGroupCounter:1,getGroupCounters:1,getJoinedCommunityList:1,createTopicInCommunity:1,deleteTopicFromCommunity:1,updateTopicProfile:1,getTopicList:1,getGroupMemberProfile:1,getGroupMemberList:1,addGroupMember:1,deleteGroupMember:1,setGroupMemberNameCard:1,setGroupMemberMuteTime:1,setGroupMemberRole:1,setGroupMemberCustomField:1,getGroupOnlineMemberCount:1,markGroupMemberList:1,getMyProfile:1,getUserProfile:1,updateMyProfile:1,setSelfStatus:1,getUserStatus:1,subscribeUserStatus:1,unsubscribeUserStatus:1,getBlacklist:1,addToBlacklist:1,removeFromBlacklist:1,getFriendList:1,addFriend:1,deleteFriend:1,checkFriend:1,updateFriend:1,getFriendProfile:1,getFriendApplicationList:1,refuseFriendApplication:1,deleteFriendApplication:1,acceptFriendApplication:1,setFriendApplicationRead:1,getFriendGroupList:1,createFriendGroup:1,renameFriendGroup:1,deleteFriendGroup:1,addToFriendGroup:1,removeFromFriendGroup:1,callExperimentalAPI:1,addSignalingListener:1,removeSignalingListener:1,invite:1,inviteSync:1,inviteInGroup:1,inviteInGroupSync:1,cancel:1,accept:1,reject:1,getSignalingInfo:1,modifyInvitation:1},qa=1,lr=2,yp=3,yr=4,ao=6,Tt=7,_r=8,ur=10,dt=11,hn=12,aa=13,S0=14,Va=15,Mw=17,Ng=18,k0=19,Fi=20,Fs=21,_p=22,bp=23,Mp=24,Iw=25,qo=26,Ip=27,Cp=28,za=29,D0=30,Cw=31,Tw=32,oi=33,Er=function(){function D(l){i(this,D),this._m=l,this._n=""}return u(D,[{key:"isLoggedIn",value:function(){return this._m.getModule(hn).isLoggedIn()}},{key:"isOversea",value:function(){return this._m.getModule(hn).isOversea()}},{key:"isPrivateNetWork",value:function(){return this._m.getModule(hn).isPrivateNetWork()}},{key:"getFileDownloadProxy",value:function(){return this._m.getModule(hn).getFileDownloadProxy()}},{key:"getMyUserID",value:function(){return this._m.getModule(hn).getUserID()}},{key:"getMyTinyID",value:function(){return this._m.getModule(hn).getTinyID()}},{key:"getSDKAppID",value:function(){return this._m.getModule(hn).getSDKAppID()}},{key:"isIntl",value:function(){return this._m.getModule(hn).isIntl()}},{key:"isDevMode",value:function(){return this._m.getModule(hn).isDevMode()}},{key:"getModule",value:function(l){return this._m.getModule(l)}},{key:"getPlatform",value:function(){return An}},{key:"getNetworkType",value:function(){return this._m.getModule(Va).getNetworkType()}},{key:"probeNetwork",value:function(l){return this._m.getModule(Va).probe(l)}},{key:"getCloudConfig",value:function(l){return this._m.getModule(bp).getCloudConfig(l)}},{key:"emitOuterEvent",value:function(l,p){this._m.getOuterEmitterInstance().emit(l,p)}},{key:"emitInnerEvent",value:function(l,p){this._m.getInnerEmitterInstance().emit(l,p)}},{key:"getInnerEmitterInstance",value:function(){return this._m.getInnerEmitterInstance()}},{key:"generateTjgID",value:function(l){return this._m.getModule(hn).getTinyID()+"-"+l.random}},{key:"filterModifiedMessage",value:function(l){if(!Ye(l)){var p=l.filter(function(a){return a.isModified===!0});p.length>0&&this.emitOuterEvent(R.MESSAGE_MODIFIED,p)}}},{key:"filterUnmodifiedMessage",value:function(l){return Ye(l)?[]:l.filter(function(p){return p.isModified===!1})}},{key:"request",value:function(l){return this._m.getModule(Fi).request(l)}},{key:"canIUse",value:function(l){return this._m.getModule(Ip).canIUse(l)}},{key:"getErrorMessage",value:function(l,p,a){return this._m.getErrorMessage(l,p,a)}},{key:"outputWarning",value:function(l,p,a){var c=this.getErrorMessage(l,p,a);c&&U.w(c)}}]),D}(),Tp="wslogin",E0="wslogout",A0="wshello",L0="KickOther",O0="getmsg",wp="sendmsg",Sp="send_group_msg",R0="portrait_get_all",N0="portrait_set",P0="black_list_get",x0="black_list_add",U0="black_list_delete",F0="friend_get",$0="friend_get_specified",G0="friend_check",B0="friend_delete",H0="friend_add",q0="friend_update",Pg="friend_response",V0="pendency_get",z0="pendency_delete",j0="pendency_report",W0="group_get",K0="group_add",Y0="group_delete",kp="group_update",J0="msgwithdraw",X0="msgreaded",Z0="set_c2c_peer_mute_notifications",Q0="get_c2c_peer_mute_notifications",Dp="getroammsg",e_="get_peer_read_time",t_="delete_c2c_msg_ramble",xg="modify_c2c_msg",n_="set_key_values",r_="get_key_values",o_="page_get",i_="batch_delete",s_="clear_msg",a_="top",l_="deletemsg",ww="set_conv_custom_data",Ug="mark_contact",Sw="create_contact_group",u_="del_contact_group",Ed="update_contact_group",kw="add_conv_to_group",Dw="del_conv_from_group",c_="get_contact_group",Fg="get_joined_group_list",$g="get_group_self_member_info",d_="create_group",f_="destroy_group",p_="modify_group_base_info",Gg="apply_join_group",Ew="apply_join_group_noauth",h_="quit_group",g_="get_group_public_info",m_="change_group_owner",v_="handle_apply_join_group",y_="handle_invite_join_permission_group",__="handle_invite_join_group",b_="group_msg_recall",M_="msg_read_report",Bg="read_all_unread_msg",Ep="group_msg_get",I_="get_group_msg_receipt",C_="group_msg_receipt",T_="c2c_msg_read_receipt",w_="get_group_msg_receipt_detail",Hg="get_pendency",S_="deletemsg",qg="get_msg",Aw="get_msg_noauth",k_="get_online_member_num",D_="delete_group_ramble_msg_by_seq",Vg="modify_group_msg",zg="set_group_attr",jg="modify_group_attr",Wg="delete_group_attr",Kg="clear_group_attr",Yg="get_group_attr",Jg="group_set_key_values",Xg="group_get_key_values",E_="batch_get_group_notify",Zg="update_group_counter",Qg="get_group_counter",A_="get_group_member_info",em="get_members",L_="get_specified_group_member_info",O_="add_group_member",R_="delete_group_member",N_="ban_group_member",P_="modify_group_member_info",x_="modify_user_info",U_="cos",F_="pre_sig",$_="video_cover",Ap="tim_web_report_v2",G_="alive",Lw="msg_push",tm="query",Ow="multi_msg_push_ws",nm="ws_msg_push_ack",Rw="stat_forceoffline",B_="save_relay_json_msg",H_="get_relay_json_msg",q_="fetch_config",V_="push_configv2",z_="fetch_imsdk_purchase_bitsv2",j_="push_imsdk_purchase_bitsv2",W_="notify2",K_="create_topic",Y_="destroy_topic",J_="modify_topic",rm="get_topic",X_="ws_set_custom_status",om="ws_get_user_status",im="ws_status_subscribe",sm="ws_status_unsubscribe",Z_="ws_stat_background",Q_="ws_stat_foreground",e1="ws_stat_settoken",t1="get_local_words",n1="ws_batch_trans_text",Le={NO_SDKAPPID:2e3,NO_ACCOUNT_TYPE:2001,NO_IDENTIFIER:2002,NO_USERSIG:2003,NO_TINYID:2022,NO_A2KEY:2023,USER_NOT_LOGGED_IN:2024,REPEAT_LOGIN:2025,COS_UNDETECTED:2040,COS_GET_SIG_FAIL:2041,MSG_SEND_FAIL:2100,MSG_SEND_FAIL_NOT_IN_AVCHATROOM:2101,MSG_INSTANCE_REQUIRED:2105,MSG_INVALID_CONV_TYPE:2106,MSG_F_IS_EMPTY:2108,MSG_ONPROGRESS_FUNCTION_ERROR:2109,MSG_REVOKE_FAIL:2110,MSG_DELETE_FAIL:2111,MSG_UNREAD_ALL_FAIL:2112,READ_RECEIPT_MSG_LIST_EMPTY:2114,MSG_SEND_GRP_WITH_TOPIC_FAIL:2115,CANNOT_DELETE_GRP_SYSTEM_NOTICE:2116,TRANSLATE_TEXT_FAIL:2117,MSG_I_SELECT_F_FIRST:2251,MSG_I_TYPES_LIMIT:2252,MSG_I_SIZE_LIMIT:2253,MSG_A_UPLOAD_FAIL:2300,MSG_A_SIZE_LIMIT:2301,MSG_V_UPLOAD_FAIL:2350,MSG_V_SIZE_LIMIT:2351,MSG_V_TYPES_LIMIT:2352,MSG_F_UPLOAD_FAIL:2400,MSG_F_SELECT_F_FIRST:2401,MSG_F_SIZE_LIMIT:2402,MSG_F_URL_IS_EMPTY:2403,MSG_MERGER_TYPE_INVALID:2450,MSG_MERGER_KEY_INVALID:2451,MSG_MERGER_DOWNLOAD_FAIL:2452,MSG_FORWARD_TYPE_INVALID:2453,MSG_MODIFY_CONFLICT:2480,MSG_MODIFY_DISABLED_IN_AVCHATROOM:2481,CONV_NOT_FOUND:2500,USER_OR_GRP_NOT_FOUND:2501,CONV_UN_RECORDED_TYPE:2502,INVALID_CONV_ID:2503,ILLEGAL_GRP_TYPE:2600,CANNOT_JOIN_WORK:2601,ILLEGAL_GRP_ID:2602,CANNOT_FIND_GRP:2603,CANNOT_CHANGE_OWNER_IN_AVCHATROOM:2620,CANNOT_CHANGE_OWNER_TO_SELF:2621,CANNOT_DISMISS_WORK:2622,MEMBER_NOT_IN_GRP:2623,JOIN_GRP_FAIL:2660,CANNOT_ADD_MEMBER_IN_AVCHATROOM:2661,CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN:2662,NOT_OWNER:2681,CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM:2682,INVALID_MEMBER_ROLE:2683,CANNOT_SET_SELF_MEMBER_ROLE:2684,CANNOT_MUTE_SELF:2685,BAN_DURATION_INVALID:2686,OPERATION_NOT_SUPPORTED_IN_AVCHATROOM:2687,NOT_MY_FRIEND:2700,ALREADY_MY_FRIEND:2701,FRIEND_GRP_EXISTED:2710,FRIEND_GRP_NOT_EXIST:2711,FRIEND_APPLICATION_NOT_EXIST:2716,UPDATE_PROFILE_INVALID_PARAM:2721,UPDATE_PROFILE_NO_KEY:2722,CANNOT_ADD_SELF_TO_BLACKLIST:2742,NETWORK_ERROR:2800,NETWORK_TIMEOUT:2801,NO_NETWORK:2805,UNCAUGHT_ERROR:2903,INVALID_OPERATION:2905,INVALID_TRTC_CMD:2995,OVER_FREQUENCY_LIMIT:2996,CANNOT_FIND_PROTOCOL:2997,CANNOT_FIND_MODULE:2998,SDK_IS_NOT_READY:2999,LOGGING_IN:3e3,LOGIN_FAILED:3001,KICKED_OUT_MULT_DEVICE:3002,KICKED_OUT_MULT_ACCOUNT:3003,KICKED_OUT_USERSIG_EXPIRED:3004,LOGGED_OUT:3005,KICKED_OUT_REST_API:3006,ILLEGAL_TOPIC_ID:3021,CANNOT_USE_COMMERCIAL_ABILITY:3122,PROFANITY_FOUND:3123,OPTIONS_IS_EMPTY:3153,MSG_A2KEY_EXPIRED:20002,ACCOUNT_A2KEY_EXPIRED:70001,HELLO_ANSWER_KICKED_OUT:1002,OPEN_SERVICE_OVERLOAD_ERROR:60022,SIGNALING_INVALID_INVITE_ID:8010,SIGNALING_NO_PERMISSION:8011,SIGNALING_ALREADY_EXISTS:8012,INVALID_CANCEL_MESSAGE:8020,SEND_MESSAGE_FAILED_WITH_CANCEL:8021,ERR_SVR_COMM_INVALID_SERVICE:60020,MSG_SEARCH_CURSOR_INVALID:27002,MSG_SEARCH_CURSOR_EXPIRED:27003},r1="networkRTT",o1="messageE2EDelay",Ad="sendMessageC2C",Ld="sendMessageGroup",Od="sendMessageGroupAV",ju="sendMessageRichMedia",Mi="cosUpload",Rd="messageReceivedGroup",Lp="messageReceivedGroupAVPush",Op="messageReceivedGroupAVPull",l6=(d(ni={},r1,2),d(ni,o1,3),d(ni,Ad,4),d(ni,Ld,5),d(ni,Od,6),d(ni,ju,7),d(ni,Rd,8),d(ni,Lp,9),d(ni,Op,10),d(ni,Mi,11),ni),u6={info:4,warning:5,error:6},Nw={wifi:1,"2g":2,"3g":3,"4g":4,"5g":5,unknown:6,none:7,online:8},c6={login:4},We=function(){function D(l){i(this,D),this._n="SSOLogData",this.eventType=c6[l]||0,this.timestamp=0,this.networkType=8,this.code=0,this.message="",this.moreMessage="",this.extension=l,this.costTime=0,this.duplicate=!1,this.level=4,this.uiPlatform=void 0,this._sentFlag=!1,this._startts=In()}return u(D,[{key:"updateTimeStamp",value:function(){this.timestamp=In()}},{key:"start",value:function(l){return this._startts=l,this}},{key:"end",value:function(){var l=this,p=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!this._sentFlag){var a=In();this.costTime===0&&(this.costTime=a-this._startts),this.setMoreMessage("startts:".concat(this._startts," endts:").concat(a)),p?(this._sentFlag=!0,this._eventStatModule&&this._eventStatModule.pushIn(this)):setTimeout(function(){l._sentFlag=!0,l._eventStatModule&&l._eventStatModule.pushIn(l)},0)}}},{key:"setError",value:function(l,p,a){if(!(l instanceof Error))return U.w("".concat(this._n,".setError value not instanceof Error, please check!")),this;if(this._sentFlag)return this;if(this.setNetworkType(a),p)l.code&&this.setCode(l.code),l.message&&this.setMoreMessage(l.message);else{var c=Le.NO_NETWORK;this.setCode(c)}return this.setLevel("error"),this}},{key:"setCode",value:function(l){return $e(l)||this._sentFlag||(l==="ECONNABORTED"&&(this.code=103),un(l)?this.code=l:U.w("".concat(this._n,".setCode value not a number, please check!"),l,o(l))),this}},{key:"setMessage",value:function(l){return $e(l)||this._sentFlag||(un(l)&&(this.message=l.toString()),At(l)&&(this.message=l)),this}},{key:"setCostTime",value:function(l){return this.costTime=l,this}},{key:"setLevel",value:function(l){return $e(l)||this._sentFlag||(this.level=u6[l]),this}},{key:"setMoreMessage",value:function(l){return Ye(this.moreMessage)?this.moreMessage="".concat(l):this.moreMessage+=" ".concat(l),this}},{key:"setNetworkType",value:function(l){if($e(l))U.w("".concat(this._n,".setNetworkType value is undefined, please check!"));else{var p=Nw[l.toLowerCase()];$e(p)||(this.networkType=p)}return this}},{key:"getStartTs",value:function(){return this._startts}},{key:"setUIPlatform",value:function(l){this.uiPlatform=l}}],[{key:"bindEventStatModule",value:function(l){D.prototype._eventStatModule=l}}]),D}(),i1=function(){function D(l){i(this,D),this.type=T.MSG_TEXT,this.content={text:l.text||""}}return u(D,[{key:"setText",value:function(l){this.content.text=l}},{key:"sendable",value:function(){return this.content.text.length!==0}}]),D}(),s1=function(){function D(l,p){i(this,D),this._imageMemoryURL="",this._fileDownloadProxy=p,je?this.createImageDataASURLInWXMiniApp(l.file):this.createImageDataASURLInWeb(l.file),this._initImageInfoModel(),this.type=T.MSG_IMAGE,this._percent=0,this.content={imageFormat:l.imageFormat||fs.UNKNOWN,uuid:l.uuid,imageInfoArray:[]},this.initImageInfoArray(l.imageInfoArray),this._autoFixUrl()}return u(D,[{key:"_initImageInfoModel",value:function(){var l=this;this._ImageInfoModel=function(p){this.instanceID=ti(9999999),this.sizeType=p.type||0,this.type=0,this.size=p.size||0,this.width=p.width||0,this.height=p.height||0,this.imageUrl=p.url||"",this.url=Ui(p.url||l._imageMemoryURL,l._fileDownloadProxy)},this._ImageInfoModel.prototype={setSizeType:function(p){this.sizeType=p},setType:function(p){this.type=p},setImageUrl:function(p){p&&(this.imageUrl=p)},getImageUrl:function(){return this.imageUrl}}}},{key:"initImageInfoArray",value:function(l){for(var p=0,a=null,c=null;p<=2;)c=$e(l)||$e(l[p])?{type:0,size:0,width:0,height:0,url:""}:l[p],(a=new this._ImageInfoModel(c)).setSizeType(p+1),a.setType(p),this.addImageInfo(a),p++;this.updateAccessSideImageInfoArray()}},{key:"updateImageInfoArray",value:function(l){for(var p,a=this.content.imageInfoArray.length,c=0;c1&&(this._percent=1)}},{key:"updateImageFormat",value:function(l){this.content.imageFormat=fs[l.toUpperCase()]||fs.UNKNOWN}},{key:"createImageDataASURLInWeb",value:function(l){l!==void 0&&l.files.length>0&&(this._imageMemoryURL=window.URL.createObjectURL(l.files[0]))}},{key:"createImageDataASURLInWXMiniApp",value:function(l){l&&l.url&&(this._imageMemoryURL=l.url)}},{key:"replaceImageInfo",value:function(l,p){this.content.imageInfoArray[p]instanceof this._ImageInfoModel||(this.content.imageInfoArray[p]=l)}},{key:"addImageInfo",value:function(l){this.content.imageInfoArray.length>=3||this.content.imageInfoArray.push(l)}},{key:"updateAccessSideImageInfoArray",value:function(){var l=this.content.imageInfoArray,p=l[0],a=p.width,c=a===void 0?0:a,h=p.height,m=h===void 0?0:h;c!==0&&m!==0&&(Gu(l),Object.assign(l[2],kd({originWidth:c,originHeight:m,min:720})))}},{key:"sendable",value:function(){return this.content.imageInfoArray.length!==0&&this.content.imageInfoArray[0].imageUrl!==""&&this.content.imageInfoArray[0].size!==0}}]),D}(),a1=function(){function D(l){i(this,D),this.type=T.MSG_FACE,this.content=l||null}return u(D,[{key:"sendable",value:function(){return this.content!==null}}]),D}(),l1=function(){function D(l,p){i(this,D),this.type=T.MSG_AUDIO,this._percent=0,this.content={downloadFlag:2,second:l.second,size:l.size,url:Ui(l.url,p),remoteAudioUrl:l.url||"",uuid:l.uuid}}return u(D,[{key:"updatePercent",value:function(l){this._percent=l,this._percent>1&&(this._percent=1)}},{key:"updateAudioUrl",value:function(l){this.content.remoteAudioUrl=l}},{key:"sendable",value:function(){return this.content.remoteAudioUrl!==""}}]),D}(),d6={from:!0,groupID:!0,groupName:!0,to:!0},Pw=function(){function D(l){i(this,D),this.type=T.MSG_GRP_TIP,this.content={},this._initContent(l)}return u(D,[{key:"_initContent",value:function(l){var p=this;Object.keys(l).forEach(function(a){switch(a){case"remarkInfo":break;case"groupProfile":p.content.groupProfile={},p._initGroupProfile(l[a]);break;case"operatorInfo":break;case"memberInfoList":case"msgMemberInfo":p._updateMemberList(l[a]);break;case"memberExtraInfo":case"onlineMemberInfo":break;case"memberNum":p.content[a]=l[a],p.content.memberCount=l[a];break;case"newGroupProfile":p.content.newGroupProfile={},p._initNewGroupProfile(l[a]);break;default:p.content[a]=l[a]}}),this.content.userIDList||(this.content.userIDList=[this.content.operatorID])}},{key:"_initGroupProfile",value:function(l){for(var p=Object.keys(l),a=0;a1&&(this._percent=1)}},{key:"updateFileUrl",value:function(l){this.content.fileUrl=l}},{key:"sendable",value:function(){return this.content.fileUrl!==""&&this.content.fileName!==""&&this.content.fileSize!==0}}]),D}(),c1=function(){function D(l){i(this,D),this.type=T.MSG_CUSTOM,this.content={data:l.data||"",description:l.description||"",extension:l.extension||""}}return u(D,[{key:"setData",value:function(l){return this.content.data=l,this}},{key:"setDescription",value:function(l){return this.content.description=l,this}},{key:"setExtension",value:function(l){return this.content.extension=l,this}},{key:"sendable",value:function(){return this.content.data.length!==0||this.content.description.length!==0||this.content.extension.length!==0}}]),D}(),d1=function(){function D(l,p){i(this,D),this.type=T.MSG_VIDEO,this._percent=0,this.content={remoteVideoUrl:l.remoteVideoUrl||l.videoUrl||"",videoFormat:l.videoFormat,videoSecond:parseInt(l.videoSecond,10),videoSize:l.videoSize,videoUrl:Ui(l.videoUrl,p),videoDownloadFlag:2,videoUUID:l.videoUUID,thumbUUID:l.thumbUUID,thumbFormat:l.thumbFormat,thumbWidth:l.thumbWidth,snapshotWidth:l.thumbWidth,thumbHeight:l.thumbHeight,snapshotHeight:l.thumbHeight,thumbSize:l.thumbSize,snapshotSize:l.thumbSize,thumbDownloadFlag:2,thumbUrl:Ui(l.thumbUrl,p),snapshotUrl:Ui(l.thumbUrl,p)}}return u(D,[{key:"updatePercent",value:function(l){this._percent=l,this._percent>1&&(this._percent=1)}},{key:"updateVideoUrl",value:function(l){l&&(this.content.remoteVideoUrl=l)}},{key:"updateSnapshotInfo",value:function(l){var p=l.snapshotUrl,a=l.snapshotWidth,c=l.snapshotHeight;Ye(p)||(this.content.thumbUrl=this.content.snapshotUrl=p),Ye(a)||(this.content.thumbWidth=this.content.snapshotWidth=Number(a)),Ye(c)||(this.content.thumbHeight=this.content.snapshotHeight=Number(c))}},{key:"sendable",value:function(){return this.content.remoteVideoUrl!==""}}]),D}(),f1=function(){function D(l){i(this,D),this.type=T.MSG_LOCATION;var p=l.description,a=l.longitude,c=l.latitude;this.content={description:p,longitude:a,latitude:c}}return u(D,[{key:"sendable",value:function(){return!0}}]),D}(),Uw=function(){function D(l,p){if(i(this,D),this.from=l.from,this.messageSender=l.from,this.time=l.time,this.messageSequence=l.sequence,this.clientSequence=l.clientSequence||l.sequence,this.messageRandom=l.random,this.cloudCustomData=l.cloudCustomData||"",this.clientTime=l.clientTime||void 0,l.ID)this.ID=l.ID||"",this.nick=l.nick||"",this.avatar=l.avatar||"",this.messageBody=[{type:l.type,payload:l.payload}],l.conversationType.startsWith(T.CONV_C2C)?this.receiverUserID=l.to:l.conversationType.startsWith(T.CONV_GROUP)&&(this.receiverGroupID=l.to),this.messageReceiver=l.to;else{this.nick=l.nick||"",this.avatar=l.avatar||"",this.messageBody=[];var a=l.elements[0].type,c=l.elements[0].content;this._patchRichMediaPayload(a,c),this._updateRichMediaDownloadUrl(a,c,p),a===T.MSG_MERGER?this.messageBody.push({type:a,payload:new am(c).content}):this.messageBody.push({type:a,payload:c}),l.groupID&&(this.receiverGroupID=l.groupID,this.messageReceiver=l.groupID),l.to&&(this.receiverUserID=l.to,this.messageReceiver=l.to),this.ID="".concat(l.tinyID,"-").concat(l.clientTime,"-").concat(l.random)}}return u(D,[{key:"_patchRichMediaPayload",value:function(l,p){l===T.MSG_IMAGE?p.imageInfoArray.forEach(function(a){!a.imageUrl&&a.url&&(a.imageUrl=a.url,a.sizeType=a.type,a.type===1?a.type=0:a.type===3&&(a.type=1))}):l===T.MSG_VIDEO?!p.remoteVideoUrl&&p.videoUrl&&(p.remoteVideoUrl=p.videoUrl):l===T.MSG_AUDIO?!p.remoteAudioUrl&&p.url&&(p.remoteAudioUrl=p.url):l===T.MSG_FILE&&!p.fileUrl&&p.url&&(p.fileUrl=p.url,p.url=void 0)}},{key:"_updateRichMediaDownloadUrl",value:function(l,p,a){a&&(l===T.MSG_IMAGE?p.imageInfoArray.forEach(function(c){c.url=Ui(c.url,a)}):l===T.MSG_VIDEO?(p.videoUrl=Ui(p.videoUrl,a),p.snapshotUrl=Ui(p.thumbUrl,a),p.snapshotHeight=p.thumbHeight,p.snapshotWidth=p.thumbWidth):l===T.MSG_AUDIO?p.url=Ui(p.url,a):l===T.MSG_FILE&&(p.fileUrl=Ui(p.fileUrl,a)))}}]),D}(),am=function(){function D(l,p){if(i(this,D),this.type=T.MSG_MERGER,this.content={downloadKey:"",pbDownloadKey:"",messageList:[],title:"",abstractList:[],compatibleText:"",version:0,layersOverLimit:!1},l.downloadKey){var a=l.downloadKey,c=l.pbDownloadKey,h=l.title,m=l.abstractList,y=l.compatibleText,b=l.version;this.content.downloadKey=a,this.content.pbDownloadKey=c,this.content.title=h,this.content.abstractList=m,this.content.compatibleText=y,this.content.version=b||0}else if(Ye(l.messageList))l.layersOverLimit===1&&(this.content.layersOverLimit=!0);else{var C=l.messageList,E=l.title,N=l.abstractList,F=l.compatibleText,z=l.version,Q=[];C.forEach(function(me){if(!Ye(me)){var _e=new Uw(me,p);Q.push(_e)}}),this.content.messageList=Q,this.content.title=E,this.content.abstractList=N,this.content.compatibleText=F,this.content.version=z||0}}return u(D,[{key:"sendable",value:function(){return!Ye(this.content.messageList)||!Ye(this.content.downloadKey)}}]),D}(),p1={1:T.MSG_PRIORITY_HIGH,2:T.MSG_PRIORITY_NORMAL,3:T.MSG_PRIORITY_LOW,4:T.MSG_PRIORITY_LOWEST},qr=function(){function D(l){i(this,D),this.ID="",this.conversationID=l.conversationID||null,this.conversationType=l.conversationType||T.CONV_C2C,this.conversationSubType=l.conversationSubType,this.time=l.time||Math.ceil(Date.now()/1e3),this.sequence=l.sequence||0,this.clientSequence=l.clientSequence||l.sequence||0,this.random=l.random||l.random===0?l.random:ti(),this.priority=this._computePriority(l.priority),this.nick=l.nick||"",this.avatar=l.avatar||"",this.isPeerRead=!1,this.nameCard="",this._elements=[],this.isPlaceMessage=l.isPlaceMessage||0,this.isRevoked=l.isPlaceMessage===2||l.msgFlagBits===8,this.from=l.from||null,this.to=l.to||null,this.flow="",this.isSystemMessage=l.isSystemMessage||!1,this.protocol=l.protocol||"JSON",this.isResend=!1,this.isRead=!1,this.status=l.status||so.SUCCESS,this._onlineOnlyFlag=!1,this._groupAtInfoList=[],this._relayFlag=!1,this.atUserList=[],this.cloudCustomData=l.cloudCustomData||"",this.isDeleted=!1,this.isModified=!1,this._isExcludedFromUnreadCount=!(!l.messageControlInfo||l.messageControlInfo.excludedFromUnreadCount!==1),this._isExcludedFromLastMessage=!(!l.messageControlInfo||l.messageControlInfo.excludedFromLastMessage!==1),this.clientTime=l.clientTime||Kr()||0,this.senderTinyID=l.senderTinyID||l.tinyID||"",this.readReceiptInfo=l.readReceiptInfo||{readCount:void 0,unreadCount:void 0,isPeerRead:void 0},this.needReadReceipt=l.needReadReceipt===!0||l.needReadReceipt===1,this.version=l.messageVersion||0,this.isBroadcastMessage=l.isBroadcastMessage||!1,this._receiverList=l.receiverList||void 0,this.isSupportExtension=l.isSupportExtension===!0||l.isSupportExtension===1,this.revoker=l.revokerInfo&&l.revokerInfo.revoker||null,this.reInitialize(l.currentUser),this.extractGroupInfo(l.groupProfile||null),this.handleGroupAtInfo(l),this.initC2CReadReceiptInfo(l.readReceiptSentByPeer)}return u(D,[{key:"elements",get:function(){return this._elements}},{key:"getElements",value:function(){return this._elements}},{key:"extractGroupInfo",value:function(l){if(l!==null){At(l.nick)&&(this.nick=l.nick),At(l.avatar)&&(this.avatar=l.avatar);var p=l.messageFromAccountExtraInformation;_n(p)&&At(p.nameCard)&&(this.nameCard=p.nameCard)}}},{key:"handleGroupAtInfo",value:function(l){var p=this;l.payload&&l.payload.atUserList&&l.payload.atUserList.forEach(function(a){a!==T.MSG_AT_ALL?(p._groupAtInfoList.push({groupAtAllFlag:0,groupAtUserID:a}),p.atUserList.push(a)):(p._groupAtInfoList.push({groupAtAllFlag:1}),p.atUserList.push(T.MSG_AT_ALL))}),st(l.groupAtInfo)&&l.groupAtInfo.forEach(function(a){a.groupAtAllFlag===0?p.atUserList.push(a.groupAtUserID):a.groupAtAllFlag===1&&p.atUserList.push(T.MSG_AT_ALL)})}},{key:"getGroupAtInfoList",value:function(){return this._groupAtInfoList}},{key:"_initProxy",value:function(){this._elements[0]&&(this.payload=this._elements[0].content,this.type=this._elements[0].type)}},{key:"reInitialize",value:function(l){l&&(this.status=this.from?so.SUCCESS:so.UNSEND,!this.from&&(this.from=l)),this._initFlow(l),this._initSequence(l),this._concatConversationID(l),this.generateMessageID()}},{key:"isSendable",value:function(){return this._elements.length!==0&&typeof this._elements[0].sendable=="function"&&this._elements[0].sendable()}},{key:"_initTo",value:function(l){this.conversationType===T.CONV_GROUP&&(this.to=l.groupID)}},{key:"_initSequence",value:function(l){this.clientSequence===0&&l&&(this.clientSequence=function(p){if(!p)return!1;if(kl[p]===void 0){var a=new Date,c="3".concat(a.getHours()).slice(-2),h="0".concat(a.getMinutes()).slice(-2),m="0".concat(a.getSeconds()).slice(-2);kl[p]=parseInt([c,h,m,"0001"].join("")),c=null,h=null,m=null,U.l("autoIncrementIndex start index:".concat(kl[p]))}return kl[p]++}(l)),this.sequence===0&&this.conversationType===T.CONV_C2C&&(this.sequence=this.clientSequence)}},{key:"generateMessageID",value:function(){this.from===T.CONV_SYSTEM&&(this.senderTinyID="144115198244471703"),this.ID="".concat(this.senderTinyID,"-").concat(this.clientTime,"-").concat(this.random)}},{key:"_initFlow",value:function(l){l!==""&&(l===this.from?(this.flow="out",this.isRead=!0):this.flow="in")}},{key:"_concatConversationID",value:function(l){var p=this.to,a="",c=this.conversationType;c!==T.CONV_SYSTEM?(a=c===T.CONV_C2C?l===this.from?p:this.from:this.to,this.conversationID=a?"".concat(c).concat(a):null):this.conversationID=T.CONV_SYSTEM}},{key:"isElement",value:function(l){return l instanceof i1||l instanceof s1||l instanceof a1||l instanceof l1||l instanceof u1||l instanceof d1||l instanceof Pw||l instanceof xw||l instanceof c1||l instanceof f1||l instanceof am}},{key:"setElement",value:function(l,p){var a=this;if(this.isElement(l))return this._elements=[l],void this._initProxy();var c=function(m){if(m.type&&m.content)switch(m.type){case T.MSG_TEXT:a.setTextElement(m.content);break;case T.MSG_IMAGE:a.setImageElement(m.content,p);break;case T.MSG_AUDIO:a.setAudioElement(m.content,p);break;case T.MSG_FILE:a.setFileElement(m.content,p);break;case T.MSG_VIDEO:a.setVideoElement(m.content,p);break;case T.MSG_CUSTOM:a.setCustomElement(m.content);break;case T.MSG_LOCATION:a.setLocationElement(m.content);break;case T.MSG_GRP_TIP:a.setGroupTipElement(m.content);break;case T.MSG_GRP_SYS_NOTICE:a.setGroupSystemNoticeElement(m.content);break;case T.MSG_FACE:a.setFaceElement(m.content);break;case T.MSG_MERGER:a.setMergerElement(m.content,p)}};if(st(l))for(var h=0;h1&&arguments[1]!==void 0&&arguments[1];if(D instanceof Fn)return l&&Wu!==null&&Wu.emit(R.ERROR,D),Promise.reject(D);if(D instanceof Error){var p=new Fn({code:Le.UNCAUGHT_ERROR});return l&&Wu!==null&&Wu.emit(R.ERROR,p),Promise.reject(p)}if($e(D)||$e(D.code))return Promise.reject(new Fn({code:Le.UNCAUGHT_ERROR}));var a=new Fn(D);return l&&Wu!==null&&Wu.emit(R.ERROR,a),Promise.reject(a)},h6=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="C2CModule",c._messageFromUnreadDBMap=new Map,c._noticeFromUnreadDBList=[],c}return u(p,[{key:"onNewC2CMessage",value:function(a){var c=a.dataList,h=a.isInstantMessage,m=a.C2CRemainingUnreadList,y=a.C2CPairUnreadList,b=a.isSyncingEnded;U.d("".concat(this._n,".onNewC2CMessage count:").concat(c.length," isInstantMessage:").concat(h));var C=this._newC2CMessageStoredAndSummary({dataList:c,C2CRemainingUnreadList:m,C2CPairUnreadList:y,isInstantMessage:h}),E=C.conversationOptionsList,N=C.messageList,F=C.isUnreadC2CMessage;this.filterModifiedMessage(N),this.getModule(dt).onNewMessage({conversationOptionsList:E,isInstantMessage:h,isUnreadC2CMessage:F,isSyncingEnded:b});var z=this.filterUnmodifiedMessage(N);h&&z.length>0&&this.emitOuterEvent(R.MESSAGE_RECEIVED,z),N.length=0}},{key:"_newC2CMessageStoredAndSummary",value:function(a){for(var c=a.dataList,h=a.C2CRemainingUnreadList,m=a.C2CPairUnreadList,y=a.isInstantMessage,b=null,C=[],E=[],N={},F=this.getModule(qo),z=!1,Q=this.getModule(dt),me=this.getModule(yr),_e=this.getFileDownloadProxy(),we=0,Ue=c.length;we0&&F.addMessageDelay(b.clientTime)}else this._messageFromUnreadDBMap.set(b.ID,1);if(Ve.msgLifeTime!==0){if(b._onlineOnlyFlag===!1){var yo=Q.getLastMessageTime(ot);if(un(yo)&&b.time0){vs=!0;var pm=C.find(function(px){return px.conversationID==="C2C".concat(m[$i].from)});pm?pm.unreadCount=m[$i].unreadCount:C.push({conversationID:"C2C".concat(m[$i].from),unreadCount:m[$i].unreadCount,type:T.CONV_C2C})}},Nd=0,Al=m.length;Nd0&&(m=a.cloudCustomData);var y=[];if(_n(c)&&_n(c.messageControlInfo)){var b=c.messageControlInfo,C=b.excludedFromUnreadCount,E=b.excludedFromLastMessage,N=b.excludedFromContentModeration;C===!0&&y.push("NoUnread"),E===!0&&y.push("NoLastMsg"),N===!0&&y.push("NoMsgCheck")}var F=this.isOnlineMessage(a,c)?0:void 0;return{protocolName:wp,tjgID:this.generateTjgID(a),requestData:{fromAccount:this.getMyUserID(),toAccount:a.to,msgBody:a.getElements(),cloudCustomData:m,msgSeq:a.sequence,msgRandom:a.random,msgLifeTime:F,nick:a.nick,avatar:a.avatar,offlinePushInfo:h?{pushFlag:h.disablePush===!0?1:0,title:h.title||"",desc:h.description||"",ext:h.extension||"",apnsInfo:{badgeMode:h.ignoreIOSBadge===!0?1:0,isVoipPush:this._isVoipPush(h)},androidInfo:{OPPOChannelID:h.androidOPPOChannelID||""}}:void 0,messageControlInfo:F!==0?y:void 0,clientTime:a.clientTime,needReadReceipt:a.needReadReceipt===!0?1:0,isSupportExtension:a.isSupportExtension===!0?1:0}}}},{key:"_isVoipPush",value:function(a){var c=void 0;return $e(a.disableVoipPush)||(c=a.disableVoipPush===!1?1:0),c}},{key:"isOnlineMessage",value:function(a,c){return!(!c||c.onlineUserOnly!==!0)}},{key:"revokeMessage",value:function(a){return this.request({protocolName:J0,requestData:{msgInfo:{fromAccount:a.from,toAccount:a.to,msgSeq:a.sequence,msgRandom:a.random,msgTimeStamp:a.time}}})}},{key:"deleteMessage",value:function(a){var c=a.to,h=a.keyList;return U.l("".concat(this._n,".deleteMessage toAccount:").concat(c," count:").concat(h.length)),this.request({protocolName:t_,requestData:{fromAccount:this.getMyUserID(),to:c,keyList:h}})}},{key:"modifyRemoteMessage",value:function(a){var c=a.from,h=a.to,m=a.version,y=m===void 0?0:m,b=a.sequence,C=a.random,E=a.time,N=a.payload,F=a.type,z=a.cloudCustomData,Q=void 0;return Hu(F)&&(Q=[]).push({type:F,content:N}),this.request({protocolName:xg,requestData:{from:c,to:h,version:y,sequence:b,random:C,time:E,elements:Q,cloudCustomData:z}})}},{key:"setMessageRead",value:function(a){var c=this,h=a.conversationID,m=a.lastMessageTime,y="".concat(this._n,".setMessageRead");U.l("".concat(y," conversationID:").concat(h," lastMessageTime:").concat(m)),un(m)||this.outputWarning("DoNotModifyLastTime");var b=new We("setC2CMessageRead");return b.setMessage("conversationID:".concat(h," lastMessageTime:").concat(m)),this.request({protocolName:X0,requestData:{C2CMsgReaded:{cookie:"",C2CMsgReadedItem:[{toAccount:h.replace("C2C",""),lastMessageTime:m,receipt:1}]}}}).then(function(){b.setNetworkType(c.getNetworkType()).end(),U.l("".concat(y," ok"));var C=c.getModule(dt);return C.updateIsReadAfterReadReport({conversationID:h,lastMessageTime:m}),C.updateUnreadCount(h),gt()}).catch(function(C){return c.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];b.setError(C,F,z).end()}),U.l("".concat(y," failed. error:"),C),Me(C)})}},{key:"getRoamingMessage",value:function(a){var c=this,h="".concat(this._n,".getRoamingMessage"),m=a.peerAccount,y=a.conversationID,b=a.count,C=a.lastMessageTime,E=a.messageKey,N="peerAccount:".concat(m," count:").concat(b||15," lastMessageTime:").concat(C||0," messageKey:").concat(E);U.l("".concat(h," ").concat(N));var F=new We("getC2CRoamingMessages");return this.request({protocolName:Dp,requestData:{peerAccount:m,count:b||15,lastMessageTime:C||0,messageKey:E}}).then(function(z){var Q=z.data,me=Q.complete,_e=Q.messageList,we=Q.messageKey,Ue=Q.lastMessageTime;$e(_e)?U.l("".concat(h," ok. complete:").concat(me," but messageList is undefined!")):U.l("".concat(h," ok. complete:").concat(me," count:").concat(_e.length)),F.setNetworkType(c.getNetworkType()).setMessage("".concat(N," complete:").concat(me," length:").concat(_e.length)).end();var Ve=c.getModule(dt);me===1&&Ve.setCompleted(y);var ot=Ve.onRoamingMessage(_e,y);Ve.modifyMessageList(y),Ve.updateIsRead(y),Ve.updateRoamingMessageKeyAndTime(y,we,Ue);var vt=Ve.getPeerReadTime(y);if(U.l("".concat(h," update isPeerRead property. conversationID:").concat(y," peerReadTime:").concat(vt)),vt)Ve.updateMessageIsPeerReadProperty(y,vt);else{var Ut=y.replace(T.CONV_C2C,"");c.getRemotePeerReadTime([Ut]).then(function(){Ve.updateMessageIsPeerReadProperty(y,Ve.getPeerReadTime(y))})}var mn="";if(ot.length>0)mn=ot[0].ID;else{var bn=Ve.getLocalOldestMessage(y);bn&&(mn=bn.ID)}return U.l("".concat(h," nextReqID:").concat(mn," stored message count:").concat(ot.length)),{nextReqID:mn,storedMessageList:ot}}).catch(function(z){return c.probeNetwork().then(function(Q){var me=A(Q,2),_e=me[0],we=me[1];F.setMessage(N).setError(z,_e,we).end()}),U.w("".concat(h," failed. error:"),z),Me(z)})}},{key:"getRoamingMessagesHopping",value:function(a){var c=this,h="".concat(this._n,".getRoamingMessagesHopping"),m=a.peerAccount,y=a.time,b=y===void 0?0:y,C=a.count,E=a.direction,N="".concat(T.CONV_C2C).concat(m),F="peerAccount:".concat(m," count:").concat(C," time:").concat(b," direction:").concat(E);U.l("".concat(h," ").concat(F));var z=new We("getC2CRoamingMessagesHopping");return this.request({protocolName:Dp,requestData:{peerAccount:m,count:C+1,lastMessageTime:b,direction:E}}).then(function(Q){var me=Q.data,_e=me.complete,we=me.messageList,Ue=we===void 0?[]:we,Ve=me.lastMessageTime;U.l("".concat(h," ok. complete:").concat(_e," count:").concat(Ue.length)),z.setNetworkType(c.getNetworkType()).setMessage("".concat(F," complete:").concat(_e," length:").concat(Ue.length)).end(),_e!==1&&(E===1?Ue.pop():Ue.shift());var ot=c.getModule(dt).onRoamingMessage(Ue,N,!1);c._modifyMessageList(N,ot);var vt=c._computeResult({complete:_e,lastMessageTime:Ve,resultList:ot});return gt(vt)}).catch(function(Q){return c.probeNetwork().then(function(me){var _e=A(me,2),we=_e[0],Ue=_e[1];z.setMessage(F).setError(Q,we,Ue).end()}),U.w("".concat(h," failed. error:"),Q),Me(Q)})}},{key:"_computeResult",value:function(a){var c=a.complete,h=c===void 0?0:c,m=a.lastMessageTime,y=a.resultList,b={messageList:O(y===void 0?[]:y),isCompleted:!1,nextMessageTime:""};return h===1?(b.isCompleted=!0,b):(b.nextMessageTime=m,b)}},{key:"_modifyMessageList",value:function(a,c){var h=this.getModule(dt).getLocalConversation(a);if(h)for(var m=h.userProfile.nick,y=h.userProfile.avatar,b=this.getModule(yr).getNickAndAvatarByUserID(this.getMyUserID()),C=b.nick,E=b.avatar,N=c.length-1;N>=0;N--){var F=c[N];F.flow==="in"&&(F.nick!==m&&F.setNickAndAvatar({nick:m}),F.avatar!==y&&F.setNickAndAvatar({avatar:y})),F.flow==="out"&&(F.nick!==C&&F.setNickAndAvatar({nick:C}),F.avatar!==E&&F.setNickAndAvatar({avatar:E}))}}},{key:"getRemotePeerReadTime",value:function(a){var c=this,h="".concat(this._n,".getRemotePeerReadTime");if(Ye(a))return U.w("".concat(h," userIDList is empty!")),Promise.resolve();var m=new We("getPeerReadTime");return U.l("".concat(h," userIDList:").concat(a)),this.request({protocolName:e_,requestData:{userIDList:a}}).then(function(y){var b=y.data.peerReadTimeList;U.l("".concat(h," ok. peerReadTimeList:").concat(b));for(var C="",E=c.getModule(dt),N=0;N0&&E.recordPeerReadTime("C2C".concat(a[N]),b[N]);m.setNetworkType(c.getNetworkType()).setMessage(C).end()}).catch(function(y){c.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];m.setError(y,E,N).end()}),U.w("".concat(h," failed. error:"),y)})}},{key:"sendReadReceipt",value:function(a){var c=this,h=a[0].conversationID.replace(T.CONV_C2C,""),m=new We("sendC2CReadReceipt");m.setMessage("peerAccount:".concat(h));var y=this.getMyUserID(),b=a.filter(function(E){return E.from!==y&&E.needReadReceipt===!0}).map(function(E){return{fromAccount:E.from,toAccount:E.to,sequence:E.sequence,random:E.random,time:E.time,clientTime:E.clientTime}});if(b.length===0)return Me({code:Le.READ_RECEIPT_MSG_LIST_EMPTY});var C="".concat(this._n,".sendReadReceipt");return U.l("".concat(C,". peerAccount:").concat(h," messageInfoList length:").concat(b.length)),this.request({protocolName:T_,requestData:{peerAccount:h,messageInfoList:b}}).then(function(E){return m.end(),U.l("".concat(C," ok")),gt()}).catch(function(E){return c.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];m.setError(E,z,Q).end()}),U.w("".concat(C," failed. error:"),E),Me(E)})}},{key:"getReadReceiptList",value:function(a){var c="".concat(this._n,".getReadReceiptList"),h=this.getMyUserID(),m=a.filter(function(y){return y.from===h&&y.needReadReceipt===!0});return U.l("".concat(c," userID:").concat(h," messageList length:").concat(m.length)),Lt({messageList:m})}},{key:"getMessageExtensions",value:function(a,c){return U.l("".concat(this._n,".getMessageExtensions startSequence:").concat(c)),this.request({protocolName:r_,requestData:{from:a.from,to:a.to,messageKey:this._getMessageKey(a),startSequence:c}})}},{key:"modifyMessageExtensions",value:function(a,c){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return U.l("".concat(this._n,".modifyMessageExtensions operateType:").concat(h)),this.request({protocolName:n_,requestData:{from:a.from,to:a.to,messageKey:this._getMessageKey(a),extensionList:c,operateType:h}})}},{key:"_getMessageKey",value:function(a){var c=a.clientSequence,h=a.random,m=a.time;return"".concat(c,"_").concat(h,"_").concat(m)}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._messageFromUnreadDBMap.clear(),this._noticeFromUnreadDBList.length=0}}]),p}(Er),g6=function(){function D(){i(this,D),this.list=new Map,this._n="MessageListHandler",this._latestMessageSentByPeerMap=new Map,this._latestMessageSentByMeMap=new Map}return u(D,[{key:"getLocalOldestMessageByConversationID",value:function(l){if(!l||!this.list.has(l))return null;var p=this.list.get(l).values();return p?p.next().value:null}},{key:"pushIn",value:function(l){var p=arguments.length>1&&arguments[1]!==void 0&&arguments[1],a=l.conversationID,c=!0;this.list.has(a)||this.list.set(a,new Map);var h=this._getUniqueIDOfMessage(l),m=this.list.get(a).has(h);if(m){var y=this.list.get(a).get(h);if(!p||y.isModified===!0)return c=!1}return this.list.get(a).set(h,l),this._setLatestMessageSentByPeer(a,l),this._setLatestMessageSentByMe(a,l),c}},{key:"unshift",value:function(l,p){var a;if(st(l)?l.length>0&&(a=l[0].conversationID,this._unshiftMultipleMessages(l,p)):(a=l.conversationID,this._unshiftSingleMessage(l,p)),a){var c=Array.from(this.list.get(a).values()),h=c.length;if(h===0)return;for(var m=h-1;m>=0;m--)if(c[m].flow==="out"){this._setLatestMessageSentByMe(a,c[m]);break}if(a.startsWith(T.CONV_C2C)){for(var y=h-1;y>=0;y--)if(c[y].flow==="in"){this._setLatestMessageSentByPeer(a,c[y]);break}}}}},{key:"_unshiftSingleMessage",value:function(l,p){var a=l.conversationID,c=this._getUniqueIDOfMessage(l);if(!this.list.has(a))return this.list.set(a,new Map),this.list.get(a).set(c,l),void p.push(l);var h=this.list.get(a),m=Array.from(h);h.has(c)||(m.unshift([c,l]),this.list.set(a,new Map(m)),p.push(l))}},{key:"_unshiftMultipleMessages",value:function(l,p){for(var a=l.length,c=[],h=l[0].conversationID,m=this.list.get(h),y=this.list.has(h)?Array.from(m):[],b=0;b=0;N--)m[N].flow==="in"&&((b=m[N]).nick!==a&&(b.setNickAndAvatar({nick:a}),E=!0),b.avatar!==c&&(b.setNickAndAvatar({avatar:c}),E=!0),E&&(C+=1));U.l("".concat(this._n,".modifyMessageSentByPeer conversationID:").concat(p," count:").concat(C))}}}},{key:"modifyMessageSentByMe",value:function(l){var p=l.conversationID,a=l.latestNick,c=l.latestAvatar,h=this.list.get(p);if(!Ye(h)){var m=Array.from(h.values()),y=m.length;if(y!==0){for(var b=null,C=0,E=!1,N=y-1;N>=0;N--)m[N].flow==="out"&&((b=m[N]).nick!==a&&(b.setNickAndAvatar({nick:a}),E=!0),b.avatar!==c&&(b.setNickAndAvatar({avatar:c}),E=!0),E&&(C+=1));U.l("".concat(this._n,".modifyMessageSentByMe conversationID:").concat(p," count:").concat(C))}}}},{key:"getTopicConversationIDList",value:function(l){return O(this.list.keys()).filter(function(p){return p.startsWith("".concat(T.CONV_GROUP).concat(l))})}},{key:"traversal",value:function(){if(this.list.size!==0&&U.getLevel()===-1){console.group("conversationID-messageCount");var l,p=$(this.list);try{for(p.s();!(l=p.n()).done;){var a=A(l.value,2),c=a[0],h=a[1];console.log("".concat(c,"-").concat(h.size))}}catch(m){p.e(m)}finally{p.f()}console.groupEnd()}}},{key:"onMessageModified",value:function(l,p){if(!this.list.has(l))return{isUpdated:!1,message:null};var a=this._getUniqueIDOfMessage(p),c=this.list.get(l).has(a);if(U.d("".concat(this._n,".onMessageModified conversationID:").concat(l," uniqueID:").concat(a," has:").concat(c)),c){var h=this.list.get(l).get(a),m=p.messageVersion,y=p.elements,b=p.cloudCustomData;return h.version1&&arguments[1]!==void 0&&arguments[1];if(p)return this._isReady?void(a?p.call(this):setTimeout(p,1)):(this._readyQueue=this._readyQueue||[],void this._readyQueue.push(p))},l.triggerReady=function(){var p=this;this._isReady=!0,setTimeout(function(){var a=p._readyQueue;p._readyQueue=[],a&&a.length>0&&a.forEach(function(c){c.call(this)},p)},1)},l.resetReady=function(){this._isReady=!1,this._readyQueue=[]},l.isReady=function(){return this._isReady}};var m6=["jpg","jpeg","gif","png","bmp","image","webp"],v6=["mp4","quicktime","mov"],y6=1,_6=2,b6=3,M6=255,Rp=function(){function D(l){var p=this;i(this,D),Ye(l)||(this.userID=l.userID||"",this.nick=l.nick||"",this.gender=l.gender||"",this.birthday=l.birthday||0,this.location=l.location||"",this.selfSignature=l.selfSignature||"",this.allowType=l.allowType||T.ALLOW_TYPE_ALLOW_ANY,this.language=l.language||0,this.avatar=l.avatar||"",this.messageSettings=l.messageSettings||0,this.adminForbidType=l.adminForbidType||T.FORBID_TYPE_NONE,this.level=l.level||0,this.role=l.role||0,this.lastUpdatedTime=0,this.profileCustomField=[],Ye(l.profileCustomField)||l.profileCustomField.forEach(function(a){p.profileCustomField.push({key:a.key,value:a.value})}))}return u(D,[{key:"validate",value:function(l){var p=!0,a="";if(Ye(l))return{valid:!1,tips:"empty options"};if(l.profileCustomField)for(var c=l.profileCustomField.length,h=null,m=0;m500&&(a="nick name limited: must less than or equal to ".concat(500," bytes, current size: ").concat(Sl(l[y])," bytes"),p=!1);break;case"gender":ia(ei,l.gender)||(a="key:gender, invalid value:"+l.gender,p=!1);break;case"birthday":un(l.birthday)||(a="birthday must be a number",p=!1);break;case"location":At(l.location)||(a="location must be a string",p=!1);break;case"selfSignature":At(l.selfSignature)||(a="selfSignature must be a string",p=!1);break;case"allowType":ia(ps,l.allowType)||(a="key:allowType, invalid value:"+l.allowType,p=!1);break;case"language":un(l.language)||(a="language must be a number",p=!1);break;case"avatar":At(l.avatar)||(a="avatar must be a string",p=!1);break;case"messageSettings":l.messageSettings!==0&&l.messageSettings!==1&&(a="messageSettings must be 0 or 1",p=!1);break;case"adminForbidType":ia($a,l.adminForbidType)||(a="key:adminForbidType, invalid value:"+l.adminForbidType,p=!1);break;case"level":un(l.level)||(a="level must be a number",p=!1);break;case"role":un(l.role)||(a="role must be a number",p=!1);break;default:a="unknown key:"+y+" "+l[y],p=!1}}return{valid:p,tips:a}}}]),D}(),I6=u(function D(l){i(this,D),this.value=l,this.next=null}),g1=function(){function D(l){i(this,D),this.MAX_LENGTH=l,this.pTail=null,this.pNodeToDel=null,this.map=new Map}return u(D,[{key:"set",value:function(l){var p=new I6(l);if(this.map.size0&&a.members.forEach(function(c){c.userID===p.selfInfo.userID&&xi(p.selfInfo,c,["sequence"])})}},{key:"updateSelfInfo",value:function(l){var p={nameCard:l.nameCard,joinTime:l.joinTime,role:l.role,messageRemindType:l.messageRemindType,readedSequence:l.readedSequence,excludedUnreadSequenceList:l.excludedUnreadSequenceList};xi(this.selfInfo,r({},p),[],["",null,void 0,0,NaN])}},{key:"setSelfNameCard",value:function(l){this.selfInfo.nameCard=l}}]),D}(),Fw=function(D,l){return $e(D)?{lastTime:0,lastSequence:0,fromAccount:0,messageForShow:"",payload:null,type:"",isRevoked:!1,cloudCustomData:"",onlineOnlyFlag:!1,nick:"",nameCard:"",version:0,isPeerRead:!1,revoker:null}:D instanceof qr?{lastTime:D.time||0,lastSequence:D.sequence||0,fromAccount:D.from||"",messageForShow:Bu(D.type,D.payload,l),payload:D.payload||null,type:D.type||null,isRevoked:D.isRevoked||!1,cloudCustomData:D.cloudCustomData||"",onlineOnlyFlag:D._onlineOnlyFlag||!1,nick:D.nick||"",nameCard:D.nameCard||"",version:D.version||0,isPeerRead:D.isPeerRead||!1,revoker:D.revoker||null}:r(r({},D),{},{messageForShow:Bu(D.type,D.payload,l)})},lm=function(){function D(l,p){i(this,D),this.conversationID=l.conversationID||"",this.unreadCount=l.unreadCount||0,this.type=l.type||"",this.lastMessage=Fw(l.lastMessage,p),l.lastMsgTime&&(this.lastMessage.lastTime=l.lastMsgTime),this._isInfoCompleted=!1,this.peerReadTime=l.peerReadTime||0,this.groupAtInfoList=[],this.remark="",this.isPinned=l.isPinned||!1,this.messageRemindType=l.messageRemindType,this.markList=l.markList||[],this.customData=l.customData||"",this.conversationGroupList=l.conversationGroupList||[],this.draftText=l.draftText||"",this._initProfile(l)}return u(D,[{key:"toAccount",get:function(){return this.conversationID.startsWith(T.CONV_C2C)?this.conversationID.replace(T.CONV_C2C,""):this.conversationID.startsWith(T.CONV_GROUP)?this.conversationID.replace(T.CONV_GROUP,""):""}},{key:"subType",get:function(){return this.groupProfile?this.groupProfile.type:""}},{key:"_initProfile",value:function(l){var p=this;Object.keys(l).forEach(function(a){switch(a){case"userProfile":p.userProfile=l.userProfile;break;case"groupProfile":p.groupProfile=l.groupProfile}}),$e(this.userProfile)&&this.type===T.CONV_C2C?this.userProfile=new Rp({userID:l.conversationID.replace("C2C","")}):$e(this.groupProfile)&&this.type===T.CONV_GROUP&&(this.groupProfile=new El({groupID:l.conversationID.replace("GROUP","")}))}},{key:"updateUnreadCount",value:function(l){var p=l.nextUnreadCount,a=l.isFromGetConversations,c=l.isUnreadC2CMessage;$e(p)||(Ho(this.subType)?this.unreadCount=0:a&&this.type===T.CONV_GROUP||a&&this.type===T.CONV_TOPIC||c&&this.type===T.CONV_C2C?this.unreadCount=p:this.unreadCount=this.unreadCount+p)}},{key:"updateLastMessage",value:function(l){this.lastMessage=Fw(l)}},{key:"updateGroupAtInfoList",value:function(l){if(!this._isNeedMergeGroupAtInfo(l)){var p,a=(H(p=l.groupAtType)||q(p)||P(p)||j()).slice(0);a.indexOf(T.CONV_AT_ME)!==-1&&a.indexOf(T.CONV_AT_ALL)!==-1&&(a=[T.CONV_AT_ALL_AT_ME]);var c={from:l.from,groupID:l.groupID,topicID:l.topicID,messageSequence:l.sequence,atTypeArray:a,__random:l.__random,__sequence:l.__sequence};this.groupAtInfoList.push(c)}}},{key:"_isNeedMergeGroupAtInfo",value:function(l){var p=l.groupID,a=l.sequence;if(!mo({groupID:p}))return!1;var c=!1;return this.groupAtInfoList.forEach(function(h){h.messageSequence===a&&(h.atTypeArray.indexOf(T.CONV_AT_ME)>-1&&l.groupAtType.indexOf(T.CONV_AT_ALL)>-1&&(h.atTypeArray=[T.CONV_AT_ALL_AT_ME]),h.atTypeArray.indexOf(T.CONV_AT_ALL)>-1&&l.groupAtType.indexOf(T.CONV_AT_ME)>-1&&(h.atTypeArray=[T.CONV_AT_ALL_AT_ME],h.__random=l.__random,h.__sequence=l.__sequence),c=!0)}),c}},{key:"clearGroupAtInfoList",value:function(){this.groupAtInfoList.length=0}},{key:"reduceUnreadCount",value:function(){return this.unreadCount>=1&&(this.unreadCount-=1,!0)}},{key:"isLastMessageRevoked",value:function(l){var p=l.sequence,a=l.time;return this.type===T.CONV_C2C&&p===this.lastMessage.lastSequence&&a===this.lastMessage.lastTime||this.type===T.CONV_GROUP&&p===this.lastMessage.lastSequence}},{key:"setLastMessageRevoked",value:function(l){this.lastMessage.isRevoked=l}},{key:"setLastMessageRevoker",value:function(l){this.lastMessage.revoker=l}},{key:"setDraftText",value:function(l){this.draftText=l}}]),D}(),T6=function(){function D(l){i(this,D),this._conversationModule=l,this._n="MessageRemindHandler"}return u(D,[{key:"getC2CMessageRemindType",value:function(l){var p=this,a="".concat(this._n,".getC2CMessageRemindType");return this._conversationModule.request({protocolName:Q0,requestData:{toAccount:this._conversationModule.getMyUserID(),userIDList:l}}).then(function(c){U.l("".concat(a," ok. userIDList:").concat(l));var h=c.data.muteFlagList;p._conversationModule.onC2CMessageRemindTypeFetched(h)}).catch(function(c){U.e("".concat(a," failed. error:"),c)})}},{key:"set",value:function(l){return l.groupID?this._setGroupMessageRemindType(l):st(l.userIDList)?this._setC2CMessageRemindType(l):void 0}},{key:"_setGroupMessageRemindType",value:function(l){var p=this,a="".concat(this._n,"._setGroupMessageRemindType"),c=l.groupID,h=l.messageRemindType,m="groupID:".concat(c," messageRemindType:").concat(h),y=new We("setMessageRemindType");y.setMessage(m);var b=this._getModule(Tt);return b?b.modifyGroupMemberInfo({groupID:c,messageRemindType:h,userID:this._conversationModule.getMyUserID()}).then(function(){y.setNetworkType(p._conversationModule.getNetworkType()).end(),U.l("".concat(a," ok. ").concat(m));var C=p.onGroupMessageRemindTypeUpdated(l);return p._conversationModule.emitTotalUnreadMessageCountUpdate(),gt(C)}).catch(function(C){return p._conversationModule.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];y.setError(C,F,z).end()}),U.e("".concat(a," failed. error:"),C),Me(C)}):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"onGroupMessageRemindTypeUpdated",value:function(l){var p=l.groupID,a=l.messageRemindType;U.l("".concat(this._n,".onGroupMessageRemindTypeUpdated groupID:").concat(p," messageRemindType:").concat(a));var c=this._getModule(Tt).getLocalGroupProfile(p);if(c&&(c.selfInfo.messageRemindType=a),oo(p)){var h=p,m=Rr(h),y=this._getModule(ur).getLocalTopic(m,h);return y&&(y.updateSelfInfo({messageRemindType:a}),this._conversationModule.emitOuterEvent(R.TOPIC_UPDATED,{groupID:m,topic:y})),{topic:y}}return this._conversationModule.patchMessageRemindType({ID:p,isC2CConversation:!1,messageRemindType:a})&&this._emitConversationUpdate(),{group:c}}},{key:"_setC2CMessageRemindType",value:function(l){var p=this,a="".concat(this._n,"._setC2CMessageRemindType"),c=l.userIDList,h=l.messageRemindType,m=c.slice(0,30),y=0;h===T.MSG_REMIND_DISCARD?y=1:h===T.MSG_REMIND_ACPT_NOT_NOTE&&(y=2);var b="userIDList:".concat(m," messageRemindType:").concat(h),C=new We("setMessageRemindType");return C.setMessage(b),this._conversationModule.request({protocolName:Z0,requestData:{userIDList:m,muteFlag:y}}).then(function(E){C.setNetworkType(p._conversationModule.getNetworkType()).end();var N=E.data.errorList,F=[],z=[];st(N)&&N.forEach(function(_e){F.push(_e.userID),z.push({userID:_e.userID,code:_e.errorCode})});var Q=m.filter(function(_e){return F.indexOf(_e)===-1});U.l("".concat(a," ok. ").concat(b," successUserIDList:").concat(Q," failureUserIDList:").concat(JSON.stringify(z)));var me=0;return Q.forEach(function(_e){p._conversationModule.patchMessageRemindType({ID:_e,isC2CConversation:!0,messageRemindType:h})&&(me+=1)}),me>=1&&p._emitConversationUpdate(),m.length=F.length=0,p._conversationModule.emitTotalUnreadMessageCountUpdate(),Lt({successUserIDList:Q.map(function(_e){return{userID:_e}}),failureUserIDList:z})}).catch(function(E){return p._conversationModule.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];C.setError(E,z,Q).end()}),U.e("".concat(a," failed. error:"),E),Me(E)})}},{key:"_getModule",value:function(l){return this._conversationModule.getModule(l)}},{key:"_emitConversationUpdate",value:function(){this._conversationModule.emitConversationUpdate(!0,!1)}},{key:"reset",value:function(){U.l("".concat(this._n,".reset"))}}]),D}(),w6=function(){function D(l){i(this,D),this._conversationModule=l,this._n="ConvGroupHandler",this._convGroupMap=new Map,this._startIndex=0,this._pagingStatus=kr.NOT_START}return u(D,[{key:"setConvCustomData",value:function(l){var p=this,a="".concat(this._n,".").concat("setConvCustomData"),c=l.conversationIDList,h=l.customData;U.l("".concat(a," options:"),l);var m=new We("setConvCustomData");m.setMessage(JSON.stringify(l));var y={fromAccount:this._getMyUserID(),itemList:[]},b=[],C=[];return c.forEach(function(E){if(!p._hasLocalConversation(E))return p._onConversationNotFound(C,E),!0;if(!vo(E)&&!io(E))return p._onConversationIDInvalid(C,E),!0;var N={operationType:2,contactItem:void 0,customMark:h};vo(E)?N.contactItem={type:1,toAccount:E.replace(T.CONV_C2C,"")}:io(E)&&(N.contactItem={type:2,groupID:E.replace(T.CONV_GROUP,"")}),y.itemList.push(N)}),C.length===c.length?Lt({successConversationIDList:b,failureConversationIDList:C}):this._conversationModule.request({protocolName:ww,requestData:y}).then(function(E){m.setNetworkType(p._conversationModule.getNetworkType()).end(),U.l("".concat(a," ok"));var N=E.data.resultItem;if(st(N)){var F,z,Q=!1;N.forEach(function(me){F=p._concatConversationID(me.contactItem),me.resultCode===0?(b.push(F),(z=p._getLocalConversation(F))&&z.customData!==h&&(z.customData=h,Q=!0)):C.push({conversationID:F,code:me.resultCode,message:me.resultInfo})}),Q===!0&&p._emitConversationUpdate()}return gt({successConversationIDList:b,failureConversationIDList:C})}).catch(function(E){return p._conversationModule.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];m.setError(E,z,Q).end()}),U.e("".concat(a," failed. error:"),E),Me(E)})}},{key:"markConversation",value:function(l){var p=this;if(!this._conversationModule.canIUse(ce.CONV_MARK))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".").concat("markConversation"),c=l.conversationIDList,h=l.markType,m=l.enableMark;U.l("".concat(a," options:"),l);var y=new We("markConversation");y.setMessage(JSON.stringify(l));var b=void 0,C=void 0,E=this._getFlagBit(h);m===!0?C=[E]:b=[E];var N={fromAccount:this._getMyUserID(),itemList:[]},F=[],z=[];return c.forEach(function(Q){if(!p._hasLocalConversation(Q))return p._onConversationNotFound(z,Q),!0;if(!vo(Q)&&!io(Q))return p._onConversationIDInvalid(z,Q),!0;var me={operationType:1,contactItem:void 0,clearMark:b,setMark:C};vo(Q)?me.contactItem={type:1,toAccount:Q.replace(T.CONV_C2C,"")}:io(Q)&&(me.contactItem={type:2,groupID:Q.replace(T.CONV_GROUP,"")}),N.itemList.push(me)}),z.length===c.length?Lt({successConversationIDList:F,failureConversationIDList:z}):this._conversationModule.request({protocolName:Ug,requestData:N}).then(function(Q){y.setNetworkType(p._conversationModule.getNetworkType()).end(),U.l("".concat(a," ok"));var me=Q.data.resultItem;if(st(me)){var _e,we,Ue=!1;me.forEach(function(Ve){if(_e=p._concatConversationID(Ve.contactItem),Ve.resultCode===0){if(F.push(_e),we=p._getLocalConversation(_e)){var ot=we.markList.indexOf(h);m===!0?ot===-1&&(we.markList.push(h),Ue=!0):ot!==-1&&(we.markList.splice(ot,1),Ue=!0)}}else z.push({conversationID:_e,code:Ve.resultCode,message:Ve.resultInfo})}),Ue===!0&&p._emitConversationUpdate()}return gt({successConversationIDList:F,failureConversationIDList:z})}).catch(function(Q){return p._conversationModule.probeNetwork().then(function(me){var _e=A(me,2),we=_e[0],Ue=_e[1];y.setError(Q,we,Ue).end()}),U.e("".concat(a," failed. error:"),Q),Me(Q)})}},{key:"getLocalConvGroupList",value:function(){var l=this;return U.l("".concat(this._n,".getLocalConvGroupList pagingStatus:").concat(this._pagingStatus)),this._pagingStatus===kr.REJECTED?this.getRemoteConvGroupList().then(function(){return gt(O(l._convGroupMap.values()))}):Lt(O(this._convGroupMap.values()))}},{key:"getRemoteConvGroupList",value:function(){var l=this,p="".concat(this._n,".getRemoteConvGroupList");return this._pagingStatus=kr.PENDING,this._conversationModule.request({protocolName:c_,requestData:{fromAccount:this._getMyUserID(),startIndex:this._startIndex,startTime:Kr()}}).then(function(a){var c,h,m=a.data,y=m.completeFlag,b=m.contactItem,C=m.nextStartIndex,E=C===void 0?0:C,N=m.groupItem;if(l._startIndex=E,U.l("".concat(p," completeFlag:").concat(y," nextStartIndex:").concat(E)),st(N)&&N.forEach(function(F){var z=F.convGroupID,Q=F.groupName;l._convGroupMap.set(z,Q)}),st(b)&&b.forEach(function(F){var z=F.standardMark,Q=F.customData,me=F.convGroupIDList;if(c=l._concatConversationID(F),(h=l._getLocalConversation(c))&&(h.markList=gs(z),h.customData=Q||"",st(me))){var _e=[];me.forEach(function(we){l._convGroupMap.has(we)&&_e.push(l._convGroupMap.get(we))}),h.conversationGroupList=[].concat(_e),_e.length=0}}),y===0)return l.getRemoteConvGroupList();y===1&&(l._pagingStatus=kr.RESOLVED,l._emitConversationUpdate(),l._emitConvGroupListUpdate())}).catch(function(a){l._pagingStatus=kr.REJECTED,U.w("".concat(p," failed. error:"),a)})}},{key:"createConvGroup",value:function(l){var p=this;if(!this._conversationModule.canIUse(ce.CONV_GROUP))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".").concat("createConvGroup");U.l("".concat(a," options:"),l);var c=new We("createConvGroup");c.setMessage(JSON.stringify(l));var h=l.groupName,m=l.conversationIDList,y={fromAccount:this._getMyUserID(),itemList:[{groupName:h,contactItem:[]}]},b=[],C=[];return m.forEach(function(E){return p._hasLocalConversation(E)?vo(E)||io(E)?void(vo(E)?y.itemList[0].contactItem.push({type:1,toAccount:E.replace(T.CONV_C2C,"")}):io(E)&&y.itemList[0].contactItem.push({type:2,groupID:E.replace(T.CONV_GROUP,"")})):(p._onConversationIDInvalid(C,E),!0):(p._onConversationNotFound(C,E),!0)}),C.length===m.length?Lt({successConversationIDList:b,failureConversationIDList:C}):this._conversationModule.request({protocolName:Sw,requestData:y}).then(function(E){c.setNetworkType(p._conversationModule.getNetworkType()).end(),U.l("".concat(a," ok"));var N=E.data.groupResultItem[0],F=N.groupItem,z=N.resultItem;if(_n(F)&&(p._convGroupMap.set(F.convGroupID,F.groupName),p._emitConvGroupListUpdate()),st(z)){var Q,me,_e=!1;z.forEach(function(we){Q=p._concatConversationID(we.contactItem),we.resultCode===0?(b.push(Q),(me=p._getLocalConversation(Q))&&me.conversationGroupList.indexOf(h)===-1&&(me.conversationGroupList.push(h),_e=!0)):C.push({conversationID:Q,code:we.resultCode,message:we.resultInfo})}),_e===!0&&(p._emitConversationUpdate(),p._emitConvGroupListUpdate())}return gt({successConversationIDList:b,failureConversationIDList:C})}).catch(function(E){return p._conversationModule.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];c.setError(E,z,Q).end()}),U.e("".concat(a," failed. error:"),E),Me(E)})}},{key:"deleteConvGroup",value:function(l){var p=this;if(!this._conversationModule.canIUse(ce.CONV_GROUP))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".").concat("deleteConvGroup");U.l("".concat(a," groupName:").concat(l));var c=new We("deleteConvGroup");return c.setMessage(l),this._conversationModule.request({protocolName:u_,requestData:{fromAccount:this._getMyUserID(),groupName:[l]}}).then(function(h){c.setNetworkType(p._conversationModule.getNetworkType()).end(),U.l("".concat(a," ok"));var m=h.data.groupItem;if(st(m)){var y=!1;m.forEach(function(b){p._convGroupMap.has(b.convGroupID)&&(p._convGroupMap.delete(b.convGroupID),y=!0)}),y===!0&&p._emitConvGroupListUpdate()}p._eraseFromConversationGroupList([l])}).catch(function(h){return p._conversationModule.probeNetwork().then(function(m){var y=A(m,2),b=y[0],C=y[1];c.setError(h,b,C).end()}),U.e("".concat(a," failed. error:"),h),Me(h)})}},{key:"renameConvGroup",value:function(l){var p=this;if(!this._conversationModule.canIUse(ce.CONV_GROUP))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".").concat("renameConvGroup");U.l("".concat(a," options:"),l);var c=new We("renameConvGroup");c.setMessage(JSON.stringify(l));var h=l.oldName,m=l.newName;return this._conversationModule.request({protocolName:Ed,requestData:{fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:1,oldName:h,newName:m}}}).then(function(y){c.setNetworkType(p._conversationModule.getNetworkType()).end(),U.l("".concat(a," ok"));var b=y.data.updateGroupResult.convGroupID;p._convGroupMap.set(b,m),p._emitConvGroupListUpdate();var C,E,N=p._conversationModule.getLocalConversationList(),F=!1;N.forEach(function(z){C=z.conversationGroupList,(E=C.indexOf(h))!==-1&&(C.splice(E,1,m),F=!0)}),F===!0&&p._emitConversationUpdate()}).catch(function(y){return p._conversationModule.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];c.setError(y,E,N).end()}),U.e("".concat(a," failed. error:"),y),Me(y)})}},{key:"addConvsToGroup",value:function(l){var p=this;if(!this._conversationModule.canIUse(ce.CONV_GROUP))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".").concat("addConvsToGroup");U.l("".concat(a," options:"),l);var c=new We("addConvsToGroup");c.setMessage(JSON.stringify(l));var h=l.conversationIDList,m=l.groupName,y={fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:2,groupName:m,updateItem:[]}},b=[],C=[];return h.forEach(function(E){return p._hasLocalConversation(E)?vo(E)||io(E)?void(vo(E)?y.updateGroup.updateItem.push({operationType:1,contactItem:{type:1,toAccount:E.replace(T.CONV_C2C,"")}}):io(E)&&y.updateGroup.updateItem.push({operationType:1,contactItem:{type:2,groupID:E.replace(T.CONV_GROUP,"")}})):(p._onConversationIDInvalid(C,E),!0):(p._onConversationNotFound(C,E),!0)}),C.length===h.length?Lt({successConversationIDList:b,failureConversationIDList:C}):this._conversationModule.request({protocolName:kw,requestData:y}).then(function(E){c.setNetworkType(p._conversationModule.getNetworkType()).end(),U.l("".concat(a," ok"));var N=E.data.updateGroupResult.contactResultItem;if(st(N)){var F,z,Q=!1;N.forEach(function(me){F=p._concatConversationID(me.contactItem),me.resultCode===0?(z=p._getLocalConversation(F))&&z.conversationGroupList.indexOf(m)===-1&&(z.conversationGroupList.push(m),b.push(F),Q=!0):C.push({conversationID:F,code:me.resultCode,message:me.resultInfo})}),Q===!0&&(p._emitConversationUpdate(),p._emitConvInGroupUpdate(m))}return gt({successConversationIDList:b,failureConversationIDList:C})}).catch(function(E){return p._conversationModule.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];c.setError(E,z,Q).end()}),U.e("".concat(a," failed. error:"),E),Me(E)})}},{key:"deleteConvsFromGroup",value:function(l){var p=this;if(!this._conversationModule.canIUse(ce.CONV_GROUP))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".").concat("deleteConvsFromGroup");U.l("".concat(a," options:"),l);var c=new We("deleteConvsFromGroup");c.setMessage(JSON.stringify(l));var h=l.conversationIDList,m=l.groupName,y={fromAccount:this._getMyUserID(),updateType:1,updateGroup:{updateGroupType:2,groupName:m,updateItem:[]}},b=[],C=[];return h.forEach(function(E){return p._hasLocalConversation(E)?vo(E)||io(E)?void(vo(E)?y.updateGroup.updateItem.push({operationType:2,contactItem:{type:1,toAccount:E.replace(T.CONV_C2C,"")}}):io(E)&&y.updateGroup.updateItem.push({operationType:2,contactItem:{type:2,groupID:E.replace(T.CONV_GROUP,"")}})):(p._onConversationIDInvalid(C,E),!0):(p._onConversationNotFound(C,E),!0)}),C.length===h.length?Lt({successConversationIDList:b,failureConversationIDList:C}):this._conversationModule.request({protocolName:Dw,requestData:y}).then(function(E){c.setNetworkType(p._conversationModule.getNetworkType()).end(),U.l("".concat(a," ok"));var N=E.data.updateGroupResult.contactResultItem;if(st(N)){var F,z,Q=!1;N.forEach(function(me){if(F=p._concatConversationID(me.contactItem),me.resultCode===0){if(z=p._getLocalConversation(F)){var _e=z.conversationGroupList.indexOf(m);_e!==-1&&(z.conversationGroupList.splice(_e,1),b.push(F),Q=!0)}}else C.push({conversationID:F,code:me.resultCode,message:me.resultInfo})}),Q===!0&&(p._emitConversationUpdate(),p._emitConvInGroupUpdate(m))}return gt({successConversationIDList:b,failureConversationIDList:C})}).catch(function(E){return p._conversationModule.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];c.setError(E,z,Q).end()}),U.e("".concat(a," failed. error:"),E),Me(E)})}},{key:"onConvMarkUpdated",value:function(l){var p=this;if(!Ye(l)){var a,c;U.d("".concat(this._n,".onConvMarkUpdated markItemList:"),l);var h=!1;l.forEach(function(m){var y=m.recentContactItem,b=m.optType,C=m.standardMark,E=m.customMark;if(a=p._concatConversationID(y),c=p._getLocalConversation(a))if(b===1){var N=gs(C);(function(F,z){if(F===z)return!0;if(!F||!z||F.length!==z.length)return!1;for(var Q=0,me=F.length;Q=0;c--)if(p[c]==="1")return a-c-1}},{key:"_concatConversationID",value:function(l){var p,a=l.type,c=l.to,h=l.groupID,m=l.userID;return a===1?$e(m)?$e(c)||(p="".concat(T.CONV_C2C).concat(c)):p="".concat(T.CONV_C2C).concat(m):a===2&&(p="".concat(T.CONV_GROUP).concat(h)),p}},{key:"_getMyUserID",value:function(){return this._conversationModule.getMyUserID()}},{key:"_insertConversationGroup",value:function(l,p){var a=this._getLocalConversation(l);if(a){var c=a.conversationGroupList;c.indexOf(p)===-1&&c.push(p)}}},{key:"_getLocalConversation",value:function(l){return this._conversationModule.getLocalConversation(l)}},{key:"_hasLocalConversation",value:function(l){return this._conversationModule.hasLocalConversation(l)}},{key:"_emitConversationUpdate",value:function(){this._conversationModule.emitConversationUpdate(!0,!1)}},{key:"_emitConvGroupListUpdate",value:function(){this._conversationModule.emitOuterEvent(R.CONVERSATION_GROUP_LIST_UPDATED,O(this._convGroupMap.values()))}},{key:"_emitConvInGroupUpdate",value:function(l){var p={groupName:l,conversationList:[]},a=this._conversationModule.getLocalConversationList();p.conversationList=a.filter(function(c){return c.conversationGroupList.includes(l)}),this._conversationModule.emitOuterEvent(R.CONVERSATION_IN_GROUP_UPDATED,p)}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._convGroupMap.clear(),this._startIndex=0,this._pagingStatus=kr.NOT_START}}]),D}(),S6=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="ConversationModule",h1.mixin(w(c)),c._messageListHandler=new g6,c._messageRemindHandler=new T6(w(c)),c._convGroupHandler=new w6(w(c)),c.singlyLinkedList=new g1(100),c._pagingStatus=kr.NOT_START,c._pagingTimeStamp=0,c._pagingStartIndex=0,c._pagingPinnedTimeStamp=0,c._pagingPinnedStartIndex=0,c._pagingConvIDMap=new Map,c._convIDFromUnreadDBMap=new Map,c._conversationMap=new Map,c._tmpGroupList=[],c._tmpGroupAtTipsList=[],c._peerReadTimeMap=new Map,c._completedMap=new Map,c._roamingMessageKeyAndTimeMap=new Map,c._roamingMessageSequenceMap=new Map,c._remoteGroupReadSequenceMap=new Map,c._convTotalUnreadCount=0,c._pagingGetCostList=[],c._initListeners(),c}return u(p,[{key:"_initListeners",value:function(){var a=this.getInnerEmitterInstance();a.on(ir.A2KEY_AND_TINYID_UPDATED,this._init,this),a.on(ir.PROFILE_UPDATED,this._onProfileUpdated,this)}},{key:"onCheckTimer",value:function(a){a%60==0&&this._messageListHandler.traversal()}},{key:"_init",value:function(){var a=this;U.l("".concat(this._n,"._init"));var c=this.getModule(aa).getItem("conversationMap"),h=this.isIntl();if(c){for(var m=c.length,y=0;y0&&(a.updateConversationGroupProfile(a._tmpGroupList),a._tmpGroupList.length=0)}),this.syncConversationList()}},{key:"_isNonExistentAccount",value:function(a){var c;return a.startsWith(T.CONV_C2C)&&(c=a.replace(T.CONV_C2C,"")),c==="@TLS#ERROR"||c==="@TLS#NOT_FOUND"}},{key:"onMessageSent",value:function(a){this._onSendOrReceiveMessage({conversationOptionsList:a.conversationOptionsList,isInstantMessage:!0})}},{key:"onNewMessage",value:function(a){this._onSendOrReceiveMessage(a)}},{key:"_onSendOrReceiveMessage",value:function(a){var c=this,h=a.conversationOptionsList,m=a.isInstantMessage,y=m===void 0||m,b=a.isUnreadC2CMessage,C=b!==void 0&&b,E=a.updateUnreadCount,N=E===void 0||E,F=a.isSyncingEnded,z=F!==void 0&&F;this._isReady?h.length!==0?(y===!0&&this._checkNewConversation(h),this._updateLocalConversationList({conversationOptionsList:h,isInstantMessage:y,isUnreadC2CMessage:C,isFromGetConversations:!1,updateUnreadCount:N}),y||(this._convIDFromUnreadDBMap=new Map([].concat(O(this._convIDFromUnreadDBMap),O(h.map(function(Q){return[Q.conversationID,1]})))),this._diffAndDeleteConversation(),z&&this.emitInnerEvent(ir.C2C_UNREAD_HANDLE_COMPLETED)),h.filter(function(Q){return Q.type===T.CONV_TOPIC}).length>0||this.emitConversationUpdate()):z&&this.emitInnerEvent(ir.C2C_UNREAD_HANDLE_COMPLETED):this.ready(function(){c._onSendOrReceiveMessage(a)})}},{key:"updateConversationGroupProfile",value:function(a){var c=this;if(!st(a)||a.length!==0)if(this._conversationMap.size!==0){var h=!1;a.forEach(function(m){var y="GROUP".concat(m.groupID);if(c._conversationMap.has(y)){h=!0;var b=c._conversationMap.get(y);b.groupProfile=JSON.parse(JSON.stringify(m)),b.lastMessage.lastSequence=0;C--)if(!y[C].isDeleted){b=y[C];break}var E=this._conversationMap.get(m);if(E){var N=!1;E.lastMessage.lastSequence===b.sequence&&E.lastMessage.lastTime===b.time||(Ye(b)&&(b=void 0),E.updateLastMessage(b),E.type!==T.CONV_TOPIC&&(N=!0),U.l("".concat(this._n,".onMessageDeleted. update conversationID:").concat(m," with lastMessage:"),E.lastMessage)),m.startsWith(T.CONV_C2C)&&this.updateUnreadCount(m),N&&this.emitConversationUpdate(!0,!1)}}}},{key:"onMessageModified",value:function(a){var c=a.conversationType,h=a.from,m=a.to,y=a.time,b=a.sequence,C=a.elements,E=a.cloudCustomData,N=a.messageVersion,F=this.getMyUserID(),z="".concat(c).concat(m);m===F&&c===T.CONV_C2C&&(z="".concat(c).concat(h));var Q=this._messageListHandler.onMessageModified(z,a),me=Q.isUpdated,_e=Q.message;me===!0&&this.emitOuterEvent(R.MESSAGE_MODIFIED,[_e]);var we=this._isTopicConversation(z);if(U.l("".concat(this._n,".onMessageModified isUpdated:").concat(me," isTopicMessage:").concat(we," from:").concat(h," to:").concat(m)),we)this.getModule(ur).onMessageModified(a);else{var Ue=this._conversationMap.get(z);if(Ue){var Ve=Ue.lastMessage;U.d("".concat(this._n.onMessageModified," lastMessage:"),JSON.stringify(Ve),"options:",JSON.stringify(a)),Ve&&Ve.lastTime===y&&Ve.lastSequence===b&&Ve.version!==N&&(Ve.type=C[0].type,Ve.payload=C[0].content,Ve.messageForShow=Bu(Ve.type,Ve.payload,this.isIntl()),Ve.cloudCustomData=E,Ve.version=N,this.emitConversationUpdate(!0,!1))}}return _e}},{key:"onNewGroupAtTips",value:function(a){var c=this,h=a.dataList,m=null;h.forEach(function(y){y.groupAtTips?m=y.groupAtTips:y.elements?m=r(r({},y.elements),{},{sync:!0}):y.groupAtType&&(m=r(r({},y),{},{sync:!0})),m.__random=y.random,m.__sequence=y.clientSequence,c._tmpGroupAtTipsList.push(m)}),U.d("".concat(this._n,".onNewGroupAtTips isReady:").concat(this._isReady),this._tmpGroupAtTipsList),this._isReady&&this._handleGroupAtTipsList()}},{key:"_handleGroupAtTipsList",value:function(){var a=this;if(this._tmpGroupAtTipsList.length!==0){var c=!1;this._tmpGroupAtTipsList.forEach(function(h){var m=h.groupID,y=h.from,b=h.topicID,C=b===void 0?void 0:b,E=h.sync,N=E!==void 0&&E;if(y!==a.getMyUserID())if($e(C)){var F=a._conversationMap.get("".concat(T.CONV_GROUP).concat(m));F&&(F.updateGroupAtInfoList(h),c=!0)}else{var z=a._conversationMap.get("".concat(T.CONV_GROUP).concat(C));if(z){z.updateGroupAtInfoList(h);var Q=a.getModule(ur),me=z.groupAtInfoList;Q.onConversationProxy({topicID:C,groupAtInfoList:me})}Ye(z)&&N&&(a.updateTopicConversation([{conversationID:"".concat(T.CONV_GROUP).concat(C),type:T.CONV_TOPIC}]),a._conversationMap.get("".concat(T.CONV_GROUP).concat(C)).updateGroupAtInfoList(h))}}),c&&this.emitConversationUpdate(!0,!1),this._tmpGroupAtTipsList.length=0}}},{key:"_checkNewConversation",value:function(a){var c=this,h=[],m=[];a.forEach(function(y){c._conversationMap.has(y.conversationID)||(y.type===T.CONV_C2C?h.push(y.conversationID.replace(T.CONV_C2C,"")):y.type===T.CONV_GROUP&&m.push(y.conversationID.replace(T.CONV_GROUP,"")))}),h.length>0&&(this._onNewC2CConversation(h),h=null),m.length>0&&(this._onNewGroupConversation(m),m=null)}},{key:"_onNewC2CConversation",value:function(a){this.getModule(ao).getRemotePeerReadTime(a),this._messageRemindHandler.getC2CMessageRemindType(a)}},{key:"_onNewGroupConversation",value:function(a){var c=this.getModule(Tt);c&&c.getMessageRemindType(a)}},{key:"_setStorageConversationList",value:function(){var a=arguments.length>0&&arguments[0]!==void 0&&arguments[0],c=this.getLocalConversationList(),h=c.filter(function(y){return y.type===T.CONV_C2C||y.type===T.CONV_GROUP&&y.lastMessage.type!==T.MSG_GRP_TIP}).slice(0,20).map(function(y){return{conversationID:y.conversationID,type:y.type,subType:y.subType,lastMessage:y.lastMessage,groupProfile:y.groupProfile,userProfile:y.userProfile}}),m=this.getModule(aa);m.setItem("conversationMap",h,a)}},{key:"emitConversationUpdate",value:function(){var a=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],c=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=this.getLocalConversationList();if(c){var m=this.getModule(Tt);m&&m.updateGroupLastMessage(h)}a&&this.emitOuterEvent(R.CONVERSATION_LIST_UPDATED)}},{key:"getLocalConversationList",value:function(){return O(this._conversationMap.values()).filter(function(a){return a.type!==T.CONV_TOPIC})}},{key:"getLocalConversation",value:function(a){return this._conversationMap.get(a)}},{key:"hasLocalConversation",value:function(a){return this._conversationMap.has(a)}},{key:"getLocalOldestMessage",value:function(a){return this._messageListHandler.getLocalOldestMessage(a)}},{key:"syncConversationList",value:function(){var a=this,c=new We("syncConversationList");return this._pagingStatus===kr.NOT_START&&this._conversationMap.clear(),this._pagingGetConversationList().then(function(h){var m=hp(a._pagingGetCostList),y=ms(a._pagingGetCostList);a._pagingGetCostList.length=0,a._pagingStatus=kr.RESOLVED,a._diffAndDeleteConversation(),a.emitConversationUpdate(!0,!1),a._setStorageConversationList(),a._handleC2CPeerReadTime(),a.emitInnerEvent(ir.CONV_SYNC_COMPLETED);var b="count:".concat(a._conversationMap.size," sum:").concat(y," avg:").concat(m);return U.l("".concat(a._n,".").concat("syncConversationList",". ").concat(b)),c.setMessage(b).setNetworkType(a.getNetworkType()).end(),h}).catch(function(h){return a._pagingStatus=kr.REJECTED,c.setMessage(a._pagingTimeStamp),a.probeNetwork().then(function(m){var y=A(m,2),b=y[0],C=y[1];c.setError(h,b,C).end()}),Me(h)})}},{key:"_diffAndDeleteConversation",value:function(){var a=this;if(this._isSyncCompleted()){var c=[];this._conversationMap.forEach(function(h,m){!a._pagingConvIDMap.has(m)&&a._convIDFromUnreadDBMap.has(m)&&(a._conversationMap.delete(m),c.push(m))}),U.l("".concat(this._n,"._diffAndDeleteConversation list:").concat(c)),c=null}}},{key:"_pagingGetConversationList",value:function(){var a=this,c="".concat(this._n,"._pagingGetConversationList");U.l("".concat(c," timeStamp:").concat(this._pagingTimeStamp," startIndex:").concat(this._pagingStartIndex)+" pinnedTimeStamp:".concat(this._pagingPinnedTimeStamp," pinnedStartIndex:").concat(this._pagingPinnedStartIndex));var h=Date.now();return this._pagingStatus=kr.PENDING,this.request({protocolName:o_,requestData:{fromAccount:this.getMyUserID(),timeStamp:this._pagingTimeStamp,startIndex:this._pagingStartIndex,pinnedTimeStamp:this._pagingPinnedTimeStamp,pinnedStartIndex:this._pagingPinnedStartIndex,orderType:1}}).then(function(m){var y=m.data,b=y.completeFlag,C=y.conversations,E=C===void 0?[]:C,N=y.timeStamp,F=y.startIndex,z=y.pinnedTimeStamp,Q=y.pinnedStartIndex,me=y.groupItem,_e=Date.now()-h;if(a._pagingGetCostList.push(_e),U.l("".concat(c," ok. completeFlag:").concat(b," count:").concat(E.length," cost ").concat(_e," ms")),a._convGroupHandler.onConvGroupListSynced(me),E.length>0){var we=a._getConversationOptions(E);a._pagingConvIDMap=new Map([].concat(O(a._pagingConvIDMap),O(we.map(function(Ue){return[Ue.conversationID,1]})))),a._updateLocalConversationList({conversationOptionsList:we,isFromGetConversations:!0}),a.isLoggedIn()&&a.emitConversationUpdate()}if(!a._isReady){if(!a.isLoggedIn())return Lt();a.triggerReady()}return a._pagingTimeStamp=N,a._pagingStartIndex=F,a._pagingPinnedTimeStamp=z,a._pagingPinnedStartIndex=Q,b!==1?a._pagingGetConversationList():(a._handleGroupAtTipsList(),a._convGroupHandler.getRemoteConvGroupList(),Lt())}).catch(function(m){throw a.isLoggedIn()&&(a._isReady||(U.w("".concat(c," failed. error:"),m),a.triggerReady())),m})}},{key:"_updateLocalConversationList",value:function(a){var c,h=a.isFromGetConversations,m=a.isInstantMessage,y=Date.now();c=this._getTmpConversationListMapping(a),this._conversationMap=new Map(this._sortConversationList([].concat(O(c.toBeUpdatedConversationList),O(this._conversationMap)))),h||(this._updateUserOrGroupProfile(c.newConversationList),m&&this.emitTotalUnreadMessageCountUpdate()),U.d("".concat(this._n,"._updateLocalConversationList cost ").concat(Date.now()-y," ms"))}},{key:"_getTmpConversationListMapping",value:function(a){for(var c=a.conversationOptionsList,h=a.isFromGetConversations,m=a.isInstantMessage,y=a.isUnreadC2CMessage,b=y!==void 0&&y,C=a.updateUnreadCount,E=[],N=[],F=this.getModule(Tt),z=this.getModule(_r),Q=this.isIntl(),me=0,_e=c.length;me<_e;me++){var we=new lm(c[me],Q),Ue=we.conversationID;if(!this._isNonExistentAccount(Ue))if(this._conversationMap.has(Ue)){var Ve=this._conversationMap.get(Ue),ot=["unreadCount","allowType","adminForbidType","payload","isPinned"];m===!1&&ot.push("lastMessage");var vt=c[me].lastMessage,Ut=!$e(vt);Ut||c[me].type===T.CONV_TOPIC||this._onLastMessageNotExist(c[me]),$e(m)&&Ut&&Ve.lastMessage.payload===null&&(Ve.lastMessage.payload=vt.payload),Ye(Ve.lastMessage.revoker)||(Ve.lastMessage.revoker=null),xi(Ve,we,ot,[null,void 0,"",0,NaN]),C===!0&&Ve.updateUnreadCount({nextUnreadCount:we.unreadCount,isFromGetConversations:h,isUnreadC2CMessage:b}),m&&Ut&&(vt.payload&&(Ve.lastMessage.payload=vt.payload),Ve.type===T.CONV_GROUP&&(Ve.lastMessage.nameCard=vt.nameCard,Ve.lastMessage.nick=vt.nick)),Ut&&Ve.lastMessage.cloudCustomData!==vt.cloudCustomData&&(Ve.lastMessage.cloudCustomData=vt.cloudCustomData||""),this._conversationMap.delete(Ue),E.push([Ue,Ve])}else{if(we.type===T.CONV_GROUP&&F){var mn=we.groupProfile.groupID,bn=F.getLocalGroupProfile(mn);bn&&(we.groupProfile=bn,C===!0&&we.updateUnreadCount({nextUnreadCount:0}))}else if(we.type===T.CONV_C2C){var Nr=Ue.replace(T.CONV_C2C,"");z&&z.isMyFriend(Nr)&&(we.remark=z.getFriendRemark(Nr))}N.push(we),E.push([Ue,we])}}for(var lo=this.getModule(ur),Vo=E.length,ii=0;ii0&&y.getUserProfile({userIDList:h}).then(function(C){var E=C.data;st(E)?E.forEach(function(N){c._doUpdateUserProfile("C2C".concat(N.userID),N)}):c._doUpdateUserProfile("C2C".concat(E.userID),E)}),m.length>0&&b.getGroupProfileAdvance({groupIDList:m,responseFilter:{groupBaseInfoFilter:["Type","Name","FaceUrl"]}}).then(function(C){C.data.successGroupList.forEach(function(E){var N="GROUP".concat(E.groupID);if(c._conversationMap.has(N)){var F=c._conversationMap.get(N);xi(F.groupProfile,E,[],[null,void 0,"",0,NaN]),!F.subType&&E.type&&(F.subType=E.type)}})})}}},{key:"_doUpdateUserProfile",value:function(a,c){this.hasLocalConversation(a)&&(this.getLocalConversation(a).userProfile=c)}},{key:"_getConversationOptions",value:function(a){var c=this,h=[],m=a.filter(function(C){var E=C.type,N=C.userID;return E===1&&!c._isNonExistentAccount(N)||E===2}),y=this.getMyUserID(),b=m.map(function(C){if($e(C.lastMsg)&&(C.lastMsg={elements:[]}),C.type===1){var E={userID:C.userID,nick:C.peerNick,avatar:C.peerAvatar};return h.push(E),{conversationID:"C2C".concat(C.userID),type:"C2C",lastMessage:{lastTime:C.time,lastSequence:C.sequence,fromAccount:C.lastC2CMsgFromAccount,type:C.lastMsg.elements[0]?C.lastMsg.elements[0].type:null,payload:C.lastMsg.elements[0]?c._amendLayersOverLimitProperty(C.lastMsg.elements[0].content):null,cloudCustomData:C.lastMsg.cloudCustomData||"",isRevoked:C.lastMessageFlag===8,onlineOnlyFlag:!1,nick:"",nameCard:"",version:0,isPeerRead:C.lastC2CMsgFromAccount===y&&C.time<=C.c2cPeerReadTime,revoker:C.lastMsg.revokerInfo?C.lastMsg.revokerInfo.revoker:null},userProfile:new Rp(E),peerReadTime:C.c2cPeerReadTime,isPinned:C.isPinned===1,customData:C.customMark||"",markList:gs(C.standardMark),conversationGroupList:c._convGroupHandler.getConvGroupListByID(C.contactGroupId),remark:C.friendRemark||"",messageRemindType:c._transMessageRemindType(C.messageRemindType)}}return{conversationID:"GROUP".concat(C.groupID),type:"GROUP",lastMessage:r(r({lastTime:C.time,lastSequence:C.sequence,fromAccount:C.msgGroupFromAccount},c._patchTypeAndPayload(C)),{},{cloudCustomData:C.lastMsg.cloudCustomData||"",isRevoked:C.lastMessageFlag===2,onlineOnlyFlag:!1,nick:C.senderNick||"",nameCard:C.senderNameCard||"",revoker:C.lastMsg.revokerInfo?C.lastMsg.revokerInfo.revoker:null}),groupProfile:new El({groupID:C.groupID,name:C.groupNick,avatar:C.groupImage,type:C.groupType,nextMessageSeq:C.nextMessageSeq}),unreadCount:c._computeGroupUnreadCount(C),peerReadTime:0,isPinned:C.isPinned===1,version:0,customData:C.customMark||"",markList:gs(C.standardMark),conversationGroupList:c._convGroupHandler.getConvGroupListByID(C.contactGroupId),messageRemindType:c._transMessageRemindType(C.messageRemindType)}});return h.length>0&&this.getModule(yr).onConversationsProfileUpdated(h),b}},{key:"_transMessageRemindType",value:function(a){var c="";return a===0?c=T.MSG_REMIND_ACPT_AND_NOTE:a===1?c=T.MSG_REMIND_DISCARD:a===2&&(c=T.MSG_REMIND_ACPT_NOT_NOTE),c}},{key:"_computeGroupUnreadCount",value:function(a){var c=a.unreadCount,h=c===void 0?0:c,m=a.noUnreadCount,y=h-(m===void 0?0:m);return y>0?y:0}},{key:"_patchTypeAndPayload",value:function(a){var c=a.lastMsg,h=c.event,m=h===void 0?void 0:h,y=c.elements,b=y===void 0?[]:y,C=c.groupTips,E=C===void 0?{}:C;if(!$e(m)&&!Ye(E)){var N=new qr(E);N.setElement({type:T.MSG_GRP_TIP,content:r(r({},E.elements),{},{groupProfile:E.groupProfile})});var F=JSON.parse(JSON.stringify(N.payload));return N=null,{type:T.MSG_GRP_TIP,payload:F}}return{type:b[0]?b[0].type:null,payload:b[0]?this._amendLayersOverLimitProperty(b[0].content):null}}},{key:"_amendLayersOverLimitProperty",value:function(a){var c=a.layersOverLimit;return c===0?a.layersOverLimit=!1:c===1&&(a.layersOverLimit=!0),a}},{key:"getLocalMessageList",value:function(a){return this._messageListHandler.getLocalMessageList(a)}},{key:"deleteLocalMessage",value:function(a){a instanceof qr&&this._messageListHandler.remove(a)}},{key:"onConversationDeleted",value:function(a){if(st(a)){var c=a.map(function(h){var m=h.type,y=h.userID,b=h.groupID;return m===1?"".concat(T.CONV_C2C).concat(y):m===2?"".concat(T.CONV_GROUP).concat(b):void 0});U.l("".concat(this._n,".onConversationDeleted conversationIDList:").concat(c)),this.deleteLocalConversationList(c)}}},{key:"onConversationPinned",value:function(a){var c=this;if(st(a)){var h=!1;a.forEach(function(m){var y,b=m.type,C=m.userID,E=m.groupID;b===1?y=c.getLocalConversation("".concat(T.CONV_C2C).concat(C)):b===2&&(y=c.getLocalConversation("".concat(T.CONV_GROUP).concat(E))),y&&(U.l("".concat(c._n,".onConversationPinned conversationID:").concat(y.conversationID," isPinned:").concat(y.isPinned)),y.isPinned||(y.isPinned=!0,h=!0))}),h&&this._sortConversationListAndEmitEvent()}}},{key:"onConversationUnpinned",value:function(a){var c=this;if(st(a)){var h=!1;a.forEach(function(m){var y,b=m.type,C=m.userID,E=m.groupID;b===1?y=c.getLocalConversation("".concat(T.CONV_C2C).concat(C)):b===2&&(y=c.getLocalConversation("".concat(T.CONV_GROUP).concat(E))),y&&(U.l("".concat(c._n,".onConversationUnpinned conversationID:").concat(y.conversationID," isPinned:").concat(y.isPinned)),y.isPinned&&(y.isPinned=!1,h=!0))}),h&&this._sortConversationListAndEmitEvent()}}},{key:"getMessageList",value:function(a){var c=this,h=a.conversationID,m=a.nextReqMessageID,y=a.count,b="".concat(this._n,".getMessageList"),C=this.getLocalConversation(h),E="";if(C&&C.groupProfile&&(E=C.groupProfile.type),Ho(E))return U.l("".concat(b," not available in avchatroom. conversationID:").concat(h)),Lt({messageList:[],nextReqMessageID:"",isCompleted:!0});($e(y)||y>15)&&(y=15),!m&&this._isNotInCommunity(h)&&(this._messageListHandler.removeByConversationID(h),this._completedMap.delete(h),this._roamingMessageSequenceMap.delete(h));var N=this._computeRemainingCount({conversationID:h,nextReqMessageID:m}),F=this._completedMap.has(h);if(U.l("".concat(b," conversationID:").concat(h," nextReqMessageID:").concat(m)+" remainingCount:".concat(N," count:").concat(y," isCompleted:").concat(F)),this._needGetHistory({conversationID:h,remainingCount:N,count:y}))return this.getHistoryMessages({conversationID:h,nextReqMessageID:m,count:20}).then(function(Q){var me=Q.nextReqID,_e=Q.storedMessageList,we=c._completedMap.has(h),Ue=_e;N>0&&(Ue=c._messageListHandler.getLocalMessageList(h).slice(0,_e.length+N));var Ve={nextReqMessageID:we?"":me,messageList:Ue,isCompleted:we};return U.l("".concat(b," ret.nextReqMessageID:").concat(Ve.nextReqMessageID," ret.isCompleted:").concat(Ve.isCompleted," ret.length:").concat(Ue.length)),gt(Ve)});this.modifyMessageList(h);var z=this._getMessageListFromMemory({conversationID:h,nextReqMessageID:m,count:y});return Lt(z)}},{key:"_getMessageListFromMemory",value:function(a){var c=a.conversationID,h=a.nextReqMessageID,m=a.count,y="".concat(this._n,"._getMessageListFromMemory"),b=this._messageListHandler.getLocalMessageList(c),C=b.length,E=0,N={isCompleted:!1,nextReqMessageID:"",messageList:[]};return h?(E=b.findIndex(function(F){return F.ID===h}))>m?(N.messageList=b.slice(E-m,E),N.nextReqMessageID=b[E-m].ID):(N.messageList=b.slice(0,E),N.isCompleted=!0):C>m?(E=C-m,N.messageList=b.slice(E,C),N.nextReqMessageID=b[E].ID):(N.messageList=b.slice(0,C),N.isCompleted=!0),U.l("".concat(y," conversationID:").concat(c)+" ret.nextReqMessageID:".concat(N.nextReqMessageID," ret.isCompleted:").concat(N.isCompleted," ret.length:").concat(N.messageList.length)),N}},{key:"getMessageListHopping",value:function(a){var c=a.conversationID,h=a.sequence,m=a.time,y=a.count,b=a.direction,C=b===void 0?0:b;if(($e(y)||y>15)&&(y=15),c.startsWith(T.CONV_C2C)){var E=this.getModule(ao),N=c.replace(T.CONV_C2C,"");return E.getRoamingMessagesHopping({peerAccount:N,time:m,count:y,direction:C})}if(c.startsWith(T.CONV_GROUP)){var F=this.getModule(Tt),z=c.replace(T.CONV_GROUP,"");return F.getRoamingMessagesHopping({groupID:z,sequence:h,count:y,direction:C})}}},{key:"_computeRemainingCount",value:function(a){var c=a.conversationID,h=a.nextReqMessageID,m=this._messageListHandler.getLocalMessageList(c),y=m.length;if(!h)return y;var b=0;return vo(c)?b=m.findIndex(function(C){return C.ID===h}):io(c)&&(b=h.indexOf("-")!==-1?m.findIndex(function(C){return C.ID===h}):m.findIndex(function(C){return C.sequence===h})),b===-1&&(b=0),b}},{key:"_getMessageListSize",value:function(a){return this._messageListHandler.getLocalMessageList(a).length}},{key:"_needGetHistory",value:function(a){var c=a.conversationID,h=a.remainingCount,m=a.count,y=this.getLocalConversation(c),b="";return y&&y.groupProfile&&(b=y.groupProfile.type),!Sd(c)&&!Ho(b)&&!(io(c)&&this._isPagingGetGroupListCompleted()&&this._getLocalGroupCount()<=4e3&&!this._hasLocalGroup(c)&&!this._isTopicConversation(c))&&h<=m&&!this._completedMap.has(c)}},{key:"_isTopicConversation",value:function(a){var c=a.replace(T.CONV_GROUP,"");return oo(c)}},{key:"getHistoryMessages",value:function(a){var c=a.conversationID,h=a.count;if(c===T.CONV_SYSTEM)return Lt();var m=15;h>20&&(m=20);var y=null;if(vo(c)){var b=this._roamingMessageKeyAndTimeMap.has(c);return(y=this.getModule(ao))?y.getRoamingMessage({conversationID:c,peerAccount:c.replace(T.CONV_C2C,""),count:m,lastMessageTime:b?this._roamingMessageKeyAndTimeMap.get(c).lastMessageTime:0,messageKey:b?this._roamingMessageKeyAndTimeMap.get(c).messageKey:""}):Me({code:Le.CANNOT_FIND_MODULE})}if(io(c)){if(!(y=this.getModule(Tt)))return Me({code:Le.CANNOT_FIND_MODULE});var C=null;this._conversationMap.has(c)&&(C=this._conversationMap.get(c).lastMessage);var E=0;C&&(E=C.lastSequence);var N=this._roamingMessageSequenceMap.get(c);return y.getRoamingMessage({conversationID:c,groupID:c.replace(T.CONV_GROUP,""),count:m,sequence:N||E})}return Lt()}},{key:"patchConversationLastMessage",value:function(a){var c=this.getLocalConversation(a);if(c){var h=c.lastMessage,m=h.messageForShow,y=h.payload;if(Ye(m)||Ye(y)){var b=this._messageListHandler.getLocalMessageList(a);if(b.length===0)return;var C=b[b.length-1];U.l("".concat(this._n,".patchConversationLastMessage conversationID:").concat(a," payload:"),C.payload),c.updateLastMessage(C)}}}},{key:"onRoamingMessage",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],c=arguments.length>1?arguments[1]:void 0,h=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],m=c.startsWith(T.CONV_C2C)?T.CONV_C2C:T.CONV_GROUP,y=null,b=[],C=[],E=0,N=a.length,F=null,z=m===T.CONV_GROUP,Q=this.getFileDownloadProxy(),me=function(){E=z?a.length-1:0,N=z?0:a.length},_e=function(){z?--E:++E},we=function(){return z?E>=N:E0&&arguments[0]!==void 0?arguments[0]:{},h="setAllMessageRead",m="".concat(this._n,".").concat(h);c.scope||(c.scope=T.READ_ALL_MSG),U.l("".concat(m," options:"),c);var y=this._createSetAllMessageReadPack(c);if(y.readAllC2CMessage===0&&y.groupMessageReadInfoList.length===0)return Lt();var b=new We(h);return this.request({protocolName:Bg,requestData:y}).then(function(C){var E=C.data,N=a._handleAllMessageRead(E);return b.setMessage("scope:".concat(c.scope," failureGroups:").concat(JSON.stringify(N))).setNetworkType(a.getNetworkType()).end(),Lt()}).catch(function(C){return a.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];b.setError(C,F,z).end()}),U.w("".concat(m," failed. error:"),C),Me({code:C&&C.code?C.code:Le.MSG_UNREAD_ALL_FAIL,message:C&&C.message?C.message:void 0})})}},{key:"setConversationCustomData",value:function(a){return this._convGroupHandler.setConvCustomData(a)}},{key:"markConversation",value:function(a){return this._convGroupHandler.markConversation(a)}},{key:"getConversationGroupList",value:function(){return this._convGroupHandler.getLocalConvGroupList()}},{key:"createConversationGroup",value:function(a){return this._convGroupHandler.createConvGroup(a)}},{key:"deleteConversationGroup",value:function(a){return this._convGroupHandler.deleteConvGroup(a)}},{key:"renameConversationGroup",value:function(a){return this._convGroupHandler.renameConvGroup(a)}},{key:"addConversationsToGroup",value:function(a){return this._convGroupHandler.addConvsToGroup(a)}},{key:"deleteConversationsFromGroup",value:function(a){return this._convGroupHandler.deleteConvsFromGroup(a)}},{key:"onConversationMarkUpdated",value:function(a){this._convGroupHandler.onConvMarkUpdated(a)}},{key:"onConversationGroupCreated",value:function(a){this._convGroupHandler.onConvGroupCreated(a)}},{key:"onConversationGroupDeleted",value:function(a){this._convGroupHandler.onConvGroupDeleted(a)}},{key:"onConversationGroupNameUpdated",value:function(a){this._convGroupHandler.onConvGroupNameUpdated(a)}},{key:"onConversationInGroupUpdated",value:function(a){this._convGroupHandler.onConvInGroupUpdated(a)}},{key:"onConversationAddedToOrDeletedFromGroup",value:function(a){this._convGroupHandler.onConvAddedToOrDeletedFromGroup(a)}},{key:"_getConversationLastMessageSequence",value:function(a){var c=this._messageListHandler.getLocalLastMessage(a.conversationID),h=a.lastMessage.lastSequence;return c&&h0){if(b.type===T.CONV_C2C&&h.readAllC2CMessage===0){if(m===T.READ_ALL_MSG)h.readAllC2CMessage=1;else if(m===T.READ_ALL_C2C_MSG){h.readAllC2CMessage=1;break}}else if(b.type===T.CONV_GROUP&&(m===T.READ_ALL_GROUP_MSG||m===T.READ_ALL_MSG)){var C=this._getConversationLastMessageSequence(b);h.groupMessageReadInfoList.push({groupID:b.groupProfile.groupID,messageSequence:C})}}}}catch(E){y.e(E)}finally{y.f()}return h}},{key:"onPushedAllMessageRead",value:function(a){this._handleAllMessageRead(a)}},{key:"_handleAllMessageRead",value:function(a){var c=a.groupMessageReadInfoList,h=a.readAllC2CMessage,m=this._parseGroupReadInfo(c);return this._updateAllConversationUnreadCount({readAllC2CMessage:h})>=1&&(this.emitConversationUpdate(!0,!1),this.emitTotalUnreadMessageCountUpdate()),m}},{key:"_parseGroupReadInfo",value:function(a){var c=[];if(a&&a.length)for(var h=0,m=a.length;h=1){if(h===1&&E.type===T.CONV_C2C){var N=this._getConversationLastMessageTime(E);this.updateIsReadAfterReadReport({conversationID:C,lastMessageTime:N})}else if(E.type===T.CONV_GROUP){var F=C.replace(T.CONV_GROUP,"");if(this._remoteGroupReadSequenceMap.has(F)){var z=this._remoteGroupReadSequenceMap.get(F),Q=this._getConversationLastMessageSequence(E);this.updateIsReadAfterReadReport({conversationID:C,remoteReadSequence:z}),Q>=z&&this._remoteGroupReadSequenceMap.delete(F)}}this.updateUnreadCount(C,!1)&&(m+=1)}}}catch(me){y.e(me)}finally{y.f()}return m}},{key:"isRemoteRead",value:function(a){var c=a.conversationID,h=a.sequence,m=c.replace(T.CONV_GROUP,""),y=!1;if(this._remoteGroupReadSequenceMap.has(m)){var b=this._remoteGroupReadSequenceMap.get(m);h<=b&&(y=!0,U.l("".concat(this._n,".isRemoteRead conversationID:").concat(c," messageSequence:").concat(h," remoteReadSequence:").concat(b))),h>=b+10&&this._remoteGroupReadSequenceMap.delete(m)}return y}},{key:"updateIsReadAfterReadReport",value:function(a){var c=a.conversationID,h=a.lastMessageSeq,m=a.lastMessageTime,y=this._messageListHandler.getLocalMessageList(c);if(y.length!==0){for(var b,C=y.length-1;C>=0;C--)if(b=y[C],!(m&&b.time>m||h&&b.sequence>h)){if(b.flow==="in"&&b.isRead)break;b.setIsRead(!0)}}}},{key:"updateUnreadCount",value:function(a){var c=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=!1,m=this.getLocalConversation(a),y=this._messageListHandler.getLocalMessageList(a);if(m){var b=m.unreadCount,C=y.filter(function(z){return!z.isRead&&!z._onlineOnlyFlag&&!z.isDeleted}).length;if(b!==C&&(m.unreadCount=C,h=!0,U.l("".concat(this._n,".updateUnreadCount from ").concat(b," to ").concat(C,", conversationID:").concat(a)),c===!0&&(this.emitConversationUpdate(!0,!1),this.emitTotalUnreadMessageCountUpdate())),h&&m.type===T.CONV_TOPIC){var E=m.unreadCount,N=this.getModule(ur),F=a.replace(T.CONV_GROUP,"");N.onConversationProxy({topicID:F,unreadCount:E})}return h}}},{key:"clearGroupAtInfoList",value:function(a){var c=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=this.getLocalConversation(a);if(h&&h.groupAtInfoList.length>0){if(h.clearGroupAtInfoList(),U.l("".concat(this._n,".clearGroupAtInfoList conversationID:").concat(a)),h.type===T.CONV_TOPIC){var m=h.groupAtInfoList,y=this.getModule(ur),b=a.replace(T.CONV_GROUP,"");y.onConversationProxy({topicID:b,groupAtInfoList:m})}c===!0&&this.emitConversationUpdate(!0,!1)}}},{key:"updateReadReceiptInfo",value:function(a){var c=this,h=a.userID,m=h===void 0?void 0:h,y=a.groupID,b=y===void 0?void 0:y,C=a.readReceiptList;if(!Ye(C)){var E=[];if($e(m)){if(!$e(b)){var N="".concat(T.CONV_GROUP).concat(b);C.forEach(function(z){var Q=z.tinyID,me=z.clientTime,_e=z.random,we=z.readCount,Ue=z.unreadCount,Ve="".concat(Q,"-").concat(me,"-").concat(_e),ot=c._messageListHandler.getLocalMessage(N,Ve),vt={groupID:b,messageID:Ve,readCount:0,unreadCount:0};ot&&(un(we)&&(ot.readReceiptInfo.readCount=we,vt.readCount=we),un(Ue)&&(ot.readReceiptInfo.unreadCount=Ue,vt.unreadCount=Ue),E.push(vt))})}}else{var F="".concat(T.CONV_C2C).concat(m);C.forEach(function(z){var Q=z.tinyID,me=z.clientTime,_e=z.random,we="".concat(Q,"-").concat(me,"-").concat(_e),Ue=c._messageListHandler.getLocalMessage(F,we);if(Ue){Ue.readReceiptInfo.isPeerRead=!0;var Ve={userID:m,messageID:we,isPeerRead:!0};E.push(Ve)}})}E.length>0&&this.emitOuterEvent(R.MESSAGE_READ_RECEIPT_RECEIVED,E)}}},{key:"updateIsRead",value:function(a){var c=this.getLocalConversation(a),h=this.getLocalMessageList(a);if(c&&h.length!==0&&!Sd(c.type)){for(var m=[],y=0,b=h.length;y0){var h=this._messageListHandler.updateMessageIsPeerReadProperty(a,c);if(h.length>0&&this.emitOuterEvent(R.MESSAGE_READ_BY_PEER,h),this._conversationMap.has(a)){var m=this._conversationMap.get(a).lastMessage;Ye(m)||m.fromAccount===this.getMyUserID()&&m.lastTime<=c&&!m.isPeerRead&&(m.isPeerRead=!0,this.emitConversationUpdate(!0,!1))}}}},{key:"updateMessageIsModifiedProperty",value:function(a){this._messageListHandler.updateMessageIsModifiedProperty(a)}},{key:"setCompleted",value:function(a){U.l("".concat(this._n,".setCompleted. conversationID:").concat(a)),this._completedMap.set(a,!0)}},{key:"updateRoamingMessageKeyAndTime",value:function(a,c,h){this._roamingMessageKeyAndTimeMap.set(a,{messageKey:c,lastMessageTime:h})}},{key:"updateRoamingMessageSequence",value:function(a,c){this._roamingMessageSequenceMap.set(a,c)}},{key:"getConversationList",value:function(a){var c=this,h="".concat(this._n,".").concat("getConversationList"),m="pagingStatus:".concat(this._pagingStatus,", local conversation count:").concat(this._conversationMap.size,", options:").concat(a);if(U.l("".concat(h,". ").concat(m)),this._pagingStatus===kr.REJECTED){var y=new We("getConversationList");return y.setMessage(m),this.syncConversationList().then(function(){y.setNetworkType(c.getNetworkType()).end();var C=c._getConversationList(a);return gt({conversationList:C,isSyncCompleted:c._isSyncCompleted()})}).catch(function(C){return c.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];y.setError(C,F,z).end()}),U.e("".concat(h," failed. error:"),C),Me(C)})}var b=this._getConversationList(a);return U.l("".concat(h,". returned conversation count:").concat(b.length)),Lt({conversationList:b,isSyncCompleted:this._isSyncCompleted()})}},{key:"_getConversationList",value:function(a){if($e(a))return this.getLocalConversationList();if(st(a))return a.length===0?[]:this.getLocalConversationList().filter(function(y){return a.includes(y.conversationID)});if(_n(a)){var c=a.type,h=a.markType,m=a.groupName;return this.getLocalConversationList().filter(function(y){return(c!==T.CONV_C2C&&c!==T.CONV_GROUP||y.type===c)&&(!At(m)||y.conversationGroupList.includes(m))&&(!un(h)||y.markList.includes(h))})}return[]}},{key:"_handleC2CPeerReadTime",value:function(){var a,c=$(this._conversationMap);try{for(c.s();!(a=c.n()).done;){var h=A(a.value,2),m=h[0],y=h[1];y.type===T.CONV_C2C&&(U.d("".concat(this._n,"._handleC2CPeerReadTime conversationID:").concat(m," peerReadTime:").concat(y.peerReadTime)),this.recordPeerReadTime(m,y.peerReadTime))}}catch(b){c.e(b)}finally{c.f()}}},{key:"_isPagingGetGroupListCompleted",value:function(){var a=this.getModule(Tt);return!a||a.isPagingGetCompleted()}},{key:"_getLocalGroupCount",value:function(){var a=this.getModule(Tt);return a?a.getLocalGroupList().length:0}},{key:"_hasLocalGroup",value:function(a){var c=this.getModule(Tt);return!!c&&c.hasLocalGroup(a.replace(T.CONV_GROUP,""))}},{key:"getConversationProfile",value:function(a){var c,h=this;if((c=this._conversationMap.has(a)?this._conversationMap.get(a):new lm({conversationID:a,type:a.slice(0,3)===T.CONV_C2C?T.CONV_C2C:T.CONV_GROUP},this.isIntl()))._isInfoCompleted||c.type===T.CONV_SYSTEM)return Lt({conversation:c});if(io(a)&&!this._hasLocalGroup(a))return Lt({conversation:c});var m="".concat(this._n,".").concat("getConversationProfile"),y=new We("getConversationProfile");return U.l("".concat(m,". conversationID:").concat(a," remark:").concat(c.remark," lastMessage:"),c.lastMessage),this._updateUserOrGroupProfileCompletely(c).then(function(b){y.setNetworkType(h.getNetworkType()).setMessage("conversationID:".concat(a," unreadCount:").concat(b.data.conversation.unreadCount)).end();var C=h.getModule(_r);if(C&&c.type===T.CONV_C2C){var E=a.replace(T.CONV_C2C,"");if(C.isMyFriend(E)){var N=C.getFriendRemark(E);c.remark!==N&&(c.remark=N,U.l("".concat(m,". conversationID:").concat(a," patch remark:").concat(c.remark)))}}return U.l("".concat(m," ok. conversationID:").concat(a)),b}).catch(function(b){return h.probeNetwork().then(function(C){var E=A(C,2),N=E[0],F=E[1];y.setError(b,N,F).setMessage("conversationID:".concat(a)).end()}),U.e("".concat(m," failed. error:"),b),Me(b)})}},{key:"_updateUserOrGroupProfileCompletely",value:function(a){var c=this;return a.type===T.CONV_C2C?this.getModule(yr).getUserProfile({userIDList:[a.toAccount]}).then(function(h){var m=h.data;return m.length===0?Me(new Fn({code:Le.USER_OR_GRP_NOT_FOUND})):(a.userProfile=m[0],a._isInfoCompleted=!0,c._unshiftConversation(a),Lt({conversation:a}))}):this.getModule(Tt).getGroupProfile({groupID:a.toAccount}).then(function(h){return a.groupProfile=h.data.group,a._isInfoCompleted=!0,c._unshiftConversation(a),Lt({conversation:a})})}},{key:"_unshiftConversation",value:function(a){a instanceof lm&&!this._conversationMap.has(a.conversationID)&&(this._conversationMap=new Map([[a.conversationID,a]].concat(O(this._conversationMap))),this._setStorageConversationList(),this.emitConversationUpdate(!0,!1))}},{key:"_onProfileUpdated",value:function(a){var c=this;a.data.forEach(function(h){var m=h.userID;if(m===c.getMyUserID())c._onMyProfileModified({latestNick:h.nick,latestAvatar:h.avatar});else{var y=c._conversationMap.get("".concat(T.CONV_C2C).concat(m));y&&(y.userProfile=h)}})}},{key:"_isSyncCompleted",value:function(){return this._pagingStatus===kr.RESOLVED}},{key:"_errorLog",value:function(a,c,h,m){var y=new Error("Params validate failed."),b="".concat(this.getErrorMessage("API_REFER")).concat(a);throw U.w("[".concat(a,"] | ").concat(c," | ").concat(this.getErrorMessage(h,m),", ").concat(b)),U.e("[".concat(a,"] Invalid ").concat(c,": type check failed for ").concat(c,".")),y}},{key:"_isValidConversationID",value:function(a){return vo(a)||io(a)||Sd(a)}},{key:"deleteConversation",value:function(a){var c=this,h="deleteConversation";return At(a)||es(a)||this._errorLog(h,"options","StringOrObjectRequiredLog"),At(a)?(this._isValidConversationID(a)||this._errorLog(h,"options","InvalidConversationID",a),U.l("".concat(this._n,".").concat(h," conversationID:").concat(a)),this.deleteConversationList({conversationIDList:[a],flag:1})):(st(a.conversationIDList)||this._errorLog(h,"conversationIDList","ArrayRequiredLog"),a.conversationIDList.length===0&&this._errorLog(h,"conversationIDList","NonEmptyArrayLog"),a.conversationIDList.forEach(function(m){c._isValidConversationID(m)||c._errorLog(h,"conversationIDList","InvalidConversationID",m)}),"clearHistoryMessage"in a&&typeof a.clearHistoryMessage!="boolean"&&this._errorLog(h,"clearHistoryMessage","BooleanRequiredLog"),a.conversationIDList.length>100&&(a.conversationIDList=a.conversationIDList.slice(0,100)),this.deleteConversationList(a))}},{key:"deleteConversationList",value:function(a){var c=this,h=a.conversationIDList,m=h===void 0?[]:h,y=a.clearHistoryMessage,b=y===void 0||y,C=a.flag,E=C===void 0?0:C,N="".concat(this._n,".").concat("deleteConversationList");U.l("".concat(N," conversationIDList.length:").concat(m.length," clearHistoryMessage:").concat(b));var F=new We("deleteConversationList");return F.setMessage("conversationIDList:".concat(m)),Promise.all([this.rmLocalOnlyConversationList(m),this.rmLocalAndRemoteConversationList(m,b)]).then(function(z){F.setNetworkType(c.getNetworkType()).end();var Q=[].concat(O(z[0]),O(z[1]));return Q.length===0?Me(new Fn({code:Le.CONV_NOT_FOUND})):(U.l("".concat(N," ok")),Lt(E===1?{conversationID:Q[0]}:{conversationIDList:Q}))}).catch(function(z){return c.probeNetwork().then(function(Q){var me=A(Q,2),_e=me[0],we=me[1];F.setError(z,_e,we).end()}),U.e("".concat(N," failed. error:"),z),Me(z)})}},{key:"rmLocalOnlyConversationList",value:function(a){var c=this;return a.filter(function(h){if(!c._conversationMap.has(h))return!1;var m=c.getLocalConversation(h).type;return m!==T.CONV_GROUP||c._hasLocalGroup(h)?m===T.CONV_SYSTEM&&(c.getModule(Tt).deleteGroupSystemNotice({messageList:c._messageListHandler.getLocalMessageList(h)}),c.deleteLocalConversation(h),!0):(c.deleteLocalConversation(h),!0)})}},{key:"rmLocalAndRemoteConversationList",value:function(a,c){var h=this,m={fromAccount:this.getMyUserID(),conversationList:[],clearHistoryMessage:c?1:0};return a.forEach(function(y){if(h._conversationMap.has(y)){var b=h.getLocalConversation(y).type;b===T.CONV_C2C?m.conversationList.push({toAccount:y.replace(b,""),type:1}):b===T.CONV_GROUP&&h._hasLocalGroup(y)&&m.conversationList.push({toGroupID:y.replace(b,""),type:2})}}),m.conversationList.length===0?[]:this.request({protocolName:i_,requestData:m}).then(function(y){var b=[];return y.data.resultList.length>0&&y.data.resultList.map(function(C){if(C.code===0){var E=C.type===1?"".concat(T.CONV_C2C).concat(C.to):"".concat(T.CONV_GROUP).concat(C.groupID);b.push(E)}}),h.deleteLocalConversationList(b),b})}},{key:"setConversationDraft",value:function(a){var c=a.conversationID,h=a.draftText,m="".concat(this._n,".").concat("setConversationDraft");if(U.l("".concat(m," conversationID:").concat(c," draftText:").concat(h)),!this._conversationMap.has(c))return Me({code:Le.CONV_NOT_FOUND});var y=this._conversationMap.get(c);return y.setDraftText(h),Lt({code:0,conversation:y})}},{key:"clearHistoryMessage",value:function(a){var c=this,h={fromAccount:this.getMyUserID(),toAccount:void 0,type:void 0,toGroupID:void 0};if(!this._conversationMap.has(a))return Me({code:Le.CONV_NOT_FOUND});var m=this._conversationMap.get(a).type;if(m===T.CONV_C2C)h.type=1,h.toAccount=a.replace(T.CONV_C2C,"");else{if(m!==T.CONV_GROUP)return m===T.CONV_SYSTEM?(this.getModule(Tt).deleteGroupSystemNotice({messageList:this._messageListHandler.getLocalMessageList(a)}),Lt({conversationID:a})):Me({code:Le.CONV_UN_RECORDED_TYPE});h.type=2,h.toGroupID=a.replace(T.CONV_GROUP,"")}var y="".concat(this._n,".").concat("clearHistoryMessage"),b=new We("clearHistoryMessage");return b.setMessage("conversationID:".concat(a)),U.l("".concat(y,". conversationID:").concat(a)),this.setMessageRead({conversationID:a}).then(function(){return c.request({protocolName:s_,requestData:h})}).then(function(){b.setNetworkType(c.getNetworkType()).end(),U.l("".concat(y," ok")),c._messageListHandler.removeByConversationID(a),c.setCompleted(a);var C=c.getLocalConversation(a);return C&&(C.updateLastMessage(),c._sortConversationListAndEmitEvent()),Lt({conversationID:a})}).catch(function(C){return c.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];b.setError(C,F,z).end()}),U.e("".concat(y," failed. error:"),C),Me(C)})}},{key:"pinConversation",value:function(a){var c=this,h=a.conversationID,m=a.isPinned;if(!this._conversationMap.has(h))return Me({code:Le.CONV_NOT_FOUND});var y=this.getLocalConversation(h);if(y.isPinned===m)return Lt({conversationID:h});var b="".concat(this._n,".").concat("pinConversation"),C=new We("pinConversation");C.setMessage("conversationID:".concat(h," isPinned:").concat(m)),U.l("".concat(b,". conversationID:").concat(h," isPinned:").concat(m));var E=null;return vo(h)?E={type:1,toAccount:h.replace(T.CONV_C2C,"")}:io(h)&&(E={type:2,groupID:h.replace(T.CONV_GROUP,"")}),this.request({protocolName:a_,requestData:{fromAccount:this.getMyUserID(),operationType:m===!0?1:2,itemList:[E]}}).then(function(){return C.setNetworkType(c.getNetworkType()).end(),U.l("".concat(b," ok")),y.isPinned!==m&&(y.isPinned=m,c._sortConversationListAndEmitEvent()),gt({conversationID:h})}).catch(function(N){return c.probeNetwork().then(function(F){var z=A(F,2),Q=z[0],me=z[1];C.setError(N,Q,me).end()}),U.e("".concat(b," failed. error:"),N),Me(N)})}},{key:"setMessageRemindType",value:function(a){return this._messageRemindHandler.set(a)}},{key:"patchMessageRemindType",value:function(a){var c=a.ID,h=a.isC2CConversation,m=a.messageRemindType,y=!1,b=this.getLocalConversation(h?"".concat(T.CONV_C2C).concat(c):"".concat(T.CONV_GROUP).concat(c));return b&&b.messageRemindType!==m&&(b.messageRemindType=m,y=!0),U.d("".concat(this._n,".patchMessageRemindType options:"),a,"ret:".concat(y)),y}},{key:"onC2CMessageRemindTypeFetched",value:function(a){var c=this;if(st(a)&&a.length>0){var h=0;a.forEach(function(m){var y=m.userID,b=m.muteFlag,C=c._transMessageRemindType(b);c.patchMessageRemindType({ID:y,isC2CConversation:!0,messageRemindType:C})===!0&&(h+=1)}),U.l("".concat(this._n,".onC2CMessageRemindTypeFetched updateCount:").concat(h)),h>=1&&this.emitConversationUpdate(!0,!1)}}},{key:"onC2CMessageRemindTypeSynced",value:function(a){var c=this,h="".concat(this._n,".onC2CMessageRemindTypeSynced");U.d(h,a),a.dataList.forEach(function(m){if(!Ye(m.muteNotificationsSync)){var y=m.muteNotificationsSync,b=y.to,C=y.muteFlag,E=c._transMessageRemindType(C),N=0;c.patchMessageRemindType({ID:b,isC2CConversation:!0,messageRemindType:E})&&(N+=1),U.l("".concat(h," updateCount:").concat(N)),N>=1&&c.emitConversationUpdate(!0,!1)}})}},{key:"onGroupMessageRemindTypeUpdated",value:function(a){U.d("".concat(this._n,".onGroupMessageRemindTypeUpdated options:"),a),this._messageRemindHandler.onGroupMessageRemindTypeUpdated(a)}},{key:"deleteLocalConversation",value:function(a){var c=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=this._conversationMap.has(a);if(U.d("".concat(this._n,".deleteLocalConversation conversationID:").concat(a," has:").concat(h)),h&&(this._conversationMap.delete(a),this._roamingMessageKeyAndTimeMap.has(a)&&this._roamingMessageKeyAndTimeMap.delete(a),this._roamingMessageSequenceMap.has(a)&&this._roamingMessageSequenceMap.delete(a),this._setStorageConversationList(),this._messageListHandler.removeByConversationID(a),this._completedMap.delete(a),c)){var m=!this._isTopicConversation(a);this.emitConversationUpdate(m,!1)}}},{key:"deleteLocalConversationList",value:function(a){var c=this,h=0,m=!1;a.forEach(function(y){c._conversationMap.has(y)&&(h+=c._conversationMap.get(y).unreadCount||0,c.deleteLocalConversation(y,!1),m=!0)}),U.l("".concat(this._n,".deleteLocalConversationList conversationIDList.length:").concat(a.length," isConvIDExisted:").concat(m)),m&&(this.emitConversationUpdate(!0,!1),h>0&&this.emitTotalUnreadMessageCountUpdate())}},{key:"isMessageSentByCurrentInstance",value:function(a){return!(!this._messageListHandler.hasLocalMessage(a.conversationID,a.ID)&&!this.singlyLinkedList.has(a.random))}},{key:"modifyMessageList",value:function(a){if(a.startsWith(T.CONV_C2C)&&this._conversationMap.has(a)){var c=this._conversationMap.get(a),h=Date.now();this._messageListHandler.modifyMessageSentByPeer({conversationID:a,latestNick:c.userProfile.nick,latestAvatar:c.userProfile.avatar});var m=this.getModule(yr).getNickAndAvatarByUserID(this.getMyUserID());this._messageListHandler.modifyMessageSentByMe({conversationID:a,latestNick:m.nick,latestAvatar:m.avatar}),U.l("".concat(this._n,".modifyMessageList conversationID:").concat(a," cost ").concat(Date.now()-h," ms"))}}},{key:"updateUserProfileSpecifiedKey",value:function(a){U.l("".concat(this._n,".updateUserProfileSpecifiedKey options:"),a);var c=a.conversationID,h=a.nick,m=a.avatar;if(this._conversationMap.has(c)){var y=this._conversationMap.get(c).userProfile;At(h)&&y.nick!==h&&(y.nick=h),At(m)&&y.avatar!==m&&(y.avatar=m),this.emitConversationUpdate(!0,!1)}}},{key:"_onMyProfileModified",value:function(a){var c=this,h=this.getLocalConversationList(),m=Date.now();h.forEach(function(y){c.modifyMessageSentByMe(r({conversationID:y.conversationID},a))}),U.l("".concat(this._n,"._onMyProfileModified. modify all messages sent by me, cost ").concat(Date.now()-m," ms"))}},{key:"modifyMessageSentByMe",value:function(a){this._messageListHandler.modifyMessageSentByMe(a)}},{key:"getLatestMessageSentByMe",value:function(a){return this._messageListHandler.getLatestMessageSentByMe(a)}},{key:"modifyMessageSentByPeer",value:function(a){this._messageListHandler.modifyMessageSentByPeer(a)}},{key:"getLatestMessageSentByPeer",value:function(a){return this._messageListHandler.getLatestMessageSentByPeer(a)}},{key:"pushIntoNoticeResult",value:function(a,c){return!(!this._messageListHandler.pushIn(c)||this.singlyLinkedList.has(c.random))&&(a.push(c),!0)}},{key:"getLocalLastMessage",value:function(a){return this._messageListHandler.getLocalLastMessage(a)}},{key:"checkAndPatchRemark",value:function(){var a=this.getModule(_r);if(this._conversationMap.size!==0&&a){var c=O(this._conversationMap.values()).filter(function(m){return m.type===T.CONV_C2C});if(c.length!==0){var h=0;c.forEach(function(m){var y=m.conversationID.replace(T.CONV_C2C,"");if(a.isMyFriend(y)){var b=a.getFriendRemark(y);m.remark!==b&&(m.remark=b,h+=1)}}),U.l("".concat(this._n,".checkAndPatchRemark. c2c conversation count:").concat(c.length,", patched count:").concat(h))}}}},{key:"updateTopicConversation",value:function(a){this._updateLocalConversationList({conversationOptionsList:a,isFromGetConversations:!0})}},{key:"sendReadReceipt",value:function(a){var c=a[0],h=null;return c.conversationType===T.CONV_C2C?h=this._m.getModule(ao):c.conversationType===T.CONV_GROUP&&(h=this._m.getModule(Tt)),h?h.sendReadReceipt(a):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getReadReceiptList",value:function(a){var c=a[0],h=null;return c.conversationType===T.CONV_C2C?h=this._m.getModule(ao):c.conversationType===T.CONV_GROUP&&(h=this._m.getModule(Tt)),h?h.getReadReceiptList(a):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getLastMessageTime",value:function(a){var c=this.getLocalConversation(a);return c?c.lastMessage.lastTime:0}},{key:"getTotalUnreadMessageCount",value:function(){var a=this.getLocalConversationList(),c=0;return a.forEach(function(h){h.type!==T.CONV_SYSTEM&&(h.messageRemindType!==""&&h.messageRemindType!==T.MSG_REMIND_ACPT_AND_NOTE||(c+=h.unreadCount))}),c}},{key:"emitTotalUnreadMessageCountUpdate",value:function(){var a=this.getTotalUnreadMessageCount();this._convTotalUnreadCount!==a&&(U.l("".concat(this._n,".emitTotalUnreadMessageCountUpdate from ").concat(this._convTotalUnreadCount," to ").concat(a)),this._convTotalUnreadCount=a,this.emitOuterEvent(R.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED))}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._setStorageConversationList(!0),this._pagingStatus=kr.NOT_START,this._messageListHandler.reset(),this._messageRemindHandler.reset(),this._roamingMessageKeyAndTimeMap.clear(),this._roamingMessageSequenceMap.clear(),this.singlyLinkedList.reset(),this._peerReadTimeMap.clear(),this._completedMap.clear(),this._conversationMap.clear(),this._pagingTimeStamp=0,this._pagingStartIndex=0,this._pagingPinnedTimeStamp=0,this._pagingPinnedStartIndex=0,this._remoteGroupReadSequenceMap.clear(),this._convTotalUnreadCount=0,this._pagingGetCostList.length=0,this._pagingConvIDMap.clear(),this._convIDFromUnreadDBMap.clear(),this._pagingGetCostList.length=0,this.resetReady()}}]),p}(Er),k6=function(){function D(l){i(this,D),this._groupModule=l,this._n="GroupTipsHandler",this._cachedGroupTipsMap=new Map,this._checkCountMap=new Map,this.MAX_CHECK_COUNT=4,this._getTopicPendingMap=new Map}return u(D,[{key:"onCheckTimer",value:function(l){l%1==0&&this._cachedGroupTipsMap.size>0&&this._checkCachedGroupTips()}},{key:"_checkCachedGroupTips",value:function(){var l=this;this._cachedGroupTipsMap.forEach(function(p,a){var c=l._checkCountMap.get(a),h=l._groupModule.hasLocalGroup(a);U.l("".concat(l._n,"._checkCachedGroupTips groupID:").concat(a," hasLocalGroup:").concat(h," checkCount:").concat(c)),h?(l._notifyCachedGroupTips(a),l._checkCountMap.delete(a),l._groupModule.deleteUnjoinedAVChatRoom(a)):c>=l.MAX_CHECK_COUNT?(l._deleteCachedGroupTips(a),l._checkCountMap.delete(a)):(c++,l._checkCountMap.set(a,c))})}},{key:"onNewGroupTips",value:function(l){U.d("".concat(this._n,".onReceiveGroupTips count:").concat(l.dataList.length));var p=this.newGroupTipsStoredAndSummary(l),a=p.eventDataList,c=p.result,h=p.AVChatRoomMessageList;h.length>0&&this._groupModule.onAVChatRoomMessage(h),a.length>0&&(this._groupModule.updateNextMessageSeq(a),this._groupModule.getModule(dt).onNewMessage({conversationOptionsList:a,isInstantMessage:!0})),c.length>0&&(this._groupModule.emitOuterEvent(R.MESSAGE_RECEIVED,c),this.handleMessageList(c))}},{key:"newGroupTipsStoredAndSummary",value:function(l){for(var p=this,a=l.event,c=l.dataList,h=null,m=[],y=[],b={},C=[],E=function(z,Q){var me=wd(c[z]);if(a===6&&(p._groupModule.isGroupAttributesUpdatedNotice(me)||p._groupModule.isGroupCountersNotice(me)))return"continue";var _e=me.groupProfile,we=_e.groupID,Ue=_e.communityType,Ve=Ue===void 0?0:Ue,ot=_e.topicID,vt=ot===void 0?void 0:ot,Ut=_e.invisible,mn=void 0,bn=p._groupModule.isMessageFromTopic(Ve,vt);if(bn){mn=T.CONV_TOPIC,me.to=vt;var Nr=p._groupModule.getModule(ur);Nr.hasLocalTopic(we,vt)||p._getTopicPendingMap.has(vt)||(p._getTopicPendingMap.set(vt,1),Nr.getTopicList({groupID:we,topicIDList:[vt]}).finally(function(){p._getTopicPendingMap.delete(vt)}))}var lo=p._groupModule.hasLocalGroup(we);if(!lo&&p._groupModule.isUnjoinedAVChatRoom(we))return"continue";if(!lo&&!bn)return p._cacheGroupTipsAndProbe({groupID:we,event:a,item:me}),"continue";if(p._groupModule.isMessageFromOrToAVChatroom(we))return me.event=a,C.push(me),"continue";if(me.currentUser=p._groupModule.getMyUserID(),me.conversationType=T.CONV_GROUP,(h=new qr(me)).setElement({type:T.MSG_GRP_TIP,content:r(r({},me.elements),{},{groupProfile:me.groupProfile})}),h.isSystemMessage=!1,Ut===1)return p._qualityStat(h),"continue";var Vo=p._groupModule.getModule(dt),ii=h,yo=ii.conversationID,ns=ii.sequence;if(a===6)h._onlineOnlyFlag=!0,y.push(h);else if(!Vo.pushIntoNoticeResult(y,h))return"continue";if(p._groupModule.isMessageFromCommunityOfTopic(Ve,vt)||a===6&&Vo.getLocalConversation(yo))return"continue";a!==6&&p._qualityStat(h);var Ii=Vo.isRemoteRead({conversationID:yo,sequence:ns});if($e(b[yo])){var vs=0;h.flow==="in"&&(h._isExcludedFromUnreadCount||h._onlineOnlyFlag||Ii||(vs=1)),b[yo]=m.push({conversationID:yo,unreadCount:vs,type:$e(mn)?h.conversationType:mn,subType:h.conversationSubType,lastMessage:h._isExcludedFromLastMessage?"":h})-1}else{var $s=b[yo];m[$s].type=h.conversationType,m[$s].subType=h.conversationSubType,m[$s].lastMessage=h._isExcludedFromLastMessage?"":h,h.flow==="in"&&(h._isExcludedFromUnreadCount||h._onlineOnlyFlag||Ii||m[$s].unreadCount++)}},N=0,F=c.length;N=0){C.updateSelfInfo({muteTime:F.muteTime}),E=!0;break}}E&&this._groupModule.emitOuterEvent(R.TOPIC_UPDATED,{groupID:b,topic:C})}}},{key:"_onTopicProfileUpdated",value:function(l){var p=l.payload,a=p.groupProfile.groupID,c=p.newTopicInfo;this._groupModule.getModule(ur).onTopicProfileUpdated(r({groupID:a,topicID:l.to},c))}},{key:"_cacheGroupTips",value:function(l,p){this._cachedGroupTipsMap.has(l)||this._cachedGroupTipsMap.set(l,[]),this._cachedGroupTipsMap.get(l).push(p)}},{key:"_deleteCachedGroupTips",value:function(l){this._cachedGroupTipsMap.has(l)&&this._cachedGroupTipsMap.delete(l)}},{key:"_notifyCachedGroupTips",value:function(l){var p=this,a=this._cachedGroupTipsMap.get(l)||[];a.forEach(function(c){p.onNewGroupTips(c)}),this._deleteCachedGroupTips(l),U.l("".concat(this._n,"._notifyCachedGroupTips groupID:").concat(l," count:").concat(a.length))}},{key:"_cacheGroupTipsAndProbe",value:function(l){var p=this,a=l.groupID,c=l.event,h=l.item;this._cacheGroupTips(a,{event:c,dataList:[h]}),this._groupModule.getGroupSimplifiedInfo(a).then(function(m){m.type===T.GRP_AVCHATROOM?p._groupModule.hasLocalGroup(a)?p._notifyCachedGroupTips(a):p._groupModule.setUnjoinedAVChatRoom(a):(p._groupModule.updateGroupMap([m]),p._notifyCachedGroupTips(a))}),this._checkCountMap.has(a)||this._checkCountMap.set(a,0),U.l("".concat(this._n,"._cacheGroupTipsAndProbe groupID:").concat(a))}},{key:"reset",value:function(){this._cachedGroupTipsMap.clear(),this._checkCountMap.clear(),this._getTopicPendingMap.clear()}}]),D}(),D6=function(){function D(l){i(this,D),this._groupModule=l,this._n="CommonGroupHandler",this.tempConversationList=null,this._cachedGroupMessageMap=new Map,this._checkCountMap=new Map,this.MAX_CHECK_COUNT=4,this.PAGING_GRP_COUNT_LIMIT=200,this._getTopicPendingMap=new Map,this._pagingStatus=kr.NOT_START,this._pagingGetCostList=[],l.getInnerEmitterInstance().on(ir.A2KEY_AND_TINYID_UPDATED,this.syncGroupList,this)}return u(D,[{key:"onCheckTimer",value:function(l){l%1==0&&this._cachedGroupMessageMap.size>0&&this._checkCachedGroupMessage()}},{key:"_checkCachedGroupMessage",value:function(){var l=this;this._cachedGroupMessageMap.forEach(function(p,a){var c=l._checkCountMap.get(a),h=l._groupModule.hasLocalGroup(a);U.l("".concat(l._n,"._checkCachedGroupMessage groupID:").concat(a," hasLocalGroup:").concat(h," checkCount:").concat(c)),h?(l._notifyCachedGroupMessage(a),l._checkCountMap.delete(a),l._groupModule.deleteUnjoinedAVChatRoom(a)):c>=l.MAX_CHECK_COUNT?(l._deleteCachedGroupMessage(a),l._checkCountMap.delete(a)):(c++,l._checkCountMap.set(a,c))})}},{key:"handleUpdateGroupLastMessage",value:function(l){var p="".concat(this._n,".handleUpdateGroupLastMessage");if(U.l("".concat(p," conversation count:").concat(l.length,", local group count:").concat(this._groupModule.getLocalGroupList().length)),this._groupModule.getGroupMap().size!==0){for(var a,c,h,m=!1,y=0,b=l.length;y0&&this._groupModule.onAVChatRoomMessage(h),this._groupModule.filterModifiedMessage(c),a.length>0&&(this._groupModule.updateNextMessageSeq(a),this._groupModule.getModule(dt).onNewMessage({conversationOptionsList:a,isInstantMessage:l.isInstantMessage||!0,updateUnreadCount:l.updateUnreadCount||!0}));var m=this._groupModule.filterUnmodifiedMessage(c);m.length>0&&this._groupModule.emitOuterEvent(R.MESSAGE_RECEIVED,m),c.length=0}},{key:"_newGroupMessageStoredAndSummary",value:function(l){var p=this,a=l.dataList,c=l.event,h=l.isInstantMessage,m=null,y=[],b=[],C=[],E={},N=this._groupModule.getFileDownloadProxy(),F=a.length;F>1&&a.sort(function(we,Ue){return we.sequence-Ue.sequence});for(var z=this._groupModule.getModule(dt),Q=this._groupModule.getModule(yr),me=function(we){var Ue=wd(a[we]),Ve=Ue.groupProfile,ot=Ve.groupID,vt=Ve.communityType,Ut=vt===void 0?0:vt,mn=Ve.topicID,bn=mn===void 0?void 0:mn,Nr=Ve.invisible,lo=void 0,Vo=p._groupModule.isMessageFromTopic(Ut,bn);if(Vo){lo=T.CONV_TOPIC,Ue.to=bn;var ii=p._groupModule.getModule(ur);ii.hasLocalTopic(ot,bn)||p._getTopicPendingMap.has(bn)||(p._getTopicPendingMap.set(bn,1),ii.getTopicList({groupID:ot,topicIDList:[bn]}).finally(function(){p._getTopicPendingMap.delete(bn)}))}var yo=p._groupModule.hasLocalGroup(ot);if(!yo&&p._groupModule.isUnjoinedAVChatRoom(ot))return"continue";if(!yo&&!Vo)return p._cacheGroupMessageAndProbe({groupID:ot,event:c,item:Ue}),"continue";if(p._groupModule.isMessageFromOrToAVChatroom(ot))return Ue.event=c,C.push(Ue),"continue";if(Ue.currentUser=p._groupModule.getMyUserID(),Ue.conversationType=T.CONV_GROUP,Ue.isSystemMessage=!!Ue.isSystemMessage,(m=new qr(Ue)).setElement(Ue.elements,N),Nr===1)return p._qualityStat(h,m),"continue";var ns=a[we].isModified===1;if(z.isMessageSentByCurrentInstance(m)?m.isModified=ns:ns=!1,Ue.onlineOnlyFlag===1)m._onlineOnlyFlag=!0,z.isMessageSentByCurrentInstance(m)||b.push(m);else{if(p._groupModule.isMessageFromCommunityOfTopic(Ut,bn))return b.push(m),"continue";if(m.from===p._groupModule.getMyUserID()){var Ii=z.getLatestMessageSentByMe(m.conversationID);if(Ii){var vs=Ii.nick,$s=Ii.avatar;vs===m.nick&&$s===m.avatar||(z.modifyMessageSentByMe({conversationID:Al,latestNick:m.nick,latestAvatar:m.avatar}),Q.mockOnNickAvatarModified(m.nick,m.avatar))}}if(!z.pushIntoMessageList(b,m,ns))return"continue";p._qualityStat(h,m);var Nd=m,Al=Nd.conversationID,T1=Nd.sequence,Pd=z.isRemoteRead({conversationID:Al,sequence:T1});if($e(E[Al])){var fm=0;m.flow==="in"&&(m._isExcludedFromUnreadCount||Pd||(fm=1)),E[Al]=y.push({conversationID:Al,unreadCount:fm,type:$e(lo)?m.conversationType:lo,subType:m.conversationSubType,lastMessage:m._isExcludedFromLastMessage?"":m})-1}else{var $i=E[Al];y[$i].type=$e(lo)?m.conversationType:lo,y[$i].subType=m.conversationSubType,y[$i].lastMessage=m._isExcludedFromLastMessage?"":m,m.flow==="in"&&(m._isExcludedFromUnreadCount||Pd||y[$i].unreadCount++)}}},_e=0;_e0&&a.addMessageDelay(p.clientTime)}},{key:"onGroupMessageRevoked",value:function(l){var p=this._groupModule.getModule(dt),a=[],c=null,h=!0;l.dataList.forEach(function(m){var y=m.elements.revokedInfos;$e(y)||y.forEach(function(b){var C=Ye(b.topicID)?"GROUP".concat(b.groupID):"GROUP".concat(b.topicID);c=p.revoke(C,b.sequence,b.random);var E=b.revokerInfo&&b.revokerInfo.revoker;if(c)c.revoker=E,a.push(c);else{var N={conversationID:C,to:b.topicID||"",sequence:b.sequence,time:b.time,revoker:E};p.isLastMessageRevoked(N)&&(a.push(N),h=!1)}})}),a.length!==0&&(p.onMessageRevoked(a),h===!0&&(U.l("".concat(this._n,".onGroupMessageRevoked count:").concat(a.length)),this._groupModule.emitOuterEvent(R.MESSAGE_REVOKED,a)))}},{key:"_groupListTreeShaking",value:function(l){for(var p=new Map(O(this._groupModule.getGroupMap())),a=0,c=l.length;a0&&arguments[0]!==void 0&&arguments[0];this._pagingStatus===kr.NOT_START&&this._groupModule.clearGroupMap();var a=["Type","Name","FaceUrl","NextMsgSeq","LastMsgTime","AtInfoList","LastRecallTime"],c=this.PAGING_GRP_COUNT_LIMIT,h=0,m=[];if(p===!0)return this._pagingGetGroupListWithTopic({limit:c,offset:h,groupBaseInfoFilter:a,groupList:m});var y="syncGroupList",b="".concat(this._n,".").concat(y),C=new We(y);return this._pagingGetGroupList({limit:c,offset:h,groupBaseInfoFilter:a,groupList:m}).then(function(){var E=hp(l._pagingGetCostList),N=ms(l._pagingGetCostList);l._pagingGetCostList.length=0,l._pagingStatus=kr.RESOLVED,l._groupListTreeShaking(m),l._groupModule.updateGroupMap(m);var F=l._groupModule.getLocalGroupList().length,z="count:".concat(F," sum:").concat(N," avg:").concat(E);return U.l("".concat(b," ok. ").concat(z)),C.setNetworkType(l._groupModule.getNetworkType()).setMessage(z).end(),l.tempConversationList&&(l.handleUpdateGroupLastMessage(l.tempConversationList),l.tempConversationList=null),l._groupModule.emitGroupListUpdate(!0,!0),gt({groupList:l._groupModule.getLocalGroupList()})}).catch(function(E){return l._pagingStatus=kr.REJECTED,l._groupModule.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];C.setError(E,z,Q).end()}),U.e("".concat(b," failed. error:"),E),Me(E)})}},{key:"getGroupList",value:function(){var l=this,p="".concat(this._n,".").concat("getGroupList");if(U.l("".concat(p)),this._pagingStatus===kr.REJECTED)return this.syncGroupList().then(function(){var c=l._groupModule.getLocalGroupList();return gt({groupList:c,isSyncCompleted:l.isPagingGetCompleted()})}).catch(function(c){return U.e("".concat(p," failed. error:"),c),Me(c)});var a=this._groupModule.getLocalGroupList();return U.l("".concat(p,". returned group count:").concat(a.length)),Lt({groupList:a,isSyncCompleted:this.isPagingGetCompleted()})}},{key:"isPagingGetCompleted",value:function(){return this._pagingStatus===kr.RESOLVED}},{key:"_pagingGetGroupList",value:function(l){var p=this,a="".concat(this._n,".").concat("_pagingGetGroupList"),c=l.isCommunityRelay,h=c!==void 0&&c,m=l.limit,y=l.offset,b=l.groupBaseInfoFilter,C=l.groupList,E=Date.now();return this._groupModule.request({protocolName:Fg,requestData:{type:h?T.GRP_COMMUNITY:void 0,memberAccount:this._groupModule.getMyUserID(),limit:m,offset:y,responseFilter:{groupBaseInfoFilter:b,selfInfoFilter:["Role","JoinTime","MsgFlag","MsgSeq"]}}}).then(function(N){var F=N.data,z=F.groups,Q=z===void 0?[]:z,me=F.totalCount;C.push.apply(C,O(Q)),p._handleGroupAtInfoWithoutTopic(h,Q);var _e=y+m,we=!(me>_e),Ue="offset:".concat(y," limit:").concat(m," totalCount:").concat(me," isCompleted:").concat(we," ")+"currentCount:".concat(C.length," isCommunityRelay:").concat(h),Ve=Date.now()-E;return p._pagingGetCostList.push(Ve),U.l("".concat(a," ok. ").concat(Ue," cost ").concat(Ve," ms")),h||we?!h&&we?(U.l("".concat(a," start to get community list")),y=0,p._pagingGetGroupList({limit:m,offset:y,groupBaseInfoFilter:b,groupList:C,isCommunityRelay:!0})):h&&!we?(y=_e,p._pagingGetGroupList({limit:m,offset:y,groupBaseInfoFilter:b,groupList:C,isCommunityRelay:!0})):gt({groupList:C}):(y=_e,p._pagingGetGroupList({limit:m,offset:y,groupBaseInfoFilter:b,groupList:C}))}).catch(function(N){return N.code===10018?(U.w("".concat(p.logPrefix," response size exceeds the limit, request count:").concat(m)),m=50,p._pagingGetGroupList({limit:m,offset:y,groupBaseInfoFilter:b,groupList:C,isCommunityRelay:h})):h?(N.code===11e3&&U.l("".concat(a," ok. community unavailable")),Lt({groupList:C})):Me(N)})}},{key:"_pagingGetGroupListWithTopic",value:function(l){var p=this,a="".concat(this._n,"._pagingGetGroupListWithTopic"),c=l.limit,h=l.offset,m=l.groupBaseInfoFilter,y=l.groupList,b=Date.now();return this._groupModule.request({protocolName:Fg,requestData:{type:T.GRP_COMMUNITY,memberAccount:this._groupModule.getMyUserID(),limit:c,offset:h,responseFilter:{groupBaseInfoFilter:m,selfInfoFilter:["Role","JoinTime","MsgFlag","MsgSeq"]},isSupportTopic:1}}).then(function(C){var E=C.data,N=E.groups,F=N===void 0?[]:N,z=E.totalCount;y.push.apply(y,O(F));var Q=h+c,me=!(z>Q);if(U.l("".concat(a," ok. offset:").concat(h," limit:").concat(c," totalCount:").concat(z," isCompleted:").concat(me," currentCount:").concat(y.length," cost ").concat(Date.now()-b," ms")),!me)return h=Q,p._pagingGetGroupListWithTopic({limit:c,offset:h,groupBaseInfoFilter:m,groupList:y});p._groupModule.updateGroupMap(y),p._groupModule.emitGroupListUpdate(!0,!1);var _e=p._groupModule.getLocalGroupList().filter(function(we){return we.isSupportTopic===!0});return gt({groupList:_e})}).catch(function(C){return C.code===10018?(U.w("".concat(p.logPrefix," response size exceeds the limit, request count:").concat(c)),c=50,p._pagingGetGroupListWithTopic({limit:c,offset:h,groupBaseInfoFilter:m,groupList:y})):Me(C)})}},{key:"_cacheGroupMessage",value:function(l,p){this._cachedGroupMessageMap.has(l)||this._cachedGroupMessageMap.set(l,[]),this._cachedGroupMessageMap.get(l).push(p)}},{key:"_deleteCachedGroupMessage",value:function(l){this._cachedGroupMessageMap.has(l)&&this._cachedGroupMessageMap.delete(l)}},{key:"_notifyCachedGroupMessage",value:function(l){var p=this,a=this._cachedGroupMessageMap.get(l)||[];a.forEach(function(c){p.onNewGroupMessage(c)}),this._deleteCachedGroupMessage(l),U.l("".concat(this._n,"._notifyCachedGroupMessage groupID:").concat(l," count:").concat(a.length))}},{key:"_cacheGroupMessageAndProbe",value:function(l){var p=this,a=l.groupID,c=l.event,h=l.item;this._cacheGroupMessage(a,{event:c,dataList:[h]}),this._groupModule.getGroupSimplifiedInfo(a).then(function(m){m.type===T.GRP_AVCHATROOM?p._groupModule.hasLocalGroup(a)?p._notifyCachedGroupMessage(a):p._groupModule.setUnjoinedAVChatRoom(a):(p._groupModule.updateGroupMap([m]),p._notifyCachedGroupMessage(a))}),this._checkCountMap.has(a)||this._checkCountMap.set(a,0),U.l("".concat(this._n,"._cacheGroupMessageAndProbe groupID:").concat(a))}},{key:"_handleGroupAtInfoWithoutTopic",value:function(l,p){var a=this;l&&p.length!==0&&p.forEach(function(c){var h=c.groupID,m=c.groupAtInfoList,y=[];$e(m)||(m.forEach(function(b){y.push(r(r({},b),{},{groupID:h}))}),a._groupModule.getModule(dt).onNewGroupAtTips({dataList:y}))})}},{key:"setPagingGroupCount",value:function(l){$e(l)||(this.PAGING_GRP_COUNT_LIMIT=parseInt(l,10))}},{key:"reset",value:function(){this.PAGING_GRP_COUNT_LIMIT=200,this._cachedGroupMessageMap.clear(),this._checkCountMap.clear(),this._getTopicPendingMap.clear(),this._pagingStatus=kr.NOT_START,this._pagingGetCostList=[]}}]),D}(),$w=1,E6=2,Gw=3,Bw=4,Hw=5,A6=function(){function D(l){i(this,D),this._groupModule=l,this._n="GroupAttributesHandler",this._groupAttributesMap=new Map,this._groupAttributesCopy={},this.CACHE_EXPIRE_TIME=3e4,this._groupModule.getInnerEmitterInstance().on(ir.CLOUD_CONFIG_UPDATED,this._onCloudConfigUpdated,this)}return u(D,[{key:"_onCloudConfigUpdated",value:function(){var l=this._groupModule.getCloudConfig("grp_attr_cache_time");$e(l)||(this.CACHE_EXPIRE_TIME=Number(l))}},{key:"updateLocalMainSequenceOnReconnected",value:function(){this._groupAttributesMap.forEach(function(l){l.localMainSequence=0})}},{key:"isGroupAttributesUpdatedNotice",value:function(l){var p=l.to,a=l.elements.newGroupProfile,c=!$e(a)&&!Ye(a.groupAttributeOption);return c&&this._onGroupAttributesUpdated({groupID:p,groupAttributeOption:a.groupAttributeOption}),c}},{key:"_onGroupAttributesUpdated",value:function(l){var p=this,a=l.groupID,c=l.groupAttributeOption,h=c.mainSequence,m=c.isWithChangedAttributeInfo,y=c.groupAttributeList,b=y===void 0?[]:y,C=c.operationType;if(U.l("".concat(this._n,".onGroupAttributesUpdated. ")+"groupID:".concat(a," isWithChangedAttributeInfo:").concat(m," operationType:").concat(C)),!$e(C)){this._groupAttributesCopy=this._getCachedAttributes({groupID:a});var E=h-this._getLocalGroupAttributes(a).localMainSequence;if(E!==0){if(m===1&&E===1)return this._refreshCachedGroupAttributes({groupID:a,remoteMainSequence:h,groupAttributeList:b,operationType:C}),void this._emitGroupAttributesUpdated(a);if(this._hasLocalGroupAttributes(a)){var N=this._getLocalGroupAttributes(a).avChatRoomKey;this._getGroupAttributes({groupID:a,avChatRoomKey:N}).then(function(){p._emitGroupAttributesUpdated(a)})}}}}},{key:"initGroupAttributesCache",value:function(l){var p=l.groupID,a=l.avChatRoomKey,c=a===void 0?void 0:a;this._groupAttributesMap.set(p,{lastUpdateTime:0,localMainSequence:0,remoteMainSequence:0,attributes:new Map,avChatRoomKey:c}),U.l("".concat(this._n,".initGroupAttributesCache groupID:").concat(p," avChatRoomKey:").concat(c))}},{key:"initGroupAttributes",value:function(l){var p=this,a=l.groupID,c=l.groupAttributes,h=this._getLocalGroupAttributes(a),m=h.remoteMainSequence,y=h.avChatRoomKey,b=new We("initGroupAttributes");return b.setMessage("groupID:".concat(a," avChatRoomKey:").concat(y," mainSequence:").concat(m)),this._groupModule.request({protocolName:zg,requestData:{groupID:a,avChatRoomKey:y,mainSequence:m,groupAttributeList:this._transformGroupAttributes(c)}}).then(function(C){U.l("".concat(p._n,".").concat("initGroupAttributes"," ok. groupID:").concat(a));var E=C.data,N=E.mainSequence,F=O(E.groupAttributeList);return F.forEach(function(z){z.value=c[z.key]}),p._groupAttributesCopy=p._getCachedAttributes({groupID:a}),p._refreshCachedGroupAttributes({groupID:a,remoteMainSequence:N,groupAttributeList:F,operationType:$w}),p._emitGroupAttributesUpdated(a),b.setNetworkType(p._groupModule.getNetworkType()).end(),gt({groupAttributes:c})}).catch(function(C){return p._groupModule.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];b.setError(C,F,z).end()}),Me(C)})}},{key:"setGroupAttributes",value:function(l){var p=this,a="".concat(this._n,".").concat("setGroupAttributes"),c=l.groupID,h=l.groupAttributes,m=this._getLocalGroupAttributes(c),y=m.remoteMainSequence,b=m.avChatRoomKey,C=m.attributes,E=this._transformGroupAttributes(h);E.forEach(function(F){var z=F.key;F.sequence=0,C.has(z)&&(F.sequence=C.get(z).sequence)});var N=new We("setGroupAttributes");return N.setMessage("groupID:".concat(c," groupAttributes:").concat(JSON.stringify(h))),U.l("".concat(a,". groupID:").concat(c," mainSequence:").concat(y)),this._groupModule.request({protocolName:jg,requestData:{groupID:c,avChatRoomKey:b,mainSequence:y,groupAttributeList:E}}).then(function(F){U.l("".concat(a," ok."));var z=F.data,Q=z.mainSequence,me=O(z.groupAttributeList);return me.forEach(function(_e){_e.value=h[_e.key]}),p._groupAttributesCopy=p._getCachedAttributes({groupID:c}),p._refreshCachedGroupAttributes({groupID:c,remoteMainSequence:Q,groupAttributeList:me,operationType:E6}),p._emitGroupAttributesUpdated(c),N.setNetworkType(p._groupModule.getNetworkType()).end(),gt({groupAttributes:h})}).catch(function(F){return p._groupModule.probeNetwork().then(function(z){var Q=A(z,2),me=Q[0],_e=Q[1];N.setError(F,me,_e).end()}),Me(F)})}},{key:"deleteGroupAttributes",value:function(l){var p=this,a=l.groupID,c=l.keyList,h=c===void 0?[]:c,m=this._getLocalGroupAttributes(a),y=m.remoteMainSequence,b=m.avChatRoomKey,C=m.attributes,E=O(C.keys()),N=Kg,F=Gw,z={groupID:a,avChatRoomKey:b,mainSequence:y},Q=[];h.length>0&&(E=[],N=Wg,F=Bw,h.forEach(function(_e){var we=0;C.has(_e)&&(we=C.get(_e).sequence,E.push(_e)),Q.push({key:_e,sequence:we})}),z.groupAttributeList=Q);var me=new We("deleteGroupAttributes");return me.setMessage("groupID:".concat(a," mainSequence:").concat(y," keyList:").concat(h," protocolName:").concat(N)),this._groupModule.request({protocolName:N,requestData:z}).then(function(_e){U.l("".concat(p._n,".").concat("deleteGroupAttributes"," ok. groupID:").concat(a));var we=_e.data.mainSequence;return p._groupAttributesCopy=p._getCachedAttributes({groupID:a}),p._refreshCachedGroupAttributes({groupID:a,remoteMainSequence:we,groupAttributeList:Q,operationType:F}),p._emitGroupAttributesUpdated(a),me.setNetworkType(p._groupModule.getNetworkType()).end(),gt({keyList:E})}).catch(function(_e){return p._groupModule.probeNetwork().then(function(we){var Ue=A(we,2),Ve=Ue[0],ot=Ue[1];me.setError(_e,Ve,ot).end()}),Me(_e)})}},{key:"getGroupAttributes",value:function(l){var p=this,a="".concat(this._n,".").concat("getGroupAttributes"),c=l.groupID,h=this._getLocalGroupAttributes(c),m=h.avChatRoomKey,y=h.lastUpdateTime,b=h.localMainSequence,C=h.remoteMainSequence,E=new We("getGroupAttributes");if(E.setMessage("groupID:".concat(c," localMainSequence:").concat(b," remoteMainSequence:").concat(C," keyList:").concat(l.keyList)),Date.now()-y>=this.CACHE_EXPIRE_TIME||b0)c.forEach(function(E){m.has(E)&&(h[E]=m.get(E).value)});else{var y,b=$(m.keys());try{for(b.s();!(y=b.n()).done;){var C=y.value;h[C]=m.get(C).value}}catch(E){b.e(E)}finally{b.f()}}}return h}},{key:"_updateCachedAttributes",value:function(l){var p=l.groupAttributes,a=l.groupAttributeList,c=l.operationType;c!==Gw?c!==Bw?(c===$w&&p.attributes.clear(),a.forEach(function(h){var m=h.key,y=h.value,b=h.sequence;p.attributes.set(m,{value:y,sequence:b})})):a.forEach(function(h){p.attributes.delete(h.key)}):p.attributes.clear()}},{key:"_hasLocalGroupAttributes",value:function(l){return this._groupAttributesMap.has(l)}},{key:"_getLocalGroupAttributes",value:function(l){return this._hasLocalGroupAttributes(l)||this.initGroupAttributesCache({groupID:l}),this._groupAttributesMap.get(l)}},{key:"_transformGroupAttributes",value:function(l){var p=[];return Object.keys(l).forEach(function(a){p.push({key:a,value:l[a]})}),p}},{key:"_emitGroupAttributesUpdated",value:function(l){var p=this._getCachedAttributes({groupID:l}),a=this._computeAttrChangedInfo(p),c=a.updatedKeyList,h=a.deletedKeyList;U.l("".concat(this._n,"._emitGroupAttributesUpdated update:").concat(c.length,", delete:").concat(h.length)),c.length===0&&h.length===0||this._groupModule.emitOuterEvent(R.GROUP_ATTRIBUTES_UPDATED,{groupID:l,groupAttributes:p,updatedKeyList:c,deletedKeyList:h})}},{key:"_computeAttrChangedInfo",value:function(l){var p=this,a=[],c=[];return Object.keys(l).forEach(function(h){l[h]!==p._groupAttributesCopy[h]&&a.push(h)}),Object.keys(this._groupAttributesCopy).forEach(function(h){$e(l[h])&&c.push(h)}),this._groupAttributesCopy={},{updatedKeyList:a,deletedKeyList:c}}},{key:"deleteLocalGroupAttributes",value:function(l){this._hasLocalGroupAttributes(l)&&this._groupAttributesMap.delete(l)}},{key:"reset",value:function(){this._groupAttributesMap.clear(),this._groupAttributesCopy={},this.CACHE_EXPIRE_TIME=3e4}}]),D}(),L6="Set",O6="Increase",R6="Decrease",N6=function(){function D(l){i(this,D),this._groupModule=l,this._n="GroupCountersHandler",this._groupCountersMap=new Map,this.EXPIRE_TIME=3e4,this._groupModule.getInnerEmitterInstance().on(ir.CLOUD_CONFIG_UPDATED,this._onCloudConfigUpdated,this)}return u(D,[{key:"_onCloudConfigUpdated",value:function(){var l=this._groupModule.getCloudConfig("grp_counter_expire_time");$e(l)||(this.EXPIRE_TIME=Number(l))}},{key:"isGroupCountersNotice",value:function(l){var p=l.to,a=l.elements.groupCounterInfo,c=!1;return Ye(a)||(this._onGroupCountersUpdated({groupID:p,groupCounterInfo:a}),c=!0),c}},{key:"_onGroupCountersUpdated",value:function(l){var p=this,a=l.groupID;l.groupCounterInfo.forEach(function(c){var h=c.type,m=c.groupCounterSeq,y=c.counterList,b=y===void 0?[]:y;h!==0&&h!==2||(p._updateLocalGroupCounters({groupID:a,groupCounterSeq:m,counterList:b}),b.forEach(function(C){p._groupModule.emitOuterEvent(R.GROUP_COUNTER_UPDATED,{groupID:a,key:C.key,value:C.value})})),h===1&&p._deleteLocalGroupCounters({groupID:a,groupCounterSeq:m,counterList:b})}),U.l("".concat(this._n,"._onGroupCountersUpdated groupID:").concat(a))}},{key:"initGroupCountersCache",value:function(l){var p=l.groupID,a=l.avChatRoomKey;this._groupCountersMap.set(p,{lastUpdateTime:0,groupCounterSeq:0,counters:new Map,avChatRoomKey:a}),U.l("".concat(this._n,".initGroupCountersCache groupID:").concat(p," avChatRoomKey:").concat(a))}},{key:"setGroupCounters",value:function(l){var p=this;if(!this._groupModule.canIUse(ce.GRP_COUNTER))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".setGroupCounters"),c=l.groupID,h=l.counters,m=this._convertObjectToList(h),y=this._getLocalGroupCounters(c).avChatRoomKey,b="groupID:".concat(c," count:").concat(m.length),C=new We("setGroupCounters");return C.setMessage("".concat(b)),U.l("".concat(a,". ").concat(b)),this._updateGroupCounters({groupID:c,counterList:m,avChatRoomKey:y,mode:L6}).then(function(E){return C.end(),U.l("".concat(a," ok.")),gt({counters:E})}).catch(function(E){return p._groupModule.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];C.setError(E,z,Q).end()}),U.e("".concat(a," failed. error:"),E),Me(E)})}},{key:"increaseGroupCounter",value:function(l){var p=this;if(!this._groupModule.canIUse(ce.GRP_COUNTER))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".increaseGroupCounters"),c=l.groupID,h=l.key,m=l.value,y=this._getLocalGroupCounters(c).avChatRoomKey,b="groupID:".concat(c," key:").concat(h," value:").concat(m),C=new We("increaseGroupCounter");C.setMessage("".concat(b)),U.l("".concat(a,". ").concat(b));var E=[{key:h,value:m}];return this._updateGroupCounters({groupID:c,counterList:E,avChatRoomKey:y,mode:O6}).then(function(N){return C.end(),U.l("".concat(a," ok.")),gt({counters:N})}).catch(function(N){return p._groupModule.probeNetwork().then(function(F){var z=A(F,2),Q=z[0],me=z[1];C.setError(N,Q,me).end()}),U.e("".concat(a," failed. error:"),N),Me(N)})}},{key:"decreaseGroupCounter",value:function(l){var p=this;if(!this._groupModule.canIUse(ce.GRP_COUNTER))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".decreaseGroupCounter"),c=l.groupID,h=l.key,m=l.value,y=this._getLocalGroupCounters(c).avChatRoomKey,b="groupID:".concat(c," key:").concat(h," value:").concat(m),C=new We("decreaseGroupCounter");C.setMessage("".concat(b)),U.l("".concat(a,". ").concat(b));var E=[{key:h,value:m}];return this._updateGroupCounters({groupID:c,counterList:E,avChatRoomKey:y,mode:R6}).then(function(N){return C.end(),U.l("".concat(a," ok.")),gt({counters:N})}).catch(function(N){return p._groupModule.probeNetwork().then(function(F){var z=A(F,2),Q=z[0],me=z[1];C.setError(N,Q,me).end()}),U.e("".concat(a," failed. error:"),N),Me(N)})}},{key:"getGroupCounters",value:function(l){var p=this;if(!this._groupModule.canIUse(ce.GRP_COUNTER))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".getGroupCounters"),c=l.groupID,h=l.keyList,m=h===void 0?[]:h,y=this._getLocalGroupCounters(c),b=y.avChatRoomKey,C=y.lastUpdateTime,E=new We("getGroupCounters");if(E.setMessage("groupID:".concat(c)),Date.now()-C>=this.EXPIRE_TIME)return this._getRemoteGroupCounters({groupID:c,avChatRoomKey:b}).then(function(F){E.setMoreMessage("from remote. count:".concat(F.length)).end(),U.l("".concat(a," from remote. groupID:").concat(c));var z=p._getLocalCounters(c,m);return gt({counters:z})}).catch(function(F){return p._groupModule.probeNetwork().then(function(z){var Q=A(z,2),me=Q[0],_e=Q[1];E.setError(F,me,_e).end()}),Me(F)});E.setMoreMessage("from cache").end(),U.l("".concat(a," from cache. groupID:").concat(c));var N=this._getLocalCounters(c,m);return Lt({counters:N})}},{key:"_getRemoteGroupCounters",value:function(l){var p=this;return this._groupModule.request({protocolName:Qg,requestData:r({},l)}).then(function(a){var c=a.data,h=c.counterList,m=h===void 0?[]:h,y=c.groupCounterSeq;return p._updateLocalGroupCounters({groupID:l.groupID,counterList:m,groupCounterSeq:y}),U.l("".concat(p._n,"._getRemoteGroupCounters ok. groupID:").concat(l.groupID)),m}).catch(function(a){return Me(a)})}},{key:"_convertObjectToList",value:function(l){var p=[];return Object.keys(l).forEach(function(a){p.push({key:a,value:l[a]})}),p}},{key:"_updateGroupCounters",value:function(l){var p="".concat(this._n,"._updateGroupCounters"),a=l.groupID,c=l.avChatRoomKey,h=l.mode;return U.l("".concat(p,". groupID:").concat(a," avChatRoomKey:").concat(c," mode:").concat(h)),this._groupModule.request({protocolName:Zg,requestData:r({},l)}).then(function(m){U.l("".concat(p," ok."));var y=m.data.counterList,b={};return(y===void 0?[]:y).forEach(function(C){var E=C.key,N=C.value;b[E]=N}),b}).catch(function(m){return Me(m)})}},{key:"_hasLocalGroupCounters",value:function(l){return this._groupCountersMap.has(l)}},{key:"_getLocalGroupCounters",value:function(l){return this._hasLocalGroupCounters(l)||this.initGroupCountersCache({groupID:l}),this._groupCountersMap.get(l)}},{key:"_updateLocalGroupCounters",value:function(l){var p=l.groupID,a=l.counterList,c=a===void 0?[]:a,h=l.groupCounterSeq;if(this._hasLocalGroupCounters(p)){var m=this._getLocalGroupCounters(p),y=m.counters,b=m.avChatRoomKey,C=m.groupCounterSeq;if(h>0&&h0)p.forEach(function(b){c.has(b)&&(a[b]=c.get(b))});else{var h,m=$(c.keys());try{for(m.s();!(h=m.n()).done;){var y=h.value;a[y]=c.get(y)}}catch(b){m.e(b)}finally{m.f()}}return a}},{key:"reset",value:function(){this._groupCountersMap.clear(),this.EXPIRE_TIME=3e4}}]),D}(),P6=function(){function D(l){i(this,D);var p=l.manager,a=l.groupID,c=l.onInit,h=l.onSuccess,m=l.onFail;this._n="Polling",this._manager=p,this._groupModule=p._groupModule,this._onInit=c,this._onSuccess=h,this._onFail=m,this._groupID=a,this._timeoutID=-1,this._isRunning=!1,this._protocolName=qg}return u(D,[{key:"start",value:function(){var l=this._groupModule.isLoggedIn();l||(this._protocolName=Aw),U.l("".concat(this._n,".start pollingInterval:").concat(this._manager.getPollingInterval()," isLoggedIn:").concat(l)),this._isRunning=!0,this._request()}},{key:"isRunning",value:function(){return this._isRunning}},{key:"_request",value:function(){var l=this,p=this._onInit(this._groupID);this._groupModule.request({protocolName:this._protocolName,requestData:p}).then(function(a){l._onSuccess(l._groupID,a),l.isRunning()&&(clearTimeout(l._timeoutID),l._timeoutID=setTimeout(l._request.bind(l),l._manager.getPollingInterval()))}).catch(function(a){l._onFail(l._groupID,a),l.isRunning()&&(clearTimeout(l._timeoutID),l._timeoutID=setTimeout(l._request.bind(l),l._manager.MAX_POLLING_INTERVAL))})}},{key:"stop",value:function(){U.l("".concat(this._n,".stop")),this._timeoutID>0&&(clearTimeout(this._timeoutID),this._timeoutID=-1),this._isRunning=!1}},{key:"getPollingTimerID",value:function(){return this._timeoutID}}]),D}(),qw={3:!0,4:!0,5:!0,6:!0,17:!0},x6=function(){function D(l){i(this,D),this._groupModule=l,this._n="AVChatRoomHandler",this._joinedGroupMap=new Map,this._pollingRequestInfoMap=new Map,this._pollingInstanceMap=new Map,this.sequencesLinkedList=new g1(200),this.messageIDLinkedList=new g1(100),this.receivedMessageCount=0,this._reportMessageStackedCount=0,this._onlineMemberCountMap=new Map,this.DEFAULT_EXPIRE_TIME=60,this.DEFAULT_POLLING_INTERVAL=300,this.MAX_POLLING_INTERVAL=2e3,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0,this._startBroadcastSeq=1,this._broadcastMessageIDMap=new Map,this.DEFAULT_POLLING_SIMPLIFIED_MSG=0}return u(D,[{key:"hasJoinedAVChatRoom",value:function(){return this._joinedGroupMap.size>0}},{key:"checkJoinedAVChatRoomByID",value:function(l){return this._joinedGroupMap.has(l)}},{key:"getJoinedAVChatRoom",value:function(){return this._joinedGroupMap.size>0?O(this._joinedGroupMap.keys()):[]}},{key:"_updateRequestData",value:function(l){var p=this._pollingRequestInfoMap.get(l);return l===O(this._pollingInstanceMap.keys())[0]?r(r({},p),{},{startBroadcastSeq:this._startBroadcastSeq,simplifiedMessage:this.DEFAULT_POLLING_SIMPLIFIED_MSG}):r(r({},p),{},{simplifiedMessage:this.DEFAULT_POLLING_SIMPLIFIED_MSG})}},{key:"_handleSuccess",value:function(l,p){var a=p.data,c=a.key,h=a.nextSeq,m=a.rspMsgList,y=a.errorCode,b=a.nextBroadcastSeq,C=a.broadcastMessageList;if(y!==0){var E=this._pollingRequestInfoMap.get(l),N=new We("longPollingAVError"),F=E?"".concat(E.key,"-").concat(E.startSeq):"requestInfo is undefined";N.setMessage("".concat(l,"-").concat(F,"-").concat(p.errorInfo)).setCode(p.errorCode).setNetworkType(this._groupModule.getNetworkType()).end(!0)}else{if(!this.checkJoinedAVChatRoomByID(l))return;At(c)&&un(h)&&this._pollingRequestInfoMap.set(l,{key:c,startSeq:h}),un(b)&&b>this._startBroadcastSeq&&(this._startBroadcastSeq=b),st(m)&&m.length>0?(m.forEach(function(z){z.to=z.groupID}),this.onMessage(m)):(this._pollingNoMessageCount+=1,this._pollingNoMessageCount===this.DEFAULT_POLLING_NO_MESSAGE_COUNT&&(this._pollingInterval=this.DEFAULT_POLLING_INTERVAL+this.DEFAULT_POLLING_INTERVAL_PLUS)),this._onBroadcastMessage(C)}}},{key:"_handleFailure",value:function(l,p){}},{key:"onMessage",value:function(l){if(st(l)&&l.length!==0){this._pollingNoMessageCount!==0&&(this._pollingNoMessageCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL);var p=null,a=[],c=this._getModule(dt),h=this._getModule(qo),m=l.length;m>1&&l.sort(function(Ve,ot){return Ve.sequence-ot.sequence});for(var y=this._getModule(hn),b=0;b1&&Q<=20?this._getModule(_p).onMessageMaybeLost(F,z+1,Q-1):Q<-1&&Q>=-20&&this._getModule(_p).onMessageMaybeLost(F,p.sequence+1,Math.abs(Q)-1)}this.sequencesLinkedList.set(p.sequence),this.messageIDLinkedList.set(p.ID);var me=!1;if(this._isMessageSentByCurrentInstance(p)?E&&(me=!0,p.isModified=E,c.updateMessageIsModifiedProperty(p)):me=!0,me){if(p.conversationType===T.CONV_SYSTEM&&p.payload.operationType===5&&this._onGroupDismissed(p.payload.groupProfile.groupID),!N&&p.conversationType!==T.CONV_SYSTEM){var _e=p.conversationID.replace(T.CONV_GROUP,"");this._pollingInstanceMap.has(_e)?this._groupModule.isLoggedIn()&&h.addMessageSequence({key:Op,message:p}):(p.type!==T.MSG_GRP_TIP&&p.clientTime>0&&h.addMessageDelay(p.clientTime),h.addMessageSequence({key:Lp,message:p}))}a.push(p)}}}else U.w("".concat(this._n,".onMessage unknown event:").concat(C.event))}if(a.length!==0){this._groupModule.filterModifiedMessage(a);var we=this.packConversationOption(a);we.length>0&&this._getModule(dt).onNewMessage({conversationOptionsList:we,isInstantMessage:!0}),U.d("".concat(this._n,".onMessage count:").concat(a.length)),this._checkMessageStacked(a);var Ue=this._groupModule.filterUnmodifiedMessage(a);Ue.length>0&&this._groupModule.emitOuterEvent(R.MESSAGE_RECEIVED,Ue),a.length=0}}}},{key:"isBroadcastOrNormal",value:function(l){return l===3||l===17}},{key:"isGroupTip",value:function(l){return l===4||l===6}},{key:"isGroupSystemNotice",value:function(l){return l===5}},{key:"restoreGroupTipElements",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};l.groupJoinType||(l.groupJoinType=1);var p=l.operatorInfo,a=p===void 0?{}:p,c=l.operatorID,h=l.userIDList,m=h===void 0?[]:h,y=a.userID,b=y===void 0?c:y,C=a.avatar,E=C===void 0?"":C,N=a.nick,F=N===void 0?"":N;l.operatorInfo={userID:b,avatar:E,nick:F};var z=m.map(function(Q){return{userID:Q}});return l.memberInfoList=l.memberInfoList||z,l}},{key:"restoreMessageFromSimplified",value:function(l){var p=l.event;if(this.isBroadcastOrNormal(p)&&(l.cloudCustomData=l.cloudCustomData||"",l.elements=l.elements.map(function(F){if(F.type===T.MSG_CUSTOM){var z=F.content,Q=z===void 0?{}:z;F.content=r({data:"",description:"",extension:""},Q)}return F})),(this.isGroupTip(p)||this.isGroupSystemNotice(p))&&(l.from=l.from||"@TIM#SYSTEM"),this.isGroupTip(p)){l.elements=this.restoreGroupTipElements(l.elements);var a=l.elements,c=a===void 0?{}:a,h=c.operationType,m=c.operatorInfo;if(h===1){var y=[{userID:(m===void 0?{}:m).userID}];c.memberInfoList=c.memberInfoList||y}}if(this.isGroupSystemNotice(p)){var b=l.elements,C=b.memberInfoList,E=b.operatorInfo;C||(C=E===void 0?{}:E),l.elements.memberInfoList=r({userID:l.elements.operatorID,avatar:"",nick:""},C),l.elements=r({authentication:"",remarkInfo:"",messageKey:1e3*l.time},l.elements);var N=Object.keys(l.elements).filter(function(F){return F!=="operatorInfo"}).reduce(function(F,z){return r(r({},F),{},d({},z,l.elements[z]))},{});l.elements=N}return l}},{key:"_onGroupDismissed",value:function(l){U.l("".concat(this._n,"._onGroupDismissed groupID:").concat(l)),this._groupModule.deleteLocalGroupAndConversation(l),this.reset(l)}},{key:"_checkMessageStacked",value:function(l){var p="MessageStacked",a=l.length;a>=100&&(this._groupModule.outputWarning(p,a),this._reportMessageStackedCount<5&&(new We(p).setNetworkType(this._groupModule.getNetworkType()).setMessage("count:".concat(a," groupID:").concat(O(this._joinedGroupMap.keys()))).setLevel("warning").end(),this._reportMessageStackedCount+=1))}},{key:"_isMessageSentByCurrentInstance",value:function(l){return!!this._getModule(dt).isMessageSentByCurrentInstance(l)}},{key:"packMessage",value:function(l,p){l.currentUser=this._groupModule.getMyUserID(),l.conversationType=p===5?T.CONV_SYSTEM:T.CONV_GROUP,l.isSystemMessage=!!l.isSystemMessage;var a=new qr(l),c=this.packElements(l,p);return a.setElement(c,this._groupModule.getFileDownloadProxy()),a}},{key:"packElements",value:function(l,p){return p===4||p===6?(this._updateMemberCountByGroupTips(l),{type:T.MSG_GRP_TIP,content:r(r({},l.elements),{},{groupProfile:l.groupProfile})}):p===5?{type:T.MSG_GRP_SYS_NOTICE,content:r(r({},l.elements),{},{groupProfile:r(r({},l.groupProfile),{},{groupID:l.groupID})})}:l.elements}},{key:"packConversationOption",value:function(l){for(var p=new Map,a=0;a0&&this._groupModule.emitOuterEvent(R.MESSAGE_RECEIVED,p)}}},{key:"start",value:function(l){if(this._pollingInstanceMap.has(l)){var p=this._pollingInstanceMap.get(l);p.isRunning()||p.start()}else{var a=new P6({manager:this,groupID:l,onInit:this._updateRequestData.bind(this),onSuccess:this._handleSuccess.bind(this),onFail:this._handleFailure.bind(this)});a.start(),this._pollingInstanceMap.set(l,a),U.l("".concat(this._n,".start groupID:").concat(l))}}},{key:"handleJoinResult",value:function(l){var p=this;return this._preCheck().then(function(){var a=l.longPollingKey,c=l.group,h=c.groupID;return p._joinedGroupMap.set(h,c),p._groupModule.updateGroupMap([c]),p._groupModule.deleteUnjoinedAVChatRoom(h),p._groupModule.emitGroupListUpdate(!0,!1),$e(a)?Lt({status:Qi,group:c}):Promise.resolve()})}},{key:"startRunLoop",value:function(l){var p=this;return this.handleJoinResult(l).then(function(){var a=l.longPollingKey,c=l.group,h=l.startSeq,m=h===void 0?0:h,y=c.groupID;return p._pollingRequestInfoMap.set(y,{key:a,startSeq:m}),p.start(y),p._groupModule.isLoggedIn()?Lt({status:Qi,group:c}):Lt({status:Qi})})}},{key:"_preCheck",value:function(){if(this._getModule(hn).isUnlimitedAVChatRoom()||!this.hasJoinedAVChatRoom())return Promise.resolve();var l=A(this._joinedGroupMap.entries().next().value,2),p=l[0],a=l[1];if(this._groupModule.isLoggedIn()){if(!(a.selfInfo.role===T.GRP_MBR_ROLE_OWNER||a.ownerID===this._groupModule.getMyUserID()))return this._groupModule.quitGroup(p);this._groupModule.deleteLocalGroupAndConversation(p)}else this._groupModule.deleteLocalGroupAndConversation(p);return this.reset(p),Promise.resolve()}},{key:"joinWithoutAuth",value:function(l){var p=this,a=l.groupID,c="".concat(this._n,".").concat("joinWithoutAuth"),h=new We("joinWithoutAuth");return this._groupModule.request({protocolName:Ew,requestData:l}).then(function(m){var y=m.data.longPollingKey;if(p._groupModule.probeNetwork().then(function(C){var E=A(C,2);E[0];var N=E[1];h.setNetworkType(N).setMessage("groupID:".concat(a," longPollingKey:").concat(y)).end(!0)}),$e(y))return Me({code:Le.CANNOT_JOIN_NON_AVCHATROOM_WITHOUT_LOGIN});U.l("".concat(c," ok. groupID:").concat(a)),p._getModule(dt).setCompleted("".concat(T.CONV_GROUP).concat(a));var b=new El({groupID:a});return p.startRunLoop({group:b,longPollingKey:y}),gt({status:Qi})}).catch(function(m){return U.e("".concat(c," failed. groupID:").concat(a," error:"),m),p._groupModule.probeNetwork().then(function(y){var b=A(y,2),C=b[0],E=b[1];h.setError(m,C,E).setMessage("groupID:".concat(a)).end(!0)}),Me(m)}).finally(function(){p._groupModule.getModule(S0).reportAtOnce()})}},{key:"getGroupOnlineMemberCount",value:function(l){var p=this._onlineMemberCountMap.get(l)||{},a=Date.now();return Ye(p)||a-p.lastSyncTime>1e3*p.expireTime&&a-p.latestUpdateTime>1e4&&a-p.lastReqTime>3e3?(p.lastReqTime=a,this._onlineMemberCountMap.set(l,p),this._getGroupOnlineMemberCount(l).then(function(c){return gt({memberCount:c.memberCount})}).catch(function(c){return Me(c)})):Lt({memberCount:p.memberCount})}},{key:"_getGroupOnlineMemberCount",value:function(l){var p=this,a="".concat(this._n,".").concat("_getGroupOnlineMemberCount");return this._groupModule.request({protocolName:k_,requestData:{groupID:l}}).then(function(c){var h=p._onlineMemberCountMap.get(l)||{},m=c.data,y=m.onlineMemberNum,b=y===void 0?0:y,C=m.expireTime,E=C===void 0?p.DEFAULT_EXPIRE_TIME:C;U.l("".concat(a," ok. groupID:").concat(l," memberCount:").concat(b," expireTime:").concat(E));var N=Date.now();return Ye(h)&&(h.lastReqTime=N),p._onlineMemberCountMap.set(l,Object.assign(h,{lastSyncTime:N,latestUpdateTime:N,memberCount:b,expireTime:E})),{memberCount:b}}).catch(function(c){return U.w("".concat(a," failed. error:"),c),new We("_getGroupOnlineMemberCount").setCode(c.code).setMessage("groupID:".concat(l," error:").concat(JSON.stringify(c))).setNetworkType(p._groupModule.getNetworkType()).end(),Promise.reject(c)})}},{key:"_getModule",value:function(l){return this._groupModule.getModule(l)}},{key:"setPollingInterval",value:function(l){$e(l)||(un(l)?this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=l:this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=parseInt(l,10))}},{key:"setPollingIntervalPlus",value:function(l){$e(l)||(un(l)?this.DEFAULT_POLLING_INTERVAL_PLUS=l:this.DEFAULT_POLLING_INTERVAL_PLUS=parseInt(l,10))}},{key:"setPollingNoMessageCount",value:function(l){$e(l)||(un(l)?this.DEFAULT_POLLING_NO_MESSAGE_COUNT=l:this.DEFAULT_POLLING_NO_MESSAGE_COUNT=parseInt(l,10))}},{key:"setPollingSimplifiedMessage",value:function(l){$e(l)||l!=="0"&&l!=="1"||(this.DEFAULT_POLLING_SIMPLIFIED_MSG=parseInt(l,10))}},{key:"getPollingInterval",value:function(){return this._pollingInterval}},{key:"onAVChatRoomMemberBanned",value:function(l){var p=l.payload.groupProfile.groupID;U.l("".concat(this._n,".onAVChatRoomMemberBanned groupID:").concat(p)),this._groupModule.deleteLocalGroupAndConversation(p),this.reset(p)}},{key:"restartPolling",value:function(){U.l("".concat(this._n,".restartPolling count:").concat(this._pollingInstanceMap.size));var l,p=$(this._pollingInstanceMap.values());try{for(p.s();!(l=p.n()).done;){var a=l.value;a.stop(),a.start()}}catch(c){p.e(c)}finally{p.f()}}},{key:"getPollingTimerID",value:function(l){if(!this._pollingInstanceMap.has(l))return-1;var p=this._pollingInstanceMap.get(l).getPollingTimerID();return U.l("".concat(this._n,".getPollingTimerID groupID:").concat(l," timerID:").concat(p)),p}},{key:"reset",value:function(l){if(l){U.l("".concat(this._n,".reset groupID:").concat(l));var p=this._pollingInstanceMap.get(l);p&&p.stop(),this._pollingInstanceMap.delete(l),this._joinedGroupMap.delete(l),this._pollingRequestInfoMap.delete(l),this._onlineMemberCountMap.delete(l)}else{U.l("".concat(this._n,".reset all"));var a,c=$(this._pollingInstanceMap.values());try{for(c.s();!(a=c.n()).done;)a.value.stop()}catch(h){c.e(h)}finally{c.f()}this._pollingInstanceMap.clear(),this._joinedGroupMap.clear(),this._pollingRequestInfoMap.clear(),this._onlineMemberCountMap.clear(),this._broadcastMessageIDMap.clear()}this.sequencesLinkedList.reset(),this.messageIDLinkedList.reset(),this.receivedMessageCount=0,this._reportMessageStackedCount=0,this._pollingInterval=this.DEFAULT_POLLING_INTERVAL=300,this.DEFAULT_POLLING_NO_MESSAGE_COUNT=20,this.DEFAULT_POLLING_INTERVAL_PLUS=2e3,this._pollingNoMessageCount=0}}]),D}(),U6=function(){function D(l){i(this,D),this.userID="",this.avatar="",this.nick="",this.role="",this.joinTime="",this.lastSendMsgTime="",this.nameCard="",this.muteUntil=0,this.memberCustomField=[],this._initMember(l)}return u(D,[{key:"_initMember",value:function(l){this.updateMember(l)}},{key:"updateMember",value:function(l){var p=[null,void 0,"",0,NaN];l.memberCustomField&&Uu(this.memberCustomField,l.memberCustomField),xi(this,l,["memberCustomField","marks"],p)}},{key:"updateRole",value:function(l){["Owner","Admin","Member"].indexOf(l)<0||(this.role=l)}},{key:"updateMuteUntil",value:function(l){$e(l)||(this.muteUntil=Math.floor((Date.now()+1e3*l)/1e3))}},{key:"updateNameCard",value:function(l){$e(l)||(this.nameCard=l)}},{key:"updateMemberCustomField",value:function(l){l&&Uu(this.memberCustomField,l)}}]),D}(),F6=function(){function D(l){i(this,D),this._groupModule=l,this._n="GroupMemberHandler",this.groupMemberListMap=new Map,this._groupModule.getInnerEmitterInstance().on(ir.PROFILE_UPDATED,this._onProfileUpdated,this)}return u(D,[{key:"_onProfileUpdated",value:function(l){for(var p=this,a=l.data,c=function(m){var y=a[m];p.groupMemberListMap.forEach(function(b){b.has(y.userID)&&b.get(y.userID).updateMember({nick:y.nick,avatar:y.avatar})})},h=0;h100?100:y};mo({groupID:a})?Q.next="".concat(h):(Q.offset=h,z=h+y);var me=[];return this._groupModule.request({protocolName:A_,requestData:Q}).then(function(_e){var we=_e.data,Ue=we.members,Ve=we.memberNum,ot=we.next,vt=ot===void 0?void 0:ot;return $e(vt)||(z=Ye(vt)?0:vt),st(Ue)&&Ue.length!==0?(p._groupModule.hasLocalGroup(a)&&(p._groupModule.getLocalGroupProfile(a).memberNum=Ve),me=p._updateLocalGroupMemberMap(a,Ue),p._groupModule.getModule(yr).getUserProfile({userIDList:Ue.map(function(Ut){return Ut.userID}),tagList:[Gt.NICK,Gt.AVATAR]})):(z=0,Promise.resolve([]))}).then(function(_e){var we=_e.data;if(!st(we)||we.length===0)return Lt({memberList:[],offset:z});var Ue=we.map(function(Ve){return{userID:Ve.userID,nick:Ve.nick,avatar:Ve.avatar}});return p._updateLocalGroupMemberMap(a,Ue),me.length5?"userIDList.length:".concat(l.userIDList.length):"userIDList:".concat(l.userIDList)),U.l("".concat(a," groupID:").concat(l.groupID," userIDList:").concat(l.userIDList.join(","))),l.userIDList.length>50&&(l.userIDList=l.userIDList.slice(0,50));var h=l.groupID,m=l.userIDList;return this._getGroupMemberProfileAdvance(r(r({},l),{},{userIDList:m})).then(function(y){var b=y.data.members;return st(b)&&b.length!==0?(p._updateLocalGroupMemberMap(h,b),p._groupModule.getModule(yr).getUserProfile({userIDList:b.map(function(C){return C.userID}),tagList:[Gt.NICK,Gt.AVATAR]})):Lt([])}).then(function(y){var b=y.data.map(function(E){return{userID:E.userID,nick:E.nick,avatar:E.avatar}});p._updateLocalGroupMemberMap(h,b);var C=m.filter(function(E){return p.hasLocalGroupMember(h,E)}).map(function(E){return p.getLocalGroupMemberInfo(h,E)});return c.setNetworkType(p._groupModule.getNetworkType()).end(),gt({memberList:C})})}},{key:"addGroupMember",value:function(l){var p=this,a="".concat(this._n,".").concat("addGroupMember"),c=l.groupID,h=this._groupModule.getLocalGroupProfile(c),m=h.type,y=new We("addGroupMember");if(y.setMessage("groupID:".concat(c," groupType:").concat(m)),Ho(m)){var b=new Fn({code:Le.CANNOT_ADD_MEMBER_IN_AVCHATROOM});return y.setError(b,!0,this._groupModule.getNetworkType()).end(),Me(b)}return l.userIDList=l.userIDList.map(function(C){return{userID:C}}),U.l("".concat(a," groupID:").concat(c)),this._groupModule.request({protocolName:O_,requestData:l}).then(function(C){var E=C.data.members;U.l("".concat(a," ok"));var N=E.filter(function(_e){return _e.result===1}).map(function(_e){return _e.userID}),F=E.filter(function(_e){return _e.result===0}).map(function(_e){return _e.userID}),z=E.filter(function(_e){return _e.result===2}).map(function(_e){return _e.userID}),Q=E.filter(function(_e){return _e.result===4}).map(function(_e){return _e.userID}),me="groupID:".concat(l.groupID,", ")+"successUserIDList:".concat(N,", ")+"failureUserIDList:".concat(F,", ")+"existedUserIDList:".concat(z,", ")+"overLimitUserIDList:".concat(Q);return y.setNetworkType(p._groupModule.getNetworkType()).setMoreMessage(me).end(),N.length===0?gt({successUserIDList:N,failureUserIDList:F,existedUserIDList:z,overLimitUserIDList:Q}):(h.memberCount+=N.length,p._updateConversationGroupProfile(h),gt({successUserIDList:N,failureUserIDList:F,existedUserIDList:z,overLimitUserIDList:Q,group:h}))}).catch(function(C){return p._groupModule.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];y.setError(C,F,z).end()}),U.e("".concat(a," failed. error:"),C),Me(C)})}},{key:"deleteGroupMember",value:function(l){var p=this,a="".concat(this._n,".").concat("deleteGroupMember"),c=l.groupID,h=l.userIDList,m=this._groupModule.getLocalGroupProfile(c);if($e(m))return Me({code:Le.CANNOT_FIND_GRP});if(Ho(m.type))return this._groupModule.canIUse(ce.AVCHATROOM_BAN_MBR)?this._banAVChatRoomMember(l):Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var y=new We("deleteGroupMember"),b="groupID:".concat(c," ").concat(h.length>5?"userIDList.length:".concat(h.length):"userIDList:".concat(h));return y.setMessage(b),U.l("".concat(a," groupID:").concat(c," userIDList:"),h),this._groupModule.request({protocolName:R_,requestData:l}).then(function(){return y.setNetworkType(p._groupModule.getNetworkType()).end(),U.l("".concat(a," ok")),m.memberCount-=1,p._updateConversationGroupProfile(m),p.deleteLocalGroupMembers(c,h),gt({group:m,userIDList:h})}).catch(function(C){return p._groupModule.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];y.setError(C,F,z).end()}),U.e("".concat(a," failed. error:"),C),Me(C)})}},{key:"_updateConversationGroupProfile",value:function(l){this._groupModule.getModule(dt).updateConversationGroupProfile([l])}},{key:"_banAVChatRoomMember",value:function(l){var p=this,a="".concat(this._n,".").concat("deleteGroupMember"),c=l.groupID,h=l.userIDList,m="groupID:".concat(c," ").concat(h.length>5?"userIDList.length:".concat(h.length):"userIDList:".concat(h)),y=new We("deleteGroupMember");y.setMessage(m),U.l("".concat(a," groupID:").concat(c," userIDList:"),h);var b=this._groupModule.getLocalGroupProfile(c);return $e(l.duration)||l.duration===0?Me({code:Le.BAN_DURATION_INVALID}):this._groupModule.request({protocolName:N_,requestData:l}).then(function(){return y.setNetworkType(p._groupModule.getNetworkType()).end(),U.l("".concat(a," ok")),p.deleteLocalGroupMembers(c,h),gt({group:b,userIDList:h})}).catch(function(C){return p._groupModule.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];y.setError(C,F,z).end()}),U.e("".concat(a," failed. error:"),C),Me(C)})}},{key:"setGroupMemberMuteTime",value:function(l){var p=this,a=l.groupID,c=l.userID,h=l.muteTime,m="setGroupMemberMuteTime",y="".concat(this._n,".").concat(m);if(c===this._groupModule.getMyUserID())return Me({code:Le.CANNOT_MUTE_SELF});var b=this._groupModule.getLocalGroupProfile(a);if(b&&Ho(b.type)){var C=Le.OPERATION_NOT_SUPPORTED_IN_AVCHATROOM;return Me({code:C,message:this._groupModule.getErrorMessage(C,m)})}U.l("".concat(y," groupID:").concat(a," userID:").concat(c));var E=new We(m);return E.setMessage("groupID:".concat(a," userID:").concat(c," muteTime:").concat(h)),this.modifyGroupMemberInfo({groupID:a,userID:c,muteTime:h}).then(function(N){E.setNetworkType(p._groupModule.getNetworkType()).end(),U.l("".concat(y," ok"));var F=p._groupModule.getLocalGroupProfile(a);return gt({group:F,member:N})}).catch(function(N){return p._groupModule.probeNetwork().then(function(F){var z=A(F,2),Q=z[0],me=z[1];E.setError(N,Q,me).end()}),U.e("".concat(y," failed. error:"),N),Me(N)})}},{key:"setGroupMemberRole",value:function(l){var p=this,a="".concat(this._n,".").concat("setGroupMemberRole"),c=l.groupID,h=l.userID,m=l.role,y=this._groupModule.getLocalGroupProfile(c);if([T.GRP_WORK,T.GRP_AVCHATROOM].includes(y.type))return Me({code:Le.CANNOT_SET_MEMBER_ROLE_IN_WORK_AND_AVCHATROOM});if(y&&y.selfInfo.role!==T.GRP_MBR_ROLE_OWNER)return Me({code:Le.NOT_OWNER});var b=[T.GRP_MBR_ROLE_ADMIN,T.GRP_MBR_ROLE_MEMBER];if(mo({groupID:c})&&b.push(T.GRP_MBR_ROLE_CUSTOM),b.indexOf(m)<0)return Me({code:Le.INVALID_MEMBER_ROLE});if(h===this._groupModule.getMyUserID())return Me({code:Le.CANNOT_SET_SELF_MEMBER_ROLE});var C=new We("setGroupMemberRole");return C.setMessage("groupID:".concat(c," userID:").concat(h," role:").concat(m)),U.l("".concat(a," groupID:").concat(c," userID:").concat(h)),this.modifyGroupMemberInfo({groupID:c,userID:h,role:m}).then(function(E){return C.setNetworkType(p._groupModule.getNetworkType()).end(),U.l("".concat(a," ok")),gt({group:y,member:E})}).catch(function(E){return p._groupModule.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];C.setError(E,z,Q).end()}),U.e("".concat(a," failed. error:"),E),Me(E)})}},{key:"_filterProfanity",value:function(l,p){var a=this._groupModule.getModule(za);if(!a)return!0;var c=a.filterText(p[l],ke),h=c.isAllowedToSend,m=c.modifiedText;return h===!0&&(p[l]=m,!0)}},{key:"setGroupMemberNameCard",value:function(l){var p=this,a="setGroupMemberNameCard",c="".concat(this._n,".").concat(a);if(l.nameCard&&this._filterProfanity("nameCard",l)===!1)return Me({code:Le.PROFANITY_FOUND});var h=l.groupID,m=l.userID,y=m===void 0?this._groupModule.getMyUserID():m,b=l.nameCard;U.l("".concat(c," groupID:").concat(h," userID:").concat(y));var C=this._groupModule.getLocalGroupProfile(h);if(C&&Ho(C.type)){var E=Le.OPERATION_NOT_SUPPORTED_IN_AVCHATROOM;return Me({code:E,message:this._groupModule.getErrorMessage(E,a)})}var N=new We(a);return N.setMessage("groupID:".concat(h," userID:").concat(y," nameCard:").concat(b)),this.modifyGroupMemberInfo({groupID:h,userID:y,nameCard:b}).then(function(F){U.l("".concat(c," ok")),N.setNetworkType(p._groupModule.getNetworkType()).end();var z=p._groupModule.getLocalGroupProfile(h);return y===p._groupModule.getMyUserID()&&z&&z.setSelfNameCard(b),gt({group:z,member:F})}).catch(function(F){return p._groupModule.probeNetwork().then(function(z){var Q=A(z,2),me=Q[0],_e=Q[1];N.setError(F,me,_e).end()}),U.e("".concat(c," failed. error:"),F),Me(F)})}},{key:"setGroupMemberCustomField",value:function(l){var p=this,a="setGroupMemberCustomField",c="".concat(this._n,".").concat(a),h=l.groupID,m=l.userID,y=m===void 0?this._groupModule.getMyUserID():m,b=l.memberCustomField;U.l("".concat(c," groupID:").concat(h," userID:").concat(y));var C=this._groupModule.getLocalGroupProfile(h);if(C&&Ho(C.type)){var E=Le.OPERATION_NOT_SUPPORTED_IN_AVCHATROOM;return Me({code:E,message:this._groupModule.getErrorMessage(E,a)})}var N=new We(a);return N.setMessage("groupID:".concat(h," userID:").concat(y," memberCustomField:").concat(JSON.stringify(b))),this.modifyGroupMemberInfo({groupID:h,userID:y,memberCustomField:b}).then(function(F){N.setNetworkType(p._groupModule.getNetworkType()).end(),U.l("".concat(c," ok"));var z=p._groupModule.getLocalGroupProfile(h);return gt({group:z,member:F})}).catch(function(F){return p._groupModule.probeNetwork().then(function(z){var Q=A(z,2),me=Q[0],_e=Q[1];N.setError(F,me,_e).end()}),U.e("".concat(c," failed. error:"),F),Me(F)})}},{key:"modifyGroupMemberInfo",value:function(l){var p=this,a=l.groupID,c=l.userID,h=void 0;return oo(a)&&(a=Rr(h=a)),this._groupModule.request({protocolName:P_,requestData:r(r({},l),{},{groupID:a,topicID:h})}).then(function(){if(p.hasLocalGroupMember(a,c)){var m=p.getLocalGroupMemberInfo(a,c);return $e(l.muteTime)||m.updateMuteUntil(l.muteTime),$e(l.role)||m.updateRole(l.role),$e(l.nameCard)||m.updateNameCard(l.nameCard),$e(l.memberCustomField)||m.updateMemberCustomField(l.memberCustomField),m}return p.getGroupMemberProfile({groupID:a,userIDList:[c]}).then(function(y){return A(y.data.memberList,1)[0]})})}},{key:"markGroupMemberList",value:function(l){var p=this,a="".concat(this._n,".").concat("markGroupMemberList"),c=l.groupID,h=l.markType,m=l.enableMark,y=l.userIDList,b=y===void 0?[]:y,C="groupID:".concat(c," markType:").concat(h," enableMark:").concat(m," userIDList count: ").concat(b.length);U.l("".concat(a," ").concat(C));var E=2,N=[];m===!0&&(E=1);var F=O(b);b.length>500&&(F=b.slice(0,500),U.w("".concat(a," ").concat(Ba(500)))),F.forEach(function(Q){N.push({userID:Q,markType:[h]})}),F=null;var z=new We("markGroupMemberList");return z.setMessage("".concat(C)),this._groupModule.request({protocolName:x_,requestData:{groupID:c,operationType:E,memberList:N}}).then(function(Q){var me=Q.data.memberList,_e=me===void 0?[]:me,we=[],Ue=[];_e.length===b.length?we.push.apply(we,O(b)):(_e.forEach(function(ot){we.push(ot.userID)}),b.forEach(function(ot){we.includes(ot)||Ue.push(ot)}));var Ve="success count:".concat(we.length," fail count:").concat(Ue.length);return z.setNetworkType(p._groupModule.getNetworkType()).setMessage(Ve).end(),U.l("".concat(a," ok. ").concat(Ve)),gt({successUserIDList:we,failureUserIDList:Ue})}).catch(function(Q){return p._groupModule.probeNetwork().then(function(me){var _e=A(me,2),we=_e[0],Ue=_e[1];z.setError(Q,we,Ue).end()}),U.e("".concat(a," failed. error:"),Q),Me(Q)})}},{key:"_getGroupMemberProfileAdvance",value:function(l){return this._groupModule.request({protocolName:L_,requestData:r(r({},l),{},{memberInfoFilter:l.memberInfoFilter?l.memberInfoFilter:["Role","JoinTime","NameCard","ShutUpUntil"]})})}},{key:"_updateLocalGroupMemberMap",value:function(l,p){var a=this;return st(p)&&p.length!==0?p.map(function(c){return a.hasLocalGroupMember(l,c.userID)?a.getLocalGroupMemberInfo(l,c.userID).updateMember(c):a.setLocalGroupMember(l,new U6(c)),a.getLocalGroupMemberInfo(l,c.userID)}):[]}},{key:"deleteLocalGroupMembers",value:function(l,p){var a=this.groupMemberListMap.get(l);a&&p.forEach(function(c){a.delete(c)})}},{key:"getLocalGroupMemberInfo",value:function(l,p){return this.groupMemberListMap.has(l)?this.groupMemberListMap.get(l).get(p):null}},{key:"setLocalGroupMember",value:function(l,p){if(this.groupMemberListMap.has(l))this.groupMemberListMap.get(l).set(p.userID,p);else{var a=new Map().set(p.userID,p);this.groupMemberListMap.set(l,a)}}},{key:"getLocalGroupMemberList",value:function(l){return this.groupMemberListMap.get(l)}},{key:"hasLocalGroupMember",value:function(l,p){return this.groupMemberListMap.has(l)&&this.groupMemberListMap.get(l).has(p)}},{key:"hasLocalGroupMemberMap",value:function(l){return this.groupMemberListMap.has(l)}},{key:"reset",value:function(){this.groupMemberListMap.clear()}}]),D}(),$6=1,G6=15,B6=function(){function D(l){i(this,D),this._groupModule=l,this._n="GroupSystemNoticeHandler",this.pendencyMap=new Map}return u(D,[{key:"onNewGroupSystemNotice",value:function(l){var p=l.dataList,a=l.isSyncingEnded,c=l.isInstantMessage;U.d("".concat(this._n,".onReceiveSystemNotice count:").concat(p.length));var h=this.newSystemNoticeStoredAndSummary({notifiesList:p,isInstantMessage:c}),m=h.eventDataList,y=h.result;m.length>0&&(this._groupModule.getModule(dt).onNewMessage({conversationOptionsList:m,isInstantMessage:c}),this._onReceivedGroupSystemNotice({result:y,isInstantMessage:c})),c?y.length>0&&this._groupModule.emitOuterEvent(R.MESSAGE_RECEIVED,y):a===!0&&this._clearGroupSystemNotice()}},{key:"newSystemNoticeStoredAndSummary",value:function(l){var p=l.notifiesList,a=l.isInstantMessage,c=null,h=p.length,m=0,y=[],b={conversationID:T.CONV_SYSTEM,unreadCount:0,type:T.CONV_SYSTEM,subType:null,lastMessage:null};for(m=0;m0?[b]:[],result:y}}},{key:"_clearGroupSystemNotice",value:function(){var l=this;this._getPendencyList().then(function(p){p.forEach(function(h){l.pendencyMap.set("".concat(h.from,"_").concat(h.groupID,"_").concat(h.to),h)});var a=l._groupModule.getModule(dt).getLocalMessageList(T.CONV_SYSTEM),c=[];a.forEach(function(h){var m=h.payload,y=m.operatorID,b=m.operationType,C=m.groupProfile;if(b===$6){var E="".concat(y,"_").concat(C.groupID,"_").concat(C.to),N=l.pendencyMap.get(E);N&&un(N.handled)&&N.handled!==0&&c.push(h)}}),l.deleteGroupSystemNotice({messageList:c})})}},{key:"deleteGroupSystemNotice",value:function(l){var p=this,a="".concat(this._n,".deleteGroupSystemNotice");return st(l.messageList)&&l.messageList.length!==0?(U.l("".concat(a," ")+l.messageList.map(function(c){return c.ID})),this._groupModule.request({protocolName:S_,requestData:{messageListToDelete:l.messageList.map(function(c){return{from:T.CONV_SYSTEM,messageSeq:c.clientSequence,messageRandom:c.random}})}}).then(function(){U.l("".concat(a," ok"));var c=p._groupModule.getModule(dt);return l.messageList.forEach(function(h){c.deleteLocalMessage(h)}),gt()}).catch(function(c){return U.e("".concat(a," error:"),c),Me(c)})):Lt()}},{key:"_getPendencyList",value:function(){var l=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=p.type,c=a===void 0?void 0:a,h=p.startTime,m=h===void 0?0:h,y=p.limit,b=y===void 0?20:y;return this._groupModule.request({protocolName:Hg,requestData:{type:c,startTime:m,limit:b,handleAccount:this._groupModule.getMyUserID()}}).then(function(C){var E=C.data.pendencyList;return C.data.nextStartTime!==0?l._getPendencyList({startTime:C.data.nextStartTime}).then(function(N){return[].concat(O(E),O(N))}):E})}},{key:"getGroupApplicationList",value:function(){var l=this;return this._getPendencyList().then(function(p){return l._getPendencyList({type:T.GRP_COMMUNITY}).then(function(a){return p.push.apply(p,O(a)),l._handlePendencyResult(p)}).catch(function(a){return l._handlePendencyResult(p)})})}},{key:"_handlePendencyResult",value:function(l){var p=this,a=[];return l.forEach(function(c){p.pendencyMap.set("".concat(c.from,"_").concat(c.groupID,"_").concat(c.to),c),c.handled===0&&a.push({applicant:c.from,applicantNick:c.fromUserNickName,groupName:c.groupName,groupID:c.groupID,authentication:c.authentication,messageKey:c.time,applicationType:c.applicationType,userID:c.userID})}),Lt({applicationList:a})}},{key:"_onReceivedGroupSystemNotice",value:function(l){var p=this,a=l.result;l.isInstantMessage&&a.forEach(function(c){switch(c.payload.operationType){case 1:break;case 2:p._onApplyGroupRequestAgreed(c);break;case 3:break;case 4:p._onMemberKicked(c);break;case 5:p._onGroupDismissed(c);break;case 6:break;case 7:p._onInviteGroup(c);break;case 8:p._onQuitGroup(c);break;case 9:p._onSetManager(c);break;case 10:p._onDeleteManager(c);break;case 11:case 12:case 15:break;case 20:p._onMessageRemindTypeSynced(c);break;case 21:p._groupModule.onAVChatRoomMemberBanned(c)}})}},{key:"_onApplyGroupRequestAgreed",value:function(l){var p=this,a=l.payload.groupProfile.groupID;this._groupModule.hasLocalGroup(a)||this._groupModule.getGroupProfile({groupID:a}).then(function(c){var h=c.data.group;if(h){p._groupModule.updateGroupMap([h]);var m=!h.isSupportTopic;p._groupModule.emitGroupListUpdate(!0,m)}})}},{key:"_onMemberKicked",value:function(l){var p=l.payload.groupProfile.groupID;this._groupModule.hasLocalGroup(p)&&this._groupModule.deleteLocalGroupAndConversation(p)}},{key:"_onGroupDismissed",value:function(l){var p=l.payload.groupProfile.groupID;this._groupModule.hasLocalGroup(p)&&this._groupModule.deleteLocalGroupAndConversation(p);var a=this._groupModule._AVChatRoomHandler;a&&a.checkJoinedAVChatRoomByID(p)&&a.reset(p)}},{key:"_onInviteGroup",value:function(l){var p=this,a=l.payload.groupProfile.groupID;this._groupModule.hasLocalGroup(a)||this._groupModule.getGroupProfile({groupID:a}).then(function(c){var h=c.data.group;h&&(p._groupModule.updateGroupMap([h]),p._groupModule.emitGroupListUpdate())})}},{key:"_onQuitGroup",value:function(l){var p=l.payload.groupProfile.groupID;this._groupModule.hasLocalGroup(p)&&this._groupModule.deleteLocalGroupAndConversation(p)}},{key:"_onSetManager",value:function(l){var p=l.payload.groupProfile,a=p.to,c=p.groupID,h=this._groupModule.getGroupMemberHandler().getLocalGroupMemberInfo(c,a);h&&h.updateRole(T.GRP_MBR_ROLE_ADMIN)}},{key:"_onDeleteManager",value:function(l){var p=l.payload.groupProfile,a=p.to,c=p.groupID,h=this._groupModule.getGroupMemberHandler().getLocalGroupMemberInfo(c,a);h&&h.updateRole(T.GRP_MBR_ROLE_MEMBER)}},{key:"_onMessageRemindTypeSynced",value:function(l){var p=l.payload.groupProfile.groupID,a=l.payload.messageRemindType;this._groupModule.getModule(dt).onGroupMessageRemindTypeUpdated({groupID:p,messageRemindType:a})}},{key:"_handleTopicSystemNotice",value:function(l){var p=l.groupProfile,a=p.groupID,c=p.topicID,h=l.elements,m=h.operationType,y=h.topicIDList,b=h.messageRemindType,C=this._groupModule.getModule(ur);m===17?C.onTopicCreated({groupID:a,topicID:c}):m===18?C.onTopicDeleted({groupID:a,topicIDList:y}):m===20&&C.onTopicMessageRemindTypeUpdated({groupID:a,topicID:c,messageRemindType:b})}},{key:"reset",value:function(){this.pendencyMap.clear()}}]),D}(),H6=["relayFlag"],q6=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="GroupModule",c._commonGroupHandler=new D6(w(c)),c._groupAttributesHandler=new A6(w(c)),c._groupCountersHandler=new N6(w(c)),c._AVChatRoomHandler=new x6(w(c)),c._groupTipsHandler=new k6(w(c)),c._groupSystemNoticeHandler=new B6(w(c)),c._groupMemberHandler=new F6(w(c)),c.groupMap=new Map,c._unjoinedAVChatRoomList=new Map,c._receiptDetailCompleteMap=new Map,c.getInnerEmitterInstance().on(ir.CLOUD_CONFIG_UPDATED,c._onCloudConfigUpdated,w(c)),c}return u(p,[{key:"_onCloudConfigUpdated",value:function(){var a=this.getCloudConfig("polling_interval"),c=this.getCloudConfig("polling_interval_plus"),h=this.getCloudConfig("polling_no_msg_count"),m=this.getCloudConfig("polling_simplified_msg"),y=this.getCloudConfig("paging_grp_count");U.l("".concat(this._n,"._onCloudConfigUpdated pollingInterval:").concat(a)+" pollingIntervalPlus:".concat(c," pollingNoMessageCount:").concat(h)+" pollingSimplifiedMessage:".concat(m," pagingGroupCount:").concat(y)),this._AVChatRoomHandler.setPollingInterval(a),this._AVChatRoomHandler.setPollingIntervalPlus(c),this._AVChatRoomHandler.setPollingNoMessageCount(h),this._AVChatRoomHandler.setPollingSimplifiedMessage(m),this._commonGroupHandler.setPagingGroupCount(y)}},{key:"onCheckTimer",value:function(a){this.isLoggedIn()&&(this._commonGroupHandler.onCheckTimer(a),this._groupTipsHandler.onCheckTimer(a))}},{key:"guardForAVChatRoom",value:function(a){var c=this;if(a.conversationType===T.CONV_GROUP){var h=oo(a.to)?Rr(a.to):a.to;return this.hasLocalGroup(h)?Lt():this.getGroupProfile({groupID:h}).then(function(m){var y=m.data.group.type;if(U.l("".concat(c._n,".guardForAVChatRoom. groupID:").concat(h," type:").concat(y)),y===T.GRP_AVCHATROOM){var b=Le.MSG_SEND_FAIL_NOT_IN_AVCHATROOM;return Me(new Fn({code:b,message:c.getErrorMessage(b,a.from,h),data:{message:a}}))}return Lt()})}return Lt()}},{key:"checkJoinedAVChatRoomByID",value:function(a){return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(a)}},{key:"onNewGroupMessage",value:function(a){this._commonGroupHandler.onNewGroupMessage(a)}},{key:"updateNextMessageSeq",value:function(a){var c=this;if(st(a)){var h=this.getModule(ur);a.forEach(function(m){var y=m.conversationID.replace(T.CONV_GROUP,"");oo(y)&&h.updateLastMessage(y,m.lastMessage),c.groupMap.has(y)&&(c.groupMap.get(y).nextMessageSeq=m.lastMessage.sequence+1)})}}},{key:"onNewGroupTips",value:function(a){this._groupTipsHandler.onNewGroupTips(a)}},{key:"onGroupMessageRevoked",value:function(a){this._commonGroupHandler.onGroupMessageRevoked(a)}},{key:"onNewGroupSystemNotice",value:function(a){this._groupSystemNoticeHandler.onNewGroupSystemNotice(a)}},{key:"onGroupMessageReadNotice",value:function(a){var c=this;a.dataList.forEach(function(h){var m=h.elements.groupMessageReadNotice;if(!$e(m)){var y=c.getModule(dt);m.forEach(function(b){var C=b.groupID,E=b.topicID,N=E===void 0?void 0:E,F=b.lastMessageSeq;U.d("".concat(c._n,".onGroupMessageReadNotice groupID:").concat(C," lastMessageSeq:").concat(F));var z="".concat(T.CONV_GROUP).concat(C),Q=!0;Ye(N)||(z="".concat(T.CONV_GROUP).concat(N),Q=!1),y.updateIsReadAfterReadReport({conversationID:z,lastMessageSeq:F}),y.updateUnreadCount(z,Q),y.clearGroupAtInfoList(z,Q)})}})}},{key:"onReadReceiptList",value:function(a){var c=this;U.d("".concat(this._n,".onReadReceiptList options:"),JSON.stringify(a)),a.dataList.forEach(function(h){var m=h.groupProfile,y=h.elements,b=m.groupID,C=c.getModule(dt),E=y.readReceiptList;C.updateReadReceiptInfo({groupID:b,readReceiptList:E})})}},{key:"onGroupMessageModified",value:function(a){U.d("".concat(this._n,".onGroupMessageModified options:"),JSON.stringify(a));var c=this.getModule(dt);a.dataList.forEach(function(h){c.onMessageModified(r(r({},h),{},{conversationType:T.CONV_GROUP,to:h.topicID?h.topicID:h.groupID}))})}},{key:"deleteGroupSystemNotice",value:function(a){this._groupSystemNoticeHandler.deleteGroupSystemNotice(a)}},{key:"initGroupMap",value:function(a){this.groupMap.set(a.groupID,new El(a))}},{key:"clearGroupMap",value:function(){this.groupMap.clear()}},{key:"deleteGroup",value:function(a){this.groupMap.delete(a)}},{key:"updateGroupMap",value:function(a){var c,h=this,m=this.getModule(dt);a.forEach(function(N){c=N.groupID,h.groupMap.has(c)?h.groupMap.get(c).updateGroup(N):(h.groupMap.set(c,new El(N)),m.deleteGroupRomaingMessageInfo(c))});var y,b=this.getMyUserID(),C=$(this.groupMap);try{for(C.s();!(y=C.n()).done;){var E=A(y.value,2)[1];E.selfInfo.userID=b,E.selfInfo.role==="Owner"&&(E.ownerID=b)}}catch(N){C.e(N)}finally{C.f()}}},{key:"getGroupMap",value:function(){return this.groupMap}},{key:"getLocalGroupList",value:function(){return O(this.groupMap.values())}},{key:"getLocalGroupProfile",value:function(a){return this.groupMap.get(a)}},{key:"sortLocalGroupList",value:function(){var a=O(this.groupMap).filter(function(c){var h=A(c,2);return h[0],!Ye(h[1].lastMessage)});a.sort(function(c,h){return h[1].lastMessage.lastTime-c[1].lastMessage.lastTime}),this.groupMap=new Map(O(a))}},{key:"updateGroupLastMessage",value:function(a){this._commonGroupHandler.handleUpdateGroupLastMessage(a)}},{key:"emitGroupListUpdate",value:function(){var a=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],c=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=this.getLocalGroupList();if(a&&this.emitOuterEvent(R.GROUP_LIST_UPDATED),c){var m=JSON.parse(JSON.stringify(h)),y=this.getModule(dt);y.updateConversationGroupProfile(m)}}},{key:"getMyNameCardByGroupID",value:function(a){var c=this.getLocalGroupProfile(a);return c?c.selfInfo.nameCard:""}},{key:"isPagingGetCompleted",value:function(){return this._commonGroupHandler.isPagingGetCompleted()}},{key:"getMessageRemindType",value:function(a){var c=this;st(a)&&a.length!==0&&(U.l("".concat(this._n,".getMessageRemindType groupIDList:").concat(a)),this.getGroupProfileAdvance({groupIDList:a,responseFilter:{memberInfoFilter:["MsgFlag"]}}).then(function(h){var m=h.data.successGroupList,y=c.getModule(dt);m.forEach(function(b){y.onGroupMessageRemindTypeUpdated({groupID:b.groupID,messageRemindType:b.members[0].messageRemindType})})}))}},{key:"getGroupList",value:function(){return this._commonGroupHandler.getGroupList()}},{key:"syncCommunityWithTopic",value:function(){return this._commonGroupHandler.syncGroupList(!0)}},{key:"getGroupProfile",value:function(a){var c=this,h="".concat(this._n,".").concat("getGroupProfile"),m=new We("getGroupProfile"),y=a.groupID,b=a.groupCustomFieldFilter;U.l("".concat(h," groupID:").concat(y));var C={groupIDList:[y],responseFilter:{groupBaseInfoFilter:["Type","Name","Introduction","Notification","FaceUrl","Owner_Account","CreateTime","InfoSeq","LastInfoTime","LastMsgTime","MemberNum","MaxMemberNum","ApplyJoinOption","NextMsgSeq","ShutUpAllMember","InviteJoinOption"],groupCustomFieldFilter:b,memberInfoFilter:["Role","JoinTime","MsgSeq","MsgFlag","NameCard"]}};return this.getGroupProfileAdvance(C).then(function(E){var N,F=E.data,z=F.successGroupList,Q=F.failureGroupList;return U.l("".concat(h," ok")),Q.length>0?Me(Q[0]):(Ho(z[0].type)&&!c.hasLocalGroup(y)?N=new El(z[0]):(c.updateGroupMap(z),N=c.getLocalGroupProfile(y)),N.isSupportTopic||c.getModule(dt).updateConversationGroupProfile([N]),m.setNetworkType(c.getNetworkType()).setMessage("groupID:".concat(y," type:").concat(N.type," muteAllMembers:").concat(N.muteAllMembers," ownerID:").concat(N.ownerID)).end(),gt({group:N}))}).catch(function(E){return c.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];m.setError(E,z,Q).setMessage("groupID:".concat(a.groupID)).end()}),U.e("".concat(h," failed. error:"),E),Me(E)})}},{key:"getGroupProfileAdvance",value:function(a){var c="".concat(this._n,".getGroupProfileAdvance"),h=a.groupIDList;st(h)&&h.length>50&&(this.outputWarning("GetGroupProfileLimit"),h.length=50);var m=[],y=[];h.forEach(function(N){mo({groupID:N})?y.push(N):m.push(N)});var b=[];if(m.length>0){var C=this._getGroupProfileAdvance(r(r({},a),{},{groupIDList:m}));b.push(C)}if(y.length>0){var E=this._getGroupProfileAdvance(r(r({},a),{},{groupIDList:y,relayFlag:m.length>0}));b.push(E)}return Promise.all(b).then(function(N){var F=[],z=[];return N.forEach(function(Q){F.push.apply(F,O(Q.successGroupList)),z.push.apply(z,O(Q.failureGroupList))}),gt({successGroupList:F,failureGroupList:z})}).catch(function(N){return U.e("".concat(c," failed. error:"),N),Me(N)})}},{key:"_getGroupProfileAdvance",value:function(a){var c=this,h=a.relayFlag,m=h!==void 0&&h,y=k(a,H6);return this.request({protocolName:$g,requestData:y}).then(function(b){U.l("".concat(c._n,"._getGroupProfileAdvance ok."));var C=b.data.groups;return{successGroupList:C.filter(function(E){return $e(E.errorCode)||E.errorCode===0}),failureGroupList:C.filter(function(E){return E.errorCode&&E.errorCode!==0}).map(function(E){return new Fn({code:E.errorCode,message:E.errorInfo,data:{groupID:E.groupID}})})}}).catch(function(b){return m&&mo({groupID:a.groupIDList[0]})?{successGroupList:[],failureGroupList:[]}:Me(b)})}},{key:"createGroup",value:function(a){var c=this,h="".concat(this._n,".").concat("createGroup"),m=a.type,y=a.groupID;if(a.name&&this._filterProfanity("name",a)===!1)return Me({code:Le.PROFANITY_FOUND});if(a.introduction&&this._filterProfanity("introduction",a)===!1)return Me({code:Le.PROFANITY_FOUND});if(a.notification&&this._filterProfanity("notification",a)===!1)return Me({code:Le.PROFANITY_FOUND});if(!["Public","Private","ChatRoom","AVChatRoom","Community"].includes(m))return Me({code:Le.ILLEGAL_GRP_TYPE});if(!mo({type:m})){if(!Ye(y)&&mo({groupID:y}))return Me({code:Le.ILLEGAL_GRP_ID});a.isSupportTopic=void 0}if(Ho(m)&&!$e(a.memberList)&&a.memberList.length>0&&(a.memberList=void 0),this._canIUseJoinOption(m)||$e(a.joinOption)||(a.joinOption=void 0),mo({type:m})){if(!Ye(y)&&!mo({groupID:y}))return Me({code:Le.ILLEGAL_GRP_ID});a.isSupportTopic=a.isSupportTopic===!0?1:0}var b=new We("createGroup");U.l("".concat(h," options:"),a);var C=null,E=[];return this.request({protocolName:d_,requestData:r(r({},a),{},{ownerID:this.getMyUserID(),webPushFlag:1})}).then(function(N){var F=N.data,z=F.groupID,Q=F.overLimitUserIDList,me=Q===void 0?[]:Q;if(C=z,E=me,b.setNetworkType(c.getNetworkType()).setMessage("groupType:".concat(a.type," groupID:").concat(z," overLimitUserIDList:").concat(me)).end(),U.l("".concat(h," ok groupID:").concat(z," overLimitUserIDList:").concat(me)),a.type===T.GRP_AVCHATROOM)return c.getGroupProfile({groupID:z});if(a.type===T.GRP_COMMUNITY&&a.isSupportTopic===1)return c.getGroupProfile({groupID:z});Ye(a.memberList)||Ye(me)||(a.memberList=a.memberList.filter(function(vt){return me.indexOf(vt.userID)===-1})),c.updateGroupMap([r(r({},a),{},{groupID:z})]);var _e=c.getModule(lr),we="",Ue=0;a.type===T.GRP_COMMUNITY?(we=c.isIntl()?"Create Community":"创建社群",Ue=1):we=c.isIntl()?"Create Group":"创建群组";var Ve=c.getModule(yr).getMyNick(),ot=_e.createCustomMessage({to:z,conversationType:T.CONV_GROUP,payload:{data:JSON.stringify({businessID:"group_create",content:we,cmd:Ue,opUser:Ve||c.getMyUserID(),version:4})}});return _e.sendMessageInstance(ot),c.emitGroupListUpdate(),c.getGroupProfile({groupID:z})}).then(function(N){var F=N.data.group,z=F.selfInfo,Q=z.nameCard,me=z.joinTime;return F.updateSelfInfo({nameCard:Q,joinTime:me,messageRemindType:T.MSG_REMIND_ACPT_AND_NOTE,role:T.GRP_MBR_ROLE_OWNER}),gt({group:F,overLimitUserIDList:E})}).catch(function(N){if(b.setMessage("groupType:".concat(a.type)),c.probeNetwork().then(function(z){var Q=A(z,2),me=Q[0],_e=Q[1];b.setError(N,me,_e).end()}),N.code===10010||N.code===10007){c.updateGroupMap([r(r({},a),{},{groupID:C})]);var F=c.getLocalGroupProfile(C);return U.l("".concat(h," success, but failed to get group profile.")),gt({group:F,overLimitUserIDList:E})}return U.e("".concat(h," failed. error:"),N),Me(N)})}},{key:"dismissGroup",value:function(a){var c=this,h="".concat(this._n,".").concat("dismissGroup");if(this.hasLocalGroup(a)&&this.getLocalGroupProfile(a).type===T.GRP_WORK)return Me(new Fn({code:Le.CANNOT_DISMISS_WORK}));var m=new We("dismissGroup");return m.setMessage("groupID:".concat(a)),U.l("".concat(h," groupID:").concat(a)),this.request({protocolName:f_,requestData:{groupID:a}}).then(function(){return m.setNetworkType(c.getNetworkType()).end(),U.l("".concat(h," ok")),c.deleteLocalGroupAndConversation(a),c.checkJoinedAVChatRoomByID(a)&&c._AVChatRoomHandler.reset(a),c._groupAttributesHandler.deleteLocalGroupAttributes(a),gt({groupID:a})}).catch(function(y){return c.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];m.setError(y,E,N).end()}),U.e("".concat(h," failed. error:"),y),Me(y)})}},{key:"updateGroupProfile",value:function(a){var c=this,h="".concat(this._n,".").concat("updateGroupProfile");if(this.hasLocalGroup(a.groupID)){var m=this.getLocalGroupProfile(a.groupID).type;this._canIUseJoinOption(m)||$e(a.joinOption)||(U.w("".concat(h," joinOption is unavailable for Work/Meeting/AVChatRoom")),a.joinOption=void 0)}if($e(a.muteAllMembers)||(a.muteAllMembers?a.muteAllMembers="On":a.muteAllMembers="Off"),a.name&&this._filterProfanity("name",a)===!1)return Me({code:Le.PROFANITY_FOUND});if(a.introduction&&this._filterProfanity("introduction",a)===!1)return Me({code:Le.PROFANITY_FOUND});if(a.notification&&this._filterProfanity("notification",a)===!1)return Me({code:Le.PROFANITY_FOUND});var y=new We("updateGroupProfile");return y.setMessage(JSON.stringify(a)),U.l("".concat(h," groupID:").concat(a.groupID)),this.request({protocolName:p_,requestData:a}).then(function(){return y.setNetworkType(c.getNetworkType()).end(),U.l("".concat(h," ok")),c.hasLocalGroup(a.groupID)&&c.groupMap.get(a.groupID).updateGroup(a),gt({group:c.groupMap.get(a.groupID)})}).catch(function(b){return c.probeNetwork().then(function(C){var E=A(C,2),N=E[0],F=E[1];y.setError(b,N,F).end()}),U.l("".concat(h," failed. error:"),b),Me(b)})}},{key:"_filterProfanity",value:function(a,c){var h=this.getModule(za);if(!h)return!0;var m=h.filterText(c[a],le),y=m.isAllowedToSend,b=m.modifiedText;return y===!0&&(c[a]=b,!0)}},{key:"joinGroup",value:function(a){var c=this,h=a.groupID,m=a.type,y="".concat(this._n,".joinGroup");if(m===T.GRP_WORK)return Me({code:Le.CANNOT_JOIN_WORK});if(this.deleteUnjoinedAVChatRoom(h),this.hasLocalGroup(h)){if(!this.isLoggedIn())return Lt({status:T.JOIN_STATUS_ALREADY_IN_GROUP});var b=new We("applyJoinGroup");return this.getGroupProfile({groupID:h}).then(function(){return b.setNetworkType(c.getNetworkType()).setMessage("groupID:".concat(h," joinedStatus:").concat(T.JOIN_STATUS_ALREADY_IN_GROUP)).end(),Lt({status:T.JOIN_STATUS_ALREADY_IN_GROUP})}).catch(function(C){return b.setNetworkType(c.getNetworkType()).setMessage("groupID:".concat(h," unjoined")).end(),U.w("".concat(y," ").concat(h," was unjoined, now join!")),c.groupMap.delete(h),c.applyJoinGroup(a)})}return U.l("".concat(y," groupID:").concat(h)),this.isLoggedIn()?this.applyJoinGroup(a):this._AVChatRoomHandler.joinWithoutAuth(a)}},{key:"applyJoinGroup",value:function(a){var c=this,h="".concat(this._n,".").concat("applyJoinGroup"),m=a.groupID;if(!Ye(a.applyMessage)&&this._filterProfanity("applyMessage",a)===!1)return Me({code:Le.PROFANITY_FOUND});var y=new We("applyJoinGroup"),b=r({},a),C=this.canIUse(ce.AVCHATROOM_HISTORY_MSG);return C&&(b.historyMessageFlag=1),this.getModule(dt).deleteTopicRoamingMessageInfo(m),this.request({protocolName:Gg,requestData:b}).then(function(E){var N=E.data,F=N.joinedStatus,z=N.longPollingKey,Q=N.startSeq,me=N.avChatRoomFlag,_e=N.avChatRoomKey,we=N.messageList,Ue="groupID:".concat(m," joinedStatus:").concat(F," longPollingKey:").concat(z," startSeq:").concat(Q)+" avChatRoomFlag:".concat(me," canGetAVChatRoomHistoryMessage:").concat(C,",")+" history message count:".concat(Ye(we)?0:we.length);switch(y.setNetworkType(c.getNetworkType()).setMessage("".concat(Ue)).end(),U.l("".concat(h," ok. ").concat(Ue)),F){case _d:return gt({status:_d});case Qi:return c.getGroupProfile({groupID:m}).then(function(ot){var vt=ot.data.group;return c._handleJoinResult({group:vt,avChatRoomFlag:me,longPollingKey:z,startSeq:Q,avChatRoomKey:_e,messageList:we})}).catch(function(){var ot=new El({groupID:m});return c._handleJoinResult({group:ot,avChatRoomFlag:me,longPollingKey:z,startSeq:Q,avChatRoomKey:_e,messageList:we})});default:var Ve=new Fn({code:Le.JOIN_GRP_FAIL});return U.e("".concat(h," failed. error:"),Ve),Me(Ve)}}).catch(function(E){return y.setMessage("groupID:".concat(m)),c.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];y.setError(E,z,Q).end()}),U.e("".concat(h," failed. error:"),E),Me(E)})}},{key:"_handleJoinResult",value:function(a){var c,h=this,m=a.group,y=a.avChatRoomFlag,b=a.longPollingKey,C=a.startSeq,E=a.avChatRoomKey,N=a.messageList,F=m.groupID;return y===1?(this.getModule(dt).setCompleted("".concat(T.CONV_GROUP).concat(F)),this._groupAttributesHandler.initGroupAttributesCache({groupID:F,avChatRoomKey:E}),this._groupCountersHandler.initGroupCountersCache({groupID:F,avChatRoomKey:E}),(c=$e(b)?this._AVChatRoomHandler.handleJoinResult({group:m}):this._AVChatRoomHandler.startRunLoop({group:m,longPollingKey:b,startSeq:C})).then(function(){h._onAVChatRoomHistoryMessage(N)}),c):(this.emitGroupListUpdate(!0,!1),gt({status:Qi,group:m}))}},{key:"quitGroup",value:function(a){var c=this,h="".concat(this._n,".").concat("quitGroup");U.l("".concat(h," groupID:").concat(a));var m=this.checkJoinedAVChatRoomByID(a);if(!m&&!this.hasLocalGroup(a))return Me({code:Le.MEMBER_NOT_IN_GRP});if(m&&!this.isLoggedIn())return U.l("".concat(h," anonymously ok. groupID:").concat(a)),this.deleteLocalGroupAndConversation(a),this._AVChatRoomHandler.reset(a),Lt({groupID:a});var y=new We("quitGroup");return y.setMessage("groupID:".concat(a)),this.request({protocolName:h_,requestData:{groupID:a}}).then(function(){return y.setNetworkType(c.getNetworkType()).end(),U.l("".concat(h," ok")),c.deleteLocalGroupAndConversation(a),m&&c._AVChatRoomHandler.reset(a),c._groupAttributesHandler.deleteLocalGroupAttributes(a),gt({groupID:a})}).catch(function(b){return c.probeNetwork().then(function(C){var E=A(C,2),N=E[0],F=E[1];y.setError(b,N,F).end()}),U.e("".concat(h," failed. error:"),b),Me(b)})}},{key:"searchGroupByID",value:function(a){var c=this,h="".concat(this._n,".").concat("searchGroupByID"),m={groupIDList:[a]},y=new We("searchGroupByID");return y.setMessage("groupID:".concat(a)),U.l("".concat(h," groupID:").concat(a)),this.request({protocolName:g_,requestData:m}).then(function(b){var C=b.data.groupProfile;if(C[0].errorCode!==0)throw new Fn({code:C[0].errorCode,message:C[0].errorInfo});return y.setNetworkType(c.getNetworkType()).end(),U.l("".concat(h," ok")),gt({group:new El(C[0])})}).catch(function(b){return c.probeNetwork().then(function(C){var E=A(C,2),N=E[0],F=E[1];y.setError(b,N,F).end()}),U.w("".concat(h," failed. error:"),b),Me(b)})}},{key:"changeGroupOwner",value:function(a){var c=this,h="".concat(this._n,".").concat("changeGroupOwner");if(this.hasLocalGroup(a.groupID)&&this.getLocalGroupProfile(a.groupID).type===T.GRP_AVCHATROOM)return Me({code:Le.CANNOT_CHANGE_OWNER_IN_AVCHATROOM});if(a.newOwnerID===this.getMyUserID())return Me({code:Le.CANNOT_CHANGE_OWNER_TO_SELF});var m=new We("changeGroupOwner");return m.setMessage("groupID:".concat(a.groupID," newOwnerID:").concat(a.newOwnerID)),U.l("".concat(h," groupID:").concat(a.groupID)),this.request({protocolName:m_,requestData:a}).then(function(){m.setNetworkType(c.getNetworkType()).end(),U.l("".concat(h," ok"));var y=a.groupID,b=a.newOwnerID;c.groupMap.get(y).ownerID=b;var C=c._groupMemberHandler.getLocalGroupMemberList(y);if(C instanceof Map){var E=C.get(c.getMyUserID());$e(E)||(E.updateRole("Member"),c.groupMap.get(y).selfInfo.role="Member");var N=C.get(b);$e(N)||N.updateRole("Owner")}return c.emitGroupListUpdate(!0,!1),gt({group:c.groupMap.get(y)})}).catch(function(y){return c.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];m.setError(y,E,N).end()}),U.e("".concat(h," failed. error:"),y),Me(y)})}},{key:"getGroupApplicationList",value:function(){return this._groupSystemNoticeHandler.getGroupApplicationList()}},{key:"handleGroupApplication",value:function(a){var c,h,m,y,b,C=this,E="".concat(this._n,".").concat("handleGroupApplication"),N=a.handleAction,F=a.handleMessage,z=a.message,Q=a.application;z?(c=z.payload.operatorID,h=z.payload.groupProfile.groupID,m=z.payload.authentication,y=z.payload.messageKey):Q&&(c=Q.applicant,h=Q.groupID,m=Q.authentication,y=Q.messageKey);var me=v_;Q&&Q.applicationType===2&&(me=y_,b=Q.userID);var _e=new We("handleGroupApplication");return _e.setMessage("groupID:".concat(h)),U.l("".concat(E," groupID:").concat(h)),this.request({protocolName:me,requestData:{handleAction:N,handleMessage:F,applicant:c,invitee:b,groupID:h,authentication:m,messageKey:y}}).then(function(){return _e.setNetworkType(C.getNetworkType()).end(),U.l("".concat(E," ok")),z&&C._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[a.message]}),gt({group:C.getLocalGroupProfile(h)})}).catch(function(we){return C.probeNetwork().then(function(Ue){var Ve=A(Ue,2),ot=Ve[0],vt=Ve[1];_e.setError(we,ot,vt).end()}),U.e("".concat(E," failed. error"),we),Me(we)})}},{key:"handleGroupInvitation",value:function(a){var c=this,h="".concat(this._n,".").concat("handleGroupInvitation"),m=a.message.payload,y=m.groupProfile.groupID,b=m.authentication,C=m.messageKey,E=m.operatorID,N=a.handleAction,F=new We("handleGroupInvitation");return F.setMessage("groupID:".concat(y," inviter:").concat(E," handleAction:").concat(N)),U.l("".concat(h," groupID:").concat(y," inviter:").concat(E," handleAction:").concat(N)),this.request({protocolName:__,requestData:r(r({},a),{},{inviter:E,groupID:y,authentication:b,messageKey:C})}).then(function(){return F.setNetworkType(c.getNetworkType()).end(),U.l("".concat(h," ok")),c._groupSystemNoticeHandler.deleteGroupSystemNotice({messageList:[a.message]}),gt({group:c.getLocalGroupProfile(y)})}).catch(function(z){return c.probeNetwork().then(function(Q){var me=A(Q,2),_e=me[0],we=me[1];F.setError(z,_e,we).end()}),U.e("".concat(h," failed. error"),z),Me(z)})}},{key:"getGroupOnlineMemberCount",value:function(a){return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(a)?this._AVChatRoomHandler.getGroupOnlineMemberCount(a):Lt({memberCount:0})}},{key:"hasLocalGroup",value:function(a){return this.groupMap.has(a)}},{key:"deleteLocalGroupAndConversation",value:function(a){var c=this.checkJoinedAVChatRoomByID(a);if(U.l("".concat(this._n,".deleteLocalGroupAndConversation isJoinedAVChatRoom:").concat(c)),c&&this.getModule(dt).deleteLocalConversation("".concat(T.CONV_GROUP).concat(a)),mo({groupID:a})){var h=this.getLocalGroupProfile(a);h&&h.isSupportTopic===!0&&this.getModule(ur).deleteTopicListInCommunity(a)}this._deleteLocalGroup(a),this.emitGroupListUpdate(!0,!1)}},{key:"_deleteLocalGroup",value:function(a){this.groupMap.delete(a),this._groupMemberHandler.deleteGroupMemberList(a)}},{key:"sendMessage",value:function(a,c){if(st(a._receiverList)&&a._receiverList.length>0&&!this.canIUse(ce.MSG_TO_SPECIFIED_GRP_MBR))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var h=this.createGroupMessagePack(a,c);return this.request(h)}},{key:"createGroupMessagePack",value:function(a,c){var h=null;c&&c.offlinePushInfo&&(h=c.offlinePushInfo);var m="";At(a.cloudCustomData)&&a.cloudCustomData.length>0&&(m=a.cloudCustomData);var y=[];if(_n(c)&&_n(c.messageControlInfo)){var b=c.messageControlInfo,C=b.excludedFromUnreadCount,E=b.excludedFromLastMessage,N=b.excludedFromContentModeration;C===!0&&y.push("NoUnread"),E===!0&&y.push("NoLastMsg"),N===!0&&y.push("NoMsgCheck")}var F=void 0;st(a._receiverList)&&a._receiverList.length>0&&(F=a._receiverList,a._receiverList.length>50&&(F=a._receiverList.slice(0,50),this.outputWarning("ReceiverListLimit")));var z=this.isOnlineMessage(a,c)?1:0,Q=a.getGroupAtInfoList(),me={fromAccount:this.getMyUserID(),groupID:a.to,msgBody:a.getElements(),cloudCustomData:m,random:a.random,priority:a.priority,clientSequence:a.clientSequence,groupAtInfo:a.type!==T.MSG_TEXT||Ye(Q)?void 0:Q,onlineOnlyFlag:z,clientTime:a.clientTime,offlinePushInfo:h?{pushFlag:h.disablePush===!0?1:0,title:h.title||"",desc:h.description||"",ext:h.extension||"",apnsInfo:{badgeMode:h.ignoreIOSBadge===!0?1:0,isVoipPush:this._isVoipPush(h)},androidInfo:{OPPOChannelID:h.androidOPPOChannelID||""}}:void 0,messageControlInfo:z===0?y:void 0,needReadReceipt:a.needReadReceipt!==!0||this.isMessageFromOrToAVChatroom(a.to)?0:1,receiverList:F,isSupportExtension:a.isSupportExtension===!0?1:0};return oo(a.to)&&(me.groupID=Rr(a.to),me.topicID=a.to),{protocolName:Sp,tjgID:this.generateTjgID(a),requestData:me}}},{key:"_isVoipPush",value:function(a){var c=void 0;return $e(a.disableVoipPush)||(c=a.disableVoipPush===!1?1:0),c}},{key:"revokeMessage",value:function(a){var c={groupID:a.to,msgSeqList:[{msgSeq:a.sequence}]};return oo(a.to)&&(c.groupID=Rr(a.to),c.topicID=a.to),this.request({protocolName:b_,requestData:c})}},{key:"deleteMessage",value:function(a){var c=a.to,h=a.keyList;U.l("".concat(this._n,".deleteMessage groupID:").concat(c," count:").concat(h.length));var m={groupID:c,deleter:this.getMyUserID(),keyList:h};return oo(c)&&(m.groupID=Rr(c),m.topicID=c),this.request({protocolName:D_,requestData:m})}},{key:"modifyRemoteMessage",value:function(a){var c=a.to,h=a.sequence,m=a.payload,y=a.type,b=a.version,C=b===void 0?0:b,E=a.cloudCustomData,N=c,F=void 0;oo(c)&&(N=Rr(c),F=c);var z=void 0;return Hu(y)&&(z=[]).push({type:y,content:m}),this.request({protocolName:Vg,requestData:{groupID:N,topicID:F,sequence:h,version:C,elements:z,cloudCustomData:E}})}},{key:"getRoamingMessage",value:function(a){var c=this,h="".concat(this._n,".getRoamingMessage"),m=a.conversationID,y=a.groupID,b=a.sequence,C=new We("getGroupRoamingMessages"),E=0,N=void 0;return oo(y)&&(y=Rr(N=y)),this._computeLastSequence({groupID:y,topicID:N,sequence:b}).then(function(F){return E=F,U.l("".concat(h," groupID:").concat(y," startSequence:").concat(E)),c.request({protocolName:Ep,requestData:{groupID:y,count:21,sequence:E,topicID:N}})}).then(function(F){var z=F.data,Q=z.messageList,me=z.complete,_e=z.invisibleSequenceList,we=_e===void 0?[]:_e;$e(Q)?U.l("".concat(h," ok. complete:").concat(me," but messageList is undefined!")):U.l("".concat(h," ok. complete:").concat(me," count:").concat(Q.length));var Ue=c._getMinSequence(we,Q)-1;C.setNetworkType(c.getNetworkType()).setMessage("groupID:".concat(y," topicID:").concat(N," startSequence:").concat(E," complete:").concat(me," nextSequence:").concat(Ue)).end();var Ve=c.getModule(dt),ot=[];return Ye(Q)||(Ve.updateRoamingMessageSequence(m,Ue),ot=Ve.onRoamingMessage(Q,m),Ve.updateIsRead(m),Ve.patchConversationLastMessage(m)),(me===2||Ue<=1)&&(Ve.setCompleted(m),Ue=""),U.l("".concat(h," nextReqID:").concat(Ue,", stored message count:").concat(ot.length,", invisible sequence count:").concat(we.length)),{nextReqID:Ue+"",storedMessageList:ot}}).catch(function(F){return c.probeNetwork().then(function(z){var Q=A(z,2),me=Q[0],_e=Q[1];C.setError(F,me,_e).setMessage("groupID:".concat(y," topicID:").concat(N," startSequence:").concat(E)).end()}),U.w("".concat(h," failed. error:"),F),Me(F)})}},{key:"_getGroupIDOfMessage",value:function(a){return a.conversationID.replace(T.CONV_GROUP,"")}},{key:"_getMinSequence",value:function(a,c){var h=0;Ye(c)||(h=c[c.length-1].sequence);var m=0;return Ye(a)||(m=a[a.length-1]),U.l("".concat(this._n,"._getMinSequence minVisibleSequence:").concat(h," minInvisibleSequence:").concat(m)),m>0&&m=100?100:b,we="groupID:".concat(C," sequence:").concat(N," cursor:").concat(me," filter:").concat(Q," completeFlag:").concat(z);U.l("".concat(F," ").concat(we));var Ue={cursor:"",isCompleted:!1,messageID:E,unreadUserIDList:[],readUserIDList:[]},Ve=new We("getReadReceiptDetail");return Ve.setMessage(we),this.request({protocolName:w_,requestData:{groupID:C,sequence:N,flag:Q,cursor:me,count:_e}}).then(function(ot){Ve.end();var vt=ot.data,Ut=vt.cursor,mn=vt.isCompleted,bn=vt.unreadUserIDList,Nr=vt.readUserIDList;return Ue.cursor=Ut,mn===1&&(Ue.isCompleted=!0,c._receiptDetailCompleteMap.set(E,!0)),Q===0?Ue.readUserIDList=Nr.map(function(lo){return lo.userID}):Q===1&&(Ue.unreadUserIDList=bn.map(function(lo){return lo.userID})),U.l("".concat(F," ok")),gt(Ue)}).catch(function(ot){return c.probeNetwork().then(function(vt){var Ut=A(vt,2),mn=Ut[0],bn=Ut[1];Ve.setError(ot,mn,bn).end()}),U.w("".concat(F," failed. error:"),ot),Me(ot)})}},{key:"getRoamingMessagesHopping",value:function(a){var c=this,h="".concat(this._n,".getRoamingMessagesHopping"),m=new We("getGroupRoamingMessagesHopping"),y=a.groupID,b=a.count,C=a.sequence,E=a.direction,N=C;E===1&&(N=C+b-1);var F=void 0;oo(y)&&(y=Rr(F=y));var z="".concat(F?"topicID:".concat(F):"groupID:".concat(y)," sequence:").concat(C," direction:").concat(E);return U.l("".concat(h," ").concat(z)),this.request({protocolName:Ep,requestData:{groupID:y,topicID:F,count:b,sequence:N}}).then(function(Q){var me=Q.data,_e=me.messageList,we=me.complete,Ue="complete:".concat(we," count:").concat(_e?_e.length:0);if(U.l("".concat(h," ok. ").concat(Ue)),m.setNetworkType(c.getNetworkType()).setMessage("".concat(z," ").concat(Ue)).end(),we===2||Ye(_e)){var Ve=c._computeResult();return gt(Ve)}var ot="".concat(T.CONV_GROUP).concat(a.groupID),vt=c.getModule(dt).onRoamingMessage(_e,ot,!1),Ut=c._computeResult({direction:E,sequence:C,remoteMessageList:_e,processedMessageList:vt});return gt(Ut)}).catch(function(Q){return c.probeNetwork().then(function(me){var _e=A(me,2),we=_e[0],Ue=_e[1];m.setError(Q,we,Ue).setMessage("groupID:".concat(y," sequence:").concat(C," count:").concat(b)).end()}),U.w("".concat(h," failed. error:"),Q),Me(Q)})}},{key:"_computeResult",value:function(a){var c={messageList:[],isCompleted:!1,nextMessageSeq:""};if($e(a))return c.isCompleted=!0,c;var h=a.direction,m=a.sequence,y=a.remoteMessageList,b=y===void 0?[]:y,C=a.processedMessageList,E=C===void 0?[]:C,N=b.length;return h===1?(c.nextMessageSeq=b[0].sequence+1,E.forEach(function(F){F.sequence>=m&&c.messageList.push(F)}),c.messageList.length===0&&b[0].sequence0?Promise.resolve(y):$e(m)||this.hasLocalGroup(c)?$e(m)?this.getGroupLastSequence(c):this.getTopicLastSequence({groupID:c,topicID:m}):Promise.resolve(0)}},{key:"getGroupLastSequence",value:function(a){var c=this,h="".concat(this._n,".").concat("getGroupLastSequence"),m=new We("getGroupLastSequence"),y=0,b="";if(this.hasLocalGroup(a)){var C=this.getLocalGroupProfile(a),E=C.lastMessage;if(E.lastSequence>0&&E.onlineOnlyFlag===!1)return y=E.lastSequence,b="got lastSequence:".concat(y," from local group profile[lastMessage.lastSequence]. groupID:").concat(a),U.l("".concat(h," ").concat(b)),m.setNetworkType(this.getNetworkType()).setMessage("".concat(b)).end(),Promise.resolve(y);if(C.nextMessageSeq>1)return y=C.nextMessageSeq-1,b="got lastSequence:".concat(y," from local group profile[nextMessageSeq]. groupID:").concat(a),U.l("".concat(h," ").concat(b)),m.setNetworkType(this.getNetworkType()).setMessage("".concat(b)).end(),Promise.resolve(y)}var N="GROUP".concat(a),F=this.getModule(dt).getLocalConversation(N);if(F&&F.lastMessage.lastSequence&&F.lastMessage.onlineOnlyFlag===!1)return y=F.lastMessage.lastSequence,b="got lastSequence:".concat(y," from local conversation profile[lastMessage.lastSequence]. groupID:").concat(a),U.l("".concat(h," ").concat(b)),m.setNetworkType(this.getNetworkType()).setMessage("".concat(b)).end(),Promise.resolve(y);var z={groupIDList:[a],responseFilter:{groupBaseInfoFilter:["NextMsgSeq"]}};return this.getGroupProfileAdvance(z).then(function(Q){var me=Q.data.successGroupList;return Ye(me)?U.l("".concat(h," successGroupList is empty. groupID:").concat(a)):(y=me[0].nextMessageSeq-1,b="got lastSequence:".concat(y," from getGroupProfileAdvance. groupID:").concat(a),U.l("".concat(h," ").concat(b))),m.setNetworkType(c.getNetworkType()).setMessage("".concat(b)).end(),y}).catch(function(Q){return c.probeNetwork().then(function(me){var _e=A(me,2),we=_e[0],Ue=_e[1];m.setError(Q,we,Ue).setMessage("get lastSequence failed from getGroupProfileAdvance. groupID:".concat(a)).end()}),U.w("".concat(h," failed. error:"),Q),Me(Q)})}},{key:"getTopicLastSequence",value:function(a){var c=this,h=a.groupID,m=a.topicID,y="".concat(this._n,".").concat("getTopicLastSequence"),b=new We("getTopicLastSequence"),C=0,E="",N=this.getModule(ur);return N.hasLocalTopic(h,m)?(C=N.getLocalTopic(h,m).nextMessageSeq-1,E="get lastSequence:".concat(C," from local topic info[nextMessageSeq]. topicID:").concat(m),U.l("".concat(y," ").concat(E)),b.setNetworkType(this.getNetworkType()).setMessage("".concat(E)).end(),Promise.resolve(C)):N.getTopicList({groupID:h,topicIDList:[m]}).then(function(F){var z=F.data.successTopicList;return Ye(z)?U.l("".concat(y," successTopicList is empty. topicID:").concat(m)):(C=z[0].nextMessageSeq-1,E="get lastSequence:".concat(C," from getTopicList. topicID:").concat(m),U.l("".concat(y," ").concat(E))),b.setNetworkType(c.getNetworkType()).setMessage("".concat(E)).end(),C}).catch(function(F){return c.probeNetwork().then(function(z){var Q=A(z,2),me=Q[0],_e=Q[1];b.setError(F,me,_e).setMessage("get lastSequence failed from getTopicList. topicID:".concat(m)).end()}),U.w("".concat(y," failed. error:"),F),Me(F)})}},{key:"isMessageFromOrToAVChatroom",value:function(a){return this._AVChatRoomHandler.checkJoinedAVChatRoomByID(a)}},{key:"hasJoinedAVChatRoom",value:function(){return this._AVChatRoomHandler.hasJoinedAVChatRoom()}},{key:"getJoinedAVChatRoom",value:function(){return this._AVChatRoomHandler.getJoinedAVChatRoom()}},{key:"isOnlineMessage",value:function(a,c){return!(!this._canIUseOnlineOnlyFlag(a)||!c||c.onlineUserOnly!==!0)}},{key:"_canIUseOnlineOnlyFlag",value:function(a){var c=this.getJoinedAVChatRoom();return!c||!c.includes(a.to)||a.conversationType!==T.CONV_GROUP}},{key:"_onAVChatRoomHistoryMessage",value:function(a){if(!Ye(a)){U.l("".concat(this._n,"._onAVChatRoomHistoryMessage count:").concat(a.length));var c=[];a.forEach(function(h){c.push(r(r({},h),{},{isHistoryMessage:1}))}),this.onAVChatRoomMessage(c)}}},{key:"onAVChatRoomMessage",value:function(a){this._AVChatRoomHandler.onMessage(a)}},{key:"onAVChatRoomMemberBanned",value:function(a){this._AVChatRoomHandler.onAVChatRoomMemberBanned(a)}},{key:"getGroupSimplifiedInfo",value:function(a){var c=this,h=new We("getGroupSimplifiedInfo"),m={groupIDList:[a],responseFilter:{groupBaseInfoFilter:["Type","Name"]}};return this.getGroupProfileAdvance(m).then(function(y){var b=y.data.successGroupList;return h.setNetworkType(c.getNetworkType()).setMessage("groupID:".concat(a," type:").concat(b[0].type)).end(),b[0]}).catch(function(y){c.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];h.setError(y,E,N).setMessage("groupID:".concat(a)).end()})})}},{key:"setUnjoinedAVChatRoom",value:function(a){this._unjoinedAVChatRoomList.set(a,1)}},{key:"deleteUnjoinedAVChatRoom",value:function(a){this._unjoinedAVChatRoomList.has(a)&&this._unjoinedAVChatRoomList.delete(a)}},{key:"isUnjoinedAVChatRoom",value:function(a){return this._unjoinedAVChatRoomList.has(a)}},{key:"isGroupAttributesUpdatedNotice",value:function(a){return this._groupAttributesHandler.isGroupAttributesUpdatedNotice(a)}},{key:"updateLocalMainSequenceOnReconnected",value:function(){this._groupAttributesHandler.updateLocalMainSequenceOnReconnected()}},{key:"initGroupAttributes",value:function(a){return this._groupAttributesHandler.initGroupAttributes(a)}},{key:"setGroupAttributes",value:function(a){return this._groupAttributesHandler.setGroupAttributes(a)}},{key:"deleteGroupAttributes",value:function(a){return this._groupAttributesHandler.deleteGroupAttributes(a)}},{key:"getGroupAttributes",value:function(a){return this._groupAttributesHandler.getGroupAttributes(a)}},{key:"isMessageFromTopic",value:function(a,c){return a===2&&!Ye(c)}},{key:"isMessageFromCommunityOfTopic",value:function(a,c){return a===2&&Ye(c)}},{key:"getMessageExtensions",value:function(a,c){return U.l("".concat(this._n,".getMessageExtensions startSequence:").concat(c)),this.request({protocolName:Xg,requestData:{groupID:a.to,messageSequence:a.sequence,startSequence:c}})}},{key:"modifyMessageExtensions",value:function(a,c){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return U.l("".concat(this._n,".modifyMessageExtensions operateType:").concat(h)),this.request({protocolName:Jg,requestData:{groupID:a.to,messageSequence:a.sequence,extensionList:c,operateType:h}})}},{key:"_genNotifyReqList",value:function(a){for(var c=[],h=0,m=a.length;h0&&c.getGroupNotify(E);var F="nextGroupIDList.length:".concat(E.length);E.length<=10&&(F="nextGroupIDList:".concat(JSON.stringify(E))),U.l("".concat(h," ").concat(F))}).catch(function(b){U.e("".concat(h," failed. error:"),b)})}},{key:"_genRevokedInfos",value:function(a){var c=a.notifyList,h=a.groupID,m=[];return st(c)&&c.forEach(function(y){m.push({groupID:h,sequence:y.sequence,random:y.random,revokerInfo:r({},y.revokerInfo)})}),m}},{key:"_getGroupLastRevokedTime",value:function(a){return this.hasLocalGroup(a)?this.getLocalGroupProfile(a)._lastRevokedTime:0}},{key:"_setGroupLastRevokedTime",value:function(a,c){this.hasLocalGroup(a)&&(this.getLocalGroupProfile(a)._lastRevokedTime=c)}},{key:"isGroupCountersNotice",value:function(a){return this._groupCountersHandler.isGroupCountersNotice(a)}},{key:"setGroupCounters",value:function(a){return this._groupCountersHandler.setGroupCounters(a)}},{key:"increaseGroupCounter",value:function(a){return this._groupCountersHandler.increaseGroupCounter(a)}},{key:"decreaseGroupCounter",value:function(a){return this._groupCountersHandler.decreaseGroupCounter(a)}},{key:"getGroupCounters",value:function(a){return this._groupCountersHandler.getGroupCounters(a)}},{key:"getGroupMemberHandler",value:function(){return this._groupMemberHandler}},{key:"getGroupMemberList",value:function(a){return this._groupMemberHandler.getGroupMemberList(a)}},{key:"getGroupMemberProfile",value:function(a){return this._groupMemberHandler.getGroupMemberProfile(a)}},{key:"addGroupMember",value:function(a){return this._groupMemberHandler.addGroupMember(a)}},{key:"deleteGroupMember",value:function(a){return this._groupMemberHandler.deleteGroupMember(a)}},{key:"setGroupMemberMuteTime",value:function(a){return this._groupMemberHandler.setGroupMemberMuteTime(a)}},{key:"setGroupMemberRole",value:function(a){return this._groupMemberHandler.setGroupMemberRole(a)}},{key:"setGroupMemberNameCard",value:function(a){return this._groupMemberHandler.setGroupMemberNameCard(a)}},{key:"setGroupMemberCustomField",value:function(a){return this._groupMemberHandler.setGroupMemberCustomField(a)}},{key:"markGroupMemberList",value:function(a){return this._groupMemberHandler.markGroupMemberList(a)}},{key:"modifyGroupMemberInfo",value:function(a){return this._groupMemberHandler.modifyGroupMemberInfo(a)}},{key:"restartPolling",value:function(){this._AVChatRoomHandler.restartPolling()}},{key:"getPollingTimerID",value:function(a){if(!a)return-1;var c=this.getLocalGroupProfile(a);return c&&Ho(c.type)?this._AVChatRoomHandler.getPollingTimerID(a):-1}},{key:"_canIUseJoinOption",value:function(a){return function(c){return c===T.GRP_PUBLIC}(a)||mo({type:a})}},{key:"reset",value:function(){this.groupMap.clear(),this._unjoinedAVChatRoomList.clear(),this._receiptDetailCompleteMap.clear(),this._commonGroupHandler.reset(),this._groupSystemNoticeHandler.reset(),this._groupTipsHandler.reset(),this._groupAttributesHandler.reset(),this._groupCountersHandler.reset(),this._AVChatRoomHandler.reset(),this._groupMemberHandler.reset()}}]),p}(Er),V6=["topicID","topicName","avatar","introduction","notification","unreadCount","muteAllMembers","customData","groupAtInfoList","nextMessageSeq","selfInfo"],Vw=function(D,l){return Ye(D)?{lastTime:0,lastSequence:0,fromAccount:"",payload:null,type:"",messageForShow:"",nick:"",version:0,cloudCustomData:"",isRevoked:!1,revoker:null}:{lastTime:D.time||0,lastSequence:D.sequence||0,fromAccount:D.from||"",payload:D.payload||null,type:D.type||"",messageForShow:Bu(D.type,D.payload,l),nick:D.nick||"",version:D.version||0,cloudCustomData:D.cloudCustomData||"",isRevoked:D.isRevoked||!1,revoker:D.revoker||null}},z6=function(){function D(l,p){i(this,D),this.topicID="",this.topicName="",this.avatar="",this.introduction="",this.notification="",this.unreadCount=0,this.muteAllMembers=!1,this.customData="",this.groupAtInfoList=[],this.nextMessageSeq=0,this.lastMessage=Vw(l.lastMessage,p),this.selfInfo={muteTime:0,readedSequence:0,messageRemindType:"",excludedUnreadSequenceList:void 0},this._initTopic(l)}return u(D,[{key:"_initTopic",value:function(l){for(var p in l)V6.indexOf(p)<0||(p==="selfInfo"?this.updateSelfInfo(l[p]):this[p]=p==="muteAllMembers"?l[p]===1:l[p])}},{key:"updateUnreadCount",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.unreadCount=l}},{key:"updateNextMessageSeq",value:function(l){this.nextMessageSeq=l}},{key:"updateLastMessage",value:function(l){this.lastMessage=Vw(l)}},{key:"updateGroupAtInfoList",value:function(l){this.groupAtInfoList=JSON.parse(JSON.stringify(l))}},{key:"updateTopic",value:function(l){$e(l.selfInfo)||this.updateSelfInfo(l.selfInfo),$e(l.muteAllMembers)||(this.muteAllMembers=l.muteAllMembers===1),xi(this,l,["groupID","lastMessageTime","selfInfo","muteAllMembers","lastMsg"])}},{key:"updateSelfInfo",value:function(l){return xi(this.selfInfo,l,[],[""])!==0}},{key:"reduceUnreadCount",value:function(){return this.unreadCount>=1&&(this.unreadCount-=1,!0)}},{key:"isLastMessageRevoked",value:function(l){return l.sequence===this.lastMessage.lastSequence}},{key:"setLastMessageRevoked",value:function(l){this.lastMessage.isRevoked=l}},{key:"setLastMessageRevoker",value:function(l){this.lastMessage.revoker=l}}]),D}(),j6=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="TopicModule",c._topicMap=new Map,c._getTopicTimeMap=new Map,c.TOPIC_CACHE_TIME=300,c.TOPIC_LAST_ACTIVE_TIME=3600,c.getInnerEmitterInstance().on(ir.CLOUD_CONFIG_UPDATED,c._onCloudConfigUpdated,w(c)),c}return u(p,[{key:"_onCloudConfigUpdated",value:function(){var a=this.getCloudConfig("topic_cache_time"),c=this.getCloudConfig("topic_last_active_time");$e(a)||(this.TOPIC_CACHE_TIME=Number(a)),$e(c)||(this.TOPIC_LAST_ACTIVE_TIME=Number(c))}},{key:"onTopicCreated",value:function(a){var c=a.groupID;this.resetGetTopicTime(c),this.emitOuterEvent(R.TOPIC_CREATED,a)}},{key:"onTopicDeleted",value:function(a){var c=this,h=a.groupID,m=a.topicIDList;(m===void 0?[]:m).forEach(function(y){c._deleteLocalTopic(h,y)}),this.emitOuterEvent(R.TOPIC_DELETED,a)}},{key:"onTopicMessageRemindTypeUpdated",value:function(a){var c=a.groupID,h=a.topicID,m=a.messageRemindType,y=this.getLocalTopic(c,h);if(y){var b=y.updateSelfInfo({messageRemindType:m});b&&this.emitOuterEvent(R.TOPIC_UPDATED,{groupID:c,topic:y}),U.d("".concat(this._n,".onTopicMessageRemindTypeUpdated topicID:").concat(h)+" messageRemindType:".concat(m," isTopicUpdated:").concat(b))}}},{key:"onTopicProfileUpdated",value:function(a){var c=a.groupID,h=a.topicID,m=this.getLocalTopic(c,h);m&&(m.updateTopic(a),this.emitOuterEvent(R.TOPIC_UPDATED,{groupID:c,topic:m}))}},{key:"onConversationProxy",value:function(a){var c=a.topicID,h=a.unreadCount,m=a.groupAtInfoList,y=Rr(c),b=this.getLocalTopic(y,c),C=!1;b&&($e(h)||b.unreadCount===h||(b.updateUnreadCount(h),C=!0),$e(m)||(b.updateGroupAtInfoList(m),C=!0)),C&&this.emitOuterEvent(R.TOPIC_UPDATED,{groupID:y,topic:b})}},{key:"onMessageSent",value:function(a){var c=a.groupID,h=a.topicID,m=a.lastMessage,y=this.getLocalTopic(c,h);y&&(y.nextMessageSeq+=1,y.updateLastMessage(m),this.emitOuterEvent(R.TOPIC_UPDATED,{groupID:c,topic:y}))}},{key:"onMessageModified",value:function(a){var c=a.to,h=a.time,m=a.sequence,y=a.elements,b=a.cloudCustomData,C=a.messageVersion,E=Rr(c),N=this.getLocalTopic(E,c);if(N){var F=N.lastMessage;U.d("".concat(this._n,".onMessageModified topicID:").concat(c," lastMessage:"),JSON.stringify(F),"options:",JSON.stringify(a)),F&&(F.payload===null||F.lastTime===h&&F.lastSequence===m&&F.version!==C)&&(F.type=y[0].type,F.payload=y[0].content,F.messageForShow=Bu(F.type,F.payload,this.isIntl()),F.cloudCustomData=b,F.version=C,F.lastSequence=m,F.lastTime=h,this.emitOuterEvent(R.TOPIC_UPDATED,{groupID:E,topic:N}))}}},{key:"onMessageRevoked",value:function(a){var c=this;if(a.length!==0){var h=null,m=null,y=!1;a.forEach(function(b){var C=b.to;m=Rr(C),(h=c.getLocalTopic(m,C))&&(h.reduceUnreadCount()&&(y=!0),h.isLastMessageRevoked(b)&&(h.setLastMessageRevoked(!0),h.setLastMessageRevoker(b.revoker),y=!0))}),y&&this.emitOuterEvent(R.TOPIC_UPDATED,{groupID:m,topic:h})}}},{key:"isLastMessageRevoked",value:function(a){var c=a.topicID,h=a.sequence,m=Rr(c),y=this.getLocalTopic(m,c),b=!1;return y&&(b=y.isLastMessageRevoked({sequence:h})),b}},{key:"getJoinedCommunityList",value:function(){return this.getModule(Tt).syncCommunityWithTopic()}},{key:"createTopicInCommunity",value:function(a){var c=this,h="".concat(this._n,".").concat("createTopicInCommunity"),m=a.topicID;if(!$e(m)&&!oo(m))return Me({code:Le.ILLEGAL_TOPIC_ID});if(a.topicName&&this._filterProfanity("topicName",a)===!1)return Me({code:Le.PROFANITY_FOUND});if(a.introduction&&this._filterProfanity("introduction",a)===!1)return Me({code:Le.PROFANITY_FOUND});if(a.notification&&this._filterProfanity("notification",a)===!1)return Me({code:Le.PROFANITY_FOUND});var y=new We("createTopicInCommunity");return this.request({protocolName:K_,requestData:r({},a)}).then(function(b){var C=b.data.topicID;return y.setMessage("topicID:".concat(C)).setNetworkType(c.getNetworkType()).end(),U.l("".concat(h," ok. topicID:").concat(C)),c._updateTopicMap([r(r({},a),{},{topicID:C})]),gt({topicID:C})}).catch(function(b){return c.probeNetwork().then(function(C){var E=A(C,2),N=E[0],F=E[1];y.setError(b,N,F).end()}),U.e("".concat(h," failed. error:"),b),Me(b)})}},{key:"deleteTopicFromCommunity",value:function(a){var c=this,h="".concat(this._n,".").concat("deleteTopicFromCommunity"),m=a.groupID,y=a.topicIDList,b=y===void 0?[]:y,C=new We("deleteTopicFromCommunity");return C.setMessage("groupID:".concat(m," topicIDList:").concat(b)),this.request({protocolName:Y_,requestData:{groupID:m,topicIDList:b}}).then(function(E){var N=E.data.resultList,F=[],z=[];(N===void 0?[]:N).forEach(function(me){var _e=me.topicID,we=me.errorCode,Ue=me.errorInfo;we===0?F.push({topicID:_e}):z.push({topicID:_e,code:we,message:Ue})});var Q="success count:".concat(F.length,", fail count:").concat(z.length);return C.setMoreMessage(Q).setNetworkType(c.getNetworkType()).end(),U.l("".concat(h," ok. ").concat(Q)),F.forEach(function(me){c._deleteLocalTopic(m,me.topicID)}),gt({successTopicList:F,failureTopicList:z})}).catch(function(E){return c.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];C.setError(E,z,Q).end()}),U.e("".concat(h," failed. error:"),E),Me(E)})}},{key:"updateTopicProfile",value:function(a){var c=this,h="".concat(this._n,".").concat("updateTopicProfile");if(U.l("".concat(h," options:"),a),a.topicName&&this._filterProfanity("topicName",a)===!1)return Me({code:Le.PROFANITY_FOUND});if(a.introduction&&this._filterProfanity("introduction",a)===!1)return Me({code:Le.PROFANITY_FOUND});if(a.notification&&this._filterProfanity("notification",a)===!1)return Me({code:Le.PROFANITY_FOUND});var m=new We("updateTopicProfile");return m.setMessage("groupID:".concat(a.groupID," topicID:").concat(a.topicID)),$e(a.muteAllMembers)||(a.muteAllMembers=a.muteAllMembers===!0?"On":"Off"),this.request({protocolName:J_,requestData:r({},a)}).then(function(){return m.setNetworkType(c.getNetworkType()).end(),U.l("".concat(h," ok")),c._updateTopicMap([a]),gt({topic:c.getLocalTopic(a.groupID,a.topicID)})}).catch(function(y){return c.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];m.setError(y,E,N).end()}),U.e("".concat(h," failed. error:"),y),Me(y)})}},{key:"getTopicList",value:function(a){var c=this,h="".concat(this._n,".").concat("getTopicList"),m=a.groupID,y=a.topicIDList,b=y===void 0?[]:y,C=b.length===0,E=new We("getTopicList");if(E.setMessage("groupID:".concat(m)),this._getTopicTimeMap.has(m)){var N=this._getTopicTimeMap.get(m),F=N.isGetAll,z=N.time;if((F||!F&&!C)&&Date.now()-z<1e3*this.TOPIC_CACHE_TIME){var Q=this._getLocalTopicList(m,b);if(C||Q.length===b.length)return E.setNetworkType(this.getNetworkType()).setMoreMessage("from cache, topic count:".concat(Q.length)).end(),U.l("".concat(h," groupID:").concat(m," from cache, topic count:").concat(Q.length)),Lt({successTopicList:Q,failureTopicList:[]})}}return this.request({protocolName:rm,requestData:{groupID:m,topicIDList:b}}).then(function(me){var _e=me.data.topicInfoList,we=[],Ue=[],Ve=[];(_e===void 0?[]:_e).forEach(function(Ut){var mn=Ut.topic,bn=Ut.selfInfo,Nr=Ut.errorCode,lo=Ut.errorInfo,Vo=mn.topicID;Nr===0?(we.push(r(r({},mn),{},{selfInfo:bn})),Ue.push(Vo)):Ve.push({topicID:Vo,code:Nr,message:lo})}),c._updateTopicMap(we),c._handleTopicAtInfo(we);var ot="success count:".concat(Ue.length,", fail count:").concat(Ve.length);E.setNetworkType(c.getNetworkType()).setMoreMessage(ot).end(),U.l("".concat(h," groupID:").concat(m," from remote, ").concat(ot));var vt=[];return Ye(Ue)||(c._getTopicTimeMap.set(m,{time:Date.now(),isGetAll:C}),vt=c._getLocalTopicList(m,Ue)),gt({successTopicList:vt,failureTopicList:Ve})}).catch(function(me){return c.probeNetwork(me).then(function(_e){var we=A(_e,2),Ue=we[0],Ve=we[1];E.setError(me,Ue,Ve).end()}),U.e("".concat(h," failed. error:"),me),Me(me)})}},{key:"hasLocalTopic",value:function(a,c){return!!this._topicMap.has(a)&&this._topicMap.get(a).has(c)}},{key:"getLocalTopic",value:function(a,c){var h=null;return this._topicMap.has(a)&&(h=this._topicMap.get(a).get(c)),h}},{key:"_getLocalTopicList",value:function(a){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],h=this._topicMap.get(a),m=[];return h&&(m=O(h.values())),c.length===0?m:m.filter(function(y){return c.includes(y.topicID)})}},{key:"_deleteLocalTopic",value:function(a,c){this._topicMap.has(a)&&this._topicMap.get(a).has(c)&&(this._topicMap.get(a).delete(c),U.l("".concat(this._n,"._deleteLocalTopic groupID:").concat(a," topicID:").concat(c)))}},{key:"_updateTopicMap",value:function(a){var c=this,h=[];a.forEach(function(m){var y=m.groupID,b=m.topicID,C=null;c._topicMap.has(y)||c._topicMap.set(y,new Map),c._topicMap.get(y).has(b)?(C=c._topicMap.get(y).get(b)).updateTopic(m):(c._getTopicLastMessage(m),C=new z6(m,c.isIntl()),c._topicMap.get(y).set(b,C));var E=c._computeUnreadCount(C);C.updateUnreadCount(E),h.push({conversationID:"".concat(T.CONV_GROUP).concat(b),type:T.CONV_TOPIC,unreadCount:E})}),h.length>0&&this.getModule(dt).updateTopicConversation(h)}},{key:"resetGetTopicTime",value:function(a){var c=this;$e(a)?O(this._getTopicTimeMap.keys()).forEach(function(h){c._getTopicTimeMap.set(h,0)}):this._getTopicTimeMap.set(a,0)}},{key:"getTopicListOnReconnected",value:function(){var a=this,c=O(this._topicMap.keys()),h=[],m=this.getModule(dt);c.forEach(function(y){var b=[],C=a._getLocalTopicList(y);m.deleteTopicRoamingMessageInfo(y),C.forEach(function(E){var N=E.lastMessage.lastTime,F=N===void 0?0:N;Date.now()-1e3*F<1e3*a.TOPIC_LAST_ACTIVE_TIME&&b.push(E.topicID)}),b.length>0&&h.push({groupID:y,topicIDList:b})}),U.l("".concat(this._n,".getTopicListOnReconnected. active community count:").concat(h.length)),this._relayGetTopicList(h)}},{key:"_relayGetTopicList",value:function(a){var c=this;if(a.length!==0){var h=a.shift(),m=h.topicIDList.length>5?"topicIDList.length:".concat(h.topicIDList.length):"topicIDList:".concat(h.topicIDList),y=new We("relayGetTopicList");y.setMessage(m),U.l("".concat(this._n,"._relayGetTopicList. ").concat(m)),this.getTopicList(h).then(function(){y.setNetworkType(c.getNetworkType()).end(),c._relayGetTopicList(a)}).catch(function(b){c.probeNetwork().then(function(C){var E=A(C,2),N=E[0],F=E[1];y.setError(b,N,F).end()}),c._relayGetTopicList(a)})}}},{key:"_handleTopicAtInfo",value:function(a){var c=this;a.length!==0&&a.forEach(function(h){var m=h.groupID,y=h.topicID,b=h.groupAtInfoList,C=[];$e(b)||(b.forEach(function(E){C.push(r(r({},E),{},{groupID:m,topicID:y}))}),c.getModule(dt).onNewGroupAtTips({dataList:C}))})}},{key:"_getTopicLastMessage",value:function(a){if(!$e(a.lastMsg)){var c={time:a.lastMsg.time,sequence:a.lastMsg.sequence,from:a.lastMsg.from,payload:a.lastMsg.elements[0]?a.lastMsg.elements[0].content:null,type:a.lastMsg.elements[0]?a.lastMsg.elements[0].type:"",nick:a.lastMsg.nick,version:a.lastMsg.messageVersion,cloudCustomData:a.lastMsg.cloudCustomData,isRevoked:a.lastMsg.isPlaceMessage===2,revoker:Ye(a.lastMsg.revokerInfo)?null:a.lastMsg.revokerInfo.revoker};a.lastMessage=c}}},{key:"deleteTopicListInCommunity",value:function(a){var c=this,h=this._getLocalTopicList(a),m=this.getModule(dt);h.forEach(function(y){var b=y.topicID;c._deleteLocalTopic(a,b),c._getTopicTimeMap.delete(a),m.deleteLocalConversation("".concat(T.CONV_GROUP).concat(b))})}},{key:"_computeUnreadCount",value:function(a){var c=a.selfInfo,h=c.excludedUnreadSequenceList,m=c.readedSequence,y=a.nextMessageSeq-a.selfInfo.readedSequence-1;if(st(h)){var b=0;h.forEach(function(C){C>=m&&C<=a.nextMessageSeq-1&&(b+=1)}),b>=1&&(y-=b)}return y<0?0:y}},{key:"_filterProfanity",value:function(a,c){var h=this.getModule(za);if(!h)return!0;var m=h.filterText(c[a],le),y=m.isAllowedToSend,b=m.modifiedText;return y===!0&&(c[a]=b,!0)}},{key:"updateLastMessage",value:function(a,c){var h=Rr(a),m=this.getLocalTopic(h,a);if(m){var y=c.sequence+1;m.updateNextMessageSeq(y),m.updateLastMessage(c),this.emitOuterEvent(R.TOPIC_UPDATED,{groupID:h,topic:m})}}},{key:"getMessageExtensions",value:function(a,c){U.l("".concat(this._n,".getMessageExtensions startSequence:").concat(c));var h=Rr(a.to);return this.request({protocolName:Xg,requestData:{groupID:h,topicID:a.to,messageSequence:a.sequence,startSequence:c}})}},{key:"modifyMessageExtensions",value:function(a,c){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;U.l("".concat(this._n,".modifyMessageExtensions operateType:").concat(h));var m=Rr(a.to);return this.request({protocolName:Jg,requestData:{groupID:m,topicID:a.to,messageSequence:a.sequence,extensionList:c,operateType:h}})}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._topicMap.clear(),this._getTopicTimeMap.clear(),this.TOPIC_CACHE_TIME=300,this.TOPIC_LAST_ACTIVE_TIME=3600}}]),p}(Er),W6=function(){function D(l){i(this,D),this._userModule=l,this._n="ProfileHandler",this.TAG="profile",this.accountProfileMap=new Map,this.expirationTime=864e5}return u(D,[{key:"setExpirationTime",value:function(l){this.expirationTime=l}},{key:"getUserProfile",value:function(l){var p=this,a="".concat(this._n,".").concat("getUserProfile"),c=l.userIDList;l.fromAccount=this._userModule.getMyAccount(),c.length>100&&(U.w("".concat(a," ").concat(Ba(100))),c.length=100);for(var h,m=[],y=[],b=0,C=c.length;b5?"userIDList.length:".concat(c.length):"userIDList:".concat(c)),this._userModule.request({protocolName:R0,requestData:l}).then(function(z){F.setNetworkType(p._userModule.getNetworkType()).end(),U.i("".concat(a," ok"));var Q=p._handleResponse(z).concat(y);return gt(E?Q[0]:Q)}).catch(function(z){return p._userModule.probeNetwork().then(function(Q){var me=A(Q,2),_e=me[0],we=me[1];F.setError(z,_e,we).end()}),U.e("".concat(a," failed. error:"),z),Me(z)})}},{key:"getMyProfile",value:function(){var l=this._userModule.getMyAccount(),p="".concat(this._n,".getMyProfile");if(U.l("".concat(p," myAccount:").concat(l)),this._fill(),this._contains(l)){var a=this._getProfileFromMap(l);return U.d("".concat(p," from cache, myProfile:").concat(JSON.stringify(a))),Lt(a)}return this.getUserProfile({fromAccount:l,userIDList:[l],bFromGetMyProfile:!0})}},{key:"_handleResponse",value:function(l){var p=l.data.userProfileItem;if(!st(p))return[];for(var a=[],c=Date.now(),h=0,m=p.length;h-1)a.profileCustomField.push({key:p[c].tag,value:p[c].value});else switch(p[c].tag){case Gt.NICK:a.nick=p[c].value;break;case Gt.GENDER:a.gender=p[c].value;break;case Gt.BIRTHDAY:a.birthday=p[c].value;break;case Gt.LOCATION:a.location=p[c].value;break;case Gt.SELFSIGNATURE:a.selfSignature=p[c].value;break;case Gt.ALLOWTYPE:a.allowType=p[c].value;break;case Gt.LANGUAGE:a.language=p[c].value;break;case Gt.AVATAR:a.avatar=p[c].value;break;case Gt.MESSAGESETTINGS:a.messageSettings=p[c].value;break;case Gt.ADMINFORBIDTYPE:a.adminForbidType=p[c].value;break;case Gt.LEVEL:a.level=p[c].value;break;case Gt.ROLE:a.role=p[c].value;break;default:U.w("".concat(this._n,"._getLatestProfileFromResponse unknown tag:"),p[c].tag,p[c].value)}return a}},{key:"updateMyProfile",value:function(l){var p=this,a="".concat(this._n,".").concat("updateMyProfile");if(l.nick&&this._userModule.filterProfanity("nick",l)===!1)return Me({code:Le.PROFANITY_FOUND});if(l.selfSignature&&this._userModule.filterProfanity("selfSignature",l)===!1)return Me({code:Le.PROFANITY_FOUND});var c=new We("updateMyProfile");c.setMessage(JSON.stringify(l));var h=new Rp().validate(l);if(!h.valid)return c.setCode(Le.UPDATE_PROFILE_INVALID_PARAM).setMoreMessage("info:".concat(h.tips)).setNetworkType(this._userModule.getNetworkType()).end(),U.e("".concat(a," info:").concat(h.tips)),Me({code:Le.UPDATE_PROFILE_INVALID_PARAM});var m=[];for(var y in l)Object.prototype.hasOwnProperty.call(l,y)&&(y==="profileCustomField"?l.profileCustomField.forEach(function(E){m.push({tag:E.key,value:E.value})}):m.push({tag:Gt[y.toUpperCase()],value:l[y]}));if(m.length===0){var b=new Fn({code:Le.UPDATE_PROFILE_NO_KEY});return c.setError(b,!0,this._userModule.getNetworkType()).end(),U.e("".concat(a," failed. error:"),b),Me(b)}var C=this._userModule.getMyAccount();return this._userModule.request({protocolName:N0,requestData:{fromAccount:C,profileItem:m}}).then(function(E){c.setNetworkType(p._userModule.getNetworkType()).end(),U.i("".concat(a," ok"));var N=p._update(C,l),F=N.isProfileUpdated,z=N.latestProfile;return F===!0&&p._userModule.emitOuterEvent(R.PROFILE_UPDATED,[z]),Lt(z)}).catch(function(E){return p._userModule.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];c.setError(E,z,Q).end()}),U.e("".concat(a," failed. error:"),E),Me(E)})}},{key:"onProfileModified",value:function(l){var p=l.dataList;if(!Ye(p)){var a,c=p.length;U.d("".concat(this._n,".onProfileModified count:").concat(c," dataList:"),l.dataList);for(var h=[],m=0;m0&&(this._userModule.emitInnerEvent(ir.PROFILE_UPDATED,h),this._userModule.emitOuterEvent(R.PROFILE_UPDATED,h))}}},{key:"_fill",value:function(){if(this.accountProfileMap.size===0){for(var l=this._getCachedProfiles(),p=Date.now(),a=0,c=l.length;a0&&(a.lastUpdatedTime=h,c=!0)):(a=new Rp(p),(this._userModule.isMyFriend(l)||l===this._userModule.getMyAccount())&&(a.lastUpdatedTime=h,c=!0,this.accountProfileMap.set(l,a))),this._flush(l===this._userModule.getMyAccount()),c===!0&&U.l("".concat(this._n,"._update account:").concat(l," isProfileUpdated:").concat(c)),{isProfileUpdated:c,latestProfile:a}}},{key:"_flush",value:function(l){var p=O(this.accountProfileMap.values()),a=this._userModule.getStorageModule();U.d("".concat(this._n,"._flush length:").concat(p.length," flushAtOnce:").concat(l)),a.setItem(this.TAG,p,l)}},{key:"_contains",value:function(l){return this.accountProfileMap.has(l)}},{key:"_getProfileFromMap",value:function(l){return this.accountProfileMap.get(l)}},{key:"_getCachedProfiles",value:function(){var l=this._userModule.getStorageModule().getItem(this.TAG);return Ye(l)?[]:l}},{key:"onConversationsProfileUpdated",value:function(l){for(var p,a,c,h=[],m=0,y=l.length;m0&&h.push(a)):h.push(p.userID));h.length!==0&&(U.i("".concat(this._n,".onConversationsProfileUpdated toAccountList:").concat(h)),this.getUserProfile({userIDList:h}))}},{key:"getNickAndAvatarByUserID",value:function(l){if(this._contains(l)){var p=this._getProfileFromMap(l);return{nick:p.nick,avatar:p.avatar}}return{nick:"",avatar:""}}},{key:"reset",value:function(){this._flush(!0),this.accountProfileMap.clear()}}]),D}(),zw=u(function D(l){i(this,D),Ye||(this.userID=l.userID||"",this.timeStamp=l.timeStamp||0)}),K6=function(){function D(l){i(this,D),this._userModule=l,this._n="BlacklistHandler",this._blacklistMap=new Map,this.startIndex=0,this.maxLimited=100,this.currentSequence=0}return u(D,[{key:"getLocalBlacklist",value:function(){return O(this._blacklistMap.keys())}},{key:"getBlacklist",value:function(){var l=this,p="".concat(this._n,".getBlacklist"),a={fromAccount:this._userModule.getMyAccount(),maxLimited:this.maxLimited,startIndex:0,lastSequence:this.currentSequence},c=new We("getBlacklist");return this._userModule.request({protocolName:P0,requestData:a}).then(function(h){var m=h.data,y=m.blackListItem,b=m.currentSequence,C=Ye(y)?0:y.length;c.setNetworkType(l._userModule.getNetworkType()).setMessage("count:".concat(C)).end(),U.i("".concat(p," ok")),l.currentSequence=b,l._handleResponse(y,!0),l._userModule.emitOuterEvent(R.BLACKLIST_UPDATED,O(l._blacklistMap.keys()))}).catch(function(h){return l._userModule.probeNetwork().then(function(m){var y=A(m,2),b=y[0],C=y[1];c.setError(h,b,C).end()}),U.e("".concat(p," failed. error:"),h),Me(h)})}},{key:"addBlacklist",value:function(l){var p=this,a=new We("addToBlacklist"),c="".concat(this._n,".addBlacklist"),h=this._userModule.getMyAccount();if(l.userIDList.length===1&&l.userIDList[0]===h){var m=Le.CANNOT_ADD_SELF_TO_BLACKLIST,y=this._userModule.getErrorMessage(m);a.setCode(m).setMessage(y).setNetworkType(this._userModule.getNetworkType()).end();var b=new Fn({code:m});return U.e("".concat(c," failed. error:"),b),Me(b)}return l.userIDList.includes(h)&&(l.userIDList=l.userIDList.filter(function(C){return C!==h})),l.fromAccount=this._userModule.getMyAccount(),l.toAccount=l.userIDList,this._userModule.request({protocolName:x0,requestData:l}).then(function(C){return a.setNetworkType(p._userModule.getNetworkType()).setMessage(l.userIDList.length>5?"userIDList.length:".concat(l.userIDList.length):"userIDList:".concat(l.userIDList)).end(),U.i("".concat(c," ok")),p._handleResponse(C.resultItem,!0),gt(O(p._blacklistMap.keys()))}).catch(function(C){return p._userModule.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];a.setError(C,F,z).end()}),U.e("".concat(c," failed. error:"),C),Me(C)})}},{key:"_handleResponse",value:function(l,p){if(!Ye(l))for(var a,c,h,m=0,y=l.length;m5?"userIDList.length:".concat(l.userIDList.length):"userIDList:".concat(l.userIDList)).end(),U.i("".concat(a," ok")),p._handleResponse(h.data.resultItem,!1),gt(O(p._blacklistMap.keys()))}).catch(function(h){return p._userModule.probeNetwork().then(function(m){var y=A(m,2),b=y[0],C=y[1];c.setError(h,b,C).end()}),U.e("".concat(a," failed. error:"),h),Me(h)})}},{key:"onAccountDeleted",value:function(l){for(var p,a=[],c=0,h=l.length;c0&&(U.l("".concat(this._n,".onAccountDeleted count:").concat(a.length," userIDList:"),a),this._userModule.emitOuterEvent(R.BLACKLIST_UPDATED,O(this._blacklistMap.keys())))}},{key:"onAccountAdded",value:function(l){for(var p,a=[],c=0,h=l.length;c0&&(U.l("".concat(this._n,".onAccountAdded count:").concat(a.length," userIDList:"),a),this._userModule.emitOuterEvent(R.BLACKLIST_UPDATED,O(this._blacklistMap.keys())))}},{key:"reset",value:function(){this._blacklistMap.clear(),this.startIndex=0,this.maxLimited=100,this.currentSequence=0}}]),D}(),m1=function(D){var l=String(D).replace(/[=]+$/,""),p="";if(l.length%4==1)return"";for(var a,c,h=0,m=0;c=l.charAt(m++);~c&&(a=h%4?64*a+c:c,h++%4)?p+=String.fromCharCode(255&a>>(-2*h&6)):0)c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(c);try{return decodeURIComponent(escape(p))}catch{return""}},Y6=function(){function D(l){i(this,D),this._userModule=l,this._n="UserStatusHandler",this.MAX_QUERY_USER_COUNT=500,this.MAX_SUBSCRIBE_USER_COUNT=100,this.MAX_UNSUBSCRIBE_USER_COUNT=100,this._userModule.getInnerEmitterInstance().on(ir.CLOUD_CONFIG_UPDATED,this._onCloudConfigUpdated,this)}return u(D,[{key:"_onCloudConfigUpdated",value:function(){var l=this._userModule.getCloudConfig("status_query_count"),p=this._userModule.getCloudConfig("status_sub_count"),a=this._userModule.getCloudConfig("status_unsub_count");U.l("".concat(this._n,"._onCloudConfigUpdated statusQueryCount:").concat(l," statusSubscribeCount:").concat(p)+" statusUnsubscribeCount:".concat(a)),$e(l)||(this.MAX_QUERY_USER_COUNT=parseInt(l,10)),$e(l)||(this.MAX_SUBSCRIBE_USER_COUNT=parseInt(p,10)),$e(l)||(this.MAX_UNSUBSCRIBE_USER_COUNT=parseInt(a,10))}},{key:"onUserStatusUpdated",value:function(l){var p=l.dataList,a=this._userModule.getMyUserID(),c=this._userModule.getModule(hn),h=p.map(function(m){var y=m.to,b=m.statusType,C=m.customStatus,E=m1(C);return y===a&&c.setCustomStatus(E),{userID:y,statusType:b,customStatus:E}});this._userModule.emitOuterEvent(R.USER_STATUS_UPDATED,h)}},{key:"setSelfStatus",value:function(l){var p=this,a="".concat(this._n,".setSelfStatus");if(this._userModule.filterProfanity("customStatus",l)===!1)return Me({code:Le.PROFANITY_FOUND});var c=new We("setSelfStatus"),h=l.customStatus;return this._userModule.request({protocolName:X_,requestData:{customStatus:h}}).then(function(m){return c.setNetworkType(p._userModule.getNetworkType()).setMessage("customStatus:".concat(h)).end(),U.l("".concat(a," ok. customStatus:").concat(h)),p._userModule.getModule(hn).setCustomStatus(h),gt({userID:p._userModule.getMyUserID(),statusType:1,customStatus:h})}).catch(function(m){return p._userModule.probeNetwork().then(function(y){var b=A(y,2),C=b[0],E=b[1];c.setError(m,C,E).end()}),U.e("".concat(a," failed. error:"),m),Me(m)})}},{key:"getUserStatus",value:function(l){var p=this,a="".concat(this._n,".").concat("getUserStatus"),c=l.userIDList,h=c===void 0?[]:c,m=this._userModule.getMyUserID(),y=O(h),b=void 0,C=y.indexOf(m);if(C>-1){y.splice(C,1);var E=this._userModule.getModule(hn).getCustomStatus();b={userID:m,statusType:1,customStatus:E}}if(y.length===0)return Lt({successUserList:[b],failureUserList:[]});if(!this._userModule.canIUse(ce.USER_STATUS))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});y.length>this.MAX_QUERY_USER_COUNT&&(U.w("".concat(a," ").concat(Ba(this.MAX_QUERY_USER_COUNT))),y=h.slice(0,this.MAX_QUERY_USER_COUNT));var N=new We("getUserStatus");return this._userModule.request({protocolName:om,requestData:{userIDList:y}}).then(function(F){var z=F.data,Q=z.successUserList,me=Q===void 0?[]:Q,_e=z.failureUserList,we=_e===void 0?[]:_e,Ue=me.map(function(vt){var Ut=vt.userID,mn=vt.statusType,bn=vt.customStatus;return{userID:Ut,statusType:mn,customStatus:m1(bn)}}),Ve=we.map(function(vt){var Ut=vt.userID,mn=vt.invalidUserID,bn=vt.errorCode,Nr=vt.errorInfo;return{userID:Ye(mn)?Ut:mn,code:bn,message:Nr}});$e(b)||Ue.unshift(b);var ot="userID count:".concat(h.length,", success count:").concat(Ue.length,", fail count:").concat(Ve.length);return N.setNetworkType(p._userModule.getNetworkType()).setMessage("".concat(ot)).end(),U.l("".concat(a," ok. ").concat(ot,".")),gt({successUserList:Ue,failureUserList:Ve})}).catch(function(F){return p._userModule.probeNetwork().then(function(z){var Q=A(z,2),me=Q[0],_e=Q[1];N.setMessage("userID count:".concat(h.length)).setError(F,me,_e).end()}),U.e("".concat(a," failed. error:"),F),Me(F)})}},{key:"subscribeUserStatus",value:function(l){var p=this;if(!this._userModule.canIUse(ce.USER_STATUS))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".").concat("subscribeUserStatus"),c=l.userIDList,h=c===void 0?[]:c,m=O(h);m.length>this.MAX_SUBSCRIBE_USER_COUNT&&(U.w("".concat(a," ").concat(Ba(this.MAX_SUBSCRIBE_USER_COUNT))),m=h.slice(0,this.MAX_SUBSCRIBE_USER_COUNT));var y=new We("subscribeUserStatus"),b="userID count:".concat(h.length);return U.l("".concat(a," ").concat(b)),this._userModule.request({protocolName:im,requestData:{userIDList:m}}).then(function(C){var E=C.data.failureUserList,N=(E===void 0?[]:E).map(function(F){var z=F.userID,Q=F.invalidUserID,me=F.errorCode,_e=F.errorInfo;return{userID:Ye(Q)?z:Q,code:me,message:_e}});return y.setNetworkType(p._userModule.getNetworkType()).setMessage("".concat(b," fail count:").concat(N.length)).end(),U.l("".concat(a," ok. fail count:").concat(N.length,".")),gt({failureUserList:N})}).catch(function(C){return p._userModule.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];y.setMessage("".concat(b)).setError(C,F,z).end()}),U.e("".concat(a," failed. error:"),C),Me(C)})}},{key:"unsubscribeUserStatus",value:function(l){var p=this;if(!this._userModule.canIUse(ce.USER_STATUS))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var a="".concat(this._n,".unsubscribeUserStatus"),c=(l||{}).userIDList,h=c===void 0?[]:c,m=O(h);h.length>this.MAX_UNSUBSCRIBE_USER_COUNT&&(U.w("".concat(a," ").concat(Ba(this.MAX_UNSUBSCRIBE_USER_COUNT))),m=h.slice(0,this.MAX_UNSUBSCRIBE_USER_COUNT));var y=new We("unsubscribeUserStatus"),b="userID count:".concat(h.length);U.l("".concat(a," ").concat(b));var C={userIDList:m};return m.length===0&&(C.userIDList=void 0,C.unsubscribeAll=1),this._userModule.request({protocolName:sm,requestData:C}).then(function(E){var N=E.data.failureUserList,F=(N===void 0?[]:N).map(function(z){var Q=z.userID,me=z.invalidUserID,_e=z.errorCode,we=z.errorInfo;return{userID:Ye(me)?Q:me,code:_e,message:we}});return y.setNetworkType(p._userModule.getNetworkType()).setMessage("".concat(b," fail count:").concat(F.length)).end(),U.l("".concat(a," ok. fail count:").concat(F.length,".")),gt({failureUserList:F})}).catch(function(E){return p._userModule.probeNetwork().then(function(N){var F=A(N,2),z=F[0],Q=F[1];y.setMessage("".concat(b)).setError(E,z,Q).end()}),U.e("".concat(a," failed. error:"),E),Me(E)})}},{key:"reset",value:function(){this.MAX_QUERY_USER_COUNT=500,this.MAX_SUBSCRIBE_USER_COUNT=100,this.MAX_UNSUBSCRIBE_USER_COUNT=100}}]),D}(),J6=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="UserModule",c._profileHandler=new W6(w(c)),c._blacklistHandler=new K6(w(c)),c._userStatusHandler=new Y6(w(c)),c.getInnerEmitterInstance().on(ir.A2KEY_AND_TINYID_UPDATED,c.onContextUpdated,w(c)),c}return u(p,[{key:"onContextUpdated",value:function(a){this._profileHandler.getMyProfile(),this._blacklistHandler.getBlacklist()}},{key:"mockOnNickAvatarModified",value:function(a,c){U.l("".concat(this._n,"._mockOnNickAvatarModified nick:").concat(a," avatar:").concat(c)),this.onProfileModified({dataList:[{pushType:1,userID:this.getMyUserID(),profileList:[{tag:Gt.NICK,value:a},{tag:Gt.AVATAR,value:c}]}]})}},{key:"onProfileModified",value:function(a){this._profileHandler.onProfileModified(a)}},{key:"onRelationChainModified",value:function(a){var c=a.dataList;if(!Ye(c)){var h=[];c.forEach(function(y){y.blackListDelAccount&&h.push.apply(h,O(y.blackListDelAccount))}),h.length>0&&this._blacklistHandler.onAccountDeleted(h);var m=[];c.forEach(function(y){y.blackListAddAccount&&m.push.apply(m,O(y.blackListAddAccount))}),m.length>0&&this._blacklistHandler.onAccountAdded(m)}}},{key:"onConversationsProfileUpdated",value:function(a){this._profileHandler.onConversationsProfileUpdated(a)}},{key:"getMyAccount",value:function(){return this.getMyUserID()}},{key:"getMyNick",value:function(){return this._profileHandler.getNickAndAvatarByUserID(this.getMyUserID()).nick}},{key:"getMyProfile",value:function(){return this._profileHandler.getMyProfile()}},{key:"getStorageModule",value:function(){return this.getModule(aa)}},{key:"filterProfanity",value:function(a,c){var h=this.getModule(za);if(!h)return!0;var m=h.filterText(c[a],se),y=m.isAllowedToSend,b=m.modifiedText;return y===!0&&(c[a]=b,!0)}},{key:"isMyFriend",value:function(a){var c=this.getModule(_r);return!!c&&c.isMyFriend(a)}},{key:"getUserProfile",value:function(a){return this._profileHandler.getUserProfile(a)}},{key:"updateMyProfile",value:function(a){return this._profileHandler.updateMyProfile(a)}},{key:"getNickAndAvatarByUserID",value:function(a){return this._profileHandler.getNickAndAvatarByUserID(a)}},{key:"getLocalBlacklist",value:function(){var a=this._blacklistHandler.getLocalBlacklist();return Lt(a)}},{key:"addBlacklist",value:function(a){return this._blacklistHandler.addBlacklist(a)}},{key:"deleteBlacklist",value:function(a){return this._blacklistHandler.deleteBlacklist(a)}},{key:"onUserStatusUpdated",value:function(a){this._userStatusHandler.onUserStatusUpdated(a)}},{key:"setSelfStatus",value:function(a){return this._userStatusHandler.setSelfStatus(a)}},{key:"getUserStatus",value:function(a){return this._userStatusHandler.getUserStatus(a)}},{key:"subscribeUserStatus",value:function(a){return this._userStatusHandler.subscribeUserStatus(a)}},{key:"unsubscribeUserStatus",value:function(a){return this._userStatusHandler.unsubscribeUserStatus(a)}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._profileHandler.reset(),this._blacklistHandler.reset(),this._userStatusHandler.reset()}}]),p}(Er),X6=function(){function D(l,p){i(this,D),this._m=l,this._isLoggedIn=!1,this._SDKAppID=p.SDKAppID,this._userID=p.userID||"",this._userSig=p.userSig||"",this._version="3.1.1",this._a2Key="",this._tinyID="",this._customStatus="",this._contentType="json",this._unlimitedAVChatRoom=p.unlimitedAVChatRoom,this._scene=p.scene||"",this._oversea=p.oversea,this._instanceID=p.instanceID,this._statusInstanceID=0,this._isDevMode=p.devMode,this._proxyServer=p.proxyServer,this._fileUploadProxy=p.fileUploadProxy,this._fileDownloadProxy=p.fileDownloadProxy}return u(D,[{key:"isLoggedIn",value:function(){return this._isLoggedIn}},{key:"isOversea",value:function(){return this._oversea}},{key:"isPrivateNetWork",value:function(){return this._proxyServer}},{key:"isDevMode",value:function(){return this._isDevMode}},{key:"isSingaporeSite",value:function(){return this._SDKAppID>=2e7&&this._SDKAppID<3e7||this._SDKAppID>=172e7&&this._SDKAppID<173e7}},{key:"isKoreaSite",value:function(){return this._SDKAppID>=3e7&&this._SDKAppID<4e7||this._SDKAppID>=173e7&&this._SDKAppID<174e7}},{key:"isGermanySite",value:function(){return this._SDKAppID>=4e7&&this._SDKAppID<5e7||this._SDKAppID>=174e7&&this._SDKAppID<175e7}},{key:"isIndiaSite",value:function(){return this._SDKAppID>=5e7&&this._SDKAppID<6e7||this._SDKAppID>=175e7&&this._SDKAppID<176e7}},{key:"isJapanSite",value:function(){return this._SDKAppID>=6e7&&this._SDKAppID<7e7||this._SDKAppID>=176e7&&this._SDKAppID<177e7}},{key:"isUSASite",value:function(){return this._SDKAppID>=7e7&&this._SDKAppID<8e7||this._SDKAppID>=177e7&&this._SDKAppID<178e7}},{key:"isIntl",value:function(){return(l=this._SDKAppID)===0||l>=2e7&&l<8e7||l>=172e7&&l<178e7;var l}},{key:"isUnlimitedAVChatRoom",value:function(){return this._unlimitedAVChatRoom}},{key:"setUserID",value:function(l){this._userID=l}},{key:"getUserID",value:function(){return this._userID}},{key:"setUserSig",value:function(l){this._userSig=l}},{key:"getUserSig",value:function(){return this._userSig}},{key:"getSDKAppID",value:function(){return this._SDKAppID}},{key:"setTinyID",value:function(l){this._tinyID=l,this._isLoggedIn=!0}},{key:"getTinyID",value:function(){return this._tinyID}},{key:"setCustomStatus",value:function(l){this._customStatus=l}},{key:"getCustomStatus",value:function(){return this._customStatus}},{key:"getScene",value:function(){return Qo?window.tencent_cloud_im_csig_flutter_for_web_25F_cy:this._isTUIKit()?"tuikit":this._scene}},{key:"getInstanceID",value:function(){return this._instanceID}},{key:"getStatusInstanceID",value:function(){return this._statusInstanceID}},{key:"setStatusInstanceID",value:function(l){this._statusInstanceID=l}},{key:"getVersion",value:function(){return this._version}},{key:"getA2Key",value:function(){return this._a2Key}},{key:"setA2Key",value:function(l){this._a2Key=l}},{key:"getContentType",value:function(){return this._contentType}},{key:"getProxyServer",value:function(){return this._proxyServer}},{key:"getFileUploadProxy",value:function(){return this._fileUploadProxy}},{key:"getFileDownloadProxy",value:function(){return this._fileDownloadProxy}},{key:"_isTUIKit",value:function(){var l=!1,p=!1,a=!1,c=!1,h=[];je&&(h=Object.keys(Fe)),ct&&(h=Object.keys(Be?uni:window));for(var m=0,y=h.length;m"u"&&__wxConfig&&(C=__wxConfig.pages),xe&&typeof uni>"u"&&__qqConfig&&(C=__qqConfig.pages),st(C)&&C.length>0){for(var E=0,N=C.length;E0&&arguments[0]!==void 0?arguments[0]:0;if(!this.isLoggedIn())return Me({code:Le.USER_NOT_LOGGED_IN});var h=new We("logout");h.setNetworkType(this.getNetworkType()).setMessage("identifier:".concat(this.getMyUserID())).end(!0);var m="".concat(this._n,".logout");return U.i("".concat(m," type:").concat(c)),c===0&&this._m.setNotReadyReason(Le.LOGGED_OUT),this.request({protocolName:E0,requestData:{type:c}}).then(function(){return a.resetReady(),Lt({})}).catch(function(y){return U.e("".concat(m," error:"),y),a.resetReady(),Lt({})})}},{key:"_fetchCloudControlConfig",value:function(){this.getModule(bp).fetchConfig()}},{key:"_getStatusInstanceID",value:function(){return uni.getStorageSync("timUniAppInstanceID")}},{key:"_hello",value:function(){var a=this;this._lastWsHelloTs=Date.now(),this.request({protocolName:A0,requestData:{isWebUniapp:this._isWebUniapp}}).catch(function(c){U.w("".concat(a._n,"._hello error:"),c)})}},{key:"getLastWsHelloTs",value:function(){return this._lastWsHelloTs}},{key:"_checkLoginInfo",value:function(a){var c=0;return Ye(this.getModule(hn).getSDKAppID())?c=Le.NO_SDKAPPID:Ye(a.userID)?c=Le.NO_IDENTIFIER:Ye(a.userSig)&&(c=Le.NO_USERSIG),{code:c}}},{key:"_isReactUIKit",value:function(){return ct&&window.tencent_cloud_im_csig_react_uikit_23F_xa!==void 0}},{key:"onMultipleAccountKickedOut",value:function(a){var c=this;new We("kickedOut").setNetworkType(this.getNetworkType()).setMessage("type:".concat(T.KICKED_OUT_MULT_ACCOUNT," newInstanceInfo:").concat(JSON.stringify(a))).end(!0),U.w("".concat(this._n,".onMultipleAccountKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),a),this.logout(1).then(function(){c.emitOuterEvent(R.KICKED_OUT,{type:T.KICKED_OUT_MULT_ACCOUNT}),c._m.setNotReadyReason(Le.KICKED_OUT_MULT_ACCOUNT),c._m.reset()})}},{key:"onMultipleDeviceKickedOut",value:function(a){var c=this;new We("kickedOut").setNetworkType(this.getNetworkType()).setMessage("type:".concat(T.KICKED_OUT_MULT_DEVICE," newInstanceInfo:").concat(JSON.stringify(a))).end(!0),U.w("".concat(this._n,".onMultipleDeviceKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),a),this.logout(1).then(function(){c.emitOuterEvent(R.KICKED_OUT,{type:T.KICKED_OUT_MULT_DEVICE}),c._m.setNotReadyReason(Le.KICKED_OUT_MULT_DEVICE),c._m.reset()})}},{key:"onUserSigExpired",value:function(){new We("kickedOut").setNetworkType(this.getNetworkType()).setMessage(T.KICKED_OUT_USERSIG_EXPIRED).end(!0),U.w("".concat(this._n,".onUserSigExpired userID:").concat(this.getMyUserID())),this.getModule(hn).getStatusInstanceID()!==0&&(this.emitOuterEvent(R.KICKED_OUT,{type:T.KICKED_OUT_USERSIG_EXPIRED}),this._m.setNotReadyReason(Le.KICKED_OUT_USERSIG_EXPIRED),this._m.reset())}},{key:"onRestApiKickedOut",value:function(a){new We("kickedOut").setNetworkType(this.getNetworkType()).setMessage("type:".concat(T.KICKED_OUT_REST_API," newInstanceInfo:").concat(JSON.stringify(a))).end(!0),U.w("".concat(this._n,".onRestApiKickedOut userID:").concat(this.getMyUserID()," newInstanceInfo:"),a),this.getModule(hn).getStatusInstanceID()!==0&&(this.emitOuterEvent(R.KICKED_OUT,{type:T.KICKED_OUT_REST_API}),this._m.setNotReadyReason(Le.KICKED_OUT_REST_API),this._m.reset(),this.getModule(Fs).onRestApiKickedOut())}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this.resetReady(),this._helloInterval=120,this._lastLoginTs=0,this._lastWsHelloTs=0,this._isWebUniapp=0}}]),p}(Er);function um(){return null}var e8=function(){function D(l){i(this,D),this._m=l,this._n="StorageModule",this._storageQueue=new Map,this._errorTolerantHandle()}return u(D,[{key:"_errorTolerantHandle",value:function(){je||!$e(window)&&this._canIUseCookies()||(this.getItem=um,this.setItem=um,this.removeItem=um,this.clear=um)}},{key:"onCheckTimer",value:function(l){if(l%20==0){if(this._storageQueue.size===0)return;this._doFlush()}}},{key:"_doFlush",value:function(){try{var l,p=$(this._storageQueue);try{for(p.s();!(l=p.n()).done;){var a=A(l.value,2),c=a[0],h=a[1];this._setStorageSync(this._getKey(c),h)}}catch(m){p.e(m)}finally{p.f()}this._storageQueue.clear()}catch(m){U.w("".concat(this._n,"._doFlush error:"),m)}}},{key:"_getPrefix",value:function(){var l=this._m.getModule(hn);return"TIM_".concat(l.getSDKAppID(),"_").concat(l.getUserID(),"_")}},{key:"_getKey",value:function(l){return"".concat(this._getPrefix()).concat(l)}},{key:"getItem",value:function(l){var p=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];try{var a=p?this._getKey(l):l;return this.getStorageSync(a)}catch(c){return U.w("".concat(this._n,".getItem error:"),c),{}}}},{key:"setItem",value:function(l,p){var a=arguments.length>2&&arguments[2]!==void 0&&arguments[2],c=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];if(a){var h=c?this._getKey(l):l;this._setStorageSync(h,p)}else this._storageQueue.set(l,p)}},{key:"clear",value:function(){try{je?Fe.clearStorageSync():this._canIUseCookies()&&localStorage.clear()}catch(l){U.w("".concat(this._n,".clear error:"),l)}}},{key:"removeItem",value:function(l){var p=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];try{var a=p?this._getKey(l):l;this._removeStorageSync(a)}catch(c){U.w("".concat(this._n,".removeItem error:"),c)}}},{key:"getSize",value:function(l){var p=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"b";try{var c={size:0,limitSize:5242880,unit:a};if(Object.defineProperty(c,"leftSize",{enumerable:!0,get:function(){return c.limitSize-c.size}}),je&&(c.limitSize=1024*Fe.getStorageInfoSync().limitSize),l)c.size=JSON.stringify(this.getItem(l)).length+this._getKey(l).length;else if(je){var h=Fe.getStorageInfoSync(),m=h.keys;m.forEach(function(b){c.size+=JSON.stringify(p.getStorageSync(b)).length+p._getKey(b).length})}else if(this._canIUseCookies())for(var y in localStorage)localStorage.hasOwnProperty(y)&&(c.size+=localStorage.getItem(y).length+y.length);return this._convertUnit(c)}catch(b){U.w("".concat(this._n," error:"),b)}}},{key:"_convertUnit",value:function(l){var p={},a=l.unit;for(var c in p.unit=a,l)typeof l[c]=="number"&&(a.toLowerCase()==="kb"?p[c]=Math.round(l[c]/1024):a.toLowerCase()==="mb"?p[c]=Math.round(l[c]/1024/1024):p[c]=l[c]);return p}},{key:"_setStorageSync",value:function(l,p){je?W?my.setStorageSync({key:l,data:p}):Fe.setStorageSync(l,p):this._canIUseCookies()&&localStorage.setItem(l,JSON.stringify(p))}},{key:"getStorageSync",value:function(l){return je?W?my.getStorageSync({key:l}).data:Fe.getStorageSync(l):this._canIUseCookies()?JSON.parse(localStorage.getItem(l)):{}}},{key:"_removeStorageSync",value:function(l){je?W?my.removeStorageSync({key:l}):Fe.removeStorageSync(l):this._canIUseCookies()&&localStorage.removeItem(l)}},{key:"_canIUseCookies",value:function(){return navigator&&navigator.cookieEnabled&&localStorage}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._doFlush()}}]),D}(),t8=function(){function D(l){i(this,D),this._n="SSOLogBody",this._report=[]}return u(D,[{key:"pushIn",value:function(l){U.d("".concat(this._n,".pushIn"),this._report.length,l),this._report.push(l)}},{key:"backfill",value:function(l){var p;st(l)&&l.length!==0&&(U.d("".concat(this._n,".backfill"),this._report.length,l.length),(p=this._report).unshift.apply(p,O(l)))}},{key:"getLogsNumInMemory",value:function(){return this._report.length}},{key:"isEmpty",value:function(){return this._report.length===0}},{key:"_reset",value:function(){this._report.length=0,this._report=[]}},{key:"getLogsInMemory",value:function(){var l=this._report.slice();return this._reset(),l}}]),D}(),jw=function(D){var l=D.getModule(hn);return{SDKType:10,SDKAppID:l.getSDKAppID(),SDKVersion:l.getVersion(),tinyID:Number(l.getTinyID()),userID:l.getUserID(),platform:D.getPlatform(),instanceID:l.getInstanceID(),traceID:In()}},n8=function(D){f(p,D);var l=L(p);function p(a){var c;i(this,p),(c=l.call(this,a))._n="EventStatModule",c.TAG="im-ssolog-event",c._reportBody=new t8,c.MIN_THRESHOLD=20,c.MAX_THRESHOLD=100,c.WAITING_TIME=6e4,c.REPORT_LEVEL=[4,5,6],c.REPORT_SDKAPPID_BLACKLIST=[],c.REPORT_TINYID_WHITELIST=[],c._lastReportTime=Date.now();var h=c.getInnerEmitterInstance();return h.on(ir.A2KEY_AND_TINYID_UPDATED,c._onLoginSuccess,w(c)),h.on(ir.CLOUD_CONFIG_UPDATED,c._onCloudConfigUpdated,w(c)),c}return u(p,[{key:"reportAtOnce",value:function(){U.d("".concat(this._n,".reportAtOnce")),this._report()}},{key:"_onLoginSuccess",value:function(){var a=this,c=this.getModule(aa),h=c.getItem(this.TAG,!1);!Ye(h)&&Bo(h.forEach)&&(U.l("".concat(this._n,"._onLoginSuccess get ssolog in storage, count:").concat(h.length)),h.forEach(function(m){a._reportBody.pushIn(m)}),c.removeItem(this.TAG,!1))}},{key:"_onCloudConfigUpdated",value:function(){var a=this.getCloudConfig("evt_rpt_threshold"),c=this.getCloudConfig("evt_rpt_waiting"),h=this.getCloudConfig("evt_rpt_level"),m=this.getCloudConfig("evt_rpt_sdkappid_bl"),y=this.getCloudConfig("evt_rpt_tinyid_wl");$e(a)||(this.MIN_THRESHOLD=Number(a)),$e(c)||(this.WAITING_TIME=Number(c)),$e(h)||(this.REPORT_LEVEL=h.split(",").map(function(b){return Number(b)})),$e(m)||(this.REPORT_SDKAPPID_BLACKLIST=m.split(",").map(function(b){return Number(b)})),$e(y)||(this.REPORT_TINYID_WHITELIST=y.split(","))}},{key:"pushIn",value:function(a){a instanceof We&&(a.updateTimeStamp(),this._reportBody.pushIn(a),this._reportBody.getLogsNumInMemory()>=this.MIN_THRESHOLD&&this._report())}},{key:"onCheckTimer",value:function(){Date.now()a.MAX_THRESHOLD&&a._flushAtOnce()})}else this._lastReportTime=Date.now()}}},{key:"_flushAtOnce",value:function(){var a=this.getModule(aa),c=a.getItem(this.TAG,!1),h=this._reportBody.getLogsInMemory(),m="".concat(this._n,"._flushAtOnce");if(Ye(c))U.l("".concat(m," count:").concat(h.length)),a.setItem(this.TAG,h,!0,!1);else{var y=h.concat(c);y.length>this.MAX_THRESHOLD&&(y=y.slice(0,this.MAX_THRESHOLD)),U.l("".concat(m," count:").concat(y.length)),a.setItem(this.TAG,y,!0,!1)}}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._lastReportTime=0,this._report(),this.REPORT_SDKAPPID_BLACKLIST=[],this.REPORT_TINYID_WHITELIST=[]}}]),p}(Er),Np="none",v1="online",r8=[Le.OVER_FREQUENCY_LIMIT,Le.OPEN_SERVICE_OVERLOAD_ERROR],o8=function(){function D(l){i(this,D),this._m=l,this._networkType="",this._n="NetMonitorModule",this.MAX_WAIT_TIME=3e3,this._mpNetworkStatusCallback=null,this._webOnlineCallback=null,this._webOfflineCallback=null}return u(D,[{key:"start",value:function(){var l=this;je?(Fe.getNetworkType({success:function(p){l._networkType=p.networkType||p.subtype||"",p.networkType===Np?U.w("".concat(l._n,".start no network, please check!")):U.i("".concat(l._n,".start networkType:").concat(p.networkType))}}),this._mpNetworkStatusCallback=this._onNetworkStatusChange.bind(this),Fe.onNetworkStatusChange(this._mpNetworkStatusCallback)):(this._networkType=v1,this._webOnlineCallback=this._onWebOnline.bind(this),this._webOfflineCallback=this._onWebOffline.bind(this),window&&(window.addEventListener("online",this._webOnlineCallback),window.addEventListener("offline",this._webOfflineCallback)))}},{key:"_onWebOnline",value:function(){this._onNetworkStatusChange({isConnected:!0,networkType:v1})}},{key:"_onWebOffline",value:function(){this._onNetworkStatusChange({isConnected:!1,networkType:Np})}},{key:"_onNetworkStatusChange",value:function(l){var p=l.isConnected,a=l.networkType,c="".concat(this._n,"._onNetworkStatusChange"),h=!1;p?(U.i("".concat(c," previous:").concat(this._networkType," current:").concat(a)),this._networkType!==a&&(h=!0,this._m.getModule(Fs).reConnect(!0))):this._networkType!==a&&(h=!0,U.w("".concat(c," no network, please check!")),this._m.getModule(Fs).offline()),h&&(new We("networkChange").setMessage("isConnected:".concat(p," previousNetworkType:").concat(this._networkType," networkType:").concat(a)).end(),this._networkType=a)}},{key:"probe",value:function(l){var p=this;if(!$e(l)&&r8.includes(l.code))return Promise.resolve([!0,this._networkType]);var a="".concat(this._n,".probe");return new Promise(function(c,h){je?Fe.getNetworkType({success:function(m){p._networkType=m.networkType,m.networkType===Np?(U.w("".concat(a," no network, please check!")),c([!1,m.networkType])):(U.i("".concat(a," networkType:").concat(m.networkType)),c([!0,m.networkType]))}}):p._networkType===Np?c([!1,Np]):c([!0,v1])})}},{key:"getNetworkType",value:function(){return this._networkType}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),je?this._mpNetworkStatusCallback!==null&&(Fe.offNetworkStatusChange&&(ye||He?Fe.offNetworkStatusChange(this._mpNetworkStatusCallback):Fe.offNetworkStatusChange()),this._mpNetworkStatusCallback=null):window&&(this._webOnlineCallback!==null&&(window.removeEventListener("online",this._webOnlineCallback),this._webOnlineCallback=null),this._onWebOffline!==null&&(window.removeEventListener("offline",this._webOfflineCallback),this._webOfflineCallback=null))}}]),D}(),y1=function(D,l){return D(l={exports:{}},l.exports),l.exports}(function(D){var l=Object.prototype.hasOwnProperty,p="~";function a(){}function c(b,C,E){this.fn=b,this.context=C,this.once=E||!1}function h(b,C,E,N,F){if(typeof E!="function")throw new TypeError("The listener must be a function");var z=new c(E,N||b,F),Q=p?p+C:C;return b._events[Q]?b._events[Q].fn?b._events[Q]=[b._events[Q],z]:b._events[Q].push(z):(b._events[Q]=z,b._eventsCount++),b}function m(b,C){--b._eventsCount==0?b._events=new a:delete b._events[C]}function y(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(p=!1)),y.prototype.eventNames=function(){var b,C,E=[];if(this._eventsCount===0)return E;for(C in b=this._events)l.call(b,C)&&E.push(p?C.slice(1):C);return Object.getOwnPropertySymbols?E.concat(Object.getOwnPropertySymbols(b)):E},y.prototype.listeners=function(b){var C=p?p+b:b,E=this._events[C];if(!E)return[];if(E.fn)return[E.fn];for(var N=0,F=E.length,z=new Array(F);N=this.cosOptions.expiredTime-120&&this._getAuthorizationKey())}},{key:"_getAuthorization",value:function(a,c){c({TmpSecretId:this.cosOptions.secretId,TmpSecretKey:this.cosOptions.secretKey,XCosSecurityToken:this.cosOptions.sessionToken,ExpiredTime:this.cosOptions.expiredTime})}},{key:"upload",value:function(a){if(a.getRelayFlag()===!0)return Promise.resolve();var c=this.getModule(qo);switch(a.type){case T.MSG_IMAGE:return c.addTotalCount(Mi),this._uploadImage(a);case T.MSG_FILE:return c.addTotalCount(Mi),this._uploadFile(a);case T.MSG_AUDIO:return c.addTotalCount(Mi),this._uploadAudio(a);case T.MSG_VIDEO:return c.addTotalCount(Mi),this._uploadVideo(a);default:return Promise.resolve()}}},{key:"_uploadImage",value:function(a){var c=this,h=this.getModule(lr),m=a.getElements()[0],y=h.getMessageOption(a.clientSequence);return this.doUploadImage({file:y.payload.file,to:y.to,onProgress:function(b){if(m.updatePercent(b),Bo(y.onProgress))try{y.onProgress(b)}catch{return Me({code:Le.MSG_ONPROGRESS_FUNCTION_ERROR})}}}).then(function(b){var C,E,N=b.location,F=b.fileType,z=b.fileSize,Q=b.width,me=b.height,_e=b.smallImageUrl,we=b.smallImageWidth,Ue=b.smallImageHeight,Ve=b.largeImageUrl,ot=b.largeImageWidth,vt=b.largeImageHeight,Ut=c.isPrivateNetWork()?N:Dl(N);return m.updateImageFormat(F),_e&&Ve?(C={url:_e,width:we,height:Ue},E={url:Ve,width:ot,height:vt}):(C=kd({originUrl:Ut,originWidth:Q,originHeight:me,min:198}),E=kd({originUrl:Ut,originWidth:Q,originHeight:me,min:720})),m.updateImageInfoArray([{size:z,url:Ut,width:Q,height:me},r({},E),r({},C)]),a})}},{key:"_uploadFile",value:function(a){var c=this,h=this.getModule(lr),m=a.getElements()[0],y=h.getMessageOption(a.clientSequence);return this.doUploadFile({file:y.payload.file,to:y.to,onProgress:function(b){if(m.updatePercent(b),Bo(y.onProgress))try{y.onProgress(b)}catch{return Me({code:Le.MSG_ONPROGRESS_FUNCTION_ERROR})}}}).then(function(b){var C=b.location,E=c.isPrivateNetWork()?C:Dl(C);return m.updateFileUrl(E),a})}},{key:"_uploadAudio",value:function(a){var c=this,h=this.getModule(lr),m=a.getElements()[0],y=h.getMessageOption(a.clientSequence);return this.doUploadAudio({file:y.payload.file,to:y.to,onProgress:function(b){if(m.updatePercent(b),Bo(y.onProgress))try{y.onProgress(b)}catch{return Me({code:Le.MSG_ONPROGRESS_FUNCTION_ERROR})}}}).then(function(b){var C=b.location,E=c.isPrivateNetWork()?C:Dl(C);return m.updateAudioUrl(E),a})}},{key:"_uploadVideo",value:function(a){var c=this,h=this.getModule(lr),m=a.getElements()[0],y=h.getMessageOption(a.clientSequence);return this.doUploadVideo({file:y.payload.file,to:y.to,onProgress:function(b){if(m.updatePercent(b),Bo(y.onProgress))try{y.onProgress(b)}catch{return Me({code:Le.MSG_ONPROGRESS_FUNCTION_ERROR})}}}).then(function(b){var C=b.location,E=b.snapshotInfo,N=c.isPrivateNetWork()?C:Dl(C);return m.updateVideoUrl(N),Ye(E)||m.updateSnapshotInfo(E),a})}},{key:"_checkSizeError",value:function(a){var c="";return a==="A"?c="audio":a==="I"?c="image":a==="V"?c="video":a==="F"&&(c="file"),Me({code:Le["MSG_".concat(a,"_SIZE_LIMIT")],message:this.getErrorMessage("UploadSizeLimit",c,"".concat(this.UPLOAD_SIZE_LIMIT[a]/1048576,"MB"))})}},{key:"doUploadImage",value:function(a){var c=this;if(!a.file||this._isEmptyFileList(a.file.files))return Me({code:Le.MSG_I_SELECT_F_FIRST});var h=this._checkImageType(a.file);if(h!==!0)return h;var m=this._checkImageSize(a.file);if(m!==!0)return m;var y=null;return this._setUploadFileType(y6),this.uploadByCOS(a).then(function(b){return y=b,c.isPrivateNetWork()?$u(b.location):$u("https://".concat(b.location))}).then(function(b){return y.width=b.width,y.height=b.height,Promise.resolve(y)})}},{key:"_checkImageType",value:function(a){var c="";return c=je?a.url.slice(a.url.lastIndexOf(".")+1):a.files[0].name.slice(a.files[0].name.lastIndexOf(".")+1),m6.indexOf(c.toLowerCase())>=0||Me({code:Le.MSG_I_TYPES_LIMIT})}},{key:"_checkImageSize",value:function(a){var c=0;return(c=je?a.size:a.files[0].size)===0?Me({code:Le.MSG_F_IS_EMPTY}):cthis.UPLOAD_SIZE_LIMIT.F?this._checkSizeError("F"):a.file.files[0].size===0?Me({code:Le.MSG_F_IS_EMPTY}):(this._setUploadFileType(M6),this.uploadByCOS(a))}},{key:"doUploadVideo",value:function(a){return a.file.videoFile.size>this.UPLOAD_SIZE_LIMIT.V?this._checkSizeError("V"):a.file.videoFile.size===0?Me({code:Le.MSG_F_IS_EMPTY}):v6.indexOf(a.file.videoFile.type)===-1?Me({code:Le.MSG_V_TYPES_LIMIT}):(this._setUploadFileType(_6),je?this.handleVideoUpload({file:a.file.videoFile,onProgress:a.onProgress}):ct?this.handleVideoUpload(a):void 0)}},{key:"handleVideoUpload",value:function(a){var c=this;return new Promise(function(h,m){c.uploadByCOS(a).then(function(y){h(y)}).catch(function(){c.uploadByCOS(a).then(function(y){h(y)}).catch(function(){m(new Fn({code:Le.MSG_V_UPLOAD_FAIL}))})})})}},{key:"doUploadAudio",value:function(a){return a.file?a.file.size>this.UPLOAD_SIZE_LIMIT.A?this._checkSizeError("A"):a.file.size===0?Me({code:Le.MSG_F_IS_EMPTY}):(this._setUploadFileType(b6),this.uploadByCOS(a)):Me({code:Le.MSG_A_UPLOAD_FAIL})}},{key:"uploadByCOS",value:function(a){var c=this;if(!Bo(this._cosUploadMethod))return this.outputWarning("PluginUndetected"),Me({code:Le.COS_UNDETECTED});if(this.timUploadPlugin)return this._uploadWithPreSigUrl(a);var h=new We("upload"),m="".concat(this._n,".uploadByCOS"),y=Date.now(),b=this._getFile(a);return new Promise(function(C,E){var N=je?c._createCosOptionsWXMiniApp(a):c._createCosOptionsWeb(a),F=c;c._cosUploadMethod(N,function(z,Q){var me=Object.create(null);if(Q){if(z||st(Q.files)&&Q.files[0].error){var _e=new Fn({code:Le.MSG_F_UPLOAD_FAIL});return h.setError(_e,!0,c.getNetworkType()).end(),U.l("".concat(m," failed. error:"),Q.files[0].error),Q.files[0].error.statusCode===403&&(U.w("".concat(m," failed. cos AccessKeyId was invalid, regain auth key!")),c._getAuthorizationKey()),void E(_e)}me.fileName=b.name,me.fileSize=b.size,me.fileType=b.type.slice(b.type.indexOf("/")+1).toLowerCase(),me.location=je?Q.Location:Q.files[0].data.Location;var we=Date.now()-y,Ue=F._formatFileSize(b.size),Ve=F._formatSpeed(1e3*b.size/we),ot="size:".concat(Ue," time:").concat(we,"ms speed:").concat(Ve);U.l("".concat(m," success. name:").concat(b.name," ").concat(ot)),C(me);var vt=c.getModule(qo);return vt.addCost(Mi,we),vt.addFileSize(Mi,b.size),void h.setNetworkType(c.getNetworkType()).setMessage(ot).end()}var Ut=new Fn({code:Le.MSG_F_UPLOAD_FAIL});h.setError(Ut,!0,F.getNetworkType()).end(),U.w("".concat(m," failed. error:"),z),z.statusCode===403&&(U.w("".concat(m," failed. cos AccessKeyId was invalid, regain auth key!")),c._getAuthorizationKey()),E(Ut)})})}},{key:"_uploadWithPreSigUrl",value:function(a){var c=this,h="".concat(this._n,"._uploadWithPreSigUrl"),m=this._getFile(a);return this._createCosOptionsPreSigUrl(a).then(function(y){return new Promise(function(b,C){var E=new We("upload"),N=y.requestSnapshotUrl,F=N===void 0?void 0:N,z=k(y,i8),Q=Date.now();c._cosUploadMethod(z,function(me,_e){if(me||_e.statusCode===403)return E.setError(new Fn(me),!0,c.getNetworkType()).end(),U.l("".concat(h," failed, error:"),me),void C(new Fn({code:Le.MSG_F_UPLOAD_FAIL}));var we=Object.create(null),Ue=_e.data.location||"";c.isPrivateNetWork()||Ue.indexOf("https://")!==0&&Ue.indexOf("http://")!==0||(Ue=Ue.split("//")[1]),we.fileName=m.name,we.fileSize=m.size,we.fileType=m.type.slice(m.type.indexOf("/")+1).toLowerCase(),we.location=Ue;var Ve=Date.now()-Q,ot=c._formatFileSize(m.size),vt=c._formatSpeed(1e3*m.size/Ve),Ut="size:".concat(ot,",time:").concat(Ve,"ms,speed:").concat(vt," res:").concat(JSON.stringify(_e.data));U.l("".concat(h," success name:").concat(m.name,",").concat(Ut)),E.setNetworkType(c.getNetworkType()).setMessage(Ut).end();var mn=c.getModule(qo);mn.addCost(Mi,Ve),mn.addFileSize(Mi,m.size);var bn=[];if(z.thumbUrl&&z.largeUrl&&(bn=[c._getSmallImageInfoByUrl(z.thumbUrl,we),c._getLargeImageInfoByUrl(z.largeUrl,we)]),F&&bn.push(c._getSnapshotInfoByUrl(F,we)),bn.length>0)return Promise.all(bn).then(function(){b(we)});b(we)})})})}},{key:"_getRawOrUploadProxyUrl",value:function(a){var c=this.getModule(hn).getFileUploadProxy(),h=a;return c&&(h=a.replace(/^https:\/\/[^/]+/,c)),h}},{key:"_getFile",value:function(a){return st(a.file.files)||Id(a.file.files)?a.file.files[0]:a.file}},{key:"_formatFileSize",value:function(a){return a<1024?a+"B":a<1048576?Math.floor(a/1024)+"KB":Math.floor(a/1048576)+"MB"}},{key:"_formatSpeed",value:function(a){return a<=1048576?ts(a/1024,1)+"KB/s":ts(a/1048576,1)+"MB/s"}},{key:"_createCosOptionsWeb",value:function(a){var c=this._getFile(a),h=c.name,m=h.slice(h.lastIndexOf(".")),y=this._genFileName("".concat(ti(999999)).concat(m));return{files:[{Bucket:"".concat(this.bucketName,"-").concat(this.appid),Region:this.region,Key:"".concat(this.directory,"/").concat(y),Body:c}],SliceSize:1048576,onProgress:function(b){if(typeof a.onProgress=="function")try{a.onProgress(b.percent)}catch(C){U.w("onProgress callback error:",C)}},onFileFinish:function(b,C,E){}}}},{key:"_createCosOptionsWXMiniApp",value:function(a){var c=this._getFile(a),h=this._genFileName(c.name),m=c.url;return{Bucket:"".concat(this.bucketName,"-").concat(this.appid),Region:this.region,Key:"".concat(this.directory,"/").concat(h),FilePath:m,onProgress:function(y){if(U.l(JSON.stringify(y)),typeof a.onProgress=="function")try{a.onProgress(y.percent)}catch(b){U.w("onProgress callback error:",b)}}}}},{key:"_createCosOptionsPreSigUrl",value:function(a){var c=this,h="",m="",y=0,b=this._getFile(a);if(je)h=this._genFileName(b.name),m=b.url,y=1;else{var C=b.name,E=C.slice(C.lastIndexOf("."));h=this._genFileName("".concat(ti(999999)).concat(E)),m=b,y=0}return this._getCosPreSigUrl({fileType:this.uploadFileType,fileName:h,uploadMethod:y,duration:this.duration}).then(function(N){var F=N.uploadUrl,z=N.downloadUrl,Q=N.requestSnapshotUrl,me=Q===void 0?void 0:Q,_e=N.thumbUrl,we=N.largeUrl,Ue=N.fileKey;return{url:c._getRawOrUploadProxyUrl(F),fileType:c.uploadFileType,fileName:h,resources:m,downloadUrl:z,requestSnapshotUrl:me,thumbUrl:_e,largeUrl:we,fileKey:Ue,onProgress:function(Ve){if(typeof a.onProgress=="function")try{a.onProgress(Ve.percent)}catch(ot){U.w("onProgress callback error:",ot),U.e(ot)}}}})}},{key:"_genFileName",value:function(a){return"".concat(Ga(),"-").concat(a)}},{key:"_setUploadFileType",value:function(a){this.uploadFileType=a}},{key:"_getSnapshotInfoByUrl",value:function(a,c){var h=this,m=new We("getSnapshotInfo");return this.request({protocolName:$_,requestData:{platform:this.getPlatform(),coverName:this._genFileName(ti(99999)),requestSnapshotUrl:a}}).then(function(y){var b=(y.data||{}).snapshotUrl;return m.setMessage("snapshotUrl:".concat(b)).end(),Ye(b)?{}:$u(b).then(function(C){c.snapshotInfo={snapshotUrl:b,snapshotWidth:C.width,snapshotHeight:C.height}})}).catch(function(y){return U.w("".concat(h._n,"._getSnapshotInfoByUrl failed. error:"),y),m.setCode(y.errorCode).setMessage(y.errorInfo).end(),{}})}},{key:"_getSmallImageInfoByUrl",value:function(a,c){return $u(a).then(function(h){c.smallImageUrl=a,c.smallImageWidth=h.width,c.smallImageHeight=h.height})}},{key:"_getLargeImageInfoByUrl",value:function(a,c){return $u(a).then(function(h){c.largeImageUrl=a,c.largeImageWidth=h.width,c.largeImageHeight=h.height})}},{key:"_isEmptyFileList",value:function(a){return!(!Id(a)||a.length!==0)}},{key:"reset",value:function(){U.l("".concat(this._n,".reset"))}}]),p}(Er),a8=["downloadKey","pbDownloadKey","messageList"],l8=function(){function D(l){i(this,D),this._n="MergerMessageHandler",this._messageModule=l}return u(D,[{key:"uploadMergerMessage",value:function(l,p){var a=this,c="".concat(this._n,".").concat("uploadMergerMessage");U.d("".concat(c," message:"),l,"messageBytes:".concat(p));var h=l.payload.messageList,m=h.length,y=new We("uploadMergerMessage");return this._messageModule.request({protocolName:B_,requestData:{messageList:h}}).then(function(b){U.d("".concat(c," ok. response:"),b.data);var C=b.data,E=C.pbDownloadKey,N=C.downloadKey,F={pbDownloadKey:E,downloadKey:N,messageNumber:m};return y.setNetworkType(a._messageModule.getNetworkType()).setMessage("".concat(m,"-").concat(p,"-").concat(N)).end(),F}).catch(function(b){throw U.w("".concat(c," failed. error:"),b),a._messageModule.probeNetwork().then(function(C){var E=A(C,2),N=E[0],F=E[1];y.setError(b,N,F).end()}),b})}},{key:"downloadMergerMessage",value:function(l){var p=this,a="".concat(this._n,".").concat("downloadMergerMessage");U.d("".concat(a," message:"),l);var c=l.payload.downloadKey,h=this._messageModule.getFileDownloadProxy(),m=new We("downloadMergerMessage");return m.setMessage("downloadKey:".concat(c)),this._messageModule.request({protocolName:H_,requestData:{downloadKey:c}}).then(function(y){if(U.d("".concat(a," ok. response:"),y.data),Bo(l.clearElement)){var b=l.payload;b.downloadKey,b.pbDownloadKey,b.messageList;var C=k(b,a8);l.clearElement(),l.setElement({type:l.type,content:r({messageList:y.data.messageList},C)},h)}else{var E=[];y.data.messageList.forEach(function(N){if(!Ye(N)){var F=new Uw(N,h);E.push(F)}}),l.payload.messageList=E,l.payload.downloadKey="",l.payload.pbDownloadKey=""}return m.setNetworkType(p._messageModule.getNetworkType()).end(),l}).catch(function(y){throw U.w("".concat(a," failed. key:").concat(c," error:"),y),p._messageModule.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];m.setError(y,E,N).end()}),y})}},{key:"createMergerMessagePack",value:function(l,p,a){return l.conversationType===T.CONV_C2C?this._createC2CMergerMessagePack(l,p,a):this._createGroupMergerMessagePack(l,p,a)}},{key:"_createC2CMergerMessagePack",value:function(l,p,a){var c=null;p&&(p.offlinePushInfo&&(c=p.offlinePushInfo),p.onlineUserOnly===!0&&(c?c.disablePush=!0:c={disablePush:!0}));var h=[];if(_n(p)&&_n(p.messageControlInfo)){var m=p.messageControlInfo,y=m.excludedFromUnreadCount,b=m.excludedFromLastMessage,C=m.excludedFromContentModeration;y===!0&&h.push("NoUnread"),b===!0&&h.push("NoLastMsg"),C===!0&&h.push("NoMsgCheck")}var E="";At(l.cloudCustomData)&&l.cloudCustomData.length>0&&(E=l.cloudCustomData);var N=a.pbDownloadKey,F=a.downloadKey,z=a.messageNumber,Q=l.payload,me=Q.title,_e=Q.abstractList,we=Q.compatibleText,Ue=this._messageModule.getModule(ao),Ve=Ue&&Ue.isOnlineMessage(l,p)?0:void 0;return{protocolName:wp,tjgID:this._messageModule.generateTjgID(l),requestData:{fromAccount:this._messageModule.getMyUserID(),toAccount:l.to,msgBody:[{msgType:l.type,msgContent:{pbDownloadKey:N,downloadKey:F,title:me,abstractList:_e,compatibleText:we,messageNumber:z}}],cloudCustomData:E,clientTime:l.clientTime,msgSeq:l.sequence,msgRandom:l.random,msgLifeTime:Ve,offlinePushInfo:c?{pushFlag:c.disablePush===!0?1:0,title:c.title||"",desc:c.description||"",ext:c.extension||"",apnsInfo:{badgeMode:c.ignoreIOSBadge===!0?1:0},androidInfo:{OPPOChannelID:c.androidOPPOChannelID||""}}:void 0,messageControlInfo:Ve!==0?h:void 0,isSupportExtension:l.isSupportExtension===!0?1:0}}}},{key:"_createGroupMergerMessagePack",value:function(l,p,a){var c=null;p&&p.offlinePushInfo&&(c=p.offlinePushInfo);var h=[];if(_n(p)&&_n(p.messageControlInfo)){var m=p.messageControlInfo,y=m.excludedFromUnreadCount,b=m.excludedFromLastMessage,C=m.excludedFromContentModeration;y===!0&&h.push("NoUnread"),b===!0&&h.push("NoLastMsg"),C===!0&&h.push("NoMsgCheck")}var E="";At(l.cloudCustomData)&&l.cloudCustomData.length>0&&(E=l.cloudCustomData);var N=a.pbDownloadKey,F=a.downloadKey,z=a.messageNumber,Q=l.payload,me=Q.title,_e=Q.abstractList,we=Q.compatibleText,Ue=this._messageModule.getModule(Tt),Ve=Ue&&Ue.isOnlineMessage(l,p)?1:0;return{protocolName:Sp,tjgID:this._messageModule.generateTjgID(l),requestData:{fromAccount:this._messageModule.getMyUserID(),groupID:l.to,msgBody:[{msgType:l.type,msgContent:{pbDownloadKey:N,downloadKey:F,title:me,abstractList:_e,compatibleText:we,messageNumber:z}}],random:l.random,priority:l.priority,clientSequence:l.clientSequence,groupAtInfo:void 0,cloudCustomData:E,onlineOnlyFlag:Ve,offlinePushInfo:c?{pushFlag:c.disablePush===!0?1:0,title:c.title||"",desc:c.description||"",ext:c.extension||"",apnsInfo:{badgeMode:c.ignoreIOSBadge===!0?1:0},androidInfo:{OPPOChannelID:c.androidOPPOChannelID||""}}:void 0,clientTime:l.clientTime,needReadReceipt:l.needReadReceipt!==!0||Ue.isMessageFromOrToAVChatroom(l.to)?0:1,messageControlInfo:Ve===0?h:void 0,isSupportExtension:l.isSupportExtension===!0?1:0}}}}]),D}(),u8={ERR_SVR_COMM_SENSITIVE_TEXT:80001,ERR_SVR_COMM_BODY_SIZE_LIMIT:80002,OPEN_SERVICE_OVERLOAD_ERROR:60022,ERR_SVR_MSG_PKG_PARSE_FAILED:20001,ERR_SVR_MSG_INTERNAL_AUTH_FAILED:20002,ERR_SVR_MSG_INVALID_ID:20003,ERR_SVR_MSG_PUSH_DENY:20006,ERR_SVR_MSG_IN_PEER_BLACKLIST:20007,ERR_SVR_MSG_BOTH_NOT_FRIEND:20009,ERR_SVR_MSG_NOT_PEER_FRIEND:20010,ERR_SVR_MSG_NOT_SELF_FRIEND:20011,ERR_SVR_MSG_SHUTUP_DENY:20012,ERR_SVR_GROUP_INVALID_PARAMETERS:10004,ERR_SVR_GROUP_PERMISSION_DENY:10007,ERR_SVR_GROUP_NOT_FOUND:10010,ERR_SVR_GROUP_INVALID_GROUPID:10015,ERR_SVR_GROUP_REJECT_FROM_THIRDPARTY:10016,ERR_SVR_GROUP_SHUTUP_DENY:10017,MSG_SEND_FAIL:2100,OVER_FREQUENCY_LIMIT:2996},c8=[Le.MSG_ONPROGRESS_FUNCTION_ERROR,Le.MSG_I_SELECT_F_FIRST,Le.MSG_I_TYPES_LIMIT,Le.MSG_F_IS_EMPTY,Le.MSG_I_SIZE_LIMIT,Le.MSG_F_SELECT_F_FIRST,Le.MSG_F_SIZE_LIMIT,Le.MSG_V_SIZE_LIMIT,Le.MSG_V_TYPES_LIMIT,Le.MSG_A_UPLOAD_FAIL,Le.MSG_A_SIZE_LIMIT,Le.COS_UNDETECTED];function Ww(D){var l=!1;return Object.values(u8).includes(D)&&(l=!0),(D>=120001&&D<=13e4||D>=10100&&D<=10200)&&(l=!0),l}var d8=["conversationID","timePosition","timePeriod"],f8=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="MessageModule",c._messageOptionsMap=new Map,c._mergerMessageHandler=new l8(w(c)),c}return u(p,[{key:"createTextMessage",value:function(a){var c=this.getMyUserID();a.currentUser=c,a.senderTinyID=this.getMyTinyID();var h=new qr(a),m=At(a.payload)?a.payload:a.payload.text,y=new i1({text:m}),b=this._getNickAndAvatarByUserID(c);return h.setElement(y),h.setNickAndAvatar(b),h.setNameCard(this._getNameCardByGroupID(h)),h}},{key:"createImageMessage",value:function(a){var c=this.getMyUserID();a.currentUser=c,a.senderTinyID=this.getMyTinyID();var h=new qr(a);if(je){var m=a.payload.file;if(Br(m))return void this.outputWarning("FileUnsupportedInMP","createImageMessage");var y=m.tempFiles[0].path||m.tempFiles[0].tempFilePath,b={url:y,name:y.slice(y.lastIndexOf("/")+1),size:m.tempFiles&&m.tempFiles[0].size||1,type:y.slice(y.lastIndexOf(".")+1).toLowerCase()};a.payload.file=b}else if(ct){if(Br(a.payload.file)){var C=a.payload.file;a.payload.file={files:[C]}}else if(_n(a.payload.file)&&typeof uni<"u"){var E=a.payload.file.tempFiles[0];a.payload.file={files:[E]}}}var N=new s1({imageFormat:fs.UNKNOWN,uuid:this._generateUUID(a.payload.file),file:a.payload.file}),F=this._getNickAndAvatarByUserID(c);return h.setElement(N),h.setNickAndAvatar(F),h.setNameCard(this._getNameCardByGroupID(h)),this._messageOptionsMap.set(h.clientSequence,a),h}},{key:"createAudioMessage",value:function(a){var c=a.payload.file;if(je){var h={url:c.tempFilePath,name:c.tempFilePath.slice(c.tempFilePath.lastIndexOf("/")+1),size:c.fileSize,second:parseInt(c.duration)/1e3,type:c.tempFilePath.slice(c.tempFilePath.lastIndexOf(".")+1).toLowerCase()};a.payload.file=h}var m=this.getMyUserID();a.currentUser=m,a.senderTinyID=this.getMyTinyID();var y=new qr(a),b=new l1({second:Math.floor(c.duration/1e3),size:c.fileSize||c.size,url:c.tempFilePath,uuid:this._generateUUID(a.payload.file)}),C=this._getNickAndAvatarByUserID(m);return y.setElement(b),y.setNickAndAvatar(C),y.setNameCard(this._getNameCardByGroupID(y)),this._messageOptionsMap.set(y.clientSequence,a),y}},{key:"createVideoMessage",value:function(a){var c=this.getMyUserID();a.currentUser=c,a.senderTinyID=this.getMyTinyID(),a.payload.file.thumbUrl="",a.payload.file.thumbSize=0;var h={};if(je){if(W)return void this.outputWarning("VideoUnsupportedInAlipay");if(Br(a.payload.file))return void this.outputWarning("FileUnsupportedInMP","createVideoMessage");var m=a.payload.file;st(m.tempFiles)&&(m=m.tempFiles[0]),h.url=m.tempFilePath,h.name=m.tempFilePath.slice(m.tempFilePath.lastIndexOf("/")+1),h.size=m.size||1,h.second=m.duration||0,h.type=m.tempFilePath.slice(m.tempFilePath.lastIndexOf(".")+1).toLowerCase()}else if(ct){if(Br(a.payload.file)){var y=a.payload.file;a.payload.file.files=[y]}else if(_n(a.payload.file)&&typeof uni<"u"){var b=a.payload.file.tempFile;a.payload.file.files=[b]}var C=a.payload.file;h.url=window.URL.createObjectURL(C.files[0]),h.name=C.files[0].name,h.size=C.files[0].size||1,h.second=C.files[0].duration||0,h.type=C.files[0].type.split("/")[1]}a.payload.file.videoFile=h;var E=new qr(a),N=new d1({videoFormat:h.type,videoSecond:ts(h.second,0),videoSize:h.size,remoteVideoUrl:"",videoUrl:h.url,videoUUID:this._generateUUID(a.payload.file.videoFile),thumbUUID:this._generateUUID(a.payload.file.videoFile),thumbWidth:a.payload.file.width||200,thumbHeight:a.payload.file.height||200,thumbUrl:a.payload.file.thumbUrl,thumbSize:a.payload.file.thumbSize,thumbFormat:a.payload.file.thumbUrl.slice(a.payload.file.thumbUrl.lastIndexOf(".")+1).toLowerCase()}),F=this._getNickAndAvatarByUserID(c);return E.setElement(N),E.setNickAndAvatar(F),E.setNameCard(this._getNameCardByGroupID(E)),this._messageOptionsMap.set(E.clientSequence,a),E}},{key:"createCustomMessage",value:function(a){var c=this.getMyUserID();a.currentUser=c,a.senderTinyID=this.getMyTinyID();var h=new qr(a),m=new c1({data:a.payload.data,description:a.payload.description,extension:a.payload.extension}),y=this._getNickAndAvatarByUserID(c);return h.setElement(m),h.setNickAndAvatar(y),h.setNameCard(this._getNameCardByGroupID(h)),h}},{key:"createFaceMessage",value:function(a){var c=this.getMyUserID();a.currentUser=c,a.senderTinyID=this.getMyTinyID();var h=new qr(a),m=new a1(a.payload),y=this._getNickAndAvatarByUserID(c);return h.setElement(m),h.setNickAndAvatar(y),h.setNameCard(this._getNameCardByGroupID(h)),h}},{key:"createMergerMessage",value:function(a){var c=this.getMyUserID();a.currentUser=c,a.senderTinyID=this.getMyTinyID();var h=this._getNickAndAvatarByUserID(c),m=new qr(a),y=new am(a.payload);return m.setElement(y),m.setNickAndAvatar(h),m.setNameCard(this._getNameCardByGroupID(m)),m.setRelayFlag(!0),m}},{key:"createForwardMessage",value:function(a){var c=a.to,h=a.conversationType,m=a.priority,y=a.payload,b=a.needReadReceipt,C=a.receiverList,E=this.getMyUserID(),N=this._getNickAndAvatarByUserID(E);if(y.type===T.MSG_GRP_TIP)return Me({code:Le.MSG_FORWARD_TYPE_INVALID});var F={to:c,conversationType:h,conversationID:"".concat(h).concat(c),priority:m,isPlaceMessage:0,status:so.UNSEND,currentUser:E,senderTinyID:this.getMyTinyID(),cloudCustomData:a.cloudCustomData||y.cloudCustomData||"",needReadReceipt:b,receiverList:C,isSupportExtension:a.isSupportExtension||!1},z=new qr(F);return z.setElement(y.getElements()[0]),z.setNickAndAvatar(N),z.setNameCard(this._getNameCardByGroupID(y)),z.setRelayFlag(!0),z}},{key:"downloadMergerMessage",value:function(a){return this._mergerMessageHandler.downloadMergerMessage(a)}},{key:"createFileMessage",value:function(a){if(je){if(!Pe&&!xe&&!ye)return;var c=Fe.getSystemInfoSync().SDKVersion;if(Pe&&Og(c,"2.5.0")<0)return void this.outputWarning("WXChooseMessageFile");if(xe&&Og(c,"1.18.0")<0)return void this.outputWarning("QQChooseMessageFile")}if(ct||ye){if(Br(a.payload.file)){var h=a.payload.file;a.payload.file={files:[h]}}else if(_n(a.payload.file)&&typeof uni<"u"){var m=a.payload.file,y=m.tempFiles,b=m.files,C=null;st(y)?C=y[0]:st(b)&&(C=b[0]),a.payload.file={files:[C]}}}else if(Pe||xe){var E=a.payload.file.tempFiles,N=r(r({},E[0]),{},{url:E[0].path});a.payload.file={files:[N]}}var F=this.getMyUserID();a.currentUser=F,a.senderTinyID=this.getMyTinyID();var z=new qr(a),Q=new u1({uuid:this._generateUUID(a.payload.file),file:a.payload.file}),me=this._getNickAndAvatarByUserID(F);return z.setElement(Q),z.setNickAndAvatar(me),z.setNameCard(this._getNameCardByGroupID(z)),this._messageOptionsMap.set(z.clientSequence,a),z}},{key:"createLocationMessage",value:function(a){var c=this.getMyUserID();a.currentUser=c,a.senderTinyID=this.getMyTinyID();var h=new qr(a),m=new f1(a.payload),y=this._getNickAndAvatarByUserID(c);return h.setElement(m),h.setNickAndAvatar(y),h.setNameCard(this._getNameCardByGroupID(h)),h}},{key:"_onCannotFindModule",value:function(){return Me({code:Le.CANNOT_FIND_MODULE})}},{key:"sendMessageInstance",value:function(a,c){var h=this;if(this.getModule(za).filterMessage(a,c)===!1)return this._onSendMessageFailed(a,new Fn({code:Le.PROFANITY_FOUND}));var m=null;if(a.conversationType===T.CONV_C2C)m=this.getModule(ao);else{if(a.conversationType!==T.CONV_GROUP)return Me({code:Le.MSG_INVALID_CONV_TYPE});m=this.getModule(Tt)}var y,b="".concat(this._n,".sendMessageInstance"),C=this.getModule(dt),E=m.isOnlineMessage(a,c);return this.getModule(Mw).upload(a).then(function(){return h._getSendMessageSpecifiedKey(a)===ju&&h.getModule(qo).addSuccessCount(Mi),h._guardForGroup(a).then(function(){if(!a.isSendable())return Me({code:Le.MSG_F_URL_IS_EMPTY});h._addSendMessageTotalCount(a),y=Date.now();var N=function(F){var z="utf-8";ct&&document&&(z=document.charset.toLowerCase());var Q,me,_e=0;if(me=F.length,z==="utf-8"||z==="utf8")for(var we=0;we11264?h._mergerMessageHandler.uploadMergerMessage(a,N).then(function(F){var z=h._mergerMessageHandler.createMergerMessagePack(a,c,F);return h.request(z)}):(C.setMessageRandom(a),m.sendMessage(a,c))}).then(function(N){var F=N.data,z=F.time,Q=F.sequence,me=F.readReceiptCode;if(un(me)&&me!==0&&(new We("sendMessageWithReceipt").setMessage("from:".concat(a.from," to:").concat(a.to," sequence:").concat(Q," readReceiptCode:").concat(me)).end(),U.w("".concat(b," readReceiptCode:").concat(me," message:").concat(h.getErrorMessage(me)))),h._addSendMessageSuccessCount(a,y),h._messageOptionsMap.delete(a.clientSequence),a.isResend===!0){var _e=C.findMessage(a.ID);_e&&(U.l("".concat(b," resend ok. ID:").concat(_e.ID)),C.deleteLocalMessage(_e))}a.status=so.SUCCESS,a.time=z;var we=!1;if(a.conversationType===T.CONV_GROUP)a.sequence=Q;else if(a.conversationType===T.CONV_C2C){var Ue=C.getLatestMessageSentByMe(a.conversationID);if(Ue){var Ve=Ue.nick,ot=Ue.avatar;Ve===a.nick&&ot===a.avatar||(we=!0)}}if(we&&C.modifyMessageSentByMe({conversationID:a.conversationID,latestNick:a.nick,latestAvatar:a.avatar}),E===!0)a._onlineOnlyFlag=!0;else{C.appendToMessageList(a);var vt=a;_n(c)&&_n(c.messageControlInfo)&&(c.messageControlInfo.excludedFromLastMessage===!0&&(a._isExcludedFromLastMessage=!0,vt=""),c.messageControlInfo.excludedFromUnreadCount===!0&&(a._isExcludedFromUnreadCount=!0));var Ut=a.conversationType;oo(a.to)&&(Ut=T.CONV_TOPIC,h.getModule(ur).onMessageSent({groupID:Rr(a.to),topicID:a.to,lastMessage:vt})),C.onMessageSent({conversationOptionsList:[{conversationID:a.conversationID,unreadCount:0,type:Ut,subType:a.conversationSubType,lastMessage:vt}]})}return a.getRelayFlag()||a.type!=="TIMImageElem"||Gu(a.payload.imageInfoArray),gt({message:a})})}).catch(function(N){return h._onSendMessageFailed(a,N,E)})}},{key:"_guardForGroup",value:function(a){if(a.conversationType!==T.CONV_GROUP)return Promise.resolve();var c=this.getModule(Tt);if(!c)return this._onCannotFindModule();if(mo({groupID:a.to})){var h=c.getLocalGroupProfile(a.to);if(h&&h.isSupportTopic)return Me({code:Le.MSG_SEND_GRP_WITH_TOPIC_FAIL})}return c.guardForAVChatRoom(a)}},{key:"_onSendMessageFailed",value:function(a,c){var h=arguments.length>2&&arguments[2]!==void 0&&arguments[2],m="".concat(this._n,"._onSendMessageFailed");a.status=so.FAIL;var y=this.getModule(dt);if(y.deleteMessageRandom(a),!h){var b=y.appendToMessageList(a);b===!0&&U.l("".concat(m," message stored, ID:").concat(a.ID))}this._addSendMessageFailCountOnUser(a,c);var C=new We("sendMessage");return C.setMessage("tjg_id:".concat(this.generateTjgID(a)," type:").concat(a.type," from:").concat(a.from," to:").concat(a.to)),this.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];C.setError(c,F,z).end()}),U.e("".concat(m," error:"),c),Me(new Fn({code:c&&c.code?c.code:Le.MSG_SEND_FAIL,message:c&&c.message?c.message:void 0,data:{message:a}}))}},{key:"_getSendMessageSpecifiedKey",value:function(a){if([T.MSG_IMAGE,T.MSG_AUDIO,T.MSG_VIDEO,T.MSG_FILE].includes(a.type))return ju;if(a.conversationType===T.CONV_C2C)return Ad;if(a.conversationType===T.CONV_GROUP){var c=this.getModule(Tt);if(!c)return;var h=c.getLocalGroupProfile(a.to);if(!h)return;var m=h.type;return Ho(m)?Od:Ld}}},{key:"_addSendMessageTotalCount",value:function(a){var c=this._getSendMessageSpecifiedKey(a);c&&this.getModule(qo).addTotalCount(c)}},{key:"_addSendMessageSuccessCount",value:function(a,c){var h=Math.abs(Date.now()-c),m=this._getSendMessageSpecifiedKey(a);if(m){var y=this.getModule(qo);y.addSuccessCount(m),y.addCost(m,h)}}},{key:"_addSendMessageFailCountOnUser",value:function(a,c){var h,m,y=c.code,b=y===void 0?-1:y,C=this.getModule(qo),E=this._getSendMessageSpecifiedKey(a);E===ju&&(h=b,m=!1,c8.includes(h)&&(m=!0),m)?C.addFailedCountOfUserSide(Mi):Ww(b)&&E&&C.addFailedCountOfUserSide(E)}},{key:"resendMessage",value:function(a,c){return a.isResend=!0,a.status=so.UNSEND,this.sendMessageInstance(a,c)}},{key:"revokeMessage",value:function(a){var c=this,h=null;if(a.conversationType===T.CONV_C2C?h=this.getModule(ao):a.conversationType===T.CONV_GROUP&&(h=this.getModule(Tt)),!h)return this._onCannotFindModule();var m=new We("revokeMessage");m.setMessage("tjg_id:".concat(this.generateTjgID(a)," type:").concat(a.type," from:").concat(a.from," to:").concat(a.to));var y="".concat(this._n,".").concat("revokeMessage");return h.revokeMessage(a).then(function(b){var C=b.data.recallRetList;if(!Ye(C)&&C[0].retCode!==0){var E=new Fn({code:C[0].retCode,data:{message:a}});return m.setCode(E.code).setMoreMessage(E.message).end(),Me(E)}return U.i("".concat(y," ok. ID:").concat(a.ID)),a.isRevoked=!0,m.end(),c.getModule(dt).onMessageRevoked([a]),gt({message:a})}).catch(function(b){c.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];m.setError(b,F,z).end()});var C=new Fn({code:b&&b.code?b.code:Le.MSG_REVOKE_FAIL,message:b&&b.message?b.message:void 0,data:{message:a}});return U.w("".concat(y," failed. error:"),b),Me(C)})}},{key:"deleteMessage",value:function(a){var c=this,h=null,m=a[0],y=m.conversationID,b="",C=[],E=[];if(m.conversationType===T.CONV_C2C)h=this.getModule(ao),b=y.replace(T.CONV_C2C,""),a.forEach(function(z){z&&z.status===so.SUCCESS&&z.conversationID===y&&(z._onlineOnlyFlag||C.push("".concat(z.sequence,"_").concat(z.random,"_").concat(z.time)),E.push(z))});else if(m.conversationType===T.CONV_GROUP)h=this.getModule(Tt),b=y.replace(T.CONV_GROUP,""),a.forEach(function(z){z&&z.status===so.SUCCESS&&z.conversationID===y&&(z._onlineOnlyFlag||C.push("".concat(z.sequence)),E.push(z))});else if(m.conversationType===T.CONV_SYSTEM)return Me({code:Le.CANNOT_DELETE_GRP_SYSTEM_NOTICE});if(!h)return this._onCannotFindModule();if(C.length===0)return this._onMessageDeleted(E);C.length>30&&(C=C.slice(0,30),E=E.slice(0,30));var N=new We("deleteMessage");N.setMessage("to:".concat(b," count:").concat(C.length));var F="".concat(this._n,".").concat("deleteMessage");return h.deleteMessage({to:b,keyList:C}).then(function(z){return N.end(),U.i("".concat(F," ok")),c._onMessageDeleted(E)}).catch(function(z){c.probeNetwork().then(function(me){var _e=A(me,2),we=_e[0],Ue=_e[1];N.setError(z,we,Ue).end()}),U.w("".concat(F," failed. error:"),z);var Q=new Fn({code:z&&z.code?z.code:Le.MSG_DELETE_FAIL,message:z&&z.message?z.message:void 0});return Me(Q)})}},{key:"_onMessageDeleted",value:function(a){return this.getModule(dt).onMessageDeleted(a),Lt({messageList:a})}},{key:"translateText",value:function(a){var c="".concat(this._n,".").concat("translateText"),h=a.sourceTextList,m=a.sourceLanguage,y=a.targetLanguage,b=new We("translateText");return b.setMessage("sourceLanguage:".concat(m," targetLanguage:").concat(y)),this.request({protocolName:n1,requestData:{sourceTextList:h,source:m||"auto",target:y,from:this.getMyTinyID(),SDKAppID:this.getSDKAppID()}}).then(function(C){var E=C.data,N=E.error,F=E.requestID,z=E.translatedTextList;if(N.code===0)return b.end(),U.i("".concat(c," ok. requestID:").concat(F)),gt({translatedTextList:z});throw r(r({},N),{},{requestID:F})}).catch(function(C){return b.setCode(C.code).setMoreMessage(C.requestID).end(),U.w("".concat(c," failed. error:"),C),Me({code:Le.TRANSLATE_TEXT_FAIL})})}},{key:"modifyRemoteMessage",value:function(a){var c=this,h=null,m=a.conversationType,y=a.to,b=this.getModule(Tt);if(!b)return this._onCannotFindModule();if(b.isMessageFromOrToAVChatroom(y))return Me({code:Le.MSG_MODIFY_DISABLED_IN_AVCHATROOM,data:{message:a}});if(this.getModule(za).filterMessage(a)===!1)return Me({code:Le.PROFANITY_FOUND,data:{message:a}});m===T.CONV_C2C?h=this.getModule(ao):m===T.CONV_GROUP&&(h=this.getModule(Tt));var C=new We("modifyMessage");C.setMessage("to:".concat(y));var E="".concat(this._n,".modifyRemoteMessage");return h.modifyRemoteMessage(a).then(function(N){C.end(),U.i("".concat(E," ok"));var F=c._onModifyRemoteMessageResp(a,N.data);return gt({message:F})}).catch(function(N){if(C.setCode(N.code).setMoreMessage(N.message).end(),U.w("".concat(E," failed. error:"),N),N.code===20027){var F=c._onModifyRemoteMessageResp(a,N.data);return Me({code:Le.MSG_MODIFY_CONFLICT,data:{message:F}})}return Me({code:N.code,message:N.message,data:{message:a}})})}},{key:"_generateSearchRequestData",value:function(a){var c=a.conversationID,h=a.timePosition,m=a.timePeriod,y=r(r({},k(a,d8)),{},{endTime:h});return $e(c)||(vo(c)&&(y.account=c.replace(T.CONV_C2C,"")),io(c)&&(y.groupID=c.replace(T.CONV_GROUP,""))),un(m)&&(y.startTime=h?h-(m||0):Number((new Date().getTime()/1e3).toFixed(0))-(m||0)),un(y.count)&&(y.count=Math.min(y.count,100)),y}},{key:"searchCloudMessages",value:function(a){var c=this,h="searchCloudMessages",m="".concat(this._n,".").concat(h);if(!a)return Me({code:Le.OPTIONS_IS_EMPTY,message:this.getErrorMessage(Le.OPTIONS_IS_EMPTY,h)});var y=a.keywordList,b=a.keywordListMatchType,C=a.conversationID,E=a.cursor,N=st(a.senderUserIDList)&&a.senderUserIDList.length>0,F=st(a.messageTypeList)&&a.messageTypeList.length>0;if(!(y||N&&F))throw U.e("[".concat(h,'] Missing required params: "keywordList".')),new Error("Params validate failed.");var z=Date.now(),Q=new We(h),me="keywordList:".concat(y," keywordListMatchType:").concat(b," ")+"conversationID:".concat(C," cursor:").concat(E);return U.l("".concat(m," ").concat(me)),this.request({protocolName:tm,requestData:this._generateSearchRequestData(a)}).then(function(_e){var we=_e.data,Ue=we.errorCode,Ve=we.errorInfo,ot=Date.now()-z;if(Ue!==0){if(Ue===Le.ERR_SVR_COMM_INVALID_SERVICE||Ue===Le.MSG_SEARCH_CURSOR_INVALID||Ue===Le.MSG_SEARCH_CURSOR_EXPIRED)return Me({code:Ue});throw new Fn({code:Ue,message:Ve})}var vt=_e.data,Ut=vt.cursor,mn=vt.totalCount,bn=vt.searchResult;Q.setNetworkType(c.getNetworkType()).setMessage("".concat(me," totalCount:").concat(mn," cost ").concat(ot," ms")).end();var Nr=c._handleSearchResults(bn,!a.conversationID);return U.l("".concat(m," ok. cursor:").concat(Ut," totalCount:").concat(mn," cost ").concat(ot," ms")),gt({searchResultList:Nr,cursor:Ut,totalCount:mn})}).catch(function(_e){return c.probeNetwork().then(function(we){var Ue=A(we,2),Ve=Ue[0],ot=Ue[1];Q.setMessage(me).setError(_e,Ve,ot).end()}),Me(_e)})}},{key:"_handleSearchResults",value:function(a,c){var h=this.getModule(dt);return st(a)&&a.length!==0?a.map(function(m){var y=m.groupID,b=m.userID,C=m.messageCount,E=m.messageList,N=y?"".concat(T.CONV_GROUP).concat(y):"".concat(T.CONV_C2C).concat(b),F={conversationID:N,messageCount:C,messageList:[]};return c&&C>1||E&&E.length>0&&(F.messageList=h.onRoamingMessage(E,N,!1)),F}):[]}},{key:"_onModifyRemoteMessageResp",value:function(a,c){U.d("".concat(this._n,"._onModifyRemoteMessageResp options:"),c);var h=a.conversationType,m=a.from,y=a.to,b=a.random,C=a.sequence,E=a.time,N=c.elements,F=c.messageVersion,z=c.cloudCustomData,Q=z===void 0?"":z;return this.getModule(dt).onMessageModified({conversationType:h,from:m,to:y,time:E,random:b,sequence:C,elements:N,cloudCustomData:Q,messageVersion:F})}},{key:"_generateUUID",value:function(a){var c=this.getModule(hn),h="".concat(c.getSDKAppID(),"-").concat(c.getUserID(),"-").concat(function(){for(var b="",C=32;C>0;--C)b+=Td[Math.floor(Math.random()*dp)];return b}()),m=a.name||a.value||a.url||a.tempFilePath,y=m&&m.slice(m.lastIndexOf(".")+1);return y&&(h="".concat(h,".").concat(y)),h}},{key:"getMessageOption",value:function(a){return this._messageOptionsMap.get(a)}},{key:"_getNickAndAvatarByUserID",value:function(a){return this.getModule(yr).getNickAndAvatarByUserID(a)}},{key:"_getNameCardByGroupID",value:function(a){if(a.conversationType===T.CONV_GROUP){var c=this.getModule(Tt);if(c)return c.getMyNameCardByGroupID(a.to)}return""}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._messageOptionsMap.clear()}}]),p}(Er),p8=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="MessageExtensionModule",c.messageExtensionMap=new Map,c.globalSeqMap=new Map,c.getMessageExtensionsMap=new Map,c}return u(p,[{key:"onMessageExtensionNotify",value:function(a){var c=this,h=a.dataList,m=h.messageInfo,y=h.operateType,b=h.operateResultList,C=h.tinyID,E=h.globalSequence,N=m.clientTime,F=m.random,z="".concat(C,"-").concat(N,"-").concat(F),Q=[],me=[];U.l("".concat(this._n,".onMessageExtensionNotify messageID:").concat(z," operateType:").concat(y," globalSequence:").concat(E)),this._updateGlobalSequence(z,E);var _e=!1,we=!1;b.forEach(function(Ue){var Ve=Ue.extensions,ot=Ve===void 0?[]:Ve,vt=Ue.clearSequence;y===1?(_e=!0,ot.forEach(function(Ut){Q.push({key:Ut.key,value:Ut.value})}),c._updateLocalExtension(z,ot)):y===2?(we=!0,ot.forEach(function(Ut){me.push(Ut.key)}),c._updateLocalExtension(z,ot)):y===3&&(we=!0,c._hasLocalExtension(z)&&c._getLocalExtension(z).forEach(function(Ut,mn){Ut.seq<=vt&&!Ye(Ut.value)&&me.push(mn)}),c._clearLocalExtension(z,vt))}),_e&&this.emitOuterEvent(R.MESSAGE_EXTENSIONS_UPDATED,{messageID:z,extensions:Q}),we&&this.emitOuterEvent(R.MESSAGE_EXTENSIONS_DELETED,{messageID:z,keyList:me})}},{key:"setMessageExtensions",value:function(a,c){var h=this;if(!this.canIUse(ce.MSG_EXT))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var m="".concat(this._n,".").concat("setMessageExtensions"),y=a.ID,b=a.conversationID,C=a.sequence,E=a.time,N=O(c);c.length>20&&(N=c.slice(0,20),U.w("".concat(m,". the length of extensions cannot exceed 20.")));var F="conversationID:".concat(b," messageID:").concat(y," sequence:").concat(C," time:").concat(E," count:").concat(N.length),z=new We("setMessageExtensions");return z.setMessage(F),U.l("".concat(m," ").concat(F)),this._modifyMessageExtensions(a,N).then(function(Q){var me=Q.resultList,_e=Q.successCount,we=Q.failureCount,Ue="success count:".concat(_e," fail count:").concat(we);return z.setMoreMessage(Ue).end(),U.l("".concat(m," ok. ").concat(Ue)),gt({extensions:me})}).catch(function(Q){return h.probeNetwork().then(function(me){var _e=A(me,2),we=_e[0],Ue=_e[1];z.setError(Q,we,Ue).end()}),U.e("".concat(m," failed. error:"),Q),Me(Q)})}},{key:"getMessageExtensions",value:function(a){var c=this;if(!this.canIUse(ce.MSG_EXT))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var h="".concat(this._n,".").concat("getMessageExtensions"),m=a.ID,y=a.conversationID,b=a.sequence,C=a.time,E="conversationID:".concat(y," messageID:").concat(m," sequence:").concat(b," time:").concat(C),N=new We("getMessageExtensions");N.setMessage(E),U.l("".concat(h," ").concat(E));var F=void 0;return this.getMessageExtensionsMap.has(m)&&(F=this._getGlobalSequence(m)),this._getMessageExtensions(a,F).then(function(z){return N.end(),U.l("".concat(h," ok. total count:").concat(z.length)),$e(F)&&z.length>0&&c.getMessageExtensionsMap.set(m,1),gt({extensions:z})}).catch(function(z){return c.probeNetwork().then(function(Q){var me=A(Q,2),_e=me[0],we=me[1];N.setError(z,_e,we).end()}),U.e("".concat(h," failed. error:"),z),Me(z)})}},{key:"deleteMessageExtensions",value:function(a,c){var h=this;if(!this.canIUse(ce.MSG_EXT))return Me({code:Le.CANNOT_USE_COMMERCIAL_ABILITY});var m="".concat(this._n,".").concat("deleteMessageExtensions"),y=[],b=3;Ye(c)||(b=2,c.forEach(function(me){y.push({key:me,value:"",seq:0})}));var C=a.ID,E=a.conversationID,N=a.sequence,F=a.time,z="conversationID:".concat(E," messageID:").concat(C," sequence:").concat(N," time:").concat(F," operateType:").concat(b),Q=new We("deleteMessageExtensions");return Q.setMessage(z),U.l("".concat(m," ").concat(z)),this._modifyMessageExtensions(a,y,b).then(function(me){var _e=me.resultList,we=me.successCount,Ue=me.failureCount,Ve="";return b===2&&(Ve="success count:".concat(we," fail count:").concat(Ue)),Q.setMoreMessage("".concat(Ve)).end(),U.l("".concat(m," ok. ").concat(Ve)),gt({extensions:_e})}).catch(function(me){return h.probeNetwork().then(function(_e){var we=A(_e,2),Ue=we[0],Ve=we[1];Q.setError(me,Ue,Ve).end()}),U.e("".concat(m," failed. error:"),me),Me(me)})}},{key:"_modifyMessageExtensions",value:function(a,c){var h=this,m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,y=oo(a.to)?T.CONV_TOPIC:a.conversationType,b=void 0;m!==3&&(b=this._getRequestExtensions(a,c));var C=null;switch(y){case T.CONV_C2C:C=this.getModule(ao);break;case T.CONV_GROUP:C=this.getModule(Tt);break;case T.CONV_TOPIC:C=this.getModule(ur);break;default:return Me({code:Le.CANNOT_FIND_MODULE})}return C.modifyMessageExtensions(a,b,m).then(function(E){var N=E.data,F=N.extensions,z=N.seq,Q=[],me=0,_e=0,we=[];return(F=Ye(F)?[]:F).forEach(function(Ue){var Ve=Ue.errorCode,ot=Ue.extension,vt=ot.key,Ut=ot.value,mn=ot.seq;Q.push({code:Ve,key:vt,value:Ut}),Ve===0?me++:_e++,we.push({key:vt,value:Ut,seq:mn})}),h._updateGlobalSequence(a.ID,z),we.length>0&&(h._updateLocalExtension(a.ID,we),we=null),{resultList:Q,successCount:me,failureCount:_e}}).catch(function(E){return Me(E)})}},{key:"_getRequestExtensions",value:function(a,c){var h=[];if(this._hasLocalExtension(a.ID)){var m=this._getLocalExtension(a.ID);return c.forEach(function(y){var b=y.key,C=y.value,E=0;m.has(b)&&(E=m.get(b).seq),h.push({key:b,value:C,seq:E})}),h}return c.forEach(function(y){var b=y.key,C=y.value;h.push({key:b,value:C,seq:0})}),h}},{key:"_getMessageExtensions",value:function(a,c){var h=this,m="".concat(this._n,"._getMessageExtensions"),y=a.ID,b=a.to,C=null;switch(oo(b)?T.CONV_TOPIC:a.conversationType){case T.CONV_C2C:C=this.getModule(ao);break;case T.CONV_GROUP:C=this.getModule(Tt);break;case T.CONV_TOPIC:C=this.getModule(ur);break;default:return Me({code:Le.CANNOT_FIND_MODULE})}return C.getMessageExtensions(a,c).then(function(E){var N=E.data,F=N.extensions,z=N.completeFlag,Q=N.globalSequence,me=N.clearSequence;if(F=Ye(F)?[]:F,U.l("".concat(m," ok. completeFlag:").concat(z," globalSequence:").concat(Q," clearSequence:").concat(me," count:").concat(F.length)),h._updateLocalExtension(y,F),h._clearLocalExtension(y,me),h._updateGlobalSequence(y,Q),z!==1){var _e=F.slice(-1)[0].seq+1;return h._getMessageExtensions(a,_e)}return h._getLocalExtensions(y)}).catch(function(E){return Me(E)})}},{key:"_hasLocalExtension",value:function(a){return this.messageExtensionMap.has(a)}},{key:"_getLocalExtension",value:function(a){return this.messageExtensionMap.get(a)}},{key:"_updateLocalExtension",value:function(a,c){this._hasLocalExtension(a)||this.messageExtensionMap.set(a,new Map);var h=this._getLocalExtension(a);c.forEach(function(m){var y=m.key,b=m.value,C=b===void 0?"":b,E=m.seq;h.set(y,{value:C,seq:E})})}},{key:"_clearLocalExtension",value:function(a,c){if(!(c<=0)&&this._hasLocalExtension(a)){var h=this._getLocalExtension(a);h.forEach(function(m,y){m.seq<=c&&h.delete(y)})}}},{key:"_getLocalExtensions",value:function(a){var c=[];return this._hasLocalExtension(a)&&this._getLocalExtension(a).forEach(function(h,m){var y=h.value;Ye(y)||c.push({key:m,value:y})}),c}},{key:"_getGlobalSequence",value:function(a){return this.globalSeqMap.get(a)}},{key:"_updateGlobalSequence",value:function(a,c){this.globalSeqMap.set(a,c)}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this.messageExtensionMap.clear(),this.globalSeqMap.clear(),this.getMessageExtensionsMap.clear()}}]),p}(Er),h8=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="ComboMessageModule",c}return u(p,[{key:"sendMessage",value:function(a){var c=this,h=this._constructMessageInstance(a);if(h===null)return Me({code:Le.MSG_SEND_FAIL});this._addSendMessageTotalCount(h);var m=Date.now();return this.getModule(dt).setMessageRandom(h),this._sendComboMessage(h,a).then(function(y){var b=y.data,C=b.time,E=b.sequence,N=b.readReceiptCode;un(N)&&N!==0&&(new We("sendMessageWithReceipt").setMessage("from:".concat(h.from," to:").concat(h.to," sequence:").concat(E," readReceiptCode:").concat(N)).end(),U.w("".concat(c._n,".sendMessage readReceiptCode:").concat(N," message:").concat(c.getErrorMessage(N)))),c._addSendMessageSuccessCount(h,m);var F=c.getModule(dt);h.status=so.SUCCESS,h.time=C,h.conversationType===T.CONV_GROUP&&(h.sequence=E),F.appendToMessageList(h);var z=h;return h._isExcludedFromLastMessage===!0&&(z=""),F.onMessageSent({conversationOptionsList:[{conversationID:h.conversationID,unreadCount:0,type:h.conversationType,subType:h.conversationSubType,lastMessage:z}]}),gt({message:h})}).catch(function(y){return c._onSendMessageFailed(h,y)})}},{key:"_sendComboMessage",value:function(a,c){var h=this._m.getModule(Fi),m="";return a.conversationType===T.CONV_C2C&&(m="".concat(ue.NAME.OPEN_IM,".").concat(wp)),a.conversationType===T.CONV_GROUP&&(m="".concat(ue.NAME.GROUP,".").concat(Sp)),h.sendComboMessage({servcmd:m,data:c})}},{key:"_constructMessageInstance",value:function(a){var c="".concat(this._n,"._constructMessageInstance"),h=null;try{var m=this.getMyUserID(),y={};if(y.senderTinyID=this.getMyTinyID(),y.currentUser=m,y.from=a.From_Account||m,a.GroupId?(y.conversationID="".concat(T.CONV_GROUP).concat(a.GroupId),y.conversationType=T.CONV_GROUP,y.to=a.GroupId):a.To_Account&&(y.conversationID="".concat(T.CONV_C2C).concat(a.To_Account),y.conversationType=T.CONV_C2C,y.to=a.To_Account),y.time=a.MsgTimeStamp||0,y.random=a.Random||a.MsgRandom||0,y.priority=a.MsgPriority,At(a.CloudCustomData)&&a.CloudCustomData.length>0&&(y.cloudCustomData=a.CloudCustomData),st(a.SendMsgControl)&&(y.messageControlInfo={},a.SendMsgControl.includes("NoUnread")&&(y.messageControlInfo.excludedFromUnreadCount=1),a.SendMsgControl.includes("NoLastMsg")&&(y.messageControlInfo.excludedFromLastMessage=1)),y.conversationType===T.CONV_GROUP&&st(a.To_Account)&&a.To_Account.length>0){var b=a.To_Account;a.To_Account.length>50&&(b=a.To_Account.slice(0,50),U.w("".concat(c," To_Account must be less than or equal to 50."))),y.receiverList=O(b),a.To_Account=O(b)}a.IsNeedReadReceipt!==1&&a.NeedReadReceipt!==1||(y.needReadReceipt=!0),a.SupportMessageExtension===1&&(y.isSupportExtension=!0),(h=new qr(y)).status=so.UNSEND,a.MsgClientTime=h.clientTime,h.conversationType===T.CONV_C2C&&(a.MsgSeq=h.sequence);for(var C,E=a.MsgBody.length,N=0;N100)return p--,c;if(st(c)){var m=c.map(function(N){return es(N)?a(N,h):N});return p--,m}if(es(c)){var y=(b=c,C=function(N,F){if(!Cd(F))return!1;if((Q=F)!==_1(Q))for(var z=0;z65535)return M1(240|l>>>18,128|l>>>12&63,128|l>>>6&63,128|63&l)}else l=65533}else l<=57343&&(l=65533);return l<=2047?M1(192|l>>>6,128|63&l):M1(224|l>>>12,128|l>>>6&63,128|63&l)},I1=function(D){for(var l=D===void 0?"":(""+D).replace(/[\x80-\uD7ff\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g,_8),p=0|l.length,a=new Uint8Array(p),c=0;c0)for(var b=0;b=m&&(U.l("".concat(l._n,"._checkPromiseMap request timeout, delete requestID:").concat(a)),l._promiseMap.delete(a),c(new Fn({code:Le.NETWORK_TIMEOUT})),l._channelModule.onRequestTimeout(a))})}},{key:"onOpen",value:function(l){if(this._readyState!==""){this._onOpenTs=Date.now();var p=l.id;this._socketID=p;var a=Date.now()-this._startTs;U.l("".concat(this._n,"._onOpen cost ").concat(a," ms. socketID:").concat(p)),new We("wsOnOpen").setMessage(a).setCostTime(a).setMoreMessage("socketID:".concat(p)).end(),l.id===this._socketID&&(this._readyState=Pp,this._reConnectCount=0,this._resend(),this._reConnectFlag===!0&&(this._channelModule.onReconnected(),this._reConnectFlag=!1),this._channelModule.onOpen())}}},{key:"onClose",value:function(l){var p=new We("wsOnClose"),a=l.id,c=l.e,h="sourceSocketID:".concat(a," currentSocketID:").concat(this._socketID," code:").concat(c.code," reason:").concat(c.reason),m=0;this._onOpenTs!==0&&(m=Date.now()-this._onOpenTs),p.setMessage(m).setCostTime(m).setMoreMessage(h).setCode(c.code).end(),U.l("".concat(this._n,"._onClose ").concat(h," onlineTime:").concat(m)),a===this._socketID&&(this._readyState=dm,m<1e3?this._channelModule.onReconnectFailed():this._channelModule.onClose())}},{key:"onError",value:function(l){var p=l.id,a=l.e,c="sourceSocketID:".concat(p," currentSocketID:").concat(this._socketID);new We("wsOnError").setMessage(a.errMsg||wl(a)).setMoreMessage(c).setLevel("error").end(),U.w("".concat(this._n,"._onError"),a,c),p===this._socketID&&(this._readyState="",this._channelModule.onError())}},{key:"onMessage",value:function(l){var p;try{p=JSON.parse(l.data)}catch{new We("jsonParseError").setMessage(l.data).end()}if(p&&p.head){var a=this._getRequestIDFromHead(p.head),c=p.body;if(!this._isTRTCCommand(a)){var h=fp(p.head);c=b1(p.body,this._getResponseKeyMap(h))}if(U.d("".concat(this._n,".onMessage ret:").concat(JSON.stringify(c)," requestID:").concat(a," has:").concat(this._promiseMap.has(a))),this._setNextPingTs(),this._promiseMap.has(a)){var m=this._promiseMap.get(a),y=m.resolve,b=m.reject,C=m.timestamp;return this._promiseMap.delete(a),this._calcRTT(C),void(c.errorCode&&c.errorCode!==0?(this._channelModule.onErrorCodeNotZero(c),b(new Fn({code:c.errorCode,message:c.errorInfo||"",data:a.includes(xg)||a.includes(Vg)?{elements:c.elements,messageVersion:c.messageVersion,cloudCustomData:c.cloudCustomData}:void 0}))):y(gt(c)))}this._channelModule.onMessage({head:p.head,body:c})}}},{key:"_isTRTCCommand",value:function(l){for(var p=this._channelModule.getModule(D0).getCommandList(),a=!1,c=0;c0&&this._promiseMap.forEach(function(y,b){var C=y.uplinkData,E=y.resolve,N=y.reject;l._promiseMap.set(b,{resolve:E,reject:N,timestamp:Date.now(),uplinkData:C}),l._execute(b,C)}),this._simpleRequestMap.size>0){var p,a=$(this._simpleRequestMap);try{for(a.s();!(p=a.n()).done;){var c=A(p.value,2),h=c[0],m=c[1];this._execute(h,m)}}catch(y){a.e(y)}finally{a.f()}this._simpleRequestMap.clear()}}},{key:"send",value:function(l){var p=this;l.head.seq=this._getSequence(),l.head.reqtime=Math.floor(Date.now()/1e3),l.keyMap;var a=k(l,C8),c=this._getRequestIDFromHead(l.head),h=JSON.stringify(a);return new Promise(function(m,y){p._promiseMap.set(c,{resolve:m,reject:y,timestamp:Date.now(),uplinkData:h}),U.d("".concat(p._n,".send uplinkData:").concat(JSON.stringify(a)," requestID:").concat(c," readyState:").concat(p._readyState)),p._readyState!==Pp?p._reConnect():(p._execute(c,h),p._channelModule.getModule(qo).addRequestCount())})}},{key:"simplySend",value:function(l){l.head.seq=this._getSequence(),l.head.reqtime=Math.floor(Date.now()/1e3),l.keyMap;var p=k(l,T8),a=this._getRequestIDFromHead(l.head),c=JSON.stringify(p);this._readyState!==Pp?(this._simpleRequestMap.size0&&(clearInterval(this._timerForNotLoggedIn),this._timerForNotLoggedIn=-1),this._socketHandler.onCheckTimer(a)):this._socketHandler.onCheckTimer(1),this._checkNextPing())}},{key:"onErrorCodeNotZero",value:function(a){this.getModule(Fi).onErrorCodeNotZero(a)}},{key:"onMessage",value:function(a){this.getModule(Fi).onMessage(a)}},{key:"send",value:function(a){return this._socketHandler?this._previousState!==T.NET_STATE_CONNECTED&&a.head.servcmd.includes(Ap)?(this.reConnect(),this._sendLogViaHTTP(a)):this._socketHandler.send(a):Promise.reject()}},{key:"_sendLogViaHTTP",value:function(a){var c=ue.HOST.CURRENT.STAT;return new Promise(function(h,m){var y="".concat(c,"/v4/imopenstat/tim_web_report_v2?sdkappid=").concat(a.head.sdkappid,"&reqtime=").concat(Date.now()),b=JSON.stringify(a.body),C="application/x-www-form-urlencoded;charset=UTF-8";if(je)Fe.request({url:y,data:b,method:"POST",timeout:3e3,header:{"content-type":C},success:function(){h()},fail:function(){m(new Fn({code:Le.NETWORK_ERROR}))}});else{var E=new XMLHttpRequest,N=setTimeout(function(){E.abort(),m(new Fn({code:Le.NETWORK_TIMEOUT}))},3e3);E.onreadystatechange=function(){E.readyState===4&&(clearTimeout(N),E.status===200||E.status===304?h():m(new Fn({code:Le.NETWORK_ERROR})))},E.open("POST",y,!0),E.setRequestHeader("Content-type",C),E.send(b)}})}},{key:"simplySend",value:function(a){return this._socketHandler?this._socketHandler.simplySend(a):Promise.reject()}},{key:"onOpen",value:function(){this._ping()}},{key:"onClose",value:function(){this._socketHandler&&this._socketHandler.getReconnectFlag()&&this._emitNetStateChangeEvent(T.NET_STATE_DISCONNECTED),this.reConnect()}},{key:"onError",value:function(){je&&!ye&&this.outputWarning("DomainNameInMP"),this._emitNetStateChangeEvent(T.NET_STATE_DISCONNECTED)}},{key:"getKeyMap",value:function(a){return this.getModule(Fi).getKeyMap(a)}},{key:"_onAppHide",value:function(){this._isAppShowing=!1}},{key:"_onAppShow",value:function(){this._isAppShowing=!0}},{key:"onRequestTimeout",value:function(a){}},{key:"onReconnected",value:function(){U.l("".concat(this._n,".onReconnected")),this._m.restartTimer(),this.getModule(Fi).onReconnected(),this._emitNetStateChangeEvent(T.NET_STATE_CONNECTED)}},{key:"onReconnectFailed",value:function(){U.l("".concat(this._n,".onReconnectFailed")),this._emitNetStateChangeEvent(T.NET_STATE_DISCONNECTED)}},{key:"setIsWorkerEnabled",value:function(a){this._socketHandler&&this._socketHandler.setIsWorkerEnabled(!1)}},{key:"offline",value:function(){this._emitNetStateChangeEvent(T.NET_STATE_DISCONNECTED)}},{key:"reConnect",value:function(){var a=arguments.length>0&&arguments[0]!==void 0&&arguments[0],c=!1;this._socketHandler&&(c=this._socketHandler.getReconnectFlag());var h="forcedFlag:".concat(a," fatalErrorFlag:").concat(this._fatalErrorFlag," previousState:").concat(this._previousState," reconnectFlag:").concat(c);if(U.l("".concat(this._n,".reConnect ").concat(h)),!this._fatalErrorFlag&&this._socketHandler){if(a===!0)this._socketHandler.forcedReconnect();else{if(this._previousState===T.NET_STATE_CONNECTING&&c)return;this._socketHandler.forcedReconnect()}this._emitNetStateChangeEvent(T.NET_STATE_CONNECTING)}}},{key:"_emitNetStateChangeEvent",value:function(a){this._previousState!==a&&(U.l("".concat(this._n,"._emitNetStateChangeEvent from ").concat(this._previousState," to ").concat(a)),this._previousState=a,this.emitOuterEvent(R.NET_STATE_CHANGE,{state:a}))}},{key:"_ping",value:function(){var a=this;if(this._probing!==!0){this._probing=!0;var c=this.getModule(Fi).getProtocolData({protocolName:G_});this.send(c).then(function(){a._probing=!1}).catch(function(h){if(U.w("".concat(a._n,"._ping failed. error:"),h),a._probing=!1,h&&h.code===60002)return new We("error").setMessage("code:".concat(h.code," message:").concat(h.message)).setNetworkType(a.getModule(Va).getNetworkType()).end(),a._fatalErrorFlag=!0,void a._emitNetStateChangeEvent(T.NET_STATE_DISCONNECTED);a.probeNetwork().then(function(m){var y=A(m,2),b=y[0],C=y[1];U.l("".concat(a._n,"._ping failed. probe network, isAppShowing:").concat(a._isAppShowing," online:").concat(b," networkType:").concat(C)),b?a.reConnect():a._emitNetStateChangeEvent(T.NET_STATE_DISCONNECTED)})})}}},{key:"_checkNextPing",value:function(){this._socketHandler&&this._socketHandler.isConnected()&&Date.now()>=this._socketHandler.getNextPingTs()&&this._ping()}},{key:"dealloc",value:function(){this._socketHandler&&(this._socketHandler.close(),this._socketHandler=null),this._timerForNotLoggedIn>-1&&clearInterval(this._timerForNotLoggedIn)}},{key:"onRestApiKickedOut",value:function(){this._socketHandler&&(this._socketHandler.close(),this.reConnect(!0))}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._previousState=T.NET_STATE_CONNECTED,this._probing=!1,this._fatalErrorFlag=!1,this._timerForNotLoggedIn=setInterval(this.onCheckTimer.bind(this),1e3)}}]),p}(Er),k8=["a2","tinyid"],D8=["a2","tinyid"],E8=function(){function D(l){i(this,D),this._n="ProtocolHandler",this._sessionModule=l,this._configMap=new Map,this._fillConfigMap()}return u(D,[{key:"_fillConfigMap",value:function(){this._configMap.clear();var l=this._sessionModule.genCommonHead(),p=this._sessionModule.genCosSpecifiedHead(),a=this._sessionModule.genSSOReportHead();this._configMap.set(Tp,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STATUS,".").concat(Tp)}),body:{state:"Online",isWebUniapp:0,deviceBrand:0},keyMap:{request:{deviceBrand:"InstType"},response:{InstId:"instanceID",HelloInterval:"helloInterval"}}}}(l)),this._configMap.set(E0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STATUS,".").concat(E0)}),body:{type:0},keyMap:{request:{type:"wslogout_type"}}}}(l)),this._configMap.set(A0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STATUS,".").concat(A0)}),body:{isWebUniapp:0},keyMap:{response:{NewInstInfo:"newInstanceInfo"}}}}(l)),this._configMap.set(L0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.STAT_SERVICE,".").concat(L0)}),body:{}}}(l)),this._configMap.set(U_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_COS_SIGN,".").concat(U_)}),body:{cmd:"open_im_cos_svc",subCmd:"get_cos_token",duration:300,version:2},keyMap:{request:{userSig:"usersig",subCmd:"sub_cmd",cmd:"cmd",duration:"duration",version:"version"},response:{expired_time:"expiredTime",bucket_name:"bucketName",session_token:"sessionToken",tmp_secret_id:"secretId",tmp_secret_key:"secretKey"}}}}(p)),this._configMap.set(F_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.CUSTOM_UPLOAD,".").concat(F_)}),body:{fileType:void 0,fileName:void 0,uploadMethod:0,duration:900},keyMap:{request:{userSig:"usersig",fileType:"file_type",fileName:"file_name",uploadMethod:"upload_method"},response:{expired_time:"expiredTime",request_id:"requestId",head_url:"headUrl",upload_url:"uploadUrl",download_url:"downloadUrl",ci_url:"ciUrl",snapshot_url:"requestSnapshotUrl"}}}}(p)),this._configMap.set($_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.CUSTOM_UPLOAD,".").concat($_)}),body:{version:1,platform:void 0,coverName:void 0,requestSnapshotUrl:void 0},keyMap:{request:{version:"version",platform:"platform",coverName:"cover_name",requestSnapshotUrl:"snapshot_url"},response:{error_code:"errorCode",error_msg:"errorInfo",download_url:"snapshotUrl"}}}}(p)),this._configMap.set(z_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_CONFIG_MANAGER,".").concat(z_)}),body:{SDKAppID:0},keyMap:{request:{SDKAppID:"uint32_sdkappid"},response:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_purchase_bits:"purchaseBits",uint32_expired_time:"expiredTime"}}}}(l)),this._configMap.set(j_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_CONFIG_MANAGER,".").concat(j_)}),body:{},keyMap:{response:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_purchase_bits:"purchaseBits",uint32_expired_time:"expiredTime"}}}}(l)),this._configMap.set(q_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_CONFIG_MANAGER,".").concat(q_)}),body:{SDKAppID:0,version:0},keyMap:{request:{SDKAppID:"uint32_sdkappid",version:"uint64_version"},response:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_json_config:"cloudControlConfig",uint32_expired_time:"expiredTime",uint32_sdkappid:"SDKAppID",uint64_version:"version"}}}}(l)),this._configMap.set(V_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_CONFIG_MANAGER,".").concat(V_)}),body:{},keyMap:{response:{int32_error_code:"errorCode",str_error_message:"errorMessage",str_json_config:"cloudControlConfig",uint32_expired_time:"expiredTime",uint32_sdkappid:"SDKAppID",uint64_version:"version"}}}}(l)),this._configMap.set(W_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OVERLOAD_PUSH,".").concat(W_)}),body:{},keyMap:{response:{OverLoadServCmd:"overloadCommand",DelaySecs:"waitingTime"}}}}(l)),this._configMap.set(O0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(O0)}),body:{cookie:"",syncFlag:0,needAbstract:1,isOnlineSync:0,needSignaling:1},keyMap:{request:{fromAccount:"From_Account",toAccount:"To_Account",from:"From_Account",to:"To_Account",time:"MsgTimeStamp",sequence:"MsgSeq",random:"MsgRandom",elements:"MsgBody"},response:{MsgList:"messageList",SyncFlag:"syncFlag",To_Account:"to",From_Account:"from",ClientSeq:"clientSequence",MsgSeq:"sequence",NoticeSeq:"noticeSequence",NotifySeq:"notifySequence",MsgRandom:"random",MsgTimeStamp:"time",MsgContent:"content",ToGroupId:"to",MsgKey:"messageKey",GroupTips:"groupTips",MsgBody:"elements",MsgType:"type",C2CRemainingUnreadCount:"C2CRemainingUnreadList",C2CPairUnreadCount:"C2CPairUnreadList"}}}}(l)),this._configMap.set(t1,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_MSG_AUDIT_MGR,".").concat(t1)}),body:{version:0,deviceID:"",startIndex:void 0},keyMap:{request:{version:"uint64_version",deviceID:"str_device_id",startIndex:"uint64_start_index"},response:{msg_cmd_error_code:"errorInfo",str_err_msg:"errorMessage",uint32_code:"errorCode",msg_scene_ctl_config:"filterConfig",uint64_c2c_custom_msg_flag:"c2c_custom_message",uint64_c2c_text_msg_flag:"c2c_text_message",uint64_group_custom_msg_flag:"group_custom_message",uint64_group_text_msg_flag:"group_text_message",uint64_group_info_flag:"group_profile",uint64_group_member_info_flag:"group_member_profile",uint64_relation_chain_flag:"sns",uint64_user_info_flag:"user_profile",rpt_msg_dirty_word:"lexicon",str_dirty_word:"profanity",str_replaced_content:"replacement",uint64_filter_type:"filterType",uint64_id:"id",uint64_word_type:"profanityType",uint64_complete_flag:"completeFlag",uint64_next_start_index:"nextStartIndex",uint64_version:"version",uint64_expired_time:"expiredTime"}}}}(l)),this._configMap.set(wp,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(wp)}),body:{fromAccount:"",toAccount:"",msgSeq:0,msgRandom:0,msgBody:[],cloudCustomData:void 0,nick:"",avatar:"",msgLifeTime:void 0,offlinePushInfo:{pushFlag:0,title:"",desc:"",ext:"",apnsInfo:{badgeMode:0,isVoipPush:void 0},androidInfo:{OPPOChannelID:""}},messageControlInfo:void 0,clientTime:void 0,needReadReceipt:0,isSupportExtension:0},keyMap:{request:{fromAccount:"From_Account",toAccount:"To_Account",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom",msgBody:"MsgBody",count:"MaxCnt",lastMessageTime:"LastMsgTime",messageKey:"MsgKey",peerAccount:"Peer_Account",data:"Data",description:"Desc",extension:"Ext",type:"MsgType",content:"MsgContent",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",nick:"From_AccountNick",avatar:"From_AccountHeadurl",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",elements:"MsgBody",clientSequence:"ClientSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody",needReadReceipt:"IsNeedReadReceipt"}}}}(l)),this._configMap.set(Sp,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(Sp)}),body:{fromAccount:"",groupID:"",random:0,clientSequence:0,priority:"",msgBody:[],cloudCustomData:void 0,onlineOnlyFlag:0,offlinePushInfo:{pushFlag:0,title:"",desc:"",ext:"",apnsInfo:{badgeMode:0,isVoipPush:void 0},androidInfo:{OPPOChannelID:""}},groupAtInfo:[],messageControlInfo:void 0,clientTime:void 0,needReadReceipt:0,topicID:void 0,receiverList:void 0,isSupportExtension:0},keyMap:{request:{to:"GroupId",extension:"Ext",data:"Data",description:"Desc",random:"Random",sequence:"ReqMsgSeq",count:"ReqMsgNumber",type:"MsgType",priority:"MsgPriority",content:"MsgContent",elements:"MsgBody",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",clientSequence:"ClientSeq",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody",needReadReceipt:"NeedReadReceipt",receiverList:"To_Account"},response:{MsgTime:"time",MsgSeq:"sequence"}}}}(l)),this._configMap.set(J0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(J0)}),body:{msgInfo:{fromAccount:"",toAccount:"",msgTimeStamp:0,msgSeq:0,msgRandom:0}},keyMap:{request:{msgInfo:"MsgInfo",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom"}}}}(l)),this._configMap.set(b_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(b_)}),body:{groupID:"",msgSeqList:void 0,topicID:""},keyMap:{request:{msgSeqList:"MsgSeqList",msgSeq:"MsgSeq"}}}}(l)),this._configMap.set(Dp,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(Dp)}),body:{peerAccount:"",count:15,lastMessageTime:0,messageKey:"",withRecalledMessage:1,direction:0},keyMap:{request:{messageKey:"MsgKey",peerAccount:"Peer_Account",count:"MaxCnt",lastMessageTime:"LastMsgTime",withRecalledMessage:"WithRecalledMsg",direction:"GetDirection"},response:{LastMsgTime:"lastMessageTime",IsNeedReadReceipt:"needReadReceipt",IsPeerRead:"readReceiptSentByPeer"}}}}(l)),this._configMap.set(xg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(xg)}),body:{from:"",to:"",sequence:0,random:0,time:0,version:0,elements:void 0,cloudCustomData:void 0},keyMap:{request:{sequence:"MsgSeq",random:"MsgRandom",time:"MsgTime",version:"MsgVersion",type:"MsgType",content:"MsgContent"}}}}(l)),this._configMap.set(Ep,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(Ep)}),body:{withRecalledMsg:1,groupID:"",count:15,sequence:"",topicID:void 0},keyMap:{request:{sequence:"ReqMsgSeq",count:"ReqMsgNumber",withRecalledMessage:"WithRecalledMsg"},response:{Random:"random",MsgTime:"time",MsgSeq:"sequence",ReqMsgSeq:"sequence",RspMsgList:"messageList",IsSystemMsg:"isSystemMessage",ToGroupId:"to",EnumFrom_AccountType:"fromAccountType",EnumTo_AccountType:"toAccountType",GroupCode:"groupCode",MsgPriority:"priority",MsgBody:"elements",MsgType:"type",MsgContent:"content",IsFinished:"complete",Download_Flag:"downloadFlag",ClientSeq:"clientSequence",ThumbUUID:"thumbUUID",VideoUUID:"videoUUID",ToTopicId:"topicID",InvisibleMsgSeq:"invisibleSequenceList"}}}}(l)),this._configMap.set(X0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(X0)}),body:{C2CMsgReaded:void 0},keyMap:{request:{lastMessageTime:"LastedMsgTime"}}}}(l)),this._configMap.set(Z0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(Z0)}),body:{userIDList:void 0,muteFlag:0},keyMap:{request:{userIDList:"Peer_Account",muteFlag:"Mute_Notifications"}}}}(l)),this._configMap.set(Q0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(Q0)}),body:{toAccount:void 0,userIDList:void 0},keyMap:{request:{userIDList:"Peer_Account"},response:{MuteNotificationsList:"muteFlagList"}}}}(l)),this._configMap.set(M_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(M_)}),body:{groupID:void 0,messageReadSeq:void 0,topicID:void 0},keyMap:{request:{messageReadSeq:"MsgReadedSeq"}}}}(l)),this._configMap.set(Bg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(Bg)}),body:{readAllC2CMessage:0,groupMessageReadInfoList:[]},keyMap:{request:{readAllC2CMessage:"C2CReadAllMsg",groupMessageReadInfoList:"GroupReadInfo",messageSequence:"MsgSeq"},response:{C2CReadAllMsg:"readAllC2CMessage",GroupReadInfoArray:"groupMessageReadInfoList"}}}}(l)),this._configMap.set(t_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(t_)}),body:{fromAccount:"",to:"",keyList:void 0},keyMap:{request:{keyList:"MsgKeyList"}}}}(l)),this._configMap.set(D_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(D_)}),body:{groupID:"",deleter:"",keyList:void 0,topicID:void 0},keyMap:{request:{deleter:"Deleter_Account",keyList:"Seqs"}}}}(l)),this._configMap.set(n1,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_TRANSLATE,".").concat(n1)}),body:{sourceTextList:void 0,SDKAppID:0,from:0,source:"",target:""},keyMap:{request:{sourceTextList:"SourceText",SDKAppID:"SdkAppId",from:"FromAccount"},response:{TargetText:"translatedTextList",RequestId:"requestID",CmdErrorCode:"error",ErrorCode:"code",ErrorInfo:"message"}}}}(l)),this._configMap.set(Vg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(Vg)}),body:{groupID:"",topicID:void 0,sequence:0,version:0,elements:void 0,cloudCustomData:void 0},keyMap:{request:{sequence:"MsgSeq",version:"MsgVersion",type:"MsgType",content:"MsgContent"}}}}(l)),this._configMap.set(I_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(I_)}),body:{groupID:"",sequenceList:void 0},keyMap:{request:{sequence:"MsgSeq"}}}}(l)),this._configMap.set(T_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(T_)}),body:{peerAccount:"",messageInfoList:void 0},keyMap:{request:{peerAccount:"Peer_Account",messageInfoList:"C2CMsgInfo",fromAccount:"From_Account",toAccount:"To_Account",sequence:"MsgSeq",random:"MsgRandom",time:"MsgTime",clientTime:"MsgClientTime"}}}}(l)),this._configMap.set(C_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(C_)}),body:{groupID:"",sequenceList:void 0},keyMap:{request:{sequenceList:"MsgSeqList",sequence:"MsgSeq"}}}}(l)),this._configMap.set(w_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(w_)}),body:{groupID:"",sequence:void 0,flag:0,cursor:0,count:0},keyMap:{request:{sequence:"MsgSeq",count:"Num"},response:{ReadList:"readUserIDList",Read_Account:"userID",UnreadList:"unreadUserIDList",Unread_Account:"userID",IsFinish:"isCompleted"}}}}(l)),this._configMap.set(n_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM_MSG_EXT,".").concat(n_)}),body:{from:void 0,to:void 0,messageKey:void 0,operateType:void 0,extensionList:void 0}}}(l)),this._configMap.set(r_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM_MSG_EXT,".").concat(r_)}),body:{from:void 0,to:void 0,messageKey:void 0,startSequence:void 0}}}(l)),this._configMap.set(Jg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM_MSG_EXT,".").concat(Jg)}),body:{groupID:void 0,topicID:void 0,messageSequence:void 0,operateType:void 0,extensionList:void 0}}}(l)),this._configMap.set(Xg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM_MSG_EXT,".").concat(Xg)}),body:{groupID:void 0,topicID:void 0,messageSequence:void 0,startSequence:void 0}}}(l)),this._configMap.set(tm,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.MESSAGE_SEARCH,".").concat(tm)}),body:{keywordList:void 0,keywordListMatchType:"or",account:void 0,groupID:void 0,count:100,cursor:void 0,messageTypeList:void 0,senderUserIDList:void 0,startTime:void 0,endTime:void 0},keyMap:{request:{keywordListMatchType:"MatchType",account:"PeerAccount",groupID:"GroupID",messageTypeList:"MsgTypeList",senderUserIDList:"SendUserIDList"},response:{GroupID:"groupID",UserID:"userID",Count:"messageCount",LastMsgTime:"lastMessageTime",ConversationMsgs:"searchResult",IsNeedReadReceipt:"needReadReceipt",IsPeerRead:"readReceiptSentByPeer",MsgSeq:"sequence",ReqMsgSeq:"sequence",IsSystemMsg:"isSystemMessage",ToGroupId:"to",EnumFrom_AccountType:"fromAccountType",EnumTo_AccountType:"toAccountType",GroupCode:"groupCode",MsgContent:"content",ClientSeq:"clientSequence",ToTopicId:"topicID",InvisibleMsgSeq:"invisibleSequenceList"}}}}(l)),this._configMap.set(e_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(e_)}),body:{userIDList:void 0},keyMap:{request:{userIDList:"To_Account"},response:{ReadTime:"peerReadTimeList"}}}}(l)),this._configMap.set(o_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(o_)}),body:{fromAccount:void 0,timeStamp:void 0,startIndex:void 0,pinnedTimeStamp:void 0,pinnedStartIndex:void 0,orderType:void 0,messageAssistFlag:15,assistFlag:31},keyMap:{request:{messageAssistFlag:"MsgAssistFlags",assistFlag:"AssistFlags",pinnedTimeStamp:"TopTimeStamp",pinnedStartIndex:"TopStartIndex"},response:{SessionItem:"conversations",ToAccount:"groupID",To_Account:"userID",UnreadMsgCount:"unreadCount",MsgGroupReadedSeq:"messageReadSeq",C2cPeerReadTime:"c2cPeerReadTime",LastMsgFlags:"lastMessageFlag",TopFlags:"isPinned",TopTimeStamp:"pinnedTimeStamp",TopStartIndex:"pinnedStartIndex",GroupId:"convGroupID",C2cRemark:"friendRemark",MsgRecvOption:"messageRemindType",GroupIgnoredUnreadSeqCount:"noUnreadCount",GroupNextMsgSeq:"nextMessageSeq"}}}}(l)),this._configMap.set(i_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(i_)}),body:{fromAccount:"",conversationList:void 0,clearHistoryMessage:void 0},keyMap:{request:{toGroupID:"ToGroupid",clearHistoryMessage:"ClearRamble",conversationList:"ContactItem"},response:{ResultItem:"resultList",ToGroupid:"groupID",ResultCode:"code",ResultInfo:"info"}}}}(l)),this._configMap.set(s_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(s_)}),body:{fromAccount:"",toAccount:void 0,type:1,toGroupID:void 0},keyMap:{request:{toGroupID:"ToGroupid"}}}}(l)),this._configMap.set(a_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(a_)}),body:{fromAccount:"",operationType:1,itemList:void 0},keyMap:{request:{itemList:"RecentContactItem"}}}}(l)),this._configMap.set(l_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(l_)}),body:{messageListToDelete:void 0},keyMap:{request:{messageListToDelete:"DelMsgList",messageSeq:"MsgSeq",messageRandom:"MsgRandom"}}}}(l)),this._configMap.set(ww,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(Ug)}),body:{fromAccount:"",itemList:void 0},keyMap:{request:{itemList:"MarkItem",operationType:"OptType",groupID:"ToGroupId"},response:{ToGroupId:"groupID",OptType:"operationType"}}}}(l)),this._configMap.set(Ug,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(Ug)}),body:{fromAccount:"",itemList:void 0},keyMap:{request:{itemList:"MarkItem",operationType:"OptType",groupID:"ToGroupId"},response:{ToGroupId:"groupID",OptType:"operationType"}}}}(l)),this._configMap.set(Sw,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(Ed)}),body:{fromAccount:"",itemList:void 0},keyMap:{request:{itemList:"GroupContactItem",groupID:"ToGroupId"},response:{GroupId:"convGroupID",ToGroupId:"groupID",OptType:"operationType"}}}}(l)),this._configMap.set(u_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(u_)}),body:{fromAccount:"",groupName:void 0},keyMap:{request:{},response:{GroupId:"convGroupID"}}}}(l)),this._configMap.set(Ed,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(Ed)}),body:{fromAccount:"",updateType:void 0,updateGroup:void 0},keyMap:{request:{oldName:"OldGroupName",newName:"NewGroupName",groupID:"ToGroupId",operationType:"ContactOptType",groupName:"OldGroupName",updateItem:"ContactUpdateItem"},response:{ContactOptType:"operationType",ToGroupId:"groupID",GroupId:"convGroupID"}}}}(l)),this._configMap.set(kw,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(Ed)}),body:{fromAccount:"",updateType:void 0,updateGroup:{groupName:void 0,updateGroupType:void 0,updateItem:void 0}},keyMap:{request:{},response:{}}}}(l)),this._configMap.set(Dw,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(Ed)}),body:{fromAccount:"",updateType:void 0,updateGroup:void 0},keyMap:{request:{},response:{}}}}(l)),this._configMap.set(c_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.RECENT_CONTACT,".").concat(c_)}),body:{fromAccount:"",startTime:void 0,startIndex:void 0},keyMap:{request:{},response:{GroupId:"convGroupID",ToGroupId:"groupID",OptType:"operationType",CustomMark:"customData",ContactGroupId:"convGroupIDList"}}}}(l)),this._configMap.set(R0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.PROFILE,".").concat(R0)}),body:{fromAccount:"",userItem:[]},keyMap:{request:{toAccount:"To_Account",standardSequence:"StandardSequence",customSequence:"CustomSequence"}}}}(l)),this._configMap.set(N0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.PROFILE,".").concat(N0)}),body:{fromAccount:"",profileItem:[{tag:Gt.NICK,value:""},{tag:Gt.GENDER,value:""},{tag:Gt.ALLOWTYPE,value:""},{tag:Gt.AVATAR,value:""}]},keyMap:{request:{toAccount:"To_Account",standardSequence:"StandardSequence",customSequence:"CustomSequence"}}}}(l)),this._configMap.set(P0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(P0)}),body:{fromAccount:"",startIndex:0,maxLimited:30,lastSequence:0},keyMap:{response:{CurruentSequence:"currentSequence"}}}}(l)),this._configMap.set(x0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(x0)}),body:{fromAccount:"",toAccount:[]}}}(l)),this._configMap.set(U0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(U0)}),body:{fromAccount:"",toAccount:[]}}}(l)),this._configMap.set(X_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STATUS,".").concat(X_)}),body:{customStatus:""},keyMap:{}}}(l)),this._configMap.set(om,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STATUS,".").concat(om)}),body:{userIDList:void 0},keyMap:{response:{UserStatusList:"successUserList",ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID",Status:"statusType"}}}}(l)),this._configMap.set(im,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STATUS,".").concat(im)}),body:{userIDList:void 0},keyMap:{response:{ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID"}}}}(l)),this._configMap.set(sm,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STATUS,".").concat(sm)}),body:{userIDList:void 0,unsubscribeAll:void 0},keyMap:{response:{ErrorList:"failureUserList",To_Account:"userID",Invalid_Account:"invalidUserID"}}}}(l)),this._configMap.set(F0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(F0)}),body:{fromAccount:"",startIndex:0,standardSequence:0,customSequence:0},keyMap:{response:{FriendNum:"friendCount",UserDataItem:"resultList",ValueItem:"tagValueList"}}}}(l)),this._configMap.set(H0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(H0)}),body:{fromAccount:"",addFriendItem:[],type:""},keyMap:{request:{source:"AddSource",wording:"AddWording",type:"AddType"},response:{ResultItem:"resultList"}}}}(l)),this._configMap.set(q0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(q0)}),body:{fromAccount:"",updateItem:void 0},keyMap:{request:{snsItem:"SnsItem"},response:{ResultItem:"resultList"}}}}(l)),this._configMap.set(B0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(B0)}),body:{fromAccount:"",userIDList:[],type:""},keyMap:{request:{type:"DeleteType"},response:{ResultItem:"resultList"}}}}(l)),this._configMap.set($0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat($0)}),body:{fromAccount:"",userIDList:void 0},keyMap:{response:{InfoItem:"resultList",SnsProfileItem:"tagValueList"}}}}(l)),this._configMap.set(G0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(G0)}),body:{fromAccount:"",userIDList:[],type:""},keyMap:{request:{type:"CheckType"},response:{InfoItem:"resultList"}}}}(l)),this._configMap.set(V0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(V0)}),body:{fromAccount:"",applicationType:"",startTime:0,maxLimited:0,lastSequence:0},keyMap:{response:{PendencyItem:"resultList",AddSource:"source",AddTime:"time",AddWording:"wording",Image:"avatar",UnreadPendencyCount:"unreadCount",To_Account:"userID",PendencyType:"type"}}}}(l)),this._configMap.set(Pg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(Pg)}),body:{fromAccount:"",responseFriendItem:[]},keyMap:{request:{tag:"TagName",action:"ResponseAction"},response:{ResultItem:"resultList"}}}}(l)),this._configMap.set(z0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(z0)}),body:{fromAccount:"",type:"",userIDList:void 0},keyMap:{request:{type:"PendencyType",userIDList:"To_Account"},response:{ResultItem:"resultList"}}}}(l)),this._configMap.set(j0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(j0)}),body:{fromAccount:"",latestTimeStamp:""},keyMap:{request:{latestTimeStamp:"LatestPendencyTimeStamp"}}}}(l)),this._configMap.set(K0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(K0)}),body:{fromAccount:"",groupName:void 0,userIDList:void 0},keyMap:{request:{groupName:"GroupName",userIDList:"To_Account"},response:{ResultItem:"resultList"}}}}(l)),this._configMap.set(Y0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(Y0)}),body:{fromAccount:"",nameList:void 0},keyMap:{request:{nameList:"GroupName"}}}}(l)),this._configMap.set(W0,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(W0)}),body:{fromAccount:"",lastSequence:0,needFriend:"Need_Friend_Type_Yes"},keyMap:{response:{ResultItem:"resultList",GroupName:"name",FriendNumber:"friendCount",To_Account:"userIDList"}}}}(l)),this._configMap.set(kp,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.FRIEND,".").concat(kp)}),body:{fromAccount:"",oldName:"",newName:void 0,updateGroupItem:void 0},keyMap:{request:{oldName:"GroupOldName",newName:"GroupNewName"},response:{UpdateType:"type",ResultItem:"resultList"}}}}(l)),this._configMap.set(Fg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(Fg)}),body:{memberAccount:"",limit:void 0,offset:void 0,groupType:void 0,responseFilter:{groupBaseInfoFilter:void 0,selfInfoFilter:void 0},isSupportTopic:0},keyMap:{request:{memberAccount:"Member_Account"},response:{GroupIdList:"groups",NoUnreadSeqList:"excludedUnreadSequenceList",MsgSeq:"readedSequence",LastRecallTime:"_lastRevokedTime"}}}}(l)),this._configMap.set($g,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat($g)}),body:{groupIDList:void 0,responseFilter:{groupBaseInfoFilter:void 0,groupCustomFieldFilter:void 0,memberInfoFilter:void 0,memberCustomFieldFilter:void 0}},keyMap:{request:{groupIDList:"GroupIdList",groupCustomField:"AppDefinedData",memberCustomField:"AppMemberDefinedData",groupCustomFieldFilter:"AppDefinedDataFilter_Group",memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},response:{GroupIdList:"groups",AppDefinedData:"groupCustomField",AppMemberDefinedData:"memberCustomField",AppDefinedDataFilter_Group:"groupCustomFieldFilter",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",InfoSeq:"infoSequence",MemberList:"members",GroupInfo:"groups",ShutUpUntil:"muteUntil",ShutUpAllMember:"muteAllMembers"}}}}(l)),this._configMap.set(d_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(d_)}),body:{type:void 0,name:void 0,groupID:void 0,ownerID:void 0,introduction:void 0,notification:void 0,maxMemberNum:void 0,joinOption:void 0,memberList:void 0,groupCustomField:void 0,memberCustomField:void 0,webPushFlag:1,avatar:"",isSupportTopic:void 0,inviteOption:void 0},keyMap:{request:{ownerID:"Owner_Account",userID:"Member_Account",avatar:"FaceUrl",maxMemberNum:"MaxMemberCount",joinOption:"ApplyJoinOption",groupCustomField:"AppDefinedData",memberCustomField:"AppMemberDefinedData",inviteOption:"InviteJoinOption"},response:{HugeGroupFlag:"avChatRoomFlag",OverJoinedGroupLimit_Account:"overLimitUserIDList"}}}}(l)),this._configMap.set(f_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(f_)}),body:{groupID:void 0}}}(l)),this._configMap.set(p_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(p_)}),body:{groupID:void 0,name:void 0,introduction:void 0,notification:void 0,avatar:void 0,joinOption:void 0,groupCustomField:void 0,muteAllMembers:void 0,inviteOption:void 0},keyMap:{request:{groupCustomField:"AppDefinedData",muteAllMembers:"ShutUpAllMember",joinOption:"ApplyJoinOption",avatar:"FaceUrl",inviteOption:"InviteJoinOption"},response:{AppDefinedData:"groupCustomField",ShutUpAllMember:"muteAllMembers"}}}}(l)),this._configMap.set(Gg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(Gg)}),body:{groupID:void 0,applyMessage:void 0,userDefinedField:void 0,webPushFlag:1,historyMessageFlag:void 0},keyMap:{request:{applyMessage:"ApplyMsg",historyMessageFlag:"HugeGroupHistoryMsgFlag"},response:{HugeGroupFlag:"avChatRoomFlag",AVChatRoomKey:"avChatRoomKey",RspMsgList:"messageList",ToGroupId:"to"}}}}(l)),this._configMap.set(Ew,function(c){return c.a2,c.tinyid,{head:r(r({},k(c,k8)),{},{servcmd:"".concat(ue.NAME.BIG_GROUP_NO_AUTH,".").concat(Gg)}),body:{groupID:void 0,applyMessage:void 0,userDefinedField:void 0,webPushFlag:1},keyMap:{request:{applyMessage:"ApplyMsg"},response:{HugeGroupFlag:"avChatRoomFlag"}}}}(l)),this._configMap.set(h_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(h_)}),body:{groupID:void 0}}}(l)),this._configMap.set(g_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(g_)}),body:{groupIDList:void 0,responseFilter:{groupBasePublicInfoFilter:["Type","Name","Introduction","Notification","FaceUrl","CreateTime","Owner_Account","LastInfoTime","LastMsgTime","NextMsgSeq","MemberNum","MaxMemberNum","ApplyJoinOption","InviteJoinOption"]}},keyMap:{response:{}}}}(l)),this._configMap.set(m_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(m_)}),body:{groupID:void 0,newOwnerID:void 0},keyMap:{request:{newOwnerID:"NewOwner_Account"}}}}(l)),this._configMap.set(v_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(v_)}),body:{groupID:void 0,applicant:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,messageKey:void 0,userDefinedField:void 0},keyMap:{request:{applicant:"Applicant_Account",handleAction:"HandleMsg",handleMessage:"ApprovalMsg",messageKey:"MsgKey"}}}}(l)),this._configMap.set(y_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(y_)}),body:{groupID:void 0,applicant:void 0,invitee:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,userDefinedField:void 0},keyMap:{request:{applicant:"Applicant_Account",invitee:"Invited_Account",handleAction:"HandleMsg",handleMessage:"ApprovalMsg"}}}}(l)),this._configMap.set(__,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(__)}),body:{groupID:void 0,inviter:void 0,handleAction:void 0,handleMessage:void 0,authentication:void 0,messageKey:void 0,userDefinedField:void 0},keyMap:{request:{inviter:"Inviter_Account",handleAction:"HandleMsg",handleMessage:"ApprovalMsg",messageKey:"MsgKey"}}}}(l)),this._configMap.set(Hg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(Hg)}),body:{startTime:void 0,limit:void 0,handleAccount:void 0},keyMap:{request:{handleAccount:"Handle_Account"},response:{To_Account:"userID"}}}}(l)),this._configMap.set(S_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(S_)}),body:{messageListToDelete:void 0},keyMap:{request:{messageListToDelete:"DelMsgList",messageSeq:"MsgSeq",messageRandom:"MsgRandom"}}}}(l)),this._configMap.set(qg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.BIG_GROUP_LONG_POLLING,".").concat(qg)}),body:{USP:1,startSeq:1,startBroadcastSeq:void 0,holdTime:90,key:void 0,simplifiedMessage:void 0},keyMap:{request:{USP:"USP"},response:{ToGroupId:"groupID",RspBroadcastMsgList:"broadcastMessageList",IsSystemMsg:"isSystemMessage"}}}}(l)),this._configMap.set(Aw,function(c){return c.a2,c.tinyid,{head:r(r({},k(c,D8)),{},{servcmd:"".concat(ue.NAME.BIG_GROUP_LONG_POLLING_NO_AUTH,".").concat(qg)}),body:{USP:1,startSeq:1,holdTime:90,key:void 0,simplifiedMessage:void 0},keyMap:{request:{USP:"USP"},response:{ToGroupId:"groupID",RspBroadcastMsgList:"broadcastMessageList",IsSystemMsg:"isSystemMessage"}}}}(l)),this._configMap.set(k_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(k_)}),body:{groupID:void 0}}}(l)),this._configMap.set(zg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(zg)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{request:{key:"key",value:"value"}}}}(l)),this._configMap.set(jg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(jg)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{request:{key:"key",value:"value"}}}}(l)),this._configMap.set(Wg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(Wg)}),body:{groupID:void 0,groupAttributeList:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]},keyMap:{request:{key:"key"}}}}(l)),this._configMap.set(Kg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(Kg)}),body:{groupID:void 0,mainSequence:void 0,avChatRoomKey:void 0,attributeControl:["RaceConflict"]}}}(l)),this._configMap.set(Yg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP_ATTR,".").concat(Yg)}),body:{groupID:void 0,avChatRoomKey:void 0,groupType:1},keyMap:{request:{avChatRoomKey:"Key",groupType:"GroupType"}}}}(l)),this._configMap.set(E_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(E_)}),body:{notifyReqList:[]},keyMap:{request:{notifyReqList:"NotifyReqList"},response:{NextMsgTime:"nextRevokedTime",NotifyMsgList:"notifyList",NotifyRspList:"notifyRspList"}}}}(l)),this._configMap.set(Zg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(Zg)}),body:{groupID:void 0,counterList:void 0,avChatRoomKey:void 0,mode:void 0},keyMap:{request:{counterList:"GroupCounter"}}}}(l)),this._configMap.set(Qg,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(Qg)}),body:{groupID:void 0,keyList:[],avChatRoomKey:void 0},keyMap:{request:{keyList:"GroupCounterKeys"}}}}(l)),this._configMap.set(K_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP_COMMUNITY,".").concat(K_)}),body:{groupID:void 0,topicName:void 0,avatar:void 0,customData:void 0,topicID:void 0,notification:void 0,introduction:void 0},keyMap:{request:{avatar:"FaceUrl"}}}}(l)),this._configMap.set(Y_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP_COMMUNITY,".").concat(Y_)}),body:{groupID:void 0,topicIDList:void 0},keyMap:{request:{topicIDList:"TopicIdList"},response:{DestroyResultItem:"resultList"}}}}(l)),this._configMap.set(J_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP_COMMUNITY,".").concat(J_)}),body:{groupID:void 0,topicID:void 0,avatar:void 0,customData:void 0,notification:void 0,introduction:void 0,muteAllMembers:void 0,topicName:void 0},keyMap:{request:{avatar:"FaceUrl",muteAllMembers:"ShutUpAllMember"}}}}(l)),this._configMap.set(rm,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP_COMMUNITY,".").concat(rm)}),body:{groupID:void 0,topicIDList:void 0,MemberInfoFilter:["NoUnreadSeqList"]},keyMap:{request:{topicIDList:"TopicIdList"},response:{TopicAndSelfInfo:"topicInfoList",TopicInfo:"topic",GroupID:"groupID",ShutUpTime:"muteTime",ShutUpAllFlag:"muteAllMembers",LastMsgTime:"lastMessageTime",MsgSeq:"readedSequence",LastMsgSeq:"sequence",NoUnreadSeqList:"excludedUnreadSequenceList"}}}}(l)),this._configMap.set(A_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(A_)}),body:{groupID:void 0,limit:0,offset:void 0,next:void 0,memberRoleFilter:void 0,memberInfoFilter:["Role","NameCard","ShutUpUntil","JoinTime"],memberCustomFieldFilter:void 0},keyMap:{request:{memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},response:{AppMemberDefinedData:"memberCustomField",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",MemberList:"members",ShutUpUntil:"muteUntil"}}}}(l)),this._configMap.set(em,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP_AVCHATROOM,".").concat(em)}),body:{groupID:void 0,offset:void 0,filter:void 0},keyMap:{request:{offset:"Timestamp",filter:"Mark"},response:{NextTimestamp:"offset"}}}}(l)),this._configMap.set(L_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(L_)}),body:{groupID:void 0,userIDList:void 0,memberInfoFilter:void 0,memberCustomFieldFilter:void 0},keyMap:{request:{userIDList:"Member_List_Account",memberCustomFieldFilter:"AppDefinedDataFilter_GroupMember"},response:{MemberList:"members",ShutUpUntil:"muteUntil",AppDefinedDataFilter_GroupMember:"memberCustomFieldFilter",AppMemberDefinedData:"memberCustomField"}}}}(l)),this._configMap.set(O_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(O_)}),body:{groupID:void 0,silence:void 0,userIDList:void 0},keyMap:{request:{userID:"Member_Account",userIDList:"MemberList"},response:{MemberList:"members"}}}}(l)),this._configMap.set(R_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(R_)}),body:{groupID:void 0,userIDList:void 0,reason:void 0},keyMap:{request:{userIDList:"MemberToDel_Account"}}}}(l)),this._configMap.set(N_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(N_)}),body:{groupID:void 0,userIDList:void 0,duration:void 0,reason:""},keyMap:{request:{userIDList:"Members_Account",duration:"Duration",reason:"Description"}}}}(l)),this._configMap.set(P_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP,".").concat(P_)}),body:{groupID:void 0,topicID:void 0,userID:void 0,messageRemindType:void 0,nameCard:void 0,role:void 0,memberCustomField:void 0,muteTime:void 0},keyMap:{request:{userID:"Member_Account",memberCustomField:"AppMemberDefinedData",muteTime:"ShutUpTime",messageRemindType:"MsgFlag"}}}}(l)),this._configMap.set(x_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.GROUP_AVCHATROOM,".").concat(x_)}),body:{groupID:void 0,operationType:1,memberList:[]},keyMap:{request:{operationType:"CommandType",memberList:"MemberList",markType:"Marks",userID:"Member_Account"},response:{CommandType:"operationType",Marks:"markType",Member_Account:"userID"}}}}(l)),this._configMap.set(Ap,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STAT,".").concat(Ap)}),body:{header:{},event:[],quality:[]},keyMap:{request:{SDKType:"sdk_type",SDKVersion:"sdk_version",deviceType:"device_type",platform:"platform",instanceID:"instance_id",traceID:"trace_id",SDKAppID:"sdk_app_id",userID:"user_id",tinyID:"tiny_id",extension:"extension",timestamp:"timestamp",networkType:"network_type",eventType:"event_type",code:"error_code",message:"error_message",moreMessage:"more_message",duplicate:"duplicate",costTime:"cost_time",level:"level",qualityType:"quality_type",reportIndex:"report_index",wholePeriod:"whole_period",totalCount:"total_count",rttCount:"success_count_business",successRateOfRequest:"percent_business",countLessThan1Second:"success_count_business",percentOfCountLessThan1Second:"percent_business",countLessThan3Second:"success_count_platform",percentOfCountLessThan3Second:"percent_platform",successCountOfBusiness:"success_count_business",successRateOfBusiness:"percent_business",successCountOfPlatform:"success_count_platform",successRateOfPlatform:"percent_platform",successCountOfMessageReceived:"success_count_business",successRateOfMessageReceived:"percent_business",avgRTT:"average_value",avgDelay:"average_value",avgValue:"average_value",uiPlatform:"ui_platform"}}}}(a)),this._configMap.set(G_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.HEARTBEAT,".").concat(G_)}),body:{}}}(l)),this._configMap.set(Lw,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_PUSH,".").concat(Lw)}),body:{},keyMap:{response:{C2cMsgArray:"C2CMessageArray",GroupMsgArray:"groupMessageArray",GroupTips:"groupTips",C2cNotifyMsgArray:"C2CNotifyMessageArray",C2cMsgInfo:"C2CReadReceiptArray",ClientSeq:"clientSequence",MsgPriority:"priority",NoticeSeq:"noticeSequence",MsgContent:"content",MsgType:"type",MsgBody:"elements",ToGroupId:"to",Desc:"description",Ext:"extension",IsSyncMsg:"isSyncMessage",Flag:"needSync",NeedAck:"needAck",PendencyAdd_Account:"userID",ProfileImNick:"nick",PendencyType:"applicationType",C2CReadAllMsg:"readAllC2CMessage",IsNeedReadReceipt:"needReadReceipt",Status:"statusType"}}}}(l)),this._configMap.set(Ow,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_PUSH,".").concat(Ow)}),body:{},keyMap:{response:{GroupMsgArray:"groupMessageArray",GroupTips:"groupTips",ClientSeq:"clientSequence",MsgPriority:"priority",NoticeSeq:"noticeSequence",MsgContent:"content",MsgType:"type",MsgBody:"elements",ToGroupId:"to",Desc:"description",Ext:"extension",IsSyncMsg:"isSyncMessage",Flag:"needSync",NeedAck:"needAck",PendencyType:"applicationType"}}}}(l)),this._configMap.set(nm,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.OPEN_IM,".").concat(nm)}),body:{sessionData:void 0},keyMap:{request:{sessionData:"SessionData"}}}}(l)),this._configMap.set(Rw,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STATUS,".").concat(Rw)}),body:{},keyMap:{response:{C2cNotifyMsgArray:"C2CNotifyMessageArray",NoticeSeq:"noticeSequence",KickoutMsgNotify:"kickoutMsgNotify",NewInstInfo:"newInstanceInfo"}}}}(l)),this._configMap.set(H_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_LONG_MESSAGE,".").concat(H_)}),body:{downloadKey:""},keyMap:{response:{Data:"data",Desc:"description",Ext:"extension",Download_Flag:"downloadFlag",ThumbUUID:"thumbUUID",VideoUUID:"videoUUID"}}}}(l)),this._configMap.set(B_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_LONG_MESSAGE,".").concat(B_)}),body:{messageList:[]},keyMap:{request:{fromAccount:"From_Account",toAccount:"To_Account",msgTimeStamp:"MsgTimeStamp",msgSeq:"MsgSeq",msgRandom:"MsgRandom",msgBody:"MsgBody",type:"MsgType",content:"MsgContent",data:"Data",description:"Desc",extension:"Ext",sizeType:"Type",uuid:"UUID",url:"",imageUrl:"URL",fileUrl:"Url",remoteAudioUrl:"Url",remoteVideoUrl:"VideoUrl",thumbUUID:"ThumbUUID",videoUUID:"VideoUUID",videoUrl:"",downloadFlag:"Download_Flag",from:"From_Account",time:"MsgTimeStamp",messageRandom:"MsgRandom",messageSequence:"MsgSeq",elements:"MsgBody",clientSequence:"ClientSeq",payload:"MsgContent",messageList:"MsgList",messageNumber:"MsgNum",abstractList:"AbstractList",messageBody:"MsgBody"}}}}(l)),this._configMap.set(e1,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STATUS,".").concat(e1)}),body:{tokenID:"",pushMsg:0,sdkAppID:0,businessID:"",deviceBrand:"",deviceToken:"",isTpns:0,isWebUniapp:0},keyMap:{request:{tokenID:"TokenID",pushMsg:"PushMsg",sdkAppID:"EnterVersion",businessID:"BusiID",deviceBrand:"InstType",deviceToken:"VarToken",isTpns:"IsTpns"}}}}(l)),this._configMap.set(Q_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STATUS,".").concat(Q_)}),body:{isWebUniapp:0}}}(l)),this._configMap.set(Z_,function(c){return{head:r(r({},c),{},{servcmd:"".concat(ue.NAME.IM_OPEN_STATUS,".").concat(Z_)}),body:{C2CUnread:0,GroupUnread:0,isWebUniapp:0},keyMap:{request:{c2cUnreadCount:"C2cUnread",groupUnreadCount:"GrpUnread"}}}}(l))}},{key:"has",value:function(l){return this._configMap.has(l)}},{key:"get",value:function(l){return this._configMap.get(l)}},{key:"update",value:function(){this._fillConfigMap()}},{key:"getKeyMap",value:function(l){return this.has(l)?this.get(l).keyMap||{}:(U.w("".concat(this._n,".getKeyMap unknown protocolName:").concat(l)),{})}},{key:"getProtocolData",value:function(l){var p=l.protocolName,a=l.requestData,c=this.get(p),h=null;if(a){var m=this._simpleDeepCopy(c),y=this._updateService(a,m),b=y.body,C=Object.create(null);for(var E in b)if(Object.prototype.hasOwnProperty.call(b,E)){if(C[E]=b[E],a[E]===void 0)continue;C[E]=a[E]}y.body=C,h=this._getUplinkData(y)}else h=this._getUplinkData(c);return h}},{key:"_getUplinkData",value:function(l){var p=this._requestDataCleaner(l),a=fp(p.head),c=y8(p.body,this._getRequestKeyMap(a));return p.body=c,p}},{key:"_updateService",value:function(l,p){var a=fp(p.head);if(this._isFromGroupRequest(p)){var c=l.type,h=l.groupID,m=h===void 0?void 0:h,y=l.groupIDList,b=y===void 0?[]:y;$e(m)&&(m=b[0]||""),mo({type:c,groupID:m})&&(p.head.servcmd="".concat(ue.NAME.GROUP_COMMUNITY,".").concat(a))}return p}},{key:"_isFromGroupRequest",value:function(l){return l.head.servcmd.includes(ue.NAME.GROUP)||l.head.servcmd.includes(ue.NAME.GROUP_ATTR)}},{key:"_getRequestKeyMap",value:function(l){var p=this.getKeyMap(l);return r(r({},cm.request),p.request)}},{key:"_requestDataCleaner",value:function(l){var p=Array.isArray(l)?[]:Object.create(null);for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&Cd(a)&&l[a]!==null&&l[a]!==void 0&&(o(l[a])!=="object"?p[a]=l[a]:p[a]=this._requestDataCleaner.bind(this)(l[a]));return p}},{key:"_simpleDeepCopy",value:function(l){for(var p,a=Object.keys(l),c={},h=0,m=a.length;h1e3*y)return this._commandRequestInfoMap.set(c,{startTime:Date.now(),requestCount:1}),!1;E+=1,this._commandRequestInfoMap.set(c,{startTime:C,requestCount:E});var N=!1;return E>m&&(N=!0),N}},{key:"_isServerOverload",value:function(a){if(!this._serverOverloadInfoMap.has(a))return!1;var c=this._serverOverloadInfoMap.get(a),h=c.overloadTime,m=c.waitingTime,y=!1;return Date.now()-h<=1e3*m?y=!0:(this._serverOverloadInfoMap.delete(a),y=!1),y}},{key:"onPushedServerOverload",value:function(a){var c=a.overloadCommand,h=a.waitingTime;this._serverOverloadInfoMap.set(c,{overloadTime:Date.now(),waitingTime:h}),U.w("".concat(this._n,".onPushedServerOverload waitingTime:").concat(h,"s"))}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._updateCommandFrequencyLimitMap(Jw),this._commandRequestInfoMap.clear(),this._serverOverloadInfoMap.clear()}}]),p}(Er),R8=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="MessageLossDetectionModule",c._maybeLostSequencesMap=new Map,c._firstRoundRet=[],c}return u(p,[{key:"onMessageMaybeLost",value:function(a,c,h){this._maybeLostSequencesMap.has(a)||this._maybeLostSequencesMap.set(a,[]);for(var m=this._maybeLostSequencesMap.get(a),y=0;y=this._expiredTime}},{key:"fetchConfig",value:function(){var a=this,c=this._canFetchConfig();if(U.l("".concat(this._n,".fetchConfig canFetchConfig:").concat(c)),c){var h=new We("fetchCloudControlConfig"),m=this.getModule(hn).getSDKAppID();this._isFetching=!0,this.request({protocolName:q_,requestData:{SDKAppID:m,version:this._version}}).then(function(y){a._isFetching=!1,h.setMessage("version:".concat(a._version," newVersion:").concat(y.data.version," config:").concat(y.data.cloudControlConfig)).setNetworkType(a.getNetworkType()).end(),U.l("".concat(a._n,".fetchConfig ok")),a._parseCloudControlConfig(y.data)}).catch(function(y){a._isFetching=!1,a.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];h.setError(y,E,N).end()}),U.l("".concat(a._n,".fetchConfig failed. error:"),y),a._setExpiredTimeOnResponseError(12e4)})}}},{key:"onPushedCloudControlConfig",value:function(a){U.l("".concat(this._n,".onPushedCloudControlConfig")),new We("pushedCloudControlConfig").setNetworkType(this.getNetworkType()).setMessage("newVersion:".concat(a.version," config:").concat(a.cloudControlConfig)).end(),this._parseCloudControlConfig(a)}},{key:"onCheckTimer",value:function(a){this._canFetchConfig()&&this.fetchConfig()}},{key:"_parseCloudControlConfig",value:function(a){var c=this,h="".concat(this._n,"._parseCloudControlConfig"),m=a.errorCode,y=a.errorMessage,b=a.cloudControlConfig,C=a.version,E=a.expiredTime;if(m===0){if(this._version!==C){var N=null;try{N=JSON.parse(b)}catch{this.isPrivateNetWork()||U.e("".concat(h," JSON parse error. cloudControlConfig:"),b)}N&&(this._cloudConfig.clear(),Object.keys(N).forEach(function(F){c._cloudConfig.set(F,N[F])}),this._version=C,this.emitInnerEvent(ir.CLOUD_CONFIG_UPDATED))}this._expiredTime=Date.now()+1e3*E}else $e(m)?(U.l("".concat(h," failed. Invalid message format:"),a),this._setExpiredTimeOnResponseError(36e5)):(U.e("".concat(h," errorCode:").concat(m," errorMessage:").concat(y)),this._setExpiredTimeOnResponseError(12e4))}},{key:"_setExpiredTimeOnResponseError",value:function(a){this._expiredTime=Date.now()+a}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._cloudConfig.clear(),this._expiredTime=0,this._version=0,this._isFetching=!1}}]),p}(Er),P8=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="RecoverMessageModule",c.PULL_LIMIT_COUNT=15,c}return u(p,[{key:"start",value:function(){this._recoverGroupChat(),this._recoverC2CChat()}},{key:"_recoverGroupChat",value:function(){var a,c,h=this,m=this._getLocalConversationList().filter(function(F){return F.type===T.CONV_GROUP&&F.groupProfile.type!==T.GRP_AVCHATROOM}),y=this.getModule(dt),b=0,C=0,E=0,N=[];m.forEach(function(F){var z=F.conversationID,Q=F.lastMessage;c=z.replace(T.CONV_GROUP,""),a=y.getLocalLastMessage(z),Q&&Q.lastSequence!==0&&a?(C=Q.lastSequence,b=a.sequence,E=C-b,b>0&&E>=1&&E<300?h._recoverGroupMessage({groupID:c,localLastMessageSequence:b,remoteLastMessageSequence:C}):N.push(c)):N.push(c)}),this._getGroupNotify(N)}},{key:"_recoverC2CChat",value:function(){var a,c=this,h=this._getLocalConversationList().filter(function(N){return N.type===T.CONV_C2C}),m=this.getModule(dt),y=0,b=0,C=0,E=[Promise.resolve()];h.forEach(function(N){var F=N.conversationID,z=N.lastMessage;a=m.getLocalLastMessage(F),z&&z.lastTime!==0&&a&&(b=z.lastTime,y=a.time,C=b-y,y>0&&C>=1&&C<=600&&E.push(c._recoverC2CMessage({conversationID:F,localLastMessageTime:y,remoteLastMessageTime:b})))}),Promise.all(E).then(function(){U.l("".concat(c._n,"._recoverC2CChat all promise fulfilled, start to sync unread messages")),c.getModule(k0).startSyncOnReconnected()})}},{key:"_getLocalConversationList",value:function(){return this.getModule(dt).getLocalConversationList()}},{key:"_recoverGroupMessage",value:function(a){var c=this,h="".concat(this._n,"._recoverGroupMessage");U.l("".concat(h," options:"),a);var m=a.groupID,y=a.localLastMessageSequence,b=a.remoteLastMessageSequence;this._getGroupRoamingMessage({groupID:m,sequence:y}).then(function(C){var E=C.data,N=E.complete,F=E.messageList;if(!$e(F)){var z=F[0].sequence,Q="groupID:".concat(m," pkgLastSequence:").concat(z," remoteLastSequence:").concat(b," complete:").concat(N," count:").concat(F.length);U.l("".concat(h," ").concat(Q)),z1&&F.sort(function(Ue,Ve){return Ue.sequence-Ve.sequence});for(var _e=0;_e1?c:1,m=a.length,y=[];if(m>0)for(var b=0;b0)for(var h=this.getModule(Tt),m=0,y=c.length;m=0&&this._e2eDelayArray.push(p)}},{key:"_calcAvg",value:function(l,p){if(p===0)return 0;var a=0;return l.forEach(function(c){a+=c}),ts(a/p,1)}},{key:"_calcCountWithLimit",value:function(l){var p=l.e2eDelayArray,a=l.min,c=l.max;return p.filter(function(h){return a<=h&&h100&&(a=100),a}},{key:"_checkE2EDelayException",value:function(l,p){var a=l.filter(function(C){return C>p});if(a.length>0){var c=a.length,h=Math.min.apply(Math,O(a)),m=Math.max.apply(Math,O(a)),y=this._calcAvg(a,c),b=ts(c/l.length*100,2);b>50&&new We("messageE2EDelayException").setMessage("count:".concat(c," min:").concat(h," max:").concat(m," avg:").concat(y," percent:").concat(b)).setLevel("warning").end()}}},{key:"getStatResult",value:function(){var l=this._e2eDelayArray.length;if(l===0)return null;var p=O(this._e2eDelayArray),a=this._calcCountWithLimit({e2eDelayArray:p,min:0,max:1}),c=this._calcCountWithLimit({e2eDelayArray:p,min:1,max:3}),h=this._calcPercent(a,l),m=this._calcPercent(c,l),y=this._calcAvg(p,l);return this._checkE2EDelayException(p,3),p.length=0,this.reset(),{totalCount:l,countLessThan1Second:a,percentOfCountLessThan1Second:h,countLessThan3Second:c,percentOfCountLessThan3Second:m,avgDelay:y}}},{key:"reset",value:function(){this._e2eDelayArray.length=0}}]),D}(),U8=function(){function D(){i(this,D),this._n="AvgRTT",this._requestCount=0,this._rttArray=[]}return u(D,[{key:"addRequestCount",value:function(){this._requestCount+=1}},{key:"addRTT",value:function(l){this._rttArray.push(l)}},{key:"_calcTotalCount",value:function(){return this._requestCount}},{key:"_calcRTTCount",value:function(l){return l.length}},{key:"_calcSuccessRateOfRequest",value:function(l,p){if(p===0)return 0;var a=ts(l/p*100,2);return a>100&&(a=100),a}},{key:"_calcAvg",value:function(l,p){if(p===0)return 0;var a=0;return l.forEach(function(c){a+=c}),parseInt(a/p)}},{key:"_calcMax",value:function(){return Math.max.apply(Math,O(this._rttArray))}},{key:"_calcMin",value:function(){return Math.min.apply(Math,O(this._rttArray))}},{key:"getStatResult",value:function(){var l=this._calcTotalCount(),p=O(this._rttArray);if(l===0)return null;var a=this._calcRTTCount(p),c=this._calcSuccessRateOfRequest(a,l),h=this._calcAvg(p,a);return U.l("".concat(this._n,".getStatResult max:").concat(this._calcMax()," min:").concat(this._calcMin()," avg:").concat(h)),this.reset(),{totalCount:l,rttCount:a,successRateOfRequest:c,avgRTT:h}}},{key:"reset",value:function(){this._requestCount=0,this._rttArray.length=0}}]),D}(),F8=function(){function D(){i(this,D),this._map=new Map}return u(D,[{key:"initMap",value:function(l){var p=this;l.forEach(function(a){p._map.set(a,{totalCount:0,successCount:0,failedCountOfUserSide:0,costArray:[],fileSizeArray:[]})})}},{key:"addTotalCount",value:function(l){return!($e(l)||!this._map.has(l))&&(this._map.get(l).totalCount+=1,!0)}},{key:"addSuccessCount",value:function(l){return!($e(l)||!this._map.has(l))&&(this._map.get(l).successCount+=1,!0)}},{key:"addFailedCountOfUserSide",value:function(l){return!($e(l)||!this._map.has(l))&&(this._map.get(l).failedCountOfUserSide+=1,!0)}},{key:"addCost",value:function(l,p){return!($e(l)||!this._map.has(l))&&(this._map.get(l).costArray.push(p),!0)}},{key:"addFileSize",value:function(l,p){return!($e(l)||!this._map.has(l))&&(this._map.get(l).fileSizeArray.push(p),!0)}},{key:"_calcSuccessRateOfBusiness",value:function(l){if($e(l)||!this._map.has(l))return-1;var p=this._map.get(l),a=ts(p.successCount/p.totalCount*100,2);return a>100&&(a=100),a}},{key:"_calcSuccessRateOfPlatform",value:function(l){if($e(l)||!this._map.has(l))return-1;var p=this._map.get(l),a=this._calcSuccessCountOfPlatform(l)/p.totalCount*100;return(a=ts(a,2))>100&&(a=100),a}},{key:"_calcTotalCount",value:function(l){return $e(l)||!this._map.has(l)?-1:this._map.get(l).totalCount}},{key:"_calcSuccessCountOfBusiness",value:function(l){return $e(l)||!this._map.has(l)?-1:this._map.get(l).successCount}},{key:"_calcSuccessCountOfPlatform",value:function(l){if($e(l)||!this._map.has(l))return-1;var p=this._map.get(l);return p.successCount+p.failedCountOfUserSide}},{key:"_calcAvg",value:function(l){return $e(l)||!this._map.has(l)?-1:l===Mi?this._calcAvgSpeed(l):this._calcAvgCost(l)}},{key:"_calcAvgCost",value:function(l){var p=this._map.get(l).costArray.length;if(p===0)return 0;var a=0;return this._map.get(l).costArray.forEach(function(c){a+=c}),parseInt(a/p)}},{key:"_calcAvgSpeed",value:function(l){var p=0,a=0;return this._map.get(l).costArray.forEach(function(c){p+=c}),this._map.get(l).fileSizeArray.forEach(function(c){a+=c}),parseInt(1e3*a/p)}},{key:"getStatResult",value:function(l){var p=this._calcTotalCount(l);if(p===0)return null;var a=this._calcSuccessCountOfBusiness(l),c=this._calcSuccessRateOfBusiness(l),h=this._calcSuccessCountOfPlatform(l),m=this._calcSuccessRateOfPlatform(l),y=this._calcAvg(l);return this.reset(l),{totalCount:p,successCountOfBusiness:a,successRateOfBusiness:c,successCountOfPlatform:h,successRateOfPlatform:m,avgValue:y}}},{key:"reset",value:function(l){$e(l)?this._map.clear():this._map.set(l,{totalCount:0,successCount:0,failedCountOfUserSide:0,costArray:[],fileSizeArray:[]})}}]),D}(),$8=function(){function D(){i(this,D),this._lastMap=new Map,this._currentMap=new Map}return u(D,[{key:"initMap",value:function(l){var p=this;l.forEach(function(a){p._lastMap.set(a,new Map),p._currentMap.set(a,new Map)})}},{key:"addMessageSequence",value:function(l){var p=l.key,a=l.message;if($e(p)||!this._lastMap.has(p)||!this._currentMap.has(p))return!1;var c=a.conversationID,h=a.sequence,m=c.replace(T.CONV_GROUP,"");if(this._lastMap.get(p).size===0)this._addCurrentMap(l);else if(this._lastMap.get(p).has(m)){var y=this._lastMap.get(p).get(m),b=y.length-1;h>y[0]&&h100&&(c=100),this._copyData(l),{totalCount:p,successCountOfMessageReceived:a,successRateOfMessageReceived:c}}},{key:"reset",value:function(){this._currentMap.clear(),this._lastMap.clear()}}]),D}(),G8=function(D){f(p,D);var l=L(p);function p(a){var c;i(this,p),(c=l.call(this,a))._n="QualityStatModule",c.TAG="im-ssolog-quality-stat",c.reportIndex=0,c.wholePeriod=!1,c._qualityItems=[r1,o1,Ad,Ld,Od,ju,Mi,Rd,Lp,Op],c._messageSentItems=[Ad,Ld,Od,ju,Mi],c._messageReceivedItems=[Rd,Lp,Op],c.REPORT_INTERVAL=120,c.REPORT_SDKAPPID_BLACKLIST=[],c.REPORT_TINYID_WHITELIST=[],c._statInfoArr=[],c._avgRTT=new U8,c._avgE2EDelay=new x8,c._rateMessageSent=new F8,c._rateMessageReceived=new $8;var h=c.getInnerEmitterInstance();return h.on(ir.A2KEY_AND_TINYID_UPDATED,c._onLoginSuccess,w(c)),h.on(ir.CLOUD_CONFIG_UPDATED,c._onCloudConfigUpdated,w(c)),c}return u(p,[{key:"_onLoginSuccess",value:function(){var a=this;this._rateMessageSent.initMap(this._messageSentItems),this._rateMessageReceived.initMap(this._messageReceivedItems);var c=this.getModule(aa),h=c.getItem(this.TAG,!1);!Ye(h)&&Bo(h.forEach)&&(U.l("".concat(this._n,"._onLoginSuccess get quality stat logs from local storage, count:").concat(h.length)),h.forEach(function(m){a._statInfoArr.push(m)}),c.removeItem(this.TAG,!1))}},{key:"_onCloudConfigUpdated",value:function(){var a=this.getCloudConfig("q_rpt_interval"),c=this.getCloudConfig("q_rpt_sdkappid_bl"),h=this.getCloudConfig("q_rpt_tinyid_wl");$e(a)||(this.REPORT_INTERVAL=Number(a)),$e(c)||(this.REPORT_SDKAPPID_BLACKLIST=c.split(",").map(function(m){return Number(m)})),$e(h)||(this.REPORT_TINYID_WHITELIST=h.split(","))}},{key:"onCheckTimer",value:function(a){this.isLoggedIn()&&a%this.REPORT_INTERVAL==0&&(this.wholePeriod=!0,this._report())}},{key:"addRequestCount",value:function(){this._avgRTT.addRequestCount()}},{key:"addRTT",value:function(a){this._avgRTT.addRTT(a)}},{key:"addMessageDelay",value:function(a){this._avgE2EDelay.addMessageDelay(a)}},{key:"addTotalCount",value:function(a){this._rateMessageSent.addTotalCount(a)||U.w("".concat(this._n,".addTotalCount invalid key:"),a)}},{key:"addSuccessCount",value:function(a){this._rateMessageSent.addSuccessCount(a)||U.w("".concat(this._n,".addSuccessCount invalid key:"),a)}},{key:"addFailedCountOfUserSide",value:function(a){this._rateMessageSent.addFailedCountOfUserSide(a)||U.w("".concat(this._n,".addFailedCountOfUserSide invalid key:"),a)}},{key:"addCost",value:function(a,c){this._rateMessageSent.addCost(a,c)||U.w("".concat(this._n,".addCost invalid key or cost:"),a,c)}},{key:"addFileSize",value:function(a,c){this._rateMessageSent.addFileSize(a,c)||U.w("".concat(this._n,".addFileSize invalid key or size:"),a,c)}},{key:"addMessageSequence",value:function(a){this._rateMessageReceived.addMessageSequence(a)||U.w("".concat(this._n,".addMessageSequence invalid key:"),a.key)}},{key:"_getQualityItem",value:function(a){var c={},h=Nw[this.getNetworkType()];$e(h)&&(h=8);var m={qualityType:l6[a],timestamp:In(),networkType:h,extension:""};switch(a){case r1:c=this._avgRTT.getStatResult();break;case o1:c=this._avgE2EDelay.getStatResult();break;case Ad:case Ld:case Od:case ju:case Mi:c=this._rateMessageSent.getStatResult(a);break;case Rd:case Lp:case Op:c=this._rateMessageReceived.getStatResult(a)}return c===null?null:r(r({},m),c)}},{key:"_report",value:function(a){var c=this,h=[],m=null;$e(a)?this._qualityItems.forEach(function(E){(m=c._getQualityItem(E))!==null&&(m.reportIndex=c.reportIndex,m.wholePeriod=c.wholePeriod,h.push(m))}):(m=this._getQualityItem(a))!==null&&(m.reportIndex=this.reportIndex,m.wholePeriod=this.wholePeriod,h.push(m)),U.d("".concat(this._n,"._report"),h),this._statInfoArr.length>0&&(h=h.concat(this._statInfoArr),this._statInfoArr=[]);var y=this.getModule(hn),b=y.getSDKAppID(),C=y.getTinyID();Rg(this.REPORT_SDKAPPID_BLACKLIST,b)&&!pp(this.REPORT_TINYID_WHITELIST,C)&&(h=[]),h.length>0&&this._doReport(h)}},{key:"_doReport",value:function(a){var c=this,h={header:jw(this),quality:a};this.request({protocolName:Ap,requestData:r({},h)}).then(function(){c.reportIndex++,c.wholePeriod=!1}).catch(function(m){U.w("".concat(c._n,"._doReport, online:").concat(c.getNetworkType()," error:"),m),c._statInfoArr=c._statInfoArr.concat(a),c._flushAtOnce()})}},{key:"_flushAtOnce",value:function(){var a=this.getModule(aa),c=a.getItem(this.TAG,!1),h=this._statInfoArr,m="".concat(this._n,"._flushAtOnce");if(Ye(c))U.l("".concat(m," count:").concat(h.length)),a.setItem(this.TAG,h,!0,!1);else{var y=h.concat(c);y.length>10&&(y=y.slice(0,10)),U.l("".concat(m," count:").concat(y.length)),a.setItem(this.TAG,y,!0,!1)}this._statInfoArr=[]}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._report(),this.reportIndex=0,this.wholePeriod=!1,this.REPORT_SDKAPPID_BLACKLIST=[],this.REPORT_TINYID_WHITELIST=[],this._avgRTT.reset(),this._avgE2EDelay.reset(),this._rateMessageSent.reset(),this._rateMessageReceived.reset()}}]),p}(Er),Xw=u(function D(l){i(this,D),Ye(l)||(this.userID=l.userID||"",this.nick=l.nick||"",this.avatar=l.avatar||"",this.time=l.time||0,this.source=l.source||"",this.wording=l.wording||"",this.type=l.type||"")}),B8=function(){function D(l){i(this,D),this._snsModule=l,this._n="FriendApplicationHandler",this._startTime=0,this._maxLimited=100,this._currentSequence=0,this._friendApplicationMap=new Map,this._unreadCount=0}return u(D,[{key:"getLocalFriendApplicationList",value:function(){return{friendApplicationList:O(this._friendApplicationMap.values()),unreadCount:this._unreadCount}}},{key:"_onFriendApplicationListUpdated",value:function(){this._snsModule.emitOuterEvent(R.FRIEND_APPLICATION_LIST_UPDATED,{friendApplicationList:O(this._friendApplicationMap.values()),unreadCount:this._unreadCount})}},{key:"onFriendApplicationRead",value:function(){this._unreadCount=0,this._onFriendApplicationListUpdated()}},{key:"onFriendApplicationAdded",value:function(l,p){var a=this;if(!Ye(l)){var c="";c=p===this._snsModule.getMyUserID()?T.SNS_APPLICATION_SENT_BY_ME:T.SNS_APPLICATION_SENT_TO_ME;var h=!1;l.forEach(function(m){var y="".concat(m.userID,"_").concat(c);c!==T.SNS_APPLICATION_SENT_TO_ME||a._friendApplicationMap.has(y)||(a._unreadCount+=1),a._friendApplicationMap.set(y,new Xw(r(r({},m),{},{type:c}))),h=!0}),h&&this._onFriendApplicationListUpdated()}}},{key:"onFriendApplicationDeleted",value:function(l){Ye(l)||this.getFriendApplicationList()}},{key:"getFriendApplicationList",value:function(){var l=this,p="".concat(this._n,".").concat("getFriendApplicationList"),a=new We("getFriendApplicationList");return this._snsModule.request({protocolName:V0,requestData:{applicationType:T.SNS_APPLICATION_TYPE_BOTH,fromAccount:this._snsModule.getMyUserID(),maxLimited:this._maxLimited,startTime:this._startTime,lastSequence:this._currentSequence}}).then(function(c){var h=c.data,m=h.resultList,y=h.unreadCount,b=h.startTime,C=h.currentSequence;l._startTime=b,l._currentSequence=C,l._unreadCount=y;var E=st(m)?m.length:0;a.setNetworkType(l._snsModule.getNetworkType()).setMessage("applicationCount:".concat(E," unreadCount:").concat(y)).end(),U.i("".concat(p," ok. applicationCount:").concat(E," unreadCount:").concat(y)),l._friendApplicationMap.clear(),st(m)&&m.forEach(function(N){var F=N.userID,z=N.type,Q=new Xw(N);l._friendApplicationMap.set("".concat(F,"_").concat(z),Q)}),l._onFriendApplicationListUpdated()}).catch(function(c){return l._snsModule.probeNetwork().then(function(h){var m=A(h,2),y=m[0],b=m[1];a.setError(c,y,b).end()}),U.w("".concat(p," failed. error:"),c),Me(c)})}},{key:"deleteFriendApplication",value:function(l){var p=this,a="".concat(this._n,".").concat("deleteFriendApplication"),c=l.userID,h=l.type;if((!h||h!==T.SNS_APPLICATION_SENT_BY_ME&&h!==T.SNS_APPLICATION_SENT_TO_ME)&&(h=T.SNS_APPLICATION_SENT_TO_ME),!this._friendApplicationMap.has("".concat(c,"_").concat(h)))return Me({code:Le.FRIEND_APPLICATION_NOT_EXIST});var m=new We("deleteFriendApplication");return m.setMessage("userID:".concat(c," type:").concat(h)),this._snsModule.request({protocolName:z0,requestData:{fromAccount:this._snsModule.getMyUserID(),userIDList:[c],type:h}}).then(function(y){var b=y.data.resultList,C=b[0],E=C.to,N=C.resultCode,F=C.resultInfo;return m.setNetworkType(p._snsModule.getNetworkType()).setMoreMessage("resultList:".concat(JSON.stringify(b))).end(),U.i("".concat(a," ok. userID:").concat(c," type:").concat(h)),N===0?gt():Me({userID:E,code:N,message:F})}).catch(function(y){return p._snsModule.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];m.setError(y,E,N).end()}),U.w("".concat(a," failed. error:"),y),Me(y)})}},{key:"acceptFriendApplication",value:function(l){var p=this,a="".concat(this._n,".").concat("acceptFriendApplication"),c=l.userID,h=l.remark,m=l.tag,y=l.type;(!y||y!==T.SNS_APPLICATION_AGREE&&y!==T.SNS_APPLICATION_AGREE_AND_ADD)&&(y=T.SNS_APPLICATION_AGREE_AND_ADD);var b=new We("acceptFriendApplication");return b.setMessage("userID:".concat(c," type:").concat(y)),this._snsModule.request({protocolName:Pg,requestData:{fromAccount:this._snsModule.getMyUserID(),responseFriendItem:[{userID:c,remark:h,tag:m,action:y}]}}).then(function(C){b.setNetworkType(p._snsModule.getNetworkType()).end();var E=C.data.resultList[0],N=E.resultCode,F=E.resultInfo;if(N!==0)return Me({code:N,message:F});U.i("".concat(a," ok. userID:").concat(c," type:").concat(y))}).catch(function(C){return p._snsModule.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];b.setError(C,F,z).end()}),U.w("".concat(a," failed. error:"),C),Me(C)})}},{key:"refuseFriendApplication",value:function(l){var p=this,a="".concat(this._n,".").concat("refuseFriendApplication"),c=l.userID,h=new We("refuseFriendApplication");return h.setMessage("userID:".concat(c)),this._snsModule.request({protocolName:Pg,requestData:{fromAccount:this._snsModule.getMyUserID(),responseFriendItem:[{userID:c,action:"Response_Action_Reject"}]}}).then(function(m){h.setNetworkType(p._snsModule.getNetworkType()).end();var y=m.data.resultList[0],b=y.resultCode,C=y.resultInfo;if(b!==0)return Me({code:b,message:C});U.i("".concat(a," ok. userID:").concat(c))}).catch(function(m){return p._snsModule.probeNetwork().then(function(y){var b=A(y,2),C=b[0],E=b[1];h.setError(m,C,E).end()}),U.w("".concat(a," failed. error:"),m),Me(m)})}},{key:"_onFriendApplicationProcessed",value:function(l){var p=this;if(l.length!==0){var a=!1;l.forEach(function(c){var h="".concat(c.to,"_").concat(T.SNS_APPLICATION_SENT_TO_ME);p._friendApplicationMap.has(h)&&(p._friendApplicationMap.delete(h),p._unreadCount-=1,a=!0)}),this._unreadCount<0&&(this._unreadCount=0),a&&this._onFriendApplicationListUpdated()}}},{key:"setFriendApplicationRead",value:function(){var l=this,p="".concat(this._n,".").concat("setFriendApplicationRead"),a=new We("setFriendApplicationRead");return this._snsModule.request({protocolName:j0,requestData:{fromAccount:this._snsModule.getMyUserID(),latestTimeStamp:ts(In()/1e3,0)}}).then(function(c){a.setNetworkType(l._snsModule.getNetworkType()).end(),U.i("".concat(p," ok")),l._unreadCount=0}).catch(function(c){return l._snsModule.probeNetwork().then(function(h){var m=A(h,2),y=m[0],b=m[1];a.setError(c,y,b).end()}),U.w("".concat(p," failed. error:"),c),Me(c)})}},{key:"reset",value:function(){this._startIndex=0,this._maxLimited=100,this._currentSequence=0,this._unreadCount=0,this._friendApplicationMap.clear()}}]),D}(),C1=function(){function D(l,p){i(this,D),this.userID=l,this.remark="",this.groupList=[],this.source="",this.addTime=0,this.friendCustomField=[],this.timestamp=0;var a={},c=[];if(a.userID=l,!Ye(p))for(var h="",m="",y=0,b=p.length;y-1)this.friendCustomField.push({key:h,value:m});else if(h.indexOf("Tag_Profile_Custom")>-1)c.push({key:h,value:m});else switch(h){case Gt.NICK:a.nick=m;break;case Gt.GENDER:a.gender=m;break;case Gt.BIRTHDAY:a.birthday=m;break;case Gt.LOCATION:a.location=m;break;case Gt.SELFSIGNATURE:a.selfSignature=m;break;case Gt.ALLOWTYPE:a.allowType=m;break;case Gt.LANGUAGE:a.language=m;break;case Gt.AVATAR:a.avatar=m;break;case Gt.MESSAGESETTINGS:a.messageSettings=m;break;case Gt.ADMINFORBIDTYPE:a.adminForbidType=m;break;case Gt.LEVEL:a.level=m;break;case Gt.ROLE:a.role=m;break;case ra:this.remark=m;break;case Fa:this.addTime=m;break;case Il:this.groupList=JSON.parse(JSON.stringify(m));break;case Cl:this.source=m;break;case Tl:break;default:U.l("snsProfileItem unknown tag->",p[y].tag)}this.profile=new Rp(r(r({},a),{},{profileCustomField:c}))}return u(D,[{key:"validate",value:function(l){var p=!0,a="";if(Ye(l))return{valid:!1,tips:"empty options"};if(l.profileCustomField)for(var c=l.profileCustomField.length,h=null,m=0;m500&&(a="nick name limited: must less than or equal to ".concat(500," bytes, current size: ").concat(Sl(l[y])," bytes"),p=!1);break;case"gender":ia(ei,l.gender)||(a="key:gender, invalid value:"+l.gender,p=!1);break;case"birthday":un(l.birthday)||(a="birthday must be a number",p=!1);break;case"location":At(l.location)||(a="location must be a string",p=!1);break;case"selfSignature":At(l.selfSignature)||(a="selfSignature must be a string",p=!1);break;case"allowType":ia(ps,l.allowType)||(a="key:allowType, invalid value:"+l.allowType,p=!1);break;case"language":un(l.language)||(a="language must be a number",p=!1);break;case"avatar":At(l.avatar)||(a="avatar must be a string",p=!1);break;case"messageSettings":l.messageSettings!==0&&l.messageSettings!==1&&(a="messageSettings must be 0 or 1",p=!1);break;case"adminForbidType":ia($a,l.adminForbidType)||(a="key:adminForbidType, invalid value:"+l.adminForbidType,p=!1);break;case"level":un(l.level)||(a="level must be a number",p=!1);break;case"role":un(l.role)||(a="role must be a number",p=!1);break;default:a="unknown key:"+y+" "+l[y],p=!1}}return{valid:p,tips:a}}},{key:"update",value:function(l){var p="",a="",c=[];this.friendCustomField.forEach(function(b){c.push(b.key)});for(var h=0,m=l.length;h-1)c.indexOf(p)>-1?this.friendCustomField.forEach(function(b){b.key===p&&(b.value=a)}):this.friendCustomField.push({key:p,value:a});else if(p.indexOf("Tag_Profile_Custom")>-1){var y=!1;this.profile.profileCustomField.forEach(function(b){b.key===p&&(b.value=a,y=!0)}),y||this.profile.profileCustomField.push({key:p,value:a})}else switch(p){case Gt.NICK:this.profile.nick=a;break;case Gt.GENDER:this.profile.gender=a;break;case Gt.BIRTHDAY:this.profile.birthday=a;break;case Gt.LOCATION:this.profile.location=a;break;case Gt.SELFSIGNATURE:this.profile.selfSignature=a;break;case Gt.ALLOWTYPE:this.profile.allowType=a;break;case Gt.LANGUAGE:this.profile.language=a;break;case Gt.AVATAR:this.profile.avatar=a;break;case Gt.MESSAGESETTINGS:this.profile.messageSettings=a;break;case Gt.ADMINFORBIDTYPE:this.profile.adminForbidType=a;break;case Gt.LEVEL:this.profile.level=a;break;case Gt.ROLE:this.profile.role=a;break;case ra:this.remark=a;break;case Fa:this.addTime=a;break;case Il:this.groupList=JSON.parse(JSON.stringify(a));break;case Cl:this.source=a;break;case Tl:break;default:U.d("snsProfileItem unkown tag->",l[h].tag)}this.timestamp=Date.now(),c.length=0}},{key:"updateProfile",value:function(l){this.profile=JSON.parse(JSON.stringify(l)),this.timestamp=Date.now()}},{key:"addToGroupList",value:function(l){this.groupList.indexOf(l)===-1&&(this.groupList.push(l),this.count=this.groupList.length)}},{key:"removeFromGroupList",value:function(l){var p=this.groupList.indexOf(l);p>-1&&(this.groupList.splice(p,1),this.count=this.groupList.length)}}]),D}(),H8=function(){function D(l){i(this,D),this._snsModule=l,this._n="FriendHandler",this._friendMap=new Map,this._startIndex=0,this._standardSequence=0,this._customSequence=0,this._expirationTime=18e4}return u(D,[{key:"getLocalFriendList",value:function(){return O(this._friendMap.values())}},{key:"getFriendRemark",value:function(l){return this._friendMap.has(l)?this._friendMap.get(l).remark:""}},{key:"onFriendProfileModified",value:function(l){var p=this,a=l.dataList;if(!Ye(a)){var c=this._snsModule.getModule(dt);a.forEach(function(h){var m=h.userID,y=h.profileList;if(p.isMyFriend(m)){U.l("".concat(p._n,".onFriendProfileModified. friend account:").concat(m,", profileList:").concat(JSON.stringify(y)));var b=p._friendMap.get(m);b.update(y),c.modifyMessageSentByPeer({conversationID:"".concat(T.CONV_C2C).concat(m),latestNick:b.profile.nick,latestAvatar:b.profile.avatar})}}),this._onFriendListUpdated()}}},{key:"onFriendAdded",value:function(l){var p=this;l.length!==0&&(U.l("".concat(this._n,".onFriendAdded userIDList:").concat(l)),l.forEach(function(a){p._friendMap.set(a,new C1(a))}),this.getFriendProfile({userIDList:l}).then(function(a){l.forEach(function(c){var h=p._friendMap.get(c);h.groupList.length>0&&p._snsModule.updateWhenFriendAdded({nameList:h.groupList,userID:c})}),p._onFriendListUpdated()}))}},{key:"onFriendDeleted",value:function(l){var p=this;l.length!==0&&(U.l("".concat(this._n,".onFriendDeleted userIDList:").concat(l)),l.forEach(function(a){var c=p._friendMap.get(a);c.groupList.length>0&&p._snsModule.updateWhenFriendDeleted({nameList:c.groupList,userID:a}),p._friendMap.delete(a)}),this._onFriendListUpdated())}},{key:"_onFriendListUpdated",value:function(){this._snsModule.emitOuterEvent(R.FRIEND_LIST_UPDATED),this._snsModule.getModule(dt).checkAndPatchRemark()}},{key:"getFriendProfile",value:function(l){var p=this,a="".concat(this._n,".").concat("getFriendProfile"),c=l.userIDList,h=[],m=[],y=[];if(c.forEach(function(C){if(p._friendMap.has(C)){var E=p._friendMap.get(C);Date.now()-E.timestamp1e3&&(U.w("".concat(a," ").concat(Ba(1e3))),c.length=1e3);var m=[],y=[],b=[];if(c.forEach(function(N){p._friendMap.has(N)?b.push(N):m.push({userID:N,code:Le.NOT_MY_FRIEND,message:p._snsModule.getErrorMessage(Le.NOT_MY_FRIEND)})}),b.length===0)return Lt({successUserIDList:y,failureUserIDList:m});var C=h;(!C||C!==T.SNS_DELETE_TYPE_SINGLE&&C!==T.SNS_DELETE_TYPE_BOTH)&&(C=T.SNS_DELETE_TYPE_BOTH);var E=new We("deleteFriend");return E.setMessage("userIDList:".concat(b," type:").concat(C)),this._snsModule.request({protocolName:B0,requestData:{fromAccount:this._snsModule.getMyUserID(),userIDList:b,type:C}}).then(function(N){E.setNetworkType(p._snsModule.getNetworkType()).end(),U.i("".concat(a," ok"));var F=N.data.resultList;return Ye(F)||F.forEach(function(z){var Q=z.to,me=z.resultCode,_e=z.resultInfo;$e(me)||me===0?y.push({userID:Q}):m.push({userID:Q,code:me,message:_e})}),gt({successUserIDList:y,failureUserIDList:m})}).catch(function(N){return p._snsModule.probeNetwork().then(function(F){var z=A(F,2),Q=z[0],me=z[1];E.setError(N,Q,me).end()}),U.w("".concat(a," error:"),N),Me(N)})}},{key:"updateFriend",value:function(l){var p=this,a=l.userID,c=l.remark,h=l.friendCustomField;if(!this._friendMap.has(a))return Me({code:Le.NOT_MY_FRIEND});var m="".concat(this._n,".").concat("updateFriend"),y=new We("updateFriend");y.setMessage("userID:".concat(a," remark:").concat(c," friendCustomField:").concat(h));var b=[];return $e(c)||b.push({tag:ra,value:c}),st(h)&&h.length>0&&h.forEach(function(C){b.push({tag:C.key,value:C.value})}),this._snsModule.request({protocolName:q0,requestData:{fromAccount:this._snsModule.getMyUserID(),updateItem:[{to:a,snsItem:b}]}}).then(function(C){y.setNetworkType(p._snsModule.getNetworkType()).end(),U.i("".concat(m," ok"));var E=C.data.resultList[0],N=E.to,F=E.resultCode,z=E.resultInfo;if($e(F)||F===0){var Q=p._friendMap.get(N);return Q&&($e(c)||(Q.remark=c),st(h)&&h.length>0&&Uu(Q.friendCustomField,h),p._onFriendListUpdated()),gt(Q)}return Me({code:F,message:z})}).catch(function(C){return p._snsModule.probeNetwork().then(function(E){var N=A(E,2),F=N[0],z=N[1];y.setError(C,F,z).end()}),U.w("".concat(m," failed. error:"),C),Me(C)})}},{key:"checkFriend",value:function(l){var p=this,a="".concat(this._n,".").concat("checkFriend"),c=l.userIDList,h=l.type;(!h||h!==T.SNS_CHECK_TYPE_SINGLE&&h!==T.SNS_CHECK_TYPE_BOTH)&&(h=T.SNS_CHECK_TYPE_BOTH);var m=new We("checkFriend");return m.setMessage("userIDList:".concat(c," type:").concat(h)),this._snsModule.request({protocolName:G0,requestData:{fromAccount:this._snsModule.getMyUserID(),userIDList:c,type:h}}).then(function(y){m.setNetworkType(p._snsModule.getNetworkType()).end(),U.i("".concat(a," ok. userIDList:").concat(c," type:").concat(h));var b=[],C=[],E=y.data.resultList;return st(E)&&E.forEach(function(N){var F=N.to,z=N.relation,Q=N.resultCode,me=N.resultInfo;$e(Q)||Q===0?b.push({userID:F,code:0,relation:z}):C.push({userID:F,code:Q,message:me})}),gt({successUserIDList:b,failureUserIDList:C})}).catch(function(y){return p._snsModule.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];m.setError(y,E,N).end()}),U.w("".concat(a," failed. error:"),y),Me(y)})}},{key:"updateWhenAddedToFriendGroup",value:function(l){var p=this,a=l.name,c=l.userIDList;U.l("".concat(this._n,".updateWhenAddedToFriendGroup groupName:").concat(a," userIDList:").concat(c)),a&&!Ye(c)&&c.forEach(function(h){p._friendMap.has(h)&&p._friendMap.get(h).addToGroupList(a)})}},{key:"updateWhenRemovedFromFriendGroup",value:function(l){var p=this,a=l.name,c=l.userIDList;U.l("".concat(this._n,".updateWhenRemovedFromFriendGroup groupName:").concat(a," userIDList:").concat(c)),a&&!Ye(c)&&c.forEach(function(h){p._friendMap.has(h)&&p._friendMap.get(h).removeFromGroupList(a)})}},{key:"reset",value:function(){this._friendMap.clear(),this._startIndex=0,this._standardSequence=0,this._customSequence=0}}]),D}(),Zw=function(){function D(l){i(this,D),Ye(l)||(this.name=l.name||"",this.userIDList=l.userIDList||[],this.count=this.userIDList.length||0)}return u(D,[{key:"addToUserIDList",value:function(l){this.userIDList.indexOf(l)===-1&&(this.userIDList.push(l),this.count=this.userIDList.length)}},{key:"removeFromUserIDList",value:function(l){var p=this.userIDList.indexOf(l);p>-1&&(this.userIDList.splice(p,1),this.count=this.userIDList.length)}}]),D}(),q8=function(){function D(l){i(this,D),this._snsModule=l,this._n="FriendGroupHandler",this._friendGroupMap=new Map}return u(D,[{key:"getLocalFriendGroupList",value:function(){return O(this._friendGroupMap.values())}},{key:"_emitFriendGroupListUpdated",value:function(){var l=O(this._friendGroupMap.values());this._snsModule.emitOuterEvent(R.FRIEND_GROUP_LIST_UPDATED,l)}},{key:"getFriendGroupList",value:function(){var l=this,p="".concat(this._n,".").concat("getFriendGroupList"),a=new We("getFriendGroupList");return this._snsModule.request({protocolName:W0,requestData:{fromAccount:this._snsModule.getMyUserID()}}).then(function(c){a.setNetworkType(l._snsModule.getNetworkType()).end();var h=c.data.resultList;Ye(h)?U.i("".concat(p," ok. friend group count:0")):(U.i("".concat(p," ok. friend group count:").concat(h.length)),l._friendGroupMap.clear(),h.forEach(function(m){var y=new Zw(m);l._friendGroupMap.set(m.name,y)}),l._emitFriendGroupListUpdated())}).catch(function(c){return l._snsModule.probeNetwork().then(function(h){var m=A(h,2),y=m[0],b=m[1];a.setError(c,y,b).end()}),U.w("".concat(p," error:"),c),Me(c)})}},{key:"createFriendGroup",value:function(l){var p=this,a="".concat(this._n,".").concat("createFriendGroup"),c=l.name,h=l.userIDList;if(this._friendGroupMap.has(c))return Me({code:Le.FRIEND_GRP_EXISTED});var m=new We("createFriendGroup");return m.setMessage("name:".concat(c," userIDList:").concat(h)),this._snsModule.request({protocolName:K0,requestData:{fromAccount:this._snsModule.getMyUserID(),groupName:[c],userIDList:st(h)?h:void 0}}).then(function(y){m.setNetworkType(p._snsModule.getNetworkType()).end(),U.l("".concat(a," ok. name:").concat(c," userIDList:").concat(h));var b=y.data.resultList,C=[],E=[];b&&b.forEach(function(F){var z=F.to,Q=F.resultCode,me=F.resultInfo;if($e(Q)||Q===0)C.push(z);else{var _e={userID:F.to,code:Q,message:me};E.push(_e)}});var N=new Zw({name:c,userIDList:C});return p._friendGroupMap.set(c,N),p._snsModule.updateWhenAddedToFriendGroup({name:c,userIDList:C}),p._emitFriendGroupListUpdated(),gt({friendGroup:N,failureUserIDList:E})}).catch(function(y){return p._snsModule.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];m.setError(y,E,N).end()}),U.w("".concat(a," failed. error:"),y),Me(y)})}},{key:"deleteFriendGroup",value:function(l){var p=this,a="".concat(this._n,".").concat("deleteFriendGroup"),c=l.name;if(!this._friendGroupMap.has(c))return Me({code:Le.FRIEND_GRP_NOT_EXIST});var h=new We("deleteFriendGroup");return h.setMessage("name:".concat(c)),this._snsModule.request({protocolName:Y0,requestData:{fromAccount:this._snsModule.getMyUserID(),nameList:[c]}}).then(function(m){h.setNetworkType(p._snsModule.getNetworkType()).end(),U.l("".concat(a," ok. name:").concat(c));var y=p._friendGroupMap.get(c);return y&&(p._snsModule.updateWhenRemovedFromFriendGroup({name:c,userIDList:y.userIDList}),p._friendGroupMap.delete(c),y.userIDList.length=0),p._emitFriendGroupListUpdated(),gt(y)}).catch(function(m){return p._snsModule.probeNetwork().then(function(y){var b=A(y,2),C=b[0],E=b[1];h.setError(m,C,E).end()}),U.w("".concat(a," failed. error:"),m),Me(m)})}},{key:"renameFriendGroup",value:function(l){var p=this,a="".concat(this._n,".").concat("renameFriendGroup"),c=l.oldName,h=l.newName;if(!this._friendGroupMap.has(c))return Me({code:Le.FRIEND_GRP_NOT_EXIST});var m=new We("renameFriendGroup");return m.setMessage("oldName:".concat(c," newName:").concat(h)),this._snsModule.request({protocolName:kp,requestData:{fromAccount:this._snsModule.getMyUserID(),oldName:c,newName:h}}).then(function(){if(m.setNetworkType(p._snsModule.getNetworkType()).end(),U.l("".concat(a," ok. oldName:").concat(c," newName:").concat(h)),p._friendGroupMap.has(c)){var y=p._friendGroupMap.get(c);return y.name=h,p._friendGroupMap.delete(c),p._friendGroupMap.set(h,y),p._snsModule.updateWhenRemovedFromFriendGroup({name:c,userIDList:y.userIDList}),p._snsModule.updateWhenAddedToFriendGroup({name:h,userIDList:y.userIDList}),p._emitFriendGroupListUpdated(),gt(y)}return gt()}).catch(function(y){return p._snsModule.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];m.setError(y,E,N).end()}),U.w("".concat(a," failed. error:"),y),Me(y)})}},{key:"addToFriendGroup",value:function(l){var p=this,a="".concat(this._n,".").concat("addToFriendGroup"),c=l.name,h=l.userIDList;if(!this._friendGroupMap.has(c))return this._onFriendGroupNotExist(c);var m=new We("addToFriendGroup");return m.setMessage("name:".concat(c," userIDList:").concat(h)),U.l("".concat(a," name:").concat(c," userIDList:").concat(h)),this._snsModule.request({protocolName:kp,requestData:{fromAccount:this._snsModule.getMyUserID(),oldName:c,updateGroupItem:h.filter(function(y){return p._snsModule.isMyFriend(y)}).map(function(y){return{to:y,updateType:"Update_Type_Add"}})}}).then(function(y){return m.setNetworkType(p._snsModule.getNetworkType()).end(),p._onFriendGroupUpdated(c,y)}).catch(function(y){return p._snsModule.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];m.setError(y,E,N).end()}),U.w("".concat(a," failed. error:"),y),Me(y)})}},{key:"removeFromFriendGroup",value:function(l){var p=this,a="".concat(this._n,".").concat("removeFromFriendGroup"),c=l.name,h=l.userIDList;if(!this._friendGroupMap.has(c))return this._onFriendGroupNotExist(c);var m=new We("removeFromFriendGroup");return m.setMessage("name:".concat(c," userIDList:").concat(h)),U.l("".concat(a," name:").concat(c," userIDList:").concat(h)),this._snsModule.request({protocolName:kp,requestData:{fromAccount:this._snsModule.getMyUserID(),oldName:c,updateGroupItem:h.filter(function(y){return p._snsModule.isMyFriend(y)}).map(function(y){return{to:y,updateType:"Update_Type_Delete"}})}}).then(function(y){return m.setNetworkType(p._snsModule.getNetworkType()).end(),p._onFriendGroupUpdated(c,y)}).catch(function(y){return p._snsModule.probeNetwork().then(function(b){var C=A(b,2),E=C[0],N=C[1];m.setError(y,E,N).end()}),U.w("".concat(a," failed. error:"),y),Me(y)})}},{key:"_onFriendGroupUpdated",value:function(l,p){var a=p.data.resultList,c=this._friendGroupMap.get(l),h=[],m=[],y=[];return st(a)&&a.forEach(function(b){var C=b.to,E=b.resultCode,N=b.resultInfo,F=b.type;E===0?F==="Update_Type_Add"?c&&(c.addToUserIDList(C),m.push(C)):F==="Update_Type_Delete"&&c&&(c.removeFromUserIDList(C),y.push(C)):h.push({to:b.to,code:E,message:N})}),U.l("".concat(this._n,"._onFriendGroupUpdated name:").concat(l," userIDList:").concat(c.userIDList)),m.length>0&&this._snsModule.updateWhenAddedToFriendGroup({name:l,userIDList:m}),y.length>0&&this._snsModule.updateWhenRemovedFromFriendGroup({name:l,userIDList:y}),gt({friendGroup:c,failureUserIDList:h})}},{key:"updateWhenFriendAdded",value:function(l){var p=this,a=l.nameList,c=l.userID;U.l("".concat(this._n,".updateWhenFriendAdded userID:").concat(c," nameList:").concat(a)),Ye(a)||a.forEach(function(h){p._friendGroupMap.has(h)&&p._friendGroupMap.get(h).addToUserIDList(c)})}},{key:"updateWhenFriendDeleted",value:function(l){var p=this,a=l.nameList,c=l.userID;U.l("".concat(this._n,".updateWhenFriendDeleted userID:").concat(c," nameList:").concat(a)),Ye(a)||a.forEach(function(h){p._friendGroupMap.has(h)&&p._friendGroupMap.get(h).removeFromUserIDList(c)})}},{key:"reset",value:function(){this._friendGroupMap.clear()}}]),D}(),V8=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="SnsModule",c._friendHandler=new H8(w(c)),c._friendApplicationHandler=new B8(w(c)),c._friendGroupHandler=new q8(w(c)),c.getInnerEmitterInstance().on(ir.A2KEY_AND_TINYID_UPDATED,c.onContextUpdated,w(c)),c}return u(p,[{key:"onContextUpdated",value:function(a){this._friendHandler.pagingGetFriendList(),this._friendGroupHandler.getFriendGroupList(),this._friendApplicationHandler.getFriendApplicationList()}},{key:"onRelationChainModified",value:function(a){var c=this,h=a.dataList;if(!Ye(h)){var m=[],y=[],b=[],C=[],E=!1,N="";h.forEach(function(F){if(F.pushType!==3&&F.pushType!==4||!F.from||(N=F.from),F.friendAddAccount&&(m.push.apply(m,O(F.friendAddAccount)),C.push.apply(C,O(F.friendAddAccount))),F.friendDelAccount&&y.push.apply(y,O(F.friendDelAccount)),F.friendApplicationAdded&&b.push.apply(b,O(F.friendApplicationAdded)),F.friendApplicationDeletedUserIDList&&C.push.apply(C,O(F.friendApplicationDeletedUserIDList)),F.reportTime&&F.pushType===7&&(E=!0),F.friendUpInfo){var z={dataList:[]};F.friendUpInfo.forEach(function(Q){z.dataList.push({userID:Q.friendAccount,profileList:O(Q.sns)})}),c.onFriendProfileModified(z)}}),E&&this._friendApplicationHandler.onFriendApplicationRead(),this._friendApplicationHandler.onFriendApplicationAdded(b,N),this._friendApplicationHandler.onFriendApplicationDeleted(C),this._friendHandler.onFriendAdded(m),this._friendHandler.onFriendDeleted(y)}}},{key:"isMyFriend",value:function(a){return this._friendHandler.isMyFriend(a)}},{key:"filterProfanity",value:function(a,c){var h=this.getModule(za);if(!h)return!0;var m=h.filterText(c[a],Ce),y=m.isAllowedToSend,b=m.modifiedText;return y===!0&&(c[a]=b,!0)}},{key:"onFriendProfileModified",value:function(a){this._friendHandler.onFriendProfileModified(a)}},{key:"getLocalFriendList",value:function(){var a=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],c=this._friendHandler.getLocalFriendList();return a?Lt(c):c}},{key:"getFriendRemark",value:function(a){return this._friendHandler.getFriendRemark(a)}},{key:"getFriendList",value:function(){return this._friendHandler.pagingGetFriendList()}},{key:"addFriend",value:function(a){return this._friendHandler.addFriend(a)}},{key:"deleteFriend",value:function(a){return this._friendHandler.deleteFriend(a)}},{key:"checkFriend",value:function(a){return this._friendHandler.checkFriend(a)}},{key:"getFriendProfile",value:function(a){return this._friendHandler.getFriendProfile(a)}},{key:"updateFriend",value:function(a){return this._friendHandler.updateFriend(a)}},{key:"updateWhenAddedToFriendGroup",value:function(a){this._friendHandler.updateWhenAddedToFriendGroup(a)}},{key:"updateWhenRemovedFromFriendGroup",value:function(a){this._friendHandler.updateWhenRemovedFromFriendGroup(a)}},{key:"getLocalFriendApplicationList",value:function(){var a=this._friendApplicationHandler.getLocalFriendApplicationList();return Lt(a)}},{key:"deleteFriendApplication",value:function(a){return this._friendApplicationHandler.deleteFriendApplication(a)}},{key:"refuseFriendApplication",value:function(a){return this._friendApplicationHandler.refuseFriendApplication(a)}},{key:"acceptFriendApplication",value:function(a){return this._friendApplicationHandler.acceptFriendApplication(a)}},{key:"setFriendApplicationRead",value:function(a){return this._friendApplicationHandler.setFriendApplicationRead(a)}},{key:"getLocalFriendGroupList",value:function(){var a=this._friendGroupHandler.getLocalFriendGroupList();return Lt(a)}},{key:"createFriendGroup",value:function(a){return this._friendGroupHandler.createFriendGroup(a)}},{key:"deleteFriendGroup",value:function(a){return this._friendGroupHandler.deleteFriendGroup(a)}},{key:"addToFriendGroup",value:function(a){return this._friendGroupHandler.addToFriendGroup(a)}},{key:"removeFromFriendGroup",value:function(a){return this._friendGroupHandler.removeFromFriendGroup(a)}},{key:"renameFriendGroup",value:function(a){return this._friendGroupHandler.renameFriendGroup(a)}},{key:"onAddToFriendGroup",value:function(a){return this._friendGroupHandler.onAddToFriendGroup(a)}},{key:"updateWhenFriendAdded",value:function(a){this._friendGroupHandler.updateWhenFriendAdded(a)}},{key:"updateWhenFriendDeleted",value:function(a){this._friendGroupHandler.updateWhenFriendDeleted(a)}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._friendHandler.reset(),this._friendGroupHandler.reset(),this._friendApplicationHandler.reset()}}]),p}(Er),z8=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="WorkerTimerModule",c._isWorkerEnabled=!0,c._workerTimer=null,c._timerID=-1,c._init(),c.getInnerEmitterInstance().on(ir.CLOUD_CONFIG_UPDATED,c._onCloudConfigUpdated,w(c)),c}return u(p,[{key:"isWorkerEnabled",value:function(){return this._isWorkerEnabled&&Mr}},{key:"startWorkerTimer",value:function(){U.l("".concat(this._n,".startWorkerTimer")),this._workerTimer&&this._workerTimer.postMessage("start")}},{key:"stopWorkerTimer",value:function(){U.l("".concat(this._n,".stopWorkerTimer")),this._workerTimer&&this._workerTimer.postMessage("stop")}},{key:"_init",value:function(){if(Mr){var a=URL.createObjectURL(new Blob(['let interval = -1;onmessage = function(event) { if (event.data === "start") { if (interval > 0) { clearInterval(interval); } interval = setInterval(() => { postMessage(""); }, 1000); postMessage(interval); } else if (event.data === "stop") { clearInterval(interval); interval = -1; }};'],{type:"application/javascript; charset=utf-8"}));this._workerTimer=new Worker(a);var c=this;this._workerTimer.onmessage=function(h){h.data?(c._timerID=h.data,U.l("".concat(c._n,"._init seed:").concat(c._timerID))):c._m.onCheckTimer()}}}},{key:"_onCloudConfigUpdated",value:function(){var a=this.getCloudConfig("enable_worker");U.l("".concat(this._n,"._onCloudConfigUpdated enableWorker:").concat(a)),$e(a)||a==="1"?!this._isWorkerEnabled&&Mr&&(this._isWorkerEnabled=!0,this.startWorkerTimer(),this._m.onWorkerTimerEnabled()):this._isWorkerEnabled&&Mr&&(this._isWorkerEnabled=!1,this.stopWorkerTimer(),this._m.onWorkerTimerDisabled())}},{key:"terminate",value:function(){U.l("".concat(this._n,".terminate")),this._workerTimer&&(this._workerTimer.terminate(),this._workerTimer=null,this._timerID=-1)}},{key:"getTimerID",value:function(){return this._timerID}},{key:"reset",value:function(){U.l("".concat(this._n,".reset"))}}]),p}(Er),j8=function(){function D(){i(this,D),this._n="PurchasedFeatureHandler",this._purchasedFeatureMap=new Map}return u(D,[{key:"isValidPurchaseBits",value:function(l){return l&&typeof l=="string"&&l.length>=1&&l.length<=64&&/[01]{1,64}/.test(l)}},{key:"parsePurchaseBits",value:function(l){if(this.isValidPurchaseBits(l)){this._purchasedFeatureMap.clear();for(var p=null,a=l.length-1,c=0;a>=0;a--,c++)p=c<32?new K(0,Math.pow(2,c)).toString():new K(Math.pow(2,c-32),0).toString(),l[a]==="1"?this._purchasedFeatureMap.set(p,!0):this._purchasedFeatureMap.set(p,!1)}else U.w("".concat(this._n,".parsePurchaseBits invalid purchasebits:").concat(l))}},{key:"hasPurchasedFeature",value:function(l){return!!this._purchasedFeatureMap.get(l)}},{key:"isFeatureEnabled",value:function(l){for(var p=parseInt(l).toString(2),a=void 0,c=!0,h=p.length-1,m=0;h>=0;h--,m++)if(p.charAt(h)==="1"&&(a=m<32?new K(0,Math.pow(2,m)).toString():new K(Math.pow(2,m-32),0).toString(),!this._purchasedFeatureMap.get(a))){c=!1;break}return U.l("".concat(this._n,".isFeatureEnabled decimalNumber:").concat(l," binaryString:").concat(p," ret:").concat(c)),Lt({enabled:c})}},{key:"clear",value:function(){this._purchasedFeatureMap.clear()}}]),D}(),W8=function(){function D(l){i(this,D),this._m=l,this._n="CommercialConfigModule",this._expiredTime=0,this._isFetching=!1,this._purchasedFeatureHandler=new j8}return u(D,[{key:"_canFetch",value:function(){return this._getModule(hn).isLoggedIn()?!this._isFetching&&Date.now()>=this._expiredTime:(this._expiredTime=Date.now()+2e3,!1)}},{key:"onCheckTimer",value:function(l){this._canFetch()&&this.fetchConfig()}},{key:"fetchConfig",value:function(){var l=this,p=this._canFetch(),a="".concat(this._n,".fetchConfig");if(U.l("".concat(a," canFetch:").concat(p)),p){var c=this._getModule(Va),h=new We("fetchCommercialConfig");h.setNetworkType(c.getNetworkType());var m=this._getModule(hn).getSDKAppID(),y=this._getModule(Fi);this._isFetching=!0,y.request({protocolName:z_,requestData:{SDKAppID:m}}).then(function(b){h.setMessage("purchaseBits:".concat(b.data.purchaseBits)).end(),U.l("".concat(a," ok.")),l._parseConfig(b.data),l._isFetching=!1}).catch(function(b){c.probe().then(function(C){var E=A(C,2),N=E[0],F=E[1];h.setError(b,N,F).end()}),l._isFetching=!1})}}},{key:"onPushedConfig",value:function(l){var p="".concat(this._n,".onPushedConfig data:").concat(JSON.stringify(l));U.l("".concat(p)),new We("pushedCommercialConfig").setNetworkType(this._getModule(Va).getNetworkType()).setMessage("purchaseBits:".concat(l.purchaseBits)).end(),this._parseConfig(l)}},{key:"_parseConfig",value:function(l){var p="".concat(this._n,"._parseConfig"),a=l.errorCode,c=l.errorMessage,h=l.purchaseBits,m=l.expiredTime;a===0?(this._purchasedFeatureHandler.parsePurchaseBits(h),this._expiredTime=Date.now()+1e3*m):$e(a)?(U.l("".concat(p," failed. Invalid message format:"),l),this._setExpiredTimeOnResponseError(36e5)):(U.e("".concat(p," errorCode:").concat(a," errorMessage:").concat(c)),this._setExpiredTimeOnResponseError(12e4))}},{key:"_setExpiredTimeOnResponseError",value:function(l){this._expiredTime=Date.now()+l}},{key:"canIUse",value:function(l){return this._purchasedFeatureHandler.hasPurchasedFeature(l)}},{key:"isFeatureEnabled",value:function(l){return this._purchasedFeatureHandler.isFeatureEnabled(l)}},{key:"_getModule",value:function(l){return this._m.getModule(l)}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._expiredTime=0,this._isFetching=!1,this._purchasedFeatureHandler.clear()}}]),D}(),K8=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._m=a,c._n="OfflinePushModule",c._offlinePushPlugin=void 0,c._androidPushConfig={huaweiPushBussinessId:"",xiaomiPushBussinessId:"",xiaomiPushAppId:"",xiaomiPushAppKey:"",meizuPushBussinessId:"",meizuPushAppId:"",meizuPushAppKey:"",vivoPushBussinessId:"",fcmPushBussinessId:"",oppoPushBussinessId:"",oppoPushAppKey:"",oppoPushAppSecret:"",honorPushBussinessId:""},c._deviceToken="",c._businessID=0,c._iosBusinessID=0,c._c2cUnreadCount=0,c._groupUnreadCount=0,c._isWebUniapp=0,c}return u(p,[{key:"registerPlugin",value:function(a){if(ye){this._offlinePushPlugin=a["tim-offline-push-plugin"];var c=a.offlinePushConfig||{},h=c.huaweiBusinessID,m=c.xiaomiBusinessID,y=c.xiaomiAppID,b=c.xiaomiAppKey,C=c.meizuBusinessID,E=c.meizuAppID,N=c.meizuAppKey,F=c.vivoBusinessID,z=c.oppoBusinessID,Q=c.oppoAppKey,me=c.oppoAppSecret,_e=c.honorBusinessID,we=c.iosBusinessID;this._androidPushConfig.huaweiPushBussinessId=h,this._androidPushConfig.xiaomiPushBussinessId=m,this._androidPushConfig.xiaomiPushAppId=y,this._androidPushConfig.xiaomiPushAppKey=b,this._androidPushConfig.meizuPushBussinessId=C,this._androidPushConfig.meizuPushAppId=E,this._androidPushConfig.meizuPushAppKey=N,this._androidPushConfig.vivoPushBussinessId=F,this._androidPushConfig.oppoPushBussinessId=z,this._androidPushConfig.oppoPushAppKey=Q,this._androidPushConfig.oppoPushAppSecret=me,this._androidPushConfig.honorPushBussinessId=_e,new We("registerPlugin").setMessage("tim-offline-push-plugin").setMoreMessage("isExist:".concat(!$e(this._offlinePushPlugin))).end(!0),U.l("".concat(this._n,".").concat("registerPlugin"," ok. offlinePushConfig:").concat(JSON.stringify(a.offlinePushConfig))),this._iosBusinessID=we,this._setAppShowListener()}else this.outputWarning("OfflinePushInUniapp")}},{key:"init",value:function(){this._isWebUniapp=this.getUniAppPlatform(),this._getDeviceToken()}},{key:"_getDeviceToken",value:function(){var a=this,c="".concat(this._n,".").concat("_getDeviceToken");if(Bo(this._offlinePushPlugin.getDeviceToken)){var h="androidPushConfig:".concat(JSON.stringify(this._androidPushConfig),", iosBusinessID:").concat(this._iosBusinessID);U.l("".concat(c," start. ").concat(h)),new We("_getDeviceToken").setMessage("".concat(h)).end(!0),this._offlinePushPlugin.getDeviceToken(this._androidPushConfig,function(m){var y=new We("getDeviceTokenRes"),b=m.code,C=m.msg;if(b===0){var E=m.data,N=E.deviceToken,F=E.deviceBrand,z=E.deviceType,Q=E.bussinessId;a._deviceToken=N,a._businessID=Q||a._iosBusinessID,h="deviceToken:".concat(N,", deviceBrand:").concat(F||z,", businessID:").concat(a._businessID),U.l("".concat(c," ok. ").concat(h)),y.setMessage(h).end(!0),a._setToken()}else y.setMessage("code:".concat(b,", msg:").concat(C)).end(!0),U.e("".concat(c," failed. error:"),m)})}else U.e("".concat(c," getDeviceToken is not a function"))}},{key:"canIUseOfflinePush",value:function(){return ye&&!$e(this._offlinePushPlugin)}},{key:"_setAppShowListener",value:function(){var a=this,c="".concat(this._n,".").concat("_setAppShowListener");$e(this._offlinePushPlugin)?U.e("".concat(c," offlinePushPlugin is undefined")):Bo(this._offlinePushPlugin.setAppShowListener)?(new We("_setAppShowListener").end(!0),U.l("".concat(c," start")),this._offlinePushPlugin.setAppShowListener(function(h){var m=(h||{}).appShow;new We("setAppShowListenerRes").setMessage("appShow:".concat(m)).end(!0),U.l("".concat(c," ok. appShow:").concat(m)),a._m.isReady()&&(m===0?(a._getConvUnreadCount(),a._onBackground()):m===1&&a._onForeground())})):U.e("".concat(c," setAppShowListener is not a function"))}},{key:"getDeviceBrand",value:function(){if(!$e(this._offlinePushPlugin)&&Bo(this._offlinePushPlugin.getDeviceType)){var a=(this._offlinePushPlugin.getDeviceType()||{}).deviceType;return U.l("".concat(this._n,".getDeviceBrand ok. deviceType:").concat(a)),a}}},{key:"_setToken",value:function(){var a,c=this,h="".concat(this._n,"._setToken"),m=this.getModule(hn),y=1,b="",C="";Ye(this._deviceToken)&&(y=0);var E=this.getUniAppPlatform(),N=this.getDeviceBrand();E===X.IOS||E===X.IPAD||E===X.MAC?C=this._deviceToken:E===X.ANDROID&&(b=this._deviceToken);var F=new We("offlinePushSetToken");return a="deviceToken:".concat(C||b,", businessID:").concat(this._businessID,", ")+"deviceBrand:".concat(N,", isWebUniapp:").concat(this._isWebUniapp,", pushMsg:").concat(y,", platform:").concat(E),F.setMessage("".concat(a)),U.l("".concat(h," ").concat(a)),this.request({protocolName:e1,requestData:{tokenID:b,pushMsg:y,sdkAppID:m.getSDKAppID(),businessID:parseInt(this._businessID),deviceBrand:N,deviceToken:C,isWebUniapp:this._isWebUniapp}}).then(function(z){return F.end(),U.l("".concat(h," ok")),z}).catch(function(z){return c.probeNetwork().then(function(Q){var me=A(Q,2),_e=me[0],we=me[1];F.setError(z,_e,we).end()}),U.e("".concat(h," failed. error:"),z),Me(z)})}},{key:"_getConvUnreadCount",value:function(){var a=this;this._c2cUnreadCount=0,this._groupUnreadCount=0,this.getModule(dt).getLocalConversationList().forEach(function(c){c.type===T.CONV_C2C&&(a._c2cUnreadCount+=c.unreadCount),c.type===T.CONV_GROUP&&(a._groupUnreadCount+=c.unreadCount)})}},{key:"_onBackground",value:function(){var a=this,c="".concat(this._n,".").concat("_onBackground"),h=new We("_onBackground");this.request({protocolName:Z_,requestData:{c2cUnreadCount:this._c2cUnreadCount,groupUnreadCount:this._groupUnreadCount,isWebUniapp:this._isWebUniapp}}).then(function(m){return h.setMessage("c2cUnreadCount: ".concat(a._c2cUnreadCount,", groupUnreadCount: ").concat(a._groupUnreadCount)).end(),U.l("".concat(c," ok")),m}).catch(function(m){a.probeNetwork().then(function(y){var b=A(y,2),C=b[0],E=b[1];h.setError(m,C,E).end()}),U.e("".concat(c," failed. error:"),m)})}},{key:"_onForeground",value:function(){var a=this,c="".concat(this._n,".").concat("_onForeground"),h=new We("_onForeground");this.request({protocolName:Q_,requestData:{isWebUniapp:this._isWebUniapp}}).then(function(m){return h.end(),U.l("".concat(c," ok")),m}).catch(function(m){a.probeNetwork().then(function(y){var b=A(y,2),C=b[0],E=b[1];h.setError(m,C,E).end()}),U.e("".concat(c," failed. error:"),m)})}},{key:"getUniAppPlatform",value:function(){var a=uni.getSystemInfoSync().platform,c=this.getDeviceBrand();return a==="ios"?X.IOS:a==="android"?X.ANDROID:c===1002?X.IPAD:c===1001?X.MAC:void 0}},{key:"reset",value:function(){this._deviceToken="",this._businessID=0,this._c2cUnreadCount=0,this._groupUnreadCount=0,this._isWebUniapp=0,U.l("".concat(this._n,".reset"))}}]),p}(Er),Y8=function(D){f(p,D);var l=L(p);function p(a){var c;return i(this,p),(c=l.call(this,a))._n="ProfanityFilterModule",c._plugin=null,c._filterConfigMap=new Map,c._startIndex=0,c._version=0,c._canIUseLexicon=!1,c._isFetching=!1,c._expiredTime=0,c}return u(p,[{key:"init",value:function(){var a=this.getModule(Ng).getPlugin("tim-profanity-filter-plugin");a?(this._plugin=new a({logger:U,isArray:st,isMap:Md,isDevMode:this.isDevMode()}),this._getLexicon()):this.outputWarning("ProfanityPluginNotFound")}},{key:"onCheckTimer",value:function(){this._plugin&&this._canIUseLexicon&&this.isLoggedIn()&&!this._isFetching&&Date.now()>=this._expiredTime&&this._getLexicon()}},{key:"filterMessage",value:function(a,c){var h=!0;if(!this._plugin||!this._canIUseLexicon||c&&c.messageControlInfo&&c.messageControlInfo.excludedFromContentModeration===!0)return h;var m=a.type,y=a.conversationType;if(m!==T.MSG_TEXT&&m!==T.MSG_CUSTOM)return h;var b,C="".concat(this._n,".filterMessage");if(U.l("".concat(C)),m===T.MSG_TEXT){if(y===T.CONV_C2C?b=Ee:y===T.CONV_GROUP&&(b=V),!this._isConfigOn(b))return h;var E=this._plugin.filter(a.payload.text),N=E.type,F=E.modifiedText;N===1?h=!1:N===2&&(a.payload.text=F)}else if(m===T.MSG_CUSTOM){if(y===T.CONV_C2C?b=pe:y===T.CONV_GROUP&&(b=ee),!this._isConfigOn(b))return h;var z=this._plugin.filter(a.payload.data),Q=this._plugin.filter(a.payload.description),me=this._plugin.filter(a.payload.extension);z.type===1||Q.type===1||me.type===1?h=!1:(z.type===2&&(a.payload.data=z.modifiedText),Q.type===2&&(a.payload.description=Q.modifiedText),me.type===2&&(a.payload.extension=me.modifiedText))}return U.l("".concat(C," done. isAllowedToSend:").concat(h)),h}},{key:"filterText",value:function(a,c){var h="".concat(this._n,".filterText"),m={isAllowedToSend:!0,modifiedText:a};if(!this._plugin||!this._canIUseLexicon||!this._isConfigOn(c))return m;U.l("".concat(h));var y=this._plugin.filter(a),b=y.type,C=y.modifiedText;return b===1?m.isAllowedToSend=!1:b===2&&(m.modifiedText=C),U.l("".concat(h," done. ret:"),m),m}},{key:"_getLexicon",value:function(){var a=this,c=new We("profanityFilter"),h="".concat(this._n,"._getLexicon");this._isFetching=!0,this.request({protocolName:t1,requestData:{startIndex:this._startIndex,version:this._version}}).then(function(m){var y=m.data,b=y.errorInfo,C=y.filterConfig,E=y.lexicon,N=y.strToken,F=y.completeFlag,z=y.nextStartIndex,Q=y.version,me=y.expiredTime,_e=b.errorCode,we=b.errorMessage;return _e!==0?(a._isFetching=!1,U.w("".concat(h," failed. error:"),b),void c.setCode(_e).setMessage(we).end()):(a._onFilterConfig(C),a._getToken(N),F===1?(U.l("".concat(h," done. version:").concat(Q," expiredTime:").concat(me)),a._version=Q,a._canIUseLexicon=!0,a._isFetching=!1,a._expiredTime=Date.now()+1e3*me,void a._plugin.onLexiconCompleted(E)):(a._startIndex=z,a._plugin.onLexiconSliced(E),void a._getLexicon()))}).catch(function(m){a.probeNetwork().then(function(y){var b=A(y,2),C=b[0],E=b[1];c.setError(m,C,E).end()}),a._isFetching=!1,U.l("".concat(h," failed. error:"),m)})}},{key:"_onFilterConfig",value:function(a){var c=this;Ye(a)||(this._filterConfigMap.clear(),Object.keys(a).forEach(function(h){c._filterConfigMap.set(h,a[h])}),U.l("".concat(this._n,"._onFilterConfig. keys:").concat(Array.from(this._filterConfigMap.keys())," values:").concat(Array.from(this._filterConfigMap.values()))))}},{key:"_isConfigOn",value:function(a){return this._filterConfigMap.get(a)===1}},{key:"_getToken",value:function(a){if(At(a)){var c=a.length,h="";if(c%2==0)for(var m=0;m<=c-1;m+=2)h+=a[m+1],h+=a[m];else{for(var y=0;y=this.STORAGE_EXPIRES_TIME,h=!a||a!=="3.1.1";return U.l("".concat(this._n,"._needToUpdate isTimeout:").concat(c," isDifferentVersion:").concat(h)),c||h}},{key:"_fetch",value:function(){if(!this._m.getModule(hn).isPrivateNetWork()){var l="https://web.sdk.qcloud.com/im/download/error-message/v3/0.0.1/tim-error-message.txt",p="application/x-www-form-urlencoded;charset=UTF-8",a="".concat(this._n,"._fetch ok in"),c=this;if(je)Fe.request({url:l,method:"GET",timeout:3e3,header:{"content-type":p},dataType:"text",success:function(y){c._fillAndSave(y.data),U.l("".concat(a," mini program"))},fail:function(){}});else{var h=new XMLHttpRequest,m=setTimeout(function(){h.abort()},3e3);h.onreadystatechange=function(){h.readyState===4&&(clearTimeout(m),h.status!==200&&h.status!==304||(U.l("".concat(a," browser")),c._fillAndSave(h.responseText)))},h.open("GET",l,!0),h.setRequestHeader("Content-type",p),h.send()}}}},{key:"_fillAndSave",value:function(l){this._fillMap(l),this._getStorageModule().setItem(this.TIM_ERROR_ASSISTANCE,JSON.stringify({message:l,localSavedTime:new Date().getTime(),localSavedVersion:"3.1.1"}),!0,!1)}},{key:"_getStorageModule",value:function(){return this._m.getModule(aa)}},{key:"_fillMap",value:function(l){this._map.clear();for(var p,a,c,h=l.split(`; `),m=h.length,y=new RegExp(/'/g),b=0;b0&&a.forEach(function(c){var h=p.getPayloadData(c);h&&p._handleActionType(h,c)})}},{key:"onMessageModified",value:function(l){var p=this,a=this._signalingModule.filterMessageList(l);a.length>0&&a.forEach(function(c){var h=p.getPayloadData(c);h&&p._onInvitationModified(h,c)})}},{key:"getPayloadData",value:function(l){var p="".concat(this._n,".getPayloadData"),a=l.payload.data;try{return JSON.parse(a)}catch{return U.e("".concat(p," JSON parse error. signalingData:").concat(a)),null}}},{key:"_handleActionType",value:function(l,p){switch(l.actionType){case x.ACTION_TYPE_INVITE:this._onNewInvitationReceived(l,p);break;case x.ACTION_TYPE_REJECT_INVITE:this._onInviteeRejected(l);break;case x.ACTION_TYPE_ACCEPT_INVITE:this._onInviteeAccepted(l);break;case x.ACTION_TYPE_CANCEL_INVITE:this._onInvitationCancelled(l);break;case x.ACTION_TYPE_INVITE_TIMEOUT:this._onInvitationTimeout(l)}}},{key:"_createDefaultEmitData",value:function(l){return{inviteID:l.inviteID,inviter:l.inviter,groupID:l.groupID,data:l.data||""}}},{key:"_onNewInvitationReceived",value:function(l,p){var a="".concat(this._n,"._onNewInvitationReceived"),c=l.inviteID,h=l.inviteeList,m=l.groupID,y=this._signalingModule.getMyUserID(),b=h.includes(y),C=Math.round(l.timeout-(new Date().getTime()-1e3*p.time)/1e3);if(U.l("".concat(a," myselfIncluded:").concat(b," groupID:").concat(m," timeout:").concat(C,"s signalObj:").concat(JSON.stringify(l))),m&&b||!m){var E=this._signalingModule.getInviteInfo(c);if(E&&E===l)return;E||this._signalingModule.setInviteInfo(c,r(r({},l),{},{message:p})),this._signalingModule.emitEvent(x.NEW_INVITATION_RECEIVED,r(r({},this._createDefaultEmitData(l)),{},{inviteeList:h})),this._signalingModule.startTimer(r(r({},l),{},{timeout:C}))}}},{key:"_onInviteeRejected",value:function(l){var p="".concat(this._n,"._onInviteeRejected"),a=l.inviteID,c=l.inviter,h=l.groupID,m=this._signalingModule.hasInviteInfo(a);U.l("".concat(p," inviteID:").concat(a," hasInviteID:").concat(m," inviter:").concat(c," groupID:").concat(h)),(h&&m||!h)&&(this._signalingModule.updateInviteInfo(l),this._signalingModule.emitEvent(x.INVITEE_REJECTED,r(r({},this._createDefaultEmitData(l)),{},{invitee:l.inviteeList[0]})))}},{key:"_onInviteeAccepted",value:function(l){var p="".concat(this._n,"._onInviteeAccepted"),a=l.inviteID,c=l.inviter,h=l.groupID,m=this._signalingModule.hasInviteInfo(a);U.l("".concat(p," inviteID:").concat(a," hasInviteID:").concat(m," inviter:").concat(c," groupID:").concat(h)),(h&&m||!h)&&(this._signalingModule.updateInviteInfo(l),this._signalingModule.emitEvent(x.INVITEE_ACCEPTED,r(r({},this._createDefaultEmitData(l)),{},{invitee:l.inviteeList[0]})))}},{key:"_onInvitationCancelled",value:function(l){var p="".concat(this._n,"._onInvitationCancelled"),a=l.inviteID,c=l.inviter,h=l.groupID,m=this._signalingModule.hasInviteInfo(a);U.l("".concat(p," inviteID:").concat(a," hasInviteID:").concat(m," inviter:").concat(c," groupID:").concat(h)),(h&&m||!h)&&(this._signalingModule.deleteInviteInfo(a),this._signalingModule.emitEvent(x.INVITATION_CANCELLED,this._createDefaultEmitData(l)))}},{key:"_onInvitationTimeout",value:function(l){var p="".concat(this._n,"._onInvitationTimeout"),a=l.inviteID,c=l.inviter,h=l.groupID,m=l.inviteeList,y=this._signalingModule.hasInviteInfo(a);U.l("".concat(p," inviteID:").concat(a," hasInviteID:").concat(y," inviter:").concat(c," groupID:").concat(h," data:").concat(l.data)),(h&&y||!h)&&(this._signalingModule.updateInviteInfo(l),this._signalingModule.emitEvent(x.INVITATION_TIMEOUT,r(r({},this._createDefaultEmitData(l)),{},{inviteeList:m,isSelfTimeout:!1})))}},{key:"_onInvitationModified",value:function(l,p){var a="".concat(this._n,"._onInvitationModified"),c=l.inviteID,h=l.data;U.l("".concat(a," inviteID:").concat(c," data:").concat(h)),this._signalingModule.setInviteInfo(c,r(r({},l),{},{message:p})),this._signalingModule.emitEvent(x.INVITATION_MODIFIED,{inviteID:c,data:h})}}]),D}(),Q8=function(D){if(D<0||D>53)return NaN;var l=0|1073741824*Math.random();return D>30?l+1073741824*(0|Math.random()*(1<>>30-D},ex=function(D,l){for(var p=D.toString(16),a=l-p.length,c="0";a>0;a>>>=1,c+=c)1&a&&(p=c+p);return p},tx=function(){function D(l){i(this,D),this._n="LocalSignalingHandler",this._signalingModule=l}return u(D,[{key:"generateInviteID",value:function(){var l,p,a=(p=ex)((l=Q8)(32),8)+"-"+p(l(16),4)+"-"+p(16384|l(12),4)+"-"+p(32768|l(14),4)+"-"+p(l(48),12);return U.l("".concat(this._n,".generateInviteID inviteID:").concat(a)),a}},{key:"createInviteInfo",value:function(l){var p=this.generateInviteID(),a=this.createInviteCustomData(r(r({},l),{},{inviteID:p})),c=a.groupID,h=a.inviteeList,m=c||h[0];return{customData:a,message:this.createSignalingMessage(a,m),inviteID:p}}},{key:"_createDefaultCustomData",value:function(l){var p=l.data,a=p===void 0?"":p,c=l.inviteID,h=c===void 0?"":c,m=l.groupID;return{businessID:1,timeout:0,data:a,inviteID:h,groupID:m===void 0?"":m}}},{key:"createInviteCustomData",value:function(l){var p=l.userID,a=l.timeout,c=a===void 0?0:a,h=l.groupID,m=h===void 0?"":h,y=this._signalingModule.getMyUserID(),b=r(r({},this._createDefaultCustomData(l)),{},{actionType:x.ACTION_TYPE_INVITE,inviter:y,inviteeList:m?l.inviteeList:[p],timeout:c});return U.l("".concat(this._n,".createInviteCustomData customData:").concat(JSON.stringify(b))),b}},{key:"createCancelCustomData",value:function(l){var p,a="".concat(this._n,".createCancelCustomData"),c=l.inviteID,h=this._signalingModule.getMyUserID(),m=this._signalingModule.getInviteInfo(c),y=m.inviteeList,b=m.groupID,C=m.inviter;return C===h?p=r(r({},this._createDefaultCustomData(l)),{},{actionType:x.ACTION_TYPE_CANCEL_INVITE,groupID:b,inviter:h,inviteeList:y}):U.e("".concat(a," unmatched inviter:").concat(C," and my userID:").concat(h)),U.l("".concat(a," customData:").concat(JSON.stringify(p))),p}},{key:"createAcceptCustomData",value:function(l){var p,a="".concat(this._n,".createAcceptCustomData"),c=l.inviteID,h=this._signalingModule.getMyUserID(),m=this._signalingModule.getInviteInfo(c),y=m.inviter,b=m.groupID;return m.inviteeList.includes(h)?p=r(r({},this._createDefaultCustomData(l)),{},{actionType:x.ACTION_TYPE_ACCEPT_INVITE,groupID:b,inviter:y,inviteeList:[h]}):U.e("".concat(a," userID:").concat(h," not in inviteeList. inviteID:").concat(c," groupID:").concat(b)),U.l("".concat(a," customData:").concat(JSON.stringify(p))),p}},{key:"createRejectCustomData",value:function(l){var p,a="".concat(this._n,".createRejectCustomData"),c=l.inviteID,h=this._signalingModule.getMyUserID(),m=this._signalingModule.getInviteInfo(c),y=m.inviter,b=m.groupID;return m.inviteeList.includes(h)?p=r(r({},this._createDefaultCustomData(l)),{},{actionType:x.ACTION_TYPE_REJECT_INVITE,groupID:b,inviter:y,inviteeList:[h]}):U.e("".concat(a," userID:").concat(h," not in inviteeList. inviteID:").concat(c," groupID:").concat(b)),U.l("".concat(a," customData:").concat(JSON.stringify(p))),p}},{key:"createTimeoutCustomData",value:function(l){var p="".concat(this._n,".createTimeoutCustomData"),a=l.inviteeList,c=l.inviter,h=l.isInviter,m=h!==void 0&&h,y=this._signalingModule.getMyUserID(),b=r(r({},this._createDefaultCustomData(l)),{},{actionType:x.ACTION_TYPE_INVITE_TIMEOUT,inviter:c,inviteeList:m?a:[y]});return U.l("".concat(p," customData:").concat(JSON.stringify(b))),b}},{key:"createSignalingMessage",value:function(l,p){var a=l.groupID,c=l.inviter,h=this._signalingModule.getModule(lr),m={to:p||a||c,conversationType:a?T.CONV_GROUP:T.CONV_C2C,priority:T.MSG_PRIORITY_HIGH,payload:{data:JSON.stringify(l)}},y=h.createCustomMessage(m);return U.d("".concat(this._n,".createSignalingMessage. message:").concat(JSON.stringify(y))),y}}]),D}(),nx=function(){function D(l){i(this,D),this._n="HistorySignalingHandler",this._signalingModule=l,this.EXPIRED_TIME=3e4,this.COUNT=20,this._signalingMap=new Map,this._signalingRelatedToMeMap=new Map}return u(D,[{key:"getHistorySignaling",value:function(){var l=this,p=this._signalingModule.getModule(dt).getLocalConversationList();Ye(p)||this._getSignalingList(p).then(function(a){l._handleSignalingList(a)})}},{key:"_getSignalingList",value:function(l){var p=this,a=this._getValidConversationList(l),c=this._createPromiseList(a);return Ye(c)?Promise.resolve([]):this._concurrentGetMessageList(c).then(function(h){var m=new Map;return h.forEach(function(y){var b=y.signalingList,C=p._getSignalingRelatedToMeMap(b);m=new Map([].concat(O(m),O(C)))}),p._sortSignaling(m)})}},{key:"_handleSignalingList",value:function(l){Ye(l)||(U.d("".concat(this._n,"._handleSignalingList signalingList:").concat(JSON.stringify(l))),this._signalingModule.onNewMessageList(l))}},{key:"_isSignalingNotExpired",value:function(l,p){return l[p]&&1e3*l[p]>new Date().getTime()-this.EXPIRED_TIME}},{key:"_getValidConversationList",value:function(l){for(var p=[],a=0;a0&&b&&p.push(l[a])}return p}},{key:"_createPromiseList",value:function(l){for(var p=[],a=0;a0?p._concurrentGetMessageList(a):p._signalingMap})}},{key:"_relayGetMessageList",value:function(l){var p=l.messageList,a=l.nextReqMessageID,c=l.isCompleted,h=p.length;if(h===0)return null;var m=p[0],y=m.conversationID,b=m.conversationType,C=this._signalingMap.get(y).needMessageCount,E=b===T.CONV_GROUP,N=C===0||c,F=this._isSignalingNotExpired(p[h-1],"time");return E||N||!F?null:this._signalingModule.getModule(dt).getMessageList({conversationID:y,nextReqMessageID:a,count:C})}},{key:"_handleMessageList",value:function(l){for(var p=l.length,a=l[0].conversationID,c=this._signalingMap.get(a),h=c.needMessageCount,m=c.signalingList,y=h-p>0?h-p:0,b=[],C=0;C0&&arguments[0]!==void 0?arguments[0]:{},c=a.messageControlInfo,h=c===void 0?{}:c,m=a.data,y=m===void 0?"":m,b=a.onlineUserOnly,C=a.inviteID,E=C===void 0?"":C,N=!!y.match(/"excludeFromHistoryMessage"/),F={};return E&&(F=this.getInviteInfo(E).message),{onlineUserOnly:b||F._onlineUserOnly,messageControlInfo:r(r({},h),{},{excludedFromUnreadCount:N||h.excludedFromUnreadCount,excludedFromLastMessage:N||h.excludedFromLastMessage,excludedFromContentModeration:!0})}}},{key:"sendSignaling",value:function(a,c){var h=this;return this.getModule(lr).sendMessageInstance(a,this._genMessageControlInfo(c)).catch(function(m){return h._isHandling=!1,Me({code:Le.SEND_MESSAGE_FAILED_WITH_CANCEL})})}},{key:"filterMessageList",value:function(a){var c=this;return a.filter(function(h){return c._filterSignalingMessage(h)})}},{key:"_filterSignalingMessage",value:function(a){var c=!1;if(a.type&&a.type===T.MSG_CUSTOM){var h=a.cloudCustomData,m=h===void 0?"":h,y=a.payload.data,b=y===void 0?"":y,C=m.match(/"type":"tsignaling"/),E=b.match(/inviteID/),N=b.match(/actionType/);c=C||E&&N}return c}},{key:"startTimer",value:function(a){var c=this,h="".concat(this._n,".startTimer"),m=a.timeout,y=a.inviteID,b=a.inviter,C=a.groupID,E=b===this.getMyUserID();if(U.l("".concat(h," timeout:").concat(m," isInviter:").concat(E," groupID:").concat(C)),!(m<=0))var N=E?m+5:m,F=1,z=setInterval(function(){var Q=c._hasLocalInviteInfo(a,E);F0:b.length>0&&b.includes(this.getMyUserID()))}},{key:"_getReceiver",value:function(a,c){var h=c.groupID,m=c.inviteeList,y=c.inviter;return a?h||m[0]:h||y}},{key:"_sendTimeoutNotice",value:function(a,c){var h=this,m=this.getInviteInfo(a),y=this._getReceiver(c,m);U.l("".concat(this._n,"._sendTimeoutNotice inviteID:").concat(a," to:").concat(y," isInviter:").concat(c));var b=this._localSignalingHandler.createTimeoutCustomData(r(r({},m),{},{isInviter:c})),C=this._localSignalingHandler.createSignalingMessage(b,y);return this.sendSignaling(C).then(function(E){if(E&&E.code===0){var N=b.data,F=b.groupID,z=b.inviteeList,Q=b.inviter;h.emitEvent(x.INVITATION_TIMEOUT,{data:N,groupID:F,inviteID:a,inviteeList:z,inviter:Q,isSelfTimeout:!0}),c?h.deleteInviteInfo(a):h.updateInviteInfo(b)}})}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),this._inviteInfoMap.clear(),this._canIUseSignaling=!1,this._isHandling=!1,this._historySignalingHandler.reset(),this._isC2CUnreadHandleCompleted=!1,this._isConvSyncCompleted=!1,this._isSyncCompleted=!1}}]),p}(Er),ax=function(){function D(l){var p=this;i(this,D);var a,c=new We("sdkConstruct");this._n="ModuleManager",this._isReady=!1,this._reason=Le.USER_NOT_LOGGED_IN,this._startLoginTs=0,this._moduleMap=new Map,this._innerEmitter=null,this._outerEmitter=null,this._checkCount=0,this._checkTimer=-1,this._moduleMap.set(hn,new X6(this,l)),this._moduleMap.set(Ip,new W8(this)),this._moduleMap.set(bp,new N8(this)),this._moduleMap.set(Mp,new z8(this)),this._moduleMap.set(qo,new G8(this)),this._moduleMap.set(Fs,new S8(this)),this._moduleMap.set(Fi,new O8(this)),this._moduleMap.set(qa,new Q6(this)),this._moduleMap.set(lr,new f8(this)),this._moduleMap.set(yp,new p8(this)),this._moduleMap.set(Cw,new h8(this)),this._moduleMap.set(yr,new J6(this)),this._moduleMap.set(ao,new h6(this)),this._moduleMap.set(dt,new S6(this)),this._moduleMap.set(Tt,new q6(this)),this._moduleMap.set(ur,new j6(this)),this._moduleMap.set(aa,new e8(this)),this._moduleMap.set(Tw,new X8(this)),this._moduleMap.set(S0,new n8(this)),this._moduleMap.set(Va,new o8(this)),this._moduleMap.set(Mw,new s8(this)),this._moduleMap.set(Ng,new g8(this)),this._moduleMap.set(k0,new m8(this)),this._moduleMap.set(_p,new R8(this)),this._moduleMap.set(Iw,new P8(this)),this._moduleMap.set(_r,new V8(this)),this._moduleMap.set(Cp,new K8(this)),this._moduleMap.set(za,new Y8(this)),this._moduleMap.set(D0,new J8(this)),this._moduleMap.set(oi,new sx(this)),this._eventThrottleMap=new Map,_n(l.modules)&&Object.keys(l.modules).forEach(function(C){a=l.modules[C],C==="group-module"?p._moduleMap.set(Tt,new a(p)):C==="relationship-module"?p._moduleMap.set(_r,new a(p)):C==="signaling-module"&&p._moduleMap.set(oi,new a(p))});var h=l.instanceID,m=l.SDKAppID,y=this._moduleMap.get(hn).isIntl(),b="instanceID:".concat(h," SDKAppID:").concat(m," host:").concat(xs()," isIntl:").concat(y," inBrowser:").concat(ct," inMiniApp:").concat(je)+" workerAvailable:".concat(Mr," UserAgent:").concat(at);We.bindEventStatModule(this._moduleMap.get(S0)),c.setMessage("".concat(b," ").concat(function(){var C="";if(je)try{var E=Fe.getSystemInfoSync(),N=E.model,F=E.version,z=E.system,Q=E.platform,me=E.SDKVersion;C="model:".concat(N," version:").concat(F," system:").concat(z," platform:").concat(Q," SDKVersion:").concat(me)}catch{C=""}return C}())).end(),U.i("SDK ".concat(b)),Fn.prototype._getErrorMessage=this.getErrorMessage.bind(this),this._readyList=void 0,this._ssoLogForReady=null,this._initReadyList()}return u(D,[{key:"_startTimer",value:function(){var l=this._moduleMap.get(Mp),p=l.isWorkerEnabled();U.l("".concat(this._n,".startTimer isWorkerEnabled:").concat(p," seed:").concat(this._checkTimer)),p?l.startWorkerTimer():this._startMainThreadTimer()}},{key:"_startMainThreadTimer",value:function(){this._checkTimer<0&&(this._checkTimer=setInterval(this.onCheckTimer.bind(this),1e3)),U.l("".concat(this._n,"._startMainThreadTimer seed:").concat(this._checkTimer))}},{key:"stopTimer",value:function(){var l=this._moduleMap.get(Mp),p=l.isWorkerEnabled();U.l("".concat(this._n,".stopTimer isWorkerEnabled:").concat(p," seed:").concat(this._checkTimer)),p?l.stopWorkerTimer():this._stopMainThreadTimer()}},{key:"_stopMainThreadTimer",value:function(){U.l("".concat(this._n,"._stopMainThreadTimer")),this._checkTimer>0&&(clearInterval(this._checkTimer),this._checkTimer=-1,this._checkCount=0)}},{key:"_stopMainThreadSocket",value:function(){U.l("".concat(this._n,"._stopMainThreadSocket"));var l=this._moduleMap.get(Fs);l.setIsWorkerEnabled(!0),l.reConnect()}},{key:"_startMainThreadSocket",value:function(){U.l("".concat(this._n,"._startMainThreadSocket"));var l=this._moduleMap.get(Fs);l.setIsWorkerEnabled(!1),l.reConnect()}},{key:"onWorkerTimerEnabled",value:function(){U.l("".concat(this._n,".onWorkerTimerEnabled, disable main thread timer and socket")),this._stopMainThreadTimer(),this._stopMainThreadSocket()}},{key:"onWorkerTimerDisabled",value:function(){U.l("".concat(this._n,".onWorkerTimerDisabled, enable main thread timer and socket")),this._startMainThreadTimer(),this._startMainThreadSocket()}},{key:"onCheckTimer",value:function(){this._checkCount+=1;var l,p=$(this._moduleMap);try{for(p.s();!(l=p.n()).done;){var a=A(l.value,2)[1];a.onCheckTimer&&a.onCheckTimer(this._checkCount)}}catch(c){p.e(c)}finally{p.f()}}},{key:"_initReadyList",value:function(){var l=this;this._readyList=[this._moduleMap.get(qa)],this._readyList.forEach(function(p){p.ready(function(){return l._onModuleReady()})})}},{key:"_onModuleReady",value:function(){var l=!0;if(this._readyList.forEach(function(h){h.isReady()||(l=!1)}),l&&!this._isReady){this._isReady=!0,this._outerEmitter.emit(R.SDK_READY);var p=Date.now()-this._startLoginTs;U.w("SDK is ready. cost ".concat(p," ms")),this._startLoginTs=Date.now();var a=this._moduleMap.get(Va).getNetworkType(),c=this._ssoLogForReady.getStartTs()+Sn;this._ssoLogForReady.setNetworkType(a).setMessage(p).start(c).end()}}},{key:"login",value:function(){this._startLoginTs===0&&(xn(),this._startLoginTs=Date.now(),this._startTimer(),this._moduleMap.get(Va).start(),this._ssoLogForReady=new We("sdkReady"),this._reason=Le.LOGGING_IN)}},{key:"onLoginFailed",value:function(){this._startLoginTs=0}},{key:"getOuterEmitterInstance",value:function(){return this._outerEmitter===null&&(this._outerEmitter=new y1,p6(this._outerEmitter),this._outerEmitter._emit=this._outerEmitter.emit,this._outerEmitter.emit=(function(l,p){var a=this;if(this._canIUseSignaling()){if(l===R.MESSAGE_RECEIVED){var c=this.getModule(oi);c.onNewMessageList(p)}if(l===R.MESSAGE_MODIFIED){var h=this.getModule(oi);h.onMessageModified(p)}}if(l===R.CONVERSATION_LIST_UPDATED||l===R.FRIEND_LIST_UPDATED||l===R.GROUP_LIST_UPDATED||l===R.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED)if(this._eventThrottleMap.has(l)){var m=Date.now(),y=this._eventThrottleMap.get(l);m-y.last<=1e3?(y.timeoutID&&clearTimeout(y.timeoutID),y.timeoutID=setTimeout(function(){y.last=Date.now(),a._outerEmitter._emit.apply(a._outerEmitter,[l,{name:l,data:a._getEventData(l)}])},1e3)):(y.last=m,this._outerEmitter._emit.apply(this._outerEmitter,[l,{name:l,data:this._getEventData(l)}]))}else this._eventThrottleMap.set(l,{last:Date.now(),timeoutID:-1}),this._outerEmitter._emit.apply(this._outerEmitter,[l,{name:l,data:this._getEventData(l)}]);else this._outerEmitter._emit.apply(this._outerEmitter,[l,{name:l,data:arguments[1]}])}).bind(this)),this._outerEmitter}},{key:"_canIUseSignaling",value:function(){var l=this.getModule(oi);return!!l&&l.canIUseSignaling()}},{key:"_getEventData",value:function(l){return l===R.CONVERSATION_LIST_UPDATED?this._moduleMap.get(dt).getLocalConversationList():l===R.FRIEND_LIST_UPDATED?this._moduleMap.get(_r).getLocalFriendList(!1):l===R.GROUP_LIST_UPDATED?this._moduleMap.get(Tt).getLocalGroupList():l===R.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED?this._moduleMap.get(dt).getTotalUnreadMessageCount():void 0}},{key:"getInnerEmitterInstance",value:function(){return this._innerEmitter===null&&(this._innerEmitter=new y1,this._innerEmitter._emit=this._innerEmitter.emit,this._innerEmitter.emit=(function(l,p){var a;a=_n(arguments[1])&&arguments[1].data?[l,{name:arguments[0],data:arguments[1].data}]:[l,{name:arguments[0],data:arguments[1]}],this._innerEmitter._emit.apply(this._innerEmitter,a)}).bind(this)),this._innerEmitter}},{key:"hasModule",value:function(l){return this._moduleMap.has(l)}},{key:"getModule",value:function(l){return this._moduleMap.get(l)}},{key:"isReady",value:function(){return this._isReady}},{key:"isIntl",value:function(){return this.getModule(hn).isIntl()}},{key:"getNotReadyReason",value:function(){return this._reason}},{key:"setNotReadyReason",value:function(l){this._reason=l}},{key:"getErrorMessage",value:function(l,p,a){return this._moduleMap.get(Tw).get({key:l,replacement1:p,replacement2:a,isIntl:this.isIntl()})}},{key:"outputWarning",value:function(l,p,a){var c=this.getErrorMessage(l,p,a);c&&U.w(c)}},{key:"onError",value:function(l){var p="code:".concat(l.code," message:").concat(l.message);U.w("Oops! ".concat(p)),new We("error").setMessage(p).setNetworkType(this.getModule(Va).getNetworkType()).setLevel("error").end(),this.getOuterEmitterInstance().emit(R.ERROR,l)}},{key:"restartTimer",value:function(){U.l("".concat(this._n,".restartTimer")),this.stopTimer(),this._startTimer();var l=this.getModule(Tt);l&&l.restartPolling()}},{key:"getTimerID",value:function(){var l=this._moduleMap.get(Mp);return l.isWorkerEnabled()?l.getTimerID():this._checkTimer}},{key:"getPollingTimerID",value:function(l){return this._moduleMap.get(Tt).getPollingTimerID(l)}},{key:"reset",value:function(){U.l("".concat(this._n,".reset")),xn();var l,p=$(this._moduleMap);try{for(p.s();!(l=p.n()).done;){var a=A(l.value,2)[1];a.reset&&a.reset()}}catch(y){p.e(y)}finally{p.f()}this._startLoginTs=0,this._initReadyList(),this._isReady=!1,this.stopTimer(),this._outerEmitter.emit(R.SDK_NOT_READY);var c,h=$(this._eventThrottleMap);try{for(h.s();!(c=h.n()).done;){var m=A(c.value,2)[1];m.timeoutID&&clearTimeout(m.timeoutID)}}catch(y){h.e(y)}finally{h.f()}this._eventThrottleMap.clear()}}]),D}(),lx=function(){function D(l){i(this,D),this._funcMap=new Map,this._m=l}return u(D,[{key:"defense",value:function(l,p){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(typeof l!="string"||l.length===0||typeof p!="function")return null;if(this._funcMap.has(l)&&this._funcMap.get(l).has(p))return this._funcMap.get(l).get(p);this._funcMap.has(l)||this._funcMap.set(l,new Map);var c=null;return this._funcMap.get(l).has(p)?c=this._funcMap.get(l).get(p):(c=this._pack(l,p,a),this._funcMap.get(l).set(p,c)),c}},{key:"defenseOnce",value:function(l,p){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;return typeof p!="function"?null:this._pack(l,p,a)}},{key:"find",value:function(l,p){return typeof l!="string"||l.length===0||typeof p!="function"?null:this._funcMap.has(l)&&this._funcMap.get(l).has(p)?this._funcMap.get(l).get(p):(this._m.outputWarning("ListenerFnNotFound",l),null)}},{key:"delete",value:function(l,p){return typeof p=="function"&&!!this._funcMap.has(l)&&!!this._funcMap.get(l).has(p)&&(this._funcMap.get(l).delete(p),this._funcMap.get(l).size===0&&this._funcMap.delete(l),!0)}},{key:"_pack",value:function(l,p,a){var c=this;return function(){try{p.apply(a,Array.from(arguments))}catch(C){var h=Object.values(R).indexOf(l),m="CallbackError";if(h!==-1){var y=Object.keys(R)[h];c._m.outputWarning(m,y,C)}var b=new We(m);b.setMessage("eventName:".concat(l)).setMoreMessage(C.message).end()}}}}]),D}(),ux=function(){function D(l){i(this,D);var p={SDKAppID:l.SDKAppID,unlimitedAVChatRoom:l.unlimitedAVChatRoom||!1,scene:l.scene||"",oversea:l.oversea||!1,instanceID:Ga(),devMode:l.devMode||!1,proxyServer:l.proxyServer||void 0,fileUploadProxy:l.fileUploadProxy||void 0,fileDownloadProxy:l.fileDownloadProxy||l.fileUploadProxy||void 0,modules:l.modules||void 0};this._m=new ax(p),this._vendorMap=new Map,this._safetyCallbackFactory=new lx(this._m)}return u(D,[{key:"onError",value:function(l){this._m.onError(l)}},{key:"login",value:function(l){return this._m.login(),this._getModule(qa).login(l)}},{key:"logout",value:function(){var l=this;return this._getModule(qa).logout().then(function(p){return l._m.reset(),p})}},{key:"isReady",value:function(){return this._m.isReady()}},{key:"isIntl",value:function(){return this._m.isIntl()}},{key:"getNotReadyReason",value:function(){return this._m.getNotReadyReason()}},{key:"getErrorMessage",value:function(l,p,a){return this._m.getErrorMessage(l,p,a)}},{key:"_getModule",value:function(l){return this._m.getModule(l)}},{key:"destroy",value:function(){var l=this;return this.logout().finally(function(){l._m.stopTimer(),l._getModule(Mp).terminate(),l._getModule(Fs).dealloc();var p=l._m.getOuterEmitterInstance(),a=l._getModule(hn);p.emit(R.SDK_DESTROY,{SDKAppID:a.getSDKAppID()})})}},{key:"on",value:function(l,p,a){U.d("on","eventName:".concat(l)),this._m.getOuterEmitterInstance().on(l,this._safetyCallbackFactory.defense(l,p,a),a)}},{key:"once",value:function(l,p,a){U.d("once","eventName:".concat(l)),this._m.getOuterEmitterInstance().once(l,this._safetyCallbackFactory.defenseOnce(l,p,a),a||this)}},{key:"off",value:function(l,p,a,c){U.d("off","eventName:".concat(l));var h=this._safetyCallbackFactory.find(l,p);h!==null&&(this._m.getOuterEmitterInstance().off(l,h,a,c),this._safetyCallbackFactory.delete(l,p))}},{key:"registerPlugin",value:function(l){$e(l["tim-offline-push-plugin"])?this._getModule(Ng).registerPlugin(l):this._getModule(Cp).registerPlugin(l)}},{key:"setLogLevel",value:function(l){if(l<=0){var p=this.getErrorMessage("TIM_ASCII_ART");p&&console.log(p);var a=this.getErrorMessage("API_REFER");a&&(qu()?console.log("%c ".concat("IM SDK API ->"," %c"),"background:#ff9d00; padding:1px; border-radius:3px; color: #fff","background:transparent",a):console.log("IM SDK API ->",a));var c=this.getErrorMessage("DOCS_GUIDE");c&&console.log(c)}U.setLevel(l)}},{key:"createTextMessage",value:function(l){return this._getModule(lr).createTextMessage(l)}},{key:"createTextAtMessage",value:function(l){return this._getModule(lr).createTextMessage(l)}},{key:"createImageMessage",value:function(l){return this._getModule(lr).createImageMessage(l)}},{key:"createAudioMessage",value:function(l){return this._getModule(lr).createAudioMessage(l)}},{key:"createVideoMessage",value:function(l){return this._getModule(lr).createVideoMessage(l)}},{key:"createCustomMessage",value:function(l){return this._getModule(lr).createCustomMessage(l)}},{key:"createFaceMessage",value:function(l){return this._getModule(lr).createFaceMessage(l)}},{key:"createFileMessage",value:function(l){return this._getModule(lr).createFileMessage(l)}},{key:"createLocationMessage",value:function(l){return this._getModule(lr).createLocationMessage(l)}},{key:"createMergerMessage",value:function(l){return this._getModule(lr).createMergerMessage(l)}},{key:"downloadMergerMessage",value:function(l){return l.type!==T.MSG_MERGER?Me({code:Le.MSG_MERGER_TYPE_INVALID}):Ye(l.payload.downloadKey)?Me({code:Le.MSG_MERGER_KEY_INVALID}):this._getModule(lr).downloadMergerMessage(l).catch(function(p){return Me({code:Le.MSG_MERGER_DOWNLOAD_FAIL})})}},{key:"createForwardMessage",value:function(l){return this._getModule(lr).createForwardMessage(l)}},{key:"sendMessage",value:function(l,p){return l instanceof qr?this._getModule(lr).sendMessageInstance(l,p):Me({code:Le.MSG_INSTANCE_REQUIRED})}},{key:"searchCloudMessages",value:function(l){return this._getModule(lr).searchCloudMessages(l)}},{key:"callExperimentalAPI",value:function(l,p){return l==="sendComboMessage"?this._getModule(Cw).sendMessage(p):l==="handleGroupInvitation"?this._getModule(Tt).handleGroupInvitation(p):l==="isCommercialAbilityEnabled"?this._getModule(Ip).isFeatureEnabled(p):l==="isIntl"?this.isIntl():l==="sendTRTCCustomData"?this._getModule(D0).sendTRTCCustomData(p):l==="getTimerID"?this._m.getTimerID():l==="getPollingTimerID"?this._m.getPollingTimerID(p):Me({code:Le.INVALID_OPERATION})}},{key:"revokeMessage",value:function(l){return this._getModule(lr).revokeMessage(l)}},{key:"resendMessage",value:function(l,p){return l instanceof qr?this._getModule(lr).resendMessage(l,p):Me({code:Le.MSG_INSTANCE_REQUIRED})}},{key:"deleteMessage",value:function(l){return this._getModule(lr).deleteMessage(l)}},{key:"translateText",value:function(l){return this._getModule(lr).translateText(l)}},{key:"setMessageExtensions",value:function(l,p){return this._getModule(yp).setMessageExtensions(l,p)}},{key:"getMessageExtensions",value:function(l){return this._getModule(yp).getMessageExtensions(l)}},{key:"deleteMessageExtensions",value:function(l,p){return this._getModule(yp).deleteMessageExtensions(l,p)}},{key:"modifyMessage",value:function(l){return this._getModule(lr).modifyRemoteMessage(l)}},{key:"getMessageList",value:function(l){return this._getModule(dt).getMessageList(l)}},{key:"getMessageListHopping",value:function(l){return this._getModule(dt).getMessageListHopping(l)}},{key:"sendMessageReadReceipt",value:function(l){return this._getModule(dt).sendReadReceipt(l)}},{key:"getMessageReadReceiptList",value:function(l){return this._getModule(dt).getReadReceiptList(l)}},{key:"getGroupMessageReadMemberList",value:function(l){var p=this._getModule(Tt);return p?p.getReadReceiptDetail(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"findMessage",value:function(l){return this._getModule(dt).findMessage(l)}},{key:"setMessageRead",value:function(l){return this._getModule(dt).setMessageRead(l)}},{key:"getConversationList",value:function(l){return this._getModule(dt).getConversationList(l)}},{key:"getConversationProfile",value:function(l){return this._getModule(dt).getConversationProfile(l)}},{key:"deleteConversation",value:function(l){return this._getModule(dt).deleteConversation(l)}},{key:"setConversationDraft",value:function(l){return this._getModule(dt).setConversationDraft(l)}},{key:"clearHistoryMessage",value:function(l){return this._getModule(dt).clearHistoryMessage(l)}},{key:"pinConversation",value:function(l){return this._getModule(dt).pinConversation(l)}},{key:"setAllMessageRead",value:function(l){return this._getModule(dt).setAllMessageRead(l)}},{key:"setMessageRemindType",value:function(l){return this._getModule(dt).setMessageRemindType(l)}},{key:"getTotalUnreadMessageCount",value:function(){return this._getModule(dt).getTotalUnreadMessageCount()}},{key:"setConversationCustomData",value:function(l){return this._getModule(dt).setConversationCustomData(l)}},{key:"markConversation",value:function(l){return this._getModule(dt).markConversation(l)}},{key:"getConversationGroupList",value:function(){return this._getModule(dt).getConversationGroupList()}},{key:"createConversationGroup",value:function(l){return this._getModule(dt).createConversationGroup(l)}},{key:"deleteConversationGroup",value:function(l){return this._getModule(dt).deleteConversationGroup(l)}},{key:"renameConversationGroup",value:function(l){return this._getModule(dt).renameConversationGroup(l)}},{key:"addConversationsToGroup",value:function(l){return this._getModule(dt).addConversationsToGroup(l)}},{key:"deleteConversationsFromGroup",value:function(l){return this._getModule(dt).deleteConversationsFromGroup(l)}},{key:"getMyProfile",value:function(){return this._getModule(yr).getMyProfile()}},{key:"getUserProfile",value:function(l){return this._getModule(yr).getUserProfile(l)}},{key:"updateMyProfile",value:function(l){return this._getModule(yr).updateMyProfile(l)}},{key:"getBlacklist",value:function(){return this._getModule(yr).getLocalBlacklist()}},{key:"addToBlacklist",value:function(l){return this._getModule(yr).addBlacklist(l)}},{key:"removeFromBlacklist",value:function(l){return this._getModule(yr).deleteBlacklist(l)}},{key:"setSelfStatus",value:function(l){return this._getModule(yr).setSelfStatus(l)}},{key:"getUserStatus",value:function(l){return this._getModule(yr).getUserStatus(l)}},{key:"subscribeUserStatus",value:function(l){return this._getModule(yr).subscribeUserStatus(l)}},{key:"unsubscribeUserStatus",value:function(l){return this._getModule(yr).unsubscribeUserStatus(l)}},{key:"getFriendList",value:function(){var l=this._getModule(_r);return l?l.getLocalFriendList():Me({code:Le.CANNOT_FIND_MODULE})}},{key:"addFriend",value:function(l){var p=this._getModule(_r);return p?p.addFriend(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"deleteFriend",value:function(l){var p=this._getModule(_r);return p?p.deleteFriend(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"checkFriend",value:function(l){var p=this._getModule(_r);return p?p.checkFriend(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getFriendProfile",value:function(l){var p=this._getModule(_r);return p?p.getFriendProfile(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"updateFriend",value:function(l){var p=this._getModule(_r);return p?p.updateFriend(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getFriendApplicationList",value:function(){var l=this._getModule(_r);return l?l.getLocalFriendApplicationList():Me({code:Le.CANNOT_FIND_MODULE})}},{key:"acceptFriendApplication",value:function(l){var p=this._getModule(_r);return p?p.acceptFriendApplication(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"refuseFriendApplication",value:function(l){var p=this._getModule(_r);return p?p.refuseFriendApplication(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"deleteFriendApplication",value:function(l){var p=this._getModule(_r);return p?p.deleteFriendApplication(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"setFriendApplicationRead",value:function(){var l=this._getModule(_r);return l?l.setFriendApplicationRead():Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getFriendGroupList",value:function(){var l=this._getModule(_r);return l?l.getLocalFriendGroupList():Me({code:Le.CANNOT_FIND_MODULE})}},{key:"createFriendGroup",value:function(l){var p=this._getModule(_r);return p?p.createFriendGroup(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"deleteFriendGroup",value:function(l){var p=this._getModule(_r);return p?p.deleteFriendGroup(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"addToFriendGroup",value:function(l){var p=this._getModule(_r);return p?p.addToFriendGroup(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"removeFromFriendGroup",value:function(l){var p=this._getModule(_r);return p?p.removeFromFriendGroup(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"renameFriendGroup",value:function(l){var p=this._getModule(_r);return p?p.renameFriendGroup(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getGroupList",value:function(){var l=this._getModule(Tt);return l?l.getGroupList():Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getGroupProfile",value:function(l){var p=this._getModule(Tt);return p?p.getGroupProfile(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"createGroup",value:function(l){var p=this._getModule(Tt);return p?p.createGroup(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"dismissGroup",value:function(l){var p=this._getModule(Tt);return p?p.dismissGroup(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"updateGroupProfile",value:function(l){var p=this._getModule(Tt);return p?p.updateGroupProfile(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"joinGroup",value:function(l){var p=this._getModule(Tt);return p?p.joinGroup(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"quitGroup",value:function(l){var p=this._getModule(Tt);return p?p.quitGroup(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"searchGroupByID",value:function(l){var p=this._getModule(Tt);return p?p.searchGroupByID(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getGroupOnlineMemberCount",value:function(l){var p=this._getModule(Tt);return p?p.getGroupOnlineMemberCount(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"changeGroupOwner",value:function(l){var p=this._getModule(Tt);return p?p.changeGroupOwner(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getGroupApplicationList",value:function(){var l=this._getModule(Tt);return l?l.getGroupApplicationList():Me({code:Le.CANNOT_FIND_MODULE})}},{key:"handleGroupApplication",value:function(l){var p=this._getModule(Tt);return p?p.handleGroupApplication(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"initGroupAttributes",value:function(l){var p=this._getModule(Tt);return p?p.initGroupAttributes(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"setGroupAttributes",value:function(l){var p=this._getModule(Tt);return p?p.setGroupAttributes(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"deleteGroupAttributes",value:function(l){var p=this._getModule(Tt);return p?p.deleteGroupAttributes(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getGroupAttributes",value:function(l){var p=this._getModule(Tt);return p?p.getGroupAttributes(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"setGroupCounters",value:function(l){var p=this._getModule(Tt);return p?p.setGroupCounters(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"increaseGroupCounter",value:function(l){var p=this._getModule(Tt);return p?p.increaseGroupCounter(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"decreaseGroupCounter",value:function(l){var p=this._getModule(Tt);return p?p.decreaseGroupCounter(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getGroupCounters",value:function(l){var p=this._getModule(Tt);return p?p.getGroupCounters(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getGroupMemberList",value:function(l){var p=this._getModule(Tt);return p?p.getGroupMemberList(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getGroupMemberProfile",value:function(l){var p=this._getModule(Tt);return p?p.getGroupMemberProfile(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"addGroupMember",value:function(l){var p=this._getModule(Tt);return p?p.addGroupMember(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"deleteGroupMember",value:function(l){var p=this._getModule(Tt);return p?p.deleteGroupMember(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"setGroupMemberMuteTime",value:function(l){var p=this._getModule(Tt);return p?p.setGroupMemberMuteTime(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"setGroupMemberRole",value:function(l){var p=this._getModule(Tt);return p?p.setGroupMemberRole(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"setGroupMemberNameCard",value:function(l){var p=this._getModule(Tt);return p?p.setGroupMemberNameCard(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"setGroupMemberCustomField",value:function(l){var p=this._getModule(Tt);return p?p.setGroupMemberCustomField(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"markGroupMemberList",value:function(l){var p=this._getModule(Tt);return p?p.markGroupMemberList(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getJoinedCommunityList",value:function(){return this._getModule(ur).getJoinedCommunityList()}},{key:"createTopicInCommunity",value:function(l){return this._getModule(ur).createTopicInCommunity(l)}},{key:"deleteTopicFromCommunity",value:function(l){return this._getModule(ur).deleteTopicFromCommunity(l)}},{key:"updateTopicProfile",value:function(l){return this._getModule(ur).updateTopicProfile(l)}},{key:"getTopicList",value:function(l){return this._getModule(ur).getTopicList(l)}},{key:"addSignalingListener",value:function(l,p,a){var c=this._getModule(oi);c&&c.addSignalingListener(l,this._safetyCallbackFactory.defense(l,p,a),a)}},{key:"removeSignalingListener",value:function(l,p,a){var c=this._safetyCallbackFactory.find(l,p);if(c!==null){var h=this._getModule(oi);h&&(h.removeSignalingListener(l,c,a),this._safetyCallbackFactory.delete(l,p))}}},{key:"invite",value:function(l){var p=this._getModule(oi);return p?p.invite(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"inviteSync",value:function(l,p,a){var c=this._getModule(oi);return c?c.inviteSync(l,p,a):""}},{key:"inviteInGroup",value:function(l){var p=this._getModule(oi);return p?p.invite(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"inviteInGroupSync",value:function(l,p,a){var c=this._getModule(oi);return c?c.inviteSync(l,p,a):""}},{key:"cancel",value:function(l){var p=this._getModule(oi);return p?p.cancel(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"accept",value:function(l){var p=this._getModule(oi);return p?p.accept(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"reject",value:function(l){var p=this._getModule(oi);return p?p.reject(l):Me({code:Le.CANNOT_FIND_MODULE})}},{key:"getSignalingInfo",value:function(l){var p=this._getModule(oi);return p?p.getSignalingInfo(l):null}},{key:"modifyInvitation",value:function(l){var p=this._getModule(oi);return p?p.modifyInvitation(l):Me({code:Le.CANNOT_FIND_MODULE})}}]),D}(),cx={login:1,logout:1,destroy:1,on:1,off:1,ready:1,setLogLevel:1,joinGroup:1,quitGroup:1,registerPlugin:1,getGroupOnlineMemberCount:1,isReady:1,addSignalingListener:1,removeSignalingListener:1};function dx(D,l){if(D.isReady()||cx[l]===1)return!0;var p=D.getNotReadyReason(),a={code:p,message:"".concat(D.getErrorMessage(p)," | ").concat(l," | ").concat(D.getErrorMessage(Le.SDK_IS_NOT_READY))};return D.onError(a),a}var xp={},Ku={};return Ku.create=function(D){var l="TencentCloudChat.create",p=0,a=D.SDKAppID;if(un(a))p=a;else if(p=parseInt(a),isNaN(a))return U.e("".concat(l," failed. Failed to parse the SDKAppID, please check the arguments")),null;if(p&&xp[p])return xp[p];U.l("".concat(l));var c=new ux(r(r({},D),{},{SDKAppID:p}));c.on(R.SDK_DESTROY,function(m){xp[m.data.SDKAppID]=null,delete xp[m.data.SDKAppID]});var h=function(m){var y=Object.create(null);return Object.keys(a6).forEach(function(b){if(m[b]){var C=new Z;y[b]=function(){var E=Array.from(arguments);return C.use(function(N,F){var z=dx(m,b);return z===!0?F():Me(z)}).use(function(N,F){if(gp(N,bw[b],b)===!0)return F()}).use(function(N,F){return m[b].apply(m,N)}),C.run(E)}}}),y}(c);return xp[p]=h,bw.hookGetAPITips(c.getErrorMessage.bind(c)),U.l("".concat(l," ok")),h},Ku.TYPES=T,Ku.EVENT=R,Ku.TSignaling=x,Ku.VERSION="3.1.1",U.l("TencentCloudChat.VERSION:".concat(Ku.VERSION)),Ku})})(NO);var AG=NO.exports;const yt=zf(AG),dn={typeC2C:"isC2C",typeGroup:"isGroup",cancel:"cancel",group:"GROUP",handleMessage:{revoke:"revoke",copy:"copy",delete:"delete",forward:"forward",reply:"reply",reference:"reference"},at:"@",all:"所有人",typeText:1,typeCustom:2,typeImage:3,typeAudio:4,typeVideo:5,typeFile:6,typeFace:8,typeForward:"forward",typeMute:"mute",typeOrder:"order",typeService:"consultion",typeReply:"quick_reply",typeEvaluate:"evaluation",typeTextLink:"text_link",typeAndroid:"android",typeIphone:"iphone",typeMini:"miniprogram",typeUserTyping:"user_typing_status",typeInputStatusIng:"EIMAMSG_InputStatus_Ing",typeInputStatusEnd:"EIMAMSG_InputStatus_End",scrollType:{toBottom:"bottom",toTarget:"target"},inViewType:{page:"page",scroll:"scroll"},TYPE_CALL_MESSAGE:1,TC_GROUP_NOTICE:"TC_GROUP_NOTICE",CALL_ACTION_TYPE:{INVITE:1,CANCEL_INVITE:2,ACCEPT_INVITE:3,REJECT_INVITE:4,INVITE_TIMEOUT:5}};function NC(e){var n,r,o,i,s,u;let t="";switch(e.type){case yt.TYPES.CONV_C2C:t=ov((n=e==null?void 0:e.userProfile)==null?void 0:n.avatar)?(r=e==null?void 0:e.userProfile)==null?void 0:r.avatar:"https://oss.dayaedu.com/news-info/07/1690787574969.png";break;case yt.TYPES.CONV_GROUP:t=ov((o=e==null?void 0:e.groupProfile)==null?void 0:o.avatar)?(i=e==null?void 0:e.groupProfile)==null?void 0:i.avatar:"https://oss.dayaedu.com/news-info/07/1690775328089.png";break;case yt.TYPES.CONV_SYSTEM:t=ov((s=e==null?void 0:e.groupProfile)==null?void 0:s.avatar)?(u=e==null?void 0:e.groupProfile)==null?void 0:u.avatar:"https://web.sdk.qcloud.com/component/TUIKit/assets/group_avatar.png";break}return t}function Jh(e){var r,o;const{t}=window.TUIKitTUICore.config.i18n.useI18n();let n="";switch(e.type){case yt.TYPES.CONV_C2C:n=(e==null?void 0:e.userProfile.nick)||((r=e==null?void 0:e.userProfile)==null?void 0:r.userID)||"";break;case yt.TYPES.CONV_GROUP:n=e.groupProfile.name||((o=e==null?void 0:e.groupProfile)==null?void 0:o.groupID)||"";break;case yt.TYPES.CONV_SYSTEM:n=t("系统通知");break}return n}function PO(e){const{t}=window.TUIKitTUICore.config.i18n.useI18n(),n=[`[${t("TUIConversation.有人@我")}]`,`[${t("TUIConversation.@所有人")}]`,`[${t("TUIConversation.@所有人")}][${t("TUIConversation.有人@我")}]`];let r="";for(let o=0;o0&&(r=n[e.groupAtInfoList[o].atTypeArray[0]-1]);return r}function LG(e){var n;const t={referenceMessageForShow:"",referenceMessageType:0};if(!e||!(e!=null&&e.ID)||!(e!=null&&e.type))return t;switch(e.type){case yt.TYPES.MSG_TEXT:t.referenceMessageForShow=(n=e==null?void 0:e.payload)==null?void 0:n.text,t.referenceMessageType=1;break;case yt.TYPES.MSG_CUSTOM:const{payload:r}=e;(r.data?or(r.data):{}).businessID==="TC_GROUP_NOTICE"?t.referenceMessageForShow="[群公告]":t.referenceMessageForShow="[自定义消息]",t.referenceMessageType=2;break;case yt.TYPES.MSG_IMAGE:t.referenceMessageForShow="[图片]",t.referenceMessageType=3;break;case yt.TYPES.MSG_AUDIO:t.referenceMessageForShow="[语音]",t.referenceMessageType=4;break;case yt.TYPES.MSG_VIDEO:t.referenceMessageForShow="[视频]",t.referenceMessageType=5;break;case yt.TYPES.MSG_FILE:t.referenceMessageForShow="[文件]",t.referenceMessageType=6;break;case yt.TYPES.MSG_FACE:t.referenceMessageForShow="[表情]",t.referenceMessageType=8;break}return t}function OG(e){var u;const{t}=window.TUIKitTUICore.config.i18n.useI18n(),{lastMessage:n}=e,r=e;let o="",i="";const s=r.unreadCount>0&&r.messageRemindType===yt.TYPES.MSG_REMIND_ACPT_NOT_NOTE?`[${r.unreadCount>99?"99+":r.unreadCount}${t("TUIConversation.条")}] `:"";if(r.type===yt.TYPES.CONV_GROUP&&((n==null?void 0:n.fromAccount)===(r==null?void 0:r.groupProfile.selfInfo.userID)?o=t("TUIConversation.我"):o=(n==null?void 0:n.nameCard)||(n==null?void 0:n.nick)||(n==null?void 0:n.fromAccount)),(n==null?void 0:n.type)===yt.TYPES.MSG_TEXT)i=n==null?void 0:n.payload.text;else if((n==null?void 0:n.type)===yt.TYPES.MSG_CUSTOM){const d=or((u=n==null?void 0:n.payload)==null?void 0:u.data);if((d==null?void 0:d.businessID)===1)return i=PC(n),i;if((d==null?void 0:d.businessID)==="TC_GROUP_NOTICE")return"[群公告]";i=n==null?void 0:n.messageForShow}else i=n==null?void 0:n.messageForShow;return n!=null&&n.isRevoked&&(i=t("TUIChat.撤回了一条消息")),r.type===yt.TYPES.CONV_GROUP&&(n==null?void 0:n.type)===yt.TYPES.MSG_GRP_TIP?i:`${s}${o?`${o}:`:""}${i}`}function RG(e){var o,i,s,u,d,f,g,v,_,M;const{t}=window.TUIKitTUICore.config.i18n.useI18n(),n={message:e,text:""};let r=(e==null?void 0:e.nick)||((i=(o=e==null?void 0:e.payload)==null?void 0:o.userIDList)==null?void 0:i.join(","));if(((u=(s=e==null?void 0:e.payload)==null?void 0:s.memberList)==null?void 0:u.length)>0&&(r="",(f=(d=e==null?void 0:e.payload)==null?void 0:d.memberList)==null||f.map(I=>{r+=`${(I==null?void 0:I.nick)||(I==null?void 0:I.userID)},`}),r=r==null?void 0:r.slice(0,-1)),(e==null?void 0:e.type)===((g=yt==null?void 0:yt.TYPES)==null?void 0:g.MSG_GRP_TIP))switch(e.payload.operationType){case yt.TYPES.GRP_TIP_MBR_JOIN:n.text=`${r} ${t("message.tip.加入群组")}`;break;case yt.TYPES.GRP_TIP_MBR_QUIT:n.text=`${t("message.tip.群成员")}:${r} ${t("message.tip.退出群组")}`;break;case yt.TYPES.GRP_TIP_MBR_KICKED_OUT:n.text=`${t("message.tip.群成员")}:${r} ${t("message.tip.踢出群组")}`;break;case yt.TYPES.GRP_TIP_MBR_SET_ADMIN:n.text=`${t("message.tip.群成员")}:${r} ${t("message.tip.成为管理员")}`;break;case yt.TYPES.GRP_TIP_MBR_CANCELED_ADMIN:n.text=`${t("message.tip.群成员")}:${r} ${t("message.tip.被撤销管理员")}`;break;case yt.TYPES.GRP_TIP_GRP_PROFILE_UPDATED:n.text=NG(e);break;case yt.TYPES.GRP_TIP_MBR_PROFILE_UPDATED:for(const I of e.payload.memberList)I.muteTime>0?n.text=`${t("message.tip.群成员")}:${I.nick||I.userID}${t("message.tip.被禁言")}`:n.text=`${t("message.tip.群成员")}:${I.nick||I.userID}${t("message.tip.被取消禁言")}`;break;default:n.text=`[${t("message.tip.群提示消息")}]`;break}else if(((_=or((v=e==null?void 0:e.payload)==null?void 0:v.data))==null?void 0:_.businessID)==="group_create"){const I=or((M=e==null?void 0:e.payload)==null?void 0:M.data);n.text=`"${I==null?void 0:I.opUser}" `+t(I==null?void 0:I.content)}else n.text=PC(e);return n}function NG(e){const{t}=window.TUIKitTUICore.config.i18n.useI18n(),{payload:n}=e,{newGroupProfile:r}=n,{operatorID:o}=n;let i="";return"muteAllMembers"in r?r.muteAllMembers?i=`${t("message.tip.管理员")} ${o} ${t("message.tip.开启学生禁言")}`:i=`${t("message.tip.管理员")} ${o} ${t("message.tip.取消学生禁言")}`:"ownerID"in r?i=`${r.ownerID} ${t("message.tip.成为新的群主")}`:"groupName"in r?i=`${o} ${t("message.tip.修改群名为")} ${r.groupName}`:"notification"in r&&(i=`${o} ${t("message.tip.发布新公告")}`),i}function xO(e){return{text:RO(e.payload)}}function UO(e){const t={message:e,name:"",url:""};return t.name=e.payload.data,e.payload.data.indexOf("@2x")<0&&(t.name=`${t.name}@2x`),t.url=`https://web.sdk.qcloud.com/im/assets/face-elem/${t.name}.png`,t}function PG(e){const t={lon:"",lat:"",href:"",url:"",description:"",message:e};return t.lon=e.payload.longitude.toFixed(6),t.lat=e.payload.latitude.toFixed(6),t.href=`https://map.qq.com/?type=marker&isopeninfowin=1&markertype=1&pointx=${t.lon}&pointy=${t.lat}&name=${e.payload.description}`,t.url=`https://apis.map.qq.com/ws/staticmap/v2/?center=${t.lat},${t.lon}&zoom=10&size=300*150&maptype=roadmap&markers=size:large|color:0xFFCCFF|label:k|${t.lat},${t.lon}&key=UBNBZ-PTP3P-TE7DB-LHRTI-Y4YLE-VWBBD`,t.description=e.payload.description,t}function FO(e){return{progress:(e==null?void 0:e.status)==="unSend"&&e.progress,url:e.payload.imageInfoArray[1].url,width:e.payload.imageInfoArray[0].width,height:e.payload.imageInfoArray[0].height,message:e}}function $O(e){var t,n,r,o;return{progress:(e==null?void 0:e.status)==="unSend"&&(e==null?void 0:e.progress),url:(t=e==null?void 0:e.payload)==null?void 0:t.videoUrl,snapshotUrl:(n=e==null?void 0:e.payload)==null?void 0:n.snapshotUrl,snapshotWidth:(r=e==null?void 0:e.payload)==null?void 0:r.snapshotWidth,snapshotHeight:(o=e==null?void 0:e.payload)==null?void 0:o.snapshotHeight,message:e}}function xG(e){return{progress:(e==null?void 0:e.status)==="unSend"&&e.progress,url:e.payload.url,message:e,second:e.payload.second}}function GO(e){let t="";return e.payload.fileSize>=1024*1024?t=`${(e.payload.fileSize/(1024*1024)).toFixed(2)} Mb`:e.payload.fileSize>=1024?t=`${(e.payload.fileSize/1024).toFixed(2)} Kb`:t=`${e.payload.fileSize.toFixed(2)}B`,{progress:(e==null?void 0:e.status)==="unSend"&&e.progress,url:e.payload.fileUrl,message:e,name:e.payload.fileName,size:t}}function UG(e){return{message:e,...e.payload}}function PC(e){var s,u;const{t}=window.TUIKitTUICore.config.i18n.useI18n();let n={},r={};try{n=or((s=e==null?void 0:e.payload)==null?void 0:s.data)}catch{n={}}if(n.businessID!==1)return"";try{r=or(n.data)}catch{r={}}let o="";(u=n==null?void 0:n.inviteeList)==null||u.forEach((d,f)=>{var g;f<((g=n==null?void 0:n.inviteeList)==null?void 0:g.length)-1?o+=`"${d}"、`:o+=`"${d}" `});const i=`"${n==null?void 0:n.inviter}" `;switch(n.actionType){case 1:return r.call_end>=0&&!n.groupID?`${t("message.custom.通话时长")}:${SG(r.call_end)}`:n.groupID&&n.timeout>0?`${i}${t("message.custom.发起通话")}`:n.groupID?`${t("message.custom.结束群聊")}`:r.data&&r.data.cmd==="switchToAudio"?`${t("message.custom.切换语音通话")}`:r.data&&r.data.cmd==="switchToVideo"?`${t("message.custom.切换视频通话")}`:`${t("message.custom.发起通话")}`;case 2:return`${n.groupID?i:""}${t("message.custom.取消通话")}`;case 3:return r.data&&r.data.cmd==="switchToAudio"?`${t("message.custom.切换语音通话")}`:r.data&&r.data.cmd==="switchToVideo"?`${t("message.custom.切换视频通话")}`:`${n.groupID?o:""}${t("message.custom.已接听")}`;case 4:return`${n.groupID?o:""}${t("message.custom.拒绝通话")}`;case 5:return r.data&&r.data.cmd==="switchToAudio"?`${t("message.custom.切换语音通话")}`:r.data&&r.data.cmd==="switchToVideo"?`${t("message.custom.切换视频通话")}`:`${n.groupID?o:""}${t("message.custom.无应答")}`;default:return""}}function BO(e){var i,s;const{t}=window.TUIKitTUICore.config.i18n.useI18n(),n=or((i=e==null?void 0:e.payload)==null?void 0:i.data);(n==null?void 0:n.businessID)===dn.typeEvaluate&&((n==null?void 0:n.score)>0||(n.score=1,e.payload.data=JSON.stringify(n)));let r={};try{r=or((s=e==null?void 0:e.payload)==null?void 0:s.data)}catch{r={}}let o=PC(e)||`[${t("message.custom.自定义消息")}]`;return(r==null?void 0:r.businessID)==="TC_GROUP_NOTICE"&&(o="[群公告]"),{message:e,custom:o}}function FG(e){const{t}=window.TUIKitTUICore.config.i18n.useI18n(),n=e.payload.groupProfile.name||e.payload.groupProfile.groupID;switch(e.payload.operationType){case 1:return`${e.payload.operatorID} ${t("message.tip.申请加入群组")}:${n}`;case 2:return`${t("message.tip.成功加入群组")}:${n}`;case 3:return`${t("message.tip.申请加入群组")}:${n} ${t("message.tip.被拒绝")}`;case 4:return`${t("message.tip.你被管理员")}${e.payload.operatorID} ${t("message.tip.踢出群组")}:${n}`;case 5:return`${t("message.tip.群")}:${n} ${t("message.tip.被")} ${e.payload.operatorID} ${t("message.tip.解散")}`;case 6:return`${e.payload.operatorID} ${t("message.tip.创建群")}:${n}`;case 7:return`${e.payload.operatorID} ${t("message.tip.邀请你加群")}:${n}`;case 8:return`${t("message.tip.你退出群组")}:${n}`;case 9:return`${t("message.tip.你被")}${e.payload.operatorID} ${t("message.tip.设置为群")}:${n} ${t("message.tip.的管理员")}`;case 10:return`${t("message.tip.你被")}${e.payload.operatorID} ${t("message.tip.撤销群")}:${n} ${t("message.tip.的管理员身份")}`;case 12:return`${e.payload.operatorID} ${t("message.tip.邀请你加群")}:${n}`;case 13:return`${e.payload.operatorID} ${t("message.tip.同意加群")}:${n}`;case 14:return`${e.payload.operatorID} ${t("message.tip.拒接加群")}:${n}`;case 255:return`${t("message.tip.自定义群系统通知")}: ${e.payload.userDefinedField}`}}function pk(e,t,n){const r=(e==null?void 0:e.querySelectorAll(`.${t}`))||[],o=Array.prototype.slice.call(r).map(i=>new Promise((s,u)=>{i.onload=()=>{s(i)},i.onloadeddata=()=>{s(i)},i.onprogress=()=>{s(i)},i.complete&&s(i)}));return Promise.all(o).then(()=>{n&&n()}).catch(i=>{console.error("网络异常",i)})}function ov(e){return/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)}function $G(e){if(typeof e=="string")try{return!!JSON.parse(e)}catch{return!1}return!1}function or(e){return!e||!$G(e)?e:JSON.parse(e)}function ff(e){var t;if(!e)return!1;try{const{businessID:n}=or((t=e==null?void 0:e.payload)==null?void 0:t.data);if(n===dn.typeUserTyping)return!0}catch{return!1}return!1}function xC(e,t=new WeakMap){if(typeof e!="object"||e===null)throw new TypeError("传入参数不是对象");if(t.has(e))return t.get(e);const n=Object.create(Object.getPrototypeOf(e));return Object.keys(e).forEach(o=>{const i=e[o];typeof i!="object"||i===null?n[o]=i:Array.isArray(i)?n[o]=[...i]:i instanceof Set?n[o]=new Set([...i]):i instanceof Map?n[o]=new Map([...i]):(t.set(e,e),n[o]=xC(i,t))}),n}const HO=e=>{var t,n,r,o,i,s,u,d,f;return(e==null?void 0:e.type)===((t=yt==null?void 0:yt.TYPES)==null?void 0:t.MSG_GRP_TIP)||(e==null?void 0:e.type)===((n=yt==null?void 0:yt.TYPES)==null?void 0:n.MSG_CUSTOM)&&(e==null?void 0:e.conversationType)===((r=yt==null?void 0:yt.TYPES)==null?void 0:r.CONV_GROUP)&&((i=or((o=e==null?void 0:e.payload)==null?void 0:o.data))==null?void 0:i.businessID)===(dn==null?void 0:dn.TYPE_CALL_MESSAGE)||(e==null?void 0:e.type)===((s=yt==null?void 0:yt.TYPES)==null?void 0:s.MSG_CUSTOM)&&(e==null?void 0:e.conversationType)===((u=yt==null?void 0:yt.TYPES)==null?void 0:u.CONV_GROUP)&&((f=or((d=e==null?void 0:e.payload)==null?void 0:d.data))==null?void 0:f.businessID)==="group_create"},UC=(e,t,n,r)=>{const o=e/t,i=n/r;return e<=n&&t<=r?{width:e,height:t}:e<=n&&t>r||e>n&&t>r&&o<=i?{width:e*(r/t),height:r}:{width:n,height:t*(n/e)}},uo=class uo{constructor(t){Xt(this,"allowNotifications",!0);Xt(this,"showPreviews",!0);Xt(this,"notificationTitle","腾讯云 IM ");Xt(this,"notificationIcon","https://web.sdk.qcloud.com/im/demo/latest/faviconnew.png");t&&((t==null?void 0:t.allowNotifications)!==void 0&&(this.allowNotifications=t.allowNotifications),(t==null?void 0:t.showPreviews)!==void 0&&(this.showPreviews=t.showPreviews),(t==null?void 0:t.notificationTitle)!==void 0&&(this.notificationTitle=t.notificationTitle),(t==null?void 0:t.notificationIcon)!==void 0&&(this.notificationIcon=t.notificationIcon))}static getInstance(t){return uo.instance||(uo.instance=new uo(t)),uo.instance}static plugin(t,n){t.config.notification=this.getInstance(n),this.TUICore=t}static install(t){t.use(this.getInstance())}setNotificationConfiguration(t){t&&((t==null?void 0:t.allowNotifications)!==void 0&&(this.allowNotifications=t.allowNotifications),(t==null?void 0:t.showPreviews)!==void 0&&(this.showPreviews=t.showPreviews),(t==null?void 0:t.notificationTitle)!==void 0&&(this.notificationTitle=t.notificationTitle),(t==null?void 0:t.notificationIcon)!==void 0&&(this.notificationIcon=t.notificationIcon))}async notify(t){this.allowNotifications&&this.checkNotificationAbility()&&await this.requestNotificationPermission()&&await this.handleNotification(t)}checkNotificationAbility(){return!(!("Notification"in window)||window.Notification.permission==="denied")}requestNotificationPermission(){return new Promise((t,n)=>{window!=null&&window.Notification||n(!1),window.Notification.permission==="granted"&&t(!0),window.Notification.requestPermission().then(r=>{r==="granted"&&t(!0)}).catch(()=>{n(!1)})})}async handleNotification(t){if(!this._isMessageNeedNotification(t))return;const n=this._handleNotificationType(t);let r,o={badge:this.notificationIcon,icon:this.notificationIcon,body:"",requireInteraction:!1};switch(n){case"call":if(r=this._handleCallNotificationContent(t),!(r!=null&&r.content))return;o.body=r.content,o.requireInteraction=!r.callEnd;break;case"chat":o.body=await this._handleChatNotificationContent(t),o.requireInteraction=!1;break}const i=new Notification(this.notificationTitle,o);i.onclick=()=>{var u,d;if(window.focus(),!t||!(t!=null&&t.conversationID))return;const s=(d=(u=uo==null?void 0:uo.TUICore)==null?void 0:u.TUIServer)==null?void 0:d.TUIConversation;((t==null?void 0:t.conversationType)===yt.TYPES.CONV_C2C||(t==null?void 0:t.conversationType)===yt.TYPES.CONV_GROUP)&&(s==null||s.getConversationProfile(t==null?void 0:t.conversationID).then(f=>{var g,v;(g=f==null?void 0:f.data)!=null&&g.conversation&&s.handleCurrentConversation((v=f==null?void 0:f.data)==null?void 0:v.conversation)})),i.close()}}_isMessageNeedNotification(t){var r,o,i,s;if(!t||!(t!=null&&t.ID)||!(t!=null&&t.type)||t!=null&&t.isRevoked||t!=null&&t.isDeleted||ff&&ff(t)||(t==null?void 0:t.type)===yt.TYPES.MSG_GRP_TIP||(t==null?void 0:t.type)===yt.TYPES.MSG_GRP_SYS_NOTICE)return!1;const n=(s=(i=(o=(r=uo==null?void 0:uo.TUICore)==null?void 0:r.TUIServer)==null?void 0:o.TUIConversation)==null?void 0:i.currentStore)==null?void 0:s.currentConversationID;return!(this.checkPageFocus()&&(t==null?void 0:t.conversationID)===n)}_handleNotificationType(t){var n;if(t.type===yt.TYPES.MSG_CUSTOM){const r=or((n=t==null?void 0:t.payload)==null?void 0:n.data);if((r==null?void 0:r.businessID)===1||(r==null?void 0:r.businessID)==="av_call")return"call"}return"chat"}async _handleChatNotificationContent(t){var r,o;let n="";if(!t||!(t!=null&&t.ID)||!(t!=null&&t.type))return n;switch(this.showPreviews){case!0:n=await this._handleChatNotificationContentTitle(t),n+=this._handleChatNotificationContentText(t);break;case!1:n="您有"+await((o=(r=uo==null?void 0:uo.TUICore)==null?void 0:r.tim)==null?void 0:o.getTotalUnreadMessageCount())+"条新消息";break}return n}async _handleChatNotificationContentTitle(t){var r,o,i;let n="";switch(t==null?void 0:t.conversationType){case yt.TYPES.CONV_C2C:n=((t==null?void 0:t.nick)||(t==null?void 0:t.from))+": ";break;case yt.TYPES.CONV_GROUP:n=(t==null?void 0:t.conversationID)+": ",await((i=(o=(r=uo==null?void 0:uo.TUICore)==null?void 0:r.tim)==null?void 0:o.getConversationProfile(t==null?void 0:t.conversationID))==null?void 0:i.then(s=>{var u,d,f;n=(((f=(d=(u=s==null?void 0:s.data)==null?void 0:u.conversation)==null?void 0:d.groupProfile)==null?void 0:f.name)||(t==null?void 0:t.conversationID))+": "}).catch(()=>{n=(t==null?void 0:t.conversationID)+": "}));break;case yt.TYPES.CONV_SYSTEM:n="系统消息: ";break}return n}_handleChatNotificationContentText(t){var r;let n="";switch(t.type){case yt.TYPES.MSG_TEXT:n+=(r=t==null?void 0:t.payload)==null?void 0:r.text;break;case yt.TYPES.MSG_CUSTOM:n+="[自定义消息]";break;case yt.TYPES.MSG_IMAGE:n+="[图片]";break;case yt.TYPES.MSG_AUDIO:n+="[语音]";break;case yt.TYPES.MSG_VIDEO:n+="[视频]";break;case yt.TYPES.MSG_FILE:n+="[文件]";break;case yt.TYPES.MSG_FACE:n+="[表情]";break;case yt.TYPES.MSG_MERGER:n+="[聊天记录]";break;case yt.TYPES.MSG_LOCATION:n+="[位置]";break}return n}_handleCallNotificationContent(t){var o;let n="",r=!1;try{if(t.type===yt.TYPES.MSG_CUSTOM){const i=or((o=t==null?void 0:t.payload)==null?void 0:o.data),s=or(i.data);(i==null?void 0:i.businessID)===1&&(i.actionType===1&&(i.groupID&&i.timeout>0||!i.call_end&&i.call_end!==0&&!i.groupID&&!(s!=null&&s.data&&((s==null?void 0:s.data.cmd)==="switchToAudio"||(s==null?void 0:s.data.cmd)==="switchToVideo")))?(n=this.showPreviews?`${i.inviter} 发起通话`:"您有一个通话请求",r=!1):i.actionType===2&&(n=this.showPreviews?`${i.inviter} 取消通话`:"通话取消",r=!0))}}catch(i){console.warn(i)}return{content:n,callEnd:r}}checkPageFocus(){return document.hasFocus()}};Xt(uo,"TUICore"),Xt(uo,"instance");let UM=uo;class ld{destroyed(){}updateStore(t,n){}}class qO extends ld{constructor(n){super();Xt(this,"TUICore");Xt(this,"store");Xt(this,"currentStore",{});this.TUICore=n,this.bindTIMEvent(),this.store=n.setComponentStore("TUIChat",{},this.updateStore.bind(this))}destroyed(){this.unbindTIMEvent()}updateStore(n,r){if(Object.assign(this.currentStore,n),!n.conversation.conversationID){this.currentStore.messageList=[];return}n.conversation.conversationID&&n.conversation.conversationID!==r.conversation.conversationID&&this.render(n.conversation)}render(n){var o,i,s;if(this.currentStore.isFirstRender=!0,this.currentStore.messageList=[],this.currentStore.readSet.clear(),this.getMessageList({conversationID:n.conversationID,count:15}),n.type===this.TUICore.TIM.TYPES.CONV_GROUP){this.currentStore.userInfo.isGroup=!0;const u={groupID:n.groupProfile.groupID,userIDList:[n.groupProfile.selfInfo.userID]};this.getGroupProfile({groupID:n.groupProfile.groupID}),this.getGroupMemberProfile(u).then(d=>{const{memberList:f}=d.data,[g]=f;this.currentStore.selfInfo=g}),(s=(i=(o=this==null?void 0:this.TUICore)==null?void 0:o.TUIServer)==null?void 0:i.TUIGroup)==null||s.getGroupMemberList({groupID:n.groupProfile.groupID,count:100,offset:0}).then(d=>{var f;this.currentStore.allMemberList=(f=d.data)==null?void 0:f.memberList})}else this.currentStore.userInfo.isGroup=!1,this.currentStore.userInfo.list=[n==null?void 0:n.userProfile]}bindTIMEvent(){this.TUICore.tim.on(this.TUICore.TIM.EVENT.MESSAGE_RECEIVED,this.handleMessageReceived,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.MESSAGE_MODIFIED,this.handleMessageModified,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.MESSAGE_REVOKED,this.handleMessageRevoked,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.MESSAGE_READ_BY_PEER,this.handleMessageReadByPeer,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.GROUP_LIST_UPDATED,this.handleGroupListUpdated,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.MESSAGE_READ_RECEIPT_RECEIVED,this.handleMessageReadReceiptReceived,this)}unbindTIMEvent(){this.TUICore.tim.off(this.TUICore.TIM.EVENT.MESSAGE_RECEIVED,this.handleMessageReceived),this.TUICore.tim.off(this.TUICore.TIM.EVENT.MESSAGE_MODIFIED,this.handleMessageModified),this.TUICore.tim.off(this.TUICore.TIM.EVENT.MESSAGE_REVOKED,this.handleMessageRevoked),this.TUICore.tim.off(this.TUICore.TIM.EVENT.MESSAGE_READ_BY_PEER,this.handleMessageReadByPeer),this.TUICore.tim.off(this.TUICore.TIM.EVENT.GROUP_LIST_UPDATED,this.handleGroupListUpdated),this.TUICore.tim.off(this.TUICore.TIM.EVENT.MESSAGE_READ_RECEIPT_RECEIVED,this.handleMessageReadReceiptReceived)}handleMessageReceived(n){var r;(r=n==null?void 0:n.data)==null||r.forEach(o=>{var i,s;(o==null?void 0:o.conversationID)===((s=(i=this==null?void 0:this.store)==null?void 0:i.conversation)==null?void 0:s.conversationID)&&(this.currentStore.messageList=[...this.currentStore.messageList,o]),UM.getInstance().notify(o)})}handleMessageModified(n){const r=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=r}handleMessageRevoked(n){const r=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=r}handleMessageReadByPeer(n){const r=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=r}handleGroupListUpdated(n){n==null||n.data.map(r=>{var o,i,s;return(r==null?void 0:r.groupID)===((s=(i=(o=this==null?void 0:this.store)==null?void 0:o.conversation)==null?void 0:i.groupProfile)==null?void 0:s.groupID)&&(this.store.conversation.groupProfile=r,this.currentStore.conversation={},this.currentStore.conversation=this.store.conversation),r})}handleMessageReadReceiptReceived(n){const r=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=r}handleMessageOptions(n,r,o,i){var u,d,f,g,v,_;const s={to:"",conversationType:(i==null?void 0:i.type)||this.store.conversation.type,payload:n,needReadReceipt:this.currentStore.needReadReceipt};switch(this.currentStore.needTyping&&(s.cloudCustomData={messageFeature:{needTyping:1,version:1}},s.cloudCustomData=JSON.stringify(s.cloudCustomData)),r==="file"&&o&&(s.onProgress=o),s.conversationType){case this.TUICore.TIM.TYPES.CONV_C2C:s.to=((u=i==null?void 0:i.userProfile)==null?void 0:u.userID)||((f=(d=this.store.conversation)==null?void 0:d.userProfile)==null?void 0:f.userID)||"";break;case this.TUICore.TIM.TYPES.CONV_GROUP:s.to=((g=i==null?void 0:i.groupProfile)==null?void 0:g.groupID)||((_=(v=this.store.conversation)==null?void 0:v.groupProfile)==null?void 0:_.groupID)||"";break}return s}handlePromiseCallback(n){return new Promise((r,o)=>{const i={TUIName:"TUIChat",callback:()=>{n&&n(r,o)}};this.TUICore.setAwaitFunc(i.TUIName,i.callback)})}handlePromiseCallbackRetry(n,r=[],o=function(){return!1}){return new Promise((i,s)=>{let u=0;function d(){u++,n().then(i).catch(f=>{if(u>r.length||o&&o(f)){s(f);return}setTimeout(d,r[u-1])})}d()})}handleUploadProgress(n,r){this.currentStore.messageList.map(o=>(o.ID===r.ID&&(o.progress=n),o))}async deleteConversation(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.deleteConversation(n);r(i)}catch(i){o(i)}})}sendFaceMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=this.handleMessageOptions(n,"face"),s=this.TUICore.tim.createFaceMessage(i);this.currentStore.messageList.push(s);const u=await this.TUICore.tim.sendMessage(s);this.currentStore.messageList=this.currentStore.messageList.map(d=>d.ID===u.data.message.ID?u.data.message:d),r(u)}catch(i){o(i);const s=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=s}})}sendImageMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=this.handleMessageOptions({file:n},"file",d=>{this.handleUploadProgress(d,s)}),s=this.TUICore.tim.createImageMessage(i);s.progress=.01,this.currentStore.messageList.push(s);const u=await this.TUICore.tim.sendMessage(s);this.currentStore.messageList=this.currentStore.messageList.map(d=>d.ID===u.data.message.ID?u.data.message:d),r(u)}catch(i){o(i);const s=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=s}})}sendVideoMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=this.handleMessageOptions({file:n},"file",d=>{this.handleUploadProgress(d,s)}),s=this.TUICore.tim.createVideoMessage(i);s.progress=.01,this.currentStore.messageList.push(s);const u=await this.TUICore.tim.sendMessage(s);this.currentStore.messageList=this.currentStore.messageList.map(d=>d.ID===u.data.message.ID?u.data.message:d),r(u)}catch(i){o(i);const s=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=s}})}sendFileMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=this.handleMessageOptions({file:n},"file",d=>{this.handleUploadProgress(d,s)}),s=this.TUICore.tim.createFileMessage(i);s.progress=.01,this.currentStore.messageList.push(s);const u=await this.TUICore.tim.sendMessage(s);this.currentStore.messageList=this.currentStore.messageList.map(d=>d.ID===u.data.message.ID?u.data.message:d),r(u)}catch(i){o(i);const s=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=s}})}sendCustomMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{n.data=JSON.stringify(n.data);const i=this.handleMessageOptions(n,"custom"),s=this.TUICore.tim.createCustomMessage(i);this.currentStore.messageList.push(s);const u=await this.TUICore.tim.sendMessage(s);this.currentStore.messageList=this.currentStore.messageList.map(d=>d.ID===u.data.message.ID?u.data.message:d),r(u)}catch(i){o(i);const s=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=s}})}sendLocationMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=this.handleMessageOptions(n,"location"),s=this.TUICore.tim.createLocationMessage(i);this.currentStore.messageList.push(s);const u=await this.TUICore.tim.sendMessage(s);r(u)}catch(i){o(i);const s=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=s}})}forwardMessage(n,r){return this.handlePromiseCallback(async(o,i)=>{try{const s=this.handleMessageOptions(n,"forward",{},r),u=this.TUICore.tim.createForwardMessage(s),d=await this.TUICore.tim.sendMessage(u);this.store.conversation.conversationID===d.data.message.conversationID&&this.currentStore.messageList.push(d.data.message),o(d)}catch(s){i(s);const u=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=u}})}async sendMessageReadReceipt(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.sendMessageReadReceipt(n);r(i)}catch(i){o(i)}})}async getMessageReadReceiptList(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getMessageReadReceiptList(n);r(i)}catch(i){o(i)}})}async getMessageList(n,r){return this.handlePromiseCallback(async(o,i)=>{try{const s=await this.TUICore.tim.getMessageList(n);s.data.messageList.length&&await this.getMessageReadReceiptList(s.data.messageList),r?this.currentStore.messageList=[...s.data.messageList,...this.currentStore.messageList]:this.currentStore.messageList=s.data.messageList,this.currentStore.nextReqMessageID=s.data.nextReqMessageID,this.currentStore.isCompleted=s.data.isCompleted,o(s)}catch(s){i(s)}})}async getHistoryMessageList(){const n={conversationID:this.currentStore.conversation.conversationID,nextReqMessageID:this.currentStore.nextReqMessageID,count:15};this.currentStore.isCompleted||this.getMessageList(n,!0)}sendTextMessage(n,r){return this.handlePromiseCallback(async(o,i)=>{try{const s=this.handleMessageOptions({text:n},"text");let u={};if(s.cloudCustomData)try{u=or(s.cloudCustomData)}catch{u={}}const d=JSON.stringify(r),f=Object.assign(s,{cloudCustomData:d,...u}),g=this.TUICore.tim.createTextMessage(f);this.currentStore.messageList.push(g);const v=await this.TUICore.tim.sendMessage(g);this.currentStore.messageList=this.currentStore.messageList.map(_=>_.ID===v.data.message.ID?v.data.message:_),o(v)}catch(s){i(s);const u=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=u}})}sendTypingMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{n.data=JSON.stringify(n.data);const i=this.handleMessageOptions(n,"custom"),s=this.TUICore.tim.createCustomMessage(i),u=await this.TUICore.tim.sendMessage(s,{onlineUserOnly:!0});r(u)}catch(i){o(i);const s=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=s}})}sendTextAtMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=this.handleMessageOptions(n,"text"),s=this.TUICore.tim.createTextAtMessage(i);this.currentStore.messageList.push(s);const u=await this.TUICore.tim.sendMessage(s);this.currentStore.messageList=this.currentStore.messageList.map(d=>d.ID===u.data.message.ID?u.data.message:d),r(u)}catch(i){o(i);const s=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=s}})}sendMergerMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=this.handleMessageOptions(n,"merger"),s=this.TUICore.tim.createMergerMessage(i);this.currentStore.messageList.push(s);const u=await this.TUICore.tim.sendMessage(s);this.currentStore.messageList=this.currentStore.messageList.map(d=>d.ID===u.data.message.ID?u.data.message:d),r(u)}catch(i){o(i);const s=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=s}})}revokeMessage(n){return this.handlePromiseCallback(async(r,o)=>{var i;try{const s=await this.TUICore.tim.revokeMessage(n),u=or(n==null?void 0:n.cloudCustomData);(i=u==null?void 0:u.messageReply)!=null&&i.messageRootID&&await this.revokeReplyMessage(n),r(s)}catch(s){o(s);const u=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=u}})}resendMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.resendMessage(n);this.currentStore.messageList=this.currentStore.messageList.filter(s=>s.ID!==n.ID),this.currentStore.messageList.push(i.data.message),r(i)}catch(i){o(i)}})}deleteMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.deleteMessage(n);r(i);const s=this.currentStore.messageList;this.currentStore.messageList=[],this.currentStore.messageList=s}catch(i){o(i)}})}modifyMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.modifyMessage(n);r(i)}catch(i){const s=i==null?void 0:i.code,u=i==null?void 0:i.data;s===2480?console.warn("MODIFY_MESSAGE_ERROR","修改消息发生冲突,data.message 是最新的消息","data.message:",u==null?void 0:u.message):s===2481?console.warn("MODIFY_MESSAGE_ERROR","不支持修改直播群消息"):s===20026&&console.warn("MODIFY_MESSAGE_ERROR","消息不存在"),o(i)}})}replyMessage(n,r){const o=()=>this.handlePromiseCallback(async(s,u)=>{var d,f,g,v,_,M;try{const I={messageAbstract:(d=n==null?void 0:n.payload)==null?void 0:d.text,messageSender:n==null?void 0:n.from,messageID:n==null?void 0:n.ID,messageType:n==null?void 0:n.type,messageTime:n==null?void 0:n.time,messageSequence:n==null?void 0:n.sequence,version:1};if(!r){const S=or(n==null?void 0:n.cloudCustomData),L=(f=S==null?void 0:S.messageReply)==null?void 0:f.messageRootID;r=await((v=(g=this==null?void 0:this.currentStore)==null?void 0:g.messageList)==null?void 0:v.find(A=>(A==null?void 0:A.ID)===L))||this.findMessage(L)}const k=r!=null&&r.cloudCustomData?or(r==null?void 0:r.cloudCustomData):{messageReplies:{}};(_=k==null?void 0:k.messageReplies)!=null&&_.replies?k.messageReplies.replies=[...(M=k==null?void 0:k.messageReplies)==null?void 0:M.replies,I]:k.messageReplies={replies:[I],version:1},r.cloudCustomData=JSON.stringify(k);const w=this.modifyMessage(r);s(w)}catch(I){u(I)}}),i=function(s){return!(s&&(s==null?void 0:s.code)===2480)};return this.handlePromiseCallbackRetry(o,[500,1e3,3e3],i)}revokeReplyMessage(n,r){const o=()=>this.handlePromiseCallback(async(s,u)=>{var d,f,g,v,_,M;try{if(!r){const w=or(n==null?void 0:n.cloudCustomData),S=(d=w==null?void 0:w.messageReply)==null?void 0:d.messageRootID;r=await((g=(f=this==null?void 0:this.currentStore)==null?void 0:f.messageList)==null?void 0:g.find(L=>(L==null?void 0:L.ID)===S))||this.findMessage(S)}const I=r!=null&&r.cloudCustomData?or(r==null?void 0:r.cloudCustomData):{messageReplies:{}};if((v=I==null?void 0:I.messageReplies)!=null&&v.replies){const w=I.messageReplies.replies.findIndex(S=>(S==null?void 0:S.messageID)===(n==null?void 0:n.ID));(M=(_=I==null?void 0:I.messageReplies)==null?void 0:_.replies)==null||M.splice(w,1)}r.cloudCustomData=JSON.stringify(I);const k=this.modifyMessage(r);s(k)}catch(I){u(I)}}),i=function(s){return!(s&&(s==null?void 0:s.code)===2480)};return this.handlePromiseCallbackRetry(o,[500,1e3,3e3],i)}emojiReact(n,r){const o=()=>this.handlePromiseCallback(async(s,u)=>{var d,f,g,v,_,M,I,k,w,S,L,A,O,H,q,P,B,j;try{(!n||!(n!=null&&n.ID)||!r)&&u();const $=(_=(v=(g=(f=(d=this.TUICore)==null?void 0:d.TUIServer)==null?void 0:f.TUIProfile)==null?void 0:g.store)==null?void 0:v.profile)==null?void 0:_.userID;n=await((I=(M=this==null?void 0:this.currentStore)==null?void 0:M.messageList)==null?void 0:I.find(x=>(x==null?void 0:x.ID)===(n==null?void 0:n.ID)))||this.findMessage(n==null?void 0:n.ID);const R=n!=null&&n.cloudCustomData?or(n==null?void 0:n.cloudCustomData):{messageReact:{}};if((k=R==null?void 0:R.messageReact)!=null&&k.reacts)if((w=R==null?void 0:R.messageReact)!=null&&w.reacts[r]){const x=(L=(S=R==null?void 0:R.messageReact)==null?void 0:S.reacts[r])==null?void 0:L.indexOf($);x===-1?(O=(A=R==null?void 0:R.messageReact)==null?void 0:A.reacts[r])==null||O.push($):((q=(H=R==null?void 0:R.messageReact)==null?void 0:H.reacts[r])==null||q.splice(x,1),((B=(P=R==null?void 0:R.messageReact)==null?void 0:P.reacts[r])==null?void 0:B.length)===0&&((j=R==null?void 0:R.messageReact)==null||delete j.reacts[r]))}else R.messageReact.reacts[r]=[$];else R.messageReact={reacts:{},version:1},R.messageReact.reacts[r]=[$];n.cloudCustomData=JSON.stringify(R);const T=this.modifyMessage(n);s(T)}catch($){u($)}}),i=function(s){return!(s&&(s==null?void 0:s.code)===2480)};return this.handlePromiseCallbackRetry(o,[500,1e3,3e3],i)}findMessage(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.findMessage(n);r(i)}catch(i){o(i)}})}getGroupProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getGroupProfile(n);this.currentStore.conversation.groupProfile=i.data.group,r(i)}catch(i){o(i)}})}getGroupMemberProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getGroupMemberProfile(n);r(i)}catch(i){o(i)}})}handleGroupApplication(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.handleGroupApplication(n);r(i)}catch(i){o(i)}})}async getUserProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getUserProfile({userIDList:n});r(i)}catch(i){o(i)}})}async getFriendList(){return this.handlePromiseCallback(async(n,r)=>{try{const o=await this.TUICore.tim.getFriendList();n(o)}catch(o){r(o)}})}async checkFriend(n,r){return this.handlePromiseCallback(async(o,i)=>{var s,u;try{const d=await this.TUICore.tim.checkFriend({userIDList:[n],type:r}),f=(u=(s=d==null?void 0:d.data)==null?void 0:s.successUserIDList[0])==null?void 0:u.relation;o(f)}catch(d){i(d)}})}async getGroupReadMemberList(n,r="",o=15){return this.handlePromiseCallback(async(i,s)=>{try{const u=await this.TUICore.tim.getGroupMessageReadMemberList({message:n,filter:0,cursor:r,count:o});i(u)}catch(u){s(u)}})}async getGroupUnreadMemberList(n,r="",o=15){return this.handlePromiseCallback(async(i,s)=>{try{const u=await this.TUICore.tim.getGroupMessageReadMemberList({message:n,filter:1,cursor:r,count:o});i(u)}catch(u){s(u)}})}async handleMessageSentByMeToView(n){var r,o;(n==null?void 0:n.conversationID)===((o=(r=this==null?void 0:this.store)==null?void 0:r.conversation)==null?void 0:o.conversationID)&&this.currentStore.messageList.push(n)}bind(n){return this.currentStore=n}}const GG=it({props:{data:{type:Object,default:()=>({})}},setup(e,t){const n=Wt({data:{}});return nn(()=>{n.data=e.data}),{...Yt(n)}}});const Kt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},BG={key:0,class:"text-box"},HG=["src"];function qG(e,t,n,r,o,i){return J(!0),oe(ft,null,zt(e.data.text,(s,u)=>(J(),oe(ft,{key:u},[s.name==="text"?(J(),oe("span",BG,De(s.text),1)):s.name==="img"?(J(),oe("img",{key:1,class:"text-img",src:s.src},null,8,HG)):Ie("",!0)],64))),128)}const VO=Kt(GG,[["render",qG],["__scopeId","data-v-00031cc3"]]),VG=it({props:{data:{type:Object,default:()=>({})},isH5:{type:Boolean,default:!1}},emits:["uploading","previewImage"],setup(e,t){const n=Wt({data:{progress:0},show:!1}),r=Ne(),o=qe(()=>{var g,v,_;const{width:d=0,height:f=0}=(_=(v=(g=n.data)==null?void 0:g.message)==null?void 0:v.payload)==null?void 0:_.imageInfoArray[0];return d>=f});nn(()=>{n.data=e.data,n.data&&wr(()=>{var d,f,g;if(n.data.progress)t.emit("uploading");else{const{width:v=0,height:_=0}=n.data;if(v===0||_===0)return;const M=((d=document.getElementById("app"))==null?void 0:d.clientWidth)||0,I=e.isH5?Math.min(M-180,300):300,k=UC(v,_,I,I);(f=r==null?void 0:r.value)!=null&&f.style&&(r.value.style.width=`${k.width}Px`),(g=r==null?void 0:r.value)!=null&&g.style&&(r.value.style.height=`${k.height}Px`)}})});const i=()=>{n.data.progress||t.emit("previewImage",n.data.message)},s=d=>{const f=document.createElement("a"),g=d.payload.imageInfoArray[0].instanceID;f.setAttribute("download",g);const v=new Image;v.src=d.payload.imageInfoArray[0].url,v.setAttribute("crossOrigin","Anonymous"),v.onload=()=>{f.href=u(v),f.click()}},u=d=>{const f=document.createElement("canvas");f.width=d.width,f.height=d.height;const g=f.getContext("2d");g==null||g.drawImage(d,0,0,d.width,d.height);const v=d.src.substring(d.src.lastIndexOf(".")+1).toLowerCase();return f.toDataURL(`image/${v}`,1)};return{...Yt(n),toggleShow:i,skeleton:r,isWidth:o,downloadImage:s}}}),zG=""+new URL("close-image-15985c26.png",import.meta.url).href,jG=""+new URL("downaload-image-285429cc.png",import.meta.url).href;const zO=e=>(pr("data-v-281b776a"),e=e(),hr(),e),WG=["src","width","height"],KG={key:0,class:"progress"},YG=["value"],JG={key:0},XG=["src"],ZG={key:0,class:"dialog-box-h5-footer"},QG=zO(()=>G("img",{src:zG},null,-1)),e9=[QG],t9=zO(()=>G("img",{src:jG},null,-1)),n9=[t9];function r9(e,t,n,r,o,i){return J(),oe("div",{class:"message-image",onClick:t[6]||(t[6]=Mn((...s)=>e.toggleShow&&e.toggleShow(...s),["self"])),ref:"skeleton"},[G("img",{class:"message-img",src:e.data.url,width:e.data.width,height:e.data.height,style:No(e.isH5?{maxWidth:e.data.width?e.data.width+"Px":"calc(100vw - 180Px)",maxHeight:e.data.height?e.data.height+"Px":"calc(100vw - 180Px)"}:{})},null,12,WG),e.data.progress?(J(),oe("div",KG,[G("progress",{value:e.data.progress,max:"1"},null,8,YG)])):Ie("",!0),e.show?(J(),oe("div",{key:1,class:"dialog",onClick:t[5]||(t[5]=Mn((...s)=>e.toggleShow&&e.toggleShow(...s),["self"]))},[e.isH5?Ie("",!0):(J(),oe("header",JG,[G("i",{class:"icon icon-close",onClick:t[0]||(t[0]=Mn((...s)=>e.toggleShow&&e.toggleShow(...s),["stop"]))})])),G("div",{class:lt(["dialog-box",[e.isH5?"dialog-box-h5":""]]),onClick:t[4]||(t[4]=Mn((...s)=>e.toggleShow&&e.toggleShow(...s),["self"]))},[G("img",{class:lt([e.isWidth?"isWidth":"isHeight"]),src:e.data.message.payload.imageInfoArray[0].url,onClick:t[1]||(t[1]=Mn((...s)=>e.toggleShow&&e.toggleShow(...s),["self"]))},null,10,XG),e.isH5?(J(),oe("div",ZG,[G("p",{onClick:t[2]||(t[2]=(...s)=>e.toggleShow&&e.toggleShow(...s))},e9),G("p",{onClick:t[3]||(t[3]=Mn(s=>e.downloadImage(e.data.message),["stop"]))},n9)])):Ie("",!0)],2)])):Ie("",!0)],512)}const o9=Kt(VG,[["render",r9],["__scopeId","data-v-281b776a"]]),i9=it({props:{data:{type:Object,default:()=>({})},isH5:{type:Boolean,default:!1}},setup(e,t){const n=Wt({data:{},show:!1,poster:"",posterWidth:0,posterHeight:0}),r=Ne(),o=Ne(),i=qe(()=>{var _,M;const{snapshotWidth:g=0,snapshotHeight:v=0}=(M=(_=n.data)==null?void 0:_.message)==null?void 0:M.payload;return g>=v}),s="https://web.sdk.qcloud.com/im/assets/images/transparent.png",u=()=>{n.data.progress||(n.show=!n.show)},d=g=>new Promise(function(v,_){let M="",I=document.createElement("video");I.setAttribute("crossOrigin","anonymous"),I.setAttribute("src",g),I.setAttribute("preload","auto"),I.addEventListener("loadeddata",function(){let k=document.createElement("canvas"),w=I.videoWidth,S=I.videoHeight;k.width=w,k.height=S,k.getContext("2d").drawImage(I,0,0,w,S),M=k.toDataURL("image/jpeg"),n.posterWidth=w,n.posterHeight=S,v(M)},{once:!0})}),f=async g=>{var v,_,M,I,k,w,S,L;return g?g.progress?await d(g.url):g.snapshotUrl!==s&&g.snapshotUrl||((_=(v=g==null?void 0:g.message)==null?void 0:v.payload)==null?void 0:_.snapshotUrl)!==s&&((I=(M=g==null?void 0:g.message)==null?void 0:M.payload)==null?void 0:I.snapshotUrl)||((w=(k=g==null?void 0:g.message)==null?void 0:k.payload)==null?void 0:w.thumbUrl)!==s&&((L=(S=g==null?void 0:g.message)==null?void 0:S.payload)==null?void 0:L.thumbUrl)||await d(g.url):""};return nn(async()=>{n.data=e.data,n.data&&(n.poster=await f(n.data),wr(async()=>{var M,I,k,w,S;const g=((M=document.getElementById("messageEle"))==null?void 0:M.clientWidth)||0,v=e.isH5?Math.min(g-172,300):300;let _;if(n.data.progress)t.emit("uploading");else{let{snapshotWidth:L=0,snapshotHeight:A=0,snapshotUrl:O}=n.data;if(L===0||A===0)return;O===s&&(L=n.posterWidth,A=n.posterHeight),_=UC(L,A,v,v),(I=r==null?void 0:r.value)!=null&&I.style&&(r.value.style.width=`${_.width}Px`),(k=r==null?void 0:r.value)!=null&&k.style&&(r.value.style.height=`${_.height}Px`),e.isH5||((w=o==null?void 0:o.value)!=null&&w.style&&(o.value.style.width=`${_.width}Px`),(S=o==null?void 0:o.value)!=null&&S.style&&(o.value.style.height=`${_.height}Px`))}}))}),Bt(()=>{var g;return(g=n.data)==null?void 0:g.progress},(g,v)=>{!g&&v&&t.emit("uploading")}),{...Yt(n),toggleShow:u,isWidth:i,getVideoBase64:d,handlePosterUrl:f,skeleton:r,video:o}}});const s9={class:"message-video"},a9=["src"],l9=["src","poster"],u9=["src","poster"],c9={key:3,class:"progress"},d9=["value"],f9=["src"];function p9(e,t,n,r,o,i){return J(),oe("div",s9,[G("div",{class:lt(["message-video-box",[!e.data.progress&&e.data.message.status==="success"&&e.isH5&&"message-video-cover"]]),onClick:t[0]||(t[0]=(...s)=>e.toggleShow&&e.toggleShow(...s)),ref:"skeleton"},[e.data.progress&&e.poster||e.isH5&&e.poster?(J(),oe("img",{key:0,class:lt(["message-img",[e.isWidth?"isWidth":"isHeight"]]),src:e.poster},null,10,a9)):e.isH5?(J(),oe("video",{key:1,class:"message-img video-h5-uploading",src:e.data.url+"#t=0.1",poster:e.data.url,preload:"auto",muted:"",ref:"video"},null,8,l9)):!e.data.progress&&!e.isH5?(J(),oe("video",{key:2,class:"message-img video-web",src:e.data.url,controls:"",preload:"metadata",poster:e.poster,ref:"video"},null,8,u9)):Ie("",!0),e.data.progress?(J(),oe("div",c9,[G("progress",{value:e.data.progress,max:"1"},null,8,d9)])):Ie("",!0)],2),e.show&&e.isH5?(J(),oe("div",{key:0,class:"dialog-video",onClick:t[3]||(t[3]=Mn((...s)=>e.toggleShow&&e.toggleShow(...s),["self"]))},[G("header",null,[G("i",{class:"icon icon-close",onClick:t[1]||(t[1]=Mn((...s)=>e.toggleShow&&e.toggleShow(...s),["stop"]))})]),G("div",{class:lt(["dialog-video-box",[e.isH5?"dialog-video-h5":""]]),onClick:t[2]||(t[2]=Mn((...s)=>e.toggleShow&&e.toggleShow(...s),["self"]))},[G("video",{class:lt([e.isWidth?"isWidth":"isHeight"]),src:e.data.url,controls:"",autoplay:""},null,10,f9)],2)])):Ie("",!0)])}const h9=Kt(i9,[["render",p9],["__scopeId","data-v-11fbdcca"]]),g9=it({props:{data:{type:Object,default:()=>({})}},setup(e,t){const n=Wt({data:{},show:!1,isPlay:!1}),r=Ne(null);Bt(()=>e.data,()=>{n.data=e.data},{deep:!0,immediate:!0});const o=()=>{const s=document.getElementsByTagName("audio");for(const f of s)f.paused||(f.parentNode.querySelector(".icon-voice").classList.remove("icon-voice-active"),f.pause(),f.load());const u=r.value,d=u.parentNode;u.paused?(u.play(),n.show=!0,d.querySelector(".icon-voice").classList.add("icon-voice-active")):(u.pause(),u.load(),n.show=!1,d.querySelector(".icon-voice").classList.remove("icon-voice-active"))},i=s=>{const u=s.target.parentNode;u&&u.querySelector(".icon-voice").classList.remove("icon-voice-active")};return{...Yt(n),audio:r,play:o,onStopAnimation:i}}});const m9=["src"];function v9(e,t,n,r,o,i){var s;return J(),oe("div",{class:lt(["message-audio",[e.data.message.flow==="out"&&"reserve"]]),onClick:t[2]||(t[2]=Mn((...u)=>e.play&&e.play(...u),["stop"])),style:No(`width: ${((s=e.data)==null?void 0:s.second)*10+40}Px`)},[G("i",{class:lt(["icon icon-voice",[e.data.message.flow==="out"&&"icon-reserve",e.data.message.isPlay?"icon-voice-active":""]])},null,2),G("label",null,De(e.data.second?e.data.second:1)+"s",1),G("audio",{ref:"audio",src:e.data.url,onPause:t[0]||(t[0]=(...u)=>e.onStopAnimation&&e.onStopAnimation(...u)),onEnded:t[1]||(t[1]=(...u)=>e.onStopAnimation&&e.onStopAnimation(...u))},null,40,m9)],6)}const y9=Kt(g9,[["render",v9],["__scopeId","data-v-af2d91ec"]]),_9=it({props:{data:{type:Object,default:()=>({})}},setup(e,t){const n=Wt({data:{}});nn(()=>{n.data=e.data});const r=()=>{const o=n.data,i={mode:"cors",headers:new Headers({"Content-Type":"application/x-www-form-urlencoded"})};if(window.fetch)fetch(o.url,i).then(s=>s.blob()).then(s=>{const u=document.createElement("a"),d=window.URL.createObjectURL(s);u.href=d,u.download=o.name,u.click()});else{const s=document.createElement("a");s.href=o.url,s.target="_blank",s.download=o.name,s.click()}};return{...Yt(n),download:r}}});const b9=e=>(pr("data-v-4d978c64"),e=e(),hr(),e),M9={class:"message-file"},I9=["title"],C9=b9(()=>G("i",{class:"icon icon-files"},null,-1)),T9={class:"message-file-content"},w9=["value"];function S9(e,t,n,r,o,i){return J(),oe("div",M9,[G("div",{class:"box",onClick:t[0]||(t[0]=(...s)=>e.download&&e.download(...s)),title:e.$t("TUIChat.单击下载")},[C9,G("div",T9,[G("label",null,De(e.data.name),1),G("span",null,De(e.data.size),1)])],8,I9),e.data.progress?(J(),oe("progress",{key:0,value:e.data.progress,max:"1"},null,8,w9)):Ie("",!0)])}const k9=Kt(_9,[["render",S9],["__scopeId","data-v-4d978c64"]]),D9=it({props:{data:{type:Object,default:()=>({})},isH5:{type:Boolean,default:!1}},setup(e,t){const n=Wt({data:{}}),r=Ne();return nn(()=>{n.data=e.data,n.data&&wr(()=>{var u,d,f;const o=((u=document.getElementById("messageEle"))==null?void 0:u.clientWidth)||0,i=e.isH5?Math.min(o-172,300):300,s=UC(240,240,i,i);(d=r==null?void 0:r.value)!=null&&d.style&&(r.value.style.width=`${s.width}Px`),(f=r==null?void 0:r.value)!=null&&f.style&&(r.value.style.height=`${s.height}Px`)})}),{...Yt(n),skeleton:r}}});const E9={class:"message-image",ref:"skeleton"},A9=["src"];function L9(e,t,n,r,o,i){return J(),oe("div",E9,[G("img",{class:"message-img",src:e.data.url,style:No(e.isH5?{maxWidth:e.data.width?e.data.width+"Px":"calc(100vw - 180Px)",maxHeight:e.data.height?e.data.height+"Px":"calc(100vw - 180Px)"}:{})},null,12,A9)],512)}const O9=Kt(D9,[["render",L9],["__scopeId","data-v-8d16877e"]]),R9=it({props:{data:{type:Object,default:()=>({})}},setup(e,t){const n=Wt({data:{}});return nn(()=>{n.data=e.data}),{...Yt(n)}}});const N9=["href"],P9={class:"el-icon-location-outline"},x9=["src"];function U9(e,t,n,r,o,i){return J(),oe("a",{class:"message-location",href:e.data.href,target:"_blank",title:"点击查看详情"},[G("span",P9,De(e.data.description),1),G("img",{src:e.data.url},null,8,x9)],8,N9)}const F9=Kt(R9,[["render",U9],["__scopeId","data-v-593d36f3"]]),$9=it({props:{data:{type:Object,default:()=>({})}},setup(e,t){const n=Wt({data:{}});return nn(()=>{n.data=e.data}),{...Yt(n)}}});const G9={class:"message-merger"};function B9(e,t,n,r,o,i){return J(),oe("div",G9," 当前版本不支持查看此消息 ")}const H9=Kt($9,[["render",B9],["__scopeId","data-v-4604e088"]]);/*! * vuex v4.0.2 * (c) 2021 Evan You * @license MIT */var FC="store";function Ai(e){return e===void 0&&(e=null),en(e!==null?e:FC)}function q9(e,t){return e.filter(t)[0]}function FM(e,t){if(t===void 0&&(t=[]),e===null||typeof e!="object")return e;var n=q9(t,function(o){return o.original===e});if(n)return n.copy;var r=Array.isArray(e)?[]:{};return t.push({original:e,copy:r}),Object.keys(e).forEach(function(o){r[o]=FM(e[o],t)}),r}function jf(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function jO(e){return e!==null&&typeof e=="object"}function V9(e){return e&&typeof e.then=="function"}function z9(e,t){return function(){return e(t)}}function WO(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function KO(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;zy(e,n,[],e._modules.root,!0),$C(e,n,t)}function $C(e,t,n){var r=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var o=e._wrappedGetters,i={};jf(o,function(s,u){i[u]=z9(s,e),Object.defineProperty(e.getters,u,{get:function(){return i[u]()},enumerable:!0})}),e._state=Wt({data:t}),e.strict&&J9(e),r&&n&&e._withCommit(function(){r.data=null})}function zy(e,t,n,r,o){var i=!n.length,s=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=r),!i&&!o){var u=GC(t,n.slice(0,-1)),d=n[n.length-1];e._withCommit(function(){u[d]=r.state})}var f=r.context=j9(e,s,n);r.forEachMutation(function(g,v){var _=s+v;W9(e,_,g,f)}),r.forEachAction(function(g,v){var _=g.root?v:s+v,M=g.handler||g;K9(e,_,M,f)}),r.forEachGetter(function(g,v){var _=s+v;Y9(e,_,g,f)}),r.forEachChild(function(g,v){zy(e,t,n.concat(v),g,o)})}function j9(e,t,n){var r=t==="",o={dispatch:r?e.dispatch:function(i,s,u){var d=Ov(i,s,u),f=d.payload,g=d.options,v=d.type;return(!g||!g.root)&&(v=t+v),e.dispatch(v,f)},commit:r?e.commit:function(i,s,u){var d=Ov(i,s,u),f=d.payload,g=d.options,v=d.type;(!g||!g.root)&&(v=t+v),e.commit(v,f,g)}};return Object.defineProperties(o,{getters:{get:r?function(){return e.getters}:function(){return YO(e,t)}},state:{get:function(){return GC(e.state,n)}}}),o}function YO(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach(function(o){if(o.slice(0,r)===t){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return e.getters[o]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function W9(e,t,n,r){var o=e._mutations[t]||(e._mutations[t]=[]);o.push(function(s){n.call(e,r.state,s)})}function K9(e,t,n,r){var o=e._actions[t]||(e._actions[t]=[]);o.push(function(s){var u=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},s);return V9(u)||(u=Promise.resolve(u)),e._devtoolHook?u.catch(function(d){throw e._devtoolHook.emit("vuex:error",d),d}):u})}function Y9(e,t,n,r){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(i){return n(r.state,r.getters,i.state,i.getters)})}function J9(e){Bt(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function GC(e,t){return t.reduce(function(n,r){return n[r]},e)}function Ov(e,t,n){return jO(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var X9="vuex bindings",hk="vuex:mutations",N1="vuex:actions",Fd="vuex",Z9=0;function Q9(e,t){M$({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[X9]},function(n){n.addTimelineLayer({id:hk,label:"Vuex Mutations",color:gk}),n.addTimelineLayer({id:N1,label:"Vuex Actions",color:gk}),n.addInspector({id:Fd,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(r){if(r.app===e&&r.inspectorId===Fd)if(r.filter){var o=[];QO(o,t._modules.root,r.filter,""),r.rootNodes=o}else r.rootNodes=[ZO(t._modules.root,"")]}),n.on.getInspectorState(function(r){if(r.app===e&&r.inspectorId===Fd){var o=r.nodeId;YO(t,o),r.state=nB(oB(t._modules,o),o==="root"?t.getters:t._makeLocalGettersCache,o)}}),n.on.editInspectorState(function(r){if(r.app===e&&r.inspectorId===Fd){var o=r.nodeId,i=r.path;o!=="root"&&(i=o.split("/").filter(Boolean).concat(i)),t._withCommit(function(){r.set(t._state.data,i,r.state.value)})}}),t.subscribe(function(r,o){var i={};r.payload&&(i.payload=r.payload),i.state=o,n.notifyComponentUpdate(),n.sendInspectorTree(Fd),n.sendInspectorState(Fd),n.addTimelineEvent({layerId:hk,event:{time:Date.now(),title:r.type,data:i}})}),t.subscribeAction({before:function(r,o){var i={};r.payload&&(i.payload=r.payload),r._id=Z9++,r._time=Date.now(),i.state=o,n.addTimelineEvent({layerId:N1,event:{time:r._time,title:r.type,groupId:r._id,subtitle:"start",data:i}})},after:function(r,o){var i={},s=Date.now()-r._time;i.duration={_custom:{type:"duration",display:s+"ms",tooltip:"Action duration",value:s}},r.payload&&(i.payload=r.payload),i.state=o,n.addTimelineEvent({layerId:N1,event:{time:Date.now(),title:r.type,groupId:r._id,subtitle:"end",data:i}})}})})}var gk=8702998,eB=6710886,tB=16777215,JO={label:"namespaced",textColor:tB,backgroundColor:eB};function XO(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function ZO(e,t){return{id:t||"root",label:XO(t),tags:e.namespaced?[JO]:[],children:Object.keys(e._children).map(function(n){return ZO(e._children[n],t+n+"/")})}}function QO(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[JO]:[]}),Object.keys(t._children).forEach(function(o){QO(e,t._children[o],n,r+o+"/")})}function nB(e,t,n){t=n==="root"?t:t[n];var r=Object.keys(t),o={state:Object.keys(e.state).map(function(s){return{key:s,editable:!0,value:e.state[s]}})};if(r.length){var i=rB(t);o.getters=Object.keys(i).map(function(s){return{key:s.endsWith("/")?XO(s):s,editable:!1,value:$M(function(){return i[s]})}})}return o}function rB(e){var t={};return Object.keys(e).forEach(function(n){var r=n.split("/");if(r.length>1){var o=t,i=r.pop();r.forEach(function(s){o[s]||(o[s]={_custom:{value:{},display:s,tooltip:"Module",abstract:!0}}),o=o[s]._custom.value}),o[i]=$M(function(){return e[n]})}else t[n]=$M(function(){return e[n]})}),t}function oB(e,t){var n=t.split("/").filter(function(r){return r});return n.reduce(function(r,o,i){var s=r[o];if(!s)throw new Error('Missing module "'+o+'" for path "'+t+'".');return i===n.length-1?s:s._children},t==="root"?e:e.root._children)}function $M(e){try{return e()}catch(t){return t}}var Qs=function(t,n){this.runtime=n,this._children=Object.create(null),this._rawModule=t;var r=t.state;this.state=(typeof r=="function"?r():r)||{}},e5={namespaced:{configurable:!0}};e5.namespaced.get=function(){return!!this._rawModule.namespaced};Qs.prototype.addChild=function(t,n){this._children[t]=n};Qs.prototype.removeChild=function(t){delete this._children[t]};Qs.prototype.getChild=function(t){return this._children[t]};Qs.prototype.hasChild=function(t){return t in this._children};Qs.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)};Qs.prototype.forEachChild=function(t){jf(this._children,t)};Qs.prototype.forEachGetter=function(t){this._rawModule.getters&&jf(this._rawModule.getters,t)};Qs.prototype.forEachAction=function(t){this._rawModule.actions&&jf(this._rawModule.actions,t)};Qs.prototype.forEachMutation=function(t){this._rawModule.mutations&&jf(this._rawModule.mutations,t)};Object.defineProperties(Qs.prototype,e5);var ud=function(t){this.register([],t,!1)};ud.prototype.get=function(t){return t.reduce(function(n,r){return n.getChild(r)},this.root)};ud.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(r,o){return n=n.getChild(o),r+(n.namespaced?o+"/":"")},"")};ud.prototype.update=function(t){t5([],this.root,t)};ud.prototype.register=function(t,n,r){var o=this;r===void 0&&(r=!0);var i=new Qs(n,r);if(t.length===0)this.root=i;else{var s=this.get(t.slice(0,-1));s.addChild(t[t.length-1],i)}n.modules&&jf(n.modules,function(u,d){o.register(t.concat(d),u,r)})};ud.prototype.unregister=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1],o=n.getChild(r);o&&o.runtime&&n.removeChild(r)};ud.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1];return n?n.hasChild(r):!1};function t5(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return;t5(e.concat(r),t.getChild(r),n.modules[r])}}function n5(e){return new Ni(e)}var Ni=function(t){var n=this;t===void 0&&(t={});var r=t.plugins;r===void 0&&(r=[]);var o=t.strict;o===void 0&&(o=!1);var i=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new ud(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var s=this,u=this,d=u.dispatch,f=u.commit;this.dispatch=function(_,M){return d.call(s,_,M)},this.commit=function(_,M,I){return f.call(s,_,M,I)},this.strict=o;var g=this._modules.root.state;zy(this,g,[],this._modules.root),$C(this,g),r.forEach(function(v){return v(n)})},BC={state:{configurable:!0}};Ni.prototype.install=function(t,n){t.provide(n||FC,this),t.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:!1;r&&Q9(t,this)};BC.state.get=function(){return this._state.data};BC.state.set=function(e){};Ni.prototype.commit=function(t,n,r){var o=this,i=Ov(t,n,r),s=i.type,u=i.payload,d={type:s,payload:u},f=this._mutations[s];f&&(this._withCommit(function(){f.forEach(function(v){v(u)})}),this._subscribers.slice().forEach(function(g){return g(d,o.state)}))};Ni.prototype.dispatch=function(t,n){var r=this,o=Ov(t,n),i=o.type,s=o.payload,u={type:i,payload:s},d=this._actions[i];if(d){try{this._actionSubscribers.slice().filter(function(g){return g.before}).forEach(function(g){return g.before(u,r.state)})}catch{}var f=d.length>1?Promise.all(d.map(function(g){return g(s)})):d[0](s);return new Promise(function(g,v){f.then(function(_){try{r._actionSubscribers.filter(function(M){return M.after}).forEach(function(M){return M.after(u,r.state)})}catch{}g(_)},function(_){try{r._actionSubscribers.filter(function(M){return M.error}).forEach(function(M){return M.error(u,r.state,_)})}catch{}v(_)})})}};Ni.prototype.subscribe=function(t,n){return WO(t,this._subscribers,n)};Ni.prototype.subscribeAction=function(t,n){var r=typeof t=="function"?{before:t}:t;return WO(r,this._actionSubscribers,n)};Ni.prototype.watch=function(t,n,r){var o=this;return Bt(function(){return t(o.state,o.getters)},n,Object.assign({},r))};Ni.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})};Ni.prototype.registerModule=function(t,n,r){r===void 0&&(r={}),typeof t=="string"&&(t=[t]),this._modules.register(t,n),zy(this,this.state,t,this._modules.get(t),r.preserveState),$C(this,this.state)};Ni.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var r=GC(n.state,t.slice(0,-1));delete r[t[t.length-1]]}),KO(this)};Ni.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)};Ni.prototype.hotUpdate=function(t){this._modules.update(t),KO(this,!0)};Ni.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n};Object.defineProperties(Ni.prototype,BC);var r5=Wy(function(e,t){var n={};return jy(t).forEach(function(r){var o=r.key,i=r.val;n[o]=function(){var u=this.$store.state,d=this.$store.getters;if(e){var f=Ky(this.$store,"mapState",e);if(!f)return;u=f.context.state,d=f.context.getters}return typeof i=="function"?i.call(this,u,d):u[i]},n[o].vuex=!0}),n}),o5=Wy(function(e,t){var n={};return jy(t).forEach(function(r){var o=r.key,i=r.val;n[o]=function(){for(var u=[],d=arguments.length;d--;)u[d]=arguments[d];var f=this.$store.commit;if(e){var g=Ky(this.$store,"mapMutations",e);if(!g)return;f=g.context.commit}return typeof i=="function"?i.apply(this,[f].concat(u)):f.apply(this.$store,[i].concat(u))}}),n}),i5=Wy(function(e,t){var n={};return jy(t).forEach(function(r){var o=r.key,i=r.val;i=e+i,n[o]=function(){if(!(e&&!Ky(this.$store,"mapGetters",e)))return this.$store.getters[i]},n[o].vuex=!0}),n}),s5=Wy(function(e,t){var n={};return jy(t).forEach(function(r){var o=r.key,i=r.val;n[o]=function(){for(var u=[],d=arguments.length;d--;)u[d]=arguments[d];var f=this.$store.dispatch;if(e){var g=Ky(this.$store,"mapActions",e);if(!g)return;f=g.context.dispatch}return typeof i=="function"?i.apply(this,[f].concat(u)):f.apply(this.$store,[i].concat(u))}}),n}),iB=function(e){return{mapState:r5.bind(null,e),mapGetters:i5.bind(null,e),mapMutations:o5.bind(null,e),mapActions:s5.bind(null,e)}};function jy(e){return sB(e)?Array.isArray(e)?e.map(function(t){return{key:t,val:t}}):Object.keys(e).map(function(t){return{key:t,val:e[t]}}):[]}function sB(e){return Array.isArray(e)||jO(e)}function Wy(e){return function(t,n){return typeof t!="string"?(n=t,t=""):t.charAt(t.length-1)!=="/"&&(t+="/"),e(t,n)}}function Ky(e,t,n){var r=e._modulesNamespaceMap[n];return r}function aB(e){e===void 0&&(e={});var t=e.collapsed;t===void 0&&(t=!0);var n=e.filter;n===void 0&&(n=function(g,v,_){return!0});var r=e.transformer;r===void 0&&(r=function(g){return g});var o=e.mutationTransformer;o===void 0&&(o=function(g){return g});var i=e.actionFilter;i===void 0&&(i=function(g,v){return!0});var s=e.actionTransformer;s===void 0&&(s=function(g){return g});var u=e.logMutations;u===void 0&&(u=!0);var d=e.logActions;d===void 0&&(d=!0);var f=e.logger;return f===void 0&&(f=console),function(g){var v=FM(g.state);typeof f>"u"||(u&&g.subscribe(function(_,M){var I=FM(M);if(n(_,v,I)){var k=yk(),w=o(_),S="mutation "+_.type+k;mk(f,S,t),f.log("%c prev state","color: #9E9E9E; font-weight: bold",r(v)),f.log("%c mutation","color: #03A9F4; font-weight: bold",w),f.log("%c next state","color: #4CAF50; font-weight: bold",r(I)),vk(f)}v=I}),d&&g.subscribeAction(function(_,M){if(i(_,M)){var I=yk(),k=s(_),w="action "+_.type+I;mk(f,w,t),f.log("%c action","color: #03A9F4; font-weight: bold",k),vk(f)}}))}}function mk(e,t,n){var r=n?e.groupCollapsed:e.group;try{r.call(e,t)}catch{e.log(t)}}function vk(e){try{e.groupEnd()}catch{e.log("—— log end ——")}}function yk(){var e=new Date;return" @ "+Cm(e.getHours(),2)+":"+Cm(e.getMinutes(),2)+":"+Cm(e.getSeconds(),2)+"."+Cm(e.getMilliseconds(),3)}function lB(e,t){return new Array(t+1).join(e)}function Cm(e,t){return lB("0",t-e.toString().length)+e}var P1={version:"4.0.2",Store:Ni,storeKey:FC,createStore:n5,useStore:Ai,mapState:r5,mapMutations:o5,mapGetters:i5,mapActions:s5,createNamespacedHelpers:iB,createLogger:aB},a5={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(d,f,g){this.fn=d,this.context=f,this.once=g||!1}function i(d,f,g,v,_){if(typeof g!="function")throw new TypeError("The listener must be a function");var M=new o(g,v||d,_),I=n?n+f:f;return d._events[I]?d._events[I].fn?d._events[I]=[d._events[I],M]:d._events[I].push(M):(d._events[I]=M,d._eventsCount++),d}function s(d,f){--d._eventsCount===0?d._events=new r:delete d._events[f]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var f=[],g,v;if(this._eventsCount===0)return f;for(v in g=this._events)t.call(g,v)&&f.push(n?v.slice(1):v);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(g)):f},u.prototype.listeners=function(f){var g=n?n+f:f,v=this._events[g];if(!v)return[];if(v.fn)return[v.fn];for(var _=0,M=v.length,I=new Array(M);_typeof e=="string",x1=()=>{};HC&&((_k=window==null?void 0:window.navigator)!=null&&_k.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function fB(e,t){function n(...r){e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})}return n}function pB(e,t=!0,n=!0){let r=0,o,i=!0;const s=()=>{o&&(clearTimeout(o),o=void 0)};return d=>{const f=Oe(e),g=Date.now()-r;if(s(),f<=0)return r=Date.now(),d();g>f&&(n||!i)?(r=Date.now(),d()):t&&(o=setTimeout(()=>{r=Date.now(),i=!0,s(),d()},f)),!n&&!o&&(o=setTimeout(()=>i=!0,f)),i=!1}}function qC(e){return iC()?(fL(e),!0):!1}function Yy(e,t=200,n=!0,r=!0){return fB(pB(t,n,r),e)}function hB(e,t=!0){Xi()?Rn(e):t?e():wr(e)}function gB(e,t,n={}){const{immediate:r=!0}=n,o=Ne(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}function u(){o.value=!1,s()}function d(...f){s(),o.value=!0,i=setTimeout(()=>{o.value=!1,i=null,e(...f)},Oe(t))}return r&&(o.value=!0,HC&&d()),qC(u),{isPending:o,start:d,stop:u}}function ll(e){var t;const n=Oe(e);return(t=n==null?void 0:n.$el)!=null?t:n}const VC=HC?window:void 0;function ul(...e){let t,n,r,o;if(dB(e[0])?([n,r,o]=e,t=VC):[t,n,r,o]=e,!t)return x1;let i=x1;const s=Bt(()=>ll(t),d=>{i(),d&&(d.addEventListener(n,r,o),i=()=>{d.removeEventListener(n,r,o),i=x1})},{immediate:!0,flush:"post"}),u=()=>{s(),i()};return qC(u),u}function xa(e,t,n={}){const{window:r=VC,ignore:o,capture:i=!0,detectIframe:s=!1}=n;if(!r)return;const u=Ne(!0);let d;const f=_=>{r.clearTimeout(d);const M=ll(e),I=_.composedPath();!M||M===_.target||I.includes(M)||!u.value||o&&o.length>0&&o.some(k=>{const w=ll(k);return w&&(_.target===w||I.includes(w))})||t(_)},g=[ul(r,"click",f,{passive:!0,capture:i}),ul(r,"pointerdown",_=>{const M=ll(e);u.value=!!M&&!_.composedPath().includes(M)},{passive:!0}),ul(r,"pointerup",_=>{if(_.button===0){const M=_.composedPath();_.composedPath=()=>M,d=r.setTimeout(()=>f(_),50)}},{passive:!0}),s&&ul(r,"blur",_=>{var M;const I=ll(e);((M=document.activeElement)==null?void 0:M.tagName)==="IFRAME"&&!(I!=null&&I.contains(document.activeElement))&&t(_)})].filter(Boolean);return()=>g.forEach(_=>_())}const mB=500;function vB(e,t,n){var r,o;const i=qe(()=>ll(e));let s=null;function u(){s!=null&&(clearTimeout(s),s=null)}function d(g){var v,_,M,I;(v=n==null?void 0:n.modifiers)!=null&&v.self&&g.target!==i.value||(u(),(_=n==null?void 0:n.modifiers)!=null&&_.prevent&&g.preventDefault(),(M=n==null?void 0:n.modifiers)!=null&&M.stop&&g.stopPropagation(),s=setTimeout(()=>t(g),(I=n==null?void 0:n.delay)!=null?I:mB))}const f={capture:(r=n==null?void 0:n.modifiers)==null?void 0:r.capture,once:(o=n==null?void 0:n.modifiers)==null?void 0:o.once};ul(i,"pointerdown",d,f),ul(i,"pointerup",u,f),ul(i,"pointerleave",u,f)}const bk=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mk="__vueuse_ssr_handlers__";bk[Mk]=bk[Mk]||{};var Ik=Object.getOwnPropertySymbols,yB=Object.prototype.hasOwnProperty,_B=Object.prototype.propertyIsEnumerable,bB=(e,t)=>{var n={};for(var r in e)yB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ik)for(var r of Ik(e))t.indexOf(r)<0&&_B.call(e,r)&&(n[r]=e[r]);return n};function MB(e,t,n={}){const r=n,{window:o=VC}=r,i=bB(r,["window"]);let s;const u=o&&"ResizeObserver"in o,d=()=>{s&&(s.disconnect(),s=void 0)},f=Bt(()=>ll(e),v=>{d(),u&&o&&v&&(s=new ResizeObserver(t),s.observe(v,i))},{immediate:!0,flush:"post"}),g=()=>{d(),f()};return qC(g),{isSupported:u,stop:g}}function Rv(e,t={}){const{reset:n=!0,windowResize:r=!0,windowScroll:o=!0,immediate:i=!0}=t,s=Ne(0),u=Ne(0),d=Ne(0),f=Ne(0),g=Ne(0),v=Ne(0),_=Ne(0),M=Ne(0);function I(){const k=ll(e);if(!k){n&&(s.value=0,u.value=0,d.value=0,f.value=0,g.value=0,v.value=0,_.value=0,M.value=0);return}const w=k.getBoundingClientRect();s.value=w.height,u.value=w.bottom,d.value=w.left,f.value=w.right,g.value=w.top,v.value=w.width,_.value=w.x,M.value=w.y}return MB(e,I),Bt(()=>ll(e),k=>!k&&I()),o&&ul("scroll",I,{passive:!0}),r&&ul("resize",I,{passive:!0}),hB(()=>{i&&I()}),{height:s,bottom:u,left:d,right:f,top:g,width:v,x:_,y:M,update:I}}var Ck;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Ck||(Ck={}));const IB=it({name:"TUIMessage",props:{message:{type:String,default:""},duration:{type:Number,default:3e3},repeatNum:{type:Number,default:1},id:{type:String,default:""},onClose:{type:Function,required:!1},offset:{type:Number,default:20},zIndex:{type:Number,default:0},isH5:{type:Boolean,default:!1},type:{type:String,default:""}},setup(e){const t=Ne(!1);let n;function r(){e.duration>0&&({stop:n}=gB(()=>{t.value&&i()},e.duration))}function o(){n==null||n()}function i(){t.value=!1}Bt(()=>e.repeatNum,()=>{o(),r()});const s=qe(()=>({top:`${e.offset}Px`,zIndex:e.zIndex}));return Rn(()=>{r(),t.value=!0}),{visible:t,customStyle:s,handleStyle:d=>d&&(d==="error"||d==="success"||d==="warning")?d:"normal"}}});const zC=e=>(pr("data-v-47665cbf"),e=e(),hr(),e),CB={key:0},TB={key:0,viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},wB=zC(()=>G("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},[G("g",{"fill-rule":"nonzero"},[G("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z"})])],-1)),SB=[wB],kB={key:1,viewBox:"0 0 28 28",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},DB=zC(()=>G("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},[G("g",{"fill-rule":"nonzero"},[G("path",{d:"M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z"})])],-1)),EB=[DB],AB={key:2,viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},LB=zC(()=>G("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},[G("g",{"fill-rule":"nonzero"},[G("path",{d:"M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z"})])],-1)),OB=[LB],RB={key:1};function NB(e,t,n,r,o,i){return J(),_t(Mo,{name:"fade",onBeforeLeave:e.onClose,onAfterLeave:t[0]||(t[0]=s=>e.$emit("destroy"))},{default:Ct(()=>[Bn(G("div",{class:lt(["message",[e.handleStyle(e.type),e.isH5&&"message-h5"]]),style:No(e.customStyle)},[e.isH5?Ie("",!0):(J(),oe("p",CB,[e.type==="success"?(J(),oe("svg",TB,SB)):Ie("",!0),e.type==="warning"||!e.type?(J(),oe("svg",kB,EB)):Ie("",!0),e.type==="error"?(J(),oe("svg",AB,OB)):Ie("",!0),mr(" "+De(e.message),1)])),e.isH5?(J(),oe("span",RB,De(e.message),1)):Ie("",!0)],6),[[to,e.visible]])]),_:1},8,["onBeforeLeave"])}const PB=Kt(IB,[["render",NB],["__scopeId","data-v-47665cbf"]]),tl=[];let Tk=1;const xB=document.body,pi=function(e){const t=tl.find(d=>{var f;return`${((f=d.vm.props)==null?void 0:f.message)??""}`==`${e.message??""}`});if(t)return t.vm.component.props.repeatNum+=1,{close:()=>s.component.proxy.visible=!1};let n=e.offset||20;tl.forEach(({vm:d})=>{var f;n+=(((f=d.el)==null?void 0:f.offsetHeight)||0)+20}),n+=20;const r=`message_${Tk+=1}`,o=e.onClose,i={zIndex:20+Tk,offset:n,id:r,...e,onClose:()=>{UB(r,o)}},s=It(PB,i),u=document.createElement("div");return s.props.onDestroy=()=>{GS(null,u)},GS(s,u),tl.push({vm:s}),xB.appendChild(u.firstElementChild),{close:()=>s.component.proxy.visible=!1}};function UB(e,t){const n=tl.findIndex(({vm:s})=>e===s.component.props.id);if(n===-1)return;const{vm:r}=tl[n];if(!r)return;t==null||t(r);const o=r.el.offsetHeight;tl.splice(n,1);const i=tl.length;if(!(i<1))for(let s=n;s"u"||!ko?kn:ko(Uint8Array),$c={"%AggregateError%":typeof AggregateError>"u"?kn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?kn:ArrayBuffer,"%ArrayIteratorPrototype%":$d&&ko?ko([][Symbol.iterator]()):kn,"%AsyncFromSyncIteratorPrototype%":kn,"%AsyncFunction%":Kd,"%AsyncGenerator%":Kd,"%AsyncGeneratorFunction%":Kd,"%AsyncIteratorPrototype%":Kd,"%Atomics%":typeof Atomics>"u"?kn:Atomics,"%BigInt%":typeof BigInt>"u"?kn:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?kn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?kn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?kn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?kn:Float32Array,"%Float64Array%":typeof Float64Array>"u"?kn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?kn:FinalizationRegistry,"%Function%":l5,"%GeneratorFunction%":Kd,"%Int8Array%":typeof Int8Array>"u"?kn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?kn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?kn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$d&&ko?ko(ko([][Symbol.iterator]())):kn,"%JSON%":typeof JSON=="object"?JSON:kn,"%Map%":typeof Map>"u"?kn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$d||!ko?kn:ko(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?kn:Promise,"%Proxy%":typeof Proxy>"u"?kn:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?kn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?kn:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$d||!ko?kn:ko(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?kn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$d&&ko?ko(""[Symbol.iterator]()):kn,"%Symbol%":$d?Symbol:kn,"%SyntaxError%":kf,"%ThrowTypeError%":JB,"%TypedArray%":ZB,"%TypeError%":pf,"%Uint8Array%":typeof Uint8Array>"u"?kn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?kn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?kn:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?kn:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?kn:WeakMap,"%WeakRef%":typeof WeakRef>"u"?kn:WeakRef,"%WeakSet%":typeof WeakSet>"u"?kn:WeakSet};if(ko)try{null.error}catch(e){var QB=ko(ko(e));$c["%Error.prototype%"]=QB}var eH=function e(t){var n;if(t==="%AsyncFunction%")n=F1("async function () {}");else if(t==="%GeneratorFunction%")n=F1("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=F1("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ko&&(n=ko(o.prototype))}return $c[t]=n,n},kk={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_g=jC,Nv=YB,tH=_g.call(Function.call,Array.prototype.concat),nH=_g.call(Function.apply,Array.prototype.splice),Dk=_g.call(Function.call,String.prototype.replace),Pv=_g.call(Function.call,String.prototype.slice),rH=_g.call(Function.call,RegExp.prototype.exec),oH=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,iH=/\\(\\)?/g,sH=function(t){var n=Pv(t,0,1),r=Pv(t,-1);if(n==="%"&&r!=="%")throw new kf("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new kf("invalid intrinsic syntax, expected opening `%`");var o=[];return Dk(t,oH,function(i,s,u,d){o[o.length]=u?Dk(d,iH,"$1"):s||i}),o},aH=function(t,n){var r=t,o;if(Nv(kk,r)&&(o=kk[r],r="%"+o[0]+"%"),Nv($c,r)){var i=$c[r];if(i===Kd&&(i=eH(r)),typeof i>"u"&&!n)throw new pf("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new kf("intrinsic "+t+" does not exist!")},WC=function(t,n){if(typeof t!="string"||t.length===0)throw new pf("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new pf('"allowMissing" argument must be a boolean');if(rH(/^%?[^%]*%?$/,t)===null)throw new kf("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=sH(t),o=r.length>0?r[0]:"",i=aH("%"+o+"%",n),s=i.name,u=i.value,d=!1,f=i.alias;f&&(o=f[0],nH(r,tH([0,1],f)));for(var g=1,v=!0;g=r.length){var k=Fc(u,_);v=!!k,v&&"get"in k&&!("originalValue"in k.get)?u=k.get:u=u[_]}else v=Nv(u,_),u=u[_];v&&!d&&($c[s]=u)}}return u},u5={exports:{}};(function(e){var t=jC,n=WC,r=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||t.call(o,r),s=n("%Object.getOwnPropertyDescriptor%",!0),u=n("%Object.defineProperty%",!0),d=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}e.exports=function(v){var _=i(t,o,arguments);if(s&&u){var M=s(_,"length");M.configurable&&u(_,"length",{value:1+d(0,v.length-(arguments.length-1))})}return _};var f=function(){return i(t,r,arguments)};u?u(e.exports,"apply",{value:f}):e.exports.apply=f})(u5);var lH=u5.exports,c5=WC,d5=lH,uH=d5(c5("String.prototype.indexOf")),cH=function(t,n){var r=c5(t,!!n);return typeof r=="function"&&uH(t,".prototype.")>-1?d5(r):r};const dH={},fH=Object.freeze(Object.defineProperty({__proto__:null,default:dH},Symbol.toStringTag,{value:"Module"})),pH=EG(fH);var KC=typeof Map=="function"&&Map.prototype,G1=Object.getOwnPropertyDescriptor&&KC?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,xv=KC&&G1&&typeof G1.get=="function"?G1.get:null,Ek=KC&&Map.prototype.forEach,YC=typeof Set=="function"&&Set.prototype,B1=Object.getOwnPropertyDescriptor&&YC?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Uv=YC&&B1&&typeof B1.get=="function"?B1.get:null,Ak=YC&&Set.prototype.forEach,hH=typeof WeakMap=="function"&&WeakMap.prototype,ph=hH?WeakMap.prototype.has:null,gH=typeof WeakSet=="function"&&WeakSet.prototype,hh=gH?WeakSet.prototype.has:null,mH=typeof WeakRef=="function"&&WeakRef.prototype,Lk=mH?WeakRef.prototype.deref:null,vH=Boolean.prototype.valueOf,yH=Object.prototype.toString,_H=Function.prototype.toString,bH=String.prototype.match,JC=String.prototype.slice,Yl=String.prototype.replace,MH=String.prototype.toUpperCase,Ok=String.prototype.toLowerCase,f5=RegExp.prototype.test,Rk=Array.prototype.concat,ma=Array.prototype.join,IH=Array.prototype.slice,Nk=Math.floor,GM=typeof BigInt=="function"?BigInt.prototype.valueOf:null,H1=Object.getOwnPropertySymbols,BM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Df=typeof Symbol=="function"&&typeof Symbol.iterator=="object",vi=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Df||"symbol")?Symbol.toStringTag:null,p5=Object.prototype.propertyIsEnumerable,Pk=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function xk(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||f5.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Nk(-e):Nk(e);if(r!==e){var o=String(r),i=JC.call(t,o.length+1);return Yl.call(o,n,"$&_")+"."+Yl.call(Yl.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Yl.call(t,n,"$&_")}var HM=pH,Uk=HM.custom,Fk=g5(Uk)?Uk:null,CH=function e(t,n,r,o){var i=n||{};if(Vl(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Vl(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Vl(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Vl(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Vl(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=i.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return v5(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var d=String(t);return u?xk(t,d):d}if(typeof t=="bigint"){var f=String(t)+"n";return u?xk(t,f):f}var g=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=g&&g>0&&typeof t=="object")return qM(t)?"[Array]":"[Object]";var v=BH(i,r);if(typeof o>"u")o=[];else if(m5(o,t)>=0)return"[Circular]";function _(x,Z,K){if(Z&&(o=IH.call(o),o.push(Z)),K){var re={depth:i.depth};return Vl(i,"quoteStyle")&&(re.quoteStyle=i.quoteStyle),e(x,re,r+1,o)}return e(x,i,r+1,o)}if(typeof t=="function"&&!$k(t)){var M=OH(t),I=Tm(t,_);return"[Function"+(M?": "+M:" (anonymous)")+"]"+(I.length>0?" { "+ma.call(I,", ")+" }":"")}if(g5(t)){var k=Df?Yl.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):BM.call(t);return typeof t=="object"&&!Df?Gp(k):k}if(FH(t)){for(var w="<"+Ok.call(String(t.nodeName)),S=t.attributes||[],L=0;L",w}if(qM(t)){if(t.length===0)return"[]";var A=Tm(t,_);return v&&!GH(A)?"["+VM(A,v)+"]":"[ "+ma.call(A,", ")+" ]"}if(SH(t)){var O=Tm(t,_);return!("cause"in Error.prototype)&&"cause"in t&&!p5.call(t,"cause")?"{ ["+String(t)+"] "+ma.call(Rk.call("[cause]: "+_(t.cause),O),", ")+" }":O.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+ma.call(O,", ")+" }"}if(typeof t=="object"&&s){if(Fk&&typeof t[Fk]=="function"&&HM)return HM(t,{depth:g-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(RH(t)){var H=[];return Ek&&Ek.call(t,function(x,Z){H.push(_(Z,t,!0)+" => "+_(x,t))}),Gk("Map",xv.call(t),H,v)}if(xH(t)){var q=[];return Ak&&Ak.call(t,function(x){q.push(_(x,t))}),Gk("Set",Uv.call(t),q,v)}if(NH(t))return q1("WeakMap");if(UH(t))return q1("WeakSet");if(PH(t))return q1("WeakRef");if(DH(t))return Gp(_(Number(t)));if(AH(t))return Gp(_(GM.call(t)));if(EH(t))return Gp(vH.call(t));if(kH(t))return Gp(_(String(t)));if(!wH(t)&&!$k(t)){var P=Tm(t,_),B=Pk?Pk(t)===Object.prototype:t instanceof Object||t.constructor===Object,j=t instanceof Object?"":"null prototype",$=!B&&vi&&Object(t)===t&&vi in t?JC.call(Eu(t),8,-1):j?"Object":"",R=B||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",T=R+($||j?"["+ma.call(Rk.call([],$||[],j||[]),": ")+"] ":"");return P.length===0?T+"{}":v?T+"{"+VM(P,v)+"}":T+"{ "+ma.call(P,", ")+" }"}return String(t)};function h5(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function TH(e){return Yl.call(String(e),/"/g,""")}function qM(e){return Eu(e)==="[object Array]"&&(!vi||!(typeof e=="object"&&vi in e))}function wH(e){return Eu(e)==="[object Date]"&&(!vi||!(typeof e=="object"&&vi in e))}function $k(e){return Eu(e)==="[object RegExp]"&&(!vi||!(typeof e=="object"&&vi in e))}function SH(e){return Eu(e)==="[object Error]"&&(!vi||!(typeof e=="object"&&vi in e))}function kH(e){return Eu(e)==="[object String]"&&(!vi||!(typeof e=="object"&&vi in e))}function DH(e){return Eu(e)==="[object Number]"&&(!vi||!(typeof e=="object"&&vi in e))}function EH(e){return Eu(e)==="[object Boolean]"&&(!vi||!(typeof e=="object"&&vi in e))}function g5(e){if(Df)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!BM)return!1;try{return BM.call(e),!0}catch{}return!1}function AH(e){if(!e||typeof e!="object"||!GM)return!1;try{return GM.call(e),!0}catch{}return!1}var LH=Object.prototype.hasOwnProperty||function(e){return e in this};function Vl(e,t){return LH.call(e,t)}function Eu(e){return yH.call(e)}function OH(e){if(e.name)return e.name;var t=bH.call(_H.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function m5(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return v5(JC.call(e,0,t.maxStringLength),t)+r}var o=Yl.call(Yl.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,$H);return h5(o,"single",t)}function $H(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+MH.call(t.toString(16))}function Gp(e){return"Object("+e+")"}function q1(e){return e+" { ? }"}function Gk(e,t,n,r){var o=r?VM(n,r):ma.call(n,", ");return e+" ("+t+") {"+o+"}"}function GH(e){for(var t=0;t=0)return!1;return!0}function BH(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=ma.call(Array(e.indent+1)," ");else return null;return{base:n,prev:ma.call(Array(t+1),n)}}function VM(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+ma.call(e,","+n)+` `+t.prev}function Tm(e,t){var n=qM(e),r=[];if(n){r.length=e.length;for(var o=0;o1;){var n=t.pop(),r=n.obj[n.prop];if(lc(r)){for(var o=[],i=0;i=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===nq.RFC1738&&(f===40||f===41)){u+=s.charAt(d);continue}if(f<128){u=u+ca[f];continue}if(f<2048){u=u+(ca[192|f>>6]+ca[128|f&63]);continue}if(f<55296||f>=57344){u=u+(ca[224|f>>12]+ca[128|f>>6&63]+ca[128|f&63]);continue}d+=1,f=65536+((f&1023)<<10|s.charCodeAt(d)&1023),u+=ca[240|f>>18]+ca[128|f>>12&63]+ca[128|f>>6&63]+ca[128|f&63]}return u},lq=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o"u"&&(A=0)}if(typeof d=="function"?S=d(n,S):S instanceof Date?S=v(S):r==="comma"&&nl(S)&&(S=iv.maybeMap(S,function(re){return re instanceof Date?v(re):re})),S===null){if(i)return u&&!I?u(n,ai.encoder,k,"key",_):n;S=""}if(mq(S)||iv.isBuffer(S)){if(u){var q=I?n:u(n,ai.encoder,k,"key",_);return[M(q)+"="+M(u(S,ai.encoder,k,"value",_))]}return[M(n)+"="+M(String(S))]}var P=[];if(typeof S>"u")return P;var B;if(r==="comma"&&nl(S))I&&u&&(S=iv.maybeMap(S,u)),B=[{value:S.length>0?S.join(",")||null:void 0}];else if(nl(d))B=d;else{var j=Object.keys(S);B=f?j.sort(f):j}for(var $=o&&nl(S)&&S.length===1?n+"[]":n,R=0;R"u"?ai.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ai.charsetSentinel,delimiter:typeof t.delimiter>"u"?ai.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:ai.encode,encoder:typeof t.encoder=="function"?t.encoder:ai.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:ai.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:ai.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:ai.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ai.strictNullHandling}},_q=function(e,t){var n=e,r=yq(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):nl(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var u;t&&t.arrayFormat in Bk?u=t.arrayFormat:t&&"indices"in t?u=t.indices?"indices":"repeat":u="indices";var d=Bk[u];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=d==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var g=b5(),v=0;v0?I+M:""},Ef=_5,zM=Object.prototype.hasOwnProperty,bq=Array.isArray,So={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ef.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Mq=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},I5=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Iq="utf8=%26%2310003%3B",Cq="utf8=%E2%9C%93",Tq=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),u=-1,d,f=n.charset;if(n.charsetSentinel)for(d=0;d-1&&(I=bq(I)?[I]:I),zM.call(r,M)?r[M]=Ef.combine(r[M],I):r[M]=I}return r},wq=function(e,t,n,r){for(var o=r?t:I5(t,n),i=e.length-1;i>=0;--i){var s,u=e[i];if(u==="[]"&&n.parseArrays)s=[].concat(o);else{s=n.plainObjects?Object.create(null):{};var d=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,f=parseInt(d,10);!n.parseArrays&&d===""?s={0:o}:!isNaN(f)&&u!==d&&String(f)===d&&f>=0&&n.parseArrays&&f<=n.arrayLimit?(s=[],s[f]=o):d!=="__proto__"&&(s[d]=o)}o=s}return o},Sq=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,d=r.depth>0&&s.exec(i),f=d?i.slice(0,d.index):i,g=[];if(f){if(!r.plainObjects&&zM.call(Object.prototype,f)&&!r.allowPrototypes)return;g.push(f)}for(var v=0;r.depth>0&&(d=u.exec(i))!==null&&v"u"?So.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?So.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:So.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:So.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:So.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:So.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:So.comma,decoder:typeof t.decoder=="function"?t.decoder:So.decoder,delimiter:typeof t.delimiter=="string"||Ef.isRegExp(t.delimiter)?t.delimiter:So.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:So.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:So.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:So.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:So.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:So.strictNullHandling}},Dq=function(e,t){var n=kq(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Tq(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s-1};function Kf(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function eT(e){return typeof e!="string"&&(e=String(e)),e}function tT(e){var t={next:function(){var n=e.shift();return{done:n===void 0,value:n}}};return Si.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Co(e){this.map={},e instanceof Co?e.forEach(function(t,n){this.append(n,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}Co.prototype.append=function(e,t){e=Kf(e),t=eT(t);var n=this.map[e];this.map[e]=n?n+", "+t:t};Co.prototype.delete=function(e){delete this.map[Kf(e)]};Co.prototype.get=function(e){return e=Kf(e),this.has(e)?this.map[e]:null};Co.prototype.has=function(e){return this.map.hasOwnProperty(Kf(e))};Co.prototype.set=function(e,t){this.map[Kf(e)]=eT(t)};Co.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)};Co.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),tT(e)};Co.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),tT(e)};Co.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),tT(e)};Si.iterable&&(Co.prototype[Symbol.iterator]=Co.prototype.entries);function W1(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function T5(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function Pq(e){var t=new FileReader,n=T5(t);return t.readAsArrayBuffer(e),n}function xq(e){var t=new FileReader,n=T5(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),o=r?r[1]:"utf-8";return t.readAsText(e,o),n}function Uq(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?t:e}function ed(e,t){if(!(this instanceof ed))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var n=t.body;if(e instanceof ed){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Co(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&e._bodyInit!=null&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new Co(t.headers)),this.method=$q(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Wo){var i=new AbortController;return i.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+new Date().getTime());else{var o=/\?/;this.url+=(o.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}ed.prototype.clone=function(){return new ed(this,{body:this._bodyInit})};function Gq(e){var t=new FormData;return e.trim().split("&").forEach(function(n){if(n){var r=n.split("="),o=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(i))}}),t}function Bq(e){var t=new Co,n=e.replace(/\r?\n[\t ]+/g," ");return n.split("\r").map(function(r){return r.indexOf(` `)===0?r.substr(1,r.length):r}).forEach(function(r){var o=r.split(":"),i=o.shift().trim();if(i){var s=o.join(":").trim();try{t.append(i,s)}catch(u){console.warn("Response "+u.message)}}}),t}w5.call(ed.prototype);function La(e,t){if(!(this instanceof La))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new Co(t.headers),this.url=t.url||"",this._initBody(e)}w5.call(La.prototype);La.prototype.clone=function(){return new La(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Co(this.headers),url:this.url})};La.error=function(){var e=new La(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var Hq=[301,302,303,307,308];La.redirect=function(e,t){if(Hq.indexOf(t)===-1)throw new RangeError("Invalid status code");return new La(null,{status:t,headers:{location:e}})};var uc=Wo.DOMException;try{new uc}catch{uc=function(t,n){this.message=t,this.name=n;var r=Error(t);this.stack=r.stack},uc.prototype=Object.create(Error.prototype),uc.prototype.constructor=uc}function S5(e,t){return new Promise(function(n,r){var o=new ed(e,t);if(o.signal&&o.signal.aborted)return r(new uc("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var f={status:i.status,statusText:i.statusText,headers:Bq(i.getAllResponseHeaders()||"")};f.url="responseURL"in i?i.responseURL:f.headers.get("X-Request-URL");var g="response"in i?i.response:i.responseText;setTimeout(function(){n(new La(g,f))},0)},i.onerror=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},i.ontimeout=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},i.onabort=function(){setTimeout(function(){r(new uc("Aborted","AbortError"))},0)};function u(f){try{return f===""&&Wo.location.href?Wo.location.href:f}catch{return f}}if(i.open(o.method,u(o.url),!0),o.credentials==="include"?i.withCredentials=!0:o.credentials==="omit"&&(i.withCredentials=!1),"responseType"in i&&(Si.blob?i.responseType="blob":Si.arrayBuffer&&(i.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof Co||Wo.Headers&&t.headers instanceof Wo.Headers)){var d=[];Object.getOwnPropertyNames(t.headers).forEach(function(f){d.push(Kf(f)),i.setRequestHeader(f,eT(t.headers[f]))}),o.headers.forEach(function(f,g){d.indexOf(g)===-1&&i.setRequestHeader(g,f)})}else o.headers.forEach(function(f,g){i.setRequestHeader(g,f)});o.signal&&(o.signal.addEventListener("abort",s),i.onreadystatechange=function(){i.readyState===4&&o.signal.removeEventListener("abort",s)}),i.send(typeof o._bodyInit>"u"?null:o._bodyInit)})}S5.polyfill=!0;Wo.fetch||(Wo.fetch=S5,Wo.Headers=Co,Wo.Request=ed,Wo.Response=La);self.fetch.bind(self);function Vk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ji(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sv(e,t,n){return D5()?sv=Reflect.construct:sv=function(o,i,s){var u=[null];u.push.apply(u,i);var d=Function.bind.apply(o,u),f=new d;return s&&Zh(f,s.prototype),f},sv.apply(null,arguments)}function zq(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Fv(e){var t=typeof Map=="function"?new Map:void 0;return Fv=function(r){if(r===null||!zq(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,o)}function o(){return sv(r,arguments,Xh(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Zh(o,r)},Fv(e)}function jq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wq(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jq(e)}function E5(e){var t=D5();return function(){var r=Xh(e),o;if(t){var i=Xh(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Wq(this,o)}}function ya(e){return Kq(e)||Yq(e)||Jq(e)||Xq()}function Kq(e){if(Array.isArray(e))return jM(e)}function Yq(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jq(e,t){if(e){if(typeof e=="string")return jM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jM(e,t)}}function jM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{global:!1,core:!1,defaultInstance:!1},o=!1,i=!1,s=!1;if(typeof r=="number"?(process&&process.env,o=!0,i=!1):fu(r)==="object"&&r&&(i=r.global||!1,o=r.core||!1,s=r.defaultInstance||!1),i){e.globalMiddlewares.splice(e.globalMiddlewares.length-e.defaultGlobalMiddlewaresLength,0,n);return}if(o){e.coreMiddlewares.splice(e.coreMiddlewares.length-e.defaultCoreMiddlewaresLength,0,n);return}if(s){this.defaultMiddlewares.push(n);return}this.middlewares.push(n)}},{key:"execute",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,r=Zq([].concat(ya(this.middlewares),ya(this.defaultMiddlewares),ya(e.globalMiddlewares),ya(e.coreMiddlewares)));return r(n)}}]),e}();Js.globalMiddlewares=[];Js.defaultGlobalMiddlewaresLength=0;Js.coreMiddlewares=[];Js.defaultCoreMiddlewaresLength=0;var Qq=function(){function e(t){bg(this,e),this.cache=new Map,this.timer={},this.extendOptions(t)}return nT(e,[{key:"extendOptions",value:function(n){this.maxCache=n.maxCache||0}},{key:"get",value:function(n){return this.cache.get(JSON.stringify(n))}},{key:"set",value:function(n,r){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:6e4;if(this.maxCache>0&&this.cache.size>=this.maxCache){var s=ya(this.cache.keys())[0];this.cache.delete(s),this.timer[s]&&clearTimeout(this.timer[s])}var u=JSON.stringify(n);this.cache.set(u,r),i>0&&(this.timer[u]=setTimeout(function(){o.cache.delete(u),delete o.timer[u]},i))}},{key:"delete",value:function(n){var r=JSON.stringify(n);return delete this.timer[r],this.cache.delete(r)}},{key:"clear",value:function(){return this.timer={},this.cache.clear()}}]),e}(),A5=function(e){k5(n,e);var t=E5(n);function n(r,o){var i,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"RequestError";return bg(this,n),i=t.call(this,r),i.name="RequestError",i.request=o,i.type=s,i}return n}(Fv(Error)),Zp=function(e){k5(n,e);var t=E5(n);function n(r,o,i,s){var u,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"ResponseError";return bg(this,n),u=t.call(this,o||r.statusText),u.name="ResponseError",u.data=i,u.response=r,u.request=s,u.type=d,u}return n}(Fv(Error));function eV(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){t(r.result)},r.onerror=n,r.readAsText(e,"GBK")})}function jk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;try{return JSON.parse(e)}catch{if(t)throw new Zp(n,"JSON.parse fail",e,r,"ParseError")}return e}function tV(e,t,n){return new Promise(function(r,o){setTimeout(function(){o(new A5(t||"timeout of ".concat(e,"ms exceeded"),n,"Timeout"))},e)})}function Wk(e){return new Promise(function(t,n){e.cancelToken&&e.cancelToken.promise.then(function(r){n(r)})})}var nV=Object.prototype.toString;function L5(){var e;return typeof process<"u"&&nV.call(process)==="[object process]"&&(e="NODE"),typeof XMLHttpRequest<"u"&&(e="BROWSER"),e}function WM(e){return fu(e)==="object"&&Object.prototype.toString.call(e)==="[object Array]"}function O5(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}function rV(e){return fu(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Kk(e){return e!==null&&fu(e)==="object"}function Yk(e,t){if(e)if(fu(e)!=="object"&&(e=[e]),WM(e))for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=n.prefix,o=n.suffix;return r&&(t="".concat(r).concat(t)),o&&(t="".concat(t).concat(o)),{url:t,options:n}};function iV(e,t){var n=t.method,r=n===void 0?"get":n;return r.toLowerCase()==="get"}function sV(e,t){if(!e)return t();var n=e.req;n=n===void 0?{}:n;var r=n.options,o=r===void 0?{}:r,i=n.url,s=i===void 0?"":i,u=e.cache,d=e.responseInterceptors,f=o.timeout,g=f===void 0?0:f,v=o.timeoutMessage,_=o.__umiRequestCoreType__,M=_===void 0?"normal":_,I=o.useCache,k=I===void 0?!1:I,w=o.method,S=w===void 0?"get":w,L=o.params,A=o.ttl,O=o.validateCache,H=O===void 0?iV:O;if(M!=="normal")return process&&process.env,t();var q=fetch;if(!q)throw new Error("Global fetch not exist!");var P=L5()==="BROWSER",B=H(s,o)&&k&&P;if(B){var j=u.get({url:s,params:L,method:S});if(j)return j=j.clone(),j.useCache=!0,e.res=j,t()}var $;return g>0?$=Promise.race([Wk(o),q(s,o),tV(g,v,e.req)]):$=Promise.race([Wk(o),q(s,o)]),d.forEach(function(R){$=$.then(function(T){var x=typeof T.clone=="function"?T.clone():T;return R(x,o)})}),$.then(function(R){if(B&&R.status===200){var T=R.clone();T.useCache=!0,u.set({url:s,params:L,method:S},T,A)}return e.res=R,t()})}function aV(e,t){var n;return t().then(function(){if(e){var r=e.res,o=r===void 0?{}:r,i=e.req,s=i===void 0?{}:i,u=s||{},d=u.options;d=d===void 0?{}:d;var f=d.responseType,g=f===void 0?"json":f,v=d.charset,_=v===void 0?"utf8":v;d.getResponse;var M=d.throwErrIfParseFail,I=M===void 0?!1:M,k=d.parseResponse,w=k===void 0?!0:k;if(w&&!(!o||!o.clone)){if(n=L5()==="BROWSER"?o.clone():o,n.useCache=o.useCache||!1,_==="gbk")try{return o.blob().then(eV).then(function(S){return jk(S,!1,n,s)})}catch(S){throw new Zp(n,S.message,null,s,"ParseError")}else if(g==="json")return o.text().then(function(S){return jk(S,I,n,s)});try{return o[g]()}catch{throw new Zp(n,"responseType not support",null,s,"ParseError")}}}}).then(function(r){if(e){e.res;var o=e.req,i=o===void 0?{}:o,s=i||{},u=s.options;u=u===void 0?{}:u;var d=u.getResponse,f=d===void 0?!1:d;if(n){if(n.status>=200&&n.status<300){if(f){e.res={data:r,response:n};return}e.res=r;return}throw new Zp(n,"http error",r,i,"HttpError")}}}).catch(function(r){if(r instanceof A5||r instanceof Zp)throw r;var o=e.req,i=e.res;throw r.request=r.request||o,r.response=r.response||i,r.type=r.type||r.name,r.data=r.data||void 0,r})}function lV(e,t){if(!e)return t();var n=e.req;n=n===void 0?{}:n;var r=n.options,o=r===void 0?{}:r,i=o.method,s=i===void 0?"get":i;if(["post","put","patch","delete"].indexOf(s.toLowerCase())===-1)return t();var u=o.requestType,d=u===void 0?"json":u,f=o.data;if(f){var g=Object.prototype.toString.call(f);g==="[object Object]"||g==="[object Array]"?d==="json"?(o.headers=ji({Accept:"application/json","Content-Type":"application/json;charset=UTF-8"},o.headers),o.body=JSON.stringify(f)):d==="form"&&(o.headers=ji({Accept:"application/json","Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},o.headers),o.body=KM(f)):(o.headers=ji({Accept:"application/json"},o.headers),o.body=f)}return e.req.options=o,t()}function uV(e,t){var n,r;if(e)if(t)n=t(e);else if(O5(e))n=e.toString();else if(WM(e))r=[],Yk(e,function(i){i===null||typeof i>"u"?r.push(i):r.push(Kk(i)?JSON.stringify(i):i)}),n=KM(r);else{r={},Yk(e,function(i,s){var u=i;i===null||typeof i>"u"?r[s]=i:rV(i)?u=i.toISOString():WM(i)?u=i:Kk(i)&&(u=JSON.stringify(i)),r[s]=u});var o=KM(r);n=o}return n}function cV(e,t){if(!e)return t();var n=e.req;n=n===void 0?{}:n;var r=n.options,o=r===void 0?{}:r,i=o.paramsSerializer,s=o.params,u=e.req;u=u===void 0?{}:u;var d=u.url,f=d===void 0?"":d;o.method=o.method?o.method.toUpperCase():"GET",o.credentials=o.credentials||"same-origin";var g=uV(s,i);if(e.req.originUrl=f,g){var v=f.indexOf("?")!==-1?"&":"?";e.req.url="".concat(f).concat(v).concat(g)}return e.req.options=o,t()}var N5=[lV,cV,aV],P5=[sV];Js.globalMiddlewares=N5;Js.defaultGlobalMiddlewaresLength=N5.length;Js.coreMiddlewares=P5;Js.defaultCoreMiddlewaresLength=P5.length;var mh=function(){function e(t){bg(this,e),this.onion=new Js([]),this.fetchIndex=0,this.mapCache=new Qq(t),this.initOptions=t,this.instanceRequestInterceptors=[],this.instanceResponseInterceptors=[]}return nT(e,[{key:"use",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{global:!1,core:!1};return this.onion.use(n,r),this}},{key:"extendOptions",value:function(n){this.initOptions=R5(this.initOptions,n),this.mapCache.extendOptions(n)}},{key:"dealRequestInterceptors",value:function(n){var r=function(s,u){return s.then(function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n.req.url=d.url||n.req.url,n.req.options=d.options||n.req.options,u(n.req.url,n.req.options)})},o=[].concat(ya(e.requestInterceptors),ya(this.instanceRequestInterceptors));return o.reduce(r,Promise.resolve()).then(function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n.req.url=i.url||n.req.url,n.req.options=i.options||n.req.options,Promise.resolve()})}},{key:"request",value:function(n,r){var o=this,i=this.onion,s={req:{url:n,options:ji(ji({},r),{},{url:n})},res:null,cache:this.mapCache,responseInterceptors:[].concat(ya(e.responseInterceptors),ya(this.instanceResponseInterceptors))};if(typeof n!="string")throw new Error("url MUST be a string");return new Promise(function(u,d){o.dealRequestInterceptors(s).then(function(){return i.execute(s)}).then(function(){u(s.res)}).catch(function(f){var g=s.req.options.errorHandler;if(g)try{var v=g(f);u(v)}catch(_){d(_)}else d(f)})})}}],[{key:"requestUse",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{global:!0};if(typeof n!="function")throw new TypeError("Interceptor must be function!");r.global?e.requestInterceptors.push(n):this.instanceRequestInterceptors.push(n)}},{key:"responseUse",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{global:!0};if(typeof n!="function")throw new TypeError("Interceptor must be function!");r.global?e.responseInterceptors.push(n):this.instanceResponseInterceptors.push(n)}}]),e}();mh.requestInterceptors=[oV];mh.responseInterceptors=[];function Jy(e){this.message=e}Jy.prototype.toString=function(){return this.message?"Cancel: ".concat(this.message):"Cancel"};Jy.prototype.__CANCEL__=!0;function $v(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(o){t=o});var n=this;e(function(o){n.reason||(n.reason=new Jy(o),t(n.reason))})}$v.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};$v.source=function(){var t,n=new $v(function(o){t=o});return{token:n,cancel:t}};function dV(e){return!!(e&&e.__CANCEL__)}var rT=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=new mh(t),r=function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=R5(n.initOptions,u);return n.request(s,d)};r.use=n.use.bind(n),r.fetchIndex=n.fetchIndex,r.interceptors={request:{use:mh.requestUse.bind(n)},response:{use:mh.responseUse.bind(n)}};var o=["get","post","delete","put","patch","head","options","rpc"];return o.forEach(function(i){r[i]=function(s,u){return r(s,ji(ji({},u),{},{method:i}))}}),r.Cancel=Jy,r.CancelToken=$v,r.isCancel=dV,r.extendOptions=n.extendOptions.bind(n),r.middlewares={instance:n.onion.middlewares,defaultInstance:n.onion.defaultMiddlewares,global:Js.globalMiddlewares,core:Js.coreMiddlewares},r},fV=function(t){return rT(t)};rT({parseResponse:!1});rT({});var Gv={exports:{}};Gv.exports;(function(e,t){var n=9007199254740991,r="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",s="[object Map]",u="[object Object]",d="[object Promise]",f="[object Set]",g="[object WeakMap]",v="[object DataView]",_=/[\\^$.*+?()[\]{}|]/g,M=/^\[object .+?Constructor\]$/,I=typeof mi=="object"&&mi&&mi.Object===Object&&mi,k=typeof self=="object"&&self&&self.Object===Object&&self,w=I||k||Function("return this")(),S=t&&!t.nodeType&&t,L=S&&!0&&e&&!e.nodeType&&e,A=L&&L.exports===S;function O(Fe,at){return Fe==null?void 0:Fe[at]}function H(Fe){var at=!1;if(Fe!=null&&typeof Fe.toString!="function")try{at=!!(Fe+"")}catch{}return at}function q(Fe,at){return function(St){return Fe(at(St))}}var P=Function.prototype,B=Object.prototype,j=w["__core-js_shared__"],$=function(){var Fe=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||"");return Fe?"Symbol(src)_1."+Fe:""}(),R=P.toString,T=B.hasOwnProperty,x=B.toString,Z=RegExp("^"+R.call(T).replace(_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),K=A?w.Buffer:void 0,re=B.propertyIsEnumerable,X=K?K.isBuffer:void 0,ie=q(Object.keys,Object),he=V(w,"DataView"),ae=V(w,"Map"),de=V(w,"Promise"),Y=V(w,"Set"),te=V(w,"WeakMap"),fe=!re.call({valueOf:1},"valueOf"),Re=le(he),ve=le(ae),be=le(de),ue=le(Y),ce=le(te);function Ee(Fe){return x.call(Fe)}function pe(Fe){if(!Be(Fe)||se(Fe))return!1;var at=ne(Fe)||H(Fe)?Z:M;return at.test(le(Fe))}function V(Fe,at){var St=O(Fe,at);return pe(St)?St:void 0}var ee=Ee;(he&&ee(new he(new ArrayBuffer(1)))!=v||ae&&ee(new ae)!=s||de&&ee(de.resolve())!=d||Y&&ee(new Y)!=f||te&&ee(new te)!=g)&&(ee=function(Fe){var at=x.call(Fe),St=at==u?Fe.constructor:void 0,vn=St?le(St):void 0;if(vn)switch(vn){case Re:return v;case ve:return s;case be:return d;case ue:return f;case ce:return g}return at});function se(Fe){return!!$&&$ in Fe}function Ce(Fe){var at=Fe&&Fe.constructor,St=typeof at=="function"&&at.prototype||B;return Fe===St}function le(Fe){if(Fe!=null){try{return R.call(Fe)}catch{}try{return Fe+""}catch{}}return""}function ke(Fe){return He(Fe)&&T.call(Fe,"callee")&&(!re.call(Fe,"callee")||x.call(Fe)==r)}var Pe=Array.isArray;function xe(Fe){return Fe!=null&&ye(Fe.length)&&!ne(Fe)}function He(Fe){return je(Fe)&&xe(Fe)}var Te=X||ct;function W(Fe){if(xe(Fe)&&(Pe(Fe)||typeof Fe=="string"||typeof Fe.splice=="function"||Te(Fe)||ke(Fe)))return!Fe.length;var at=ee(Fe);if(at==s||at==f)return!Fe.size;if(fe||Ce(Fe))return!ie(Fe).length;for(var St in Fe)if(T.call(Fe,St))return!1;return!0}function ne(Fe){var at=Be(Fe)?x.call(Fe):"";return at==o||at==i}function ye(Fe){return typeof Fe=="number"&&Fe>-1&&Fe%1==0&&Fe<=n}function Be(Fe){var at=typeof Fe;return!!Fe&&(at=="object"||at=="function")}function je(Fe){return!!Fe&&typeof Fe=="object"}function ct(){return!1}e.exports=W})(Gv,Gv.exports);var pV=Gv.exports,hV="[object Object]";function gV(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function mV(e,t){return function(n){return e(t(n))}}var vV=Function.prototype,x5=Object.prototype,U5=vV.toString,yV=x5.hasOwnProperty,_V=U5.call(Object),bV=x5.toString,MV=mV(Object.getPrototypeOf,Object);function IV(e){return!!e&&typeof e=="object"}function CV(e){if(!IV(e)||bV.call(e)!=hV||gV(e))return!1;var t=MV(e);if(t===null)return!0;var n=yV.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&U5.call(n)==_V}var TV=CV,Bv={exports:{}};Bv.exports;(function(e,t){var n=200,r="Expected a function",o="__lodash_hash_undefined__",i=1,s=2,u=1/0,d=9007199254740991,f="[object Arguments]",g="[object Array]",v="[object Boolean]",_="[object Date]",M="[object Error]",I="[object Function]",k="[object GeneratorFunction]",w="[object Map]",S="[object Number]",L="[object Object]",A="[object Promise]",O="[object RegExp]",H="[object Set]",q="[object String]",P="[object Symbol]",B="[object WeakMap]",j="[object ArrayBuffer]",$="[object DataView]",R="[object Float32Array]",T="[object Float64Array]",x="[object Int8Array]",Z="[object Int16Array]",K="[object Int32Array]",re="[object Uint8Array]",X="[object Uint8ClampedArray]",ie="[object Uint16Array]",he="[object Uint32Array]",ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,de=/^\w*$/,Y=/^\./,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fe=/[\\^$.*+?()[\]{}|]/g,Re=/\\(\\)?/g,ve=/^\[object .+?Constructor\]$/,be=/^(?:0|[1-9]\d*)$/,ue={};ue[R]=ue[T]=ue[x]=ue[Z]=ue[K]=ue[re]=ue[X]=ue[ie]=ue[he]=!0,ue[f]=ue[g]=ue[j]=ue[v]=ue[$]=ue[_]=ue[M]=ue[I]=ue[w]=ue[S]=ue[L]=ue[O]=ue[H]=ue[q]=ue[B]=!1;var ce=typeof mi=="object"&&mi&&mi.Object===Object&&mi,Ee=typeof self=="object"&&self&&self.Object===Object&&self,pe=ce||Ee||Function("return this")(),V=t&&!t.nodeType&&t,ee=V&&!0&&e&&!e.nodeType&&e,se=ee&&ee.exports===V,Ce=se&&ce.process,le=function(){try{return Ce&&Ce.binding("util")}catch{}}(),ke=le&&le.isTypedArray;function Pe(ge,Ae){for(var Ke=-1,pt=ge?ge.length:0;++Ke-1}function Fa(ge,Ae){var Ke=this.__data__,pt=hs(Ke,ge);return pt<0?Ke.push([ge,Ae]):Ke[pt][1]=Ae,this}Gt.prototype.clear=Il,Gt.prototype.delete=ra,Gt.prototype.get=Cl,Gt.prototype.has=Tl,Gt.prototype.set=Fa;function ei(ge){var Ae=-1,Ke=ge?ge.length:0;for(this.clear();++Aezn))return!1;var Yr=Nt.get(ge);if(Yr&&Nt.get(Ae))return Yr==Ae;var Hr=-1,To=!0,Dr=rn&i?new oa:void 0;for(Nt.set(ge,Ae),Nt.set(Ae,ge);++Hr-1&&ge%1==0&&ge-1&&ge%1==0&&ge<=d}function Ha(ge){var Ae=typeof ge;return!!ge&&(Ae=="object"||Ae=="function")}function ni(ge){return!!ge&&typeof ge=="object"}function so(ge){return typeof ge=="symbol"||ni(ge)&&yn.call(ge)==P}var kr=ke?W(ke):dp;function sa(ge){return ge==null?"":Ho(ge)}function Xe(ge,Ae,Ke){var pt=ge==null?void 0:Ps(ge,Ae);return pt===void 0?Ke:pt}function _i(ge,Ae){return ge!=null&&Og(ge,Ae,xi)}function Us(ge){return hp(ge)?$e(ge):kl(ge)}function Vu(ge,Ae,Ke){var pt=ms(ge)||kr(ge);if(Ae=ia(Ae),Ke==null)if(pt||Ha(ge)){var rn=ge.constructor;pt?Ke=ms(ge)?new rn:[]:Ke=Ye(rn)?Bo(ln(ge)):{}}else Ke={};return(pt?Pe:Id)(ge,function(Nt,Un,zn){return Ae(Ke,Nt,Un,zn)}),Ke}function mp(ge){return ge}function vp(ge){return Gu(ge)?He(Hu(ge)):Uu(ge)}e.exports=Vu})(Bv,Bv.exports);var wV=Bv.exports;const SV=pV,Xk=TV,kV=wV;var DV=function e(t,{cleanKeys:n=[],cleanValues:r=[],emptyArrays:o=!0,emptyObjects:i=!0,emptyStrings:s=!0,NaNValues:u=!1,nullValues:d=!0,undefinedValues:f=!0}={}){return kV(t,(g,v,_)=>{if(!n.includes(_)&&((Array.isArray(v)||Xk(v))&&(v=e(v,{NaNValues:u,cleanKeys:n,cleanValues:r,emptyArrays:o,emptyObjects:i,emptyStrings:s,nullValues:d,undefinedValues:f})),!r.includes(v)&&!(i&&Xk(v)&&SV(v))&&!(o&&Array.isArray(v)&&!v.length)&&!(s&&v==="")&&!(u&&Number.isNaN(v))&&!(d&&v===null)&&!(f&&v===void 0))){if(Array.isArray(g))return g.push(v);g[_]=v}})};const Zk=zf(DV),ho=fV({hideLoading:!0,timeout:2e4,timeoutMessage:"请求超时"});ho.interceptors.request.use((e,t)=>{const n=sessionStorage.getItem("Authorization")||"",r={};return n&&(r.Authorization=n),{url:e,options:{...t,params:Zk(t.params),data:Zk(t.data),headers:{...t.headers,...r}}}},{global:!1});ho.interceptors.response.use(async e=>{if(e.status>299||e.status<200){const n="服务器错误,状态码"+e.status;throw new Error(n)}const t=await e.clone().json();if(t.code===401||t.code===4001||t.code==403||t.code==5e3){sessionStorage.removeItem("Authorization");return}if(t.code!==200&&t.errCode!==0){const n=t.msg||t.message||"处理失败,请重试";throw t.code===403||t.code,new Error(n)}return e},{global:!1});const EV=sessionStorage.getItem("platform")||"classroom",Go=EV=="classroom"?"/edu-app":"/api-backend",AV=e=>ho.post(Go+"/imGroup/page",{data:e}),F5=e=>ho.post(Go+"/imUserFriend/page",{data:e}),LV=e=>ho.post(Go+"/imGroup/changeGroupOwner",{data:e}),OV=e=>ho.post(Go+"/imGroupNotice/page",{data:e}),$5=e=>ho.post(Go+"/imGroupNotice/save",{data:e}),G5=e=>ho.post(Go+"/imGroupNotice/remove",{requestType:"form",data:e}),Hv=e=>ho.post(Go+"/imGroupNotice/update",{data:e}),B5=e=>ho.get(Go+"/imGroupNotice/detail/"+e),H5=e=>ho.get(Go+"/imGroup/detail/"+e.id),Qk=e=>ho.post(Go+"/imGroupMember/page",{data:e}),RV=e=>ho.post(Go+"/imGroupMember/userDetail",{data:e}),NV=e=>ho.post(Go+"/imGroup/quit/"+e.id,{data:e}),PV=e=>ho.post(Go+"/imGroup/muteAll",{data:e}),xV=e=>ho.post(Go+"/imGroupMember/groupMute",{data:e}),UV=e=>ho.post(Go+"/imGroupMember/saveImAll",{data:e}),FV=e=>ho.post(Go+"/imGroupMember/removeMemberList",{data:e}),$V=e=>ho.post(Go+"/imGroup/dismiss/"+e.id,{data:e}),GV=e=>ho.post(Go+"/imUserFriend/batchFriend",{data:e}),BV=it({props:{data:{type:Object,default:()=>({})}},setup(e,t){var d;const n=((d=window==null?void 0:window.TUIKitTUICore)==null?void 0:d.isOfficial)&&Ai&&Ai()||{},r=Wt({data:{},extension:{},isCustom:"",constant:dn});nn(()=>{r.data=e.data;const{message:{payload:f}}=e.data;r.isCustom=f.data||" ",r.isCustom=or(f.data),f.data===dn.typeService&&(r.extension=or(f.extension))});const o=f=>{window.open(f)},i=()=>{var v,_,M,I,k;const f=(k=JSON.parse((I=JSON.parse((M=(_=(v=r==null?void 0:r.data)==null?void 0:v.message)==null?void 0:_.payload)==null?void 0:M.data))==null?void 0:I.data))==null?void 0:k.call_type;let g="";switch(f){case 1:g="icon-call-voice";break;case 2:g="icon-call-video";break}return g},s=async()=>{var g,v,_,M,I,k,w,S,L,A,O,H;const f=(I=JSON.parse((M=JSON.parse((_=(v=(g=e==null?void 0:e.data)==null?void 0:g.message)==null?void 0:v.payload)==null?void 0:_.data))==null?void 0:M.data))==null?void 0:I.call_type;switch((w=(k=r==null?void 0:r.data)==null?void 0:k.message)==null?void 0:w.conversationType){case window.TUIKitTUICore.TIM.TYPES.CONV_C2C:const{flow:q,to:P,from:B}=(S=r==null?void 0:r.data)==null?void 0:S.message;if(P===B)break;try{await((O=(A=(L=window==null?void 0:window.TUIKitTUICore)==null?void 0:L.TUIServer)==null?void 0:A.TUICallKit)==null?void 0:O.call({userID:q==="out"?P:B,type:f})),(H=window==null?void 0:window.TUIKitTUICore)!=null&&H.isOfficial&&(n!=null&&n.commit)&&(n==null||n.commit("handleTask",6))}catch(j){console.warn(j)}break;case window.TUIKitTUICore.TIM.TYPES.CONV_GROUP:break}},u=async()=>{var f,g,v;if((f=r.isCustom)!=null&&f.msgId)try{await B5((g=r.isCustom)==null?void 0:g.msgId),du.emit("handleNotice",(v=r.isCustom)==null?void 0:v.msgId)}catch(_){pi({message:_.message,isH5:!1,type:"error"})}};return{...Yt(r),isUrl:ov,openLink:o,handleCallMessageIcon:i,handleNotice:u,handleCallAgain:s}}});const q5=e=>(pr("data-v-cb65d91f"),e=e(),hr(),e),HV={class:"custom"},qV={key:0},VV=["href"],zV={key:0},jV=["href"],WV={key:1},KV={key:1,class:"evaluate"},YV=q5(()=>G("i",{class:"icon icon-star-light"},null,-1)),JV=[YV],XV=["src"],ZV={key:3,class:"textLink"},QV=["href"],ez=q5(()=>G("div",{class:"notice-title"},[G("i",{class:"iconNotice"}),G("span",null,"群公告")],-1)),tz={class:"content"},nz={class:"content-title"},rz={class:"content-text"},oz=["innerHTML"];function iz(e,t,n,r,o,i){var s,u;return J(),oe("div",HV,[e.isCustom===e.constant.typeService?(J(),oe("div",qV,[G("h1",null,[G("label",null,De(e.extension.title),1),e.extension.hyperlinks_text?(J(),oe("a",{key:0,href:e.extension.hyperlinks_text.value,target:"view_window"},De(e.extension.hyperlinks_text.key),9,VV)):Ie("",!0)]),e.extension.item&&e.extension.item.length>0?(J(),oe("ul",zV,[(J(!0),oe(ft,null,zt(e.extension.item,(d,f)=>(J(),oe("li",{key:f},[e.isUrl(d.value)?(J(),oe("a",{key:0,href:d.value,target:"view_window"},De(d.key),9,jV)):(J(),oe("p",WV,De(d.key),1))]))),128))])):Ie("",!0),G("article",null,De(e.extension.description),1)])):e.isCustom.businessID===e.constant.typeEvaluate?(J(),oe("div",KV,[G("h1",null,De(e.$t("message.custom.对本次服务评价")),1),G("ul",null,[(J(!0),oe(ft,null,zt(~~e.isCustom.score,(d,f)=>(J(),oe("li",{class:"evaluate-list-item",key:f},JV))),128))]),G("article",null,De(e.isCustom.comment),1)])):e.isCustom.businessID===e.constant.typeOrder?(J(),oe("div",{key:2,class:"order",onClick:t[0]||(t[0]=d=>e.openLink(e.isCustom.link))},[G("img",{src:e.isCustom.imageUrl,alt:""},null,8,XV),G("main",null,[G("h1",null,De(e.isCustom.title),1),G("p",null,De(e.isCustom.description),1),G("span",null,De(e.isCustom.price),1)])])):e.isCustom.businessID===e.constant.typeTextLink?(J(),oe("div",ZV,[G("p",null,De(e.isCustom.text),1),G("a",{href:e.isCustom.link,target:"view_window"},De(e.$t("message.custom.查看详情>>")),9,QV)])):e.isCustom.businessID===e.constant.TYPE_CALL_MESSAGE?(J(),oe("div",{key:4,class:lt(["call",`call-${(u=(s=e.data)==null?void 0:s.message)==null?void 0:u.conversationType}`]),onClick:t[1]||(t[1]=(...d)=>e.handleCallAgain&&e.handleCallAgain(...d))},[G("i",{class:lt(["icon",e.handleCallMessageIcon()])},null,2),G("span",null,De(e.data.custom),1)],2)):e.isCustom.businessID===e.constant.TC_GROUP_NOTICE?(J(),oe("div",{key:5,class:"notice-message",onClick:t[2]||(t[2]=(...d)=>e.handleNotice&&e.handleNotice(...d))},[ez,G("div",tz,[G("div",nz,De(e.isCustom.msgTitle),1),G("div",rz,De(e.isCustom.msgContent),1)])])):(J(),oe("span",{key:6,innerHTML:e.data.custom},null,8,oz))])}const sz=Kt(BV,[["render",iz],["__scopeId","data-v-cb65d91f"]]),az=it({props:{data:{type:Object,default:()=>({})}},setup(e,t){const n=Wt({message:{}});return nn(()=>{n.message=e.data}),{...Yt(n)}}});const lz={class:"message-tip"};function uz(e,t,n,r,o,i){var s;return J(),oe("div",lz,[G("span",null,De((s=e.message)==null?void 0:s.text),1)])}const cz=Kt(az,[["render",uz],["__scopeId","data-v-aaa088a3"]]),dz={80001:"您发送的消息可能包含违规内容,请停止发送此类内容",80002:"您发送的消息超过最大长度限制(>8KB)"};function Mg(e){const{t}=window.TUIKitTUICore.config.i18n.useI18n(),n=1e3*60,r=n*60,o=r*24,i=o*7,u=new Date().getTime()-e;let d="";if(u<0)return;const f=u/n,g=u/r,v=u/o,_=u/i;if(_>=1&&_<=4)d=` ${parseInt(`${_}`,10)} ${t("time.周")}${t("time.前")}`;else if(v>=1&&v<=6)d=` ${parseInt(`${v}`,10)} ${t("time.天")}${t("time.前")}`;else if(g>=1&&g<=23)d=` ${parseInt(`${g}`,10)} ${t("time.小时")}${t("time.前")}`;else if(f>=1&&f<=59)d=` ${parseInt(`${f}`,10)} ${t("time.分钟")}${t("time.前")}`;else if(u>=0&&u<=n)d=`${t("time.刚刚")}`;else{const M=new Date;M.setTime(e);const I=M.getFullYear(),k=M.getMonth()+1<10?`0${M.getMonth()+1}`:M.getMonth()+1,w=M.getDate()<10?`0${M.getDate()}`:M.getDate();d=`${I}-${k}-${w}`}return d}function po(e,t){console.log(e,"error",e.type,e.message),e.message.indexOf("this group does not exist")!==-1&&(e.message="当前群组已解散"),e.message.indexOf("only group member can get group info")===-1&&(e!=null&&e.type&&(e!=null&&e.message)?pi({message:`${e.type} : ${e.message}`||e,isH5:!!(t!=null&&t.isH5),type:"error"}):pi({message:dz[e.code]||e.message,isH5:!!(t!=null&&t.isH5),type:"error"}))}function fz(e,t){pi({message:e,isH5:!!(t!=null&&t.isH5),type:"success"})}function pz(e,t){if(e.length!==t.length)return!1;for(let n=0;n({})},referenceForShow:{type:Object,default:()=>({})},face:{type:Array,default:()=>[]},url:{type:String,default:""},allMessageID:{type:String,default:""},type:{type:String,deafault:""}},setup(e,t){const n=Wt({message:{},referenceMessage:{},referenceForShow:{},allMessageID:"",face:[],url:"",type:""});return nn(()=>{n.message=e.message,n.referenceMessage=e.referenceMessage,n.referenceForShow=e.referenceForShow,n.face=e.face,n.url=e.url,n.allMessageID=e.allMessageID,n.type=e.type}),Bt(()=>e.referenceForShow,()=>{n.referenceForShow=e.referenceForShow},{deep:!0}),{...Yt(n),constant:dn}}});const gz={class:"message-reference-user"},mz={class:"nick"},vz={class:"colon"},yz={key:0,class:"face-box"},_z={key:0,class:"text-box"},bz=["src"],Mz={key:1},Iz=["src"],Cz={key:3,class:"message-video-cover"},Tz=["src"],wz=["src"],Sz={key:5};function kz(e,t,n,r,o,i){var s,u,d,f,g,v,_,M;return(s=e.referenceMessage)!=null&&s.messageID&&e.allMessageID.indexOf(e.referenceMessage.messageID)!==-1?(J(),oe("div",{key:0,class:lt(`${e.type} ${e.message.flow==="in"&&e.type+"-reverse"}`)},[G("p",gz,[G("span",mz,De(e.referenceForShow.nick||e.referenceForShow.from),1),G("span",vz,De(e.type==="reference"?":":""),1)]),e.referenceMessage.messageType===e.constant.typeText?(J(),oe("div",yz,[(J(!0),oe(ft,null,zt(e.face,(I,k)=>(J(),oe("div",{key:k},[I.name==="text"?(J(),oe("span",_z,De(I.text),1)):I.name==="img"?(J(),oe("img",{key:1,class:"text-img",src:I.src},null,8,bz)):Ie("",!0)]))),128))])):Ie("",!0),e.referenceMessage.messageType===e.constant.typeCustom?(J(),oe("span",Mz,De(e.referenceMessage.messageAbstract),1)):Ie("",!0),e.referenceMessage.messageType===e.constant.typeImage?(J(),oe("img",{key:2,class:"message-img",src:e.referenceForShow.payload.imageInfoArray[1].url},null,8,Iz)):Ie("",!0),e.referenceMessage.messageType===e.constant.typeVideo?(J(),oe("div",Cz,[G("img",{class:"message-videoimg",src:((d=(u=e.referenceForShow)==null?void 0:u.payload)==null?void 0:d.snapshotUrl)||((g=(f=e.referenceForShow)==null?void 0:f.payload)==null?void 0:g.thumbUrl)},null,8,Tz)])):Ie("",!0),e.referenceMessage.messageType===e.constant.typeFace?(J(),oe("img",{key:4,class:"message-img",src:e.url},null,8,wz)):Ie("",!0),e.referenceMessage.messageType===e.constant.typeFile||e.referenceMessage.messageType===e.constant.typeAudio?(J(),oe("span",Sz,De((v=e.referenceMessage)==null?void 0:v.messageAbstract),1)):Ie("",!0)],2)):(J(),oe("div",{key:1,class:lt(`${e.type} ${e.message.flow==="in"&&e.type+"-reverse"}`)},[G("p",null,De((_=e.referenceMessage)==null?void 0:_.messageSender),1),G("span",null,De((M=e.referenceMessage)==null?void 0:M.messageAbstract),1)],2))}const Dz=Kt(hz,[["render",kz],["__scopeId","data-v-495fbc57"]]),Ez=it({props:{message:{type:Object,default:()=>({})},emojiList:{type:Array,default:()=>[]},type:{type:String,default:""}},emits:["handleCollapse"],setup(e,t){const{TUIServer:n}=bc,r=Wt({message:{},emojiUrl:fh,emojiMap:df,emojiName:OO,isCollapse:!0,types:yt.TYPES,env:n.TUICore.TUIEnv,type:e.type,emojiReacts:{},allMemberList:[]}),o=Ne({}),i=qe(()=>r.emojiName.slice(0,6)),s=qe(()=>r.emojiName.slice(6)),u=v=>{n.emojiReact(r.message,v)},d=v=>{var _,M;try{if(!(v!=null&&v.cloudCustomData))return;const I=(M=(_=or(v==null?void 0:v.cloudCustomData))==null?void 0:_.messageReact)==null?void 0:M.reacts;return I?(r.emojiReacts=I,I):void 0}catch(I){console.warn(I)}},f=v=>{let _="";return v==null||v.forEach((M,I)=>{var w;const k=(w=r.allMemberList)==null?void 0:w.find(S=>S.userID===M);_=_+(k?k==null?void 0:k.nick:M)+", "}),_.length&&(_=_.substring(0,_.lastIndexOf(","))),_},g=v=>{var M,I,k,w,S,L,A;const _=n==null?void 0:n.currentStore;switch(v==null?void 0:v.conversationType){case yt.TYPES.CONV_C2C:r.allMemberList=[{userID:(I=(M=_==null?void 0:_.conversation)==null?void 0:M.userProfile)==null?void 0:I.userID,nick:(w=(k=_==null?void 0:_.conversation)==null?void 0:k.userProfile)==null?void 0:w.nick},{userID:(S=_==null?void 0:_.selfInfo)==null?void 0:S.userID,nick:(L=_==null?void 0:_.selfInfo)==null?void 0:L.nick}];break;case yt.TYPES.CONV_GROUP:r.allMemberList=(A=_==null?void 0:_.allMemberList)==null?void 0:A.memberList;break}};return Bt(()=>e.message,(v,_)=>{r.message=e.message,(v==null?void 0:v.conversationID)!==(_==null?void 0:_.conversationID)&&g(v)},{deep:!0,immediate:!0}),Bt(()=>r.isCollapse,(v,_)=>{var M;v!==_&&(M=r==null?void 0:r.env)!=null&&M.isH5&&t.emit("handleCollapse",v)}),{...Yt(r),emojiCollapseList:i,emojiExpandList:s,select:u,handleEmojiReact:d,handleEmojiReactItem:f,container:o}}});const Az={class:"face-list collapse"},Lz={class:"face-list-collapse"},Oz=["onClick"],Rz=["src"],Nz={class:"face-list face-list-expand"},Pz=["onClick"],xz=["src"],Uz={key:1,class:"emoji-content"},Fz={class:"emoji-react",ref:"container"},$z=["onClick"],Gz=["src"],Bz={class:"emoji-react-item-content"};function Hz(e,t,n,r,o,i){var s;return J(),oe(ft,null,[e.type==="dropdown"?(J(),oe("div",{key:0,class:lt(["dialog-emoji",(s=e.env)!=null&&s.isH5?"dialog-emoji-h5":""])},[G("div",Az,[G("ul",Lz,[(J(!0),oe(ft,null,zt(e.emojiCollapseList,(u,d)=>(J(),oe("li",{class:"face-list-item",key:d,onClick:Mn(f=>e.select(u),["stop"])},[G("img",{src:e.emojiUrl+e.emojiMap[u]},null,8,Rz)],8,Oz))),128))]),G("div",{class:"face-list-button",onClick:t[0]||(t[0]=Mn(u=>e.isCollapse=!e.isCollapse,["stop"]))},[G("i",{class:lt(["icon",[e.isCollapse?"icon-expand":"icon-collapse"]])},null,2)])]),Bn(G("ul",Nz,[(J(!0),oe(ft,null,zt(e.emojiExpandList,(u,d)=>(J(),oe("li",{class:"face-list-item",key:d,onClick:Mn(f=>e.select(u),["stop"])},[G("img",{src:e.emojiUrl+e.emojiMap[u]},null,8,xz)],8,Pz))),128))],512),[[to,!e.isCollapse]])],2)):Ie("",!0),e.type==="content"?(J(),oe("div",Uz,[G("ul",Fz,[(J(!0),oe(ft,null,zt(e.handleEmojiReact(e.message),(u,d)=>Bn((J(),oe("li",{class:"emoji-react-item",key:d,onClick:Mn(f=>e.select(d),["stop"])},[G("img",{src:e.emojiUrl+e.emojiMap[d]},null,8,Gz),G("div",Bz,[G("span",null,De(e.handleEmojiReactItem(u)),1)])],8,$z)),[[to,u&&(u==null?void 0:u.length)]])),128))],512)])):Ie("",!0)],64)}const oT=Kt(Ez,[["render",Hz],["__scopeId","data-v-1e1ad132"]]),qz=it({props:{data:{type:Object,default:()=>({})},messagesList:{type:Array,default:()=>[]},isH5:{type:Boolean,default:!1},needGroupReceipt:{type:Boolean,default:!1},needReplies:{type:Boolean,default:!0},flow:{type:String,default:""},needEmojiReact:{type:Boolean,default:!1}},emits:["jumpID","resendMessage","showReadReceiptDialog","showRepliesDialog","dropDownOpen"],components:{MessageReference:Dz,MessageEmojiReact:oT},setup(e,t){const{t:n}=window.TUIKitTUICore.config.i18n.useI18n(),{TUIServer:r}=bc,o=Wt({env:Yh(),message:{},messagesList:[],show:!1,type:{},referenceMessage:{},referenceForShow:{},allMessageID:"",needGroupReceipt:!1,needReplies:!0,replies:[],face:[],url:"",needEmojiReact:!1});nn(()=>{var A,O,H;if(o.type=dn,o.messagesList=e.messagesList,o.needEmojiReact=e.needEmojiReact,o.message=xC(((A=o.messagesList)==null?void 0:A.find(q=>{var P;return(q==null?void 0:q.ID)===((P=e.message)==null?void 0:P.ID)}))||e.data),o.needGroupReceipt=e.needGroupReceipt,o.needReplies=e.needReplies,o.message.cloudCustomData){const q=[],P=or(o.message.cloudCustomData);o.replies=((O=P==null?void 0:P.messageReplies)==null?void 0:O.replies)||[],o.referenceMessage=P.messageReply?P.messageReply:"";for(let B=0;B{s.value=!s.value,s.value&&(t.emit("dropDownOpen",u),wr(()=>{var re,X,ie,he,ae,de,Y,te,fe,Re,ve,be,ue,ce,Ee;const O=(re=u==null?void 0:u.value)==null?void 0:re.children[0],H=document.getElementsByClassName("dialog-item")[0],q=(X=u==null?void 0:u.value)==null?void 0:X.offsetParent,P=Rv(q),B=document.getElementById("messageEle"),j=Rv(B),$=(ie=j==null?void 0:j.left)==null?void 0:ie.value,R=((he=j==null?void 0:j.left)==null?void 0:he.value)+B.clientWidth-O.clientWidth+76,T=(ae=j==null?void 0:j.top)==null?void 0:ae.value,x=((de=j==null?void 0:j.top)==null?void 0:de.value)+B.clientHeight-O.clientHeight,{clientX:Z,clientY:K}=A;if((Y=o==null?void 0:o.env)!=null&&Y.isH5){((te=P==null?void 0:P.top)==null?void 0:te.value)<=(H==null?void 0:H.clientHeight)?O.style.bottom=`-${H==null?void 0:H.clientHeight}Px`:((fe=o==null?void 0:o.message)==null?void 0:fe.flow)==="in"?O.style.top=`-${(H==null?void 0:H.clientHeight)-20}Px`:O.style.top=`-${H==null?void 0:H.clientHeight}Px`;const pe=((Re=P==null?void 0:P.left)==null?void 0:Re.value)+((ve=P==null?void 0:P.width)==null?void 0:ve.value)/2;pe>H.clientWidth/2&&pe<(B==null?void 0:B.clientWidth)-H.clientWidth/2?O.style.left="calc(50% - 135Px)":pe<=H.clientWidth/2?O.style.left="-20Px":O.style.left=`-${H.clientWidth/2+10}Px`;return}switch(!0){case(Z>$&&Z=R:O.style.right=`${Math.max(((ue=P==null?void 0:P.left)==null?void 0:ue.value)+(q==null?void 0:q.clientWidth)-A.clientX-256,-10)}Px`;break}switch(!0){case(K>T&&K=x:O.style.bottom=`${((Ee=P==null?void 0:P.top)==null?void 0:Ee.value)+(q==null?void 0:q.clientHeight)-A.clientY}Px`,O.style.cssText+="align-items:end;";break}}))},f=A=>{var O,H;if((O=o.referenceMessage)!=null&&O.messageID&&o.allMessageID.includes((H=o.referenceMessage)==null?void 0:H.messageID))t.emit("jumpID",o.referenceMessage.messageID);else{const q=n("TUIChat.无法定位到原消息");po(q,e)}};xa(u,()=>{s.value=!1}),vB(i,A=>{var O;(O=o==null?void 0:o.env)!=null&&O.isH5&&d(A)});const v=A=>{t.emit("resendMessage",A)},_=A=>!!(A.flow==="out"&&A.status==="success"&&A.needReadReceipt),M=A=>{var O,H,q;return(O=A==null?void 0:A.readReceiptInfo)!=null&&O.isPeerRead||((H=A==null?void 0:A.readReceiptInfo)==null?void 0:H.isPeerRead)===void 0&&(A!=null&&A.isPeerRead)||((q=A==null?void 0:A.readReceiptInfo)==null?void 0:q.unreadCount)===0?"":"unRead"},I=A=>{var O,H;switch(A.conversationType){case r.TUICore.TIM.TYPES.CONV_C2C:return(O=A==null?void 0:A.readReceiptInfo)!=null&&O.isPeerRead||((H=A==null?void 0:A.readReceiptInfo)==null?void 0:H.isPeerRead)===void 0&&(A!=null&&A.isPeerRead)?n("TUIChat.已读"):n("TUIChat.未读");case r.TUICore.TIM.TYPES.CONV_GROUP:return A.readReceiptInfo.unreadCount===0?n("TUIChat.全部已读"):A.readReceiptInfo.readCount===0||A.readReceiptInfo.unreadCount===void 0&&A.readReceiptInfo.readCount===void 0?n("TUIChat.未读"):`${A.readReceiptInfo.readCount+n("TUIChat.人已读")}`;default:return""}},k=A=>{t.emit("showReadReceiptDialog",A,"receipt")},w=(A,O)=>{var H,q;if(O){t.emit("showRepliesDialog",A,"replies");return}if((H=o.referenceMessage)!=null&&H.messageRootID){const P=(q=o.messagesList)==null?void 0:q.find(B=>{var j;return B.ID===((j=o.referenceMessage)==null?void 0:j.messageRootID)});if(P){t.emit("showRepliesDialog",P,"replies");return}else{const B=n("TUIChat.无法定位到原消息");po(B,e)}}},S=A=>{const O=["content"];return A&&(O.push(`content-${o.message.flow}`),o.message.type===yt.TYPES.MSG_IMAGE&&!L(A)&&O.push("content-image"),o.message.type===yt.TYPES.MSG_VIDEO&&!L(A)&&O.push("content-video")),O},L=A=>{var O,H;try{if(!(A!=null&&A.cloudCustomData))return;const q=(H=(O=or(A==null?void 0:A.cloudCustomData))==null?void 0:O.messageReact)==null?void 0:H.reacts;return!(!q||Object.keys(q).length===0)}catch(q){return console.warn(q),!1}};return{...Yt(o),toggleDialog:d,htmlRefHook:i,jumpToAim:f,dropdown:s,dropdownRef:u,resendMessage:v,showReadReceiptTag:_,readReceiptStyle:M,readReceiptCont:I,showReadReceiptDialog:k,showRepliesDialog:w,handleImageOrVideoBubbleStyle:S,isEmojiReactionInMessage:L,TIM:yt}}});const Vz=e=>(pr("data-v-7ffe02dd"),e=e(),hr(),e),zz=["src"],jz={class:"message-area"},Wz={key:0,class:"name"},Kz={key:1,ref:"dropdownRef",class:"dropdown-inner"},Yz=Vz(()=>G("i",{class:"icon icon-msg-replies"},null,-1));function Jz(e,t,n,r,o,i){var d,f,g,v,_,M,I,k;const s=xt("MessageReference"),u=xt("MessageEmojiReact");return J(),oe(ft,null,[G("div",{class:lt(["message-bubble",[e.message.flow==="in"?"":"reverse"]]),ref:"htmlRefHook"},[G("img",{class:"avatar",src:((d=e.message)==null?void 0:d.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,zz),G("main",jz,[e.message.flow==="in"&&e.message.conversationType==="GROUP"?(J(),oe("label",Wz,De(e.message.nameCard||e.message.nick||e.message.from),1)):Ie("",!0),G("div",{class:lt(e.handleImageOrVideoBubbleStyle(e.message)),onContextmenu:t[2]||(t[2]=Mn((...w)=>e.toggleDialog&&e.toggleDialog(...w),["prevent","right"]))},[(f=e.message)!=null&&f.cloudCustomData&&e.referenceMessage&&((g=e.referenceMessage)!=null&&g.messageRootID)?(J(),oe("div",{key:0,class:lt(["message-replie-area",[((v=e.message)==null?void 0:v.flow)==="in"?"":"message-replies-area-reverse"]]),onClick:t[0]||(t[0]=w=>e.showRepliesDialog(e.message,!1))},[It(s,{message:e.message,referenceMessage:e.referenceMessage,referenceForShow:e.referenceForShow,url:e.url,face:e.face,allMessageID:e.allMessageID,type:"reply"},null,8,["message","referenceMessage","referenceForShow","url","face","allMessageID"])],2)):Ie("",!0),Ft(e.$slots,"default",{},void 0,!0),e.dropdown?(J(),oe("div",Kz,[G("div",{class:lt(["dialog",[e.message.flow==="in"?"":"dialog-right"]]),onClick:t[1]||(t[1]=w=>e.dropdown=!1)},[Ft(e.$slots,"dialog",{},void 0,!0)],2)],512)):Ie("",!0),e.needEmojiReact&&e.isEmojiReactionInMessage(e.message)?(J(),_t(u,{key:2,message:e.message,type:"content"},null,8,["message"])):Ie("",!0)],34)]),e.message.status==="fail"?(J(),oe("label",{key:0,class:"message-label fail",onClick:t[3]||(t[3]=w=>e.resendMessage(e.message))}," ! ")):Ie("",!0)],2),(_=e.message)!=null&&_.cloudCustomData&&e.referenceMessage&&!((M=e.referenceMessage)!=null&&M.messageRootID)?(J(),oe("div",{key:0,class:lt(["message-reference-area",[e.message.flow==="in"?"":"message-reference-area-reverse"]]),onClick:t[4]||(t[4]=w=>e.jumpToAim(e.referenceMessage))},[It(s,{message:e.message,referenceMessage:e.referenceMessage,referenceForShow:e.referenceForShow,url:e.url,face:e.face,allMessageID:e.allMessageID,type:"reference"},null,8,["message","referenceMessage","referenceForShow","url","face","allMessageID"])],2)):Ie("",!0),(I=e.replies)!=null&&I.length?(J(),oe("label",{key:1,class:lt(["message-replies",[e.message.flow==="in"?"":"message-replies-reverse"]]),onClick:t[5]||(t[5]=w=>e.showRepliesDialog(e.message,!0))},[Yz,G("span",null,De(((k=e.replies)==null?void 0:k.length)+e.$t("TUIChat.条回复")),1)],2)):Ie("",!0)],64)}const Xz=Kt(qz,[["render",Jz],["__scopeId","data-v-7ffe02dd"]]),Zz=it({props:{data:{type:Object,default:()=>({})},isEdit:{type:Boolean,default:()=>!1}},setup(e,t){const n=Wt({message:{},isEdit:!1});nn(()=>{n.message=e.data,n.isEdit=e.isEdit});const r=()=>{t.emit("edit",n.message)};return{...Yt(n),edit:r}}});const Qz={class:"revoke"},ej={key:0},tj={key:1};function nj(e,t,n,r,o,i){return J(),oe("div",Qz,[e.message.flow==="in"?(J(),oe("label",ej,De(e.message.nick||e.message.from),1)):(J(),oe("label",tj,De(e.$t("TUIChat.您")),1)),G("span",null,De(e.$t("TUIChat.撤回了一条消息")),1),e.message.flow==="out"&&e.isEdit?(J(),oe("span",{key:2,class:"edit",onClick:t[0]||(t[0]=(...s)=>e.edit&&e.edit(...s))},De(e.$t("TUIChat.重新编辑")),1)):Ie("",!0)])}const rj=Kt(Zz,[["render",nj],["__scopeId","data-v-98ed73e3"]]),oj=it({props:{data:{type:Array,default:()=>[]},types:{type:Object,default:()=>({})}},setup(e,t){const n=Wt({messageList:[],types:{}});nn(()=>{n.messageList=e.data,n.types=e.types});const r=(o,i)=>{const s={handleAction:o,message:i};t.emit("application",s)};return{...Yt(n),translateGroupSystemNotice:FG,handleApplication:r}}});const ij=e=>(pr("data-v-45889b95"),e=e(),hr(),e),sj={class:"message-system"},aj={class:"list"},lj=ij(()=>G("i",{class:"icon icon-system"},null,-1)),uj={key:0,class:"btn-box"},cj=["onClick"],dj=["onClick"];function fj(e,t,n,r,o,i){return J(),oe("div",sj,[G("ul",aj,[(J(!0),oe(ft,null,zt(e.messageList,(s,u)=>{var d;return J(),oe("li",{key:u},[s.type===e.types.MSG_GRP_TIP||s.type===e.types.MSG_GRP_SYS_NOTICE?(J(),oe(ft,{key:0},[lj,G("span",null,De(e.translateGroupSystemNotice(s)),1),((d=s==null?void 0:s.payload)==null?void 0:d.operationType)===1?(J(),oe("div",uj,[G("button",{class:"btn btn-default",onClick:f=>e.handleApplication("Agree",s)}," 接受 ",8,cj),G("button",{class:"btn btn-cancel",onClick:f=>e.handleApplication("Reject",s)}," 拒绝 ",8,dj)])):Ie("",!0)],64)):Ie("",!0)])}),128))])])}const pj=Kt(oj,[["render",fj],["__scopeId","data-v-45889b95"]]);var V5={exports:{}};/*! * clipboard.js v2.0.11 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha */(function(e,t){(function(r,o){e.exports=o()})(mi,function(){return function(){var n={686:function(i,s,u){u.d(s,{default:function(){return de}});var d=u(279),f=u.n(d),g=u(370),v=u.n(g),_=u(817),M=u.n(_);function I(Y){try{return document.execCommand(Y)}catch{return!1}}var k=function(te){var fe=M()(te);return I("cut"),fe},w=k;function S(Y){var te=document.documentElement.getAttribute("dir")==="rtl",fe=document.createElement("textarea");fe.style.fontSize="12pt",fe.style.border="0",fe.style.padding="0",fe.style.margin="0",fe.style.position="absolute",fe.style[te?"right":"left"]="-9999px";var Re=window.pageYOffset||document.documentElement.scrollTop;return fe.style.top="".concat(Re,"px"),fe.setAttribute("readonly",""),fe.value=Y,fe}var L=function(te,fe){var Re=S(te);fe.container.appendChild(Re);var ve=M()(Re);return I("copy"),Re.remove(),ve},A=function(te){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},Re="";return typeof te=="string"?Re=L(te,fe):te instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(te==null?void 0:te.type)?Re=L(te.value,fe):(Re=M()(te),I("copy")),Re},O=A;function H(Y){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H=function(fe){return typeof fe}:H=function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe},H(Y)}var q=function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=te.action,Re=fe===void 0?"copy":fe,ve=te.container,be=te.target,ue=te.text;if(Re!=="copy"&&Re!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(be!==void 0)if(be&&H(be)==="object"&&be.nodeType===1){if(Re==="copy"&&be.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(Re==="cut"&&(be.hasAttribute("readonly")||be.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(ue)return O(ue,{container:ve});if(be)return Re==="cut"?w(be):O(be,{container:ve})},P=q;function B(Y){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?B=function(fe){return typeof fe}:B=function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe},B(Y)}function j(Y,te){if(!(Y instanceof te))throw new TypeError("Cannot call a class as a function")}function $(Y,te){for(var fe=0;fe"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function ie(Y){return ie=Object.setPrototypeOf?Object.getPrototypeOf:function(fe){return fe.__proto__||Object.getPrototypeOf(fe)},ie(Y)}function he(Y,te){var fe="data-clipboard-".concat(Y);if(te.hasAttribute(fe))return te.getAttribute(fe)}var ae=function(Y){T(fe,Y);var te=Z(fe);function fe(Re,ve){var be;return j(this,fe),be=te.call(this),be.resolveOptions(ve),be.listenClick(Re),be}return R(fe,[{key:"resolveOptions",value:function(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof ve.action=="function"?ve.action:this.defaultAction,this.target=typeof ve.target=="function"?ve.target:this.defaultTarget,this.text=typeof ve.text=="function"?ve.text:this.defaultText,this.container=B(ve.container)==="object"?ve.container:document.body}},{key:"listenClick",value:function(ve){var be=this;this.listener=v()(ve,"click",function(ue){return be.onClick(ue)})}},{key:"onClick",value:function(ve){var be=ve.delegateTarget||ve.currentTarget,ue=this.action(be)||"copy",ce=P({action:ue,container:this.container,target:this.target(be),text:this.text(be)});this.emit(ce?"success":"error",{action:ue,text:ce,trigger:be,clearSelection:function(){be&&be.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(ve){return he("action",ve)}},{key:"defaultTarget",value:function(ve){var be=he("target",ve);if(be)return document.querySelector(be)}},{key:"defaultText",value:function(ve){return he("text",ve)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(ve){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return O(ve,be)}},{key:"cut",value:function(ve){return w(ve)}},{key:"isSupported",value:function(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],be=typeof ve=="string"?[ve]:ve,ue=!!document.queryCommandSupported;return be.forEach(function(ce){ue=ue&&!!document.queryCommandSupported(ce)}),ue}}]),fe}(f()),de=ae},828:function(i){var s=9;if(typeof Element<"u"&&!Element.prototype.matches){var u=Element.prototype;u.matches=u.matchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector||u.webkitMatchesSelector}function d(f,g){for(;f&&f.nodeType!==s;){if(typeof f.matches=="function"&&f.matches(g))return f;f=f.parentNode}}i.exports=d},438:function(i,s,u){var d=u(828);function f(_,M,I,k,w){var S=v.apply(this,arguments);return _.addEventListener(I,S,w),{destroy:function(){_.removeEventListener(I,S,w)}}}function g(_,M,I,k,w){return typeof _.addEventListener=="function"?f.apply(null,arguments):typeof I=="function"?f.bind(null,document).apply(null,arguments):(typeof _=="string"&&(_=document.querySelectorAll(_)),Array.prototype.map.call(_,function(S){return f(S,M,I,k,w)}))}function v(_,M,I,k){return function(w){w.delegateTarget=d(w.target,M),w.delegateTarget&&k.call(_,w)}}i.exports=g},879:function(i,s){s.node=function(u){return u!==void 0&&u instanceof HTMLElement&&u.nodeType===1},s.nodeList=function(u){var d=Object.prototype.toString.call(u);return u!==void 0&&(d==="[object NodeList]"||d==="[object HTMLCollection]")&&"length"in u&&(u.length===0||s.node(u[0]))},s.string=function(u){return typeof u=="string"||u instanceof String},s.fn=function(u){var d=Object.prototype.toString.call(u);return d==="[object Function]"}},370:function(i,s,u){var d=u(879),f=u(438);function g(I,k,w){if(!I&&!k&&!w)throw new Error("Missing required arguments");if(!d.string(k))throw new TypeError("Second argument must be a String");if(!d.fn(w))throw new TypeError("Third argument must be a Function");if(d.node(I))return v(I,k,w);if(d.nodeList(I))return _(I,k,w);if(d.string(I))return M(I,k,w);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function v(I,k,w){return I.addEventListener(k,w),{destroy:function(){I.removeEventListener(k,w)}}}function _(I,k,w){return Array.prototype.forEach.call(I,function(S){S.addEventListener(k,w)}),{destroy:function(){Array.prototype.forEach.call(I,function(S){S.removeEventListener(k,w)})}}}function M(I,k,w){return f(document.body,I,k,w)}i.exports=g},817:function(i){function s(u){var d;if(u.nodeName==="SELECT")u.focus(),d=u.value;else if(u.nodeName==="INPUT"||u.nodeName==="TEXTAREA"){var f=u.hasAttribute("readonly");f||u.setAttribute("readonly",""),u.select(),u.setSelectionRange(0,u.value.length),f||u.removeAttribute("readonly"),d=u.value}else{u.hasAttribute("contenteditable")&&u.focus();var g=window.getSelection(),v=document.createRange();v.selectNodeContents(u),g.removeAllRanges(),g.addRange(v),d=g.toString()}return d}i.exports=s},279:function(i){function s(){}s.prototype={on:function(u,d,f){var g=this.e||(this.e={});return(g[u]||(g[u]=[])).push({fn:d,ctx:f}),this},once:function(u,d,f){var g=this;function v(){g.off(u,v),d.apply(f,arguments)}return v._=d,this.on(u,v,f)},emit:function(u){var d=[].slice.call(arguments,1),f=((this.e||(this.e={}))[u]||[]).slice(),g=0,v=f.length;for(g;g{const t=(e==null?void 0:e.appendToBody)===void 0?!0:e.appendToBody;return{toClipboard(n,r){return new Promise((o,i)=>{const s=document.createElement("button"),u=new gj(s,{text:()=>n,action:()=>"copy",container:r!==void 0?r:document.body});u.on("success",d=>{u.destroy(),o(d)}),u.on("error",d=>{u.destroy(),i(d)}),t&&document.body.appendChild(s),s.click(),t&&document.body.removeChild(s)})}}},mj=it({props:{message:{type:Object,default:()=>({})},needEmojiReact:{type:Boolean,default:!1}},components:{MessageEmojiReact:oT},setup(e,t){var d,f,g;const n=(f=(d=window==null?void 0:window.TUIKitTUICore)==null?void 0:d.TUIServer)==null?void 0:f.TUIChat,r=((g=window==null?void 0:window.TUIKitTUICore)==null?void 0:g.isOfficial)&&Ai&&Ai()||{},o=Wt({message:{},show:!1,types:yt.TYPES,env:n.TUICore.TUIEnv,showToolList:!0,needEmojiReact:!1});nn(()=>{o.needEmojiReact=e.needEmojiReact}),Bt(()=>e.message,()=>{o.message=e.message},{deep:!0,immediate:!0});const i=v=>{let _="";switch(v.type){case o.types.MSG_FILE:_=v.payload.fileUrl;break;case o.types.MSG_VIDEO:_=v.payload.remoteVideoUrl;break;case o.types.MSG_IMAGE:_=v.payload.imageInfoArray[0].url;break}window.open(_,"_blank")},s=async(v,_)=>{var M,I,k;switch(_){case dn.handleMessage.revoke:try{await n.revokeMessage(v),(M=window==null?void 0:window.TUIKitTUICore)!=null&&M.isOfficial&&(r!=null&&r.commit)&&(r==null||r.commit("handleTask",1))}catch(w){po(w,o.env)}break;case dn.handleMessage.copy:try{if((v==null?void 0:v.type)===o.types.MSG_TEXT&&((I=v==null?void 0:v.payload)!=null&&I.text)){const{toClipboard:w}=z5();await w((k=v==null?void 0:v.payload)==null?void 0:k.text)}}catch(w){po(w,o.env)}break;case dn.handleMessage.delete:await n.deleteMessage([v]);break;case dn.handleMessage.forward:t.emit("handleMessage",v,dn.handleMessage.forward);break;case dn.handleMessage.reference:t.emit("handleMessage",v,dn.handleMessage.reference);break;case dn.handleMessage.reply:t.emit("handleMessage",v,dn.handleMessage.reply);break}},u=v=>{var _;(_=o==null?void 0:o.env)!=null&&_.isH5&&(o.showToolList=v)};return{...Yt(o),openMessage:i,handleMessage:s,constant:dn,handleCollapse:u}}});const cd=e=>(pr("data-v-3a151b49"),e=e(),hr(),e),vj=cd(()=>G("i",{class:"icon icon-msg-copy"},null,-1)),yj=cd(()=>G("i",{class:"icon icon-msg-copy"},null,-1)),_j=cd(()=>G("i",{class:"icon icon-msg-forward"},null,-1)),bj=cd(()=>G("i",{class:"icon icon-msg-quote"},null,-1)),Mj=cd(()=>G("i",{class:"icon icon-msg-reply"},null,-1)),Ij=cd(()=>G("i",{class:"icon icon-msg-revoke"},null,-1)),Cj=cd(()=>G("i",{class:"icon icon-msg-del"},null,-1));function Tj(e,t,n,r,o,i){var u,d,f;const s=xt("MessageEmojiReact");return J(),oe("div",{class:lt(["dialog-item",(u=e.env)!=null&&u.isH5?"dialog-item-h5":"dialog-item-web"])},[(d=e.env)!=null&&d.isH5&&e.needEmojiReact?(J(),_t(s,{key:0,message:e.message,type:"dropdown",onHandleCollapse:e.handleCollapse},null,8,["message","onHandleCollapse"])):Ie("",!0),Bn(G("ul",{class:lt(["dialog-item-list",(f=e.env)!=null&&f.isH5?"dialog-item-list-h5":"dialog-item-list-web"])},[(e.message.type===e.types.MSG_FILE||e.message.type===e.types.MSG_VIDEO||e.message.type===e.types.MSG_IMAGE)&&!e.env.isH5?(J(),oe("li",{key:0,onClick:t[0]||(t[0]=g=>e.openMessage(e.message))},[vj,G("span",null,De(e.$t("TUIChat.打开")),1)])):Ie("",!0),e.message.type===e.types.MSG_TEXT?(J(),oe("li",{key:1,onClick:t[1]||(t[1]=g=>e.handleMessage(e.message,e.constant.handleMessage.copy))},[yj,G("span",null,De(e.$t("TUIChat.复制")),1)])):Ie("",!0),e.message.status==="success"?(J(),oe("li",{key:2,onClick:t[2]||(t[2]=g=>e.handleMessage(e.message,e.constant.handleMessage.forward))},[_j,G("span",null,De(e.$t("TUIChat.转发")),1)])):Ie("",!0),e.message.status==="success"?(J(),oe("li",{key:3,onClick:t[3]||(t[3]=g=>e.handleMessage(e.message,e.constant.handleMessage.reference))},[bj,G("span",null,De(e.$t("TUIChat.引用")),1)])):Ie("",!0),e.message.status==="success"?(J(),oe("li",{key:4,onClick:t[4]||(t[4]=g=>e.handleMessage(e.message,e.constant.handleMessage.reply))},[Mj,G("span",null,De(e.$t("TUIChat.回复")),1)])):Ie("",!0),e.message.flow==="out"&&e.message.status==="success"&&e.message.type!==e.types.MSG_CUSTOM?(J(),oe("li",{key:5,onClick:t[5]||(t[5]=g=>e.handleMessage(e.message,e.constant.handleMessage.revoke))},[Ij,G("span",null,De(e.$t("TUIChat.撤回")),1)])):Ie("",!0),e.message.status==="success"?(J(),oe("li",{key:6,onClick:t[6]||(t[6]=g=>e.handleMessage(e.message,e.constant.handleMessage.delete))},[Cj,G("span",null,De(e.$t("TUIChat.删除")),1)])):Ie("",!0)],2),[[to,e.showToolList]])],2)}const wj=Kt(mj,[["render",Tj],["__scopeId","data-v-3a151b49"]]),Sj=it({props:{show:{type:Boolean,default:()=>!1}},setup(e,t){const n=Wt({show:!1});nn(()=>{n.show=e.show});const r=()=>{n.show=!n.show,t.emit("update:show",n.show)};return{...Yt(n),toggleView:r}}});function kj(e,t,n,r,o,i){return e.show?(J(),oe("div",{key:0,class:"mask",onClick:t[0]||(t[0]=Mn((...s)=>e.toggleView&&e.toggleView(...s),["self"]))},[Ft(e.$slots,"default",{},void 0,!0)])):Ie("",!0)}const j5=Kt(Sj,[["render",kj],["__scopeId","data-v-bc53103b"]]),Dj=it({props:{list:{type:Array,default:()=>[]},selectedList:{type:Array,default:()=>[]},isSearch:{type:Boolean,default:()=>!0},isRadio:{type:Boolean,default:()=>!1},isCustomItem:{type:Boolean,default:()=>!1},title:{type:String,default:()=>""},type:{type:String,default:()=>""},isH5:{type:Boolean,default:()=>!1},resultShow:{type:Boolean,default:()=>!0}},setup(e,t){const n=Wt({keyword:"",type:"",list:[],selectedList:[],checkboxIds:[],isSearch:!0,isCustomItem:!1,title:"",checkAllStatus:!1,indeterminate:!1,radioId:null}),r=M=>{if(n.checkboxIds=M,n.list.length<=0){n.indeterminate=!1,n.checkAllStatus=!1;return}n.list.forEach(k=>{if(n.checkboxIds.includes(k.id))n.selectedList.findIndex(S=>S.id==k.id)===-1&&n.selectedList.push(k);else{const w=n.selectedList.findIndex(S=>S.id==k.id);w>=0&&n.selectedList.splice(w,1)}});let I=0;n.list.forEach(k=>{n.selectedList.findIndex(S=>S.id===k.id)>=0&&I++}),I>=n.list.length?(n.checkAllStatus=!0,n.indeterminate=!1):(n.checkAllStatus=!1,n.indeterminate=I!==0)};nn(()=>{if(e.isCustomItem)for(let I=0;I-1&&e.list.splice(I,1),n.list=e.list;else n.list=e.list;n.list.forEach(I=>{I.id||(I.id=I.conversationID)}),n.selectedList=e.selectedList;const M=n.selectedList.map(I=>I.id);r(M),n.isSearch=e.isSearch,n.isCustomItem=e.isCustomItem,n.title=e.title,n.type=e.type});const o=qe(()=>n.list.filter(M=>!M.isDisabled)),i=()=>{t.emit("search",n.keyword)},s=M=>{if(M.isDisabled)return;let I=n.selectedList;const k=I.indexOf(M);if(k>-1){n.selectedList.splice(k,1);const w=n.selectedList.map(S=>S.id);r(w);return}e.isRadio&&(I=[]),I.push(M),n.selectedList=I},u=()=>{n.selectedList.length===o.value.length?n.selectedList=[]:n.selectedList=[...o.value]},d=()=>{t.emit("submit",n.selectedList)},f=()=>{t.emit("cancel")},g=M=>{if(M){const I=[];n.list.forEach(k=>{I.push(k.id)}),I.forEach(k=>{n.checkboxIds.includes(k)||n.checkboxIds.push(k)})}else n.list.map(k=>k.id).forEach(k=>{const w=n.checkboxIds.findIndex(L=>L==k);w!==-1&&n.checkboxIds.splice(w,1);const S=n.selectedList.findIndex(L=>L.id==k);S!==-1&&n.selectedList.splice(S,1)}),n.indeterminate=!1;r(n.checkboxIds)},v=M=>{n.radioId=M,n.list.forEach(I=>{if(n.radioId===I.id)n.selectedList.findIndex(w=>w.id==I.id)===-1&&n.selectedList.push(I);else{const k=n.selectedList.findIndex(w=>w.id==I.id);k>=0&&n.selectedList.splice(k,1)}})},_=M=>{let I="";switch(M){case"Admin":I="管理员";break;case"Owner":I="群主";break}return I};return{...Yt(n),optional:o,handleInput:i,selected:s,selectedAll:u,submit:d,cancel:f,onUpdateChecked:g,onCheckStudents:r,onRadioStudents:v,formatJobType:_}}}),dd=""+new URL("nomore-9da703ae.png",import.meta.url).href;const iT=e=>(pr("data-v-4a8e0033"),e=e(),hr(),e),Ej={key:0,class:"transfer-h5-header"},Aj={class:"title"},Lj={key:1,class:"transfer-header"},Oj={class:"title"},Rj={class:"main"},Nj={class:"left"},Pj={key:0},xj={class:"sectionSearch"},Uj=iT(()=>G("span",{class:"icon-search-input"},null,-1)),Fj={key:1,class:"checkboxAll"},$j={class:"{styles.nums}"},Gj={key:0,class:"user-item"},Bj=["src"],Hj={class:"name"},qj={key:0},Vj={key:1,class:"roleType"},zj={key:0,class:"user-item"},jj=["src"],Wj={class:"name"},Kj={key:0},Yj={key:1,class:"roleType"},Jj={key:2,class:"theEmtpy",style:{height:"90%"}},Xj=iT(()=>G("img",{class:"emptyImg",src:dd},null,-1)),Zj=iT(()=>G("p",null,"暂无数据",-1)),Qj=[Xj,Zj],eW={class:"right"},tW={key:0,class:"selectAll"},nW={class:"list"},rW=["src"],oW={key:0},iW=["onClick"];function sW(e,t,n,r,o,i){const s=xt("n-input"),u=xt("n-checkbox"),d=xt("n-checkbox-group"),f=xt("n-radio"),g=xt("n-radio-group");return J(),oe("div",{class:lt(["transfer",[e.isH5?"transfer-h5":""]])},[e.isH5?(J(),oe("header",Ej,[G("i",{class:"icon icon-back",onClick:t[0]||(t[0]=(...v)=>e.cancel&&e.cancel(...v))}),G("span",Aj,De(e.title),1)])):(J(),oe("header",Lj,[G("span",Oj,De(e.title),1),G("i",{class:"icon icon-back2",style:{cursor:"pointer"},onClick:t[1]||(t[1]=(...v)=>e.cancel&&e.cancel(...v))})])),G("main",Rj,[G("div",Nj,[e.isSearch?(J(),oe("header",Pj,[G("div",xj,[It(s,{class:"TheSearch",style:{"--n-border-radius":"5px","--n-font-size":"14px","--n-height":"34px","--n-caret-color":"#198cfe","--n-border-hover":"1px solid #198cfe","--n-border-focus":"1px solid #198cfe","--n-loading-color":"#198cfe","--n-box-shadow-focus":"0 0 0 2px rgba(25 140 254, 0.2)"},value:e.keyword,"onUpdate:value":t[2]||(t[2]=v=>e.keyword=v),clearable:"",placeholder:"请输入关键字",onClear:t[3]||(t[3]=()=>{e.keyword="",e.handleInput()}),onKeyup:gr(e.handleInput,["enter"]),enterkeyhint:"search"},{prefix:Ct(()=>[Uj]),_:1},8,["value","onKeyup"])])])):Ie("",!0),e.isRadio?Ie("",!0):(J(),oe("div",Fj,[It(u,{style:{"--n-color-checked":"#198cfe","--n-border-checked":"1px solid #198cfe","--n-border-focus":"1px solid #198cfe","--n-box-shadow-focus":"0 0 0 2px rgba(25, 140, 254, 0.3)","--n-border-radius":"3px"},checked:e.checkAllStatus,"onUpdate:checked":t[4]||(t[4]=v=>e.checkAllStatus=v),indeterminate:e.indeterminate,"on-update:checked":e.onUpdateChecked},null,8,["checked","indeterminate","on-update:checked"]),G("p",null,[mr(" 全选 "),G("span",$j,"("+De(e.list.length)+"):",1)])])),G("main",null,[e.isRadio?Ie("",!0):(J(),_t(d,{key:0,class:"checkboxGroup",value:e.checkboxIds,"onUpdate:value":t[5]||(t[5]=v=>e.checkboxIds=v),"on-update:value":e.onCheckStudents},{default:Ct(()=>[(J(!0),oe(ft,null,zt(e.list,(v,_)=>(J(),_t(u,{style:{"--n-color-checked":"#198cfe","--n-border-checked":"1px solid #198cfe","--n-border-focus":"1px solid #198cfe","--n-box-shadow-focus":"0 0 0 2px rgba(25, 140, 254, 0.3)","--n-border-radius":"3px"},key:_,disabled:v==null?void 0:v.isDisabled,value:v.id},{default:Ct(()=>[e.isCustomItem?Ft(e.$slots,"left",{key:1,data:v},void 0,!0):(J(),oe("div",Gj,[G("img",{class:"avatar",src:(v==null?void 0:v.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,Bj),G("span",Hj,De((v==null?void 0:v.nick)||(v==null?void 0:v.userID)),1),v!=null&&v.isDisabled?(J(),oe("span",qj,"("+De(e.$t("component.已在群聊中"))+")",1)):Ie("",!0),e.formatJobType(v.groupRoleType)?(J(),oe("span",Vj,De(e.formatJobType(v.groupRoleType)),1)):Ie("",!0)]))]),_:2},1032,["disabled","value"]))),128))]),_:3},8,["value","on-update:value"])),e.isRadio?(J(),_t(g,{key:1,class:"checkboxGroup",value:e.radioId,"onUpdate:value":t[6]||(t[6]=v=>e.radioId=v),"on-update:value":e.onRadioStudents},{default:Ct(()=>[(J(!0),oe(ft,null,zt(e.list,(v,_)=>(J(),_t(f,{style:{"--n-dot-color-active":"#198cfe","--n-box-shadow-active":"inset 0 0 0 1px #198cfe","--n-box-shadow-hover":"inset 0 0 0 1px #198cfe","--n-box-shadow-focus":"inset 0 0 0 1px #198cfe, 0 0 0 2px rgba(25, 140, 254, 0.2)"},key:_,disabled:v==null?void 0:v.isDisabled,value:v.id},{default:Ct(()=>[e.isCustomItem?Ft(e.$slots,"left",{key:1,data:v},void 0,!0):(J(),oe("div",zj,[G("img",{class:"avatar",src:(v==null?void 0:v.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,jj),G("span",Wj,De((v==null?void 0:v.nick)||(v==null?void 0:v.userID)),1),v!=null&&v.isDisabled?(J(),oe("span",Kj,"("+De(e.$t("component.已在群聊中"))+")",1)):Ie("",!0),e.formatJobType(v.groupRoleType)?(J(),oe("span",Yj,De(e.formatJobType(v.groupRoleType)),1)):Ie("",!0)]))]),_:2},1032,["disabled","value"]))),128))]),_:3},8,["value","on-update:value"])):Ie("",!0),e.optional.length<=0?(J(),oe("div",Jj,Qj)):Ie("",!0)])]),G("div",eW,[e.isH5?Ie("",!0):(J(),oe("p",tW,[mr(" 当前选中"),G("span",null,"("+De(e.selectedList.length)+"):",1)])),Bn(G("ul",nW,[(J(!0),oe(ft,null,zt(e.selectedList,(v,_)=>(J(),oe("li",{class:"list-item space-between",key:_},[G("aside",null,[e.isCustomItem?Ft(e.$slots,"right",{key:1,data:v},void 0,!0):(J(),oe(ft,{key:0},[G("img",{class:"avatar",src:(v==null?void 0:v.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,rW),e.isH5?Ie("",!0):(J(),oe("span",oW,De(v.nick||v.userID),1))],64))]),e.isH5?Ie("",!0):(J(),oe("i",{key:0,class:"icon icon-back2",onClick:M=>e.selected(v)},null,8,iW))]))),128))],512),[[to,e.resultShow]]),G("footer",null,[G("button",{class:"btn btn-cancel",onClick:t[7]||(t[7]=(...v)=>e.cancel&&e.cancel(...v))},De(e.$t("component.取消")),1),e.selectedList.length>0?(J(),oe("button",{key:0,class:"btn",onClick:t[8]||(t[8]=(...v)=>e.submit&&e.submit(...v))},De(e.$t("component.完成")),1)):(J(),oe("button",{key:1,class:"btn btn-no",onClick:t[9]||(t[9]=(...v)=>e.submit&&e.submit(...v))},De(e.$t("component.完成")),1))])])])],2)}const sT=Kt(Dj,[["render",sW],["__scopeId","data-v-4a8e0033"]]),aW=it({props:{open:{type:Boolean,default:()=>!1}},setup(e,t){const n=Wt({open:!1});nn(()=>{n.open=e.open});const r=()=>{n.open=!n.open,t.emit("change",n.open)};return{...Yt(n),toggle:r}}});const lW=e=>(pr("data-v-78bf8e7a"),e=e(),hr(),e),uW=lW(()=>G("span",{class:"slider-block"},null,-1)),cW=[uW];function dW(e,t,n,r,o,i){return J(),oe("div",{class:lt(["slider-box",[e.open&&"slider-open"]]),onClick:t[0]||(t[0]=(...s)=>e.toggle&&e.toggle(...s))},cW,2)}const aT=Kt(aW,[["render",dW],["__scopeId","data-v-78bf8e7a"]]),fW=it({props:{data:{type:Object,default:()=>({})},isAuth:{type:Boolean,default:!1},isH5:{type:Boolean,default:!1}},setup(e,t){const n=Wt({groupProfile:{},input:"",isEdit:!1});nn(()=>{n.groupProfile=e.data});const r=Ne();xa(r,()=>{n.isEdit=!1});const o=async()=>{n.input&&n.input!==n.groupProfile.name&&(t.emit("update",{key:"name",value:n.input}),n.groupProfile.name=n.input,n.input=""),i()},i=async()=>{e.isAuth&&(n.isEdit=!n.isEdit),n.isEdit&&(n.input=n.groupProfile.name)};return{...Yt(n),updateProfile:o,toggleEdit:i,dialog:r}}});const pW={class:"name"},hW={key:0,class:"edit-h5-header"},gW={class:"left"},mW={class:"input-box"},vW={key:1},yW={key:1,class:"edit-h5-footer"},_W=["disabled"],bW={key:1};function MW(e,t,n,r,o,i){return J(),oe("div",pW,[G("label",null,De(e.$t("TUIChat.manage.群名称")),1),e.isEdit?(J(),oe("div",{key:0,class:lt([e.isH5?"edit-h5":""]),ref:"dialog"},[G("main",null,[e.isH5?(J(),oe("header",hW,[G("aside",gW,[G("h1",null,De(e.$t("TUIChat.manage.修改群聊名称")),1),G("span",null,De(e.$t("TUIChat.manage.修改群聊名称后,将在群内通知其他成员")),1)]),G("span",{class:"close",onClick:t[0]||(t[0]=(...s)=>e.toggleEdit&&e.toggleEdit(...s))},De(e.$t("关闭")),1)])):Ie("",!0),G("div",mW,[e.isEdit?Bn((J(),oe("input",{key:0,class:"input","onUpdate:modelValue":t[1]||(t[1]=s=>e.input=s),type:"text",onKeyup:t[2]||(t[2]=gr((...s)=>e.updateProfile&&e.updateProfile(...s),["enter"]))},null,544)),[[pl,e.input]]):Ie("",!0),e.isH5?(J(),oe("span",vW,De(e.$t("TUIChat.manage.仅限中文、字母、数字和下划线,2-20个字")),1)):Ie("",!0)]),e.isH5?(J(),oe("footer",yW,[G("button",{class:"btn",disabled:!e.input,onClick:t[3]||(t[3]=(...s)=>e.updateProfile&&e.updateProfile(...s))},De(e.$t("确认")),9,_W)])):Ie("",!0)])],2)):Ie("",!0),!e.isEdit||e.isH5?(J(),oe("p",bW,[G("span",null,De(e.groupProfile.name),1)])):Ie("",!0)])}const IW=Kt(fW,[["render",MW],["__scopeId","data-v-3e317bf2"]]),CW=it({components:{Slider:aT},props:{data:{type:Object,default:()=>({})},isAuth:{type:Boolean,default:!1}},setup(e,t){const n=Wt({groupProfile:{},total:0,id:"",title:"",input:"",topFlag:!0,loading:!1,groupList:[],isEdit:!1,page:1,rows:20}),r=Ne(),o=async()=>{n.loading=!0;try{let v=await OV({groupId:n.groupProfile.groupID,page:n.page,rows:n.rows});const _=v.data.rows||[];n.total=v.data.total||0,_.length>0&&(n.groupList=[...n.groupList,..._])}catch{}n.loading=!1},i=()=>{n.page=n.page+1,o()};nn(()=>{n.groupProfile=e.data,o()});const s=v=>({TEACHER:"音乐老师",ADMIN:"管理员",HEADMASTER:"校长"})[v],u=async(v,_,M)=>{var I;try{_==="edit"?(t.emit("changeStatus","edit"),n.isEdit=!0,n.title=v.title,n.input=v.content,n.topFlag=v.topFlag,n.id=v.id):_==="top"?(await Hv({groupId:n.groupProfile.groupID,topFlag:!v.topFlag,id:v.id}),n.page=1,n.groupList=[],o(),pi({message:v.topFlag?"取消置顶成功":"设为置顶成功",isH5:!1,type:"success"})):_==="delete"?(await G5({id:v.id}),n.page=1,n.groupList=[],pi({message:"删除成功",isH5:!1,type:"success"}),o()):_==="add"&&(n.isEdit=!0,n.title="",n.input="",n.topFlag=!0,n.id="",t.emit("changeStatus","add"))}catch(k){pi({message:k.message,isH5:!1,type:"error"})}(I=r.value[M])==null||I.setShow(!1)},d=async()=>{if(!(!n.title||!n.input))try{n.id?await Hv({groupId:n.groupProfile.groupID,topFlag:n.topFlag,title:n.title,content:n.input,id:n.id}):await $5({groupId:n.groupProfile.groupID,title:n.title,content:n.input,topFlag:n.topFlag}),pi({message:"发布成功",isH5:!1,type:"success"}),n.isEdit=!1,t.emit("changeStatus","submit"),n.page=1,n.groupList=[],o()}catch(v){pi({message:v.message,isH5:!1,type:"error"})}},f=v=>{console.log(v,"onTopFlag"),n.topFlag=v},g=()=>{n.isEdit=!1};return t.expose({onCloseEdit:g}),{...Yt(n),popoverRef:r,formatJobType:s,onMore:i,onTopFlag:f,onOperation:u,onSubmit:d}}});const Yf=e=>(pr("data-v-152ec0a1"),e=e(),hr(),e),TW={class:"section"},wW={class:"userInfo"},SW=["src"],kW={class:"username"},DW={class:"users"},EW={class:"name"},AW={class:"tag"},LW={class:"userTime"},OW={class:"time"},RW={key:0,class:"tag"},NW=Yf(()=>G("span",{class:"iconMore"},[G("i",{class:"iconMorePoint"})],-1)),PW={class:"p-list"},xW=["onClick"],UW=["onClick"],FW=["onClick"],$W={class:"section-content"},GW={class:"content"},BW={key:0,class:"theEmpty"},HW=Yf(()=>G("img",{class:"emptyImg",src:dd},null,-1)),qW=Yf(()=>G("p",null,"暂无群公告",-1)),VW={key:2,class:"edit-notification"},zW={class:"input-section"},jW=Yf(()=>G("div",{class:"input-title"},[G("i",{class:"iconNotifit1"}),G("span",null,"公告标题")],-1)),WW={class:"input-content"},KW={class:"input-section"},YW=Yf(()=>G("div",{class:"input-title"},[G("i",{class:"iconNotifit2"}),G("span",null,"公告内容")],-1)),JW={class:"input-content notice-content"},XW={class:"input-section"},ZW={class:"input-title input-slider"},QW=Yf(()=>G("span",null,"设为置顶",-1));function eK(e,t,n,r,o,i){const s=xt("n-popover"),u=xt("n-button"),d=xt("n-tooltip"),f=xt("n-input"),g=xt("Slider");return J(),oe("main",{class:lt(["notification",e.isEdit?"overflowHidden":""])},[G("div",TW,[(J(!0),oe(ft,null,zt(e.groupList,(v,_)=>(J(),oe("div",{class:"section-item",key:_},[G("div",wW,[G("img",{class:"img",src:v.avatar},null,8,SW),G("div",kW,[G("div",DW,[G("span",EW,De(v.username),1),G("span",AW,De(e.formatJobType(v.jobType)),1)]),G("div",LW,[G("span",OW,De(v.updateTime),1),v.topFlag?(J(),oe("span",RW,"置顶")):Ie("",!0)])]),e.isAuth?(J(),_t(s,{key:0,trigger:"hover",ref_for:!0,ref:"popoverRef",to:!1,placement:"bottom-end",width:"160px","show-arrow":!1,class:"popoverContainer"},{trigger:Ct(()=>[NW]),default:Ct(()=>[G("div",PW,[G("div",{class:"p-item",onClick:M=>e.onOperation(v,"edit",_)}," 编辑公告 ",8,xW),G("div",{class:"p-item",onClick:M=>e.onOperation(v,"top",_)},De(v.topFlag?"取消置顶":"设为置顶"),9,UW),G("div",{class:"p-item p-red",onClick:M=>e.onOperation(v,"delete",_)}," 删除公告 ",8,FW)])]),_:2},1536)):Ie("",!0)]),G("div",$W,[G("h2",null,De(v.title),1),G("div",GW,De(v.content),1)])]))),128)),e.groupList.lengthe.onMore&&e.onMore(...v))}," 查看更多 ")):Ie("",!0)]),!e.loading&&e.groupList.length<=0?(J(),oe("div",BW,[HW,qW,It(u,{round:"",type:"info",class:"notificationBtn",onClick:t[1]||(t[1]=v=>e.onOperation({},"add"))},{default:Ct(()=>[mr("发布公告")]),_:1})])):Ie("",!0),e.groupList.length>0&&!e.isEdit?(J(),_t(d,{key:1,trigger:"hover","show-arrow":!1,class:"toolsNotifi"},{trigger:Ct(()=>[G("div",{class:"iconNotifiAdd",onClick:t[2]||(t[2]=v=>e.onOperation({},"add"))})]),default:Ct(()=>[mr(" 发布公告 ")]),_:1})):Ie("",!0),e.isEdit?(J(),oe("div",VW,[G("div",zW,[jW,G("div",WW,[It(f,{value:e.title,"onUpdate:value":t[3]||(t[3]=v=>e.title=v),style:{"--n-caret-color":"#198cfe","--n-border-hover":"1px solid #198cfe","--n-border-focus":"1px solid #198cfe","--n-loading-color":"#198cfe","--n-box-shadow-focus":"0 0 0 2px rgba(25 140 254, 0.2)"},type:"textarea",placeholder:"请输入公告标题","show-count":"",maxlength:50},null,8,["value"])])]),G("div",KW,[YW,G("div",JW,[It(f,{value:e.input,"onUpdate:value":t[4]||(t[4]=v=>e.input=v),style:{"--n-caret-color":"#198cfe","--n-border-hover":"1px solid #198cfe","--n-border-focus":"1px solid #198cfe","--n-loading-color":"#198cfe","--n-box-shadow-focus":"0 0 0 2px rgba(25 140 254, 0.2)"},type:"textarea",placeholder:"请输入公告内容",rows:10,"show-count":"",maxlength:200},null,8,["value"])])]),G("div",XW,[G("div",ZW,[QW,It(g,{open:e.topFlag,onChange:e.onTopFlag},null,8,["open","onChange"])])]),G("div",{class:lt(["submitBtn",!e.title||!e.input?"disabled":""]),onClick:t[5]||(t[5]=(...v)=>e.onSubmit&&e.onSubmit(...v))}," 发布 ",2)])):Ie("",!0)],2)}const tK=Kt(CW,[["render",eK],["__scopeId","data-v-152ec0a1"]]),nK=it({components:{Slider:aT},props:{data:{type:Object,default:()=>({})},isAuth:{type:Boolean,default:!1},noticeId:{type:String,default:""}},setup(e,t){const n=Wt({groupProfile:{},id:"",title:"",input:"",topFlag:!0,loading:!1,groupDetail:{},isEdit:!1}),r=Ne(),o=async()=>{n.loading=!0;try{let v=await B5(n.id);n.groupDetail=v.data||{}}catch{}n.loading=!1},i=()=>{n.page=n.page+1,o()};nn(()=>{n.groupProfile=e.data,n.id=e.noticeId,console.log(e),o()});const s=v=>({TEACHER:"音乐老师",ADMIN:"管理员",HEADMASTER:"校长"})[v],u=async(v,_)=>{var M;try{_==="edit"?(t.emit("changeStatus","editDetail"),n.isEdit=!0,n.title=v.title,n.input=v.content,n.topFlag=v.topFlag,n.id=v.id):_==="top"?(await Hv({groupId:n.groupProfile.groupID,topFlag:!v.topFlag,id:v.id}),o(),pi({message:v.topFlag?"取消置顶成功":"设为置顶成功",isH5:!1,type:"success"})):_==="delete"?(await G5({id:v.id}),pi({message:"删除成功",isH5:!1,type:"success"}),t.emit("changeStatus","deleteDetail")):_==="add"&&(n.isEdit=!0,n.title="",n.input="",n.topFlag=!0,n.id="",t.emit("changeStatus","addDetail"))}catch(I){pi({message:I.message,isH5:!1,type:"error"})}(M=r.value)==null||M.setShow(!1)},d=async()=>{if(!(!n.title||!n.input))try{n.id?await Hv({groupId:n.groupProfile.groupID,topFlag:n.topFlag,title:n.title,content:n.input,id:n.id}):await $5({groupId:n.groupProfile.groupID,title:n.title,content:n.input,topFlag:n.topFlag}),pi({message:"发布成功",isH5:!1,type:"success"}),n.isEdit=!1,t.emit("changeStatus","submitDetail"),n.page=1,n.groupDetail=[],o()}catch(v){pi({message:v.message,isH5:!1,type:"error"})}},f=v=>{console.log(v,"onTopFlag"),n.topFlag=v},g=()=>{n.isEdit=!1};return t.expose({onCloseEdit:g}),{...Yt(n),popoverRef:r,formatJobType:s,onMore:i,onTopFlag:f,onOperation:u,onSubmit:d}}});const Xy=e=>(pr("data-v-57586ac1"),e=e(),hr(),e),rK={key:0,class:"section"},oK={class:"section-item"},iK={class:"userInfo"},sK=["src"],aK={class:"username"},lK={class:"users"},uK={class:"name"},cK={class:"tag"},dK={class:"userTime"},fK={class:"time"},pK={key:0,class:"tag"},hK=Xy(()=>G("span",{class:"iconMore"},[G("i",{class:"iconMorePoint"})],-1)),gK={class:"p-list"},mK={class:"section-content"},vK={class:"content"},yK={key:2,class:"edit-notification"},_K={class:"input-section"},bK=Xy(()=>G("div",{class:"input-title"},[G("i",{class:"iconNotifit1"}),G("span",null,"公告标题")],-1)),MK={class:"input-content"},IK={class:"input-section"},CK=Xy(()=>G("div",{class:"input-title"},[G("i",{class:"iconNotifit2"}),G("span",null,"公告内容")],-1)),TK={class:"input-content notice-content"},wK={class:"input-section"},SK={class:"input-title input-slider"},kK=Xy(()=>G("span",null,"设为置顶",-1));function DK(e,t,n,r,o,i){var g;const s=xt("n-popover"),u=xt("n-tooltip"),d=xt("n-input"),f=xt("Slider");return J(),oe("main",{class:lt(["notification",e.isEdit?"overflowHidden":""])},[(g=e.groupDetail)!=null&&g.id?(J(),oe("div",rK,[G("div",oK,[G("div",iK,[G("img",{class:"img",src:e.groupDetail.avatar},null,8,sK),G("div",aK,[G("div",lK,[G("span",uK,De(e.groupDetail.username),1),G("span",cK,De(e.formatJobType(e.groupDetail.jobType)),1)]),G("div",dK,[G("span",fK,De(e.groupDetail.createTime),1),e.groupDetail.topFlag?(J(),oe("span",pK,"置顶")):Ie("",!0)])]),e.isAuth?(J(),_t(s,{key:0,trigger:"hover",ref:"popoverRef",to:!1,placement:"bottom-end",width:"160px","show-arrow":!1,class:"popoverContainer"},{trigger:Ct(()=>[hK]),default:Ct(()=>[G("div",gK,[G("div",{class:"p-item",onClick:t[0]||(t[0]=v=>e.onOperation(e.groupDetail,"edit"))}," 编辑公告 "),G("div",{class:"p-item",onClick:t[1]||(t[1]=v=>e.onOperation(e.groupDetail,"top"))},De(e.groupDetail.topFlag?"取消置顶":"设为置顶"),1),G("div",{class:"p-item p-red",onClick:t[2]||(t[2]=v=>e.onOperation(e.groupDetail,"delete"))}," 删除公告 ")])]),_:1},512)):Ie("",!0)]),G("div",mK,[G("h2",null,De(e.groupDetail.title),1),G("div",vK,De(e.groupDetail.content),1)])])])):Ie("",!0),e.groupDetail.length>0&&!e.isEdit?(J(),_t(u,{key:1,trigger:"hover","show-arrow":!1,class:"toolsNotifi"},{trigger:Ct(()=>[G("div",{class:"iconNotifiAdd",onClick:t[3]||(t[3]=v=>e.onOperation({},"add"))})]),default:Ct(()=>[mr(" 发布公告 ")]),_:1})):Ie("",!0),e.isEdit?(J(),oe("div",yK,[G("div",_K,[bK,G("div",MK,[It(d,{value:e.title,"onUpdate:value":t[4]||(t[4]=v=>e.title=v),style:{"--n-caret-color":"#198cfe","--n-border-hover":"1px solid #198cfe","--n-border-focus":"1px solid #198cfe","--n-loading-color":"#198cfe","--n-box-shadow-focus":"0 0 0 2px rgba(25 140 254, 0.2)"},type:"textarea",placeholder:"请输入公告标题","show-count":"",maxlength:50},null,8,["value"])])]),G("div",IK,[CK,G("div",TK,[It(d,{value:e.input,"onUpdate:value":t[5]||(t[5]=v=>e.input=v),style:{"--n-caret-color":"#198cfe","--n-border-hover":"1px solid #198cfe","--n-border-focus":"1px solid #198cfe","--n-loading-color":"#198cfe","--n-box-shadow-focus":"0 0 0 2px rgba(25 140 254, 0.2)"},type:"textarea",placeholder:"请输入公告内容",rows:10,"show-count":"",maxlength:200},null,8,["value"])])]),G("div",wK,[G("div",SK,[kK,It(f,{open:e.topFlag,onChange:e.onTopFlag},null,8,["open","onChange"])])]),G("div",{class:lt(["submitBtn",!e.title||!e.input?"disabled":""]),onClick:t[6]||(t[6]=(...v)=>e.onSubmit&&e.onSubmit(...v))}," 发布 ",2)])):Ie("",!0)],2)}const EK=Kt(nK,[["render",DK],["__scopeId","data-v-57586ac1"]]),AK=it({components:{},props:{list:{type:Array,default:()=>[]},total:{type:Number,default:()=>0},isShowDel:{type:Boolean,default:()=>!1},self:{type:Object,default:()=>({})}},setup(e,t){yt.TYPES;const n=Wt({total:0,list:[],isShowDel:!1,self:{}});nn(()=>{n.total=e.total,n.isShowDel=e.isShowDel,n.list=e.list,n.self=e.self});const r=d=>{const{t:f}=window.TUIKitTUICore.config.i18n.useI18n();let g="";return d.imUserId===n.self.userID&&(g+=` (${f("TUIChat.manage.我")})`),g},o=d=>({TEACHER:"音乐老师",ADMIN:"管理员",HEADMASTER:"校长"})[d],i=()=>{t.emit("more")},s=d=>{t.emit("del",[d])},u=d=>{t.emit("handleMemberProfileShow",d)};return{...Yt(n),getMore:i,submit:s,handleRoleName:r,formatJobType:o,handleMemberProfileShow:u}}});const LK={class:"member"},OK={class:"list"},RK={class:"avatarSection"},NK=["src"],PK={key:0,class:"jobType"},xK={key:1,class:lt(["jobType","Owner"])},UK={class:"name"},FK={key:0,class:"roleType"},$K={style:{color:"#777777"}},GK=["onClick"];function BK(e,t,n,r,o,i){return J(),oe("main",LK,[G("ul",OK,[(J(!0),oe(ft,null,zt(e.list,(s,u)=>(J(),oe("li",{class:"list-item",key:u},[G("aside",null,[G("div",RK,[G("img",{class:"avatar",src:(s==null?void 0:s.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,NK),(s==null?void 0:s.groupRoleType)==="Admin"?(J(),oe("span",PK,De((s==null?void 0:s.groupRoleType)==="Admin"?"管理员":""),1)):Ie("",!0),(s==null?void 0:s.groupRoleType)==="Owner"?(J(),oe("span",xK,De((s==null?void 0:s.groupRoleType)==="Owner"?"群主":""),1)):Ie("",!0)]),G("span",UK,[mr(De((s==null?void 0:s.nickname)||(s==null?void 0:s.userID))+" ",1),s!=null&&s.teacherJobType?(J(),oe("span",FK,De(e.formatJobType(s.teacherJobType)),1)):Ie("",!0)]),G("span",$K,De(e.handleRoleName(s)),1)]),s.role!=="Owner"&&e.isShowDel?(J(),oe("i",{key:0,class:"icon icon-del",onClick:d=>e.submit(s)},null,8,GK)):Ie("",!0)]))),128)),e.list.lengthe.getMore&&e.getMore(...s))},De(e.$t("TUIChat.manage.查看更多")),1)):Ie("",!0)])])}const HK=Kt(AK,[["render",BK],["__scopeId","data-v-fad3623f"]]),qK=it({props:{userInfo:{type:Object,default:()=>({})}},setup(e,t){const n=hl==null?void 0:hl.TUIServer,r=Wt({isFriendShip:!1,userInfo:{},self:{}});nn(()=>{r.self=e.self}),Bt(()=>e.userInfo,async(u,d)=>{var g;if(u===d)return;const f=await n.getUserProfile([(g=e==null?void 0:e.userInfo)==null?void 0:g.userID]);r.userInfo=f==null?void 0:f.data[0],i()},{deep:!0,immediate:!0});const o=async(u,d)=>{const f=`${d}${u}`;n.TUICore.TUIServer.TUIConversation.getConversationProfile(f).then(g=>{n.TUICore.TUIServer.TUIConversation.handleCurrentConversation(g.data.conversation)})},i=async()=>{if(!r.userInfo.userID)return;const u=await n.checkFriend(r.userInfo.userID,yt.TYPES.SNS_CHECK_TYPE_BOTH);r.isFriendShip=u===yt.TYPES.SNS_TYPE_BOTH_WAY},s=()=>{var u;return r.isFriendShip||!((u=n==null?void 0:n.TUICore)!=null&&u.isOfficial)};return{...Yt(r),enter:o,showEnter:s}}});const VK=e=>(pr("data-v-08062804"),e=e(),hr(),e),zK={class:"memeber-profile"},jK={class:"memeber-profile-main"},WK=["src"],KK={class:"list"},YK=VK(()=>G("label",null,"ID:",-1)),JK={class:"memeber-profile-footer"};function XK(e,t,n,r,o,i){var s,u,d,f,g;return J(),oe("div",zK,[G("div",jK,[G("img",{class:"avatar",src:((s=e.userInfo)==null?void 0:s.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,WK),G("ul",KK,[G("h1",null,De(((u=e.userInfo)==null?void 0:u.nick)||((d=e.userInfo)==null?void 0:d.userID)),1),G("li",null,[YK,G("span",null,De((f=e.userInfo)==null?void 0:f.userID),1)]),G("li",null,[G("label",null,De(e.$t("TUIContact.个性签名"))+":",1),G("span",null,De((g=e.userInfo)==null?void 0:g.selfSignature),1)])])]),G("div",JK,[e.showEnter()?(J(),oe("div",{key:0,class:"button",onClick:t[0]||(t[0]=v=>{var _;return e.enter((_=e.userInfo)==null?void 0:_.userID,"C2C")})},De(e.$t("TUIContact.发送消息")),1)):Ie("",!0)])])}const ZK=Kt(qK,[["render",XK],["__scopeId","data-v-08062804"]]),QK=it({components:{},props:{list:{type:Array,default:()=>[]},currentModel:{type:String,default:""},muteLoading:{type:Boolean,default:!1},total:{type:Number,default:0},conversation:{type:Object,default:()=>({})},isShowDel:{type:Boolean,default:()=>!1},self:{type:Object,default:()=>({})}},setup(e,t){yt.TYPES;const n=Wt({conversation:{},currentModel:"",total:0,muteLoading:!1,list:[],page:1,isShowDel:!1,self:{},keyword:"",showMore:!1,selectList:[],isSelectAll:!1});nn(()=>{n.currentModel!==e.currentModel&&(n.selectList=[]),n.conversation=e.conversation,n.muteLoading=e.muteLoading,n.total=e.total,n.isShowDel=e.isShowDel,n.list=e.list,n.self=e.self,n.currentModel=e.currentModel,n.selectList=[],n.isSelectAll=!1});const r=M=>{const{t:I}=window.TUIKitTUICore.config.i18n.useI18n();let k="";switch(console.log(M,n.self,"self"),M==null?void 0:M.groupRoleType){case"Admin":k=I("TUIChat.manage.管理员");break;case"Owner":k=I("TUIChat.manage.群主");break}return k&&(k=`(${k})`),M.imUserId===n.self.userID&&(k+=` (${I("TUIChat.manage.我")})`),k},o=async M=>{var I,k;try{if(n.selectList.length<=0)return;const w=n.selectList.map(S=>S.userId);await xV({groupId:(k=(I=n.conversation)==null?void 0:I.groupProfile)==null?void 0:k.groupID,muteTime:-1,groupMute:n.currentModel==="not_mute",userIds:w}),f()}catch{}},i=M=>{const I=n.selectList.findIndex(k=>k.userId===M.userId);I===-1?n.selectList.push(M):n.selectList.splice(I,1),n.isSelectAll=n.list.length===n.selectList.length},s=M=>n.selectList.findIndex(k=>k.userId===M.userId)!==-1,u=M=>{n.list.length===n.selectList.length?(n.selectList=[],n.isSelectAll=!1):(n.selectList=[...n.list],n.isSelectAll=!0)},d=M=>{t.emit("handleMemberProfileShow",M)},f=()=>{t.emit("back")},g=M=>{t.emit("search",n.keyword)},v=Yy(M=>{g()},500),_=M=>{M.stopPropagation(),M.code==="Enter"&&v(n.keyword)};return{...Yt(n),submit:o,isSelect:s,debouncedRequest:v,onKeyup:_,onSearch:g,onSelectItem:i,onSelectAll:u,handleRoleName:r,handleMemberProfileShow:d}}});const Jf=e=>(pr("data-v-5f96a6e6"),e=e(),hr(),e),eY={class:"member"},tY={class:"sectionSearch"},nY=Jf(()=>G("span",{class:"icon-search-input"},null,-1)),rY={class:"list"},oY=["onClick"],iY=["src"],sY={class:"name"},aY={key:0,class:"theEmpty",style:{height:"75%"}},lY=Jf(()=>G("img",{class:"emptyImg",src:dd},null,-1)),uY=Jf(()=>G("p",null,"暂无数据",-1)),cY=[lY,uY],dY={class:"footer"},fY={class:"userInfo"},pY=["src"],hY={key:0,class:"maskMute"},gY={class:"selectHeader"},mY={class:"title"},vY={class:"selectContainer"},yY=["onClick"],_Y=["src"],bY={class:"name"},MY=Jf(()=>G("i",{class:"icon icon-remove"},null,-1)),IY={key:0,class:"theEmpty",style:{"margin-top":"20px","margin-bottom":"0"}},CY=Jf(()=>G("img",{class:"emptyImg",src:dd},null,-1)),TY=Jf(()=>G("p",null,"暂无数据",-1)),wY=[CY,TY];function SY(e,t,n,r,o,i){const s=xt("n-button"),u=xt("n-input"),d=xt("n-spin"),f=xt("n-scrollbar");return J(),_t(f,{class:"member-section"},{default:Ct(()=>[G("main",eY,[It(d,{show:e.muteLoading,stroke:"#198CFE"},{default:Ct(()=>[G("div",tY,[It(u,{class:"TheSearch noBorder",style:{"--n-font-size":"12px","--n-height":"35px","--n-caret-color":"#198cfe","--n-border-hover":"1px solid #198cfe","--n-border-focus":"1px solid #198cfe","--n-loading-color":"#198cfe","--n-box-shadow-focus":"0 0 0 2px rgba(25 140 254, 0.2)"},round:"",clearable:"",placeholder:"请输入群成员名称",value:e.keyword,"onUpdate:value":t[1]||(t[1]=g=>e.keyword=g),onKeyup:e.onKeyup},{prefix:Ct(()=>[nY]),suffix:Ct(()=>[It(s,{onClick:t[0]||(t[0]=g=>e.debouncedRequest("")),round:"",color:"#198cfe"},{default:Ct(()=>[mr("搜索")]),_:1})]),_:1},8,["value","onKeyup"])]),G("ul",rY,[(J(!0),oe(ft,null,zt(e.list,(g,v)=>(J(),oe("li",{class:"list-item",key:v,onClick:_=>e.onSelectItem(g)},[G("aside",null,[G("i",{class:lt(["icon",e.isSelect(g)?"icon-selected":"icon-unselected"])},null,2),G("img",{class:"avatar",src:(g==null?void 0:g.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,iY),G("span",sY,De((g==null?void 0:g.nickname)||(g==null?void 0:g.userID)),1)])],8,oY))),128)),e.list.length0&&!e.muteLoading?(J(),oe("li",{key:0,class:"list-item",onClick:t[2]||(t[2]=(...g)=>e.getMore&&e.getMore(...g))},De(e.$t("TUIChat.manage.查看更多")),1)):Ie("",!0)]),!e.muteLoading&&e.list.length<=0?(J(),oe("div",aY,cY)):Ie("",!0)]),_:1},8,["show"])]),G("div",dY,[G("div",{class:"selectUser",onClick:t[3]||(t[3]=(...g)=>e.onSelectAll&&e.onSelectAll(...g))},[G("i",{class:lt(["icon",e.isSelectAll?"icon-selected":"icon-unselected"])},null,2),G("span",null,"全选(已选择"+De(e.selectList.length||0)+"):",1)]),G("div",fY,[G("div",{class:"userList",onClick:t[4]||(t[4]=g=>e.showMore=!0)},[(J(!0),oe(ft,null,zt(e.selectList,(g,v)=>(J(),oe("img",{class:"avatar",key:v,src:(g==null?void 0:g.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,pY))),128))]),G("span",{class:lt(["muteBtn",e.selectList.length<=0?"disabled":""]),onClick:t[5]||(t[5]=(...g)=>e.submit&&e.submit(...g))},De(e.currentModel==="not_mute"?"禁言":"解除禁言"),3)])]),e.showMore?(J(),oe("div",hY)):Ie("",!0),G("div",{class:lt(["selectListSection",e.showMore?"show":""])},[G("div",gY,[G("i",{class:"icon-close",onClick:t[6]||(t[6]=g=>e.showMore=!1)}),G("span",mY,"已选择 ("+De(e.selectList.length||0)+")",1),G("span",{class:lt(["sureBtn",e.selectList.length<=0?"disabled":""]),onClick:t[7]||(t[7]=g=>e.showMore=!1)},"确定",2)]),G("div",vY,[(J(!0),oe(ft,null,zt(e.selectList,(g,v)=>(J(),oe("div",{class:"list-item",key:v,onClick:_=>e.onSelectItem(g)},[G("aside",null,[G("img",{class:"avatar",src:(g==null?void 0:g.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,_Y),G("span",bY,De((g==null?void 0:g.nickname)||(g==null?void 0:g.userID)),1)]),MY],8,yY))),128)),e.selectList.length<=0?(J(),oe("div",IY,wY)):Ie("",!0)])],2)]),_:1})}const kY=Kt(QK,[["render",SY],["__scopeId","data-v-5f96a6e6"]]),DY=it({props:{show:{type:Boolean,default:()=>!1},isHeaderShow:{type:Boolean,default:()=>!0},isFooterShow:{type:Boolean,default:()=>!0},background:{type:Boolean,default:()=>!0},title:{type:String,default:()=>""},isH5:{type:Boolean,default:()=>!1},center:{type:Boolean,default:()=>!1},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确定"}},setup(e,t){const n=Wt({show:!1,isHeaderShow:!0,isFooterShow:!0,background:!0,title:""});nn(()=>{n.show=e.show,n.title=e.title,n.isHeaderShow=e.isHeaderShow,n.isFooterShow=e.isFooterShow,n.background=e.background});const r=()=>{n.show=!n.show,t.emit("update:show",n.show)},o=()=>{t.emit("submit"),r()};return{...Yt(n),toggleView:r,submit:o}}}),EY="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAABJZJREFUSEu1l3lsFFUcx7+/mT26u/SwF91tkbY09CBiE48az4pa1BKpbdpqoiiEfwhKQk3AtiCi7ZbDlkRBYhRqVIS2oWoCRArRiMYIQqwcPaKUKt2llG0trbvtHjPPzGx3uz3oTmmdZDIvM+/9Pu/93m9+7/sjAGp4Lxr39L5bnMNHPLIlWh+dNA/6qBwQ/wAjSgDHxcv9RdFCjHWBCb/A0dvksF252v/jVhvONwkA2IhN6eFry08Jpgn4OApPSKC44m+TELuggHj1MoBbBMAQ0Heyph0QLzHBfQQ9lw931z19BV1dEmgMdDw4cMUUbx4oEtWGUiJKZqNeCcL1u87NGOvg3PYqS1lY/Qh40hVLUBkc82pthCqt6HWo9aVgzDcZRcAJnYgY3I4qT1v9Bzc+Xdk/8l32gGRYOwaa/uK74DUvj7y/PeDYUU4Irs89rQc3B8IlcIgvqIzb7Jug0r0xi1DfFJzwDFVfe9NQ4dtvL9hk4uLXXioSQyL2K3GvigPUnDdiXAIgBsburXxExLjh/lWWPYvqYbWKElgXt745mUx3HQZRajDfanjg+TQgKwFwC0BjK3DaEmyUb3dZO7NeKOjeldlByMieE7fiaAmn0m1SEr1hWqA6B8hdSPCIQOUpho/OKQMT4BY9QxXdn+XWUPjq40n61CV1IP4+JcNDNUD1UmDZQoJbBCpOMXysECzbZ8KvjvbvislY3vEo7kg8piA5yOOkvV2SBCyeK00fONkBXOxRMmV/Hzv+6XyWjFX2Cqh15dMaGpBflcTVBNvuoUoy7XCfYBz/pFJwSiTwdjYQovJG8zdtwKGLgDCNGZAonCTjTncriE9TCn4mBdi3fDShHTjPsPl7YNij1IK8z21kfE8cABCqdFh2IvBlwQzBwCAZdwoDIFIM1vJeV7+S6YXf3oqZBJ6eqzkCNjwErMuaCVhom3ZwzQbYG1zmwUpoDGVK93g2wHDZzRRX+sdjFLXgqJIEMj8cSI8B8tO9mUu6fuhkOHAB+LMPaLMpmr6d9V7OpfBVR5L16UsPKUmZ254AlqeR/A9rVV6IdDpJv9IZC8OKrxSApZTZevwFQkpWWNzKphJOG1oW7JD4MBfIS5tclJy1Mjx3cGqwfEg4B83dtTk1khXD3Nd+TubmZzUEOxbzUoHHkyY33nwdqP0tyIoZaxf/Ol14ffeDHTIY0dGcaV1LITPEfDKVEOBp1MXjEZLLpWPylhcRI/uN1db3Mxpgs8lCQD+S88loHiiHZs76/0X6uP7dda0srNKnOMeAowprwjX3rNkKlfalWYQ74XF+4Tq3d0tvQ8nNycCSlygyf3uE9t41a6EN3ahEf025q5K8dQ5ud57du6evcaMkb/3aWtZcPlcHljGmd3oKmS5qw0wEPQ317rC+FdswrpLw62oJLK824AYiI7nY4q8TuYS780mtywWnSleQZOxgQgtzOY6JXb839tTldaKvzxdyvlLGXztJutpfSUxoJ2byYQ+XRetNGfMo/M6nSBVyP+MoHsR7izYmWEhkFuYZPsNu/n3CYW25OvCT2YbO5sCibXz9xP4DbnTUefRQAjAAAAAASUVORK5CYII=";const AY=e=>(pr("data-v-85a5fbfe"),e=e(),hr(),e),LY={key:0},OY=AY(()=>G("img",{class:"iconMessage",src:EY},null,-1)),RY={class:"dialog-main-content"},NY={key:1};function PY(e,t,n,r,o,i){return e.show?(J(),oe("div",{key:0,class:lt(["dialog",[e.isH5?"dialog-h5":"",e.center?"center":""]]),onClick:t[3]||(t[3]=Mn((...s)=>e.toggleView&&e.toggleView(...s),["self"]))},[G("main",{class:"dialog-main",style:No(!e.background&&{background:"none"})},[e.isHeaderShow?(J(),oe("header",LY,[G("h1",null,[OY,mr(" "+De(e.title),1)]),G("i",{class:"icon icon-close3",style:{cursor:"pointer"},onClick:t[0]||(t[0]=(...s)=>e.toggleView&&e.toggleView(...s))})])):Ie("",!0),G("div",RY,[Ft(e.$slots,"default",{},void 0,!0)]),e.isFooterShow?(J(),oe("footer",NY,[G("button",{class:"btn btn-cancel",onClick:t[1]||(t[1]=(...s)=>e.toggleView&&e.toggleView(...s))},De(e.cancelText),1),G("button",{class:"btn btn-default",onClick:t[2]||(t[2]=(...s)=>e.submit&&e.submit(...s))},De(e.confirmText),1)])):Ie("",!0)],4)],2)):Ie("",!0)}const Zy=Kt(DY,[["render",PY],["__scopeId","data-v-85a5fbfe"]]),Bs=it({components:{MaskTUI:j5,Transfer:sT,Slider:aT,ManageName:IW,ManageNotification:tK,ManageNotificationDetail:EK,ManageMember:HK,MemeberProfile:ZK,ManageMute:kY,DialogTUI:Zy},props:{userInfo:{type:Object,default:()=>({isGroup:!1,list:[]})},conversation:{type:Object,default:()=>({})},show:{type:Boolean,default:()=>!1},isH5:{type:Boolean,default:()=>!1}},setup(e,t){var ue;const n=Bs.TUIServer.TUICore.TIM.TYPES,{GroupServer:r}=Bs,{t:o}=Bs.TUIServer.TUICore.config.i18n.useI18n(),i=Wt({conversation:{},userInfo:{isGroup:!1,list:[],muteList:[]},isShowMuteTimeInput:!1,editLableName:"",mask:!1,currentTab:"",noticeId:"",transferType:"",isSearch:!0,isRadio:!1,transferList:[],selectedList:[],isMuteTime:!1,show:!1,typeName:{[n.GRP_WORK]:"好友工作群",[n.GRP_PUBLIC]:"陌生人社交群",[n.GRP_MEETING]:"临时会议群",[n.GRP_AVCHATROOM]:"直播群",[n.JOIN_OPTIONS_FREE_ACCESS]:"自由加入",[n.JOIN_OPTIONS_NEED_PERMISSION]:"需要验证",[n.JOIN_OPTIONS_DISABLE_APPLY]:"禁止加群"},delDialogShow:!1,quitDialogShow:!1,dimmisDialogShow:!1,changeOwnerShow:!1,changeOwnerMessage:"",userList:[],transferTitle:"",member:{friendList:[],admin:[],member:[],muteMember:[]},currentMember:{},classGroupDetail:{},page:1,currentUserDetail:{},mutePage:1,muteSearch:"",muteLoading:!1,muteTotal:0,groupDetail:{},currentModel:"not_mute"}),s=Ne(),u=Ne(),d=Ne();nn(()=>{i.conversation=e.conversation,i.userInfo=e.userInfo,i.show=e.show});const f=((ue=window==null?void 0:window.TUIKitTUICore)==null?void 0:ue.isOfficial)&&(P1==null?void 0:P1.useStore())||{},g=qe(()=>{let ce="";switch(i.currentTab){case"notification":ce="群公告";break;case"notificationAdd":case"notificationAddDetail":ce="新建群公告";break;case"notificationUpdate":case"notificationUpdateDetail":ce="编辑群公告";break;case"notificationDetail":ce="公告详情";break;case"member":ce="群成员";break;case"profile":ce="群成员";break;default:ce="群管理";break}return ce});Bt(()=>i.userInfo.list,(ce,Ee)=>{i.member={admin:[],member:[],muteMember:[]},ce.map(V=>{switch(V==null?void 0:V.groupRoleType){case"Admin":i.member.admin.push(V);break;case"Member":i.member.member.push(V);break}return V});const pe=new Date().getTime();i.member.muteMember=ce.filter(V=>(V==null?void 0:V.muteUntil)*1e3-pe>0)},{deep:!0});const v=qe(()=>{var se,Ce;const{conversation:ce}=i,Ee=(se=ce==null?void 0:ce.groupProfile)==null?void 0:se.selfInfo.role,pe=(Ce=ce==null?void 0:ce.groupProfile)==null?void 0:Ce.type,V=Ee===n.GRP_MBR_ROLE_OWNER,ee=pe===n.GRP_WORK;return V&&!ee}),_=qe(()=>{var V;const{conversation:ce}=i;return((V=ce==null?void 0:ce.groupProfile)==null?void 0:V.type)===n.GRP_WORK}),M=qe(()=>{let ce=3;return _.value||(ce+=1),i.conversation.groupProfile.selfInfo.role!=="Owner"&&(ce+=1),ce}),I=qe(()=>{var ee;const{conversation:ce}=i,Ee=(ee=ce==null?void 0:ce.groupProfile)==null?void 0:ee.selfInfo.role,pe=Ee===n.GRP_MBR_ROLE_OWNER,V=Ee===n.GRP_MBR_ROLE_ADMIN;return pe||V}),k=qe(()=>{var Ce,le;const{conversation:ce}=i,Ee=(Ce=ce==null?void 0:ce.groupProfile)==null?void 0:Ce.type,V=((le=ce==null?void 0:ce.groupProfile)==null?void 0:le.selfInfo.role)===n.GRP_MBR_ROLE_OWNER,ee=Ee===n.GRP_WORK,se=Ee===n.GRP_AVCHATROOM;return!!(!ee&&!se&&V)}),w=qe(()=>{var V;const{conversation:ce}=i;return!(((V=ce==null?void 0:ce.groupProfile)==null?void 0:V.type)===n.GRP_WORK||!I.value)}),S=async ce=>{var Ee;try{const{conversation:pe}=i,V={groupId:(Ee=pe==null?void 0:pe.groupProfile)==null?void 0:Ee.groupID,rows:100,page:ce&&ce==="more"?i.page+1:i.page};await Qk(V).then(ee=>{const se=ee.data.rows||[];se.forEach(Ce=>{Ce.nick=Ce.nickname}),ce&&ce==="more"?i.userInfo.list=[...i.userInfo.list,...se]:i.userInfo.list=se})}catch{}},L=async ce=>{var Ee;i.muteLoading=!0;try{const{conversation:pe}=i,V={groupId:(Ee=pe==null?void 0:pe.groupProfile)==null?void 0:Ee.groupID,rows:100,groupMute:i.currentModel!=="not_mute",groupRoleTypes:["Member"],page:ce&&ce==="more"?i.mutePage+1:i.mutePage,keyword:i.muteSearch};await Qk(V).then(ee=>{const se=ee.data.rows||[];se.forEach(Ce=>{Ce.nick=Ce.nickname}),ce&&ce==="more"?i.userInfo.muteList=[...i.userInfo.list,...se]:i.userInfo.muteList=se,i.muteTotal=ee.data.total||0})}catch{}i.muteLoading=!1},A=async ce=>{const{conversation:Ee}=i,pe=[];ce.forEach(V=>{pe.push({groupId:Ee.groupProfile.groupID,imUserId:V})});try{await UV(pe),be(),S()}catch{}},O=ce=>{const{conversation:Ee}=i,pe={groupID:Ee.groupProfile.groupID,userIDList:[ce.userID]};r.deleteGroupMember(pe)},H=async ce=>{console.log(i.conversation.groupProfile,ce),await LV({oldOwner:i.conversation.groupProfile.ownerID,groupId:i.conversation.groupProfile.groupID,newOwner:ce}),de(),i.conversation.groupProfile={},pi({message:"转交成功",isH5:!1,type:"success"})},q=async ce=>{i.quitDialogShow=!0},P=async ce=>{i.dimmisDialogShow=!0},B=async ce=>{const{conversation:Ee}=i;let pe="";switch(ce.role){case n.GRP_MBR_ROLE_ADMIN:pe=n.GRP_MBR_ROLE_MEMBER;break;case n.GRP_MBR_ROLE_MEMBER:pe=n.GRP_MBR_ROLE_ADMIN;break}const V={groupID:Ee.groupProfile.groupID,userID:ce.userID,role:pe};await r.setGroupMemberRole(V),S()},j=async(ce,Ee)=>{var ee;const{conversation:pe}=i,V={groupID:pe.groupProfile.groupID,userID:ce,muteTime:Ee==="add"?60*60*24*30:0};await r.setGroupMemberMuteTime(V),Ee==="add"&&(ee=window==null?void 0:window.TUIKitTUICore)!=null&&ee.isOfficial&&f!=null&&f.commit&&(f==null||f.commit("handleTask",4)),S()},$=async ce=>{console.log("🚀 ~ :909 ~ kickedOut ~ userIDList:",ce);const{conversation:Ee}=i;try{const pe={groupId:Ee.groupProfile.groupID,imUserIds:ce};await FV(pe),be(),S()}catch{}},R=ce=>{i.editLableName=ce},T=ce=>{ce==="add"?i.currentTab="notificationAdd":ce==="edit"?i.currentTab="notificationUpdate":ce==="submit"?i.currentTab="notification":ce==="addDetail"?i.currentTab="notificationAddDetail":ce==="editDetail"?i.currentTab="notificationUpdateDetail":ce==="submitDetail"?i.currentTab="notificationDetail":ce==="deleteDetail"&&(i.currentTab="")},x=async ce=>{const{key:Ee,value:pe}=ce,V={groupID:i.conversation.groupProfile.groupID,[Ee]:pe},ee=await r.updateGroupProfile(V),{conversation:se}=Bs.TUIServer.store;se.groupProfile=ee.data.group,Bs.TUIServer.store.conversation={},Bs.TUIServer.store.conversation=se,i.editLableName=""},Z=ce=>{var Ee,pe;if(i.currentTab==="notificationAdd"||i.currentTab==="notificationUpdate"){(Ee=u.value)==null||Ee.onCloseEdit(),i.currentTab="notification";return}if(i.currentTab==="notificationAddDetail"||i.currentTab==="notificationUpdateDetail"){(pe=d.value)==null||pe.onCloseEdit(),i.currentTab="notificationDetail";return}ce==="onlyMute"&&L(),i.currentTab=ce,i.editLableName="",i.currentTab==="member"&&(i.transferType="remove"),i.currentTab||(i.transferType="")},K=async ce=>{switch(console.log(i.transferType,"data.transferType"),i.transferType){case"add":const Ee=i.member.friendList.filter(V=>V==null?void 0:V.nick.includes(ce));i.transferList=Ee;break;case"remove":try{const V=i.userInfo.list.filter(ee=>{var se,Ce;return ee.imUserId!==((Ce=(se=i.conversation)==null?void 0:se.groupProfile)==null?void 0:Ce.selfInfo.userID)&&(ee==null?void 0:ee.nick.includes(ce))});i.transferList=V}catch{}break;case"changeOwner":const pe=[...i.member.admin,...i.member.member].filter(V=>V.roleType!=="STUDENT"&&(V==null?void 0:V.nick.includes(ce)));console.log(pe,"transferList",ce,[...i.member.admin,...i.member.member]),i.transferList=pe;break}},re=ce=>{let Ee=[];ce.forEach(V=>{Ee.push(V.nick||V.imUserId)});let pe="移除后,";if(Ee.length>3){const V=Ee.slice(0,3);pe+=V.join("、")+`等${Ee.length}人`}else pe+=Ee.join("、");return pe+="将退出群聊",pe},X=ce=>{var Ee;if(console.log(ce,i.transferType),!(ce.length<=0)){if(i.transferType==="remove")i.userList=ce,i.delDialogShow=!i.delDialogShow;else if(i.transferType==="changeOwner"){i.userList=ce,i.changeOwnerShow=!i.delDialogShow;let pe=((Ee=ce[0])==null?void 0:Ee.nick)||"";pe?i.changeOwnerMessage="请确认是否将群主移交给"+pe:i.changeOwnerMessage="请确认是否移交群主"}else te(ce,i.transferType);i.mask=!1}},ie=async()=>{const Ee=(await F5({page:1,rows:999})).data.rows||[];return Ee.forEach(pe=>{pe.nick=pe.friendNickname}),Ee.filter(pe=>!i.userInfo.list.some(V=>V.imUserId===pe.imUserId))},he=()=>{ae()},ae=async ce=>{switch(i.selectedList=[],ce){case"add":i.isRadio=!1;const Ee=await ie();i.member.friendList=Ee,i.transferList=Ee,i.transferTitle="添加群成员";break;case"remove":i.isRadio=!1,i.transferList=i.userInfo.list.filter(pe=>{var V,ee;return pe.imUserId!==((ee=(V=i.conversation)==null?void 0:V.groupProfile)==null?void 0:ee.selfInfo.userID)}),i.transferTitle="移除群成员";break;case"addAdmin":i.isRadio=!0,i.transferList=i.member.member,i.transferTitle="新增管理员";break;case"removeAdmin":i.isRadio=!0,i.transferList=i.member.admin,i.transferTitle="移除管理员";break;case"changeOwner":i.isRadio=!0,i.transferList=[...i.member.admin,...i.member.member].filter(pe=>pe.roleType!=="STUDENT"),i.transferTitle="移交群主";break;case"addMute":i.isRadio=!0,i.transferList=i.member.member,i.conversation.groupProfile.selfInfo.role==="Owner"&&(i.transferList=[...i.member.admin,...i.member.member]),i.transferTitle="新增禁言用户";break;case"removeMute":i.isRadio=!0,i.transferList=i.member.muteMember,i.transferTitle="移除禁言用户";break}i.transferType=ce,i.mask=!i.mask};xa(s,()=>{i.show=!1});const de=()=>{if(!r){const ce=o("TUIChat.manage.请先注册 TUIGroup 模块");return po(ce,e)}i.show=!i.show,i.show||(i.currentTab=""),i.show&&S()},Y=async ce=>{try{await PV({groupId:i.conversation.groupProfile.groupID,muteAll:ce}),be()}catch{}},te=(ce,Ee)=>{const pe=[];switch(ce.map(V=>(pe.push(V.imUserId),V)),Ee){case"add":A(pe);break;case"remove":$(pe);break;case"addAdmin":B(ce[0]);break;case"removeAdmin":B(ce[0]);break;case"changeOwner":H(pe[0]);break;case"addMute":j(pe[0],"add");break;case"removeMute":j(pe[0],"remove");break;case"quit":NV({id:i.conversation.groupProfile.groupID}).then(()=>{du.emit("removeGroup",i.conversation.groupProfile.groupID),Bs.TUIServer.deleteConversation(i.conversation.conversationID),Bs.TUIServer.store.conversation={},de()});break;case"dismiss":$V({id:i.conversation.groupProfile.groupID}).then(()=>{du.emit("removeGroup",i.conversation.groupProfile.groupID),Bs.TUIServer.deleteConversation(i.conversation.conversationID),Bs.TUIServer.store.conversation={},de()}).catch(V=>{pi({message:V.message,isH5:!1,type:"error"})});break}},fe=async()=>{var ce,Ee;try{const{toClipboard:pe}=z5();await pe((Ee=(ce=i==null?void 0:i.conversation)==null?void 0:ce.groupProfile)==null?void 0:Ee.groupID)}catch(pe){po(pe,i.env)}},Re=ce=>{i.currentMember=ce,Z("profile")},ve=async()=>{var ce,Ee,pe,V;try{const ee=await RV({groupId:(Ee=(ce=i==null?void 0:i.conversation)==null?void 0:ce.groupProfile)==null?void 0:Ee.groupID,imUserId:(V=(pe=i==null?void 0:i.conversation)==null?void 0:pe.groupProfile)==null?void 0:V.selfInfo.userID});i.currentUserDetail=ee.data}catch{}},be=async()=>{var ce,Ee;try{const V=(await H5({id:(Ee=(ce=i==null?void 0:i.conversation)==null?void 0:ce.groupProfile)==null?void 0:Ee.groupID})).data;V.configJson=V.configJson?JSON.parse(V.configJson):{},i.groupDetail=V}catch{}};return Bt(()=>i.show,()=>{if(i.show)try{be(),ve()}catch{}else i.currentTab=""}),Rn(()=>{du.on("handleNotice",ce=>{i.show=!i.show,i.noticeId=ce,i.currentTab="notificationDetail",i.show&&S()});try{be(),ve()}catch{}}),{...Yt(i),isDismissGroupAuth:v,isShowAddMember:_,isSetMuteTime:w,isAdmin:k,isAuth:I,addMember:A,deleteMember:O,changeOwner:H,quit:q,dismiss:P,handleAdmin:B,setMemberMuteTime:j,kickedOut:$,edit:R,onNotificationChangeStatus:T,updateProfile:x,setTab:Z,TabName:g,getMember:S,getUserList:L,handleSearchMember:K,submit:X,cancel:he,toggleMask:ae,toggleShow:de,setAllMuteTime:Y,handleManage:te,showUserNum:M,dialog:s,manageNotificationRef:u,manageNotificationDetailRef:d,handleGroupIDCopy:fe,handleMemberProfileShow:Re,delFormatUsers:re}}}),xY="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAYAAAA4E5OyAAAAAXNSR0IArs4c6QAAAztJREFUeF7tnE1PE1EUht93WhmnIIkxsWCCa1e2hC3qzo2JROBPGOPWjxWw8mNrjH8CMBDduFPZElpWriWRdqEkLZ12Kp1jZqSxVBgcmU5bOE2aNO3MmXOf+54593buucQxLxFJ7O7uXjJN88rentyGITfFxRjgveXiced353fuANiigS24/JRM8oPjON+Ghoa+k2wE+cSjfhQRVqvVMRjGtOvKNMkMRIa708ATXpUsiUjeMLgM1122LGuLpBxm9UggFceZQkPmSVwTkfMndKknTidZE8EXJDg/aJor/wRERAar1foDUJ57KumJlkTshK8O4RPLGnhNstJq/kCDf8NwFgRyH0AqYj96zZxN8I1lmXOtUA4AsW3nkcCdOwMwmp1jE8ZCKmW+bH7hA/FCw67X79KVt6c1TI6Spxc+YvBeamBg1fvsA7Ft+6rAWAEk22u6jscf5gh3KpVKfaU3zqg6zkMInp2WbBIWopd9QDy1TPMVy+Xy5UQyuSiCG2ENnabjBfgsjb1Z1uv17M+G+7FvB11R9QpZOpcwbnE/s7yIym4/2yGMx7RrtXfiyp1+bkhUvtPge1bsWh6Q61EZ7W873PSA/OjdWWvceLnDil09dNYXtyu9cj0F0tYTCkSBBAenKkQVogoJlcC6HjLFYgFra2u+05OTk0inR0I1IOqDuw4kl9vAxkbOb9f4eBbZ7HjUbQxlr+tA1tfXkc/nfaczmQwmJiZCNSDqgxVIr2UZVUhbjygQBRJ821OFqEJUIT4BbwS6vb2NRsMNJFIoFFAsFv1j0uk0RkaCR6qJhIHR0dGOjWg7Ng5ZWlpEqVT2HpNGOnYiieHhC5iZmY3UbtOYAolrYKYh858C1rSraVfTbqjg0ZDRkNGQ0ZAJRUBDJhiX/sncxkcfQ5wkvmI4t2OTuxh878glFEhcs92OdF8MRlUhqpBgmalC/laILsv8w8RflqkLd1uAbOrS7paQ8Zd26+L/Fn14i/+1PGQfSLM8xCsgYiK5SGgBkV9ApCVmwIESM08wWoTYUoToAdEy1bYy1eZ9VguZAS11Dyp13w8f3QzhsPmfbpfRRqV1QxWITAvO+IYqTT5nbcudX1xiotcvBn88AAAAAElFTkSuQmCC",UY="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAYAAAA4E5OyAAAAAXNSR0IArs4c6QAAAuhJREFUeF7tXE1PE1EUPedNZZwBSYyJiAmuXSl/QN25MZEI/Alj3PqxAlZ+bI3xTwAGIxt36h8QVq4lsbJQkpbOdGo717xK41BacNLp0MJt0qTpdO7cd945c+el9zziiJeIOLu7uxdc171cr8ttGLkpMaYA+5bzR51/PMe5A2CLBluI+alQ4Icoir6PjY39JNk4LCd2OygiDMNwCsbMxrHMkrwOkfHjGWCPVyVLIrJhDFcRx6ue522RlE5RuwJSiaIZNGSRxFUROdtjSgNxOsmqCL7C4eKo6679FyAiMhqGtQegPLcsGYiRZJxEkx3CJ5438ppkJRl+34D/ghEtCeQ+AD/jPAYtXEDwjee5C0lQ9gESBNEjQbxwCsBoTU5AmCXfd1+2vmgCYqUR1Gp3GcvbkyqTbvS08hHDe/7IyDv7uQlIEARXBGYNkOlB43U++fALEc/4vv+N9jkjjKKHEDw7KdUkLYi2+oB46rnuK5bL5YtOobAsghtpA52k3wvwWRr1edZqtenfjfjj0D50ZTUrZOmMY25xr7K8yCruMMchzGMG1ep7ieXOMA8kq9xpuM5KUN0A5FpWQYc7DjctIL8Gd9WaN7zcYSUIO6768k5lUK6ngLTNhAKigBwuTmWIMkQZkqqAqWRUMioZlUwqBFQyKplUhNEqo5JRyahkUiGQl2S2t3+gWCyi0Yh7ye/AuY5jMDk5iYmJS5nGbQXr2011ZWUZpVLZ/k2aaeIkMT5+DnNz85nGVUC6wNk3hqhk+kLg/IP2jSH5DyWbKyogeZXdbOYr/yjKEGWIrmVS6U4lo5JRyahkUiGgklHJpCKMVhmVjEpGJZMKgYOS0bbMf5g02zK1cTcByKa2dick02zt1ub/BD9s87/aQ/YAadlDrIGITmGZUANR00CkFjNgn8XMEkZNiAkTogVEbaptNtXWfVaNzIBa3Q+zuu/JRzdD6LQY0u0y2lBJbqgCkVnBKd9QpYXPadty5w8F5h7XJLTPLAAAAABJRU5ErkJggg==";const cs=e=>(pr("data-v-248d9f32"),e=e(),hr(),e),FY={class:"manage-header-left"},$Y={key:1},GY={key:0},BY={key:1},HY={key:0,class:lt(["main"]),style:{"background-color":"#f4f5f9",height:"100%"}},qY={class:"userInfo space-top",style:{"background-color":"#fff"}},VY=cs(()=>G("i",{class:"icon icon-right"},null,-1)),zY=["src"],jY={key:0},WY=cs(()=>G("img",{src:xY,class:"avatar"},null,-1)),KY=[WY],YY=cs(()=>G("dd",null,"添加",-1)),JY={key:1},XY=cs(()=>G("img",{class:"avatar",src:UY},null,-1)),ZY=[XY],QY=cs(()=>G("dd",null,"移除",-1)),eJ=cs(()=>G("i",{class:"icon icon-right end"},null,-1)),tJ={key:0,class:"admin-content space-top",style:{"background-color":"#fff","padding-top":"12px","border-top":"1px solid #f4f5f9"}},nJ=cs(()=>G("aside",null,[G("label",null,"学生禁言")],-1)),rJ=cs(()=>G("aside",null,[G("label",null,"禁言名单")],-1)),oJ=cs(()=>G("i",{class:"icon icon-right end"},null,-1)),iJ=[rJ,oJ],sJ=cs(()=>G("aside",null,[G("label",null,"移交群主")],-1)),aJ=cs(()=>G("i",{class:"icon icon-right end"},null,-1)),lJ=[sJ,aJ],uJ={class:"footer space-top",style:{overflow:"hidden","background-color":"#f4f5f9"}},cJ={key:5,class:"admin"},dJ={key:0,class:"admin-list"},fJ=["src"],pJ={key:1,class:"admin-content space-top"},hJ={key:2,class:"admin-list last"},gJ=["src"],mJ={class:"delDialog-title"},vJ={class:"delDialog-title"},yJ=cs(()=>G("p",{class:"delDialog-title"},"是否退出群聊?",-1)),_J=cs(()=>G("p",{class:"delDialog-title"},"是否解散群聊?",-1));function bJ(e,t,n,r,o,i){var L,A,O;const s=xt("n-tab-pane"),u=xt("n-tabs"),d=xt("ManageName"),f=xt("Slider"),g=xt("ManageMember"),v=xt("MemeberProfile"),_=xt("ManageNotification"),M=xt("ManageNotificationDetail"),I=xt("ManageMute"),k=xt("Transfer"),w=xt("MaskTUI"),S=xt("DialogTUI");return J(),oe("div",null,[G("i",{class:"icon icon-chat-setting",onClick:t[0]||(t[0]=(...H)=>e.toggleShow&&e.toggleShow(...H))}),e.show?(J(),oe("div",{key:0,class:lt(["manage",[e.isH5?"manage-h5":""]]),ref:"dialog"},[G("header",{class:lt(["manage-header",e.currentTab==="onlyMute"?"currentModel":""])},[e.isH5&&!e.currentTab?(J(),oe("i",{key:0,class:"icon icon-back",onClick:t[1]||(t[1]=(...H)=>e.toggleShow&&e.toggleShow(...H))})):Ie("",!0),G("aside",FY,[e.currentTab?(J(),oe("i",{key:0,class:"icon icon-back",onClick:t[2]||(t[2]=()=>{e.currentModel="not_mute",e.setTab("")})})):Ie("",!0),e.currentTab!=="onlyMute"?(J(),oe("main",$Y,[G("h1",null,[mr(De(e.TabName)+" ",1),e.currentTab==="member"?(J(),oe("span",GY,De(e.groupDetail.memberNum||0)+De(e.$t("TUIChat.manage.人")),1)):Ie("",!0)])])):(J(),_t(u,{key:2,"justify-content":"center",style:{"margin-left":"-14px",flex:"1","--n-tab-padding":"6px 0","--n-tab-gap":"34px","--n-tab-text-color":"#000","--n-tab-text-color-hover":"#0f0f0f","--n-tab-text-color-active":"#000","--n-tab-font-weight-active":"600","--n-bar-color":"#198cfe"},"bar-width":20,value:e.currentModel,"onUpdate:value":t[3]||(t[3]=H=>{e.currentModel=H,e.mutePage=1,e.muteSearch="",e.getUserList()})},{default:Ct(()=>[It(s,{name:"not_mute",tab:"未禁言"}),It(s,{name:"mute",tab:"已禁言"})]),_:1},8,["value"]))]),e.currentTab!=="onlyMute"?(J(),oe("span",BY,[e.isH5?Ie("",!0):(J(),oe("i",{key:0,class:"icon icon-close",onClick:t[4]||(t[4]=(...H)=>e.toggleShow&&e.toggleShow(...H))}))])):Ie("",!0)],2),e.currentTab?e.currentTab==="member"?(J(),_t(g,{key:1,self:e.conversation.groupProfile.selfInfo,list:e.userInfo.list,total:~~e.conversation.groupProfile.memberCount,onMore:t[14]||(t[14]=H=>e.getMember("more")),onDel:e.submit,onHandleMemberProfileShow:e.handleMemberProfileShow},null,8,["self","list","total","onDel","onHandleMemberProfileShow"])):e.currentTab==="profile"?(J(),_t(v,{key:2,userInfo:e.currentMember},null,8,["userInfo"])):e.currentTab==="notification"||e.currentTab==="notificationAdd"||e.currentTab==="notificationUpdate"?(J(),_t(_,{key:3,ref:"manageNotificationRef",isAuth:e.isAuth,data:e.conversation.groupProfile,onUpdate:e.updateProfile,onChangeStatus:e.onNotificationChangeStatus},null,8,["isAuth","data","onUpdate","onChangeStatus"])):e.currentTab==="notificationDetail"||e.currentTab==="notificationAddDetail"||e.currentTab==="notificationUpdateDetail"?(J(),_t(M,{key:4,ref:"manageNotificationDetailRef",noticeId:e.noticeId,isAuth:e.isAuth,data:e.conversation.groupProfile,onChangeStatus:e.onNotificationChangeStatus},null,8,["noticeId","isAuth","data","onChangeStatus"])):e.currentTab==="admin"?(J(),oe("main",cJ,[e.isAdmin?(J(),oe("div",dJ,[G("label",null,De(e.$t("TUIChat.manage.群管理员")),1),G("ol",null,[(J(!0),oe(ft,null,zt(e.member.admin,(H,q)=>(J(),oe("dl",{key:q},[G("dt",null,[G("img",{class:"avatar",src:(H==null?void 0:H.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,fJ)]),G("dd",null,De((H==null?void 0:H.nick)||(H==null?void 0:H.userID)),1)]))),128)),G("dl",null,[G("dt",{class:"avatar",onClick:t[15]||(t[15]=H=>e.toggleMask("addAdmin"))},"+")]),G("dl",null,[e.member.admin.length>0?(J(),oe("dt",{key:0,class:"avatar",onClick:t[16]||(t[16]=H=>e.toggleMask("removeAdmin"))}," - ")):Ie("",!0)])])])):Ie("",!0),e.isSetMuteTime?(J(),oe("div",pJ,[G("aside",null,[G("label",null,De(e.$t("TUIChat.manage.学生禁言")),1),G("p",null,De(e.$t("TUIChat.manage.学生禁言开启后,只允许群主和管理员发言。")),1)]),It(f,{open:e.conversation.groupProfile.muteAllMembers,onChange:e.setAllMuteTime},null,8,["open","onChange"])])):Ie("",!0),e.isSetMuteTime?(J(),oe("div",hJ,[G("label",null,De(e.$t("TUIChat.manage.单独禁言人员")),1),G("ol",null,[(J(!0),oe(ft,null,zt(e.member.muteMember,(H,q)=>(J(),oe("dl",{key:q},[G("dt",null,[G("img",{class:"avatar",src:(H==null?void 0:H.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,gJ)]),G("dd",null,De((H==null?void 0:H.nick)||(H==null?void 0:H.userID)),1)]))),128)),G("dl",null,[G("dt",{class:"avatar",onClick:t[17]||(t[17]=H=>e.toggleMask("addMute"))},"+")]),G("dl",null,[e.member.muteMember.length>0?(J(),oe("dt",{key:0,class:"avatar",onClick:t[18]||(t[18]=H=>e.toggleMask("removeMute"))}," - ")):Ie("",!0)])])])):Ie("",!0)])):e.currentTab==="onlyMute"?(J(),_t(I,{key:6,currentModel:e.currentModel,total:e.muteTotal,self:e.conversation.groupProfile.selfInfo,list:e.userInfo.muteList,conversation:e.conversation,muteLoading:e.muteLoading,onMore:t[19]||(t[19]=H=>e.getUserList("more")),onDel:e.submit,onBack:t[20]||(t[20]=()=>{e.setTab(""),e.currentModel="not_mute"}),onSearch:t[21]||(t[21]=H=>{e.mutePage=1,e.muteSearch=H,e.userInfo.muteList=[],e.getUserList()}),onHandleMemberProfileShow:e.handleMemberProfileShow},null,8,["currentModel","total","self","list","conversation","muteLoading","onDel","onHandleMemberProfileShow"])):Ie("",!0):(J(),oe("main",HY,[It(d,{class:"space-top",isAuth:e.isAuth,isH5:e.isH5,data:e.conversation.groupProfile,onUpdate:e.updateProfile,style:{"background-color":"#fff"}},null,8,["isAuth","isH5","data","onUpdate"]),G("div",qY,[G("header",{class:"userInfo-header",onClick:t[5]||(t[5]=H=>e.setTab("member"))},[G("label",null,De(e.$t("TUIChat.manage.群成员")),1),G("p",null,[G("span",null,De(e.groupDetail.memberNum||0)+De(e.$t("TUIChat.manage.人")),1),VY])]),G("ol",null,[(J(!0),oe(ft,null,zt((A=(L=e.userInfo)==null?void 0:L.list)==null?void 0:A.slice(0,e.showUserNum),(H,q)=>(J(),oe("dl",{key:q},[G("dt",null,[G("img",{class:"avatar",src:(H==null?void 0:H.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,zY)]),G("dd",null,De((H==null?void 0:H.nickname)||(H==null?void 0:H.userID)),1)]))),128)),e.currentUserDetail.groupRoleType==="Owner"?(J(),oe("dl",jY,[G("dt",{onClick:t[6]||(t[6]=H=>e.toggleMask("add")),style:{cursor:"pointer"}},KY),YY])):Ie("",!0),e.currentUserDetail.groupRoleType==="Owner"?(J(),oe("dl",JY,[G("dt",{onClick:t[7]||(t[7]=H=>e.toggleMask("remove")),style:{cursor:"pointer"}},ZY),QY])):Ie("",!0)])]),G("ul",{class:"content space-top",onClick:t[9]||(t[9]=H=>e.editLableName=""),style:{"background-color":"#fff"}},[G("li",{onClick:t[8]||(t[8]=Mn(H=>e.setTab("notification"),["stop"]))},[G("aside",null,[G("label",null,De(e.$t("TUIChat.manage.群公告")),1)]),eJ])]),e.currentUserDetail.groupRoleType==="Owner"||e.currentUserDetail.groupRoleType==="Admin"?(J(),oe("div",tJ,[nJ,It(f,{open:e.groupDetail.configJson.mute,onChange:e.setAllMuteTime},null,8,["open","onChange"])])):Ie("",!0),e.currentUserDetail.groupRoleType==="Owner"||e.currentUserDetail.groupRoleType==="Admin"?(J(),oe("div",{key:1,class:"admin-content space-top",style:{"background-color":"#fff","padding-top":"12px","border-top":"1px solid #f4f5f9"},onClick:t[10]||(t[10]=Mn(()=>{e.userInfo.muteList=[],e.setTab("onlyMute")},["stop"]))},iJ)):Ie("",!0),e.currentUserDetail.groupRoleType==="Owner"&&((O=e.userInfo)==null?void 0:O.list.length)>1?(J(),oe("div",{key:2,class:"admin-content space-top",style:{"background-color":"#fff","padding-top":"12px","border-top":"1px solid #f4f5f9"},onClick:t[11]||(t[11]=Mn(H=>e.toggleMask("changeOwner"),["stop"]))},lJ)):Ie("",!0),G("ul",uJ,[e.currentUserDetail.groupRoleType==="Owner"?(J(),oe("li",{key:0,onClick:t[12]||(t[12]=Mn(H=>e.dismiss(e.conversation.groupProfile),["stop"]))}," 解散群聊 ")):(J(),oe("li",{key:1,onClick:t[13]||(t[13]=Mn(H=>e.quit(e.conversation.groupProfile),["stop"]))},"退出群组"))])])),It(w,{show:e.mask,"onUpdate:show":t[22]||(t[22]=H=>e.mask=H)},{default:Ct(()=>[It(k,{title:e.transferTitle,list:e.transferList,isSearch:e.isSearch,isRadio:e.isRadio,selectedList:e.selectedList,onSubmit:e.submit,onCancel:e.cancel,onSearch:e.handleSearchMember,isH5:e.isH5},null,8,["title","list","isSearch","isRadio","selectedList","onSubmit","onCancel","onSearch","isH5"])]),_:1},8,["show"]),It(S,{title:"移除成员",show:e.delDialogShow,isH5:e.isH5,center:!0,confirmText:"移除",isHeaderShow:!e.isH5,onSubmit:t[23]||(t[23]=H=>e.handleManage(e.userList,"remove")),"onUpdate:show":t[24]||(t[24]=H=>e.delDialogShow=H)},{default:Ct(()=>[G("p",mJ,De(e.delFormatUsers(e.userList)),1)]),_:1},8,["show","isH5","isHeaderShow"]),It(S,{title:"移交群主",show:e.changeOwnerShow,isH5:e.isH5,center:!0,isHeaderShow:!e.isH5,onSubmit:t[25]||(t[25]=H=>e.handleManage(e.userList,"changeOwner")),"onUpdate:show":t[26]||(t[26]=H=>e.changeOwnerShow=H)},{default:Ct(()=>[G("p",vJ,De(e.changeOwnerMessage),1)]),_:1},8,["show","isH5","isHeaderShow"]),It(S,{title:"退出群聊",show:e.quitDialogShow,isH5:e.isH5,center:!0,isHeaderShow:!e.isH5,onSubmit:t[27]||(t[27]=H=>e.handleManage([],"quit")),"onUpdate:show":t[28]||(t[28]=H=>e.quitDialogShow=H)},{default:Ct(()=>[yJ]),_:1},8,["show","isH5","isHeaderShow"]),It(S,{title:"解散群聊",show:e.dimmisDialogShow,isH5:e.isH5,center:!0,isHeaderShow:!e.isH5,onSubmit:t[29]||(t[29]=H=>e.handleManage([],"dismiss")),"onUpdate:show":t[30]||(t[30]=H=>e.dimmisDialogShow=H)},{default:Ct(()=>[_J]),_:1},8,["show","isH5","isHeaderShow"])],2)):Ie("",!0)])}const hl=Kt(Bs,[["render",bJ],["__scopeId","data-v-248d9f32"]]),MJ={class:"message-item"},IJ=it({__name:"index",props:{message:{type:Object,default:()=>({})},beforeMessage:{type:Object,default:()=>({})},types:{type:Object,default:()=>({})},env:{type:Object,default:()=>({})},messageList:{type:Array,default:()=>[]},displayGroupMessageReadReceipt:{type:Boolean,default:!0},displayEmojiReactions:{type:Boolean,default:!0}},emits:["handleEditor","showDialog","uploading","jumpID","resendMessage"],setup(e,{emit:t}){const n=e,r=hl==null?void 0:hl.TUIServer;Ne(!1),Ne([]);const{message:o,types:i,env:s,messageList:u,displayGroupMessageReadReceipt:d,displayEmojiReactions:f}=Yt(n);Rn(async()=>{var L,A,O,H,q,P,B,j,$,R,T,x,Z,K,re,X;if((A=(L=n.message)==null?void 0:L.payload)!=null&&A.operatorID&&((H=(O=n.message)==null?void 0:O.payload)==null?void 0:H.operatorID.indexOf("KT"))!=-1){const ie=await r.getUserProfile([(P=(q=n.message)==null?void 0:q.payload)==null?void 0:P.operatorID]);if(console.log(ie,"operatorInfo"),o.value.payload.operatorID=(B=ie.data[0])==null?void 0:B.nick,(R=($=(j=n.message)==null?void 0:j.payload)==null?void 0:$.newGroupProfile)!=null&&R.ownerID){const he=await r.getUserProfile([(Z=(x=(T=n.message)==null?void 0:T.payload)==null?void 0:x.newGroupProfile)==null?void 0:Z.ownerID]);o.value.payload.newGroupProfile.ownerID=(K=he.data[0])==null?void 0:K.nick}}else((X=(re=n.message)==null?void 0:re.payload)==null?void 0:X.operatorID)==="mec_admin"&&(o.value.payload.operatorID="")});const g=L=>{t("handleEditor",L,"reedit")},v=(L,A)=>{if(!(!L||!A))switch(A){case dn.handleMessage.forward:t("showDialog",L,dn.handleMessage.forward);break;case dn.handleMessage.reference:t("handleEditor",L,dn.handleMessage.reference);break;case dn.handleMessage.reply:t("handleEditor",L,dn.handleMessage.reply);break}},_=L=>{L&&t("showDialog",L,"previewImage")},M=L=>{L&&t("showDialog",L,"receipt")},I=L=>{L&&t("showDialog",L,"replies")},k=L=>{L&&t("jumpID",L)},w=()=>{t("uploading")},S=L=>{L&&t("resendMessage",L)};return(L,A)=>(J(),oe("div",MJ,[Oe(HO)(Oe(o))?(J(),_t(cz,{key:0,data:Oe(RG)(Oe(o))},null,8,["data"])):Oe(o).isRevoked?(J(),_t(rj,{key:2,isEdit:Oe(o).type===Oe(i).MSG_TEXT,data:Oe(o),onEdit:A[0]||(A[0]=O=>g(Oe(o)))},null,8,["isEdit","data"])):(J(),_t(Xz,{key:1,data:Oe(o),isH5:Oe(s).isH5,messagesList:Oe(u),needGroupReceipt:Oe(d),needReplies:!0,needEmojiReact:Oe(f),onJumpID:k,onResendMessage:S,onShowReadReceiptDialog:M,onShowRepliesDialog:I},{dialog:Ct(()=>[It(wj,{message:Oe(o),needEmojiReact:Oe(f),onHandleMessage:v},null,8,["message","needEmojiReact"])]),default:Ct(()=>[Oe(o).type===Oe(i).MSG_TEXT?(J(),_t(VO,{key:0,data:Oe(xO)(Oe(o))},null,8,["data"])):Ie("",!0),Oe(o).type===Oe(i).MSG_IMAGE?(J(),_t(o9,{key:1,isH5:Oe(s).isH5,data:Oe(FO)(Oe(o)),onUploading:w,onPreviewImage:_},null,8,["isH5","data"])):Ie("",!0),Oe(o).type===Oe(i).MSG_VIDEO?(J(),_t(h9,{key:2,isH5:Oe(s).isH5,data:Oe($O)(Oe(o)),onUploading:w},null,8,["isH5","data"])):Ie("",!0),Oe(o).type===Oe(i).MSG_AUDIO?(J(),_t(y9,{key:3,data:Oe(xG)(Oe(o))},null,8,["data"])):Ie("",!0),Oe(o).type===Oe(i).MSG_FILE?(J(),_t(k9,{key:4,data:Oe(GO)(Oe(o))},null,8,["data"])):Ie("",!0),Oe(o).type===Oe(i).MSG_FACE?(J(),_t(O9,{key:5,data:Oe(UO)(Oe(o)),isH5:Oe(s).isH5},null,8,["data","isH5"])):Ie("",!0),Oe(o).type===Oe(i).MSG_LOCATION?(J(),_t(F9,{key:6,data:Oe(PG)(Oe(o))},null,8,["data"])):Ie("",!0),Oe(o).type===Oe(i).MSG_CUSTOM?(J(),_t(sz,{key:7,data:Oe(BO)(Oe(o))},null,8,["data"])):Ie("",!0),Oe(o).type===Oe(i).MSG_MERGER?(J(),_t(H9,{key:8,data:Oe(UG)(Oe(o))},null,8,["data"])):Ie("",!0)]),_:1},8,["data","isH5","messagesList","needGroupReceipt","needEmojiReact"]))]))}});const CJ=Kt(IJ,[["__scopeId","data-v-d2d1ab51"]]),TJ=it({__name:"message-timestamp",props:{currTime:{type:Number,default:0},prevTime:{type:Number,default:0}},setup(e){var f,g,v;const t=e,{t:n}=(v=(g=(f=window==null?void 0:window.TUIKitTUICore)==null?void 0:f.config)==null?void 0:g.i18n)==null?void 0:v.useI18n(),{currTime:r,prevTime:o}=Yt(t),i=Ne(!1),s=Ne(""),u=(_,M)=>(i.value=!1,_<=0?"":!M||M<=0||_-M>=600?(i.value=!0,d(_*1e3)):"");Bt(()=>[r.value,o.value],(_,M)=>{(_==null?void 0:_.toString())!==(M==null?void 0:M.toString())&&(s.value=u(r.value,o.value))},{immediate:!0});function d(_){const M=new Date().setHours(0,0,0,0),I=new Date(new Date().getFullYear(),0,1,0,0,0,0).getTime(),k=new Date(_),w=24*60*60*1e3,S=7*w,L=M-k.getTime();function A(O){return O<10?"0"+O:O.toString()}if(L<=0)return`${A(k.getHours())}:${A(k.getMinutes())}`;if(L<=w)return`${n("time.昨天")} ${A(k.getHours())}:${A(k.getMinutes())}`;if(L<=S-w){const H=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][k.getDay()];return`${n("time."+H)} ${A(k.getHours())}:${A(k.getMinutes())}`}else return k.getTime()>=I?`${k.getMonth()+1}/${k.getDate()} ${A(k.getHours())}:${A(k.getMinutes())}`:`${k.getFullYear()}/${k.getMonth()+1}/${k.getDate()} ${A(k.getHours())}:${A(k.getMinutes())}`}return(_,M)=>Bn((J(),oe("div",{class:"message-timestamp"},De(s.value),513)),[[to,i.value]])}});const wJ=Kt(TJ,[["__scopeId","data-v-6249b73e"]]),W5={product:{label:"产品文档",url:"https://cloud.tencent.com/document/product/269/1499#.E7.BE.A4.E7.BB.84.E5.8A.9F.E8.83.BD"},customMessage:{label:"自定义消息",url:"https://web.sdk.qcloud.com/im/doc/zh-cn/SDK.html#createCustomMessage"},complaint:{label:"点此投诉",url:"https://cloud.tencent.com/apply/p/xc3oaubi98g"},implement:{label:"集成TUICallKit",url:"https://cloud.tencent.com/document/product/269/79861"},purchase:{label:"开通腾讯实时音视频服务",url:"https://cloud.tencent.com/document/product/1640/79968"}};function jo(e){this.content=e}jo.prototype={constructor:jo,find:function(e){for(var t=0;t>1}};jo.from=function(e){if(e instanceof jo)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new jo(t)};function K5(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=K5(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function Y5(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),u=t.child(--i),d=s.nodeSize;if(s==u){n-=d,r-=d;continue}if(!s.sameMarkup(u))return{a:n,b:r};if(s.isText&&s.text!=u.text){let f=0,g=Math.min(s.text.length,u.text.length);for(;ft&&r(d,o+u,i||null,s)!==!1&&d.content.size){let g=u+1;d.nodesBetween(Math.max(0,t-g),Math.min(d.content.size,n-g),r,o+g)}u=f}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(u,d)=>{u.isText?(i+=u.text.slice(Math.max(t,d)-d,n-d),s=!r):u.isLeaf?(o?i+=typeof o=="function"?o(u):o:u.type.spec.leafText&&(i+=u.type.spec.leafText(u)),s=!r):!s&&u.isBlock&&(i+=r,s=!0)},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(u.isText?u=u.cut(Math.max(0,t-s),Math.min(u.text.length,n-s)):u=u.cut(Math.max(0,t-s-1),Math.min(u.content.size,n-s-1))),r.push(u),o+=u.nodeSize),s=d}return new ht(r,o)}cutByIndex(t,n){return t==n?ht.empty:t==0&&n==this.content.length?this:new ht(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new ht(o,i)}addToStart(t){return new ht([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ht(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=t)return s==t||n>0?km(r+1,s):km(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return ht.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new ht(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ht.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};dr.none=[];class Vv extends Error{}class Ot{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=X5(this.content,t+this.openStart,n);return r&&new Ot(r,this.openStart,this.openEnd)}removeBetween(t,n){return new Ot(J5(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return Ot.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ot(ht.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new Ot(t,r,o)}}Ot.empty=new Ot(ht.empty,0,0);function J5(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:u}=e.findIndex(n);if(o==t||i.isText){if(u!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(J5(i.content,t-o-1,n-o-1)))}function X5(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let u=X5(s.content,t-i-1,n);return u&&e.replaceChild(o,s.copy(u))}function SJ(e,t,n){if(n.openStart>e.depth)throw new Vv("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Vv("Inconsistent open depths");return Z5(e,t,n,0)}function Z5(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function vh(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Gc(e.nodeAfter,r),i++));for(let u=i;uo&&JM(e,t,o+1),s=r.depth>o&&JM(n,r,o+1),u=[];return vh(null,e,o,u),i&&s&&t.index(o)==n.index(o)?(Q5(i,s),Gc(Bc(i,eR(e,t,n,r,o+1)),u)):(i&&Gc(Bc(i,zv(e,t,o+1)),u),vh(t,n,o,u),s&&Gc(Bc(s,zv(n,r,o+1)),u)),vh(r,null,o,u),new ht(u)}function zv(e,t,n){let r=[];if(vh(null,e,n,r),e.depth>n){let o=JM(e,t,n+1);Gc(Bc(o,zv(e,t,n+1)),r)}return vh(t,null,n,r),new ht(r)}function kJ(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(ht.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}class Qh{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new jv(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:u,offset:d}=s.content.findIndex(i),f=i-d;if(r.push(s,u,o+d),!f||(s=s.child(u),s.isText))break;i=f-1,o+=d+1}return new Qh(n,r,i)}static resolveCached(t,n){for(let o=0;ot&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),tR(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=ht.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),u=s&&s.matchFragment(this.content,n);if(!u||!u.validEnd)return!1;for(let d=o;dn.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=ht.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,o,r)}};Hc.prototype.text=void 0;class Wv extends Hc{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):tR(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Wv(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Wv(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function tR(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class td{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new AJ(t,n);if(r.next==null)return td.empty;let o=nR(r);r.next&&r.err("Unexpected trailing text");let i=UJ(xJ(o));return FJ(i,r),i}matchType(t){for(let n=0;nf.createAndFill()));for(let f=0;f=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` `)}}td.empty=new td(!0);class AJ{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function nR(e){let t=[];do t.push(LJ(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function LJ(e){let t=[];do t.push(OJ(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function OJ(e){let t=PJ(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=RJ(e,t);else break;return t}function e2(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function RJ(e,t){let n=e2(e),r=n;return e.eat(",")&&(e.next!="}"?r=e2(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function NJ(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.groups.indexOf(t)>-1&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function PJ(e){if(e.eat("(")){let t=nR(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=NJ(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function xJ(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,u,d){let f={term:d,to:u};return t[s].push(f),f}function o(s,u){s.forEach(d=>d.to=u)}function i(s,u){if(s.type=="choice")return s.exprs.reduce((d,f)=>d.concat(i(f,u)),[]);if(s.type=="seq")for(let d=0;;d++){let f=i(s.exprs[d],u);if(d==s.exprs.length-1)return f;o(f,u=n())}else if(s.type=="star"){let d=n();return r(u,d),o(i(s.expr,d),d),[r(d)]}else if(s.type=="plus"){let d=n();return o(i(s.expr,u),d),o(i(s.expr,d),d),[r(d)]}else{if(s.type=="opt")return[r(u)].concat(i(s.expr,u));if(s.type=="range"){let d=u;for(let f=0;f{e[s].forEach(({term:u,to:d})=>{if(!u)return;let f;for(let g=0;g{f||o.push([u,f=[]]),f.indexOf(g)==-1&&f.push(g)})})});let i=t[r.join(",")]=new td(r.indexOf(e.length-1)>-1);for(let s=0;s-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new aR(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class $J{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Qy{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=sR(o.attrs),this.excluded=null;let i=oR(this.attrs);this.instance=i?new dr(this,i):null}create(t=null){return!t&&this.instance?this.instance:new dr(this,iR(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new Qy(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}}class GJ{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=jo.from(t.nodes),n.marks=jo.from(t.marks||{}),this.nodes=n2.compile(this.spec.nodes,this),this.marks=Qy.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",u=i.spec.marks;i.contentMatch=r[s]||(r[s]=td.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=u=="_"?null:u?r2(this,u.split(" ")):u==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:r2(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof n2){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new Wv(r,r.defaultAttrs,t,dr.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return Hc.fromJSON(this,t)}markFromJSON(t){return dr.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function r2(e,t){let n=[];for(let r=0;r-1)&&n.push(s=d)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class Af{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=t.nodes[r.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new i2(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new i2(this,n,!0);return r.addAll(t,n.from,n.to),Ot.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(u.charCodeAt(t.length)!=61||u.slice(t.length+1)!=n))){if(s.getAttrs){let d=s.getAttrs(n);if(d===!1)continue;s.attrs=d||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=s2(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=s2(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Af(t,Af.schemaRules(t)))}}const lR={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},BJ={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},uR={ol:!0,ul:!0},Kv=1,Yv=2,yh=4;function o2(e,t,n){return t!=null?(t?Kv:0)|(t==="full"?Yv:0):e&&e.whitespace=="pre"?Kv|Yv:n&~yh}class Dm{constructor(t,n,r,o,i,s,u){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=u,this.content=[],this.activeMarks=dr.none,this.stashMarks=[],this.match=s||(u&yh?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(ht.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Kv)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=ht.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(ht.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;nthis.addAll(t)),s&&this.sync(u),this.needsBlock=d}else this.withStyleRules(t,()=>{this.addElementByRule(t,i,i.consuming===!1?o:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` `))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=dr.none,r=dr.none;for(let o=0;o{s.clearMark(u)&&(r=u.addToSet(r))}):n=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(n),s.consuming===!1)i=s;else break}return[n,r]}addElementByRule(t,n,r){let o,i,s;n.node?(i=this.parser.schema.nodes[n.node],i.isLeaf?this.insertNode(i.create(n.attrs))||this.leafFallback(t):o=this.enter(i,n.attrs||null,n.preserveWhitespace)):(s=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(s));let u=this.top;if(i&&i.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(d=>this.insertNode(d));else{let d=t;typeof n.contentElement=="string"?d=t.querySelector(n.contentElement):typeof n.contentElement=="function"?d=n.contentElement(t):n.contentElement&&(d=n.contentElement),this.findAround(t,d,!0),this.addAll(d)}o&&this.sync(u)&&this.open--,s&&this.removePendingMark(s,u)}addAll(t,n,r){let o=n||0;for(let i=n?t.childNodes[n]:t.firstChild,s=r==null?null:t.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i);this.findAtPoint(t,o)}findPlace(t){let n,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(t);if(s&&(!n||n.length>s.length)&&(n=s,r=i,!s.length)||i.solid)break}if(!n)return!1;this.sync(r);for(let o=0;othis.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(u,d)=>{for(;u>=0;u--){let f=n[u];if(f==""){if(u==n.length-1||u==0)continue;for(;d>=i;d--)if(s(u-1,d))return!0;return!1}else{let g=d>0||d==0&&o?this.nodes[d].type:r&&d>=i?r.node(d-i).type:null;if(!g||g.name!=f&&g.groups.indexOf(f)==-1)return!1;d--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=jJ(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(t)>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);let s=o.popFromStashMark(t);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==n)break}}}function HJ(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&uR.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function qJ(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function VJ(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function s2(e){let t={};for(let n in e)t[n]=e[n];return t}function zJ(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=u=>{i.push(u);for(let d=0;d{if(i.length||s.marks.length){let u=0,d=0;for(;u=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&wa.renderSpec(X1(r),o(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,u=r?t.createElementNS(r,o):t.createElement(o),d=n[1],f=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){f=2;for(let g in d)if(d[g]!=null){let v=g.indexOf(" ");v>0?u.setAttributeNS(g.slice(0,v),g.slice(v+1),d[g]):u.setAttribute(g,d[g])}}for(let g=f;gf)throw new RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}else{let{dom:_,contentDOM:M}=wa.renderSpec(t,v,r);if(u.appendChild(_),M){if(s)throw new RangeError("Multiple content holes");s=M}}}return{dom:u,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new wa(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=a2(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return a2(t.marks)}}function a2(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function X1(e){return e.document||window.document}const cR=65535,dR=Math.pow(2,16);function WJ(e,t){return e+t*dR}function l2(e){return e&cR}function KJ(e){return(e-(e&cR))/dR}const fR=1,pR=2,av=4,hR=8;class ZM{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&hR)>0}get deletedBefore(){return(this.delInfo&(fR|av))>0}get deletedAfter(){return(this.delInfo&(pR|av))>0}get deletedAcross(){return(this.delInfo&av)>0}}class Ss{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Ss.empty)return Ss.empty}recover(t){let n=0,r=l2(t);if(!this.inverted)for(let o=0;ot)break;let f=this.ranges[u+i],g=this.ranges[u+s],v=d+f;if(t<=v){let _=f?t==d?-1:t==v?1:n:n,M=d+o+(_<0?0:g);if(r)return M;let I=t==(n<0?d:v)?null:WJ(u/3,t-d),k=t==d?pR:t==v?fR:av;return(n<0?t!=d:t!=v)&&(k|=hR),new ZM(M,k,I)}o+=g-f}return r?t+o:new ZM(t+o,0,null)}touches(t,n){let r=0,o=l2(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let u=0;ut)break;let f=this.ranges[u+i],g=d+f;if(t<=g&&u==o*3)return!0;r+=this.ranges[u+s]-f}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new _h;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&d!s.isAtom||!u.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return bo.fromReplace(t,this.from,this.to,i)}invert(){return new Sa(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Jl(n.pos,r.pos,this.mark)}merge(t){return t instanceof Jl&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Jl(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Jl(n.from,n.to,t.markFromJSON(n.mark))}}Zi.jsonID("addMark",Jl);class Sa extends Zi{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new Ot(lT(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return bo.fromReplace(t,this.from,this.to,r)}invert(){return new Jl(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Sa(n.pos,r.pos,this.mark)}merge(t){return t instanceof Sa&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Sa(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Sa(n.from,n.to,t.markFromJSON(n.mark))}}Zi.jsonID("removeMark",Sa);class Xl extends Zi{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return bo.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return bo.fromReplace(t,this.pos,this.pos+1,new Ot(ht.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new Fo(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Fo(n.from,n.to,n.gapFrom,n.gapTo,Ot.fromJSON(t,n.slice),n.insert,!!n.structure)}}Zi.jsonID("replaceAround",Fo);function QM(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function YJ(e,t,n,r){let o=[],i=[],s,u;e.doc.nodesBetween(t,n,(d,f,g)=>{if(!d.isInline)return;let v=d.marks;if(!r.isInSet(v)&&g.type.allowsMarkType(r.type)){let _=Math.max(f,t),M=Math.min(f+d.nodeSize,n),I=r.addToSet(v);for(let k=0;ke.step(d)),i.forEach(d=>e.step(d))}function JJ(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,u)=>{if(!s.isInline)return;i++;let d=null;if(r instanceof Qy){let f=s.marks,g;for(;g=r.isInSet(f);)(d||(d=[])).push(g),f=g.removeFromSet(f)}else r?r.isInSet(s.marks)&&(d=[r]):d=s.marks;if(d&&d.length){let f=Math.min(u+s.nodeSize,n);for(let g=0;ge.step(new Sa(s.from,s.to,s.style)))}function XJ(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],s=t+1;for(let u=0;u=0;u--)e.step(i[u])}function ZJ(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Xf(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let o=e.$from.node(r),i=e.$from.index(r),s=e.$to.indexAfter(r);if(rn;I--)k||r.index(I)>0?(k=!0,g=ht.from(r.node(I).copy(g)),v++):d--;let _=ht.empty,M=0;for(let I=i,k=!1;I>n;I--)k||o.after(I+1)=0;s--){if(r.size){let u=n[s].type.contentMatch.matchFragment(r);if(!u||!u.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ht.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new Fo(o,i,o,i,new Ot(r,0,0),n.length,!0))}function rX(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,u)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&oX(e.doc,e.mapping.slice(i).map(u),r)){e.clearIncompatible(e.mapping.slice(i).map(u,1),r);let d=e.mapping.slice(i),f=d.map(u,1),g=d.map(u+s.nodeSize,1);return e.step(new Fo(f,g,f+1,g-1,new Ot(ht.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function oX(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function iX(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Fo(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new Ot(ht.from(s),0,0),1,!0))}function hf(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let f=o.depth-1,g=n-2;f>i;f--,g--){let v=o.node(f),_=o.index(f);if(v.type.spec.isolating)return!1;let M=v.content.cutByIndex(_,v.childCount),I=r&&r[g+1];I&&(M=M.replaceChild(0,I.type.create(I.attrs)));let k=r&&r[g]||v;if(!v.canReplace(_+1,v.childCount)||!k.type.validContent(M))return!1}let u=o.indexAfter(i),d=r&&r[0];return o.node(i).canReplaceWith(u,u,d?d.type:o.node(i+1).type)}function sX(e,t,n=1,r){let o=e.doc.resolve(t),i=ht.empty,s=ht.empty;for(let u=o.depth,d=o.depth-n,f=n-1;u>d;u--,f--){i=ht.from(o.node(u).copy(i));let g=r&&r[f];s=ht.from(g?g.type.create(g.attrs,s):o.node(u).copy(s))}e.step(new Ko(t,t,new Ot(i.append(s),n,n),!0))}function fd(e,t){let n=e.resolve(t),r=n.index();return mR(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function mR(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function vR(e,t,n=-1){let r=e.resolve(t);for(let o=r.depth;;o--){let i,s,u=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),u++,s=r.node(o).maybeChild(u)):(i=r.node(o).maybeChild(u-1),s=r.node(o+1)),i&&!i.isTextblock&&mR(i,s)&&r.node(o).canReplace(u,u+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function aX(e,t,n){let r=new Ko(t-n,t+n,Ot.empty,!0);e.step(r)}function lX(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let u=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,d=r.index(s)+(u>0?1:0),f=r.node(s),g=!1;if(i==1)g=f.canReplace(d,d,o);else{let v=f.contentMatchAt(d).findWrapping(o.firstChild.type);g=v&&f.canReplaceWith(d,d,v[0])}if(g)return u==0?r.pos:u<0?r.before(s+1):r.after(s+1)}return null}function uT(e,t,n=t,r=Ot.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return yR(o,i,r)?new Ko(t,n,r):new cX(o,i,r).fit()}function yR(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class cX{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=ht.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=ht.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let f=this.findFittable();f?this.placeNodes(f):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,u=o.depth;for(;s&&u&&i.childCount==1;)i=i.firstChild.content,s--,u--;let d=new Ot(i,s,u);return t>-1?new Fo(r.pos,t,this.$to.pos,this.$to.end(),d,n):d.size||r.pos!=this.$to.pos?new Ko(r.pos,o.pos,d):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Q1(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let u=this.depth;u>=0;u--){let{type:d,match:f}=this.frontier[u],g,v=null;if(n==1&&(s?f.matchType(s.type)||(v=f.fillBefore(ht.from(s),!1)):i&&d.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:u,parent:i,inject:v};if(n==2&&s&&(g=f.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:u,parent:i,wrap:g};if(i&&f.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=Q1(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Ot(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=Q1(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new Ot(Qp(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Ot(Qp(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let k=0;k1||d==0||k.content.size)&&(v=w,g.push(_R(k.mark(_.allowedMarks(k.marks)),f==1?d:0,f==u.childCount?M:-1)))}let I=f==u.childCount;I||(M=-1),this.placed=eh(this.placed,n,ht.from(g)),this.frontier[n].match=v,I&&M<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let k=0,w=u;k1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;u--){let{match:d,type:f}=this.frontier[u],g=eb(t,u,f,d,!0);if(!g||g.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=eh(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=eh(this.placed,this.depth,ht.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(ht.empty,!0);n.childCount&&(this.placed=eh(this.placed,this.frontier.length,n))}}function Qp(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Qp(e.firstChild.content,t-1,n)))}function eh(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(eh(e.lastChild.content,t-1,n)))}function Q1(e,t){for(let n=0;n1&&(r=r.replaceChild(0,_R(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(ht.empty,!0)))),e.copy(r)}function eb(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let u=r.fillBefore(i.content,!0,s);return u&&!dX(n,i.content,s)?u:null}function dX(e,t,n){for(let r=n;r0;_--,M--){let I=o.node(_).type.spec;if(I.defining||I.definingAsContext||I.isolating)break;s.indexOf(_)>-1?u=_:o.before(_)==M&&s.splice(1,0,-_)}let d=s.indexOf(u),f=[],g=r.openStart;for(let _=r.content,M=0;;M++){let I=_.firstChild;if(f.push(I),M==r.openStart)break;_=I.content}for(let _=g-1;_>=0;_--){let M=f[_].type,I=fX(M);if(I&&o.node(d).type!=M)g=_;else if(I||!M.isTextblock)break}for(let _=r.openStart;_>=0;_--){let M=(_+g+1)%(r.openStart+1),I=f[M];if(I)for(let k=0;k=0&&(e.replace(t,n,r),!(e.steps.length>v));_--){let M=s[_];M<0||(t=o.before(M),n=i.after(M))}}function bR(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(ht.empty,!0))}return e}function hX(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=lX(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new Ot(ht.from(r),0,0))}function gX(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=MR(r,o);for(let s=0;s0&&(d||r.node(u-1).canReplace(r.index(u-1),o.indexAfter(u-1))))return e.delete(r.before(u),o.after(u))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s)return e.delete(r.before(s),n);e.delete(t,n)}function MR(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}class gf extends Zi{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return bo.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return bo.fromReplace(t,this.pos,this.pos+1,new Ot(ht.from(o),0,n.isLeaf?0:1))}getMap(){return Ss.empty}invert(t){return new gf(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new gf(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new gf(n.pos,n.attr,n.value)}}Zi.jsonID("attr",gf);let Of=class extends Error{};Of=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Of.prototype=Object.create(Error.prototype);Of.prototype.constructor=Of;Of.prototype.name="TransformError";class mX{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new _h}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Of(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=Ot.empty){let o=uT(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new Ot(ht.from(r),0,0))}delete(t,n){return this.replace(t,n,Ot.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return pX(this,t,n,r),this}replaceRangeWith(t,n,r){return hX(this,t,n,r),this}deleteRange(t,n){return gX(this,t,n),this}lift(t,n){return QJ(this,t,n),this}join(t,n=1){return aX(this,t,n),this}wrap(t,n){return nX(this,t,n),this}setBlockType(t,n=t,r,o=null){return rX(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return iX(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new gf(t,n,r)),this}addNodeMark(t,n){return this.step(new Xl(t,n)),this}removeNodeMark(t,n){if(!(n instanceof dr)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Lf(t,n)),this}split(t,n=1,r){return sX(this,t,n,r),this}addMark(t,n,r){return YJ(this,t,n,r),this}removeMark(t,n,r){return JJ(this,t,n,r),this}clearIncompatible(t,n,r){return XJ(this,t,n,r),this}}const tb=Object.create(null);class Dn{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new vX(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n=0;i--){let s=n<0?Yd(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):Yd(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Ks(t.node(0))}static atStart(t){return Yd(t,t,0,0,1)||new Ks(t)}static atEnd(t){return Yd(t,t,t.content.size,t.childCount,-1)||new Ks(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=tb[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in tb)throw new RangeError("Duplicate use of selection JSON ID "+t);return tb[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Hn.between(this.$anchor,this.$head).getBookmark()}}Dn.prototype.visible=!0;class vX{constructor(t,n){this.$from=t,this.$to=n}}let c2=!1;function d2(e){!c2&&!e.parent.inlineContent&&(c2=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Hn extends Dn{constructor(t,n=t){d2(t),d2(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Dn.near(r);let o=t.resolve(n.map(this.anchor));return new Hn(o.parent.inlineContent?o:r,r)}replace(t,n=Ot.empty){if(super.replace(t,n),n==Ot.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Hn&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new e0(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Hn(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Dn.findFrom(n,r,!0)||Dn.findFrom(n,-r,!0);if(i)n=i.$head;else return Dn.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(Dn.findFrom(t,-r,!0)||Dn.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let u=t.child(s);if(u.isAtom){if(!i&&sn.isSelectable(u))return sn.create(e,n-(o<0?u.nodeSize:0))}else{let d=Yd(e,u,n+o,o<0?u.childCount:0,o,i);if(d)return d}n+=u.nodeSize*o}return null}function f2(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=g)}),e.setSelection(Dn.near(e.doc.resolve(s),n))}const p2=1,Em=2,h2=4;class _X extends mX{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Em,this}ensureMarks(t){return dr.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Em)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Em,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||dr.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),this.selection.empty||this.setSelection(Dn.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=h2,this}get scrolledIntoView(){return(this.updated&h2)>0}}function g2(e,t){return!t||!e?e:e.bind(t)}class th{constructor(t,n,r){this.name=t,this.init=g2(n.init,r),this.apply=g2(n.apply,r)}}const bX=[new th("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new th("selection",{init(e,t){return e.selection||Dn.atStart(t.doc)},apply(e){return e.selection}}),new th("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new th("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class nb{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=bX.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new th(r.key,r.spec.state,r))})}}class ef{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new nb(t.schema,t.plugins),i=new ef(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Hc.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=Dn.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let u in r){let d=r[u],f=d.spec.state;if(d.key==s.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(n,u)){i[s.name]=f.fromJSON.call(d,t,n[u],i);return}}i[s.name]=s.init(t,i)}}),i}}function IR(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=IR(o,t,{})),n[r]=o}return n}class Ua{constructor(t){this.spec=t,this.props={},t.props&&IR(t.props,this,this.props),this.key=t.key?t.key.key:CR("plugin")}getState(t){return t[this.key]}}const rb=Object.create(null);function CR(e){return e in rb?e+"$"+ ++rb[e]:(rb[e]=0,e+"$")}class Au{constructor(t="key"){this.key=CR(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Di=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},eg=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let m2=null;const Qa=function(e,t,n){let r=m2||(m2=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},nd=function(e,t,n,r){return n&&(v2(e,t,n,r,-1)||v2(e,t,n,r,1))},MX=/^(img|br|input|textarea|hr)$/i;function v2(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:_a(e))){let i=e.parentNode;if(!i||i.nodeType!=1||dT(e)||MX.test(e.nodeName)||e.contentEditable=="false")return!1;t=Di(e)+(o<0?0:1),e=i}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.contentEditable=="false")return!1;t=o<0?_a(e):0}else return!1}}function _a(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function IX(e,t,n){for(let r=t==0,o=t==_a(e);r||o;){if(e==n)return!0;let i=Di(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,o=o&&i==_a(e)}}function dT(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const t0=function(e){return e.focusNode&&nd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function cc(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function CX(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function TX(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const Oa=typeof navigator<"u"?navigator:null,y2=typeof document<"u"?document:null,Lu=Oa&&Oa.userAgent||"",eI=/Edge\/(\d+)/.exec(Lu),TR=/MSIE \d/.exec(Lu),tI=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Lu),Yi=!!(TR||tI||eI),pu=TR?document.documentMode:tI?+tI[1]:eI?+eI[1]:0,Xs=!Yi&&/gecko\/(\d+)/i.test(Lu);Xs&&+(/Firefox\/(\d+)/.exec(Lu)||[0,0])[1];const nI=!Yi&&/Chrome\/(\d+)/.exec(Lu),hi=!!nI,wX=nI?+nI[1]:0,Li=!Yi&&!!Oa&&/Apple Computer/.test(Oa.vendor),Rf=Li&&(/Mobile\/\w+/.test(Lu)||!!Oa&&Oa.maxTouchPoints>2),Cs=Rf||(Oa?/Mac/.test(Oa.platform):!1),SX=Oa?/Win/.test(Oa.platform):!1,Vs=/Android \d/.test(Lu),n0=!!y2&&"webkitFontSmoothing"in y2.documentElement.style,kX=n0?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function DX(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Wa(e,t){return typeof e=="number"?e:e[t]}function EX(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function _2(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;s=eg(s)){if(s.nodeType!=1)continue;let u=s,d=u==i.body,f=d?DX(i):EX(u),g=0,v=0;if(t.topf.bottom-Wa(r,"bottom")&&(v=t.bottom-t.top>f.bottom-f.top?t.top+Wa(o,"top")-f.top:t.bottom-f.bottom+Wa(o,"bottom")),t.leftf.right-Wa(r,"right")&&(g=t.right-f.right+Wa(o,"right")),g||v)if(d)i.defaultView.scrollBy(g,v);else{let _=u.scrollLeft,M=u.scrollTop;v&&(u.scrollTop+=v),g&&(u.scrollLeft+=g);let I=u.scrollLeft-_,k=u.scrollTop-M;t={left:t.left-I,top:t.top-k,right:t.right-I,bottom:t.bottom-k}}if(d||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function AX(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=u,o=d.top;break}}return{refDOM:r,refTop:o,stack:wR(e.dom)}}function wR(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=eg(r));return t}function LX({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;SR(n,r==0?0:r-t)}function SR(e,t){for(let n=0;n=u){s=Math.max(I.bottom,s),u=Math.min(I.top,u);let k=I.left>t.left?I.left-t.left:I.right=(I.left+I.right)/2?1:0));continue}}else I.top>t.top&&!d&&I.left<=t.left&&I.right>=t.left&&(d=g,f={left:Math.max(I.left,Math.min(I.right,t.left)),top:I.top});!n&&(t.left>=I.right&&t.top>=I.top||t.left>=I.left&&t.top>=I.bottom)&&(i=v+1)}}return!n&&d&&(n=d,o=f,r=0),n&&n.nodeType==3?RX(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:kR(n,o)}function RX(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function fT(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function NX(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function xX(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let u=e.docView.nearestDesc(i,!0);if(!u)return null;if(u.dom.nodeType==1&&(u.node.isBlock&&u.parent&&!s||!u.contentDOM)){let d=u.dom.getBoundingClientRect();if(u.node.isBlock&&u.parent&&!s&&(s=!0,d.left>r.left||d.top>r.top?o=u.posBefore:(d.right-1?o:e.docView.posFromDOM(t,n,-1)}function DR(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?u=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(u=xX(e,r,o,t))}u==null&&(u=PX(e,s,t));let d=e.docView.nearestDesc(s,!0);return{pos:u,inside:d?d.posAtStart-d.border:-1}}function b2(e){return e.top=0&&o==r.nodeValue.length?(d--,g=1):n<0?d--:f++,Bp(Fl(Qa(r,d,f),g),g<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==_a(r))){let d=r.childNodes[o-1];if(d.nodeType==1)return ob(d.getBoundingClientRect(),!1)}if(i==null&&o<_a(r)){let d=r.childNodes[o];if(d.nodeType==1)return ob(d.getBoundingClientRect(),!0)}return ob(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==_a(r))){let d=r.childNodes[o-1],f=d.nodeType==3?Qa(d,_a(d)-(s?0:1)):d.nodeType==1&&(d.nodeName!="BR"||!d.nextSibling)?d:null;if(f)return Bp(Fl(f,1),!1)}if(i==null&&o<_a(r)){let d=r.childNodes[o];for(;d.pmViewDesc&&d.pmViewDesc.ignoreForCoords;)d=d.nextSibling;let f=d?d.nodeType==3?Qa(d,0,s?0:1):d.nodeType==1?d:null:null;if(f)return Bp(Fl(f,-1),!0)}return Bp(Fl(r.nodeType==3?Qa(r):r,-n),n>=0)}function Bp(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function ob(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function AR(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function $X(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return AR(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let u=e.docView.nearestDesc(i,!0);if(!u)break;if(u.node.isBlock){i=u.contentDOM||u.dom;break}i=u.dom.parentNode}let s=ER(e,o.pos,1);for(let u=i.firstChild;u;u=u.nextSibling){let d;if(u.nodeType==1)d=u.getClientRects();else if(u.nodeType==3)d=Qa(u,0,u.nodeValue.length).getClientRects();else continue;for(let f=0;fg.top+1&&(n=="up"?s.top-g.top>(g.bottom-s.top)*2:g.bottom-s.bottom>(s.bottom-g.top)*2))return!1}}return!0})}const GX=/[\u0590-\u08ac]/;function BX(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,u=e.domSelection();return!GX.test(r.parent.textContent)||!u.modify?n=="left"||n=="backward"?i:s:AR(e,t,()=>{let{focusNode:d,focusOffset:f,anchorNode:g,anchorOffset:v}=e.domSelectionRange(),_=u.caretBidiLevel;u.modify("move",n,"character");let M=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:I,focusOffset:k}=e.domSelectionRange(),w=I&&!M.contains(I.nodeType==1?I:I.parentNode)||d==I&&f==k;try{u.collapse(g,v),d&&(d!=g||f!=v)&&u.extend&&u.extend(d,f)}catch{}return _!=null&&(u.caretBidiLevel=_),w})}let M2=null,I2=null,C2=!1;function HX(e,t,n){return M2==t&&I2==n?C2:(M2=t,I2=n,C2=n=="up"||n=="down"?$X(e,t,n):BX(e,t,n))}const As=0,T2=1,gc=2,Ra=3;class Ig{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=As,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nDi(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof OR){o=t-i;break}i=u}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof LR&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Di(i.dom)+1:0}}else{let i,s=!0;for(;i=r=g&&n<=f-d.border&&d.node&&d.contentDOM&&this.contentDOM.contains(d.contentDOM))return d.parseRange(t,n,g);t=s;for(let v=u;v>0;v--){let _=this.children[v-1];if(_.size&&_.dom.parentNode==this.contentDOM&&!_.emptyChildAt(1)){o=Di(_.dom)+1;break}t-=_.size}o==-1&&(o=0)}if(o>-1&&(f>n||u==this.children.length-1)){n=f;for(let g=u+1;gM&&sn){let M=u;u=d,d=M}let _=document.createRange();_.setEnd(d.node,d.offset),_.setStart(u.node,u.offset),f.removeAllRanges(),f.addRange(_)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let u=r+i.border,d=s-i.border;if(t>=u&&n<=d){this.dirty=t==r||n==s?gc:T2,t==u&&n==d&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Ra:i.markDirty(t-u,n-u);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?gc:Ra}r=s}this.dirty=gc}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?gc:T2;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let u=document.createElement("span");u.appendChild(s),s=u}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==As&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class qX extends Ig{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class rd extends Ig{constructor(t,n,r,o){super(t,[],r,o),this.mark=n}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=wa.renderSpec(document,n.type.spec.toDOM(n,r))),new rd(t,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&Ra||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Ra&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=As){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=iI(i,0,t,r));for(let u=0;u{if(!d)return s;if(d.parent)return d.parent.posBeforeChild(d)},r,o),g=f&&f.dom,v=f&&f.contentDOM;if(n.isText){if(!g)g=document.createTextNode(n.text);else if(g.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else g||({dom:g,contentDOM:v}=wa.renderSpec(document,n.type.spec.toDOM(n)));!v&&!n.isText&&g.nodeName!="BR"&&(g.hasAttribute("contenteditable")||(g.contentEditable="false"),n.type.spec.draggable&&(g.draggable=!0));let _=g;return g=PR(g,r,n),f?d=new VX(t,n,r,o,g,v||null,_,f,i,s+1):n.isText?new r0(t,n,r,o,g,_,i):new hu(t,n,r,o,g,v||null,_,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>ht.empty)}return t}matchesNode(t,n,r){return this.dirty==As&&t.eq(this.node)&&oI(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,u=i&&i.pos<0,d=new jX(this,s&&s.node,t);YX(this.node,this.innerDeco,(f,g,v)=>{f.spec.marks?d.syncToMarks(f.spec.marks,r,t):f.type.side>=0&&!v&&d.syncToMarks(g==this.node.childCount?dr.none:this.node.child(g).marks,r,t),d.placeWidget(f,t,o)},(f,g,v,_)=>{d.syncToMarks(f.marks,r,t);let M;d.findNodeMatch(f,g,v,_)||u&&t.state.selection.from>o&&t.state.selection.to-1&&d.updateNodeAt(f,g,v,M,t)||d.updateNextNode(f,g,v,t,_,o)||d.addNode(f,g,v,t,o),o+=f.nodeSize}),d.syncToMarks([],r,t),this.node.isTextblock&&d.addTextblockHacks(),d.destroyRest(),(d.changed||this.dirty==gc)&&(s&&this.protectLocalComposition(t,s),RR(this.contentDOM,this.children,t),Rf&&JX(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof Hn)||rn+this.node.content.size)return null;let i=t.domSelectionRange(),s=XX(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let u=s.nodeValue,d=ZX(this.node.content,u,r-n,o-n);return d<0?null:{node:s,pos:d,text:u}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new qX(this,i,n,o);t.input.compositionNodes.push(s),this.children=iI(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==Ra||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=As}updateOuterDeco(t){if(oI(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=NR(this.dom,this.nodeDOM,rI(this.outerDeco,this.node,n),rI(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function w2(e,t,n,r,o){PR(r,t,e);let i=new hu(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class r0 extends hu{constructor(t,n,r,o,i,s,u){super(t,n,r,o,i,null,s,u,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==Ra||this.dirty!=As&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=As||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=As,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new r0(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ra)}get domAtom(){return!1}}class OR extends Ig{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==As&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class VX extends hu{constructor(t,n,r,o,i,s,u,d,f,g){super(t,n,r,o,i,s,u,f,g),this.spec=d}update(t,n,r,o){if(this.dirty==Ra)return!1;if(this.spec.update){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function RR(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)u>this.index&&(this.changed=!0,this.destroyBetween(this.index,u)),this.top=this.top.children[this.index];else{let d=rd.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,d),this.top=d,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let u=this.index,d=Math.min(this.top.children.length,u+5);u0;){let u;for(;;)if(r){let f=n.children[r-1];if(f instanceof rd)n=f,r=f.children.length;else{u=f,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let d=u.node;if(d){if(d!=e.child(o-1))break;--o,i.set(u,o),s.push(u)}}return{index:o,matched:i,matches:s.reverse()}}function KX(e,t){return e.type.side-t.type.side}function YX(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let f=0;fi;)u.push(o[s++]);let _=i+g.nodeSize;if(g.isText){let I=_;s!I.inline):u.slice();r(g,M,t.forChild(i,g),v),i=_}}function JX(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function XX(e,t){for(;;){if(e.nodeType==3)return e;if(e.nodeType==1&&t>0){if(e.childNodes.length>t&&e.childNodes[t].nodeType==3)return e.childNodes[t];e=e.childNodes[t-1],t=_a(e)}else if(e.nodeType==1&&t=n){let f=u=0&&f+t.length+u>=n)return u+f;if(n==r&&d.length>=r+t.length-u&&d.slice(r-u,r-u+t.length)==t)return r}}return-1}function iI(e,t,n,r,o){let i=[];for(let s=0,u=0;s=n||g<=t?i.push(d):(fn&&i.push(d.slice(n-f,d.size,r)))}return i}function pT(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let u=r.resolve(s),d,f;if(t0(n)){for(d=u;o&&!o.node;)o=o.parent;let g=o.node;if(o&&g.isAtom&&sn.isSelectable(g)&&o.parent&&!(g.isInline&&IX(n.focusNode,n.focusOffset,o.dom))){let v=o.posBefore;f=new sn(s==v?u:r.resolve(v))}}else{let g=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(g<0)return null;d=r.resolve(g)}if(!f){let g=t=="pointer"||e.state.selection.head{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!xR(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function eZ(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,Di(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&Yi&&pu<=11&&(r.disabled=!0,r.disabled=!1)}function UR(e,t){if(t instanceof sn){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(A2(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else A2(e)}function A2(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function hT(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||Hn.between(t,n,r)}function L2(e){return e.editable&&!e.hasFocus()?!1:FR(e)}function FR(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function tZ(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return nd(t.node,t.offset,n.anchorNode,n.anchorOffset)}function sI(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&Dn.findFrom(i,t)}function dc(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function O2(e,t,n){let r=e.state.selection;if(r instanceof Hn){if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let o=sI(e.state,t);return o&&o instanceof sn?dc(e,o):!1}else if(!(Cs&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let u=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(u))&&!s.contentDOM?sn.isSelectable(i)?dc(e,new sn(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):n0?dc(e,new Hn(e.state.doc.resolve(t<0?u:u+i.nodeSize))):!1:!1}}else{if(r instanceof sn&&r.node.isInline)return dc(e,new Hn(t>0?r.$to:r.$from));{let o=sI(e.state,t);return o?dc(e,o):!1}}}function Jv(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Mh(e){if(e.contentEditable=="false")return!0;let t=e.pmViewDesc;return t&&t.size==0&&(e.nextSibling||e.nodeName!="BR")}function Hp(e,t){return t<0?nZ(e):$R(e)}function nZ(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(Xs&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let u=n.childNodes[r-1];if(Mh(u))o=n,i=--r;else if(u.nodeType==3)n=u,r=n.nodeValue.length;else break}}else{if(GR(n))break;{let u=n.previousSibling;for(;u&&Mh(u);)o=n.parentNode,i=Di(u),u=u.previousSibling;if(u)n=u,r=Jv(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?aI(e,n,r):o&&aI(e,o,i)}function $R(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Jv(n),i,s;for(;;)if(r{e.state==o&&gl(e)},50)}function R2(e,t){let n=e.state.doc.resolve(t);if(!(hi||SX)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function N2(e,t,n){let r=e.state.selection;if(r instanceof Hn&&!r.empty||n.indexOf("s")>-1||Cs&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=sI(e.state,t);if(s&&s instanceof sn)return dc(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,u=r instanceof Ks?Dn.near(s,t):Dn.findFrom(s,t);return u?dc(e,u):!1}return!1}function P2(e,t){if(!(e.state.selection instanceof Hn))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function x2(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function iZ(e){if(!Li||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;x2(e,r,"true"),setTimeout(()=>x2(e,r,"false"),20)}return!1}function sZ(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function aZ(e,t){let n=t.keyCode,r=sZ(t);if(n==8||Cs&&n==72&&r=="c")return P2(e,-1)||Hp(e,-1);if(n==46&&!t.shiftKey||Cs&&n==68&&r=="c")return P2(e,1)||Hp(e,1);if(n==13||n==27)return!0;if(n==37||Cs&&n==66&&r=="c"){let o=n==37?R2(e,e.state.selection.from)=="ltr"?-1:1:-1;return O2(e,o,r)||Hp(e,o)}else if(n==39||Cs&&n==70&&r=="c"){let o=n==39?R2(e,e.state.selection.from)=="ltr"?1:-1:1;return O2(e,o,r)||Hp(e,o)}else{if(n==38||Cs&&n==80&&r=="c")return N2(e,-1,r)||Hp(e,-1);if(n==40||Cs&&n==78&&r=="c")return iZ(e)||N2(e,1,r)||$R(e);if(r==(Cs?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function BR(e,t){e.someProp("transformCopied",M=>{t=M(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let M=r.firstChild;n.push(M.type.name,M.attrs!=M.type.defaultAttrs?M.attrs:null),r=M.content}let s=e.someProp("clipboardSerializer")||wa.fromSchema(e.state.schema),u=WR(),d=u.createElement("div");d.appendChild(s.serializeFragment(r,{document:u}));let f=d.firstChild,g,v=0;for(;f&&f.nodeType==1&&(g=jR[f.nodeName.toLowerCase()]);){for(let M=g.length-1;M>=0;M--){let I=u.createElement(g[M]);for(;d.firstChild;)I.appendChild(d.firstChild);d.appendChild(I),v++}f=d.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${o} ${i}${v?` -${v}`:""} ${JSON.stringify(n)}`);let _=e.someProp("clipboardTextSerializer",M=>M(t,e))||t.content.textBetween(0,t.content.size,` `);return{dom:d,text:_}}function HR(e,t,n,r,o){let i=o.parent.type.spec.code,s,u;if(!n&&!t)return null;let d=t&&(r||i||!n);if(d){if(e.someProp("transformPastedText",_=>{t=_(t,i||r,e)}),i)return t?new Ot(ht.from(e.state.schema.text(t.replace(/\r\n?/g,` `))),0,0):Ot.empty;let v=e.someProp("clipboardTextParser",_=>_(t,o,r,e));if(v)u=v;else{let _=o.marks(),{schema:M}=e.state,I=wa.fromSchema(M);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(k=>{let w=s.appendChild(document.createElement("p"));k&&w.appendChild(I.serializeNode(M.text(k,_)))})}}else e.someProp("transformPastedHTML",v=>{n=v(n,e)}),s=cZ(n),n0&&dZ(s);let f=s&&s.querySelector("[data-pm-slice]"),g=f&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice")||"");if(g&&g[3])for(let v=+g[3];v>0;v--){let _=s.firstChild;for(;_&&_.nodeType!=1;)_=_.nextSibling;if(!_)break;s=_}if(u||(u=(e.someProp("clipboardParser")||e.someProp("domParser")||Af.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(d||g),context:o,ruleFromNode(_){return _.nodeName=="BR"&&!_.nextSibling&&_.parentNode&&!lZ.test(_.parentNode.nodeName)?{ignore:!0}:null}})),g)u=fZ(U2(u,+g[1],+g[2]),g[4]);else if(u=Ot.maxOpen(uZ(u.content,o),!0),u.openStart||u.openEnd){let v=0,_=0;for(let M=u.content.firstChild;v{u=v(u,e)}),u}const lZ=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function uZ(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(u=>{if(!s)return;let d=o.findWrapping(u.type),f;if(!d)return s=null;if(f=s.length&&i.length&&VR(d,i,u,s[s.length-1],0))s[s.length-1]=f;else{s.length&&(s[s.length-1]=zR(s[s.length-1],i.length));let g=qR(u,d);s.push(g),o=o.matchType(g.type),i=d}}),s)return ht.from(s)}return e}function qR(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,ht.from(e));return e}function VR(e,t,n,r,o){if(o1&&(i=0),o=n&&(u=t<0?s.contentMatchAt(0).fillBefore(u,i<=o).append(u):u.append(s.contentMatchAt(s.childCount).fillBefore(ht.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(u))}function U2(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=WR().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&jR[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=e,o)for(let i=0;i=0;u-=2){let d=n.nodes[r[u]];if(!d||d.hasRequiredAttrs())break;o=ht.from(d.create(r[u+1],o)),i++,s++}return new Ot(o,i,s)}const Oi={},Ri={},pZ={touchstart:!0,touchmove:!0};class hZ{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function gZ(e){for(let t in Oi){let n=Oi[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{vZ(e,r)&&!gT(e,r)&&(e.editable||!(r.type in Ri))&&n(e,r)},pZ[t]?{passive:!0}:void 0)}Li&&e.dom.addEventListener("input",()=>null),uI(e)}function Zl(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function mZ(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function uI(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>gT(e,r))})}function gT(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function vZ(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function yZ(e,t){!gT(e,t)&&Oi[t.type]&&(e.editable||!(t.type in Ri))&&Oi[t.type](e,t)}Ri.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!YR(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Vs&&hi&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Rf&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,cc(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||aZ(e,n)?n.preventDefault():Zl(e,"key")};Ri.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Ri.keypress=(e,t)=>{let n=t;if(YR(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Cs&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Hn)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function o0(e){return{left:e.clientX,top:e.clientY}}function _Z(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function mT(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,u=>s>i.depth?u(e,n,i.nodeAfter,i.before(s),o,!0):u(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function mf(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function bZ(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&sn.isSelectable(r)?(mf(e,new sn(n),"pointer"),!0):!1}function MZ(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof sn&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let u=s>i.depth?i.nodeAfter:i.node(s);if(sn.isSelectable(u)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(mf(e,sn.create(e.state.doc,o),"pointer"),!0):!1}function IZ(e,t,n,r,o){return mT(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?MZ(e,n):bZ(e,n))}function CZ(e,t,n,r){return mT(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function TZ(e,t,n,r){return mT(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||wZ(e,n,r)}function wZ(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(mf(e,Hn.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),u=o.before(i);if(s.inlineContent)mf(e,Hn.create(r,u+1,u+1+s.content.size),"pointer");else if(sn.isSelectable(s))mf(e,sn.create(r,u),"pointer");else continue;return!0}}function vT(e){return Xv(e)}const KR=Cs?"metaKey":"ctrlKey";Oi.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=vT(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&_Z(n,e.input.lastClick)&&!n[KR]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=e.posAtCoords(o0(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new SZ(e,s,n,!!r)):(i=="doubleClick"?CZ:TZ)(e,s.pos,s.inside,n)?n.preventDefault():Zl(e,"pointer"))};class SZ{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[KR],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let g=t.state.doc.resolve(n.pos);i=g.parent,s=g.depth?g.before():0}const u=o?null:r.target,d=u?t.docView.nearestDesc(u,!0):null;this.target=d?d.dom:null;let{selection:f}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||f instanceof sn&&f.from<=s&&f.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Xs&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Zl(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>gl(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(o0(t))),this.updateAllowDefault(t),this.allowDefault||!n?Zl(this.view,"pointer"):IZ(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Li&&this.mightDrag&&!this.mightDrag.node.isAtom||hi&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(mf(this.view,Dn.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):Zl(this.view,"pointer")}move(t){this.updateAllowDefault(t),Zl(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Oi.touchstart=e=>{e.input.lastTouch=Date.now(),vT(e),Zl(e,"pointer")};Oi.touchmove=e=>{e.input.lastTouch=Date.now(),Zl(e,"pointer")};Oi.contextmenu=e=>vT(e);function YR(e,t){return e.composing?!0:Li&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const kZ=Vs?5e3:-1;Ri.compositionstart=Ri.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Xv(e,!0),e.markCursor=null;else if(Xv(e),Xs&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){e.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}JR(e,kZ)};Ri.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,JR(e,20))};function JR(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Xv(e),t))}function XR(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=DZ());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function DZ(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Xv(e,t=!1){if(!(Vs&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),XR(e),t||e.docView&&e.docView.dirty){let n=pT(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function EZ(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const Nf=Yi&&pu<15||Rf&&kX<604;Oi.copy=Ri.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=Nf?null:n.clipboardData,s=r.content(),{dom:u,text:d}=BR(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",u.innerHTML),i.setData("text/plain",d)):EZ(e,u),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function AZ(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function LZ(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?tg(e,r.value,null,o,t):tg(e,r.textContent,r.innerHTML,o,t)},50)}function tg(e,t,n,r,o){let i=HR(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",d=>d(e,o,i||Ot.empty)))return!0;if(!i)return!1;let s=AZ(i),u=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(u.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Ri.paste=(e,t)=>{let n=t;if(e.composing&&!Vs)return;let r=Nf?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&tg(e,r.getData("text/plain"),r.getData("text/html"),o,n)?n.preventDefault():LZ(e,n)};class OZ{constructor(t,n){this.slice=t,this.move=n}}const ZR=Cs?"altKey":"ctrlKey";Oi.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(o0(n));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof sn?o.to-1:o.to))){if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(sn.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&n.target.nodeType==1){let f=e.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=e.docView&&e.dispatch(e.state.tr.setSelection(sn.create(e.state.doc,f.posBefore)))}}let s=e.state.selection.content(),{dom:u,text:d}=BR(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(Nf?"Text":"text/html",u.innerHTML),n.dataTransfer.effectAllowed="copyMove",Nf||n.dataTransfer.setData("text/plain",d),e.dragging=new OZ(s,!n[ZR])};Oi.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Ri.dragover=Ri.dragenter=(e,t)=>t.preventDefault();Ri.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(o0(n));if(!o)return;let i=e.state.doc.resolve(o.pos),s=r&&r.slice;s?e.someProp("transformPasted",I=>{s=I(s,e)}):s=HR(e,n.dataTransfer.getData(Nf?"Text":"text/plain"),Nf?null:n.dataTransfer.getData("text/html"),!1,i);let u=!!(r&&!n[ZR]);if(e.someProp("handleDrop",I=>I(e,n,s||Ot.empty,u))){n.preventDefault();return}if(!s)return;n.preventDefault();let d=s?uX(e.state.doc,i.pos,s):i.pos;d==null&&(d=i.pos);let f=e.state.tr;u&&f.deleteSelection();let g=f.mapping.map(d),v=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,_=f.doc;if(v?f.replaceRangeWith(g,g,s.content.firstChild):f.replaceRange(g,g,s),f.doc.eq(_))return;let M=f.doc.resolve(g);if(v&&sn.isSelectable(s.content.firstChild)&&M.nodeAfter&&M.nodeAfter.sameMarkup(s.content.firstChild))f.setSelection(new sn(M));else{let I=f.mapping.map(d);f.mapping.maps[f.mapping.maps.length-1].forEach((k,w,S,L)=>I=L),f.setSelection(hT(e,M,f.doc.resolve(I)))}e.focus(),e.dispatch(f.setMeta("uiEvent","drop"))};Oi.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&gl(e)},20))};Oi.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Oi.beforeinput=(e,t)=>{if(hi&&Vs&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,cc(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in Ri)Oi[e]=Ri[e];function ng(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class yT{constructor(t,n){this.toDOM=t,this.spec=n||qc,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new as(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof yT&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ng(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class gu{constructor(t,n){this.attrs=t,this.spec=n||qc}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new as(i,s,this)}valid(t,n){return n.from=t&&(!i||i(u.spec))&&r.push(u.copy(u.from+o,u.to+o))}for(let s=0;st){let u=this.children[s]+1;this.children[s+2].findInner(t-u,n-u,r,o+u,i)}}map(t,n,r){return this==li||t.maps.length==0?this:this.mapInner(t,n,0,0,r||qc)}mapInner(t,n,r,o,i){let s;for(let u=0;u{let f=d+r,g;if(g=eN(n,u,f)){for(o||(o=this.children.slice());iu&&v.to=t){this.children[u]==t&&(r=this.children[u+2]);break}let i=t+1,s=i+n.content.size;for(let u=0;ui&&d.type instanceof gu){let f=Math.max(i,d.from)-i,g=Math.min(s,d.to)-i;fo.map(t,n,qc));return zl.from(r)}forChild(t,n){if(n.isLeaf)return fo.empty;let r=[];for(let o=0;on instanceof fo)?t:t.reduce((n,r)=>n.concat(r instanceof fo?r:r.members),[]))}}}function RZ(e,t,n,r,o,i,s){let u=e.slice();for(let f=0,g=i;f{let w=k-I-(M-_);for(let S=0;SL+g-v)continue;let A=u[S]+g-v;M>=A?u[S+1]=_<=A?-2:-1:I>=o&&w&&(u[S]+=w,u[S+1]+=w)}v+=w}),g=n.maps[f].map(g,-1)}let d=!1;for(let f=0;f=r.content.size){d=!0;continue}let _=n.map(e[f+1]+i,-1),M=_-o,{index:I,offset:k}=r.content.findIndex(v),w=r.maybeChild(I);if(w&&k==v&&k+w.nodeSize==M){let S=u[f+2].mapInner(n,w,g+1,e[f]+i+1,s);S!=li?(u[f]=v,u[f+1]=M,u[f+2]=S):(u[f+1]=-2,d=!0)}else d=!0}if(d){let f=NZ(u,e,t,n,o,i,s),g=Zv(f,r,0,s);t=g.local;for(let v=0;vn&&s.to{let f=eN(e,u,d+n);if(f){i=!0;let g=Zv(f,u,n+d+1,r);g!=li&&o.push(d,d+u.nodeSize,g)}});let s=QR(i?tN(e):e,-n).sort(Vc);for(let u=0;u0;)t++;e.splice(t,0,n)}function sb(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=li&&t.push(r)}),e.cursorWrapper&&t.push(fo.create(e.state.doc,[e.cursorWrapper.deco])),zl.from(t)}const PZ={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},xZ=Yi&&pu<=11;class UZ{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class FZ{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new UZ,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),xZ&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,PZ)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(L2(this.view)){if(this.suppressingSelectionUpdates)return gl(this.view);if(Yi&&pu<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&nd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=eg(i))n.add(i);for(let i=t.anchorNode;i;i=eg(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&L2(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,u=!1,d=[];if(t.editable)for(let g=0;g1){let g=d.filter(v=>v.nodeName=="BR");if(g.length==2){let v=g[0],_=g[1];v.parentNode&&v.parentNode.parentNode==_.parentNode?_.remove():v.remove()}}let f=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),$Z(t)),this.handleDOMChange(i,s,u,d),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||gl(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let g=0;go;w--){let S=r.childNodes[w-1],L=S.pmViewDesc;if(S.nodeName=="BR"&&!L){i=w;break}if(!L||L.size)break}let v=e.state.doc,_=e.someProp("domParser")||Af.fromSchema(e.state.schema),M=v.resolve(s),I=null,k=_.parse(r,{topNode:M.parent,topMatch:M.parent.contentMatchAt(M.index()),topOpen:!0,from:o,to:i,preserveWhitespace:M.parent.type.whitespace=="pre"?"full":!0,findPositions:f,ruleFromNode:HZ,context:M});if(f&&f[0].pos!=null){let w=f[0].pos,S=f[1]&&f[1].pos;S==null&&(S=w),I={anchor:w+s,head:S+s}}return{doc:k,sel:I,from:s,to:u}}function HZ(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Li&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Li&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const qZ=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function VZ(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let j=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,$=pT(e,j);if($&&!e.state.selection.eq($)){if(hi&&Vs&&e.input.lastKeyCode===13&&Date.now()-100T(e,cc(13,"Enter"))))return;let R=e.state.tr.setSelection($);j=="pointer"?R.setMeta("pointer",!0):j=="key"&&R.scrollIntoView(),i&&R.setMeta("composition",i),e.dispatch(R)}return}let s=e.state.doc.resolve(t),u=s.sharedDepth(n);t=s.before(u+1),n=e.state.doc.resolve(n).after(u+1);let d=e.state.selection,f=BZ(e,t,n),g=e.state.doc,v=g.slice(f.from,f.to),_,M;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Vs)&&o.some(j=>j.nodeType==1&&!qZ.test(j.nodeName))&&(!I||I.endA>=I.endB)&&e.someProp("handleKeyDown",j=>j(e,cc(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!I)if(r&&d instanceof Hn&&!d.empty&&d.$head.sameParent(d.$anchor)&&!e.composing&&!(f.sel&&f.sel.anchor!=f.sel.head))I={start:d.from,endA:d.to,endB:d.to};else{if(f.sel){let j=H2(e,e.state.doc,f.sel);if(j&&!j.eq(e.state.selection)){let $=e.state.tr.setSelection(j);i&&$.setMeta("composition",i),e.dispatch($)}}return}if(hi&&e.cursorWrapper&&f.sel&&f.sel.anchor==e.cursorWrapper.deco.from&&f.sel.head==f.sel.anchor){let j=I.endB-I.start;f.sel={anchor:f.sel.anchor+j,head:f.sel.anchor+j}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&I.start<=e.state.selection.from+2&&e.state.selection.from>=f.from?I.start=e.state.selection.from:I.endA=e.state.selection.to-2&&e.state.selection.to<=f.to&&(I.endB+=e.state.selection.to-I.endA,I.endA=e.state.selection.to)),Yi&&pu<=11&&I.endB==I.start+1&&I.endA==I.start&&I.start>f.from&&f.doc.textBetween(I.start-f.from-1,I.start-f.from+1)=="  "&&(I.start--,I.endA--,I.endB--);let k=f.doc.resolveNoCache(I.start-f.from),w=f.doc.resolveNoCache(I.endB-f.from),S=g.resolve(I.start),L=k.sameParent(w)&&k.parent.inlineContent&&S.end()>=I.endA,A;if((Rf&&e.input.lastIOSEnter>Date.now()-225&&(!L||o.some(j=>j.nodeName=="DIV"||j.nodeName=="P"))||!L&&k.posj(e,cc(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>I.start&&jZ(g,I.start,I.endA,k,w)&&e.someProp("handleKeyDown",j=>j(e,cc(8,"Backspace")))){Vs&&hi&&e.domObserver.suppressSelectionUpdates();return}hi&&Vs&&I.endB==I.start&&(e.input.lastAndroidDelete=Date.now()),Vs&&!L&&k.start()!=w.start()&&w.parentOffset==0&&k.depth==w.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==I.endA&&(I.endB-=2,w=f.doc.resolveNoCache(I.endB-f.from),setTimeout(()=>{e.someProp("handleKeyDown",function(j){return j(e,cc(13,"Enter"))})},20));let O=I.start,H=I.endA,q,P,B;if(L){if(k.pos==w.pos)Yi&&pu<=11&&k.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>gl(e),20)),q=e.state.tr.delete(O,H),P=g.resolve(I.start).marksAcross(g.resolve(I.endA));else if(I.endA==I.endB&&(B=zZ(k.parent.content.cut(k.parentOffset,w.parentOffset),S.parent.content.cut(S.parentOffset,I.endA-S.start()))))q=e.state.tr,B.type=="add"?q.addMark(O,H,B.mark):q.removeMark(O,H,B.mark);else if(k.parent.child(k.index()).isText&&k.index()==w.index()-(w.textOffset?0:1)){let j=k.parent.textBetween(k.parentOffset,w.parentOffset);if(e.someProp("handleTextInput",$=>$(e,O,H,j)))return;q=e.state.tr.insertText(j,O,H)}}if(q||(q=e.state.tr.replace(O,H,f.doc.slice(I.start-f.from,I.endB-f.from))),f.sel){let j=H2(e,q.doc,f.sel);j&&!(hi&&Vs&&e.composing&&j.empty&&(I.start!=I.endB||e.input.lastAndroidDeletet.content.size?null:hT(e,t.resolve(n.anchor),t.resolve(n.head))}function zZ(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,u,d;for(let g=0;gg.mark(u.addToSet(g.marks));else if(o.length==0&&i.length==1)u=i[0],s="remove",d=g=>g.mark(u.removeFromSet(g.marks));else return null;let f=[];for(let g=0;gn||ab(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function WZ(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:u}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let d=Math.max(0,i-Math.min(s,u));r-=s+d-i}if(s=s?i-r:0;i-=d,u=i+(u-s),s=i}else if(u=u?i-r:0;i-=d,s=i+(s-u),u=i}return{start:i,endA:s,endB:u}}class KZ{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new hZ,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(W2),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=z2(this),V2(this),this.nodeViews=j2(this),this.docView=w2(this.state.doc,q2(this),sb(this),this.dom,this),this.domObserver=new FZ(this,(r,o,i,s)=>VZ(this,r,o,i,s)),this.domObserver.start(),gZ(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&uI(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(W2),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){let r=this.state,o=!1,i=!1;t.storedMarks&&this.composing&&(XR(this),i=!0),this.state=t;let s=r.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let _=j2(this);JZ(_,this.nodeViews)&&(this.nodeViews=_,o=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&uI(this),this.editable=z2(this),V2(this);let u=sb(this),d=q2(this),f=r.plugins!=t.plugins&&!r.doc.eq(t.doc)?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",g=o||!this.docView.matchesNode(t.doc,d,u);(g||!t.selection.eq(r.selection))&&(i=!0);let v=f=="preserve"&&i&&this.dom.style.overflowAnchor==null&&AX(this);if(i){this.domObserver.stop();let _=g&&(Yi||hi)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&YZ(r.selection,t.selection);if(g){let M=hi?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(t.doc,d,u,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=w2(t.doc,d,u,this.dom,this)),M&&!this.trackWrites&&(_=!0)}_||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&tZ(this))?gl(this,_):(UR(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),f=="reset"?this.dom.scrollTop=0:f=="to selection"?this.scrollToSelection():v&&LX(v)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof sn){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&_2(this,n.getBoundingClientRect(),t)}else _2(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;nn.ownerDocument.getSelection()),this._root=n}return t||document}posAtCoords(t){return UX(this,t)}coordsAtPos(t,n=1){return ER(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return HX(this,n||this.state,t)}pasteHTML(t,n){return tg(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return tg(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(mZ(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],sb(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return yZ(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return Li&&this.root.nodeType===11&&CX(this.dom.ownerDocument)==this.dom?GZ(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function q2(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[as.node(0,e.state.doc.content.size,t)]}function V2(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:as.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function z2(e){return!e.someProp("editable",t=>t(e.state)===!1)}function YZ(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function j2(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function JZ(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function W2(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Cu={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Qv={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},XZ=typeof navigator<"u"&&/Mac/.test(navigator.platform),ZZ=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Yo=0;Yo<10;Yo++)Cu[48+Yo]=Cu[96+Yo]=String(Yo);for(var Yo=1;Yo<=24;Yo++)Cu[Yo+111]="F"+Yo;for(var Yo=65;Yo<=90;Yo++)Cu[Yo]=String.fromCharCode(Yo+32),Qv[Yo]=String.fromCharCode(Yo);for(var lb in Cu)Qv.hasOwnProperty(lb)||(Qv[lb]=Cu[lb]);function QZ(e){var t=XZ&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||ZZ&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Qv:Cu)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const eQ=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function tQ(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let u=0;u127)&&(i=Cu[r.keyCode])&&i!=o){let u=t[ub(i,r)];if(u&&u(n.state,n.dispatch,n))return!0}}return!1}}const iQ=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function sQ(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const aQ=(e,t,n)=>{let r=sQ(e,n);if(!r)return!1;let o=nN(r);if(!o){let s=r.blockRange(),u=s&&Xf(s);return u==null?!1:(t&&t(e.tr.lift(s,u).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&iN(e,o,t))return!0;if(r.parent.content.size==0&&(Pf(i,"end")||sn.isSelectable(i))){let s=uT(e.doc,r.before(),r.after(),Ot.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=nN(r)}let s=i&&i.nodeBefore;return!s||!sn.isSelectable(s)?!1:(t&&t(e.tr.setSelection(sn.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function nN(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function uQ(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=uQ(e,n);if(!r)return!1;let o=rN(r);if(!o)return!1;let i=o.nodeAfter;if(iN(e,o,t))return!0;if(r.parent.content.size==0&&(Pf(i,"start")||sn.isSelectable(i))){let s=uT(e.doc,r.before(),r.after(),Ot.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof sn,o;if(r){if(n.node.isTextblock||!fd(e.doc,n.from))return!1;o=n.from}else if(o=vR(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(sn.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},pQ=(e,t)=>{let n=e.selection,r;if(n instanceof sn){if(n.node.isTextblock||!fd(e.doc,n.to))return!1;r=n.to}else if(r=vR(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},hQ=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Xf(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},gQ=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` `).scrollIntoView()),!0)};function oN(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=oN(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let u=n.after(),d=e.tr.replaceWith(u,u,s.createAndFill());d.setSelection(Dn.near(d.doc.resolve(u),1)),t(d.scrollIntoView())}return!0},vQ=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Ks||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=oN(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(hf(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Xf(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},_Q=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(sn.create(e.doc,o))),!0)};function bQ(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||fd(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function iN(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(bQ(e,t,n))return!0;let u=t.parent.canReplace(t.index(),t.index()+1);if(u&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(n){let v=t.pos+o.nodeSize,_=ht.empty;for(let k=i.length-1;k>=0;k--)_=ht.from(i[k].create(null,_));_=ht.from(r.copy(_));let M=e.tr.step(new Fo(t.pos-1,v,t.pos,v,new Ot(_,1,0),i.length,!0)),I=v+2*i.length;fd(M.doc,I)&&M.join(I),n(M.scrollIntoView())}return!0}let d=Dn.findFrom(t,1),f=d&&d.$from.blockRange(d.$to),g=f&&Xf(f);if(g!=null&&g>=t.depth)return n&&n(e.tr.lift(f,g).scrollIntoView()),!0;if(u&&Pf(o,"start",!0)&&Pf(r,"end")){let v=r,_=[];for(;_.push(v),!v.isTextblock;)v=v.lastChild;let M=o,I=1;for(;!M.isTextblock;M=M.firstChild)I++;if(v.canReplace(v.childCount,v.childCount,M.content)){if(n){let k=ht.empty;for(let S=_.length-1;S>=0;S--)k=ht.from(_[S].copy(k));let w=e.tr.step(new Fo(t.pos-_.length,t.pos+o.nodeSize,t.pos+I,t.pos+o.nodeSize-I,new Ot(k,_.length,0),0,!0));n(w.scrollIntoView())}return!0}}return!1}function sN(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(Hn.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const MQ=sN(-1),IQ=sN(1);function CQ(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),u=s&&gR(s,e,t);return u?(r&&r(n.tr.wrap(s,u).scrollIntoView()),!0):!1}}function K2(e,t=null){return function(n,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!d.isTextblock||d.hasMarkup(e,t)))if(d.type==e)o=!0;else{let g=n.doc.resolve(f),v=g.index();o=g.parent.canReplaceWith(v,v+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s=2&&o.node(s.depth-1).type.compatibleContent(e)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let g=n.doc.resolve(s.start-2);d=new jv(g,g,s.depth),s.endIndex=0;g--)i=ht.from(n[g].type.create(n[g].attrs,i));e.step(new Fo(t.start-(r?2:0),t.end,t.start,t.end,new Ot(i,0,0),n.length,!0));let s=0;for(let g=0;gs.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?kQ(t,n,e,i):DQ(t,n,i):!0:!1}}function kQ(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);ik;I--)M-=o.child(I).nodeSize,r.delete(M-1,M+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let u=n.startIndex==0,d=n.endIndex==o.childCount,f=i.node(-1),g=i.index(-1);if(!f.canReplace(g+(u?0:1),g+1,s.content.append(d?ht.empty:ht.from(o))))return!1;let v=i.pos,_=v+s.nodeSize;return r.step(new Fo(v-(u?1:0),_+(d?1:0),v+1,_-1,new Ot((u?ht.empty:ht.from(o.copy(ht.empty))).append(d?ht.empty:ht.from(o.copy(ht.empty))),u?0:1,d?0:1),u?0:1)),t(r.scrollIntoView()),!0}function EQ(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,f=>f.childCount>0&&f.firstChild.type==e);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let u=i.parent,d=u.child(s-1);if(d.type!=e)return!1;if(n){let f=d.lastChild&&d.lastChild.type==u.type,g=ht.from(f?e.create():null),v=new Ot(ht.from(e.create(null,ht.from(u.type.create(null,g)))),f?3:1,0),_=i.start,M=i.end;n(t.tr.step(new Fo(_-(f?3:1),M,_,M,v,1,!0)).scrollIntoView())}return!0}}function i0(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}class s0{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:n,state:r}=this,{view:o}=n,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([u,d])=>[u,(...g)=>{const v=d(...g)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),v}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,u=[],d=!!t,f=t||i.tr,g=()=>(!d&&n&&!f.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(f),u.every(_=>_===!0)),v={...Object.fromEntries(Object.entries(r).map(([_,M])=>[_,(...k)=>{const w=this.buildProps(f,n),S=M(...k)(w);return u.push(S),v}])),run:g};return v}createCan(t){const{rawCommands:n,state:r}=this,o=!1,i=t||r.tr,s=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...g)=>f(...g)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o;i.storedMarks&&t.setStoredMarks(i.storedMarks);const u={tr:t,editor:o,view:s,state:i0({state:i,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([d,f])=>[d,(...g)=>f(...g)(u)]))}};return u}}class AQ{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){const r=this.callbacks[t];return r&&r.forEach(o=>o.apply(this,n)),this}off(t,n){const r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(o=>o!==n):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function $t(e,t,n){return e.config[t]===void 0&&e.parent?$t(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?$t(e.parent,t,n):null}):e.config[t]}function a0(e){const t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function aN(e){const t=[],{nodeExtensions:n,markExtensions:r}=a0(e),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{const u={name:s.name,options:s.options,storage:s.storage},d=$t(s,"addGlobalAttributes",u);if(!d)return;d().forEach(g=>{g.types.forEach(v=>{Object.entries(g.attributes).forEach(([_,M])=>{t.push({type:v,name:_,attribute:{...i,...M}})})})})}),o.forEach(s=>{const u={name:s.name,options:s.options,storage:s.storage},d=$t(s,"addAttributes",u);if(!d)return;const f=d();Object.entries(f).forEach(([g,v])=>{const _={...i,...v};typeof(_==null?void 0:_.default)=="function"&&(_.default=_.default()),_!=null&&_.isRequired&&(_==null?void 0:_.default)===void 0&&delete _.default,t.push({type:s.name,name:g,attribute:_})})}),t}function $o(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function Cg(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}o==="class"?r[o]=[r[o],i].join(" "):o==="style"?r[o]=[r[o],i].join("; "):r[o]=i}),r},{})}function cI(e,t){return t.filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>Cg(n,r),{})}function lN(e){return typeof e=="function"}function On(e,t=void 0,...n){return lN(e)?t?e.bind(t)(...n):e(...n):e}function LQ(e={}){return Object.keys(e).length===0&&e.constructor===Object}function OQ(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function Y2(e,t){return e.style?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const o=t.reduce((i,s)=>{const u=s.attribute.parseHTML?s.attribute.parseHTML(n):OQ(n.getAttribute(s.name));return u==null?i:{...i,[s.name]:u}},{});return{...r,...o}}}}function J2(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&LQ(n)?!1:n!=null))}function RQ(e,t){var n;const r=aN(e),{nodeExtensions:o,markExtensions:i}=a0(e),s=(n=o.find(f=>$t(f,"topNode")))===null||n===void 0?void 0:n.name,u=Object.fromEntries(o.map(f=>{const g=r.filter(S=>S.type===f.name),v={name:f.name,options:f.options,storage:f.storage,editor:t},_=e.reduce((S,L)=>{const A=$t(L,"extendNodeSchema",v);return{...S,...A?A(f):{}}},{}),M=J2({..._,content:On($t(f,"content",v)),marks:On($t(f,"marks",v)),group:On($t(f,"group",v)),inline:On($t(f,"inline",v)),atom:On($t(f,"atom",v)),selectable:On($t(f,"selectable",v)),draggable:On($t(f,"draggable",v)),code:On($t(f,"code",v)),defining:On($t(f,"defining",v)),isolating:On($t(f,"isolating",v)),attrs:Object.fromEntries(g.map(S=>{var L;return[S.name,{default:(L=S==null?void 0:S.attribute)===null||L===void 0?void 0:L.default}]}))}),I=On($t(f,"parseHTML",v));I&&(M.parseDOM=I.map(S=>Y2(S,g)));const k=$t(f,"renderHTML",v);k&&(M.toDOM=S=>k({node:S,HTMLAttributes:cI(S,g)}));const w=$t(f,"renderText",v);return w&&(M.toText=w),[f.name,M]})),d=Object.fromEntries(i.map(f=>{const g=r.filter(w=>w.type===f.name),v={name:f.name,options:f.options,storage:f.storage,editor:t},_=e.reduce((w,S)=>{const L=$t(S,"extendMarkSchema",v);return{...w,...L?L(f):{}}},{}),M=J2({..._,inclusive:On($t(f,"inclusive",v)),excludes:On($t(f,"excludes",v)),group:On($t(f,"group",v)),spanning:On($t(f,"spanning",v)),code:On($t(f,"code",v)),attrs:Object.fromEntries(g.map(w=>{var S;return[w.name,{default:(S=w==null?void 0:w.attribute)===null||S===void 0?void 0:S.default}]}))}),I=On($t(f,"parseHTML",v));I&&(M.parseDOM=I.map(w=>Y2(w,g)));const k=$t(f,"renderHTML",v);return k&&(M.toDOM=w=>k({mark:w,HTMLAttributes:cI(w,g)})),[f.name,M]}));return new GJ({topNode:s,nodes:u,marks:d})}function cb(e,t){return t.nodes[e]||t.marks[e]||null}function X2(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}const NQ=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,s,u)=>{var d,f;const g=((f=(d=o.type.spec).toText)===null||f===void 0?void 0:f.call(d,{node:o,pos:i,parent:s,index:u}))||o.textContent||"%leaf%";n+=g.slice(0,Math.max(0,r-i))}),n};function MT(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class PQ{constructor(t){this.find=t.find,this.handler=t.handler}}const xQ=(e,t)=>{if(MT(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function db(e){var t;const{editor:n,from:r,to:o,text:i,rules:s,plugin:u}=e,{view:d}=n;if(d.composing)return!1;const f=d.state.doc.resolve(r);if(f.parent.type.spec.code||!((t=f.nodeBefore||f.nodeAfter)===null||t===void 0)&&t.marks.find(_=>_.type.spec.code))return!1;let g=!1;const v=NQ(f)+i;return s.forEach(_=>{if(g)return;const M=xQ(v,_.find);if(!M)return;const I=d.state.tr,k=i0({state:d.state,transaction:I}),w={from:r-(M[0].length-i.length),to:o},{commands:S,chain:L,can:A}=new s0({editor:n,state:k});_.handler({state:k,range:w,match:M,commands:S,chain:L,can:A})===null||!I.steps.length||(I.setMeta(u,{transform:I,from:r,to:o,text:i}),d.dispatch(I),g=!0)}),g}function UQ(e){const{editor:t,rules:n}=e,r=new Ua({state:{init(){return null},apply(o,i){const s=o.getMeta(r);return s||(o.selectionSet||o.docChanged?null:i)}},props:{handleTextInput(o,i,s,u){return db({editor:t,from:i,to:s,text:u,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&db({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?db({editor:t,from:s.pos,to:s.pos,text:` `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function FQ(e){return typeof e=="number"}const $Q=(e,t)=>{if(MT(t))return[...e.matchAll(t)];const n=t(e);return n?n.map(r=>{const o=[r.text];return o.index=r.index,o.input=e,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function GQ(e){const{editor:t,state:n,from:r,to:o,rule:i}=e,{commands:s,chain:u,can:d}=new s0({editor:t,state:n}),f=[];return n.doc.nodesBetween(r,o,(v,_)=>{if(!v.isTextblock||v.type.spec.code)return;const M=Math.max(r,_),I=Math.min(o,_+v.content.size),k=v.textBetween(M-_,I-_,void 0,"");$Q(k,i.find).forEach(S=>{if(S.index===void 0)return;const L=M+S.index+1,A=L+S[0].length,O={from:n.tr.mapping.map(L),to:n.tr.mapping.map(A)},H=i.handler({state:n,range:O,match:S,commands:s,chain:u,can:d});f.push(H)})}),f.every(v=>v!==null)}function BQ(e){const{editor:t,rules:n}=e;let r=null,o=!1,i=!1;return n.map(u=>new Ua({view(d){const f=g=>{var v;r=!((v=d.dom.parentElement)===null||v===void 0)&&v.contains(g.target)?d.dom.parentElement:null};return window.addEventListener("dragstart",f),{destroy(){window.removeEventListener("dragstart",f)}}},props:{handleDOMEvents:{drop:d=>(i=r===d.dom.parentElement,!1),paste:(d,f)=>{var g;const v=(g=f.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return o=!!(v!=null&&v.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,g)=>{const v=d[0],_=v.getMeta("uiEvent")==="paste"&&!o,M=v.getMeta("uiEvent")==="drop"&&!i;if(!_&&!M)return;const I=f.doc.content.findDiffStart(g.doc.content),k=f.doc.content.findDiffEnd(g.doc.content);if(!FQ(I)||!k||I===k.b)return;const w=g.tr,S=i0({state:g,transaction:w});if(!(!GQ({editor:t,state:S,from:Math.max(I-1,0),to:k.b-1,rule:u})||!w.steps.length))return w}}))}function HQ(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return[...new Set(t)]}class tf{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=tf.resolve(t),this.schema=RQ(this.extensions,n),this.extensions.forEach(r=>{var o;this.editor.extensionStorage[r.name]=r.storage;const i={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:cb(r.name,this.schema)};r.type==="mark"&&(!((o=On($t(r,"keepOnSplit",i)))!==null&&o!==void 0)||o)&&this.splittableMarks.push(r.name);const s=$t(r,"onBeforeCreate",i);s&&this.editor.on("beforeCreate",s);const u=$t(r,"onCreate",i);u&&this.editor.on("create",u);const d=$t(r,"onUpdate",i);d&&this.editor.on("update",d);const f=$t(r,"onSelectionUpdate",i);f&&this.editor.on("selectionUpdate",f);const g=$t(r,"onTransaction",i);g&&this.editor.on("transaction",g);const v=$t(r,"onFocus",i);v&&this.editor.on("focus",v);const _=$t(r,"onBlur",i);_&&this.editor.on("blur",_);const M=$t(r,"onDestroy",i);M&&this.editor.on("destroy",M)})}static resolve(t){const n=tf.sort(tf.flatten(t)),r=HQ(n.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},o=$t(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(t){return t.sort((r,o)=>{const i=$t(r,"priority")||100,s=$t(o,"priority")||100;return i>s?-1:i{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:cb(n.name,this.schema)},o=$t(n,"addCommands",r);return o?{...t,...o()}:t},{})}get plugins(){const{editor:t}=this,n=tf.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(s=>{const u={name:s.name,options:s.options,storage:s.storage,editor:t,type:cb(s.name,this.schema)},d=[],f=$t(s,"addKeyboardShortcuts",u);let g={};if(s.type==="mark"&&s.config.exitable&&(g.ArrowRight=()=>ny.handleExit({editor:t,mark:s})),f){const k=Object.fromEntries(Object.entries(f()).map(([w,S])=>[w,()=>S({editor:t})]));g={...g,...k}}const v=rQ(g);d.push(v);const _=$t(s,"addInputRules",u);X2(s,t.options.enableInputRules)&&_&&r.push(..._());const M=$t(s,"addPasteRules",u);X2(s,t.options.enablePasteRules)&&M&&o.push(...M());const I=$t(s,"addProseMirrorPlugins",u);if(I){const k=I();d.push(...k)}return d}).flat();return[UQ({editor:t,rules:r}),...BQ({editor:t,rules:o}),...i]}get attributes(){return aN(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=a0(this.extensions);return Object.fromEntries(n.filter(r=>!!$t(r,"addNodeView")).map(r=>{const o=this.attributes.filter(d=>d.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:t,type:$o(r.name,this.schema)},s=$t(r,"addNodeView",i);if(!s)return[];const u=(d,f,g,v)=>{const _=cI(d,o);return s()({editor:t,node:d,getPos:g,decorations:v,HTMLAttributes:_,extension:r})};return[r.name,u]}))}}function qQ(e){return Object.prototype.toString.call(e).slice(8,-1)}function fb(e){return qQ(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function l0(e,t){const n={...e};return fb(e)&&fb(t)&&Object.keys(t).forEach(r=>{fb(t[r])?r in e?n[r]=l0(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}class Na{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=On($t(this,"addOptions",{name:this.name}))),this.storage=On($t(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Na(t)}configure(t={}){const n=this.extend();return n.options=l0(this.options,t),n.storage=On($t(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new Na(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=On($t(n,"addOptions",{name:n.name})),n.storage=On($t(n,"addStorage",{name:n.name,options:n.options})),n}}function uN(e,t,n){const{from:r,to:o}=t,{blockSeparator:i=` `,textSerializers:s={}}=n||{};let u="",d=!0;return e.nodesBetween(r,o,(f,g,v,_)=>{var M;const I=s==null?void 0:s[f.type.name];I?(f.isBlock&&!d&&(u+=i,d=!0),v&&(u+=I({node:f,pos:g,parent:v,index:_,range:t}))):f.isText?(u+=(M=f==null?void 0:f.text)===null||M===void 0?void 0:M.slice(Math.max(r,g)-g,o-g),d=!1):f.isBlock&&!d&&(u+=i,d=!0)}),u}function cN(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const VQ=Na.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Ua({key:new Au("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map(g=>g.$from.pos)),u=Math.max(...i.map(g=>g.$to.pos)),d=cN(n);return uN(r,{from:s,to:u},{textSerializers:d})}}})]}}),zQ=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),jQ=(e=!1)=>({commands:t})=>t.setContent("",e),WQ=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{e.doc.nodesBetween(i.pos,s.pos,(u,d)=>{if(u.type.isText)return;const{doc:f,mapping:g}=t,v=f.resolve(g.map(d)),_=f.resolve(g.map(d+u.nodeSize)),M=v.blockRange(_);if(!M)return;const I=Xf(M);if(u.type.isTextblock){const{defaultType:k}=v.parent.contentMatchAt(v.index());t.setNodeMarkup(M.start,k)}(I||I===0)&&t.lift(M,I)})}),!0},KQ=e=>t=>e(t),YQ=()=>({state:e,dispatch:t})=>vQ(e,t),JQ=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){const u=o.before(i),d=o.after(i);e.delete(u,d).scrollIntoView()}return!0}return!1},XQ=e=>({tr:t,state:n,dispatch:r})=>{const o=$o(e,n.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const d=i.before(s),f=i.after(s);t.delete(d,f).scrollIntoView()}return!0}return!1},ZQ=e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},QQ=()=>({state:e,dispatch:t})=>iQ(e,t),eee=()=>({commands:e})=>e.keyboardShortcut("Enter"),tee=()=>({state:e,dispatch:t})=>mQ(e,t);function ey(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:MT(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function dI(e,t,n={}){return e.find(r=>r.type===t&&ey(r.attrs,n))}function nee(e,t,n={}){return!!dI(e,t,n)}function dN(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const o=dI([...r.node.marks],t,n);if(!o)return;let i=r.index,s=e.start()+r.offset,u=i+1,d=s+r.node.nodeSize;for(dI([...r.node.marks],t,n);i>0&&o.isInSet(e.parent.child(i-1).marks);)i-=1,s-=e.parent.child(i).nodeSize;for(;u({tr:n,state:r,dispatch:o})=>{const i=Ou(e,r.schema),{doc:s,selection:u}=n,{$from:d,from:f,to:g}=u;if(o){const v=dN(d,i,t);if(v&&v.from<=f&&v.to>=g){const _=Hn.create(s,v.from,v.to);n.setSelection(_)}}return!0},oee=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};const s=()=>{IT()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!fN(n.state.selection))return s(),!0;const u=pN(o.doc,e)||n.state.selection,d=n.state.selection.eq(u);return i&&(d||o.setSelection(u),d&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},see=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),aee=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t);function Z2(e){const t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function ty(e,t,n){if(n={slice:!0,parseOptions:{},...n},typeof e=="object"&&e!==null)try{return Array.isArray(e)&&e.length>0?ht.fromArray(e.map(r=>t.nodeFromJSON(r))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),ty("",t,n)}if(typeof e=="string"){const r=Af.fromSchema(t);return n.slice?r.parseSlice(Z2(e),n.parseOptions).content:r.parse(Z2(e),n.parseOptions)}return ty("",t,n)}function lee(e,t,n){const r=e.steps.length-1;if(r{s===0&&(s=g)}),e.setSelection(Dn.near(e.doc.resolve(s),n))}const uee=e=>e.toString().startsWith("<"),cee=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const s=ty(t,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if(s.toString()==="<>")return!0;let{from:u,to:d}=typeof e=="number"?{from:e,to:e}:e,f=!0,g=!0;if((uee(s)?s:[s]).forEach(_=>{_.check(),f=f?_.isText&&_.marks.length===0:!1,g=g?_.isBlock:!1}),u===d&&g){const{parent:_}=r.doc.resolve(u);_.isTextblock&&!_.type.spec.code&&!_.childCount&&(u-=1,d+=1)}f?Array.isArray(t)?r.insertText(t.map(_=>_.text||"").join(""),u,d):typeof t=="object"&&t&&t.text?r.insertText(t.text,u,d):r.insertText(t,u,d):r.replaceWith(u,d,s),n.updateSelection&&lee(r,r.steps.length-1,-1)}return!0},dee=()=>({state:e,dispatch:t})=>fQ(e,t),fee=()=>({state:e,dispatch:t})=>pQ(e,t),pee=()=>({state:e,dispatch:t})=>aQ(e,t),hee=()=>({state:e,dispatch:t})=>cQ(e,t);function hN(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function gee(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let u=0;u({editor:t,view:n,tr:r,dispatch:o})=>{const i=gee(e).split(/-(?!$)/),s=i.find(f=>!["Alt","Ctrl","Meta","Shift"].includes(f)),u=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),d=t.captureTransaction(()=>{n.someProp("handleKeyDown",f=>f(n,u))});return d==null||d.steps.forEach(f=>{const g=f.map(r.mapping);g&&o&&r.maybeStep(g)}),!0};function rg(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,s=t?$o(t,e.schema):null,u=[];e.doc.nodesBetween(r,o,(v,_)=>{if(v.isText)return;const M=Math.max(r,_),I=Math.min(o,_+v.nodeSize);u.push({node:v,from:M,to:I})});const d=o-r,f=u.filter(v=>s?s.name===v.node.type.name:!0).filter(v=>ey(v.node.attrs,n,{strict:!1}));return i?!!f.length:f.reduce((v,_)=>v+_.to-_.from,0)>=d}const vee=(e,t={})=>({state:n,dispatch:r})=>{const o=$o(e,n.schema);return rg(n,o,t)?hQ(n,r):!1},yee=()=>({state:e,dispatch:t})=>yQ(e,t),_ee=e=>({state:t,dispatch:n})=>{const r=$o(e,t.schema);return SQ(r)(t,n)},bee=()=>({state:e,dispatch:t})=>gQ(e,t);function u0(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Q2(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}const Mee=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const u=u0(typeof e=="string"?e:e.name,r.schema);return u?(u==="node"&&(i=$o(e,r.schema)),u==="mark"&&(s=Ou(e,r.schema)),o&&n.selection.ranges.forEach(d=>{r.doc.nodesBetween(d.$from.pos,d.$to.pos,(f,g)=>{i&&i===f.type&&n.setNodeMarkup(g,void 0,Q2(f.attrs,t)),s&&f.marks.length&&f.marks.forEach(v=>{s===v.type&&n.addMark(g,g+f.nodeSize,s.create(Q2(v.attrs,t)))})})}),!0):!1},Iee=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),Cee=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),Tee=()=>({state:e,dispatch:t})=>lQ(e,t),wee=()=>({state:e,dispatch:t})=>dQ(e,t),See=()=>({state:e,dispatch:t})=>_Q(e,t),kee=()=>({state:e,dispatch:t})=>IQ(e,t),Dee=()=>({state:e,dispatch:t})=>MQ(e,t);function gN(e,t,n={}){return ty(e,t,{slice:!1,parseOptions:n})}const Eee=(e,t=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,u=gN(e,o.schema,n);return i&&r.replaceWith(0,s.content.size,u).setMeta("preventUpdate",!t),!0};function Aee(e){for(let t=0;t0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function CT(e){return t=>Lee(t.$from,e)}function Oee(e,t){const n=wa.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function Ree(e,t){const n={from:0,to:e.content.size};return uN(e,n,t)}function mN(e,t){const n=Ou(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,d=>{s.push(...d.marks)});const u=s.find(d=>d.type.name===n.name);return u?{...u.attrs}:{}}function Nee(e,t){const n=$o(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,u=>{i.push(u)});const s=i.reverse().find(u=>u.type.name===n.name);return s?{...s.attrs}:{}}function Pee(e,t){const n=u0(typeof t=="string"?t:t.name,e.schema);return n==="node"?Nee(e,t):n==="mark"?mN(e,t):{}}function lv(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function fI(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?Ou(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(v=>i?i.name===v.type.name:!0).find(v=>ey(v.attrs,n,{strict:!1}));let s=0;const u=[];if(o.forEach(({$from:v,$to:_})=>{const M=v.pos,I=_.pos;e.doc.nodesBetween(M,I,(k,w)=>{if(!k.isText&&!k.marks.length)return;const S=Math.max(M,w),L=Math.min(I,w+k.nodeSize),A=L-S;s+=A,u.push(...k.marks.map(O=>({mark:O,from:S,to:L})))})}),s===0)return!1;const d=u.filter(v=>i?i.name===v.mark.type.name:!0).filter(v=>ey(v.mark.attrs,n,{strict:!1})).reduce((v,_)=>v+_.to-_.from,0),f=u.filter(v=>i?v.mark.type!==i&&v.mark.type.excludes(i):!0).reduce((v,_)=>v+_.to-_.from,0);return(d>0?d+f:d)>=s}function xee(e,t,n={}){if(!t)return rg(e,null,n)||fI(e,null,n);const r=u0(t,e.schema);return r==="node"?rg(e,t,n):r==="mark"?fI(e,t,n):!1}function eD(e,t){const{nodeExtensions:n}=a0(t),r=n.find(s=>s.name===e);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=On($t(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Uee(e){var t;const n=(t=e.type.createAndFill())===null||t===void 0?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}function Fee(e,t,n){var r;const{selection:o}=t;let i=null;if(fN(o)&&(i=o.$cursor),i){const u=(r=e.storedMarks)!==null&&r!==void 0?r:i.marks();return!!n.isInSet(u)||!u.some(d=>d.type.excludes(n))}const{ranges:s}=o;return s.some(({$from:u,$to:d})=>{let f=u.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(u.pos,d.pos,(g,v,_)=>{if(f)return!1;if(g.isInline){const M=!_||_.type.allowsMarkType(n),I=!!n.isInSet(g.marks)||!g.marks.some(k=>k.type.excludes(n));f=M&&I}return!f}),f})}const $ee=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:u}=i,d=Ou(e,r.schema);if(o)if(s){const f=mN(r,d);n.addStoredMark(d.create({...f,...t}))}else u.forEach(f=>{const g=f.$from.pos,v=f.$to.pos;r.doc.nodesBetween(g,v,(_,M)=>{const I=Math.max(M,g),k=Math.min(M+_.nodeSize,v);_.marks.find(S=>S.type===d)?_.marks.forEach(S=>{d===S.type&&n.addMark(I,k,d.create({...S.attrs,...t}))}):n.addMark(I,k,d.create(t))})});return Fee(r,n,d)},Gee=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Bee=(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=$o(e,n.schema);return i.isTextblock?o().command(({commands:s})=>K2(i,t)(n)?!0:s.clearNodes()).command(({state:s})=>K2(i,t)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Hee=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,o=vc(e,0,r.content.size),i=sn.create(r,o);t.setSelection(i)}return!0},qee=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=Hn.atStart(r).from,u=Hn.atEnd(r).to,d=vc(o,s,u),f=vc(i,s,u),g=Hn.create(r,d,f);t.setSelection(g)}return!0},Vee=e=>({state:t,dispatch:n})=>{const r=$o(e,t.schema);return EQ(r)(t,n)};function tD(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(o=>t==null?void 0:t.includes(o.type.name));e.tr.ensureMarks(r)}}const zee=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=t,{$from:u,$to:d}=i,f=o.extensionManager.attributes,g=lv(f,u.node().type.name,u.node().attrs);if(i instanceof sn&&i.node.isBlock)return!u.parentOffset||!hf(s,u.pos)?!1:(r&&(e&&tD(n,o.extensionManager.splittableMarks),t.split(u.pos).scrollIntoView()),!0);if(!u.parent.isBlock)return!1;if(r){const v=d.parentOffset===d.parent.content.size;i instanceof Hn&&t.deleteSelection();const _=u.depth===0?void 0:Aee(u.node(-1).contentMatchAt(u.indexAfter(-1)));let M=v&&_?[{type:_,attrs:g}]:void 0,I=hf(t.doc,t.mapping.map(u.pos),1,M);if(!M&&!I&&hf(t.doc,t.mapping.map(u.pos),1,_?[{type:_}]:void 0)&&(I=!0,M=_?[{type:_,attrs:g}]:void 0),I&&(t.split(t.mapping.map(u.pos),1,M),_&&!v&&!u.parentOffset&&u.parent.type!==_)){const k=t.mapping.map(u.before()),w=t.doc.resolve(k);u.node(-1).canReplaceWith(w.index(),w.index()+1,_)&&t.setNodeMarkup(t.mapping.map(u.before()),_)}e&&tD(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0},jee=e=>({tr:t,state:n,dispatch:r,editor:o})=>{var i;const s=$o(e,n.schema),{$from:u,$to:d}=n.selection,f=n.selection.node;if(f&&f.isBlock||u.depth<2||!u.sameParent(d))return!1;const g=u.node(-1);if(g.type!==s)return!1;const v=o.extensionManager.attributes;if(u.parent.content.size===0&&u.node(-1).childCount===u.indexAfter(-1)){if(u.depth===2||u.node(-3).type!==s||u.index(-2)!==u.node(-2).childCount-1)return!1;if(r){let w=ht.empty;const S=u.index(-1)?1:u.index(-2)?2:3;for(let P=u.depth-S;P>=u.depth-3;P-=1)w=ht.from(u.node(P).copy(w));const L=u.indexAfter(-1){if(q>-1)return!1;P.isTextblock&&P.content.size===0&&(q=B+1)}),q>-1&&t.setSelection(Hn.near(t.doc.resolve(q))),t.scrollIntoView()}return!0}const _=d.pos===u.end()?g.contentMatchAt(0).defaultType:null,M=lv(v,g.type.name,g.attrs),I=lv(v,u.node().type.name,u.node().attrs);t.delete(u.pos,d.pos);const k=_?[{type:s,attrs:M},{type:_,attrs:I}]:[{type:s,attrs:M}];if(!hf(t.doc,u.pos,2))return!1;if(r){const{selection:w,storedMarks:S}=n,{splittableMarks:L}=o.extensionManager,A=S||w.$to.parentOffset&&w.$from.marks();if(t.split(u.pos,2,k).scrollIntoView(),!A||!r)return!0;const O=A.filter(H=>L.includes(H.type.name));t.ensureMarks(O)}return!0},pb=(e,t)=>{const n=CT(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&fd(e.doc,n.pos)&&e.join(n.pos),!0},hb=(e,t)=>{const n=CT(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&fd(e.doc,r)&&e.join(r),!0},Wee=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:u,chain:d,commands:f,can:g})=>{const{extensions:v,splittableMarks:_}=o.extensionManager,M=$o(e,s.schema),I=$o(t,s.schema),{selection:k,storedMarks:w}=s,{$from:S,$to:L}=k,A=S.blockRange(L),O=w||k.$to.parentOffset&&k.$from.marks();if(!A)return!1;const H=CT(q=>eD(q.type.name,v))(k);if(A.depth>=1&&H&&A.depth-H.depth<=1){if(H.node.type===M)return f.liftListItem(I);if(eD(H.node.type.name,v)&&M.validContent(H.node.content)&&u)return d().command(()=>(i.setNodeMarkup(H.pos,M),!0)).command(()=>pb(i,M)).command(()=>hb(i,M)).run()}return!n||!O||!u?d().command(()=>g().wrapInList(M,r)?!0:f.clearNodes()).wrapInList(M,r).command(()=>pb(i,M)).command(()=>hb(i,M)).run():d().command(()=>{const q=g().wrapInList(M,r),P=O.filter(B=>_.includes(B.type.name));return i.ensureMarks(P),q?!0:f.clearNodes()}).wrapInList(M,r).command(()=>pb(i,M)).command(()=>hb(i,M)).run()},Kee=(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Ou(e,r.schema);return fI(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},Yee=(e,t,n={})=>({state:r,commands:o})=>{const i=$o(e,r.schema),s=$o(t,r.schema);return rg(r,i,n)?o.setNode(s):o.setNode(i,n)},Jee=(e,t={})=>({state:n,commands:r})=>{const o=$o(e,n.schema);return rg(n,o,t)?r.lift(o):r.wrapIn(o,t)},Xee=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r=0;d-=1)s.step(u.steps[d].invert(u.docs[d]));if(i.text){const d=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,d))}else s.delete(i.from,i.to)}return!0}}return!1},Zee=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},Qee=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:u}=n,d=Ou(e,r.schema),{$from:f,empty:g,ranges:v}=u;if(!o)return!0;if(g&&s){let{from:_,to:M}=u;const I=(i=f.marks().find(w=>w.type===d))===null||i===void 0?void 0:i.attrs,k=dN(f,d,I);k&&(_=k.from,M=k.to),n.removeMark(_,M,d)}else v.forEach(_=>{n.removeMark(_.$from.pos,_.$to.pos,d)});return n.removeStoredMark(d),!0},ete=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const u=u0(typeof e=="string"?e:e.name,r.schema);return u?(u==="node"&&(i=$o(e,r.schema)),u==="mark"&&(s=Ou(e,r.schema)),o&&n.selection.ranges.forEach(d=>{const f=d.$from.pos,g=d.$to.pos;r.doc.nodesBetween(f,g,(v,_)=>{i&&i===v.type&&n.setNodeMarkup(_,void 0,{...v.attrs,...t}),s&&v.marks.length&&v.marks.forEach(M=>{if(s===M.type){const I=Math.max(_,f),k=Math.min(_+v.nodeSize,g);n.addMark(I,k,s.create({...M.attrs,...t}))}})})}),!0):!1},tte=(e,t={})=>({state:n,dispatch:r})=>{const o=$o(e,n.schema);return CQ(o,t)(n,r)},nte=(e,t={})=>({state:n,dispatch:r})=>{const o=$o(e,n.schema);return TQ(o,t)(n,r)};var rte=Object.freeze({__proto__:null,blur:zQ,clearContent:jQ,clearNodes:WQ,command:KQ,createParagraphNear:YQ,deleteCurrentNode:JQ,deleteNode:XQ,deleteRange:ZQ,deleteSelection:QQ,enter:eee,exitCode:tee,extendMarkRange:ree,first:oee,focus:iee,forEach:see,insertContent:aee,insertContentAt:cee,joinUp:dee,joinDown:fee,joinBackward:pee,joinForward:hee,keyboardShortcut:mee,lift:vee,liftEmptyBlock:yee,liftListItem:_ee,newlineInCode:bee,resetAttributes:Mee,scrollIntoView:Iee,selectAll:Cee,selectNodeBackward:Tee,selectNodeForward:wee,selectParentNode:See,selectTextblockEnd:kee,selectTextblockStart:Dee,setContent:Eee,setMark:$ee,setMeta:Gee,setNode:Bee,setNodeSelection:Hee,setTextSelection:qee,sinkListItem:Vee,splitBlock:zee,splitListItem:jee,toggleList:Wee,toggleMark:Kee,toggleNode:Yee,toggleWrap:Jee,undoInputRule:Xee,unsetAllMarks:Zee,unsetMark:Qee,updateAttributes:ete,wrapIn:tte,wrapInList:nte});const ote=Na.create({name:"commands",addCommands(){return{...rte}}}),ite=Na.create({name:"editable",addProseMirrorPlugins(){return[new Ua({key:new Au("editable"),props:{editable:()=>this.editor.options.editable}})]}}),ste=Na.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Ua({key:new Au("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),ate=Na.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:u})=>{const{selection:d,doc:f}=u,{empty:g,$anchor:v}=d,{pos:_,parent:M}=v,I=Dn.atStart(f).from===_;return!g||!I||!M.type.isTextblock||M.textContent.length?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return IT()||hN()?i:o},addProseMirrorPlugins(){return[new Ua({key:new Au("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some(I=>I.docChanged)&&!t.doc.eq(n.doc)))return;const{empty:o,from:i,to:s}=t.selection,u=Dn.atStart(t.doc).from,d=Dn.atEnd(t.doc).to;if(o||!(i===u&&s===d)||!(n.doc.textBetween(0,n.doc.content.size," "," ").length===0))return;const v=n.tr,_=i0({state:n,transaction:v}),{commands:M}=new s0({editor:this.editor,state:_});if(M.clearNodes(),!!v.steps.length)return v}})]}}),lte=Na.create({name:"tabindex",addProseMirrorPlugins(){return[new Ua({key:new Au("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var ute=Object.freeze({__proto__:null,ClipboardTextSerializer:VQ,Commands:ote,Editable:ite,FocusEvents:ste,Keymap:ate,Tabindex:lte});const cte=`.ProseMirror { position: relative; } .ProseMirror { word-wrap: break-word; white-space: pre-wrap; white-space: break-spaces; -webkit-font-variant-ligatures: none; font-variant-ligatures: none; font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ } .ProseMirror [contenteditable="false"] { white-space: normal; } .ProseMirror [contenteditable="false"] [contenteditable="true"] { white-space: pre-wrap; } .ProseMirror pre { white-space: pre-wrap; } img.ProseMirror-separator { display: inline !important; border: none !important; margin: 0 !important; width: 1px !important; height: 1px !important; } .ProseMirror-gapcursor { display: none; pointer-events: none; position: absolute; margin: 0; } .ProseMirror-gapcursor:after { content: ""; display: block; position: absolute; top: -2px; width: 20px; border-top: 1px solid black; animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; } @keyframes ProseMirror-cursor-blink { to { visibility: hidden; } } .ProseMirror-hideselection *::selection { background: transparent; } .ProseMirror-hideselection *::-moz-selection { background: transparent; } .ProseMirror-hideselection * { caret-color: transparent; } .ProseMirror-focused .ProseMirror-gapcursor { display: block; } .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0 }`;function dte(e,t,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;const o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}let fte=class extends AQ{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=dte(cte,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){const r=lN(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],o=this.state.reconfigure({plugins:r});this.view.updateState(o)}unregisterPlugin(t){if(this.isDestroyed)return;const n=typeof t=="string"?`${t}$`:t.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(o=>!o.key.startsWith(n))});this.view.updateState(r)}createExtensionManager(){const n=[...this.options.enableCoreExtensions?Object.values(ute):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r==null?void 0:r.type));this.extensionManager=new tf(n,this)}createCommandManager(){this.commandManager=new s0({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=gN(this.options.content,this.schema,this.options.parseOptions),n=pN(t,this.options.autofocus);this.view=new KZ(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:ef.create({doc:t,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(s=>{var u;return(u=this.capturedTransaction)===null||u===void 0?void 0:u.step(s)});return}const n=this.state.apply(t),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=t.getMeta("focus"),i=t.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:t}),i&&this.emit("blur",{editor:this,event:i.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return Pee(this.state,t)}isActive(t,n){const r=typeof t=="string"?t:null,o=typeof t=="string"?n:t;return xee(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Oee(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:n=` `,textSerializers:r={}}=t||{};return Ree(this.state.doc,{blockSeparator:n,textSerializers:{...cN(this.schema),...r}})}get isEmpty(){return Uee(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}};function pte(e){return new PQ({find:e.find,handler:({state:t,range:n,match:r})=>{const o=On(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from;let u=n.to;if(r[1]){const d=r[0].lastIndexOf(r[1]);let f=s+d;f>u?f=u:u=f+r[1].length;const g=r[0][r[0].length-1];i.insertText(g,s+r[0].length-1),i.replaceWith(f,u,e.type.create(o))}else r[0]&&i.replaceWith(s,u,e.type.create(o))}})}class ny{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=On($t(this,"addOptions",{name:this.name}))),this.storage=On($t(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new ny(t)}configure(t={}){const n=this.extend();return n.options=l0(this.options,t),n.storage=On($t(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new ny(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=On($t(n,"addOptions",{name:n.name})),n.storage=On($t(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(f=>(f==null?void 0:f.type.name)===n.name))return!1;const d=s.find(f=>(f==null?void 0:f.type.name)===n.name);return d&&r.removeStoredMark(d),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}}class Tu{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=On($t(this,"addOptions",{name:this.name}))),this.storage=On($t(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Tu(t)}configure(t={}){const n=this.extend();return n.options=l0(this.options,t),n.storage=On($t(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new Tu(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=On($t(n,"addOptions",{name:n.name})),n.storage=On($t(n,"addStorage",{name:n.name,options:n.options})),n}}function hte(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function nD(e){return cU((t,n)=>({get(){return t(),e},set(r){e=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class gte extends fte{constructor(t={}){return super(t),this.vueRenderers=Wt(new Map),this.contentComponent=null,this.reactiveState=nD(this.view.state),this.reactiveExtensionStorage=nD(this.extensionStorage),this.on("transaction",()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage}),fC(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,n){super.registerPlugin(t,n),this.reactiveState.value=this.view.state}unregisterPlugin(t){super.unregisterPlugin(t),this.reactiveState.value=this.view.state}}const mte=it({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const t=Ne(),n=Xi();return nn(()=>{const r=e.editor;r&&r.options.element&&t.value&&wr(()=>{if(!t.value||!r.options.element.firstChild)return;const o=Oe(t.value);t.value.append(...r.options.element.childNodes),r.contentComponent=n.ctx._,r.setOptions({element:o}),r.createNodeViews()})}),yi(()=>{const r=e.editor;if(!r||(r.isDestroyed||r.view.setProps({nodeViews:{}}),r.contentComponent=null,!r.options.element.firstChild))return;const o=document.createElement("div");o.append(...r.options.element.childNodes),r.setOptions({element:o})}),{rootEl:t}},render(){const e=[];return this.editor&&this.editor.vueRenderers.forEach(t=>{const n=Se(wC,{to:t.teleportElement,key:t.id},Se(t.component,{ref:t.id,...t.props}));e.push(n)}),Se("div",{ref:t=>{this.rootEl=t}},...e)}}),vte=(e={})=>{const t=TL();return Rn(()=>{t.value=new gte(e)}),yi(()=>{var n;(n=t.value)===null||n===void 0||n.destroy()}),t},yte=Tu.create({name:"doc",topNode:!0,content:"block+"}),_te=Tu.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Cg(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),bte=Na.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Ua({key:new Au("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;const i=e.type.createAndFill(),s=(i==null?void 0:i.sameMarkup(e))&&i.content.findDiffStart(e.content)===null;return e.descendants((u,d)=>{const f=r>=d&&r<=d+u.nodeSize,g=!u.isLeaf&&!u.childCount;if((f||!this.options.showOnlyCurrent)&&g){const v=[this.options.emptyNodeClass];s&&v.push(this.options.emptyEditorClass);const _=as.node(d,d+u.nodeSize,{class:v.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:u,pos:d,hasAnchor:f}):this.options.placeholder});o.push(_)}return this.options.includeChildren}),fo.create(e,o)}}})]}}),Mte=Tu.create({name:"text",group:"inline"});function Ite(e){var t;const{char:n,allowSpaces:r,allowedPrefixes:o,startOfLine:i,$position:s}=e,u=hte(n),d=new RegExp(`\\s${u}$`),f=i?"^":"",g=r?new RegExp(`${f}${u}.*?(?=\\s${u}|$)`,"gm"):new RegExp(`${f}(?:^)?${u}[^\\s${u}]*`,"gm"),v=((t=s.nodeBefore)===null||t===void 0?void 0:t.isText)&&s.nodeBefore.text;if(!v)return null;const _=s.pos-v.length,M=Array.from(v.matchAll(g)).pop();if(!M||M.input===void 0||M.index===void 0)return null;const I=M.input.slice(Math.max(0,M.index-1),M.index),k=new RegExp(`^[${o==null?void 0:o.join("")}\0]?$`).test(I);if(o!==null&&!k)return null;const w=_+M.index;let S=w+M[0].length;return r&&d.test(v.slice(S-1,S+1))&&(M[0]+=" ",S+=1),w=s.pos?{range:{from:w,to:S},query:M[0].slice(n.length),text:M[0]}:null}const Cte=new Au("suggestion");function Tte({pluginKey:e=Cte,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:o=[" "],startOfLine:i=!1,decorationTag:s="span",decorationClass:u="suggestion",command:d=()=>null,items:f=()=>[],render:g=()=>({}),allow:v=()=>!0}){let _;const M=g==null?void 0:g(),I=new Ua({key:e,view(){return{update:async(k,w)=>{var S,L,A,O,H,q,P;const B=(S=this.key)===null||S===void 0?void 0:S.getState(w),j=(L=this.key)===null||L===void 0?void 0:L.getState(k.state),$=B.active&&j.active&&B.range.from!==j.range.from,R=!B.active&&j.active,T=B.active&&!j.active,x=!R&&!T&&B.query!==j.query,Z=R||$,K=x&&!$,re=T||$;if(!Z&&!K&&!re)return;const X=re&&!Z?B:j,ie=k.dom.querySelector(`[data-decoration-id="${X.decorationId}"]`);_={editor:t,range:X.range,query:X.query,text:X.text,items:[],command:he=>{d({editor:t,range:X.range,props:he})},decorationNode:ie,clientRect:ie?()=>{var he;const{decorationId:ae}=(he=this.key)===null||he===void 0?void 0:he.getState(t.state),de=k.dom.querySelector(`[data-decoration-id="${ae}"]`);return(de==null?void 0:de.getBoundingClientRect())||null}:null},Z&&((A=M==null?void 0:M.onBeforeStart)===null||A===void 0||A.call(M,_)),K&&((O=M==null?void 0:M.onBeforeUpdate)===null||O===void 0||O.call(M,_)),(K||Z)&&(_.items=await f({editor:t,query:X.query})),re&&((H=M==null?void 0:M.onExit)===null||H===void 0||H.call(M,_)),K&&((q=M==null?void 0:M.onUpdate)===null||q===void 0||q.call(M,_)),Z&&((P=M==null?void 0:M.onStart)===null||P===void 0||P.call(M,_))},destroy:()=>{var k;_&&((k=M==null?void 0:M.onExit)===null||k===void 0||k.call(M,_))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(k,w,S,L){const{isEditable:A}=t,{composing:O}=t.view,{selection:H}=k,{empty:q,from:P}=H,B={...w};if(B.composing=O,A&&(q||t.view.composing)){(Pw.range.to)&&!O&&!w.composing&&(B.active=!1);const j=Ite({char:n,allowSpaces:r,allowedPrefixes:o,startOfLine:i,$position:H.$from}),$=`id_${Math.floor(Math.random()*4294967295)}`;j&&v({editor:t,state:L,range:j.range})?(B.active=!0,B.decorationId=w.decorationId?w.decorationId:$,B.range=j.range,B.query=j.query,B.text=j.text):B.active=!1}else B.active=!1;return B.active||(B.decorationId=null,B.range={from:0,to:0},B.query=null,B.text=null),B}},props:{handleKeyDown(k,w){var S;const{active:L,range:A}=I.getState(k.state);return L&&((S=M==null?void 0:M.onKeyDown)===null||S===void 0?void 0:S.call(M,{view:k,event:w,range:A}))||!1},decorations(k){const{active:w,range:S,decorationId:L}=I.getState(k);return w?fo.create(k.doc,[as.inline(S.from,S.to,{nodeName:s,class:u,"data-decoration-id":L})]):null}}});return I}const wte=new Au("mention"),Ste=Tu.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:e,node:t}){var n;return`${e.suggestion.char}${(n=t.attrs.label)!==null&&n!==void 0?n:t.attrs.id}`},suggestion:{char:"@",pluginKey:wte,command:({editor:e,range:t,props:n})=>{var r,o;const i=e.view.state.selection.$to.nodeAfter;((r=i==null?void 0:i.text)===null||r===void 0?void 0:r.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(o=window.getSelection())===null||o===void 0||o.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),r=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){return["span",Cg({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})]},renderText({node:e}){return this.options.renderLabel({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let n=!1;const{selection:r}=t,{empty:o,anchor:i}=r;return o?(t.doc.nodesBetween(i-1,i,(s,u)=>{if(s.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",u,u+s.nodeSize),!1}),n):!1})}},addProseMirrorPlugins(){return[Tte({editor:this.editor,...this.options.suggestion})]}}),kte=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,rD=Tu.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Cg(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[pte({find:kte,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),Dte=rD.extend({name:"custom-image",addAttributes(){return{...rD.config.addAttributes(),class:{default:"image",rendered:!1}}},addCommands(){return{setImage:e=>({tr:t,commands:n})=>{var r,o,i;return((i=(o=(r=t.selection)==null?void 0:r.node)==null?void 0:o.type)==null?void 0:i.name)=="custom-image"?n.updateAttributes("custom-image",e):n.insertContent({type:this.name,attrs:e})}}},renderHTML({node:e,HTMLAttributes:t}){return t.class="custom-image-"+e.attrs.class,["img",Cg(this.options.HTMLAttributes,t)]}}),Ete=""+new URL("at-8ae455a1.svg",import.meta.url).href,rs=Ne(),yc=Ne(!1),rl=Ne(),cr=Ne(),_c=Ne({left:0,top:0}),pI=Ne(),mu=Ne(0),zc=Ne(),ry=Ne(!1),Ate=()=>({allowedPrefixes:null,items:e=>{var n;const t=(n=rl==null?void 0:rl.value)==null?void 0:n.filter(r=>{var o,i,s,u,d,f;return((s=(o=r==null?void 0:r.nick)==null?void 0:o.toLowerCase())==null?void 0:s.startsWith((i=e==null?void 0:e.query)==null?void 0:i.toLowerCase()))||((f=(u=r==null?void 0:r.userID)==null?void 0:u.toLowerCase())==null?void 0:f.startsWith((d=e==null?void 0:e.query)==null?void 0:d.toLowerCase()))});return cr.value=t!=null&&t.length?t:rl.value,cr.value},render:()=>({onStart:e=>{if(yc.value=!0,!(e!=null&&e.clientRect))return;const t=e==null?void 0:e.clientRect();t!=null&&t.left&&(t!=null&&t.top)&&!ry.value&&(_c.value={left:t==null?void 0:t.left,top:t==null?void 0:t.top}),pI.value=e.command},onUpdate(e){if(!(e!=null&&e.clientRect))return;const t=e==null?void 0:e.clientRect();t!=null&&t.left&&(t!=null&&t.top)&&!ry.value&&(_c.value={left:t==null?void 0:t.left,top:t==null?void 0:t.top})},onKeyDown(e){var t,n;return e.event.key==="Enter"&&((t=e.event)==null||t.stopPropagation(),(n=e.event)==null||n.preventDefault()),e.event.key==="Escape"?(yc.value=!1,cr.value=rl.value,!0):(e==null?void 0:e.event.key)==="ArrowUp"?(Lte(),!0):(e==null?void 0:e.event.key)==="ArrowDown"?(Ote(),!0):(e==null?void 0:e.event.key)==="Enter"?(Rte(),!0):!1},onExit(e){yc.value=!1,cr.value=rl.value,_c.value={left:0,top:0}}})}),Lte=()=>{var e,t,n,r;(e=cr==null?void 0:cr.value)!=null&&e.length&&(mu.value=(mu.value+((t=cr==null?void 0:cr.value)==null?void 0:t.length)-1)%((n=cr==null?void 0:cr.value)==null?void 0:n.length),(r=zc==null?void 0:zc.value[mu.value])==null||r.scrollIntoView(!1))},Ote=()=>{var e,t,n;(e=cr==null?void 0:cr.value)!=null&&e.length&&(mu.value=(mu.value+1)%((t=cr==null?void 0:cr.value)==null?void 0:t.length),(n=zc==null?void 0:zc.value[mu.value])==null||n.scrollIntoView(!1))},Rte=()=>{vN(mu.value)},vN=e=>{var n;if(!((n=cr==null?void 0:cr.value)!=null&&n.length))return;const t=cr==null?void 0:cr.value[e];t&&pI.value&&pI.value({id:t==null?void 0:t.userID,label:(t==null?void 0:t.nick)||(t==null?void 0:t.userID)})},Nte=it({props:{memberList:{type:Array,default:()=>[]},isGroup:{type:Boolean,default:!1},selfInfo:{type:Object,default:()=>({})},isH5:{type:Boolean,default:!1}},setup(e){const{memberList:t,isGroup:n,selfInfo:r}=Yt(e),o={userID:yt.TYPES.MSG_AT_ALL,nick:"所有人",isAll:!0,avatar:Ete},i=Ne();nn(()=>{yc.value=yc.value&&n.value,ry.value=e.isH5}),Bt(()=>t.value,()=>{var d,f,g;(d=t==null?void 0:t.value[0])!=null&&d.isAll||(f=t==null?void 0:t.value)==null||f.unshift(o);const u=(g=t==null?void 0:t.value)==null?void 0:g.filter(v=>{var _;return(v==null?void 0:v.userID)!==((_=r==null?void 0:r.value)==null?void 0:_.userID)});rl.value=u,cr.value=u},{deep:!0,immediate:!0}),Bt(()=>[_c.value,rs==null?void 0:rs.value],()=>{var u;ry.value||!(rs!=null&&rs.value)||!((u=rs==null?void 0:rs.value)!=null&&u.style)||(rs.value.style.left=_c.value.left+"Px",rs.value.style.top=_c.value.top-rs.value.clientHeight+"Px")},{deep:!0,immediate:!0});const s=()=>{yc.value=!1,cr.value=rl.value,_c.value={left:0,top:0}};return xa(i,()=>{s()}),{selectedIndex:mu,selectItem:vN,showAtList:yc,closeAt:s,showMemberList:cr,allMemberList:rl,MessageInputAt:rs,memberListItems:zc,dialog:i}}});const Pte={class:"memberList",ref:"dialog"},xte={key:0,class:"memberList-title"},Ute={class:"title"},Fte={class:"memberList-box"},$te=["onClick"],Gte=["src"];function Bte(e,t,n,r,o,i){return e.showAtList?(J(),oe("div",{key:0,class:lt(["message-input-at",[e.isH5&&"message-input-at-h5"]]),ref:"MessageInputAt"},[G("div",Pte,[e.isH5?(J(),oe("header",xte,[G("span",Ute,De(e.$t("TUIChat.选择提醒的人")),1),G("i",{class:"icon icon-close close",onClick:t[0]||(t[0]=(...s)=>e.closeAt&&e.closeAt(...s))})])):Ie("",!0),G("ul",Fte,[(J(!0),oe(ft,null,zt(e.showMemberList,(s,u)=>(J(),oe("li",{class:lt(["memberList-box-body",[u===e.selectedIndex&&"selected"]]),key:u,onClick:d=>e.selectItem(u),ref_for:!0,ref:"memberListItems"},[G("img",{src:(s==null?void 0:s.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png"},null,8,Gte),G("span",null,De(s!=null&&s.nick?s==null?void 0:s.nick:s==null?void 0:s.userID),1)],10,$te))),128))])],512)],2)):Ie("",!0)}const Hte=Kt(Nte,[["render",Bte],["__scopeId","data-v-3a9f3951"]]),qte=it({__name:"message-input-editor",props:{placeholder:{type:String,default:"this is placeholder"},replayOrReferenceMessage:{type:Object,default:()=>({})},isMute:{type:Boolean,default:!0},muteText:{type:String,default:""},enableInput:{type:Boolean,default:!0},enableAt:{type:Boolean,default:!0},enableDragUpload:{type:Boolean,default:!0},enableTyping:{type:Boolean,default:!0},isH5:{type:Boolean,default:!0},isGroup:{type:Boolean,default:!1}},emits:["sendMessage","onTyping"],setup(e,{expose:t,emit:n}){const r=e,{placeholder:o,isH5:i,enableAt:s,enableDragUpload:u,isGroup:d,enableTyping:f}=Yt(r),g=Ne(!0),v=Ne(!0),_=vte({extensions:[yte,_te,Mte,bte.configure({emptyEditorClass:"is-editor-empty",placeholder:o.value}),Ste.configure({HTMLAttributes:{class:"mention"},suggestion:s.value&&Ate()}),Dte.configure({inline:!0,allowBase64:!0,HTMLAttributes:{class:"custom-image"}})],autofocus:!0,editable:!0,injectCSS:!1,onUpdate({editor:R,transaction:T}){var x,Z;!f.value||d.value||(v.value=!R.isFocused,((Z=(x=T==null?void 0:T.doc)==null?void 0:x.content)==null?void 0:Z.size)>2?g.value=!1:g.value=!0,n("onTyping",g.value,v.value))},onFocus(){var R;if(i.value&&((R=document==null?void 0:document.getElementById("app"))!=null&&R.style)){const T=document.body.scrollHeight-window.innerHeight;document.getElementById("app").style.marginBottom=`${T}Px`,document.getElementById("app").style.height=`calc(100% - ${T}Px)`}!f.value||d.value||(v.value=!0,n("onTyping",g.value,v.value))},onBlur(){var R;i.value&&((R=document==null?void 0:document.getElementById("app"))!=null&&R.style)&&(document.getElementById("app").style.marginBottom="",document.getElementById("app").style.height="100%"),!(!f.value||d.value)&&(v.value=!0,n("onTyping",g.value,v.value))}}),M=Ne(),I=R=>{var T,x;i!=null&&i.value||(R==null||R.preventDefault(),R==null||R.stopPropagation(),R.keyCode===13&&R.ctrlKey?(x=(T=_==null?void 0:_.value)==null?void 0:T.commands)==null||x.insertContent("

"):R.keyCode===13&&n("sendMessage"))},k=new Map,w=async(R,T)=>{var x,Z,K,re;if(R.preventDefault(),R.stopPropagation(),!i.value&&!(!(u!=null&&u.value)&&T==="drop")&&(T==="drop"&&R.dataTransfer||T==="paste"&&R.clipboardData)){const X=T==="drop"?(x=R==null?void 0:R.dataTransfer)==null?void 0:x.files:(Z=R==null?void 0:R.clipboardData)==null?void 0:Z.files;for(let ie=0;ie{var Y,te,fe,Re;(te=(Y=_==null?void 0:_.value)==null?void 0:Y.commands)==null||te.focus("end"),(Re=(fe=_==null?void 0:_.value)==null?void 0:fe.commands)==null||Re.scrollIntoView()},10)}}},S=new Map,L=(R,T)=>new Promise((x,Z)=>{if(S.has(T))x(S.get(T));else{let K=new Image;K.crossOrigin="anonymous",K.onload=()=>{S.set(T,K),x(K)},K.onerror=Z,K.src=R}}),A=async R=>{const{name:T,type:x}=R,Z=document.createElement("canvas");let K=160,re=50;Z.style.width=K+"Px",Z.style.height=re+"Px";let X=window.devicePixelRatio;Z.width=Math.floor(K*X),Z.height=Math.floor(re*X);const ie=Z.getContext("2d");if(!ie)return"";ie.scale(X,X);const{iconSrc:he,iconType:ae}=O(x),de=await L(he,ae);ie==null||ie.drawImage(de,10,10,30,30);const Y=H(T);return ie.fillText(Y,45,22),Z.toDataURL()},O=R=>{const T="https://web.sdk.qcloud.com/component/TUIKit/assets/file-",x=["image","pdf","text","ppt","presentation","sheet","zip","word","video","unknown"];let Z="",K="";return x.forEach(re=>{R.includes(re)&&(Z=T+re+".svg",K=re)}),{iconSrc:Z||T+"unknown.svg",iconType:K||"unknown"}},H=R=>{if(!R)return R;let T="",x=0;for(let Z=0;Z<(R==null?void 0:R.length);Z++){if(x>16){T+="...";break}T+=R[Z],/[a-z]|[0-9]|[,;.!@#-+/\\$%^*()<>?:"'{}~]/i.test(R[Z])?x+=1:x+=2}return T},q=()=>P(),P=()=>{var K,re,X,ie,he;const R=(K=_==null?void 0:_.value)==null?void 0:K.getJSON(),T=[],x=ae=>{if(!(!ae||!ae.type))if(ae.type!=="text"&&ae.type!=="custom-image"&&ae.type!=="mention"){ae.type==="paragraph"&&Z(ae),ae.content&&ae.content.length&&ae.content.forEach(de=>{x(de)});return}else Z(ae)},Z=ae=>{var de,Y,te,fe,Re,ve,be,ue,ce,Ee,pe,V,ee,se,Ce,le,ke,Pe;if(ae.type==="paragraph")T.length>0&&T[T.length-1]&&((de=T[T.length-1])==null?void 0:de.type)==="text"&&(T[T.length-1].payload.text+=` `);else if(ae.type==="text"||ae.type==="custom-image"&&((Y=ae==null?void 0:ae.attrs)==null?void 0:Y.class)==="emoji"){const xe=ae.type==="text"?ae==null?void 0:ae.text:(te=ae==null?void 0:ae.attrs)==null?void 0:te.alt;T.length>0&&T[T.length-1]&&((fe=T[T.length-1])==null?void 0:fe.type)==="text"?T[T.length-1].payload.text+=xe:T.push({type:"text",payload:{text:xe}})}else if(ae.type==="custom-image"&&((Re=ae==null?void 0:ae.attrs)==null?void 0:Re.class)==="normal")T.push({type:"image",payload:{file:k==null?void 0:k.get((ve=ae==null?void 0:ae.attrs)==null?void 0:ve.src)}});else if(ae.type==="custom-image"&&((be=ae==null?void 0:ae.attrs)==null?void 0:be.class)==="file"){const xe=k==null?void 0:k.get((ue=ae==null?void 0:ae.attrs)==null?void 0:ue.src);T.push({type:(ce=xe==null?void 0:xe.type)!=null&&ce.includes("video")?"video":"file",payload:{file:xe}})}else if(ae.type==="mention"){const xe="@"+((Ee=ae==null?void 0:ae.attrs)==null?void 0:Ee.label)+" ";T.length>0&&T[T.length-1]&&((pe=T[T.length-1])==null?void 0:pe.type)==="text"?T[T.length-1].payload.text+=xe:T.push({type:"text",payload:{text:xe}}),(ee=(V=T[T.length-1])==null?void 0:V.payload)!=null&&ee.atUserList?(ke=(Ce=(se=T[T.length-1])==null?void 0:se.payload)==null?void 0:Ce.atUserList)==null||ke.push((le=ae==null?void 0:ae.attrs)==null?void 0:le.id):T[T.length-1].payload.atUserList=[(Pe=ae==null?void 0:ae.attrs)==null?void 0:Pe.id]}};if(x(R),T.length>0&&T[T.length-1]&&((re=T[T.length-1])==null?void 0:re.type)==="text"&&((he=(ie=(X=T[T.length-1])==null?void 0:X.payload)==null?void 0:ie.text)!=null&&he.endsWith(` `))){const ae=T[T.length-1].payload.text;T[T.length-1].payload.text=ae==null?void 0:ae.substring(0,ae.lastIndexOf(` `))}return T};return t({getEditorContent:q,addEmoji:R=>{var T,x,Z,K,re;(x=(T=_==null?void 0:_.value)==null?void 0:T.commands)==null||x.insertContent({type:"custom-image",attrs:{src:R==null?void 0:R.url,alt:R==null?void 0:R.name,title:R==null?void 0:R.name,class:"emoji"}}),(Z=_==null?void 0:_.value)==null||Z.commands.focus("end"),(re=(K=_==null?void 0:_.value)==null?void 0:K.commands)==null||re.scrollIntoView()},resetEditor:()=>{var R,T,x,Z;(T=(R=_==null?void 0:_.value)==null?void 0:R.commands)==null||T.clearContent(!0),k==null||k.clear(),(Z=(x=_==null?void 0:_.value)==null?void 0:x.commands)==null||Z.focus("end"),v.value=!0,g.value=!0},setEditorContent:R=>{var T,x;(x=(T=_==null?void 0:_.value)==null?void 0:T.commands)==null||x.insertContent(R)}}),(R,T)=>(J(),oe("div",{class:lt(["message-input-container",Oe(i)&&"message-input-container-h5"])},[Bn(G("div",{class:"message-input-mute"},De(R.$t(`TUIChat.${e.muteText}`)),513),[[to,e.isMute]]),Bn(It(Oe(mte),{editor:Oe(_),class:"message-input-area",ref_key:"editorContainer",ref:M,onDrop:T[0]||(T[0]=x=>w(x,"drop")),onPaste:T[1]||(T[1]=x=>w(x,"paste")),onKeydown:gr(I,["enter"])},null,8,["editor","onKeydown"]),[[to,!e.isMute&&e.enableInput]])],2))}});const Vte=Kt(qte,[["__scopeId","data-v-e3ff5485"]]),zte={class:"message-input-button-hover"},jte=it({__name:"message-input-button",props:{enableSend:{type:Boolean,default:!0},messages:{type:Array,default:()=>[]},isH5:{type:Boolean,default:!0}},emits:["sendMessage"],setup(e,{emit:t}){const n=e,{enableSend:r}=Yt(n),o=()=>{t("sendMessage")};return(i,s)=>(J(),oe("div",{class:lt(["message-input-button",e.isH5&&"message-input-button-h5"])},[Oe(r)?(J(),oe("button",{key:0,class:"message-input-button-cont","data-type":"text",onClick:o,disabled:!1},[G("p",zte,De(i.$t("TUIChat.按Enter发送,Ctrl+Enter换行")),1),mr(" "+De(i.$t("发送")),1)])):Ie("",!0)],2))}});const Wte=Kt(jte,[["__scopeId","data-v-9dc61a93"]]),Kte=e=>(pr("data-v-d64843bf"),e=e(),hr(),e),Yte={key:0,class:"reference"},Jte={class:"reference-box"},Xte={class:"reference-box-show"},Zte={class:"reference-box-show-name"},Qte={key:1,class:"reply"},ene={class:"reply-box"},tne=Kte(()=>G("i",null,null,-1)),nne={class:"reply-box-show"},rne=it({__name:"message-input-reference-or-reply",props:{replyOrReference:{type:Object,default:()=>({})},isH5:{type:Boolean,default:!1}},emits:["resetReplyOrReference"],setup(e,{emit:t}){const n=e,{replyOrReference:r,isH5:o}=Yt(n),i=()=>{t("resetReplyOrReference")};return(s,u)=>{var d,f,g,v,_,M,I,k,w,S,L,A,O,H,q,P,B,j,$,R,T;return(d=Oe(r))!=null&&d.show?(J(),oe("div",{key:0,class:lt([((f=Oe(r))==null?void 0:f.show)==="reference"&&"message-input-reference",((g=Oe(r))==null?void 0:g.show)==="reply"&&"message-input-reply",Oe(o)&&((v=Oe(r))==null?void 0:v.show)==="reference"&&"message-input-reference-h5",Oe(o)&&((_=Oe(r))==null?void 0:_.show)==="reply"&&"message-input-reply-h5"])},[((M=Oe(r))==null?void 0:M.show)==="reference"?(J(),oe("div",Yte,[G("div",Jte,[G("div",Xte,[G("span",Zte,De((k=(I=Oe(r))==null?void 0:I.message)!=null&&k.nick?(S=(w=Oe(r))==null?void 0:w.message)==null?void 0:S.nick:(A=(L=Oe(r))==null?void 0:L.message)==null?void 0:A.from)+": ",1),G("span",null,De((O=Oe(r))==null?void 0:O.content),1)]),G("label",{class:"icon icon-cancel",onClick:i})])])):((H=Oe(r))==null?void 0:H.show)==="reply"?(J(),oe("div",Qte,[G("div",ene,[tne,G("div",nne,[G("span",null,De((P=(q=Oe(r))==null?void 0:q.message)!=null&&P.nick?(j=(B=Oe(r))==null?void 0:B.message)==null?void 0:j.nick:(R=($=Oe(r))==null?void 0:$.message)==null?void 0:R.from)+De(Oe(o)?":":""),1),G("span",null,De((T=Oe(r))==null?void 0:T.content),1)]),G("label",{class:"icon icon-cancel",onClick:i})])])):Ie("",!0)],2)):Ie("",!0)}}});const one=Kt(rne,[["__scopeId","data-v-d64843bf"]]),ine=it({__name:"index",props:{placeholder:{type:String,default:"this is placeholder"},conversation:{type:Object,default:()=>({})},replyOrReference:{type:Object,default:()=>({})},isGroup:{type:Boolean,default:!1},memberList:{type:Array,default:()=>[]},isMute:{type:Boolean,default:!0},muteText:{type:String,default:""},enableInput:{type:Boolean,default:!0},enableAt:{type:Boolean,default:!0},enableDragUpload:{type:Boolean,default:!0},enableTyping:{type:Boolean,default:!0},env:{type:Object,default:()=>({})}},emits:["sendMessage","resetReplyOrReference","onTyping"],setup(e,{expose:t,emit:n}){var H;const r=e,{placeholder:o,isGroup:i,memberList:s,conversation:u,replyOrReference:d,env:f,enableTyping:g}=Yt(r),v=Ne(),_=Ne((H=r==null?void 0:r.env)==null?void 0:H.isH5),M=Ai&&Ai();Bt(()=>u.value,(q,P)=>{var B;(q==null?void 0:q.conversationID)!==(P==null?void 0:P.conversationID)&&((B=v==null?void 0:v.value)==null||B.resetEditor())},{immediate:!0});const I=async()=>{var j,$,R,T;if(console.log(M.state.imConnent,"store.imConnent"),!M.state.imConnent){du.emit("reConnectIm",!0);return}const q=($=(j=window==null?void 0:window.TUIKitTUICore)==null?void 0:j.TUIServer)==null?void 0:$.TUIChat,P=(R=v==null?void 0:v.value)==null?void 0:R.getEditorContent(),B=d.value;await(P==null?void 0:P.forEach(async x=>{var Z,K,re,X,ie,he,ae,de;try{let Y,te;switch(Y=w(Y),x==null?void 0:x.type){case"text":Y=S(Y),(Z=x==null?void 0:x.payload)!=null&&Z.atUserList?te=await(q==null?void 0:q.sendTextAtMessage({text:JSON.parse(JSON.stringify((K=x==null?void 0:x.payload)==null?void 0:K.text)),atUserList:(re=x==null?void 0:x.payload)==null?void 0:re.atUserList},Y)):te=await(q==null?void 0:q.sendTextMessage(JSON.parse(JSON.stringify((X=x==null?void 0:x.payload)==null?void 0:X.text)),Y)),(B==null?void 0:B.show)==="reply"&&await q.replyMessage((ie=te==null?void 0:te.data)==null?void 0:ie.message);break;case"image":await(q==null?void 0:q.sendImageMessage((he=x==null?void 0:x.payload)==null?void 0:he.file));break;case"video":await(q==null?void 0:q.sendVideoMessage((ae=x==null?void 0:x.payload)==null?void 0:ae.file));break;case"file":await(q==null?void 0:q.sendFileMessage((de=x==null?void 0:x.payload)==null?void 0:de.file));break;default:break}n("sendMessage")}catch(Y){po(Y,f.value)}})),(T=v==null?void 0:v.value)==null||T.resetEditor(),A()},k=(q,P)=>{n("onTyping",q,P)},w=q=>(g.value&&(q||(q={}),q.messageFeature={needTyping:1,version:1}),q),S=q=>{var P,B,j,$,R,T,x,Z,K,re,X,ie,he,ae,de,Y,te,fe,Re,ve;if(((P=d==null?void 0:d.value)==null?void 0:P.show)!=="reply"&&((B=d==null?void 0:d.value)==null?void 0:B.show)!=="reference")return q;if(q||(q={}),q.messageReply={messageAbstract:(j=d==null?void 0:d.value)==null?void 0:j.content,messageSender:((R=($=d==null?void 0:d.value)==null?void 0:$.message)==null?void 0:R.nick)||((x=(T=d==null?void 0:d.value)==null?void 0:T.message)==null?void 0:x.from),messageID:(K=(Z=d==null?void 0:d.value)==null?void 0:Z.message)==null?void 0:K.ID,messageType:(re=d==null?void 0:d.value)==null?void 0:re.type,version:1},((X=d==null?void 0:d.value)==null?void 0:X.show)==="reply")try{if(q.messageReply.messageRootID=(he=(ie=d==null?void 0:d.value)==null?void 0:ie.message)==null?void 0:he.ID,(de=(ae=d==null?void 0:d.value)==null?void 0:ae.message)!=null&&de.cloudCustomData){const be=or((te=(Y=d==null?void 0:d.value)==null?void 0:Y.message)==null?void 0:te.cloudCustomData);q.messageReply.messageRootID=((fe=be==null?void 0:be.messageReply)==null?void 0:fe.messageRootID)||((ve=(Re=d==null?void 0:d.value)==null?void 0:Re.message)==null?void 0:ve.ID)}}catch(be){console.warn(be)}return q},L=q=>{var P;(P=v==null?void 0:v.value)==null||P.addEmoji(q)},A=()=>{n("resetReplyOrReference")};return t({addEmoji:L,reEdit:q=>{var P,B;(P=v==null?void 0:v.value)==null||P.resetEditor(),A(),(B=v==null?void 0:v.value)==null||B.setEditorContent(q)}}),(q,P)=>{var B,j;return J(),oe("div",{class:lt(["message-input",_.value&&"message-input-h5"])},[It(Vte,{ref_key:"editor",ref:v,isH5:_.value,placeholder:Oe(o),isGroup:Oe(i),isMute:e.isMute,muteText:e.muteText,enableInput:e.enableInput,enableAt:e.enableAt,enableTyping:Oe(g),enableDragUpload:e.enableDragUpload,onSendMessage:I,onOnTyping:k},null,8,["isH5","placeholder","isGroup","isMute","muteText","enableInput","enableAt","enableTyping","enableDragUpload"]),e.isMute?Ie("",!0):(J(),_t(Wte,{key:0,isH5:_.value,onSendMessage:I},null,8,["isH5"])),e.enableAt?(J(),_t(Hte,{key:1,memberList:Oe(s),isGroup:Oe(i),selfInfo:(j=(B=Oe(u))==null?void 0:B.groupProfile)==null?void 0:j.selfInfo,isH5:_.value},null,8,["memberList","isGroup","selfInfo","isH5"])):Ie("",!0),It(one,{replyOrReference:Oe(d),isH5:_.value,onResetReplyOrReference:A},null,8,["replyOrReference","isH5"])],2)}}});const yN=Kt(ine,[["__scopeId","data-v-801eead8"]]),_N=it({name:"TUIChat",components:{MessageSystem:pj,MessageTimestamp:wJ,Manage:hl,MessageInput:yN,MessageItem:CJ},props:{isMsgNeedReadReceipt:{type:Boolean,default:!1},isNeedTyping:{type:Boolean,default:!0},isNeedEmojiReact:{type:Boolean,default:!0},currentModal:{type:String,default:"message"}},setup(e){var le,ke,Pe,xe,He,Te;const{TUIServer:t}=_N;(ke=(le=t==null?void 0:t.TUICore)==null?void 0:le.TUIServer)==null||ke.TUIGroup,(xe=(Pe=t==null?void 0:t.TUICore)==null?void 0:Pe.TUIServer)==null||xe.TUIProfile;const n=t.TUICore.isOfficial&&Ai&&Ai()||{},{t:r}=window.TUIKitTUICore.config.i18n.useI18n(),o=Wt({messageList:[],conversation:{},text:"",atText:"",types:t.TUICore.TIM.TYPES,currentMessage:{},dialogID:"",forwardStatus:!1,receiptDialogStatus:!1,repliesDialogStatus:!1,showImagePreview:!1,currentImagePreview:{},isCompleted:!1,userInfoView:!1,userInfo:{isGroup:!1,list:[]},selfInfo:{},messageComponents:oD("message"),isShow:!1,muteText:"您已被管理员禁言",isFirstSend:!0,isFirstRender:!0,showGroupMemberList:!1,reference:{message:{},content:"",type:0,show:""},historyReference:!1,referenceID:"",allMemberList:[],env:t.TUICore.TUIEnv,showResend:!1,resendMessage:{},inputBlur:!1,inputComposition:!1,inputCompositionCont:"",needTyping:e.isNeedTyping,needReadReceipt:!1,peerNeedReceipt:!1,needToBottom:!1,toBottomTipCont:"",messageInView:[],readSet:new Set,isUserAction:!1,scroll:{scrollTop:0,scrollHeight:0,scrollTopMin:1/0,scrollTopMax:0},isMsgNeedReadReceipt:!1,isNeedEmojiReact:!1,dropDownRef:null,typingRef:null}),i=!!vg().default,s=async W=>{var ne,ye,Be;W&&await((Be=(ye=(ne=t==null?void 0:t.TUICore)==null?void 0:ne.TUIServer)==null?void 0:ye.TUIConversation)==null?void 0:Be.setMessageRead(W))},u=async W=>{var ye;const ne=W.filter(Be=>(Be==null?void 0:Be.flow)==="in"&&(Be==null?void 0:Be.needReadReceipt)&&!o.readSet.has(Be==null?void 0:Be.ID));ne.length&&await(t==null?void 0:t.sendMessageReadReceipt(ne).then(()=>{ne.forEach(Be=>o.readSet.add(Be==null?void 0:Be.ID))})),await s((ye=o==null?void 0:o.conversation)==null?void 0:ye.conversationID)},d=[];Object.keys(oD("send")).forEach(W=>{d.push(W)}),hl.TUIServer=t,hl.GroupServer=(Te=(He=t==null?void 0:t.TUICore)==null?void 0:He.TUIServer)==null?void 0:Te.TUIGroup;const f=Ne(),g=Ne(),v=Ne(),_=Ne(),M=Ne();t.bind(o);const I={list:[],handleAvatar:NC,handleName:Jh},k=Ne();xa(k,()=>{o.showGroupMemberList=!1});const w=qe(()=>{const{conversation:W}=o;return W!=null&&W.conversationID?(W==null?void 0:W.type)===t.TUICore.TIM.TYPES.CONV_SYSTEM?"system":"chat":""}),S=qe(()=>{var ne,ye,Be;const{conversation:W}=o;if((W==null?void 0:W.type)===t.TUICore.TIM.TYPES.CONV_GROUP){if(((ne=W==null?void 0:W.groupProfile)==null?void 0:ne.selfInfo.role)===t.TUICore.TIM.TYPES.GRP_MBR_ROLE_MEMBER&&((ye=W==null?void 0:W.groupProfile)!=null&&ye.muteAllMembers))return!0;const Fe=new Date().getTime();if(((Be=o.selfInfo)==null?void 0:Be.muteUntil)*1e3-Fe>0)return!0}return!1});nn(()=>{o.isMsgNeedReadReceipt=e.isMsgNeedReadReceipt,o.needReadReceipt=o.isMsgNeedReadReceipt,o.needTyping=e.isNeedTyping,o.isNeedEmojiReact=e.isNeedEmojiReact}),Bt(()=>{var W;return(W=o==null?void 0:o.conversation)==null?void 0:W.conversationID},(W,ne)=>{W!==ne&&(o.scroll.scrollTop=0,o.scroll.scrollHeight=0,o.scroll.scrollTopMin=1/0,o.scroll.scrollTopMax=0,o.text="",o.atText="",o.reference={message:{},content:"",type:0,show:""})},{deep:!0}),Bt(S,(W,ne)=>{var Be,je,ct;const{conversation:ye}=o;if(W&&(ye==null?void 0:ye.type)===t.TUICore.TIM.TYPES.CONV_GROUP){((Be=ye==null?void 0:ye.groupProfile)==null?void 0:Be.selfInfo.role)===t.TUICore.TIM.TYPES.GRP_MBR_ROLE_MEMBER&&((je=ye==null?void 0:ye.groupProfile)!=null&&je.muteAllMembers)&&(o.muteText="管理员开启学生禁言");const St=new Date().getTime();((ct=o.selfInfo)==null?void 0:ct.muteUntil)*1e3-St>0&&(o.muteText="您已被管理员禁言")}});const L=qe(()=>{const{conversation:W}=o;return Jh(W)}),A=qe(()=>o.messageList.filter(W=>!W.isDeleted&&!ff(W))),O=qe(()=>{var W;return(W=A==null?void 0:A.value)==null?void 0:W.filter(ne=>!ne.isRevoked&&ne.type===o.types.MSG_IMAGE)}),H=qe(()=>{const{conversation:W,needReadReceipt:ne}=o;return!!((W==null?void 0:W.type)===t.TUICore.TIM.TYPES.CONV_C2C||ne)});Bt(A,(W,ne)=>{var ye,Be;if(wr(()=>{var ct,Fe;const je=((ct=W[W.length-1])==null?void 0:ct.ID)===((Fe=ne[ne.length-1])==null?void 0:Fe.ID);W.length===0||je||fe()}),o.currentMessage){const je=(ye=o.currentMessage)==null?void 0:ye.ID,ct=W.find(Fe=>Fe.ID===je);ct&&(o.currentMessage=xC(ct))}if(o.historyReference){for(let je=0;jeo.scroll.scrollTop,W=>{setTimeout(()=>{var ne;W===((ne=f==null?void 0:f.value)==null?void 0:ne.scrollTop)&&(o.scroll.scrollTopMin!==1/0&&o.scroll.scrollTopMax!==0&&ce("scroll"),o.scroll.scrollTopMin=1/0,o.scroll.scrollTopMax=0)},20)},{deep:!0}),Rn(()=>{Bt(()=>f==null?void 0:f.value,()=>{f!=null&&f.value&&f.value.addEventListener("scroll",be)},{deep:!0})});const q=W=>{var ne;(ne=M==null?void 0:M.value)==null||ne.addEmoji(W)},P=async W=>{o.isFirstSend&&(o.isFirstSend=!1),o.reference.show="",t.TUICore.isOfficial&&(n!=null&&n.commit)&&(n==null||n.commit("handleTask",0))},B=W=>{o.currentMessage=W,o.dialogID=W.ID},j=W=>{o.env.isH5?(o.showResend=!0,o.resendMessage=W):t.resendMessage(W).catch(ne=>{po(ne,o.env)})},$=W=>{o.currentMessage=W,I.list=t.TUICore.getStore().TUIConversation.conversationList,o.forwardStatus=!0},R=(W,ne)=>{let ye=LG(W);o.reference={message:W,content:ye==null?void 0:ye.referenceMessageForShow,type:ye==null?void 0:ye.referenceMessageType,show:ne}},T=()=>{t.resendMessage(o.resendMessage).then(()=>{o.showResend=!1}).catch(W=>{po(W,o.env),o.showResend=!1})},x=W=>{var ne,ye,Be;(ne=W==null?void 0:W.payload)!=null&&ne.text&&((Be=M==null?void 0:M.value)==null||Be.reEdit((ye=W==null?void 0:W.payload)==null?void 0:ye.text))},Z=W=>{t.handleGroupApplication(W)},K=W=>{W.clipboardData.files[0]&&t.sendImageMessage(W.clipboardData.files[0])},re=async()=>{await t.getHistoryMessageList().then(()=>{var W;Re("target",(W=f==null?void 0:f.value)==null?void 0:W.firstElementChild)})},X=W=>{var ye,Be;o.referenceID=W;const ne=[];for(let je=0;je{v.value[je].getElementsByClassName("content")[0].classList.add("reference-content")}));ne.indexOf(W)===-1&&t.getHistoryMessageList().then(()=>{o.historyReference=!0})},ie=()=>{o.showGroupMemberList=!o.showGroupMemberList},he=()=>{t.TUICore.TUIServer.TUIConversation.handleCurrentConversation()},ae=W=>{window.open(W.url)},de=(W,ne)=>{var ye,Be,je;if(!(!W||!ne))switch(ne){case"reference":R(W,ne);break;case"reply":R(W,ne);break;case"reedit":(ye=W==null?void 0:W.payload)!=null&&ye.text&&((je=M==null?void 0:M.value)==null||je.reEdit((Be=W==null?void 0:W.payload)==null?void 0:Be.text));break}},Y=async(W,ne)=>{var ye;if(!(!(W!=null&&W.ID)||!ne))switch(ne){case"receipt":if(W.conversationType!==t.TUICore.TIM.TYPES.CONV_GROUP||((ye=W.readReceiptInfo)==null?void 0:ye.unreadCount)===0)return;o.currentMessage=W,o.receiptDialogStatus=!0;break;case"replies":o.currentMessage=W,o.repliesDialogStatus=!0;break;case"forward":o.currentMessage=W,I.list=t.TUICore.getStore().TUIConversation.conversationList,o.forwardStatus=!0;break;case"previewImage":o.showImagePreview=!o.showImagePreview,o.currentImagePreview=W;break}},te=async W=>{if(W)switch(W){case"receipt":o.currentMessage={},o.receiptDialogStatus=!1;break;case"replies":o.currentMessage={},o.repliesDialogStatus=!1;break}},fe=()=>{var W;if(o.isFirstRender){o.needToBottom=!1,Re("bottom"),o.isFirstRender=!1;return}if(f.value){const{scrollHeight:ne,scrollTop:ye,clientHeight:Be}=f.value;ne-(ye+Be)<=Be||((W=A.value[A.value.length-1])==null?void 0:W.flow)==="out"?Re("bottom"):ue(!0)}},Re=(W,ne)=>{var ye;switch((ye=f==null?void 0:f.value)==null||ye.removeEventListener("scroll",be),o.isUserAction=!0,W){case dn.scrollType.toBottom:o.needToBottom=!1,wr(()=>{var Be,je,ct;(Be=o==null?void 0:o.env)!=null&&Be.isH5?ve():(ct=(je=f==null?void 0:f.value)==null?void 0:je.lastElementChild)==null||ct.scrollIntoView(!1),pk(f==null?void 0:f.value,"message-img",async()=>{var Fe,at,St;(Fe=o==null?void 0:o.env)!=null&&Fe.isH5?ve():(St=(at=f==null?void 0:f.value)==null?void 0:at.lastElementChild)==null||St.scrollIntoView(!1),f.value.addEventListener("scroll",be),await ce("page")})});break;case dn.scrollType.toTarget:wr(()=>{ne==null||ne.scrollIntoView(!1),pk(f==null?void 0:f.value,"message-img",async()=>{ne==null||ne.scrollIntoView(!1),f.value.addEventListener("scroll",be),await ce("page")})});break}},ve=()=>{var W;(W=document==null?void 0:document.getElementById("app"))!=null&&W.style&&(document.getElementById("app").style.marginBottom="",document.getElementById("app").style.height="100%"),f.value.scrollTop=f.value.scrollHeight},be=()=>{const{scrollHeight:W,scrollTop:ne,clientHeight:ye}=f.value;H.value&&(o.scroll.scrollHeight=W,o.scroll.scrollTop=ne,o.scroll.scrollTopMin=o.isUserAction?o.scroll.scrollTopMin:Math.min(o.scroll.scrollTopMin,o.scroll.scrollTop),o.scroll.scrollTopMax=o.isUserAction?o.scroll.scrollTopMax:Math.max(o.scroll.scrollTopMax,o.scroll.scrollTop)),W-(ne+ye)>ye?ue(!0):ue(!1),o.isUserAction=!1},ue=W=>{var ne,ye,Be;switch(W){case!0:o.needToBottom=!0,(ne=o==null?void 0:o.conversation)!=null&&ne.unreadCount&&((ye=o==null?void 0:o.conversation)==null?void 0:ye.unreadCount)>0?o.toBottomTipCont=`${(Be=o==null?void 0:o.conversation)==null?void 0:Be.unreadCount} ${r("TUIChat.条新消息")}`:o.toBottomTipCont=r("TUIChat.回到最新位置");break;case!1:o.needToBottom=!1;break;default:o.needToBottom=!1;break}},ce=async W=>{var Be,je,ct,Fe;if(!H.value){s((Be=o==null?void 0:o.conversation)==null?void 0:Be.conversationID);return}o.messageInView.length&&(o.messageInView=[]);let ne=0,ye=0;switch(W){case dn.inViewType.page:ne=o.scroll.scrollTop,ye=o.scroll.scrollTop+((je=f==null?void 0:f.value)==null?void 0:je.clientHeight);break;case dn.inViewType.scroll:ne=o.scroll.scrollTopMin,ye=o.scroll.scrollTopMax+((ct=f==null?void 0:f.value)==null?void 0:ct.clientHeight);break}for(let at=0;at<((Fe=v==null?void 0:v.value)==null?void 0:Fe.length);at++)if(Ee(W,v==null?void 0:v.value[at],ne,ye)){const St=A.value[at];o.messageInView.push(St)}await u(o.messageInView)},Ee=(W,ne,ye,Be)=>{const je=f.value.getBoundingClientRect().top,ct=f.value.getBoundingClientRect().bottom,{top:Fe,bottom:at}=ne.getBoundingClientRect(),{offsetTop:St,clientHeight:vn}=ne;switch(W){case dn.inViewType.page:return Math.round(Fe)>=Math.round(je)&&Math.round(at)<=Math.round(ct);case dn.inViewType.scroll:return Math.round(St)>=Math.round(ye)&&Math.round(St+vn)<=Math.round(Be);default:return!1}},pe=W=>{o.dropDownRef&&o.dropDownRef.removeChild(o.dropDownRef.children[0]),o.dropDownRef=W},V=()=>{Re("bottom")},ee=W=>{o.showImagePreview=!o.showImagePreview,o.currentImagePreview=W},se=()=>{o.reference={message:{},content:"",type:0,show:""}},Ce=(W,ne)=>{var ye;(ye=o==null?void 0:o.typingRef)==null||ye.onTyping(W,ne)};return{...Yt(o),conversationType:w,messages:A,messageEle:f,inputEle:g,messageInput:M,messageAimID:v,conversationData:I,conversationName:L,constant:dn,reportMessageSend:P,handleTyping:Ce,handleItem:B,handleEdit:x,handleEditor:de,getHistoryMessageList:re,handleApplication:Z,pluginComponentList:d,handleSend:q,closeDialog:te,isMute:S,pasting:K,setMessageRead:s,sendMessageReadReceipt:u,dialog:k,jumpID:X,back:he,slotDefault:i,toggleshowGroupMemberList:ie,resendMessage:j,submit:T,Link:W5,openLink:ae,readReceiptDialog:_,scrollToTarget:Re,needGroupReceipt:H,handleDropDownOpen:pe,isMessageTip:HO,showDialog:Y,forwardMessage:$,referOrReplyMessage:R,handleUploadingImageOrVideo:V,handleImagePreview:ee,imageList:O,resetReplyOrReference:se}}});const bN=e=>(pr("data-v-56c041b1"),e=e(),hr(),e),sne={class:"TUIChat-header"},ane={class:"setting"},lne={class:"TUIChat-main"},une=["id"],cne=bN(()=>G("i",{class:"icon icon-bottom-double"},null,-1)),dne={class:"to-bottom-tip-cont"},fne={key:0,class:"dialog dialog-conversation"},pne=["src"],hne={class:"name"},gne=["src"],mne={key:0,class:"name"},vne={class:"dialog dialog-conversation"},yne={class:"func",id:"func"},_ne={class:"func-main"},bne={class:"mask-main"},Mne=bN(()=>G("i",null,null,-1)),Ine={key:1,class:"TUIChat"},Cne={class:"TUIChat-header"};function Tne(e,t,n,r,o,i){var k;const s=xt("TypingHeader"),u=xt("Manage"),d=xt("Replies"),f=xt("MessageTimestamp"),g=xt("MessageItem"),v=xt("ReadReceiptDialog"),_=xt("imagePreviewer"),M=xt("MessageInput"),I=xt("MessageSystem");return e.conversationType==="chat"?(J(),oe("div",{key:0,class:lt(["TUIChat",[e.env.isH5?"TUIChat-H5":""]])},[G("header",sne,[e.env.isH5?(J(),oe("i",{key:0,class:"icon icon-back",onClick:t[0]||(t[0]=(...w)=>e.back&&e.back(...w))})):Ie("",!0),It(s,{needTyping:e.needTyping,conversation:e.conversation,messageList:e.messageList,ref:"typingRef"},null,8,["needTyping","conversation","messageList"]),G("aside",ane,[e.conversation.groupProfile?(J(),_t(u,{key:0,conversation:e.conversation,userInfo:e.userInfo,isH5:e.env.isH5},null,8,["conversation","userInfo","isH5"])):Ie("",!0),It(d,{message:e.currentMessage,conversation:e.conversation,show:e.repliesDialogStatus,isH5:e.env.isH5,messageList:e.messageList,onCloseDialog:e.closeDialog,ref:"repliesDialog"},null,8,["message","conversation","show","isH5","messageList","onCloseDialog"])])]),G("div",lne,[G("ul",{class:"TUI-message-list",onClick:t[3]||(t[3]=w=>e.dialogID=""),ref:"messageEle",id:"messageEle"},[e.isCompleted?Ie("",!0):(J(),oe("p",{key:0,class:"message-more",onClick:t[1]||(t[1]=(...w)=>e.getHistoryMessageList&&e.getHistoryMessageList(...w))},De(e.$t("TUIChat.查看更多")),1)),(J(!0),oe(ft,null,zt(e.messages,(w,S)=>{var L;return J(),oe("li",{key:S,id:w==null?void 0:w.ID,ref_for:!0,ref:"messageAimID"},[It(f,{currTime:w==null?void 0:w.time,prevTime:S>0?(L=e.messages[S-1])==null?void 0:L.time:0},null,8,["currTime","prevTime"]),It(g,{message:w,env:e.env,types:e.types,displayGroupMessageReadReceipt:e.needGroupReceipt,displayEmojiReactions:e.isNeedEmojiReact,messageList:e.messages,onHandleEditor:e.handleEditor,onShowDialog:e.showDialog,onUploading:e.handleUploadingImageOrVideo,onJumpID:e.jumpID,onResendMessage:e.resendMessage},null,8,["message","env","types","displayGroupMessageReadReceipt","displayEmojiReactions","messageList","onHandleEditor","onShowDialog","onUploading","onJumpID","onResendMessage"])],8,une)}),128)),e.needToBottom?(J(),oe("div",{key:1,class:"to-bottom-tip",onClick:t[2]||(t[2]=w=>e.scrollToTarget("bottom"))},[cne,G("div",dne,[G("span",null,De(e.toBottomTipCont),1)])])):Ie("",!0)],512),e.forwardStatus&&e.messageComponents.Forward?(J(),oe("div",fne,[(J(),_t(cf("Forward"),{list:e.conversationData.list,message:e.currentMessage,show:e.forwardStatus,isH5:e.env.isH5,"onUpdate:show":t[4]||(t[4]=w=>e.forwardStatus=w)},{left:Ct(({data:w})=>[G("img",{class:"avatar",src:e.conversationData.handleAvatar(w)},null,8,pne),G("label",hne,De(e.conversationData.handleName(w)),1)]),right:Ct(({data:w})=>[G("img",{class:"avatar",src:e.conversationData.handleAvatar(w)},null,8,gne),e.env.isH5?Ie("",!0):(J(),oe("label",mne,De(e.conversationData.handleName(w)),1))]),_:1},40,["list","message","show","isH5"]))])):Ie("",!0),G("div",vne,[It(v,{message:e.currentMessage,conversation:e.conversation,show:e.receiptDialogStatus,isH5:e.env.isH5,onCloseDialog:e.closeDialog,ref:"readReceiptDialog"},null,8,["message","conversation","show","isH5","onCloseDialog"])]),e.showImagePreview?(J(),_t(_,{key:1,currentImage:e.currentImagePreview,imageList:e.imageList,onClose:t[5]||(t[5]=w=>e.showImagePreview=!1)},null,8,["currentImage","imageList"])):Ie("",!0)]),G("div",{class:lt(["TUIChat-footer",[e.isMute&&"disabled",e.env.isH5&&"TUIChat-H5-footer"]])},[G("div",yne,[G("main",_ne,[(J(!0),oe(ft,null,zt(e.pluginComponentList,(w,S)=>(J(),_t(cf(w),{key:S,isMute:e.isMute,isH5:e.env.isH5,conversation:e.conversation,parentID:"func",onSend:e.handleSend},null,40,["isMute","isH5","conversation","onSend"]))),128))])]),It(M,{ref:"messageInput",conversation:e.conversation,memberList:e.allMemberList,env:e.env,isGroup:(k=e.userInfo)==null?void 0:k.isGroup,replyOrReference:e.reference,isMute:e.isMute,muteText:e.muteText,placeholder:e.$t("TUIChat.请输入消息"),onSendMessage:e.reportMessageSend,onResetReplyOrReference:e.resetReplyOrReference,onOnTyping:e.handleTyping},null,8,["conversation","memberList","env","isGroup","replyOrReference","isMute","muteText","placeholder","onSendMessage","onResetReplyOrReference","onOnTyping"])],2),Bn(G("div",{class:"mask",onClick:t[8]||(t[8]=w=>e.showResend=!1)},[G("div",bne,[G("header",null,De(e.$t("TUIChat.确认重发该消息?")),1),G("footer",null,[G("p",{onClick:t[6]||(t[6]=w=>e.showResend=!1)},De(e.$t("TUIChat.取消")),1),Mne,G("p",{onClick:t[7]||(t[7]=(...w)=>e.submit&&e.submit(...w))},De(e.$t("TUIChat.确定")),1)])])],512),[[to,e.showResend]])],2)):e.conversationType==="system"?(J(),oe("div",Ine,[G("header",Cne,[G("h1",null,De(e.conversationName),1)]),It(I,{data:e.messages,types:e.types,onApplication:e.handleApplication},null,8,["data","types","onApplication"])])):e.slotDefault?Ft(e.$slots,"default",{key:2},void 0,!0):Ie("",!0)}const bc=Kt(_N,[["render",Tne],["__scopeId","data-v-56c041b1"]]),MN=it({props:{show:{type:Boolean,default:()=>!1},isMute:{type:Boolean,default:()=>!1},isH5:{type:Boolean,default:()=>!1},parentID:{type:String,default:()=>""}},setup(e,t){var f;const n=Wt({emojiUrl:fh,emojiMap:df,emojiName:OO,faceUrl:kG,bigEmojiList:((f=window==null?void 0:window.TUIKitTUICore)==null?void 0:f.isOfficial)&&DG||[],show:!1,currentIndex:0,isMute:!1,transDom:!1}),r=Ne();nn(()=>{n.show=e.show,n.isMute=e.isMute});const o=()=>{const g=document.getElementsByClassName("face-main")[0];n.isMute||(g.style.display=g.style.display==="none"?"flex":"none"),g.style.display==="none"&&d(0),i()},i=()=>{const g=document.getElementById(e.parentID),v=document.getElementsByClassName("face-H5-main")[0];e.isH5&&(g==null||g.appendChild(v))};xa(r,()=>{const g=document.getElementsByClassName("face-main")[0];g&&(g.style.display="none")});const s=async(g,v)=>{const _={name:g};if(n.currentIndex===0)return _.type="emo",_.url=fh+df[g],_.template=``,e.isH5||o(),t.emit("send",_);try{await MN.TUIServer.sendFaceMessage({index:n.bigEmojiList[n.currentIndex-1].icon,data:n.bigEmojiList[n.currentIndex-1].list[v]})}catch(M){po(M,e)}e.isH5||o()},u=qe(()=>{const g=[n.emojiName];for(let v=0;v{n.currentIndex=g};return{...Yt(n),toggleShow:o,select:s,selectFace:d,list:u,dialog:r}}});const wne=e=>(pr("data-v-164dea2b"),e=e(),hr(),e),Sne={class:"face",id:"face"},kne=["onClick"],Dne=["src"],Ene=["src"],Ane={class:"face-tab"},Lne=wne(()=>G("i",{class:"icon icon-face"},null,-1)),One=[Lne],Rne=["onClick"],Nne=["src"];function Pne(e,t,n,r,o,i){return J(),oe("div",Sne,[G("i",{class:"icon icon-face",title:"表情",onClick:t[0]||(t[0]=(...s)=>e.toggleShow&&e.toggleShow(...s))}),Bn(G("main",{class:lt(["face-main",[e.isH5&&"face-H5-main"]]),ref:"dialog"},[(J(!0),oe(ft,null,zt(e.list,(s,u)=>Bn((J(),oe("ul",{class:"face-list",key:u},[(J(!0),oe(ft,null,zt(s,(d,f)=>(J(),oe("li",{class:"face-list-item",key:f,onClick:g=>e.select(d,f)},[u===0?(J(),oe("img",{key:0,src:e.emojiUrl+e.emojiMap[d]},null,8,Dne)):(J(),oe("img",{key:1,class:"face-img",src:e.faceUrl+d+"@2x.png"},null,8,Ene))],8,kne))),128))])),[[to,e.currentIndex===u]])),128)),G("ul",Ane,[G("li",{class:"face-tab-item",onClick:t[1]||(t[1]=s=>e.selectFace(0))},One),(J(!0),oe(ft,null,zt(e.bigEmojiList,(s,u)=>(J(),oe("li",{class:"face-tab-item",key:u,onClick:d=>e.selectFace(u+1)},[G("img",{src:e.faceUrl+s.list[0]+"@2x.png"},null,8,Nne)],8,Rne))),128))])],2),[[to,e.show]])])}const xne=Kt(MN,[["render",Pne],["__scopeId","data-v-164dea2b"]]),IN=it({props:{show:{type:Boolean,default:()=>!1},isMute:{type:Boolean,default:()=>!1},isH5:{type:Boolean,default:()=>!1}},setup(e,t){const n=Wt({isMute:!1});nn(()=>{n.isMute=e.isMute});const r=async o=>{if(o.target.files.length>0)try{await IN.TUIServer.sendImageMessage(o.target)}catch(i){po(i,e)}o.target.value=""};return{...Yt(n),sendUploadMessage:r}}});const Une={class:"upload-btn icon icon-image"};function Fne(e,t,n,r,o,i){return J(),oe("span",Une,[e.isMute?Ie("",!0):(J(),oe("input",{key:0,title:"图片",type:"file","data-type":"image",accept:"image/*",onChange:t[0]||(t[0]=(...s)=>e.sendUploadMessage&&e.sendUploadMessage(...s))},null,32)),Ft(e.$slots,"default",{},void 0,!0)])}const $ne=Kt(IN,[["render",Fne],["__scopeId","data-v-27d988f7"]]),CN=it({props:{show:{type:Boolean,default:()=>!1},isMute:{type:Boolean,default:()=>!1},isH5:{type:Boolean,default:()=>!1}},setup(e,t){const n=Wt({isMute:!1});nn(()=>{n.isMute=e.isMute});const r=async o=>{if(o.target.files.length>0)try{await CN.TUIServer.sendVideoMessage(o.target)}catch(i){po(i,e)}o.target.value=""};return{...Yt(n),sendUploadMessage:r}}});const Gne={class:"upload-btn icon icon-video"};function Bne(e,t,n,r,o,i){return J(),oe("span",Gne,[e.isMute?Ie("",!0):(J(),oe("input",{key:0,title:"视频",type:"file","data-type":"video",accept:"video/*",onChange:t[0]||(t[0]=(...s)=>e.sendUploadMessage&&e.sendUploadMessage(...s))},null,32)),Ft(e.$slots,"default",{},void 0,!0)])}const Hne=Kt(CN,[["render",Bne],["__scopeId","data-v-7dbfb080"]]),TN=it({props:{show:{type:Boolean,default:()=>!1},isMute:{type:Boolean,default:()=>!1},isH5:{type:Boolean,default:()=>!1}},setup(e,t){const n=Wt({isMute:!1});nn(()=>{n.isMute=e.isMute});const r=async o=>{if(o.target.files.length>0)try{await TN.TUIServer.sendFileMessage(o.target)}catch(i){po(i,e)}o.target.value=""};return{...Yt(n),sendUploadMessage:r}}});const qne={class:"upload-btn icon icon-files"};function Vne(e,t,n,r,o,i){return J(),oe("span",qne,[e.isMute?Ie("",!0):(J(),oe("input",{key:0,title:"文件",type:"file","data-type":"file",accept:"*",onChange:t[0]||(t[0]=(...s)=>e.sendUploadMessage&&e.sendUploadMessage(...s))},null,32)),Ft(e.$slots,"default",{},void 0,!0)])}const zne=Kt(TN,[["render",Vne],["__scopeId","data-v-cb5a1f5e"]]),wN=it({components:{Transfer:sT,MaskTUI:j5},name:"转发",props:{list:{type:Array,default:()=>[]},message:{type:Object,default:()=>({})},show:{type:Boolean,default:()=>!1},isH5:{type:Boolean,default:()=>!1}},setup(e,t){const n=Wt({list:[],show:!1,to:-1}),r=Ne();nn(()=>{n.list=e.list,n.show=e.show});const o=()=>{n.show=!n.show,n.show||(t.emit("update:show",n.show),n.to=-1)},i=u=>{n.show=u,t.emit("update:show",n.show),n.to=-1},s=async u=>{u.map(async d=>{try{await wN.TUIServer.forwardMessage(e.message,d)}catch(f){po(f,e)}}),o()};return{...Yt(n),toggleShow:o,onMaskShow:i,handleForWordMessage:s,dialog:r}}});function jne(e,t,n,r,o,i){const s=xt("Transfer"),u=xt("MaskTUI");return J(),_t(u,{show:e.show,"onUpdate:show":e.onMaskShow},{default:Ct(()=>[It(s,{title:"转发",list:e.list,isSearch:!0,isH5:e.isH5,isCustomItem:!0,resultShow:!0,onSubmit:e.handleForWordMessage,onCancel:e.toggleShow},{left:Ct(({data:d})=>[Ft(e.$slots,"left",{data:d},void 0,!0)]),right:Ct(({data:d})=>[Ft(e.$slots,"right",{data:d},void 0,!0)]),_:3},8,["list","isH5","onSubmit","onCancel"])]),_:3},8,["show","onUpdate:show"])}const Wne=Kt(wN,[["render",jne],["__scopeId","data-v-44a69792"]]),SN=it({props:{needTyping:{type:Boolean,default:!1},conversation:{type:Object,default:()=>({})},messageList:{type:Array,default:()=>[]}},setup(e,t){const n=Wt({messageList:[],conversation:{},title:"",timeValid:0,myTypingStatus:0,otherTypingStatus:0,needTyping:!1,lastOtherMessageTime:0,lastMyTypingTime:0,lastOtherTypingTime:0,options:{data:{businessID:dn.typeUserTyping,typingStatus:0,version:1,userAction:0,actionParam:dn.typeInputStatusEnd},description:"",extension:""}});nn(()=>{n.messageList=e.messageList,n.conversation=e.conversation,n.needTyping=e.needTyping});const r=qe(()=>{const{conversation:M}=n;return M!=null&&M.conversationID?M.conversationID:""}),o=qe(()=>{const{conversation:M}=n;return Jh(M)}),i=qe(()=>{const{conversation:M}=n;return M!=null&&M.type?M==null?void 0:M.type:""}),s=qe(()=>n.needTyping&&n.otherTypingStatus?"对方正在输入":o==null?void 0:o.value),u=(M,I)=>{if(!(!n.needTyping||i.value!=="C2C")&&(new Date().getTime()/1e3-n.lastOtherMessageTime<30&&(n.timeValid=1),!!n.timeValid))if(!M&&!I){n.myTypingStatus=1;const k=new Date().getTime();k-n.lastMyTypingTime>4e3&&(n.lastMyTypingTime=k,f(n.myTypingStatus))}else n.myTypingStatus=0,n.lastMyTypingTime=0,f(n.myTypingStatus)};Bt(r,(M,I)=>{M!==I&&(n.needTyping=!1,n.timeValid=0)}),Bt(()=>n.needTyping,(M,I)=>{M||(n.myTypingStatus=0,n.otherTypingStatus=0,n.lastOtherMessageTime=0)}),Bt(()=>n.messageList,(M,I)=>{wr(()=>{var k,w;M.length===0||i.value!=="C2C"||(n.lastOtherMessageTime=g(M),((k=M[M.length-1])==null?void 0:k.flow)==="in"&&(ff(M[M.length-1])?(n.otherTypingStatus=d(M[M.length-1]),_()):(n.lastOtherMessageTime=(w=M[M.length-1])==null?void 0:w.time,n.otherTypingStatus=0)))})},{deep:!0});const d=M=>{var I;try{const{typingStatus:k,actionParam:w}=or((I=M==null?void 0:M.payload)==null?void 0:I.data);return k===1&&w===dn.typeInputStatusIng?1:0}catch{return 0}},f=M=>{n.options={data:{businessID:dn.typeUserTyping,typingStatus:M?1:0,version:1,userAction:M?14:0,actionParam:M?dn.typeInputStatusIng:dn.typeInputStatusEnd},description:"",extension:""},SN.TUIServer.sendTypingMessage(n.options)},g=M=>{if(!M)return 0;for(let I=M.length-1;I>=0;I--)if(!ff(M[I])&&M[I].flow==="in")return M[I].time;return 0},v=(M,I=2e3)=>{let k;return function(){k&&clearTimeout(k),k=setTimeout(M,I)}},_=v(()=>{n.otherTypingStatus=0},5e3);return{...Yt(n),conversationID:r,conversationName:o,conversationType:i,title:s,isTypingMessage:ff,sendTypingMessage:f,handleTypingMessageStatus:d,getLastOtherMessageTime:g,debounce:v,waitTypingEnd:_,onTyping:u}}});function Kne(e,t,n,r,o,i){return J(),oe("h1",null,De(e.title==="对方正在输入"?e.$t("TUIChat.对方正在输入"):e.title),1)}const Yne=Kt(SN,[["render",Kne],["__scopeId","data-v-760ab1e1"]]),bs=it({type:"custom",props:{message:{type:Object,default:()=>({})},isH5:{type:Boolean,default:!1},show:{type:Boolean,default:()=>!1}},setup(e,t){const{t:n}=window.TUIKitTUICore.config.i18n.useI18n(),r=Wt({message:{},isGroup:!1,show:!1,isH5:!1,messageInfo:{isImg:!1,content:""},readReceiptList:[{label:e.isH5?n("TUIChat.人已读"):n("TUIChat.已读"),count:0,userList:[],isCompleted:!0,cursor:"",show:!0},{label:e.isH5?n("TUIChat.人未读"):n("TUIChat.未读"),count:0,userList:[],isCompleted:!0,cursor:"",show:!0},{label:e.isH5?n("TUIChat.人关闭阅读状态"):n("TUIChat.关闭阅读状态"),count:0,userList:[],isCompleted:!0,cursor:"",show:!1}],showListNow:0,isMenuOpen:!0,env:Yh()}),o=Ne();nn(()=>{r.show=e.show,r.isH5=e.isH5}),Bt(()=>{e.message,r.show},async()=>{var I,k,w,S;r.show&&(M(),r.message=e.message,f(),_(),r.readReceiptList[0].count=((k=(I=r.message)==null?void 0:I.readReceiptInfo)==null?void 0:k.readCount)||r.readReceiptList[0].count,r.readReceiptList[1].count=((S=(w=r.message)==null?void 0:w.readReceiptInfo)==null?void 0:S.unreadCount)||r.readReceiptList[1].count,s(),u())},{deep:!0});const i=()=>{r.show=!r.show,r.show||(t.emit("closeDialog","receipt"),v())};xa(o,()=>{r.show=!1,t.emit("closeDialog","receipt"),v()});const s=async(I=!1)=>{var k,w;if(!(!r.isGroup||!r.message||Object.keys(r.message).length===0))try{const S=await bs.TUIServer.getGroupReadMemberList(r.message,I?r.readReceiptList[0].cursor:"");r.readReceiptList[0].isCompleted=(k=S==null?void 0:S.data)==null?void 0:k.isCompleted,r.readReceiptList[0].cursor=((w=S==null?void 0:S.data)==null?void 0:w.cursor)||"";const L=S.data.readUserIDList,A=await d(L);r.readReceiptList[0].userList=I?[...r.readReceiptList[0].userList,...A]:A}catch(S){if(S&&(S==null?void 0:S.code)===10062){const L=n("TUIChat.您当前购买使用的套餐包暂未开通群消息已读回执功能");po(L,r.env),console.warn(L)}}},u=async(I=!1)=>{var L;if(!r.isGroup||!r.message||Object.keys(r.message).length===0)return;const k=await bs.TUIServer.getGroupUnreadMemberList(r.message,I?r.readReceiptList[1].cursor:"");r.readReceiptList[1].isCompleted=k==null?void 0:k.data.isCompleted,r.readReceiptList[1].cursor=((L=k==null?void 0:k.data)==null?void 0:L.cursor)||"";const w=k.data.unreadUserIDList,S=await d(w);r.readReceiptList[1].userList=I?[...r.readReceiptList[1].userList,...S]:S},d=async I=>{const k=[];return I.length&&r.isGroup&&(await bs.TUIServer.getUserProfile(I)).data.forEach(L=>{k.push({nick:L==null?void 0:L.nick,avatar:L==null?void 0:L.avatar,userID:L==null?void 0:L.userID})}),k},f=()=>{var I;((I=r.message)==null?void 0:I.conversationType)===bs.TUIServer.TUICore.TIM.TYPES.CONV_GROUP?r.isGroup=!0:r.isGroup=!1},g=()=>{switch(r.showListNow){case 0:s(!0);break;case 1:u(!0);break}},v=()=>{r.message={},r.readReceiptList=[{label:e.isH5?n("TUIChat.人已读"):n("TUIChat.已读"),count:0,userList:[],isCompleted:!0,cursor:"",show:!0},{label:e.isH5?n("TUIChat.人未读"):n("TUIChat.未读"),count:0,userList:[],isCompleted:!0,cursor:"",show:!0},{label:e.isH5?n("TUIChat.人关闭阅读状态"):n("TUIChat.关闭阅读状态"),count:0,userList:[],isCompleted:!0,cursor:"",show:!1}],r.showListNow=0,r.messageInfo={isImg:!1,content:""}},_=()=>{var I,k,w,S,L,A,O;if(!(!r.message||!r.isH5))switch(r.message.type){case bs.TUIServer.TUICore.TIM.TYPES.MSG_TEXT:r.messageInfo.content=(k=(I=r.message)==null?void 0:I.payload)==null?void 0:k.text,r.messageInfo.isImg=!1;break;case bs.TUIServer.TUICore.TIM.TYPES.MSG_CUSTOM:r.messageInfo.content=n("TUIChat.自定义"),r.messageInfo.isImg=!1;break;case bs.TUIServer.TUICore.TIM.TYPES.MSG_IMAGE:r.messageInfo.content=(w=FO(r.message))==null?void 0:w.url,r.messageInfo.isImg=!0;break;case bs.TUIServer.TUICore.TIM.TYPES.MSG_AUDIO:r.messageInfo.content=n("TUIChat.语音"),r.messageInfo.isImg=!1;break;case bs.TUIServer.TUICore.TIM.TYPES.MSG_VIDEO:r.messageInfo.content=(S=$O(r.message))==null?void 0:S.snapshotUrl,r.messageInfo.isImg=!0;break;case bs.TUIServer.TUICore.TIM.TYPES.MSG_FILE:r.messageInfo.content=n("TUIChat.文件")+((A=(L=r.message)==null?void 0:L.payload)==null?void 0:A.fileName),r.messageInfo.isImg=!1;break;case bs.TUIServer.TUICore.TIM.TYPES.MSG_FACE:r.messageInfo.content=(O=UO(r.message))==null?void 0:O.url,r.messageInfo.isImg=!0;break}},M=()=>{var I;r.isMenuOpen=!!((I=document==null?void 0:document.getElementsByClassName("home-menu"))!=null&&I.length)};return{...Yt(r),dialog:o,toggleShow:i,getReadList:s,getUnreadList:u,isGroup:f,handleAvatarAndName:d,close:v,getMoreList:g,showMessage:_,caculateTimeago:Mg,handleDialogPosition:M}}});const Jne={class:"header"},Xne={class:"header-back"},Zne={class:"header-title"},Qne={class:"header-close"},ere={class:"body"},tre={key:0,class:"body-message"},nre={class:"message"},rre={class:"message-info"},ore={class:"message-cont"},ire=["src"],sre={key:1},are={class:"body-tab"},lre=["onClick"],ure={class:"tab-item-title"},cre={class:"tab-item-count"},dre={class:"body-list"},fre=["src"],pre={class:"name"};function hre(e,t,n,r,o,i){return e.show?(J(),oe("div",{key:0,class:lt(["read-receipt",[e.isH5?"read-receipt-H5":"",e.isMenuOpen?"read-receipt-menu-open":""]]),ref:"dialog"},[G("div",Jne,[G("div",Xne,[e.isH5?(J(),oe("i",{key:0,class:"icon icon-back",onClick:t[0]||(t[0]=(...s)=>e.toggleShow&&e.toggleShow(...s))})):Ie("",!0)]),G("div",Zne,[G("span",null,De(e.$t("TUIChat.消息详情")),1)]),G("div",Qne,[e.isH5?Ie("",!0):(J(),oe("i",{key:0,class:"icon icon-close",onClick:t[1]||(t[1]=(...s)=>e.toggleShow&&e.toggleShow(...s))}))])]),G("div",ere,[e.isH5?(J(),oe("div",tre,[G("div",nre,[G("div",rre,[G("span",null,De(e.message.from),1),G("span",null,De(e.caculateTimeago(e.message.time*1e3)),1)]),G("div",ore,[e.messageInfo.isImg?(J(),oe("img",{key:0,class:"message-cont-img",src:e.messageInfo.content},null,8,ire)):(J(),oe("p",sre,De(e.messageInfo.content),1))])])])):Ie("",!0),G("div",are,[(J(!0),oe(ft,null,zt(e.readReceiptList,(s,u)=>(J(),oe(ft,null,[s.show?(J(),oe("div",{class:lt(["tab-item",u===e.showListNow&&"tab-item-now"]),key:u,onClick:d=>e.showListNow=u},[G("div",ure,De(s==null?void 0:s.label),1),G("div",cre,De(s==null?void 0:s.count),1)],10,lre)):Ie("",!0)],64))),256))]),G("div",dre,[G("ul",null,[(J(!0),oe(ft,null,zt(e.readReceiptList[e.showListNow].userList,(s,u)=>(J(),oe("li",{key:u,class:"body-list-item"},[G("img",{class:"avatar",src:(s==null?void 0:s.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,fre),G("div",pre,De((s==null?void 0:s.nick)||(s==null?void 0:s.userID)),1)]))),128))]),e.readReceiptList[e.showListNow].isCompleted?Ie("",!0):(J(),oe("div",{key:0,class:"more",onClick:t[2]||(t[2]=(...s)=>e.getMoreList&&e.getMoreList(...s))},"查看更多"))])])],2)):Ie("",!0)}const gre=Kt(bs,[["render",hre],["__scopeId","data-v-9d608ac0"]]),mre=it({props:{message:{type:Object,default:()=>({})},isH5:{type:Boolean,default:!1},isRoot:{type:Boolean,default:!1}},components:{MessageText:VO,MessageEmojiReact:oT},setup(e,t){const n=Wt({message:{},isCustom:{},isH5:!1,url:"",isRoot:!1,constant:dn,TIM:yt});nn(()=>{var i,s;n.message=e.message;const{payload:o}=e.message;n.isCustom=(o==null?void 0:o.data)||" ",n.isCustom=or(o==null?void 0:o.data),n.isH5=e.isH5,n.isRoot=e.isRoot,n.message.type===yt.TYPES.MSG_FACE&&(n.url=`https://web.sdk.qcloud.com/im/assets/face-elem/${(s=(i=n.message)==null?void 0:i.payload)==null?void 0:s.data}@2x.png`),console.log(e.message,"----------------- ")});const r=async()=>{};return{...Yt(n),handleNotice:r,handleTextMessageShowContext:xO,handleCustomMessageShowContext:BO,handleFileMessageShowContext:GO,caculateTimeago:Mg}}});const TT=e=>(pr("data-v-e244c532"),e=e(),hr(),e),vre={class:"message-bubble",ref:"htmlRefHook"},yre=["src"],_re={class:"message-area"},bre={class:"message-area-title"},Mre={class:"name"},Ire={class:"time"},Cre={class:"content content-in"},Tre={key:1},wre=TT(()=>G("div",{class:"notice-title"},[G("i",{class:"iconNotice"}),G("span",null,"群公告")],-1)),Sre={class:"content"},kre={class:"content-title"},Dre={class:"content-text"},Ere={key:1},Are=["src"],Lre=TT(()=>G("i",{class:"icon icon-voice"},null,-1)),Ore={key:4,class:"message-video-cover"},Rre=["src"],Nre=["src"],Pre={key:6,class:"message-file"},xre=TT(()=>G("i",{class:"icon icon-files"},null,-1)),Ure={class:"message-file-content"};function Fre(e,t,n,r,o,i){var d,f,g,v,_,M,I,k,w,S,L,A,O,H,q,P,B,j,$,R;const s=xt("MessageText"),u=xt("MessageEmojiReact");return J(),oe("div",{class:lt(["replies-item",e.isRoot?"":"replies-item-normal"])},[G("div",vre,[G("img",{class:"avatar",src:((d=e.message)==null?void 0:d.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,yre),G("main",_re,[G("div",bre,[G("label",Mre,De(e.isRoot?e.message.nameCard||e.message.nick||e.message.from:e.message.messageSenderName||e.message.messageSender),1),G("label",Ire,De(e.caculateTimeago((e.isRoot?(f=e.message)==null?void 0:f.time:(g=e.message)==null?void 0:g.messageTime)*1e3)),1)]),G("div",Cre,[e.message.messageType===e.constant.typeText||e.message.type===e.TIM.TYPES.MSG_TEXT||!e.isRoot?(J(),_t(s,{key:0,data:e.handleTextMessageShowContext(e.isRoot?e.message:{payload:{text:(v=e.message)==null?void 0:v.messageAbstract}})},null,8,["data"])):Ie("",!0),e.message.messageType===e.constant.typeCustom||e.message.type===e.TIM.TYPES.MSG_CUSTOM?(J(),oe("span",Tre,[e.isCustom.businessID===e.constant.TC_GROUP_NOTICE?(J(),oe("div",{key:0,class:"notice-message",onClick:t[0]||(t[0]=(...T)=>e.handleNotice&&e.handleNotice(...T))},[wre,G("div",Sre,[G("div",kre,De(e.isCustom.msgTitle),1),G("div",Dre,De(e.isCustom.msgContent),1)])])):(J(),oe("span",Ere,De((_=e.handleCustomMessageShowContext(e.message))==null?void 0:_.custom),1))])):Ie("",!0),e.message.messageType===e.constant.typeImage||e.message.type===e.TIM.TYPES.MSG_IMAGE?(J(),oe("img",{key:2,class:"message-img",src:(I=(M=e.message)==null?void 0:M.payload)==null?void 0:I.imageInfoArray[1].url},null,8,Are)):Ie("",!0),e.message.messageType===e.constant.typeAudio||e.message.type===e.TIM.TYPES.MSG_AUDIO?(J(),oe("div",{key:3,class:"message-audio",style:No(`width: ${((w=(k=e.message)==null?void 0:k.payload)==null?void 0:w.second)*10+40}Px`)},[Lre,G("label",null,De((L=(S=e.message)==null?void 0:S.payload)==null?void 0:L.second)+"s",1)],4)):Ie("",!0),e.message.messageType===e.constant.typeVideo||e.message.type===e.TIM.TYPES.MSG_VIDEO?(J(),oe("div",Ore,[G("img",{class:"message-videoimg",src:((O=(A=e.message)==null?void 0:A.payload)==null?void 0:O.snapshotUrl)||((q=(H=e.message)==null?void 0:H.payload)==null?void 0:q.thumbUrl)},null,8,Rre)])):Ie("",!0),e.message.messageType===e.constant.typeFace||e.message.type===e.TIM.TYPES.MSG_FACE?(J(),oe("img",{key:5,class:"message-img",src:e.url},null,8,Nre)):Ie("",!0),e.message.messageType===e.constant.typeFile||e.message.type===e.TIM.TYPES.MSG_FILE?(J(),oe("div",Pre,[xre,G("div",Ure,[G("label",null,De((B=(P=e.message)==null?void 0:P.payload)==null?void 0:B.fileName),1),G("span",null,De(((j=e.handleFileMessageShowContext(e.message))==null?void 0:j.size)||((R=($=e.message)==null?void 0:$.payload)==null?void 0:R.fileSize)),1)])])):Ie("",!0),It(u,{message:e.message,type:"content"},null,8,["message"])])])],512)],2)}const $re=Kt(mre,[["render",Fre],["__scopeId","data-v-e244c532"]]),Gre=it({type:"custom",components:{RepliesItem:$re},props:{message:{type:Object,default:()=>({})},isH5:{type:Boolean,default:!1},show:{type:Boolean,default:()=>!1},url:{type:String,default:""},messageList:{type:Array,default:()=>[]}},setup(e,t){const n=Wt({message:{},isGroup:!1,show:!1,isH5:!1,url:"",showListNow:0,isMenuOpen:!0,replies:[],messageList:[],TIM:yt}),r=Ne();nn(()=>{n.message=e.message,n.show=e.show,n.isH5=e.isH5,n.url=e.url,n.messageList=e.messageList}),Bt(()=>{n.message,n.messageList},()=>{n.message=e.message,n.messageList=e.messageList,i(n.message)},{deep:!0});const o=()=>{n.show=!n.show,n.show||(t.emit("closeDialog","replies"),s())};xa(r,()=>{n.show=!1,t.emit("closeDialog","replies"),s()});const i=async d=>{var f,g;try{const{cloudCustomData:v}=d;if(!v)return;const _=or(v);n.replies=(f=_==null?void 0:_.messageReplies)==null?void 0:f.replies,(g=n==null?void 0:n.replies)==null||g.forEach(async M=>{var S,L,A;const{messageID:I,messageSender:k}=M,w=n.messageList.find(O=>O.ID===I||O.from===k);M.avatar=w?w==null?void 0:w.avatar:"";try{const O=await GV({imUserIds:[k]});M.messageSenderName=((S=O.data[0])==null?void 0:S.friendNickname)||((L=O.data[0])==null?void 0:L.imUserId),M.avatar=((A=O.data[0])==null?void 0:A.friendAvatar)||""}catch{}})}catch(v){console.log(v)}},s=()=>{n.message={}},u=()=>{var d;n.isMenuOpen=!!((d=document==null?void 0:document.getElementsByClassName("home-menu"))!=null&&d.length)};return{...Yt(n),dialog:r,toggleShow:o,close:s,caculateTimeago:Mg,handleDialogPosition:u}}});const Bre={class:"header"},Hre={class:"header-back"},qre={class:"header-title"},Vre={class:"header-close"},zre={class:"body"},jre={class:"body-message"},Wre={class:"body-list"};function Kre(e,t,n,r,o,i){const s=xt("RepliesItem");return e.show?(J(),oe("div",{key:0,class:lt(["replies",[e.isH5?"replies-H5":"",e.isMenuOpen?"replies-menu-open":""]]),ref:"dialog"},[G("div",Bre,[G("div",Hre,[e.isH5?(J(),oe("i",{key:0,class:"icon icon-back",onClick:t[0]||(t[0]=(...u)=>e.toggleShow&&e.toggleShow(...u))})):Ie("",!0)]),G("div",qre,[G("span",null,De(e.$t("TUIChat.回复详情")),1)]),G("div",Vre,[e.isH5?Ie("",!0):(J(),oe("i",{key:0,class:"icon icon-close",onClick:t[1]||(t[1]=(...u)=>e.toggleShow&&e.toggleShow(...u))}))])]),G("div",zre,[G("div",jre,[It(s,{message:e.message,isH5:e.isH5,isRoot:!0},null,8,["message","isH5"])]),G("div",Wre,[G("ul",null,[(J(!0),oe(ft,null,zt(e.replies,(u,d)=>(J(),oe("li",{key:d,class:"body-list-item"},[It(s,{message:u,isH5:e.isH5,isRoot:!1},null,8,["message","isH5"])]))),128))])])])],2)):Ie("",!0)}const Yre=Kt(Gre,[["render",Kre],["__scopeId","data-v-a47e0517"]]),kN=e=>(pr("data-v-b5337b73"),e=e(),hr(),e),Jre=["src"],Xre=kN(()=>G("i",{class:"icon icon-left-arrow"},null,-1)),Zre=[Xre],Qre=kN(()=>G("i",{class:"icon icon-right-arrow"},null,-1)),eoe=[Qre],toe={class:"actions-bar"},noe={class:"image-counter"},roe=it({__name:"imagePreviewer",props:{imageList:{type:Array,default:()=>[]},currentImage:{type:Object,default:()=>({})}},emits:["close"],setup(e,{emit:t}){const n=e;function r(X){return typeof X=="number"&&isFinite(X)}const o=Ne(1),i=Ne(0),s=Ne(.1),u=Ne(0),d=Ne(),f=Ne(),{isH5:g}=Yh();let v=0,_={},M=!1,I=!1,k=null;nn(()=>{u.value=n.imageList.findIndex(X=>X.ID===n.currentImage.ID)});const w=X=>{X.preventDefault(),H(X),q(X)},S=X=>{X.preventDefault(),M=!0,X.touches&&X.touches.length===2&&(I=!0,P(X))},L=X=>{var ae;X.preventDefault();let ie=0,he=0;if(I){k||(I=!1,delete _.pageX2,delete _.pageY2,k=setTimeout(()=>{k=null},200));return}if(k===null){switch(M){case!0:ie=(ae=X==null?void 0:X.changedTouches[0])==null?void 0:ae.pageX,he=ie-v,he>100?K():he<-100&&Z();break;case!1:R();break}k=setTimeout(()=>{k=null},200)}},A=X=>{I=!1,delete _.pageX1,delete _.pageY1},O=X=>{if(X.preventDefault(),Math.abs(X.deltaX)!==0&&Math.abs(X.deltaY)!==0)return;let ie=o.value;ie+=X.deltaY*(X.ctrlKey?-.01:.002),ie=Math.min(Math.max(.125,ie),4),o.value=ie},H=X=>{var ie;v=(ie=X==null?void 0:X.changedTouches[0])==null?void 0:ie.pageX,M=!1},q=X=>{let ie=X==null?void 0:X.touches[0],he=X==null?void 0:X.touches[1];_.pageX1=ie==null?void 0:ie.pageX,_.pageY1=ie==null?void 0:ie.pageY,he&&(_.pageX2=he==null?void 0:he.pageX,_.pageY2=he==null?void 0:he.pageY)},P=X=>{let ie=X==null?void 0:X.touches[0],he=X==null?void 0:X.touches[1];he&&(r(_.pageX2)||(_.pageX2=he.pageX),r(_.pageY2)||(_.pageY2=he.pageY));const ae=(Y,te,fe,Re)=>Math.hypot(fe-Y,Re-te);if(!r(_.pageX1)||!r(_.pageY1)||!r(_.pageX2)||!r(_.pageY2))return;let de=ae(ie.pageX,ie.pageY,he.pageX,he.pageY)/ae(_.pageX1,_.pageY1,_.pageX2,_.pageY2);o.value=Math.min(Math.max(.5,o.value*de),4)};Rn(()=>{var X,ie,he,ae,de;(X=d==null?void 0:d.value)==null||X.addEventListener("touchstart",w),(ie=d==null?void 0:d.value)==null||ie.addEventListener("touchmove",S),(he=d==null?void 0:d.value)==null||he.addEventListener("touchend",L),(ae=d==null?void 0:d.value)==null||ae.addEventListener("touchcancel;",A),(de=d==null?void 0:d.value)==null||de.addEventListener("wheel",O),document==null||document.addEventListener("keydown",B)});const B=X=>{X.preventDefault(),(X==null?void 0:X.keyCode)===27&&R()},j=()=>{o.value+=.1},$=()=>{o.value=o.value-.1>s.value?o.value-.1:s.value},R=()=>{t("close")},T=()=>{i.value-=90},x=()=>{i.value+=90},Z=()=>{f.value.style.transition="0.5s",u.value{f.value.style.transition="0.5s",u.value>0&&u.value--,re()},re=()=>{o.value=1,i.value=0};return _l(()=>{var X,ie,he,ae,de;(X=d==null?void 0:d.value)==null||X.removeEventListener("touchstart",w),(ie=d==null?void 0:d.value)==null||ie.removeEventListener("touchmove",S),(he=d==null?void 0:d.value)==null||he.removeEventListener("touchend",L),(ae=d==null?void 0:d.value)==null||ae.removeEventListener("touchcancel;",A),(de=d==null?void 0:d.value)==null||de.removeEventListener("wheel",O),document==null||document.removeEventListener("keydown",B)}),(X,ie)=>{var he;return J(),oe("div",{class:lt(["image-previewer",[Oe(g)&&"image-previewer-h5"]])},[G("div",{class:"image-wrapper",ref_key:"image",ref:d},[G("ul",{class:"image-list",style:No({width:`${e.imageList.length*100}%`,transform:`translateX(-${u.value*100/e.imageList.length}%)`}),ref_key:"ul",ref:f},[(J(!0),oe(ft,null,zt(e.imageList,(ae,de)=>{var Y,te;return J(),oe("li",{class:"image-item",key:de},[G("img",{class:"image-preview",style:No({transform:`scale(${o.value}) rotate(${i.value}deg)`}),src:(te=(Y=ae==null?void 0:ae.payload)==null?void 0:Y.imageInfoArray[0])==null?void 0:te.url},null,12,Jre)])}),128))],4)],512),Bn(G("i",{class:"icon icon-close",onClick:R},null,512),[[to,!Oe(g)]]),Bn(G("div",{class:"image-button image-button-left",onClick:K},Zre,512),[[to,!Oe(g)&&u.value>0]]),Bn(G("div",{class:"image-button image-button-right",onClick:Z},eoe,512),[[to,!Oe(g)&&u.value<((he=e.imageList)==null?void 0:he.length)-1]]),G("div",toe,[G("i",{class:"icon icon-zoom-in",onClick:j}),G("i",{class:"icon icon-zoom-out",onClick:$}),G("i",{class:"icon icon-refresh-left",onClick:T}),G("i",{class:"icon icon-refresh-right",onClick:x}),G("span",noe,De(u.value+1)+" / "+De(e.imageList.length),1)])],2)}}});const ooe=Kt(roe,[["__scopeId","data-v-b5337b73"]]);let xf={Face:xne,Image:$ne,Video:Hne,File:zne};const wT={Forward:Wne},ST={TypingHeader:Yne,ReadReceiptDialog:gre,Replies:Yre,ImagePreviewer:ooe,MessageInput:yN};function oD(e){let t={};switch(e){case"send":t=xf;break;case"message":t=wT;break;case"other":t=ST;break}return t}const ioe=e=>{const t={...xf,...wT,...ST};Object.keys(t).forEach(n=>{t[n].TUIServer=cl.server}),bc.TUIServer=cl.server,bc.components={...bc.components,...t},e.component(cl.name,bc)},soe=e=>(cl.server=new qO(e),e.component(cl.name,cl),cl),aoe=e=>{xf={...xf,...e}},loe=e=>{e.map(t=>(delete xf[t],t))},cl={name:"TUIChat",component:bc,server:qO,sendComponents:xf,messageComponents:wT,otherComponents:ST,install:ioe,plugin:soe,setPluginComponents:aoe,removePluginComponents:loe};class DN extends ld{constructor(n){super();Xt(this,"TUICore");Xt(this,"store");Xt(this,"currentStore",{});Xt(this,"storeCallback");this.TUICore=n,this.bindTIMEvent(),this.store=n.setComponentStore("TUIConversation",{},this.updateStore.bind(this))}destroyed(){this.unbindTIMEvent()}updateStore(n,r){var o,i;(o=this==null?void 0:this.currentStore)!=null&&o.conversationData&&(this.currentStore.conversationData.list=n.conversationList,this.currentStore.userIDList=(i=this.currentStore.conversationData.list)==null?void 0:i.filter(s=>{var u;return(u=s==null?void 0:s.userProfile)==null?void 0:u.userID}).map(s=>{var u;return(u=s==null?void 0:s.userProfile)==null?void 0:u.userID}))}handlePromiseCallback(n){return new Promise((r,o)=>{const i={TUIName:"TUIConversation",callback:()=>{n&&n(r,o)}};this.TUICore.setAwaitFunc(i.TUIName,i.callback)})}bindTIMEvent(){this.TUICore.tim.on(this.TUICore.TIM.EVENT.CONVERSATION_LIST_UPDATED,this.handleConversationListUpdate,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.NET_STATE_CHANGE,this.handleNetStateChange,this)}unbindTIMEvent(){this.TUICore.tim.off(this.TUICore.TIM.EVENT.CONVERSATION_LIST_UPDATED,this.handleConversationListUpdate),this.TUICore.tim.off(this.TUICore.TIM.EVENT.NET_STATE_CHANGE,this.handleNetStateChange)}handleConversationListUpdate(n){this.TUICore.tim.isReady()&&window.parent&&window.parent.postMessage({api:"getNoReadMessageCount",count:this.TUICore.tim.getTotalUnreadMessageCount()},"*"),this.handleFilterSystem(n.data)}handleNetStateChange(n){var r;this.currentStore.netWork=((r=n==null?void 0:n.data)==null?void 0:r.state)||""}handleFilterSystem(n){const r={allConversationList:n,conversationList:[]};return n.filter(i=>{var s;return(i==null?void 0:i.conversationID)===((s=this==null?void 0:this.currentStore)==null?void 0:s.currentConversationID)}).length===0&&this.handleCurrentConversation({}),r.conversationList=n.filter(i=>i.type!==this.TUICore.TIM.TYPES.CONV_SYSTEM),this.store.allConversationList=r.allConversationList,this.store.conversationList=r.conversationList,r}handleFilterName(n,r){const o={allConversationList:n,conversationList:[]};console.log(n,"list");const i=[];return n.forEach(s=>{var u,d,f,g,v,_;console.log(s,"item",r),s.type==="GROUP"&&(console.log(s.type,(u=s.groupProfile)==null?void 0:u.name,(d=s.groupProfile)==null?void 0:d.name.indexOf(r)),((f=s.groupProfile)==null?void 0:f.name.indexOf(r))>=0&&i.push(s)),s.type==="C2C"&&(console.log(s.type,(g=s.userProfile)==null?void 0:g.nick,(v=s.userProfile)==null?void 0:v.nick.indexOf(r)),((_=s.userProfile)==null?void 0:_.nick.indexOf(r))>=0&&i.push(s))}),o.conversationList=i.filter(s=>s.type!==this.TUICore.TIM.TYPES.CONV_SYSTEM),this.store.allConversationList=o.allConversationList,this.store.conversationList=o.conversationList,o}async setMessageRead(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.setMessageRead({conversationID:n});r(i)}catch(i){o(i)}})}async deleteConversation(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.deleteConversation(n);r(i)}catch(i){o(i)}})}async pinConversation(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.pinConversation(n);r(i)}catch(i){o(i)}})}async muteConversation(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.setMessageRemindType(n);r(i)}catch(i){o(i)}})}async getConversationProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getConversationProfile(n);r(i)}catch(i){o(i)}})}async getConversationList(){return this.handlePromiseCallback(async(n,r)=>{try{const o=await this.TUICore.tim.getConversationList();this.handleFilterSystem(o.data.conversationList),n(o)}catch(o){r(o)}})}async getConversationListForName(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getConversationList();console.log(i,"getConversationListForName"),this.handleFilterName(i.data.conversationList,n),r(i)}catch(i){o(i)}})}async getUserProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getUserProfile({userIDList:n});r(i)}catch(i){o(i)}})}async bind(n,r){return this.currentStore=n,await this.getConversationList(),r&&r(),this.currentStore}handleCurrentConversation(n){if(this.TUICore.getStore().TUIChat.conversation=n||{},!(n!=null&&n.conversationID)){this.currentStore.currentConversationID="";return}this.currentStore.currentConversationID===(n==null?void 0:n.conversationID)&&(this.currentStore.currentConversationID=""),this.currentStore.currentConversationID&&this.setMessageRead(this.currentStore.currentConversationID),this.currentStore.currentConversationID=n==null?void 0:n.conversationID,this.setMessageRead(n.conversationID)}}const uoe=it({props:{conversation:{type:Object,default:()=>({})},handleConversation:{type:Object,default:()=>({})},currentID:{type:String,default:()=>""},toggleID:{type:String,default:()=>""},isH5:{type:Boolean,default:()=>!1},displayOnlineStatus:{type:Boolean,default:()=>!1},userStatusList:{type:Map,default:()=>new Map},types:{type:Object,default:()=>({})}},setup(e,t){const n=Wt({conversation:{},currentID:"",currentConversation:{},toggle:!1,currentuserID:"",conversationType:"",loop:0,displayOnlineStatus:!1,userStatusList:new Map}),r=Ne(),o=Ne();xa(o,()=>{n.toggle===!0&&t.emit("toggle","")}),nn(()=>{n.conversation=e.conversation,n.currentID=e.currentID,n.toggle=!1,n.displayOnlineStatus=e.displayOnlineStatus,n.userStatusList=e.userStatusList,e.toggleID===e.conversation.conversationID&&(n.toggle=!0)}),Bt(()=>n.toggle,f=>{f&&wr(()=>{var M;const g=Rv(r),v=(M=o==null?void 0:o.value)==null?void 0:M.offsetParent,_=Rv(v);g.top.value-_.top.value-g.height.value-30>0&&(r.value.style.top="auto",r.value.style.bottom="30Px")})});const i=f=>{t.emit("open",f),t.emit("toggle","")},s=f=>{var g;(g=f==null?void 0:f.target)!=null&&g.oncontextmenu&&(f.target.oncontextmenu=function(){return!1}),t.emit("toggle",n.conversation.conversationID)},u=f=>{t.emit("handle",{name:f,conversation:n.conversation}),t.emit("toggle","")},d=()=>{var f;return!!(n.displayOnlineStatus&&((f=n.conversation)==null?void 0:f.type)===e.types.CONV_C2C)};return{...Yt(n),handleListItem:i,handleItem:u,dialog:r,content:o,toggleDialog:s,showUserOnlineStatus:d}}}),EN=""+new URL("mute-94c8513a.svg",import.meta.url).href;const coe=e=>(pr("data-v-931a1ef9"),e=e(),hr(),e),doe=["id"],foe={class:"left"},poe=["src"],hoe={key:1,class:"num"},goe={key:2,class:"num-notify"},moe={class:"content"},voe={class:"content-header"},yoe={class:"name"},_oe={class:"middle-box"},boe={key:0,class:"middle-box-at"},Moe={class:"content-footer"},Ioe={class:"time"},Coe={key:0,class:"mute-icon",src:EN},Toe=coe(()=>G("i",null,null,-1)),woe={key:0,class:"dialog dialog-item",ref:"dialog"};function Soe(e,t,n,r,o,i){var u,d,f,g,v,_,M,I,k;const s=xU("TUILongPress");return J(),oe("li",{ref:"content",class:lt(["TUI-conversation-content",[e.currentID===e.conversation.conversationID&&"selected",e.conversation.isPinned&&"pinned",e.isH5?"list-item-h5":""]]),id:e.conversation.conversationID},[Bn((J(),oe("div",{class:"TUI-conversation-item",onClick:t[0]||(t[0]=Mn(w=>e.handleListItem(e.conversation),["prevent","stop"])),onContextmenu:t[1]||(t[1]=Mn((...w)=>e.toggleDialog&&e.toggleDialog(...w),["prevent","right"]))},[G("aside",foe,[G("img",{class:"avatar",src:(u=e.handleConversation)==null?void 0:u.avator(e.conversation)},null,8,poe),e.showUserOnlineStatus()?(J(),oe("div",{key:0,class:lt(["online-status",((v=(g=e.userStatusList)==null?void 0:g.get((f=(d=e.conversation)==null?void 0:d.userProfile)==null?void 0:f.userID))==null?void 0:v.statusType)===1?"online-status-online":"online-status-offline"])},null,2)):Ie("",!0),e.conversation.unreadCount>0&&e.conversation.messageRemindType!=="AcceptNotNotify"?(J(),oe("span",hoe,De(e.conversation.unreadCount>99?"99+":e.conversation.unreadCount),1)):Ie("",!0),e.conversation.unreadCount>0&&e.conversation.messageRemindType==="AcceptNotNotify"?(J(),oe("span",goe)):Ie("",!0)]),G("div",moe,[G("div",voe,[G("label",null,[G("p",yoe,De((_=e.handleConversation)==null?void 0:_.name(e.conversation)),1)]),G("div",_oe,[e.conversation.type==="GROUP"&&e.conversation.groupAtInfoList.length>0?(J(),oe("span",boe,De((M=e.handleConversation)==null?void 0:M.showAt(e.conversation)),1)):Ie("",!0),G("p",null,De((I=e.handleConversation)==null?void 0:I.showMessage(e.conversation)),1)])]),G("div",Moe,[G("span",Ioe,De((k=e.handleConversation)==null?void 0:k.time(e.conversation.lastMessage.lastTime)),1),e.conversation.messageRemindType==="AcceptNotNotify"?(J(),oe("img",Coe)):Ie("",!0),Toe])])],32)),[[s,e.toggleDialog,void 0,{self:!0}]]),e.toggle?(J(),oe("div",woe,[G("p",{class:"conversation-options",onClick:t[2]||(t[2]=Mn(w=>e.handleItem("delete"),["stop"]))},De(e.$t("TUIConversation.删除会话")),1),e.conversation.isPinned?Ie("",!0):(J(),oe("p",{key:0,class:"conversation-options",onClick:t[3]||(t[3]=Mn(w=>e.handleItem("ispinned"),["stop"]))},De(e.$t("TUIConversation.置顶会话")),1)),e.conversation.isPinned?(J(),oe("p",{key:1,class:"conversation-options",onClick:t[4]||(t[4]=Mn(w=>e.handleItem("dispinned"),["stop"]))},De(e.$t("TUIConversation.取消置顶")),1)):Ie("",!0),e.conversation.messageRemindType===""||e.conversation.messageRemindType==="AcceptAndNotify"?(J(),oe("p",{key:2,class:"conversation-options",onClick:t[5]||(t[5]=Mn(w=>e.handleItem("mute"),["stop"]))},De(e.$t("TUIConversation.消息免打扰")),1)):Ie("",!0),e.conversation.messageRemindType==="AcceptNotNotify"?(J(),oe("p",{key:3,class:"conversation-options",onClick:t[6]||(t[6]=Mn(w=>e.handleItem("notMute"),["stop"]))},De(e.$t("TUIConversation.取消免打扰")),1)):Ie("",!0)],512)):Ie("",!0)],10,doe)}const koe=Kt(uoe,[["render",Soe],["__scopeId","data-v-931a1ef9"]]),uv=it({props:{data:{type:Object,default:()=>({})},currentID:{type:String,default:()=>""},isH5:{type:Boolean,default:()=>!1},displayOnlineStatus:{type:Boolean,default:()=>!1},userStatusList:{type:Map,default:()=>new Map}},components:{LiteItem:koe},setup(e,t){const n=uv==null?void 0:uv.TUIServer,r=Wt({data:{},currentID:"",toggleID:"",displayOnlineStatus:!1,userStatusList:new Map,types:n.TUICore.TIM.TYPES}),o=Ne();nn(()=>{r.data=e.data,r.currentID=e.currentID,r.displayOnlineStatus=e.displayOnlineStatus,r.userStatusList=e.userStatusList}),Bt(()=>e.userStatusList,()=>{r.userStatusList=e.userStatusList},{deep:!0});const i=_=>{t.emit("handleItem",_)},s=_=>{const{name:M,conversation:I}=_;switch(M){case"delete":u(I);break;case"ispinned":d(M,I);break;case"dispinned":d(M,I);break;case"mute":f(M,I);break;case"notMute":f(M,I);break}},u=_=>{n.deleteConversation(_.conversationID).then(M=>{const{conversationID:I}=M.data,{conversation:k}=n.TUICore.getStore().TUIChat;k.conversationID===I&&(n.TUICore.getStore().TUIChat.conversation={conversationID:""})})},d=(_,M)=>{const I={conversationID:M.conversationID,isPinned:!0};_==="dispinned"&&(I.isPinned=!1),console.log("dispinned",I),n.pinConversation(I)},f=(_,M)=>{const I={messageRemindType:n.TUICore.TIM.TYPES.MSG_REMIND_ACPT_NOT_NOTE};M.type===n.TUICore.TIM.TYPES.CONV_C2C?I.userIDList=[M.userProfile.userID]:M.type===n.TUICore.TIM.TYPES.CONV_GROUP&&(I.groupID=M.groupProfile.groupID),_==="notMute"&&(I.messageRemindType=n.TUICore.TIM.TYPES.MSG_REMIND_ACPT_AND_NOTE),n.muteConversation(I)},g=_=>{r.toggleID=_},v=()=>{r.toggleID&&(r.toggleID="")};return{...Yt(r),handleListItem:i,handleItem:s,handleToggleListItem:g,list:o,scrollChange:v}}});function Doe(e,t,n,r,o,i){const s=xt("LiteItem");return J(),oe("ul",{class:lt(["TUI-conversation-list",[e.isH5?"list-h5":""]]),ref:"list",onMousewheel:t[0]||(t[0]=(...u)=>e.scrollChange&&e.scrollChange(...u)),onScroll:t[1]||(t[1]=(...u)=>e.scrollChange&&e.scrollChange(...u))},[(J(!0),oe(ft,null,zt(e.data.list,(u,d)=>(J(),_t(s,{isH5:e.isH5,key:d,currentID:e.currentID,conversation:u,toggleID:e.toggleID,handleConversation:{avator:e.data.handleItemAvator,name:e.data.handleItemName,showAt:e.data.handleShowAt,showMessage:e.data.handleShowMessage,time:e.data.handleItemTime,userID:e.data.handleItemUserID},displayOnlineStatus:e.displayOnlineStatus,userStatusList:e.userStatusList,onToggle:e.handleToggleListItem,onOpen:e.handleListItem,onHandle:e.handleItem,types:e.types},null,8,["isH5","currentID","conversation","toggleID","handleConversation","displayOnlineStatus","userStatusList","onToggle","onOpen","onHandle","types"]))),128))],34)}const iD=Kt(uv,[["render",Doe],["__scopeId","data-v-d2dd4b20"]]),cv=it({name:"TUIConversation",components:{TUIConversationList:iD},props:{displayOnlineStatus:{type:Boolean,default:!1}},setup(e,t){const n=cv==null?void 0:cv.TUIServer,r=Wt({currentConversationID:"",keyword:"",loading:!1,conversationData:{list:[],handleItemAvator:g=>NC(g),handleItemName:g=>Jh(g),handleShowAt:g=>PO(g),handleShowMessage:g=>OG(g),handleItemTime:g=>g>0?Mg(g*1e3):""},userIDList:[],netWork:"",env:n.TUICore.TUIEnv,displayOnlineStatus:!1,userStatusList:new Map});try{r.loading=!0,n.bind(r,()=>{setTimeout(()=>{r.loading=!1},500)})}catch{r.loading=!1}iD.TUIServer=n;const o=g=>{var v;window.parent&&((v=window.parent)==null||v.postMessage({api:"getNoReadMessageCount",count:g}))};Rn(()=>{window.addEventListener("message",g=>{var v;(v=g.data)!=null&&v.imUserId&&n.getConversationProfile(`C2C${g==null?void 0:g.data.imUserId}`).then(_=>{n.handleCurrentConversation(_.data.conversation)}).catch(_=>{console.log(_,"error")})}),n.TUICore.tim.on(n.TUICore.TIM.EVENT.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED,o)}),qf(()=>{n.TUICore.tim.off(n.TUICore.TIM.EVENT.TOTAL_UNREAD_MESSAGE_COUNT_UPDATED,o)}),Bt(()=>r.currentConversationID,g=>{t.emit("current",g)},{deep:!0});const i=qe(()=>{const g=r.netWork===n.TUICore.TIM.TYPES.NET_STATE_DISCONNECTED,v=r.netWork===n.TUICore.TIM.TYPES.NET_STATE_CONNECTING;return g||v}),s=g=>{n.handleCurrentConversation(g)},u=async g=>{r.loading=!0;try{r.conversationData.list=[],await n.getConversationListForName(g)}catch{}r.loading=!1},d=Yy(g=>{e.loading||u(g)},500),f=g=>{g.stopPropagation(),g.code==="Enter"&&d(r.keyword)};return{...Yt(r),handleCurrentConversation:s,isNetwork:i,noSearch:u,onKeyup:f,debouncedRequest:d}}});const c0=e=>(pr("data-v-0deba9d4"),e=e(),hr(),e),Eoe={style:{height:"100%"}},Aoe={class:"sectionSearch"},Loe=c0(()=>G("span",{class:"icon-search-input"},null,-1)),Ooe={class:"TUI-conversation"},Roe={key:0,class:"network"},Noe=c0(()=>G("i",{class:"icon icon-error"},"!",-1)),Poe={class:"TUI-conversation-list"},xoe={key:1,class:"theEmtpy",style:{height:"90%"}},Uoe=c0(()=>G("img",{class:"emptyImg",src:dd},null,-1)),Foe=c0(()=>G("p",null,"暂无数据",-1)),$oe=[Uoe,Foe];function Goe(e,t,n,r,o,i){const s=xt("n-input"),u=xt("TUIConversationList");return J(),oe("div",Eoe,[G("div",Aoe,[It(s,{class:"TheSearch",style:{"--n-font-size":"12px","--n-height":"32px","--n-caret-color":"#198cfe","--n-border-hover":"1px solid #198cfe","--n-border-focus":"1px solid #198cfe","--n-loading-color":"#198cfe","--n-box-shadow-focus":"0 0 0 2px rgba(25 140 254, 0.2)"},round:"",clearable:"",placeholder:"请输入名称",value:e.keyword,"onUpdate:value":t[0]||(t[0]=d=>e.keyword=d),onClear:t[1]||(t[1]=()=>{e.debouncedRequest("")}),onKeyup:e.onKeyup},{prefix:Ct(()=>[Loe]),_:1},8,["value","onKeyup"])]),G("div",Ooe,[e.isNetwork?(J(),oe("div",Roe,[Noe,G("p",null,"️"+De(e.$t("TUIConversation.网络异常,请您检查网络设置")),1)])):Ie("",!0),G("main",Poe,[It(u,{currentID:e.currentConversationID,data:e.conversationData,onHandleItem:e.handleCurrentConversation,isH5:e.env.isH5,displayOnlineStatus:e.displayOnlineStatus,userStatusList:e.userStatusList},null,8,["currentID","data","onHandleItem","isH5","displayOnlineStatus","userStatusList"])]),!e.loading&&e.conversationData.list.length<=0?(J(),oe("div",xoe,$oe)):Ie("",!0)])])}const hI=Kt(cv,[["render",Goe],["__scopeId","data-v-0deba9d4"]]),Boe=e=>{hI.TUIServer=Ql.server,e.component(Ql.name,hI)},Hoe=e=>(Ql.server=new DN(e),e.component(Ql.name,Ql),Ql),Ql={name:"TUIConversation",component:hI,server:DN,install:Boe,plugin:Hoe},qoe={profile:{}};class AN extends ld{constructor(n){super();Xt(this,"TUICore");Xt(this,"store");Xt(this,"currentStore",{});this.TUICore=n,this.bindTIMEvent(),this.store=n.setComponentStore("TUIProfile",qoe,this.updateStore.bind(this)),this.getMyProfile()}destroyed(){this.unbindTIMEvent()}updateStore(n,r){this.currentStore.profile=JSON.parse(JSON.stringify(n.profile))}bindTIMEvent(){this.TUICore.tim.on(this.TUICore.TIM.EVENT.PROFILE_UPDATED,this.handleProfileUpdated,this)}unbindTIMEvent(){this.TUICore.tim.off(this.TUICore.TIM.EVENT.PROFILE_UPDATED,this.handleProfileUpdated)}handleProfileUpdated(n){n.data.map(r=>(r.userID===this.store.profile.userID&&(this.store.profile={},this.store.profile=r),r))}handlePromiseCallback(n){return new Promise((r,o)=>{const i={TUIName:"TUIProfile",callback:()=>{n&&n(r,o)}};this.TUICore.setAwaitFunc(i.TUIName,i.callback)})}async getMyProfile(){return this.handlePromiseCallback(async(n,r)=>{try{const o=await this.TUICore.tim.getMyProfile();this.store.profile=o.data,this.currentStore.profile=JSON.parse(JSON.stringify(this.store.profile)),n(o)}catch(o){r(o)}})}async getUserProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getUserProfile({userIDList:n});r(i)}catch(i){o(i)}})}async updateMyProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.updateMyProfile(n);this.store.profile=i.data,r(i)}catch(i){o(i)}})}async bind(n){return this.currentStore=n,this.getMyProfile(),this.currentStore}setEdit(n){return this.currentStore.isEdit=n,this.currentStore.isEdit}}function Os(e){"@babel/helpers - typeof";return Os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Os(e)}function on(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Zt(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function an(e){Zt(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Os(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function jc(e,t){Zt(2,arguments);var n=an(e),r=on(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function ml(e,t){Zt(2,arguments);var n=an(e),r=on(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());i.setMonth(n.getMonth()+r+1,0);var s=i.getDate();return o>=s?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}function LN(e,t){if(Zt(2,arguments),!t||Os(t)!=="object")return new Date(NaN);var n=t.years?on(t.years):0,r=t.months?on(t.months):0,o=t.weeks?on(t.weeks):0,i=t.days?on(t.days):0,s=t.hours?on(t.hours):0,u=t.minutes?on(t.minutes):0,d=t.seconds?on(t.seconds):0,f=an(e),g=r||n?ml(f,r+n*12):f,v=i||o?jc(g,i+o*7):g,_=u+s*60,M=d+_*60,I=M*1e3,k=new Date(v.getTime()+I);return k}function Voe(e,t){Zt(2,arguments);var n=an(e).getTime(),r=on(t);return new Date(n+r)}var zoe={};function Ru(){return zoe}function kT(e,t){var n,r,o,i,s,u,d,f;Zt(1,arguments);var g=Ru(),v=on((n=(r=(o=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&o!==void 0?o:g.weekStartsOn)!==null&&r!==void 0?r:(d=g.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&n!==void 0?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var _=an(e),M=_.getDay(),I=(M=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Woe(e){Zt(1,arguments);var t=joe(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=oy(n);return r}function iy(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function sD(e){Zt(1,arguments);var t=an(e);return t.setHours(0,0,0,0),t}var Koe=864e5;function Yoe(e,t){Zt(2,arguments);var n=sD(e),r=sD(t),o=n.getTime()-iy(n),i=r.getTime()-iy(r);return Math.round((o-i)/Koe)}function ON(e,t){Zt(2,arguments);var n=on(t);return ml(e,n*12)}var Joe=6e4,Xoe=36e5,Zoe=1e3;function RN(e){return Zt(1,arguments),e instanceof Date||Os(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ih(e){if(Zt(1,arguments),!RN(e)&&typeof e!="number")return!1;var t=an(e);return!isNaN(Number(t))}function Qoe(e,t){var n;Zt(1,arguments);var r=e||{},o=an(r.start),i=an(r.end),s=i.getTime();if(!(o.getTime()<=s))throw new RangeError("Invalid interval");var u=[],d=o;d.setHours(0,0,0,0);var f=Number((n=t==null?void 0:t.step)!==null&&n!==void 0?n:1);if(f<1||isNaN(f))throw new RangeError("`options.step` must be a number greater than 1");for(;d.getTime()<=s;)u.push(an(d)),d.setDate(d.getDate()+f),d.setHours(0,0,0,0);return u}function eie(e,t){var n,r,o,i,s,u,d,f;Zt(1,arguments);var g=Ru(),v=on((n=(r=(o=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&o!==void 0?o:g.weekStartsOn)!==null&&r!==void 0?r:(d=g.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&n!==void 0?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var _=an(e),M=_.getDay(),I=(M=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function rie(e){Zt(1,arguments);var t=PN(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Uf(n);return r}var oie=6048e5;function xN(e){Zt(1,arguments);var t=an(e),n=Uf(t).getTime()-rie(t).getTime();return Math.round(n/oie)+1}function od(e,t){var n,r,o,i,s,u,d,f;Zt(1,arguments);var g=Ru(),v=on((n=(r=(o=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&o!==void 0?o:g.weekStartsOn)!==null&&r!==void 0?r:(d=g.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&n!==void 0?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var _=an(e),M=_.getUTCDay(),I=(M=1&&M<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var I=new Date(0);I.setUTCFullYear(v+1,0,M),I.setUTCHours(0,0,0,0);var k=od(I,t),w=new Date(0);w.setUTCFullYear(v,0,M),w.setUTCHours(0,0,0,0);var S=od(w,t);return g.getTime()>=k.getTime()?v+1:g.getTime()>=S.getTime()?v:v-1}function iie(e,t){var n,r,o,i,s,u,d,f;Zt(1,arguments);var g=Ru(),v=on((n=(r=(o=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:g.firstWeekContainsDate)!==null&&r!==void 0?r:(d=g.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&n!==void 0?n:1),_=DT(e,t),M=new Date(0);M.setUTCFullYear(_,0,v),M.setUTCHours(0,0,0,0);var I=od(M,t);return I}var sie=6048e5;function UN(e,t){Zt(1,arguments);var n=an(e),r=od(n,t).getTime()-iie(n,t).getTime();return Math.round(r/sie)+1}function ar(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return ar(n==="yy"?o%100:o,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):ar(r+1,2)},d:function(t,n){return ar(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return ar(t.getUTCHours()%12||12,n.length)},H:function(t,n){return ar(t.getUTCHours(),n.length)},m:function(t,n){return ar(t.getUTCMinutes(),n.length)},s:function(t,n){return ar(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,o=t.getUTCMilliseconds(),i=Math.floor(o*Math.pow(10,r-3));return ar(i,n.length)}};const Nl=aie;var Bd={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},lie={G:function(t,n,r){var o=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});case"GGGG":default:return r.era(o,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var o=t.getUTCFullYear(),i=o>0?o:1-o;return r.ordinalNumber(i,{unit:"year"})}return Nl.y(t,n)},Y:function(t,n,r,o){var i=DT(t,o),s=i>0?i:1-i;if(n==="YY"){var u=s%100;return ar(u,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):ar(s,n.length)},R:function(t,n){var r=PN(t);return ar(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return ar(r,n.length)},Q:function(t,n,r){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(o);case"QQ":return ar(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,n,r){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(o);case"qq":return ar(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,n,r){var o=t.getUTCMonth();switch(n){case"M":case"MM":return Nl.M(t,n);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(t,n,r){var o=t.getUTCMonth();switch(n){case"L":return String(o+1);case"LL":return ar(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(t,n,r,o){var i=UN(t,o);return n==="wo"?r.ordinalNumber(i,{unit:"week"}):ar(i,n.length)},I:function(t,n,r){var o=xN(t);return n==="Io"?r.ordinalNumber(o,{unit:"week"}):ar(o,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):Nl.d(t,n)},D:function(t,n,r){var o=nie(t);return n==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):ar(o,n.length)},E:function(t,n,r){var o=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});case"EEEE":default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(t,n,r,o){var i=t.getUTCDay(),s=(i-o.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return ar(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(t,n,r,o){var i=t.getUTCDay(),s=(i-o.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return ar(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(t,n,r){var o=t.getUTCDay(),i=o===0?7:o;switch(n){case"i":return String(i);case"ii":return ar(i,n.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});case"iiii":default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(t,n,r){var o=t.getUTCHours(),i=o/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,n,r){var o=t.getUTCHours(),i;switch(o===12?i=Bd.noon:o===0?i=Bd.midnight:i=o/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,n,r){var o=t.getUTCHours(),i;switch(o>=17?i=Bd.evening:o>=12?i=Bd.afternoon:o>=4?i=Bd.morning:i=Bd.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var o=t.getUTCHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return Nl.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Nl.H(t,n)},K:function(t,n,r){var o=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(o,{unit:"hour"}):ar(o,n.length)},k:function(t,n,r){var o=t.getUTCHours();return o===0&&(o=24),n==="ko"?r.ordinalNumber(o,{unit:"hour"}):ar(o,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Nl.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Nl.s(t,n)},S:function(t,n){return Nl.S(t,n)},X:function(t,n,r,o){var i=o._originalDate||t,s=i.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return lD(s);case"XXXX":case"XX":return nc(s);case"XXXXX":case"XXX":default:return nc(s,":")}},x:function(t,n,r,o){var i=o._originalDate||t,s=i.getTimezoneOffset();switch(n){case"x":return lD(s);case"xxxx":case"xx":return nc(s);case"xxxxx":case"xxx":default:return nc(s,":")}},O:function(t,n,r,o){var i=o._originalDate||t,s=i.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+aD(s,":");case"OOOO":default:return"GMT"+nc(s,":")}},z:function(t,n,r,o){var i=o._originalDate||t,s=i.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+aD(s,":");case"zzzz":default:return"GMT"+nc(s,":")}},t:function(t,n,r,o){var i=o._originalDate||t,s=Math.floor(i.getTime()/1e3);return ar(s,n.length)},T:function(t,n,r,o){var i=o._originalDate||t,s=i.getTime();return ar(s,n.length)}};function aD(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(i===0)return n+String(o);var s=t||"";return n+String(o)+s+ar(i,2)}function lD(e,t){if(e%60===0){var n=e>0?"-":"+";return n+ar(Math.abs(e)/60,2)}return nc(e,t)}function nc(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e),i=ar(Math.floor(o/60),2),s=ar(o%60,2);return r+i+n+s}const uie=lie;var uD=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},FN=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},cie=function(t,n){var r=t.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return uD(t,n);var s;switch(o){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",uD(o,n)).replace("{{time}}",FN(i,n))},die={p:FN,P:cie};const gI=die;var fie=["D","DD"],pie=["YY","YYYY"];function $N(e){return fie.indexOf(e)!==-1}function GN(e){return pie.indexOf(e)!==-1}function sy(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var hie={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},gie=function(t,n,r){var o,i=hie[t];return typeof i=="string"?o=i:n===1?o=i.one:o=i.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};const mie=gie;function gb(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var vie={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yie={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_ie={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},bie={date:gb({formats:vie,defaultWidth:"full"}),time:gb({formats:yie,defaultWidth:"full"}),dateTime:gb({formats:_ie,defaultWidth:"full"})};const Mie=bie;var Iie={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Cie=function(t,n,r,o){return Iie[t]};const Tie=Cie;function qp(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",o;if(r==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{var u=e.defaultWidth,d=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[d]||e.values[u]}var f=e.argumentCallback?e.argumentCallback(t):t;return o[f]}}var wie={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Sie={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},kie={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Die={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Eie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Aie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Lie=function(t,n){var r=Number(t),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Oie={ordinalNumber:Lie,era:qp({values:wie,defaultWidth:"wide"}),quarter:qp({values:Sie,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:qp({values:kie,defaultWidth:"wide"}),day:qp({values:Die,defaultWidth:"wide"}),dayPeriod:qp({values:Eie,defaultWidth:"wide",formattingValues:Aie,defaultFormattingWidth:"wide"})};const Rie=Oie;function Vp(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var s=i[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(u)?Pie(u,function(v){return v.test(s)}):Nie(u,function(v){return v.test(s)}),f;f=e.valueCallback?e.valueCallback(d):d,f=n.valueCallback?n.valueCallback(f):f;var g=t.slice(s.length);return{value:f,rest:g}}}function Nie(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Pie(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var o=r[0],i=t.match(e.parsePattern);if(!i)return null;var s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;var u=t.slice(o.length);return{value:s,rest:u}}}var Uie=/^(\d+)(th|st|nd|rd)?/i,Fie=/\d+/i,$ie={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Gie={any:[/^b/i,/^(a|c)/i]},Bie={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Hie={any:[/1/i,/2/i,/3/i,/4/i]},qie={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Vie={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},zie={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},jie={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Wie={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Kie={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Yie={ordinalNumber:xie({matchPattern:Uie,parsePattern:Fie,valueCallback:function(t){return parseInt(t,10)}}),era:Vp({matchPatterns:$ie,defaultMatchWidth:"wide",parsePatterns:Gie,defaultParseWidth:"any"}),quarter:Vp({matchPatterns:Bie,defaultMatchWidth:"wide",parsePatterns:Hie,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Vp({matchPatterns:qie,defaultMatchWidth:"wide",parsePatterns:Vie,defaultParseWidth:"any"}),day:Vp({matchPatterns:zie,defaultMatchWidth:"wide",parsePatterns:jie,defaultParseWidth:"any"}),dayPeriod:Vp({matchPatterns:Wie,defaultMatchWidth:"any",parsePatterns:Kie,defaultParseWidth:"any"})};const Jie=Yie;var Xie={code:"en-US",formatDistance:mie,formatLong:Mie,formatRelative:Tie,localize:Rie,match:Jie,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ET=Xie;var Zie=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Qie=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ese=/^'([^]*?)'?$/,tse=/''/g,nse=/[a-zA-Z]/;function cD(e,t,n){var r,o,i,s,u,d,f,g,v,_,M,I,k,w,S,L,A,O;Zt(2,arguments);var H=String(t),q=Ru(),P=(r=(o=n==null?void 0:n.locale)!==null&&o!==void 0?o:q.locale)!==null&&r!==void 0?r:ET,B=on((i=(s=(u=(d=n==null?void 0:n.firstWeekContainsDate)!==null&&d!==void 0?d:n==null||(f=n.locale)===null||f===void 0||(g=f.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&u!==void 0?u:q.firstWeekContainsDate)!==null&&s!==void 0?s:(v=q.locale)===null||v===void 0||(_=v.options)===null||_===void 0?void 0:_.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(B>=1&&B<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=on((M=(I=(k=(w=n==null?void 0:n.weekStartsOn)!==null&&w!==void 0?w:n==null||(S=n.locale)===null||S===void 0||(L=S.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&k!==void 0?k:q.weekStartsOn)!==null&&I!==void 0?I:(A=q.locale)===null||A===void 0||(O=A.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&M!==void 0?M:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!P.localize)throw new RangeError("locale must contain localize property");if(!P.formatLong)throw new RangeError("locale must contain formatLong property");var $=an(e);if(!Ih($))throw new RangeError("Invalid time value");var R=iy($),T=NN($,R),x={firstWeekContainsDate:B,weekStartsOn:j,locale:P,_originalDate:$},Z=H.match(Qie).map(function(K){var re=K[0];if(re==="p"||re==="P"){var X=gI[re];return X(K,P.formatLong)}return K}).join("").match(Zie).map(function(K){if(K==="''")return"'";var re=K[0];if(re==="'")return rse(K);var X=uie[re];if(X)return!(n!=null&&n.useAdditionalWeekYearTokens)&&GN(K)&&sy(K,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&$N(K)&&sy(K,t,String(e)),X(T,K,P.localize,x);if(re.match(nse))throw new RangeError("Format string contains an unescaped latin alphabet character `"+re+"`");return K}).join("");return Z}function rse(e){var t=e.match(ese);return t?t[1].replace(tse,"'"):e}function ose(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function ise(e){Zt(1,arguments);var t=an(e),n=t.getDay();return n}function sse(e){Zt(1,arguments);var t=an(e),n=t.getFullYear(),r=t.getMonth(),o=new Date(0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}function Hs(e){Zt(1,arguments);var t=an(e),n=t.getHours();return n}var ase=6048e5;function lse(e){Zt(1,arguments);var t=an(e),n=oy(t).getTime()-Woe(t).getTime();return Math.round(n/ase)+1}function qs(e){Zt(1,arguments);var t=an(e),n=t.getMinutes();return n}function Jr(e){Zt(1,arguments);var t=an(e),n=t.getMonth();return n}function eu(e){Zt(1,arguments);var t=an(e),n=t.getSeconds();return n}function Vr(e){return Zt(1,arguments),an(e).getFullYear()}function BN(e,t){Zt(2,arguments);var n=an(e),r=an(t);return n.getTime()>r.getTime()}function HN(e,t){Zt(2,arguments);var n=an(e),r=an(t);return n.getTime()e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(f){throw f},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,u;return{s:function(){n=n.call(e)},n:function(){var f=n.next();return i=f.done,f},e:function(f){s=!0,u=f},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(s)throw u}}}}function Rt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mI(e,t){return mI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},mI(e,t)}function Jn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mI(e,t)}function ay(e){return ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ay(e)}function dse(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fse(e,t){if(t&&(Os(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rt(e)}function Xn(e){var t=dse();return function(){var r=ay(e),o;if(t){var i=ay(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return fse(this,o)}}function Nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pse(e,t){if(Os(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Os(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qN(e){var t=pse(e,"string");return Os(t)==="symbol"?t:String(t)}function pD(e,t){for(var n=0;n0,r=n?t:1-t,o;if(r<=50)o=e||100;else{var i=r+50,s=Math.floor(i/100)*100,u=e>=i%100;o=e+s-(u?100:0)}return n?o:1-o}function WN(e){return e%400===0||e%4===0&&e%100!==0}var yse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s0}},{key:"set",value:function(o,i,s){var u=o.getUTCFullYear();if(s.isTwoDigitYear){var d=jN(s.year,u);return o.setUTCFullYear(d,0,1),o.setUTCHours(0,0,0,0),o}var f=!("era"in i)||i.era===1?s.year:1-s.year;return o.setUTCFullYear(f,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(nr),_se=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s0}},{key:"set",value:function(o,i,s,u){var d=DT(o,u);if(s.isTwoDigitYear){var f=jN(s.year,d);return o.setUTCFullYear(f,0,u.firstWeekContainsDate),o.setUTCHours(0,0,0,0),od(o,u)}var g=!("era"in i)||i.era===1?s.year:1-s.year;return o.setUTCFullYear(g,0,u.firstWeekContainsDate),o.setUTCHours(0,0,0,0),od(o,u)}}]),n}(nr),bse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=1&&i<=4}},{key:"set",value:function(o,i,s){return o.setUTCMonth((s-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(nr),Cse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=1&&i<=4}},{key:"set",value:function(o,i,s){return o.setUTCMonth((s-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(nr),Tse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=0&&i<=11}},{key:"set",value:function(o,i,s){return o.setUTCMonth(s,1),o.setUTCHours(0,0,0,0),o}}]),n}(nr),wse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=0&&i<=11}},{key:"set",value:function(o,i,s){return o.setUTCMonth(s,1),o.setUTCHours(0,0,0,0),o}}]),n}(nr);function Sse(e,t,n){Zt(2,arguments);var r=an(e),o=on(t),i=UN(r,n)-o;return r.setUTCDate(r.getUTCDate()-i*7),r}var kse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=1&&i<=53}},{key:"set",value:function(o,i,s,u){return od(Sse(o,s,u),u)}}]),n}(nr);function Dse(e,t){Zt(2,arguments);var n=an(e),r=on(t),o=xN(n)-r;return n.setUTCDate(n.getUTCDate()-o*7),n}var Ese=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=1&&i<=53}},{key:"set",value:function(o,i,s){return Uf(Dse(o,s))}}]),n}(nr),Ase=[31,28,31,30,31,30,31,31,30,31,30,31],Lse=[31,29,31,30,31,30,31,31,30,31,30,31],Ose=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=1&&i<=Lse[d]:i>=1&&i<=Ase[d]}},{key:"set",value:function(o,i,s){return o.setUTCDate(s),o.setUTCHours(0,0,0,0),o}}]),n}(nr),Rse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(o,i,s){return o.setUTCMonth(0,s),o.setUTCHours(0,0,0,0),o}}]),n}(nr);function LT(e,t,n){var r,o,i,s,u,d,f,g;Zt(2,arguments);var v=Ru(),_=on((r=(o=(i=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(u=n.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&i!==void 0?i:v.weekStartsOn)!==null&&o!==void 0?o:(f=v.locale)===null||f===void 0||(g=f.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&r!==void 0?r:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var M=an(e),I=on(t),k=M.getUTCDay(),w=I%7,S=(w+7)%7,L=(S<_?7:0)+I-k;return M.setUTCDate(M.getUTCDate()+L),M}var Nse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=0&&i<=6}},{key:"set",value:function(o,i,s,u){return o=LT(o,s,u),o.setUTCHours(0,0,0,0),o}}]),n}(nr),Pse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=0&&i<=6}},{key:"set",value:function(o,i,s,u){return o=LT(o,s,u),o.setUTCHours(0,0,0,0),o}}]),n}(nr),xse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=0&&i<=6}},{key:"set",value:function(o,i,s,u){return o=LT(o,s,u),o.setUTCHours(0,0,0,0),o}}]),n}(nr);function Use(e,t){Zt(2,arguments);var n=on(t);n%7===0&&(n=n-7);var r=1,o=an(e),i=o.getUTCDay(),s=n%7,u=(s+7)%7,d=(u=1&&i<=7}},{key:"set",value:function(o,i,s){return o=Use(o,s),o.setUTCHours(0,0,0,0),o}}]),n}(nr),$se=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=1&&i<=12}},{key:"set",value:function(o,i,s){var u=o.getUTCHours()>=12;return u&&s<12?o.setUTCHours(s+12,0,0,0):!u&&s===12?o.setUTCHours(0,0,0,0):o.setUTCHours(s,0,0,0),o}}]),n}(nr),qse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=0&&i<=23}},{key:"set",value:function(o,i,s){return o.setUTCHours(s,0,0,0),o}}]),n}(nr),Vse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=0&&i<=11}},{key:"set",value:function(o,i,s){var u=o.getUTCHours()>=12;return u&&s<12?o.setUTCHours(s+12,0,0,0):o.setUTCHours(s,0,0,0),o}}]),n}(nr),zse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=1&&i<=24}},{key:"set",value:function(o,i,s){var u=s<=24?s%24:s;return o.setUTCHours(u,0,0,0),o}}]),n}(nr),jse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=0&&i<=59}},{key:"set",value:function(o,i,s){return o.setUTCMinutes(s,0,0),o}}]),n}(nr),Wse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=0&&i<=59}},{key:"set",value:function(o,i,s){return o.setUTCSeconds(s,0),o}}]),n}(nr),Kse=function(e){Jn(n,e);var t=Xn(n);function n(){var r;Nn(this,n);for(var o=arguments.length,i=new Array(o),s=0;s=1&&$<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var R=on((I=(k=(w=(S=r==null?void 0:r.weekStartsOn)!==null&&S!==void 0?S:r==null||(L=r.locale)===null||L===void 0||(A=L.options)===null||A===void 0?void 0:A.weekStartsOn)!==null&&w!==void 0?w:B.weekStartsOn)!==null&&k!==void 0?k:(O=B.locale)===null||O===void 0||(H=O.options)===null||H===void 0?void 0:H.weekStartsOn)!==null&&I!==void 0?I:0);if(!(R>=0&&R<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(P==="")return q===""?an(n):new Date(NaN);var T={firstWeekContainsDate:$,weekStartsOn:R,locale:j},x=[new mse],Z=P.match(tae).map(function(ue){var ce=ue[0];if(ce in gI){var Ee=gI[ce];return Ee(ue,j.formatLong)}return ue}).join("").match(eae),K=[],re=fD(Z),X;try{var ie=function(){var ce=X.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&GN(ce)&&sy(ce,P,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&$N(ce)&&sy(ce,P,e);var Ee=ce[0],pe=Qse[Ee];if(pe){var V=pe.incompatibleTokens;if(Array.isArray(V)){var ee=K.find(function(Ce){return V.includes(Ce.token)||Ce.token===Ee});if(ee)throw new RangeError("The format string mustn't contain `".concat(ee.fullToken,"` and `").concat(ce,"` at the same time"))}else if(pe.incompatibleTokens==="*"&&K.length>0)throw new RangeError("The format string mustn't contain `".concat(ce,"` and any other token at the same time"));K.push({token:Ee,fullToken:ce});var se=pe.run(q,ce,j.match,T);if(!se)return{v:new Date(NaN)};x.push(se.setter),q=se.rest}else{if(Ee.match(iae))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ee+"`");if(ce==="''"?ce="'":Ee==="'"&&(ce=aae(ce)),q.indexOf(ce)===0)q=q.slice(ce.length);else return{v:new Date(NaN)}}};for(re.s();!(X=re.n()).done;){var he=ie();if(Os(he)==="object")return he.v}}catch(ue){re.e(ue)}finally{re.f()}if(q.length>0&&oae.test(q))return new Date(NaN);var ae=x.map(function(ue){return ue.priority}).sort(function(ue,ce){return ce-ue}).filter(function(ue,ce,Ee){return Ee.indexOf(ue)===ce}).map(function(ue){return x.filter(function(ce){return ce.priority===ue}).sort(function(ce,Ee){return Ee.subPriority-ce.subPriority})}).map(function(ue){return ue[0]}),de=an(n);if(isNaN(de.getTime()))return new Date(NaN);var Y=NN(de,iy(de)),te={},fe=fD(ae),Re;try{for(fe.s();!(Re=fe.n()).done;){var ve=Re.value;if(!ve.validate(Y,T))return new Date(NaN);var be=ve.set(Y,te,T);Array.isArray(be)?(Y=be[0],ose(te,be[1])):Y=be}}catch(ue){fe.e(ue)}finally{fe.f()}return Y}function aae(e){return e.match(nae)[1].replace(rae,"'")}function lae(e,t){Zt(2,arguments);var n=on(t);return jc(e,-n)}function Ch(e,t){Zt(2,arguments);var n=an(e),r=on(t),o=n.getFullYear(),i=n.getDate(),s=new Date(0);s.setFullYear(o,r,15),s.setHours(0,0,0,0);var u=sse(s);return n.setMonth(r,Math.min(i,u)),n}function ks(e,t){if(Zt(2,arguments),Os(t)!=="object"||t===null)throw new RangeError("values parameter must be an object");var n=an(e);return isNaN(n.getTime())?new Date(NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=Ch(n,t.month)),t.date!=null&&n.setDate(on(t.date)),t.hours!=null&&n.setHours(on(t.hours)),t.minutes!=null&&n.setMinutes(on(t.minutes)),t.seconds!=null&&n.setSeconds(on(t.seconds)),t.milliseconds!=null&&n.setMilliseconds(on(t.milliseconds)),n)}function KN(e,t){Zt(2,arguments);var n=an(e),r=on(t);return n.setHours(r),n}function OT(e,t){Zt(2,arguments);var n=an(e),r=on(t);return n.setMilliseconds(r),n}function YN(e,t){Zt(2,arguments);var n=an(e),r=on(t);return n.setMinutes(r),n}function JN(e,t){Zt(2,arguments);var n=an(e),r=on(t);return n.setSeconds(r),n}function vf(e,t){Zt(2,arguments);var n=an(e),r=on(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function og(e,t){Zt(2,arguments);var n=on(t);return ml(e,-n)}function uae(e,t){if(Zt(2,arguments),!t||Os(t)!=="object")return new Date(NaN);var n=t.years?on(t.years):0,r=t.months?on(t.months):0,o=t.weeks?on(t.weeks):0,i=t.days?on(t.days):0,s=t.hours?on(t.hours):0,u=t.minutes?on(t.minutes):0,d=t.seconds?on(t.seconds):0,f=og(e,r+n*12),g=lae(f,i+o*7),v=u+s*60,_=d+v*60,M=_*1e3,I=new Date(g.getTime()-M);return I}function cae(e,t){Zt(2,arguments);var n=on(t);return ON(e,-n)}var dae=Object.defineProperty,fae=Object.defineProperties,pae=Object.getOwnPropertyDescriptors,hD=Object.getOwnPropertySymbols,hae=Object.prototype.hasOwnProperty,gae=Object.prototype.propertyIsEnumerable,gD=(e,t,n)=>t in e?dae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,En=(e,t)=>{for(var n in t||(t={}))hae.call(t,n)&&gD(e,n,t[n]);if(hD)for(var n of hD(t))gae.call(t,n)&&gD(e,n,t[n]);return e},ls=(e,t)=>fae(e,pae(t)),pd=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n};const mae={},vae={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},yae=G("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"},null,-1),_ae=G("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"},null,-1),bae=G("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"},null,-1),Mae=G("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"},null,-1),Iae=[yae,_ae,bae,Mae];function Cae(e,t){return J(),oe("svg",vae,Iae)}var d0=pd(mae,[["render",Cae]]);const Tae={},wae={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},Sae=G("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"},null,-1),kae=G("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"},null,-1),Dae=[Sae,kae];function Eae(e,t){return J(),oe("svg",wae,Dae)}var Aae=pd(Tae,[["render",Eae]]);const Lae={},Oae={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},Rae=G("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"},null,-1),Nae=[Rae];function Pae(e,t){return J(),oe("svg",Oae,Nae)}var mD=pd(Lae,[["render",Pae]]);const xae={},Uae={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},Fae=G("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"},null,-1),$ae=[Fae];function Gae(e,t){return J(),oe("svg",Uae,$ae)}var vD=pd(xae,[["render",Gae]]);const Bae={},Hae={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},qae=G("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"},null,-1),Vae=G("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"},null,-1),zae=[qae,Vae];function jae(e,t){return J(),oe("svg",Hae,zae)}var XN=pd(Bae,[["render",jae]]);const Wae={},Kae={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},Yae=G("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"},null,-1),Jae=[Yae];function Xae(e,t){return J(),oe("svg",Kae,Jae)}var ZN=pd(Wae,[["render",Xae]]);const Zae={},Qae={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",class:"dp__icon"},ele=G("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"},null,-1),tle=[ele];function nle(e,t){return J(),oe("svg",Qae,tle)}var QN=pd(Zae,[["render",nle]]);const mb=(e,t)=>{const n=sae(e,t.slice(0,e.length),new Date);return Ih(n)&&RN(n)?n:null},Pa=e=>{let t=new Date(JSON.parse(JSON.stringify(e)));return t=KN(t,0),t=YN(t,0),t=JN(t,0),t=OT(t,0),t},vI=e=>Array.isArray(e)?Ih(e[0])&&(e[1]?Ih(e[1]):!0):e?Ih(e):!1,Vi=(e,t,n,r)=>{let o=e?new Date(e):new Date;return(t||t===0)&&(o=KN(o,+t)),(n||n===0)&&(o=YN(o,+n)),(r||r===0)&&(o=JN(o,+r)),OT(o,0)},rle=e=>{const t=ml(e,1);return{month:Jr(t),year:Vr(t)}},Wc=(e,t,n)=>{let r=e?new Date(e):new Date;return(t||t===0)&&(r=Ch(r,t)),n&&(r=vf(r,n)),r},yD=(e,t)=>e?`HH:mm${t?":ss":""}`:`hh:mm${t?":ss":""} aa`,e4=(e,t,n,r,o,i,s,u)=>e||(r?"MM/yyyy":o?yD(t,n):i?"MM/dd/yyyy":s?"yyyy":u?`MM/dd/yyyy, ${yD(t,n)}`:"MM/dd/yyyy"),vb=e=>{const t=e||new Date;return{hours:Hs(t),minutes:qs(t),seconds:eu(t)}},dv=e=>({month:Jr(e),year:Vr(e)}),_D=e=>Array.isArray(e)?[dv(e[0]),e[1]?dv(e[1]):null]:dv(e),yI=e=>Array.isArray(e)?[vb(e[0]),vb(e[1])]:vb(e),yb=(e,t,n)=>n?cD(e,t,{locale:n}):cD(e,t),uy=(e,t,n,r)=>Array.isArray(e)?`${yb(e[0],t,n)} ${r||"-"} ${e[1]?yb(e[1],t,n):""}`:yb(e,t,n),ss=(e,t)=>!e||!t?!1:BN(Pa(e),Pa(t)),ci=(e,t)=>!e||!t?!1:HN(Pa(e),Pa(t)),xr=(e,t)=>!e||!t?!1:use(Pa(e),Pa(t)),ole=(e,t)=>LN(ks(new Date,e),t),ile=(e,t)=>uae(ks(new Date,e),t),_b=e=>ks(new Date,{hours:Hs(e),minutes:qs(e),seconds:eu(e)}),bD=e=>ks(new Date,{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),_I=(e,t,n)=>{let r=!0;if(!e)return!0;const o=Array.isArray(e)?[e[0]?_b(e[0]):null,e[1]?_b(e[1]):null]:_b(e);if(t){const i=bD(t);Array.isArray(o)?r=(o[0]?o[0].getTime()<=i.getTime():!0)&&(o[1]?o[1].getTime()<=i.getTime():!0):r=o.getTime()<=i.getTime()}if(n){const i=bD(n);Array.isArray(o)?r=(o[0]?o[0].getTime()>=i.getTime():!0)&&(o[1]?o[1].getTime()>=i.getTime():!0)&&r:r=o.getTime()>=i.getTime()&&r}return r},sle=(e,t,n)=>{let r=!0;return t&&n&&(r=ss(new Date(e),new Date(t))&&ci(new Date(e),new Date(n))),t&&(r=ss(new Date(e),new Date(t))),n&&(r=ci(new Date(e),new Date(n))),r},Is=e=>{const t=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(t).toISOString()},t4=(e,t,n)=>e&&e[0]&&e[1]?ss(n,e[0])&&ci(n,e[1]):e&&e[0]&&t?ss(n,e[0])&&ci(n,t)||ci(n,e[0])&&ss(n,t):!1,Am=(e,t)=>{const n=kT(e,{weekStartsOn:t}),r=eie(e,{weekStartsOn:t});return[n,r]},ale=(e,t,n,r,o,i,s,u)=>{const d=n?ss(Is(e),Is(new Date(n))):!1,f=t?ci(Is(e),Is(new Date(t))):!1,g=typeof r=="function"?r(e):r.some(w=>xr(Is(new Date(w)),Is(e))),v=(i.months.length?i.months.map(w=>+w):[]).includes(Jr(e)),_=s.length?s.some(w=>+w===ise(e)):!1,M=o.length?!o.some(w=>xr(Is(new Date(w)),Is(e))):!1,I=Vr(e),k=I<+u[0]||I>+u[1];return!(d||f||g||v||k||_||M)},n4=(e,t,n,r,o,i,s)=>({validate:u=>ale(u,e,t,n,r,o,i,s)}),lle=(e,t,n)=>{const r=new Date(JSON.parse(JSON.stringify(e))),o=[];for(let i=0;i<7;i++){const s=jc(r,i),u=Jr(s)!==t;o.push({text:n&&u?"":s.getDate(),value:s,current:!u})}return o},ule=(e,t,n,r)=>{const o=[],i=new Date(t,e),s=new Date(t,e+1,0),u=kT(i,{weekStartsOn:n}),d=f=>{const g=lle(f,e,r);if(o.push({days:g}),!o[o.length-1].days.some(v=>xr(Pa(v.value),Pa(s)))){const v=jc(f,7);d(v)}};return d(u),o},cle=(e,t=3)=>{const n=[];for(let r=0;r{const n=[1,2,3,4,5,6,7].map(i=>new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${i}T00:00:00+00:00`)).slice(0,2)),r=n.slice(0,t),o=n.slice(t+1,n.length);return[n[t]].concat(...o).concat(...r)},fle=e=>{const t=[];for(let n=+e[0];n<=+e[1];n++)t.push({value:+n,text:`${n}`});return t},ple=(e,t)=>{const n=new Intl.DateTimeFormat(e,{month:t,timeZone:"UTC"});return[1,2,3,4,5,6,7,8,9,10,11,12].map(r=>{const o=r<10?`0${r}`:r;return new Date(`2017-${o}-01T00:00:00+00:00`)}).map((r,o)=>({text:n.format(r),value:o}))},hle=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],gle=()=>({enterSubmit:!0,tabSubmit:!0,openMenu:!0,rangeSeparator:" - "}),mle=e=>Object.assign({months:[],years:[],times:{hours:[],minutes:[],seconds:[]}},e),vle=e=>{function t(n){let r="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=o.length;for(let s=0;s{var t;const n=Oe(e);return(t=n==null?void 0:n.$el)!=null?t:n},yle=e=>Object.assign({type:"dot"},e),MD=e=>Object.assign({menuAppear:"dp-menu-appear",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down"},e),_le=e=>Object.assign({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",calendarWrap:"Calendar wrapper",calendarDays:"Calendar days",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month"},e),Nu=Symbol(),f0=Symbol(),RT=Symbol(),r4=Symbol(),o4=Symbol(),Pu=Symbol(),NT={disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},autoApply:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},textInput:{type:Boolean,default:!1}},PT={range:{type:Boolean,default:!1},uid:{type:String,default:null}},i4={enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1}},s4=ls(En({},i4),{fixedStart:{type:Boolean,default:!1},fixedEnd:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1}}),a4={name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},inputClassName:{type:String,default:null},inlineWithInput:{type:Boolean,default:!1},textInputOptions:{type:Object,default:()=>null},openMenuOnFocus:{type:Boolean,default:!0}},l4={minTime:{type:Object,default:null},maxTime:{type:Object,default:null}},xT={minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null}},u4=En({selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:Boolean,default:!1}},l4),UT={monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1}},c4={locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:Boolean,default:!1},calendarClassName:{type:String,default:null},noSwipe:{type:Boolean,default:!1}},d4=ls(En(En(En(En(En(En({},s4),u4),UT),xT),c4),PT),{vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},menuClassName:{type:String,default:null},yearRange:{type:Array,default:()=>[1900,2100]},multiCalendarsSolo:{type:Boolean,default:!1},calendarCellClassName:{type:String,default:null},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},monthYearComponent:{type:Object,default:null},timePickerComponent:{type:Object,default:null},actionRowComponent:{type:Object,default:null},hideOffsetDates:{type:Boolean,default:!1},autoRange:{type:[Number,String],default:null},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:()=>[]},showNowButton:{type:Boolean,default:!1},nowButtonLabel:{type:String,default:"Now"},monthChangeOnScroll:{type:[Boolean,String],default:!0},markers:{type:Array,default:()=>[]},modeHeight:{type:[Number,String],default:255},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetRanges:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},preventMinMaxNavigation:{type:Boolean,default:!1},minRange:{type:[Number,String],default:null},maxRange:{type:[Number,String],default:null},multiDatesLimit:{type:[Number,String],default:null},reverseYears:{type:Boolean,default:!1},keepActionRow:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},multiStatic:{type:Boolean,default:!0}}),ble=ls(En(En(En({},a4),NT),d4),{multiCalendars:{type:[Boolean,Number,String],default:null},modelValue:{type:[String,Date,Array,Object,Number],default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},closeOnScroll:{type:Boolean,default:!1},autoPosition:{type:Boolean,default:!0},closeOnAutoApply:{type:Boolean,default:!0},teleport:{type:[String,Object],default:"body"},altPosition:{type:[Boolean,Function],default:!1},partialRange:{type:Boolean,default:!0},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:Boolean,default:!1},ariaLabels:{type:Object,default:()=>({})}}),f4={range:{type:Boolean,default:!1},multiCalendars:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null}},p4=ls(En(En({},UT),f4),{vertical:{type:Boolean,default:!1},month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:1}}),Lm=Wt({menuFocused:!1,shiftKeyInMenu:!1}),FT=()=>({setMenuFocused:e=>{Lm.menuFocused=e},getStore:()=>Lm,setShiftKey:e=>{Lm.shiftKeyInMenu!==e&&(Lm.shiftKeyInMenu=e)}}),Mle=["aria-label","aria-disabled","aria-readonly"],Ile={key:1,class:"dp__input_wrap"},Cle=["id","name","placeholder","disabled","readonly","required","value","autocomplete","onKeydown"],Tle={key:4,class:"dp__clear_icon"},wle=it({props:ls(En(En(En({},a4),NT),PT),{inputValue:{type:String,default:""},inline:{type:Boolean,default:!1},isMenuOpen:{type:Boolean,default:!1},pattern:{type:String,default:""}}),emits:["clear","open","update:inputValue","setInputDate","close","selectDate","setEmptyDate","toggle","focus-prev"],setup(e,{expose:t,emit:n}){const r=e,o=Ne(),i=Ne(null),s=Ne(!1),u=en(Nu),d=vg(),{getStore:f}=FT(),g=qe(()=>({dp__pointer:!r.disabled&&!r.readonly&&!r.textInput,dp__disabled:r.disabled,dp__input:!0,dp__input_icon_pad:!r.hideInputIcon,dp__input_valid:r.state,dp__input_invalid:r.state===!1,dp__input_focus:s.value||r.isMenuOpen,[r.inputClassName]:!!r.inputClassName})),v=A=>{const{value:O}=A.target,{format:H,rangeSeparator:q}=r.textInputOptions;if(O!==""){if(r.range){const[P,B]=O.split(`${q}`);if(P&&B){const j=mb(P.trim(),H||r.pattern),$=mb(B.trim(),H||r.pattern);o.value=j&&$?[j,$]:null}}else o.value=mb(O,H||r.pattern);n("setInputDate",o.value)}else n("setInputDate",null),r.autoApply&&(n("setEmptyDate"),o.value=null);n("update:inputValue",O)},_=()=>{var A,O;(A=r.textInputOptions)!=null&&A.enterSubmit&&vI(o.value)&&r.inputValue!==""?(n("setInputDate",o.value,!0),o.value=null):(O=r.textInputOptions)!=null&&O.enterSubmit&&r.inputValue===""&&(o.value=null,n("clear"))},M=()=>{var A,O;(A=r.textInputOptions)!=null&&A.tabSubmit&&vI(o.value)&&r.inputValue!==""?(n("setInputDate",o.value,!0),o.value=null):(O=r.textInputOptions)!=null&&O.tabSubmit&&r.inputValue===""&&(o.value=null,n("clear")),n("close")},I=()=>{var A;if(f().shiftKeyInMenu&&r.openMenuOnFocus)return n("close"),n("focus-prev");!r.inline&&(!r.textInput||r.textInput&&((A=r.textInputOptions)!=null&&A.openMenu))&&(s.value=!0,r.openMenuOnFocus&&!r.isMenuOpen?n("open"):r.isMenuOpen&&!f().menuFocused&&(L(),n("close")))},k=()=>{var A;!r.openMenuOnFocus||d["dp-input"]||d.trigger?r.textInput&&((A=r.textInputOptions)!=null&&A.openMenu)&&!r.isMenuOpen?n("open"):r.textInput||n("toggle"):r.textInput||s.value&&n("toggle")},w=()=>{s.value=!1,r.autoApply&&r.textInput&&o.value&&(n("setInputDate",o.value),n("selectDate"),o.value=null)},S=()=>{n("clear")},L=()=>{s.value=!1;const A=Po(i);A&&A.blur()};return t({unFocus:L}),(A,O)=>(J(),oe("div",{onClick:k,"aria-label":Oe(u).input,role:"textbox","aria-multiline":"false","aria-disabled":A.disabled,"aria-readonly":A.readonly},[A.$slots.trigger&&!A.$slots["dp-input"]&&!e.inline?Ft(A.$slots,"trigger",{key:0}):Ie("",!0),!A.$slots.trigger&&(!e.inline||A.inlineWithInput)?(J(),oe("div",Ile,[A.$slots["dp-input"]&&!A.$slots.trigger&&!e.inline?Ft(A.$slots,"dp-input",{key:0,value:e.inputValue,onInput:v,onEnter:_,onTab:M,onClear:S}):Ie("",!0),A.$slots["dp-input"]?Ie("",!0):(J(),oe("input",{key:1,ref_key:"inputRef",ref:i,id:A.uid?`dp-input-${A.uid}`:void 0,name:A.name,class:lt(Oe(g)),placeholder:A.placeholder,disabled:A.disabled,readonly:A.readonly||!A.textInput,required:A.required,value:e.inputValue,autocomplete:A.autocomplete,onInput:v,onKeydown:[gr(_,["enter"]),gr(M,["tab"])],onBlur:w,onFocus:I},null,42,Cle)),A.$slots["input-icon"]&&!A.hideInputIcon?(J(),oe("span",{key:2,class:"dp__input_icon",onClick:O[0]||(O[0]=H=>n("toggle"))},[Ft(A.$slots,"input-icon")])):Ie("",!0),!A.$slots["input-icon"]&&!A.hideInputIcon&&!A.$slots["dp-input"]?(J(),_t(Oe(d0),{key:3,class:"dp__input_icon dp__input_icons",onClick:O[1]||(O[1]=H=>n("toggle"))})):Ie("",!0),A.$slots["clear-icon"]&&e.inputValue&&A.clearable&&!A.disabled&&!A.readonly?(J(),oe("span",Tle,[Ft(A.$slots,"clear-icon",{clear:S})])):Ie("",!0),A.clearable&&!A.$slots["clear-icon"]&&e.inputValue&&!A.disabled&&!A.readonly?(J(),_t(Oe(Aae),{key:5,class:"dp__clear_icon dp__input_icons",onClick:Mn(S,["stop","prevent"])},null,8,["onClick"])):Ie("",!0)])):Ie("",!0)],8,Mle))}}),Ar=Wt({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),bb=Ne(null),Om=Ne(!1),Mb=Ne(!1),Ib=Ne(!1),Cb=Ne(!1),Ci=Ne(0),zo=Ne(0),xu=()=>{const e=qe(()=>Om.value?[...Ar.selectionGrid,Ar.actionRow].filter(v=>v.length):Mb.value?[...Ar.timePicker[0],...Ar.timePicker[1],Cb.value?[]:[bb.value],Ar.actionRow].filter(v=>v.length):Ib.value?[...Ar.monthPicker,Ar.actionRow]:[Ar.monthYear,...Ar.calendar,Ar.time,Ar.actionRow].filter(v=>v.length)),t=v=>{Ci.value=v?Ci.value+1:Ci.value-1;let _=null;e.value[zo.value]&&(_=e.value[zo.value][Ci.value]),_||(Ci.value=v?Ci.value-1:Ci.value+1)},n=v=>{zo.value===0&&!v||zo.value===e.value.length&&v||(zo.value=v?zo.value+1:zo.value-1,e.value[zo.value]?e.value[zo.value]&&!e.value[zo.value][Ci.value]&&Ci.value!==0&&(Ci.value=e.value[zo.value].length-1):zo.value=v?zo.value-1:zo.value+1)},r=v=>{let _=null;e.value[zo.value]&&(_=e.value[zo.value][Ci.value]),_?_.focus({preventScroll:!Om.value}):Ci.value=v?Ci.value-1:Ci.value+1},o=()=>{t(!0),r(!0)},i=()=>{t(!1),r(!1)},s=()=>{n(!1),r(!0)},u=()=>{n(!0),r(!0)},d=(v,_)=>{Ar[_]=v},f=(v,_)=>{Ar[_]=v},g=()=>{Ci.value=0,zo.value=0};return{buildMatrix:d,buildMultiLevelMatrix:f,setTimePickerBackRef:v=>{bb.value=v},setSelectionGrid:v=>{Om.value=v,g(),v||(Ar.selectionGrid=[])},setTimePicker:(v,_=!1)=>{Mb.value=v,Cb.value=_,g(),v||(Ar.timePicker[0]=[],Ar.timePicker[1]=[])},setTimePickerElements:(v,_=0)=>{Ar.timePicker[_]=v},arrowRight:o,arrowLeft:i,arrowUp:s,arrowDown:u,clearArrowNav:()=>{Ar.monthYear=[],Ar.calendar=[],Ar.time=[],Ar.actionRow=[],Ar.selectionGrid=[],Ar.timePicker[0]=[],Ar.timePicker[1]=[],Om.value=!1,Mb.value=!1,Cb.value=!1,Ib.value=!1,g(),bb.value=null},setMonthPicker:v=>{Ib.value=v,g()}}},Sle=["aria-label"],kle={class:"dp__calendar_header",role:"row"},Dle={key:0,class:"dp__calendar_header_item",role:"gridcell"},Ele=G("div",{class:"dp__calendar_header_separator"},null,-1),Ale=["aria-label"],Lle={key:0,role:"gridcell",class:"dp__calendar_item dp__week_num"},Ole={class:"dp__cell_inner"},Rle=["aria-selected","aria-disabled","onClick","onKeydown","onMouseover"],Nle=G("div",{class:"dp__arrow_bottom_tp"},null,-1),Ple=it({props:ls(En(En({},p4),c4),{mappedDates:{type:Array,default:()=>[]},getWeekNum:{type:Function,default:()=>""},modeHeight:{type:[Number,String],default:255},specificMode:{type:Boolean,default:!1}}),emits:["selectDate","setHoverDate","handleScroll","mount","handleSwipe"],setup(e,{expose:t,emit:n}){const r=e,o=Ne(null),i=Ne({bottom:"",left:"",transform:""}),s=Ne([]),u=Ne(null),d=Ne(!0),f=en(f0),g=en(Nu),v=en(Pu),_=Ne(""),M=Ne({startX:0,endX:0,startY:0,endY:0}),I=qe(()=>dle(r.locale,+r.weekStart)),{buildMultiLevelMatrix:k}=xu();Rn(()=>{n("mount",{cmp:"calendar",refs:s}),r.noSwipe||u.value&&(u.value.addEventListener("touchstart",B),u.value.addEventListener("touchend",j),u.value.addEventListener("touchmove",$))});const w=(x,Z)=>{if(f!=null&&f.value){const K=Pa(Wc(new Date,r.month,r.year));_.value=ss(Pa(Wc(new Date,x,Z)),K)?f.value[r.vertical?"vNext":"next"]:f.value[r.vertical?"vPrevious":"previous"],d.value=!1,wr(()=>{d.value=!0})}},S=qe(()=>({dp__calendar_wrap:!0,[r.calendarClassName]:!!r.calendarClassName})),L=qe(()=>x=>{const Z=yle(x);return{dp__marker_dot:Z.type==="dot",dp__marker_line:Z.type==="line"}}),A=qe(()=>x=>xr(x,o.value)),O=qe(()=>({dp__calendar:!0,dp__calendar_next:r.multiCalendars>0&&r.instance!==0})),H=qe(()=>r.specificMode?{height:`${r.modeHeight}px`}:null),q=(x,Z,K)=>{var re,X;if(n("setHoverDate",x),(X=(re=x.marker)==null?void 0:re.tooltip)!=null&&X.length){const ie=Po(s.value[Z][K]);if(ie){const{width:he,height:ae}=ie.getBoundingClientRect();i.value={bottom:`${ae}px`,left:`${he/2}px`,transform:"translateX(-50%)"},o.value=x.value}}},P=()=>{o.value=null},B=x=>{M.value.startX=x.changedTouches[0].screenX,M.value.startY=x.changedTouches[0].screenY},j=x=>{M.value.endX=x.changedTouches[0].screenX,M.value.endY=x.changedTouches[0].screenY,R()},$=x=>{x.preventDefault()},R=()=>{const x=r.vertical?"Y":"X";Math.abs(M.value[`start${x}`]-M.value[`end${x}`])>10&&n("handleSwipe",M.value[`start${x}`]>M.value[`end${x}`]?"right":"left")},T=(x,Z,K)=>{x&&(Array.isArray(s.value[Z])?s.value[Z][K]=x:s.value[Z]=[x]),v!=null&&v.value&&k(s.value,"calendar")};return t({triggerTransition:w}),(x,Z)=>(J(),oe("div",{class:lt(Oe(O))},[G("div",{style:No(Oe(H))},[e.specificMode?Ie("",!0):(J(),oe("div",{key:0,ref_key:"calendarWrapRef",ref:u,class:lt(Oe(S)),role:"grid","aria-label":Oe(g).calendarWrap,onWheel:Z[1]||(Z[1]=Mn(K=>x.$emit("handleScroll",K),["prevent"]))},[G("div",kle,[x.weekNumbers?(J(),oe("div",Dle,De(x.weekNumName),1)):Ie("",!0),(J(!0),oe(ft,null,zt(Oe(I),(K,re)=>(J(),oe("div",{class:"dp__calendar_header_item",role:"gridcell",key:re},[x.$slots["calendar-header"]?Ft(x.$slots,"calendar-header",{key:0,day:K,index:re}):Ie("",!0),x.$slots["calendar-header"]?Ie("",!0):(J(),oe(ft,{key:1},[mr(De(K),1)],64))]))),128))]),Ele,It(Mo,{name:_.value,css:!!Oe(f)},{default:Ct(()=>[d.value?(J(),oe("div",{key:0,class:"dp__calendar",role:"grid","aria-label":Oe(g).calendarDays},[(J(!0),oe(ft,null,zt(e.mappedDates,(K,re)=>(J(),oe("div",{class:"dp__calendar_row",role:"row",key:re},[x.weekNumbers?(J(),oe("div",Lle,[G("div",Ole,De(e.getWeekNum(K.days)),1)])):Ie("",!0),(J(!0),oe(ft,null,zt(K.days,(X,ie)=>(J(),oe("div",{role:"gridcell",class:"dp__calendar_item",ref_for:!0,ref:he=>T(he,re,ie),key:ie+re,"aria-selected":X.classData.dp__active_date||X.classData.dp__range_start||X.classData.dp__range_start,"aria-disabled":X.classData.dp__cell_disabled,tabindex:"0",onClick:Mn(he=>x.$emit("selectDate",X),["stop","prevent"]),onKeydown:gr(he=>x.$emit("selectDate",X),["enter"]),onMouseover:he=>q(X,re,ie),onMouseleave:P},[G("div",{class:lt(["dp__cell_inner",X.classData])},[x.$slots.day?Ft(x.$slots,"day",{key:0,day:+X.text,date:X.value}):Ie("",!0),x.$slots.day?Ie("",!0):(J(),oe(ft,{key:1},[mr(De(X.text),1)],64)),X.marker?(J(),oe("div",{key:2,class:lt(Oe(L)(X.marker)),style:No(X.marker.color?{backgroundColor:X.marker.color}:{})},null,6)):Ie("",!0),Oe(A)(X.value)?(J(),oe("div",{key:3,class:"dp__marker_tooltip",style:No(i.value)},[G("div",{class:"dp__tooltip_content",onClick:Z[0]||(Z[0]=Mn(()=>{},["stop"]))},[(J(!0),oe(ft,null,zt(X.marker.tooltip,(he,ae)=>(J(),oe("div",{key:ae,class:"dp__tooltip_text"},[x.$slots["marker-tooltip"]?Ft(x.$slots,"marker-tooltip",{key:0,tooltop:he,day:X.value}):Ie("",!0),x.$slots["marker-tooltip"]?Ie("",!0):(J(),oe(ft,{key:1},[G("div",{class:"dp__tooltip_mark",style:No(he.color?{backgroundColor:he.color}:{})},null,4),G("div",null,De(he.text),1)],64))]))),128)),Nle])],4)):Ie("",!0)],2)],40,Rle))),128))]))),128))],8,Ale)):Ie("",!0)]),_:3},8,["name","css"])],42,Sle))],4)],2))}}),xle=e=>typeof e=="object",ID=(e,t)=>t,Ule=e=>Array.isArray(e)&&e.length===2,Fle=e=>Array.isArray(e),$le=e=>typeof e=="object",nh=e=>Array.isArray(e),Gs=e=>Array.isArray(e),fv=e=>Array.isArray(e)&&e.length===2,Gle=(e,t)=>t?Array.isArray(e):fv(e),Ble=e=>Array.isArray(e),Hle=e=>typeof e=="string"||typeof e=="object",CD=e=>typeof e=="string",qle={class:"dp__selection_preview"},Vle={class:"dp__action_buttons"},zle=["onKeydown"],jle=it({props:ls(En(En(En(En(En({},u4),xT),l4),UT),f4),{inline:{type:Boolean,default:!1},timePicker:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},menuMount:{type:Boolean,default:!1},enableTimePicker:{type:Boolean,default:!0}}),emits:["closePicker","selectDate"],setup(e,{emit:t}){const n=e,{buildMatrix:r}=xu(),o=en(o4),i=en(Pu),s=Ne(null),u=Ne(null);Rn(()=>{i!=null&&i.value&&r([Po(s),Po(u)],"actionRow")});const d=qe(()=>({dp__action:!0,dp__select:!0,dp__action_disabled:!f.value||!g.value})),f=qe(()=>n.enableTimePicker?_I(n.internalModelValue,n.maxTime,n.minTime):!0),g=qe(()=>n.monthPicker?sle(n.internalModelValue,n.minDate,n.maxDate):!0),v=I=>uy(I,n.previewFormat,o==null?void 0:o.value),_=qe(()=>!n.internalModelValue||!n.menuMount?"":typeof n.previewFormat=="string"?nh(n.internalModelValue)?n.internalModelValue.length===2&&n.internalModelValue[1]?n.multiCalendars>0?`${v(n.internalModelValue[0])} - ${v(n.internalModelValue[1])}`:[v(n.internalModelValue[0]),v(n.internalModelValue[1])]:n.multiDates?n.internalModelValue.map(I=>`${v(I)}`):`${v(n.internalModelValue[0])} -`:uy(n.internalModelValue,n.previewFormat,o==null?void 0:o.value):n.timePicker?n.previewFormat(yI(n.internalModelValue)):n.monthPicker?n.previewFormat(dv(n.internalModelValue)):n.previewFormat(n.internalModelValue)),M=()=>{f.value&&g.value&&t("selectDate")};return(I,k)=>(J(),oe("div",{class:"dp__action_row",style:No(e.calendarWidth?{width:`${e.calendarWidth}px`}:{})},[G("div",qle,[I.$slots["action-preview"]?Ft(I.$slots,"action-preview",{key:0,value:I.internalModelValue}):Ie("",!0),I.$slots["action-preview"]?Ie("",!0):(J(),oe(ft,{key:1},[Array.isArray(Oe(_))?Ie("",!0):(J(),oe(ft,{key:0},[mr(De(Oe(_)),1)],64)),Array.isArray(Oe(_))?(J(!0),oe(ft,{key:1},zt(Oe(_),(w,S)=>(J(),oe("div",{key:S},De(w),1))),128)):Ie("",!0)],64))]),G("div",Vle,[I.$slots["action-select"]?Ft(I.$slots,"action-select",{key:0,value:I.internalModelValue}):Ie("",!0),I.$slots["action-select"]?Ie("",!0):(J(),oe(ft,{key:1},[e.inline?Ie("",!0):(J(),oe("span",{key:0,class:"dp__action dp__cancel",ref_key:"cancelButtonRef",ref:s,tabindex:"0",onClick:k[0]||(k[0]=w=>I.$emit("closePicker")),onKeydown:k[1]||(k[1]=gr(w=>I.$emit("closePicker"),["enter"]))},De(I.cancelText),545)),G("span",{class:lt(Oe(d)),tabindex:"0",onKeydown:gr(M,["enter"]),onClick:M,ref_key:"selectButtonRef",ref:u},De(I.selectText),43,zle)],64))])],4))}}),Wle={class:"dp__overlay_container",role:"grid"},Kle={class:"dp__selection_grid_header"},Yle=["aria-selected","aria-disabled","onClick","onKeydown","onMouseover"],Jle=["aria-label","onKeydown"],Th=it({props:{items:{type:Array,default:()=>[]},modelValue:{type:[String,Number],default:null},multiModelValue:{type:Array,default:()=>[]},disabledValues:{type:Array,default:()=>[]},minValue:{type:[Number,String],default:null},maxValue:{type:[Number,String],default:null},year:{type:Number,default:0},skipActive:{type:Boolean,default:!1},headerRefs:{type:Array,default:()=>[]},skipButtonRef:{type:Boolean,default:!1}},emits:["update:modelValue","selected","toggle","reset-flow"],setup(e,{expose:t,emit:n}){const r=e,o=Ne(!1),i=Ne(null),s=Ne(null),u=Ne([]),d=en(RT,!1),f=en(r4,Ne(!1)),g=en(Nu),v=en(Pu),_=Ne(),M=Ne(),{setSelectionGrid:I,buildMultiLevelMatrix:k,setMonthPicker:w}=xu();GL(()=>{i.value=null}),Rn(()=>{wr().then(()=>B()),L(),S(!0)}),_l(()=>S(!1));const S=x=>{var Z;v!=null&&v.value&&((Z=r.headerRefs)!=null&&Z.length?w(x):I(x))},L=()=>{const x=Po(s);x&&(f.value||x.focus({preventScroll:!0}),o.value=x.clientHeight({dp__overlay:!0})),O=qe(()=>({dp__overlay_col:!0})),H=qe(()=>r.items.map(x=>x.filter(Z=>Z).map(Z=>{var K,re,X;const ie=r.disabledValues.some(ae=>ae===Z.value)||P(Z.value),he=(K=r.multiModelValue)!=null&&K.length?(re=r.multiModelValue)==null?void 0:re.some(ae=>xr(ae,vf(Ch(new Date,Z.value),r.year))):r.skipActive?!1:Z.value===r.modelValue;return ls(En({},Z),{className:{dp__overlay_cell_active:he,dp__overlay_cell:!he,dp__overlay_cell_disabled:ie,dp__overlay_cell_active_disabled:ie&&he,dp__overlay_cell_pad:!0,dp__cell_in_between:(X=r.multiModelValue)!=null&&X.length?$(Z.value):!1}})}))),q=qe(()=>({dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:o.value,dp__button_bottom:d})),P=x=>{const Z=r.maxValue?+x>+r.maxValue:!1,K=r.minValue?+x<+r.minValue:!1;return Z||K},B=()=>{const x=Po(i);if(x){const Z=Po(s);Z&&(Z.scrollTop=x.offsetTop-Z.offsetTop-(Z.getBoundingClientRect().height/2-x.getBoundingClientRect().height))}},j=x=>{!r.disabledValues.some(Z=>Z===x)&&(!r.minValue||+r.minValue<=x)&&(!r.maxValue||+r.maxValue>=x)&&(n("update:modelValue",x),n("selected"))},$=x=>t4(r.multiModelValue,vf(Ch(new Date,_.value||0),r.year),vf(Ch(new Date,x),r.year)),R=()=>{n("toggle"),n("reset-flow")},T=(x,Z,K,re)=>{var X,ie;if(x&&(Z.value===+r.modelValue&&!r.disabledValues.includes(Z.value)&&(i.value=x),v!=null&&v.value)){Array.isArray(u.value[K])?u.value[K][re]=x:u.value[K]=[x];const he=(X=r.headerRefs)!=null&&X.length?[r.headerRefs].concat(u.value):u.value.concat([r.skipButtonRef?[]:[M.value]]);k(he,(ie=r.headerRefs)!=null&&ie.length?"monthPicker":"selectionGrid")}};return t({focusGrid:L}),(x,Z)=>(J(),oe("div",{ref_key:"gridWrapRef",ref:s,class:lt(Oe(A)),role:"dialog",tabindex:"0"},[G("div",Wle,[G("div",Kle,[Ft(x.$slots,"header")]),(J(!0),oe(ft,null,zt(Oe(H),(K,re)=>(J(),oe("div",{class:"dp__overlay_row",key:Oe(vle)(re),role:"row"},[(J(!0),oe(ft,null,zt(K,(X,ie)=>(J(),oe("div",{role:"gridcell",class:lt(Oe(O)),key:X.value,"aria-selected":X.value===e.modelValue&&!e.disabledValues.includes(X.value),"aria-disabled":X.className.dp__overlay_cell_disabled,ref_for:!0,ref:he=>T(he,X,re,ie),tabindex:"0",onClick:he=>j(X.value),onKeydown:gr(he=>j(X.value),["enter"]),onMouseover:he=>_.value=X.value},[G("div",{class:lt(X.className)},[x.$slots.item?Ft(x.$slots,"item",{key:0,item:X}):Ie("",!0),x.$slots.item?Ie("",!0):(J(),oe(ft,{key:1},[mr(De(X.text),1)],64))],2)],42,Yle))),128))]))),128)),x.$slots["button-icon"]?(J(),oe("div",{key:0,role:"button","aria-label":Oe(g).toggleOverlay,class:lt(Oe(q)),tabindex:"0",ref_key:"toggleButton",ref:M,onClick:R,onKeydown:gr(R,["enter"])},[Ft(x.$slots,"button-icon")],42,Jle)):Ie("",!0)])],2))}}),p0=()=>{const e=en(f0);return{transitionName:qe(()=>t=>e!=null&&e.value?t?e.value.open:e.value.close:""),showTransition:!!(e!=null&&e.value)}},Xle={key:0,class:"dp__time_input"},Zle=mr(" : "),Qle=["aria-label","onKeydown","onClick"],eue=["aria-label","onKeydown","onClick"],tue=["aria-label","onKeydown","onClick"],nue={key:0},rue=["aria-label","onKeydown"],oue=it({props:ls(En({},i4),{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},filters:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0}}),emits:["setHours","setMinutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed"],setup(e,{expose:t,emit:n}){const r=e,o=Wt({hours:!1,minutes:!1,seconds:!1}),i=Ne("AM"),s=Ne(null),u=en(Nu),d=en(Pu),f=Ne([]),{transitionName:g,showTransition:v}=p0(),{setTimePickerElements:_,setTimePickerBackRef:M}=xu();Rn(()=>{n("mounted")});const I=qe(()=>({dp__time_col:!0,dp__time_col_reg:!r.enableSeconds&&r.is24,dp__time_col_reg_with_button:!r.enableSeconds&&!r.is24,dp__time_col_sec:r.enableSeconds&&r.is24,dp__time_col_sec_with_button:r.enableSeconds&&!r.is24})),k=qe(()=>{const R=[{type:"hours"},"separator",{type:"minutes"}];return r.enableSeconds?R.concat(["separator",{type:"seconds"}]):R}),w=qe(()=>k.value.filter(R=>typeof R!="string")),S=qe(()=>R=>{if(R==="hours"){const T=q(r.hours);return{text:T<10?`0${T}`:`${T}`,value:T}}return{text:r[R]<10?`0${r[R]}`:`${r[R]}`,value:r[R]}}),L=R=>{const T=R==="hours"?r.is24?24:12:60,x=+r[`${R}GridIncrement`],Z=[];for(let K=0;Kr[`no${R[0].toUpperCase()+R.slice(1)}Overlay`],O=R=>{A(R)||(o[R]=!o[R],o[R]||n("overlay-closed"))},H=(R,T=!0)=>{const x=R==="hours"?Hs:R==="minutes"?qs:eu,Z=T?ole:ile;n(`update:${R}`,x(Z({[R]:+r[R]},{[R]:+r[`${R}Increment`]})))},q=R=>r.is24?R:(R>=12?i.value="PM":i.value="AM",hle(R)),P=()=>{i.value==="PM"?(i.value="AM",n("update:hours",r.hours-12)):(i.value="PM",n("update:hours",r.hours+12))},B=R=>{o[R]=!0},j=(R,T,x)=>{if(R&&(d!=null&&d.value)){Array.isArray(f.value[T])?f.value[T][x]=R:f.value[T]=[R];let Z=f.value.reduce((K,re)=>re.map((X,ie)=>[...K[ie]||[],re[ie]]),[]);M(r.closeTimePickerBtn),s.value&&(Z[1]=Z[1].concat(s.value)),_(Z,r.order)}},$=(R,T)=>R==="hours"&&!r.is24?n(`update:${R}`,i.value==="PM"?T+12:T):n(`update:${R}`,T);return t({openChildCmp:B}),(R,T)=>e.disabled?Ie("",!0):(J(),oe("div",Xle,[(J(!0),oe(ft,null,zt(Oe(k),(x,Z)=>(J(),oe("div",{key:Z,class:lt(Oe(I))},[x==="separator"?(J(),oe(ft,{key:0},[Zle],64)):(J(),oe(ft,{key:1},[G("div",{class:"dp__inc_dec_button",role:"button","aria-label":Oe(u).incrementValue(x.type),tabindex:"0",onKeydown:gr(K=>H(x.type),["enter"]),onClick:K=>H(x.type),ref_for:!0,ref:K=>j(K,Z,0)},[R.$slots["arrow-up"]?Ft(R.$slots,"arrow-up",{key:0}):Ie("",!0),R.$slots["arrow-up"]?Ie("",!0):(J(),_t(Oe(ZN),{key:1}))],40,Qle),G("div",{role:"button","aria-label":Oe(u).openTpOverlay(x.type),class:lt(A(x.type)?"":"dp__time_display"),tabindex:"0",onKeydown:gr(K=>O(x.type),["enter"]),onClick:K=>O(x.type),ref_for:!0,ref:K=>j(K,Z,1)},[R.$slots[x.type]?Ft(R.$slots,x.type,{key:0,text:Oe(S)(x.type).text,value:Oe(S)(x.type).value}):Ie("",!0),R.$slots[x.type]?Ie("",!0):(J(),oe(ft,{key:1},[mr(De(Oe(S)(x.type).text),1)],64))],42,eue),G("div",{class:"dp__inc_dec_button",role:"button","aria-label":Oe(u).decrementValue(x.type),tabindex:"0",onKeydown:gr(K=>H(x.type,!1),["enter"]),onClick:K=>H(x.type,!1),ref_for:!0,ref:K=>j(K,Z,2)},[R.$slots["arrow-down"]?Ft(R.$slots,"arrow-down",{key:0}):Ie("",!0),R.$slots["arrow-down"]?Ie("",!0):(J(),_t(Oe(QN),{key:1}))],40,tue)],64))],2))),128)),R.is24?Ie("",!0):(J(),oe("div",nue,[R.$slots["am-pm-button"]?Ft(R.$slots,"am-pm-button",{key:0,toggle:P,value:i.value}):Ie("",!0),R.$slots["am-pm-button"]?Ie("",!0):(J(),oe("button",{key:1,ref_key:"amPmButton",ref:s,type:"button",class:"dp__pm_am_button",role:"button","aria-label":Oe(u).amPmButton,tabindex:"0",onClick:P,onKeydown:gr(Mn(P,["prevent"]),["enter"])},De(i.value),41,rue))])),(J(!0),oe(ft,null,zt(Oe(w),(x,Z)=>(J(),_t(Mo,{key:Z,name:Oe(g)(Oe(o)[x.type]),css:Oe(v)},{default:Ct(()=>[Oe(o)[x.type]?(J(),_t(Th,{key:0,items:L(x.type),"disabled-values":e.filters.times[x.type],"onUpdate:modelValue":K=>$(x.type,K),onSelected:K=>O(x.type),onToggle:K=>O(x.type),onResetFlow:T[0]||(T[0]=K=>R.$emit("reset-flow"))},Ki({"button-icon":Ct(()=>[R.$slots["clock-icon"]?Ft(R.$slots,"clock-icon",{key:0}):Ie("",!0),R.$slots["clock-icon"]?Ie("",!0):(J(),_t(Oe(XN),{key:1}))]),_:2},[R.$slots[`${x.type}-overlay`]?{name:"item",fn:Ct(({item:K})=>[Ft(R.$slots,`${x.type}-overlay`,{text:K.text,value:K.value})])}:void 0]),1032,["items","disabled-values","onUpdate:modelValue","onSelected","onToggle"])):Ie("",!0)]),_:2},1032,["name","css"]))),128))]))}}),zp=[{name:"clock-icon",use:["time","calendar"]},{name:"arrow-left",use:["month-year","calendar"]},{name:"arrow-right",use:["month-year","calendar"]},{name:"arrow-up",use:["time","calendar"]},{name:"arrow-down",use:["time","calendar"]},{name:"calendar-icon",use:["month-year","time","calendar"]},{name:"day",use:["calendar"]},{name:"month-overlay",use:["calendar","month-year"]},{name:"year-overlay",use:["calendar","month-year"]},{name:"hours-overlay",use:["calendar","time"]},{name:"minutes-overlay",use:["calendar","time"]},{name:"seconds-overlay",use:["calendar","time"]},{name:"hours",use:["calendar","time"]},{name:"minutes",use:["calendar","time"]},{name:"month",use:["calendar","month-year"]},{name:"year",use:["calendar","month-year"]},{name:"action-select",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar"]},{name:"marker-tooltip",use:["calendar"]},{name:"now-button",use:[]},{name:"time-picker-overlay",use:["calendar","time"]},{name:"am-pm-button",use:["calendar","time"]}],iue=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],sue={all:()=>zp,monthYear:()=>zp.filter(e=>e.use.includes("month-year")),input:()=>iue,timePicker:()=>zp.filter(e=>e.use.includes("time")),action:()=>zp.filter(e=>e.use.includes("action")),calendar:()=>zp.filter(e=>e.use.includes("calendar"))},Mc=(e,t)=>{const n=[];return sue[t]().forEach(r=>{e[r.name]&&n.push(r.name)}),n},aue=["aria-label"],lue={class:"dp__overlay_container"},uue={key:1,class:"dp__overlay_row"},cue=["aria-label"],due=it({props:ls(En({},s4),{range:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},customProps:{type:Object,default:null}}),emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-closed"],setup(e,{expose:t,emit:n}){const r=e,o=vg(),i=Ne(null),s=Ne(null),u=en(RT,!1),d=Ne([]),f=Ne(null),g=en(Nu),v=en(Pu),{transitionName:_,showTransition:M}=p0(),{buildMatrix:I,setTimePicker:k}=xu();Rn(()=>{n("mount"),!r.timePicker&&(v!=null&&v.value)?I([Po(i.value)],"time"):k(!0,r.timePicker)});const w=Ne(!1),S=R=>({hours:Array.isArray(r.hours)?r.hours[R]:r.hours,minutes:Array.isArray(r.minutes)?r.minutes[R]:r.minutes,seconds:Array.isArray(r.seconds)?r.seconds[R]:r.seconds}),L=qe(()=>{const R=[];if(r.range)for(let T=0;T<2;T++)R.push(S(T));else R.push(S(0));return R}),A=(R,T=!1,x="")=>{T||n("reset-flow"),w.value=R,v!=null&&v.value&&(k(R),R||n("overlay-closed")),wr(()=>{x!==""&&d.value[0]&&d.value[0].openChildCmp(x)})},O=qe(()=>({dp__button:!0,dp__button_bottom:u})),H=Mc(o,"timePicker"),q=(R,T,x)=>r.range?T===0?[R,L.value[1][x]]:[L.value[0][x],R]:R,P=R=>{n("update:hours",R)},B=R=>{n("update:minutes",R)},j=R=>{n("update:seconds",R)},$=()=>{f.value&&(v!=null&&v.value)&&f.value.focus({preventScroll:!0})};return t({toggleTimePicker:A}),(R,T)=>(J(),oe("div",null,[R.timePicker?Ie("",!0):(J(),oe("div",{key:0,class:lt(Oe(O)),role:"button","aria-label":Oe(g).openTimePicker,tabindex:"0",ref_key:"openTimePickerBtn",ref:i,onKeydown:T[0]||(T[0]=gr(x=>A(!0),["enter"])),onClick:T[1]||(T[1]=x=>A(!0))},[R.$slots["clock-icon"]?Ft(R.$slots,"clock-icon",{key:0}):Ie("",!0),R.$slots["clock-icon"]?Ie("",!0):(J(),_t(Oe(XN),{key:1}))],42,aue)),It(Mo,{name:Oe(_)(w.value),css:Oe(M)},{default:Ct(()=>[w.value||R.timePicker?(J(),oe("div",{key:0,class:"dp__overlay",ref_key:"overlayRef",ref:f,tabindex:"0"},[G("div",lue,[R.$slots["time-picker-overlay"]?Ft(R.$slots,"time-picker-overlay",{key:0,range:e.range,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:P,setMinutes:B,setSeconds:j}):Ie("",!0),R.$slots["time-picker-overlay"]?Ie("",!0):(J(),oe("div",uue,[(J(!0),oe(ft,null,zt(Oe(L),(x,Z)=>(J(),_t(oue,Lo({key:Z,disabled:Z===0?R.fixedStart:R.fixedEnd,hours:x.hours,minutes:x.minutes,seconds:x.seconds,filters:e.filters,ref_for:!0,ref_key:"timeInputRefs",ref:d},{is24:R.is24,hoursGridIncrement:R.hoursGridIncrement,minutesGridIncrement:R.minutesGridIncrement,secondsGridIncrement:R.secondsGridIncrement,hoursIncrement:R.hoursIncrement,minutesIncrement:R.minutesIncrement,secondsIncrement:R.secondsIncrement,filters:e.filters,noHoursOverlay:R.noHoursOverlay,noMinutesOverlay:R.noMinutesOverlay,noSecondsOverlay:R.noSecondsOverlay,enableSeconds:R.enableSeconds,closeTimePickerBtn:s.value,order:Z},{"onUpdate:hours":K=>P(q(K,Z,"hours")),"onUpdate:minutes":K=>B(q(K,Z,"minutes")),"onUpdate:seconds":K=>j(q(K,Z,"seconds")),onMounted:$,onOverlayClosed:$}),Ki({_:2},[zt(Oe(H),(K,re)=>({name:K,fn:Ct(X=>[Ft(R.$slots,K,Wl(Kl(X)))])}))]),1040,["disabled","hours","minutes","seconds","filters","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"]))),128))])),R.timePicker?Ie("",!0):(J(),oe("div",{key:2,ref_key:"closeTimePickerBtn",ref:s,class:lt(Oe(O)),role:"button","aria-label":Oe(g).closeTimePicker,tabindex:"0",onKeydown:T[2]||(T[2]=gr(x=>A(!1),["enter"])),onClick:T[3]||(T[3]=x=>A(!1))},[R.$slots["calendar-icon"]?Ft(R.$slots,"calendar-icon",{key:0}):Ie("",!0),R.$slots["calendar-icon"]?Ie("",!0):(J(),_t(Oe(d0),{key:1}))],42,cue))])],512)):Ie("",!0)]),_:3},8,["name","css"])]))}}),fue=["aria-label"],Tb=it({props:{ariaLabel:{type:String,default:""}},emits:["activate","setRef"],setup(e,{emit:t}){const n=Ne(null);return Rn(()=>t("setRef",n)),(r,o)=>(J(),oe("div",{class:"dp__month_year_col_nav",onClick:o[0]||(o[0]=i=>r.$emit("activate")),onKeydown:o[1]||(o[1]=gr(i=>r.$emit("activate"),["enter"])),tabindex:"0",ref_key:"elRef",ref:n},[G("div",{class:"dp__inner_nav",role:"button","aria-label":e.ariaLabel},[Ft(r.$slots,"default")],8,fue)],544))}}),pue=["aria-label"],TD=it({props:{ariaLabel:{type:String,default:""},showSelectionGrid:{type:Boolean,default:!1},modelValue:{type:Number,default:null},items:{type:Array,default:()=>[]},disabledValues:{type:Array,default:()=>[]},minValue:{type:Number,default:null},maxValue:{type:Number,default:null},slotName:{type:String,default:""},headerRefs:{type:Array,default:()=>[]}},emits:["update:model-value","toggle","setRef"],setup(e,{emit:t}){const{transitionName:n,showTransition:r}=p0(),o=Ne(null);return Rn(()=>t("setRef",o)),(i,s)=>(J(),oe(ft,null,[G("div",{class:"dp__month_year_select",onClick:s[0]||(s[0]=u=>i.$emit("toggle")),onKeydown:s[1]||(s[1]=gr(u=>i.$emit("toggle"),["enter"])),role:"button","aria-label":e.ariaLabel,tabindex:"0",ref_key:"elRef",ref:o},[Ft(i.$slots,"default")],40,pue),It(Mo,{name:Oe(n)(e.showSelectionGrid),css:Oe(r)},{default:Ct(()=>[e.showSelectionGrid?(J(),_t(Th,Lo({key:0},{modelValue:e.modelValue,items:e.items,disabledValues:e.disabledValues,minValue:e.minValue,maxValue:e.maxValue},{"header-refs":[],"onUpdate:modelValue":s[2]||(s[2]=u=>i.$emit("update:model-value",u)),onToggle:s[3]||(s[3]=u=>i.$emit("toggle"))}),Ki({"button-icon":Ct(()=>[i.$slots["calendar-icon"]?Ft(i.$slots,"calendar-icon",{key:0}):Ie("",!0),i.$slots["calendar-icon"]?Ie("",!0):(J(),_t(Oe(d0),{key:1}))]),_:2},[i.$slots[e.slotName]?{name:"item",fn:Ct(({item:u})=>[Ft(i.$slots,e.slotName,{item:u})])}:void 0]),1040)):Ie("",!0)]),_:3},8,["name","css"])],64))}}),cy=(e,t,n)=>[ks(new Date(e),{date:1}),ks(new Date,{month:t,year:n,date:1})],wD=(e,t,n)=>ci(...cy(e,t,n))||xr(...cy(e,t,n)),SD=(e,t,n)=>ss(...cy(e,t,n))||xr(...cy(e,t,n)),h4=(e,t,n,r,o,i)=>{let s=!1;return i?e&&t?(t&&o&&SD(t,n,r)&&(s=!0),e&&!o&&wD(e,n,r)&&(s=!0)):(e&&wD(e,n,r)||t&&SD(t,n,r))&&(s=!0):s=!0,s},hue=(e,t)=>{const n=(s,u)=>{let d=s;return e.filters.months.includes(Jr(d))?(d=u?ml(s,1):og(s,1),n(d,u)):d},r=(s,u)=>{let d=s;return e.filters.years.includes(Vr(d))?(d=u?ON(s,1):cae(s,1),r(d,u)):d},o=s=>{const u=ks(new Date,{month:e.month,year:e.year});let d=s?ml(u,1):og(u,1),f=Jr(d),g=Vr(d);e.filters.months.includes(f)&&(d=n(d,s),f=Jr(d),g=Vr(d)),e.filters.years.includes(g)&&(d=r(d,s),g=Vr(d)),h4(e.minDate,e.maxDate,f,g,s,e.preventMinMaxNavigation)&&i(f,g)},i=(s,u)=>{t("update:month",s),t("update:year",u)};return{handleMonthYearChange:o}},gue={class:"dp__month_year_row"},mue={class:"dp__month_picker_header"},vue=["aria-label"],yue=["aria-label","onKeydown"],_ue=["aria-label"],bue=it({props:ls(En(En({},p4),xT),{preventMinMaxNavigation:{type:Boolean,default:!1},reverseYears:{type:Boolean,default:!1},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},filters:{type:Object,default:()=>({})},multiCalendarsSolo:{type:Boolean,default:!1},yearPicker:{type:Boolean,default:!1}}),emits:["update:month","update:year","monthYearSelect","mount","reset-flow","overlay-closed"],setup(e,{expose:t,emit:n}){const r=e,{transitionName:o,showTransition:i}=p0(),{buildMatrix:s}=xu(),u=Ne(!1),d=Ne(!1),f=Ne([null,null,null,null]),g=Ne(null),v=Ne(null),_=Ne(null),M=en(Nu),I=en(Pu),{handleMonthYearChange:k}=hue(r,n);Rn(()=>{n("mount")});const w=ae=>({get:()=>r[ae],set:de=>{n(`update:${ae}`,de),n("monthYearSelect",ae==="year"),ae==="month"?K(!0):re(!0)}}),S=qe(w("month")),L=qe(w("year")),A=qe(()=>ae=>{const de=ae==="month";return{showSelectionGrid:(de?u:d).value,items:(de?R:T).value,disabledValues:r.filters[de?"months":"years"],minValue:(de?q:O).value,maxValue:(de?P:H).value,headerRefs:de&&r.monthPicker?[g.value,v.value,_.value]:[]}}),O=qe(()=>r.minDate?Vr(new Date(r.minDate)):null),H=qe(()=>r.maxDate?Vr(new Date(r.maxDate)):null),q=qe(()=>{if(r.minDate&&O.value){if(O.value>r.year)return 12;if(O.value===r.year)return Jr(new Date(r.minDate))}return null}),P=qe(()=>{if(r.maxDate&&H.value){if(H.valuer.range&&r.internalModelValue&&r.monthPicker?r.internalModelValue:[]),j=(ae,de=!1)=>{const Y=[];for(let te=0;ter.months.find(de=>de.value===r.month)||{text:"",value:0}),R=qe(()=>j(r.months)),T=qe(()=>j(r.years,r.reverseYears)),x=qe(()=>r.multiCalendars?r.multiCalendarsSolo?!0:r.instance===0:!0),Z=qe(()=>r.multiCalendars?r.multiCalendarsSolo?!0:r.instance===r.multiCalendars-1:!0),K=(ae=!1)=>{X(ae),u.value=!u.value,u.value||n("overlay-closed")},re=(ae=!1)=>{X(ae),d.value=!d.value,d.value||n("overlay-closed")},X=ae=>{ae||n("reset-flow")},ie=(ae=!1)=>{n("update:year",ae?r.year+1:r.year-1)},he=(ae,de)=>{I!=null&&I.value&&(f.value[de]=Po(ae),s(f.value,"monthYear"))};return t({toggleMonthPicker:K,toggleYearPicker:re}),(ae,de)=>(J(),oe("div",gue,[!ae.monthPicker&&!e.yearPicker?(J(),oe(ft,{key:0},[Oe(x)&&!ae.vertical?(J(),_t(Tb,{key:0,"aria-label":Oe(M).prevMonth,onActivate:de[0]||(de[0]=Y=>Oe(k)(!1)),onSetRef:de[1]||(de[1]=Y=>he(Y,0))},{default:Ct(()=>[ae.$slots["arrow-left"]?Ft(ae.$slots,"arrow-left",{key:0}):Ie("",!0),ae.$slots["arrow-left"]?Ie("",!0):(J(),_t(Oe(mD),{key:1}))]),_:3},8,["aria-label"])):Ie("",!0),It(TD,Lo({"aria-label":Oe(M).openMonthsOverlay,"slot-name":"month-overlay",modelValue:Oe(S),"onUpdate:modelValue":de[2]||(de[2]=Y=>br(S)?S.value=Y:null)},Oe(A)("month"),{onToggle:K,onSetRef:de[3]||(de[3]=Y=>he(Y,1))}),Ki({default:Ct(()=>[ae.$slots.month?Ft(ae.$slots,"month",Wl(Lo({key:0},Oe($)))):Ie("",!0),ae.$slots.month?Ie("",!0):(J(),oe(ft,{key:1},[mr(De(Oe($).text),1)],64))]),_:2},[ae.$slots["calendar-icon"]?{name:"calendar-icon",fn:Ct(()=>[Ft(ae.$slots,"calendar-icon")])}:void 0,ae.$slots["month-overlay"]?{name:"month-overlay",fn:Ct(({item:Y})=>[Ft(ae.$slots,"month-overlay",{text:Y.text,value:Y.value})])}:void 0]),1040,["aria-label","modelValue"]),It(TD,Lo({"aria-label":Oe(M).openYearsOverlay,"slot-name":"year-overlay",modelValue:Oe(L),"onUpdate:modelValue":de[4]||(de[4]=Y=>br(L)?L.value=Y:null)},Oe(A)("year"),{onToggle:re,onSetRef:de[5]||(de[5]=Y=>he(Y,2))}),Ki({default:Ct(()=>[ae.$slots.year?Ft(ae.$slots,"year",{key:0,year:ae.year}):Ie("",!0),ae.$slots.year?Ie("",!0):(J(),oe(ft,{key:1},[mr(De(ae.year),1)],64))]),_:2},[ae.$slots["calendar-icon"]?{name:"calendar-icon",fn:Ct(()=>[Ft(ae.$slots,"calendar-icon")])}:void 0,ae.$slots["year-overlay"]?{name:"year-overlay",fn:Ct(({item:Y})=>[Ft(ae.$slots,"year-overlay",{text:Y.text,value:Y.value})])}:void 0]),1040,["aria-label","modelValue"]),Oe(x)&&ae.vertical?(J(),_t(Tb,{key:1,"aria-label":Oe(M).prevMonth,onActivate:de[6]||(de[6]=Y=>Oe(k)(!1))},{default:Ct(()=>[ae.$slots["arrow-up"]?Ft(ae.$slots,"arrow-up",{key:0}):Ie("",!0),ae.$slots["arrow-up"]?Ie("",!0):(J(),_t(Oe(ZN),{key:1}))]),_:3},8,["aria-label"])):Ie("",!0),Oe(Z)?(J(),_t(Tb,{key:2,"arial-label":Oe(M).nextMonth,onActivate:de[7]||(de[7]=Y=>Oe(k)(!0)),ref:"rightIcon",onSetRef:de[8]||(de[8]=Y=>he(Y,3))},{default:Ct(()=>[ae.$slots[ae.vertical?"arrow-down":"arrow-right"]?Ft(ae.$slots,ae.vertical?"arrow-down":"arrow-right",{key:0}):Ie("",!0),ae.$slots[ae.vertical?"arrow-down":"arrow-right"]?Ie("",!0):(J(),_t(cf(ae.vertical?Oe(QN):Oe(vD)),{key:1}))]),_:3},8,["arial-label"])):Ie("",!0)],64)):Ie("",!0),ae.monthPicker?(J(),_t(Th,Lo({key:1},Oe(A)("month"),{"skip-active":r.range,year:ae.year,"multi-model-value":Oe(B),modelValue:Oe(S),"onUpdate:modelValue":de[15]||(de[15]=Y=>br(S)?S.value=Y:null),onToggle:K,onSelected:de[16]||(de[16]=Y=>ae.$emit("overlay-closed"))}),Ki({header:Ct(()=>[G("div",mue,[G("div",{class:"dp__month_year_col_nav",tabindex:"0",ref_key:"mpPrevIconRef",ref:g,onClick:de[9]||(de[9]=Y=>ie(!1)),onKeydown:de[10]||(de[10]=gr(Y=>ie(!1),["enter"]))},[G("div",{class:"dp__inner_nav",role:"button","aria-label":Oe(M).prevMonth},[ae.$slots["arrow-left"]?Ft(ae.$slots,"arrow-left",{key:0}):Ie("",!0),ae.$slots["arrow-left"]?Ie("",!0):(J(),_t(Oe(mD),{key:1}))],8,vue)],544),G("div",{class:"dp__pointer",role:"button",ref_key:"mpYearButtonRef",ref:v,"aria-label":Oe(M).openYearsOverlay,tabindex:"0",onClick:re,onKeydown:gr(re,["enter"])},[ae.$slots.year?Ft(ae.$slots,"year",{key:0,year:ae.year}):Ie("",!0),ae.$slots.year?Ie("",!0):(J(),oe(ft,{key:1},[mr(De(ae.year),1)],64))],40,yue),G("div",{class:"dp__month_year_col_nav",tabindex:"0",ref_key:"mpNextIconRef",ref:_,onClick:de[11]||(de[11]=Y=>ie(!0)),onKeydown:de[12]||(de[12]=gr(Y=>ie(!0),["enter"]))},[G("div",{class:"dp__inner_nav",role:"button","aria-label":Oe(M).nextMonth},[ae.$slots["arrow-right"]?Ft(ae.$slots,"arrow-right",{key:0}):Ie("",!0),ae.$slots["arrow-right"]?Ie("",!0):(J(),_t(Oe(vD),{key:1}))],8,_ue)],544)]),It(Mo,{name:Oe(o)(d.value),css:Oe(i)},{default:Ct(()=>[d.value?(J(),_t(Th,Lo({key:0},Oe(A)("year"),{modelValue:Oe(L),"onUpdate:modelValue":de[13]||(de[13]=Y=>br(L)?L.value=Y:null),onToggle:re,onSelected:de[14]||(de[14]=Y=>ae.$emit("overlay-closed"))}),Ki({"button-icon":Ct(()=>[ae.$slots["calendar-icon"]?Ft(ae.$slots,"calendar-icon",{key:0}):Ie("",!0),ae.$slots["calendar-icon"]?Ie("",!0):(J(),_t(Oe(d0),{key:1}))]),_:2},[ae.$slots["year-overlay"]?{name:"item",fn:Ct(({item:Y})=>[Ft(ae.$slots,"year-overlay",{text:Y.text,value:Y.value})])}:void 0]),1040,["modelValue"])):Ie("",!0)]),_:3},8,["name","css"])]),_:2},[ae.$slots["month-overlay"]?{name:"item",fn:Ct(({item:Y})=>[Ft(ae.$slots,"month-overlay",{text:Y.text,value:Y.value})])}:void 0]),1040,["skip-active","year","multi-model-value","modelValue"])):Ie("",!0),e.yearPicker?(J(),_t(Th,Lo({key:2},Oe(A)("year"),{modelValue:Oe(L),"onUpdate:modelValue":de[17]||(de[17]=Y=>br(L)?L.value=Y:null),"skip-button-ref":"",onToggle:re,onSelected:de[18]||(de[18]=Y=>ae.$emit("overlay-closed"))}),Ki({_:2},[ae.$slots["year-overlay"]?{name:"item",fn:Ct(({item:Y})=>[Ft(ae.$slots,"year-overlay",{text:Y.text,value:Y.value})])}:void 0]),1040,["modelValue"])):Ie("",!0)]))}}),Mue=(e,t,n,r)=>{const o=Ne(new Date),i=Ne(),s=Ne([{month:Jr(new Date),year:Vr(new Date)}]),u=Ne(e.range?[Hs(new Date),Hs(new Date)]:Hs(new Date)),d=Ne(e.range?[qs(new Date),qs(new Date)]:qs(new Date)),f=Ne(e.range?[0,0]:0);Bt(s,()=>{setTimeout(()=>{e.openOnTop&&t("dpOpen")},0)},{deep:!0}),Rn(()=>{j(),S.value||(e.startDate&&(s.value[0].month=Jr(new Date(e.startDate)),s.value[0].year=Vr(new Date(e.startDate)),e.multiCalendars&&Y(0)),e.startTime&&w())});const g=qe(()=>W=>s.value[W]?s.value[W].month:0),v=qe(()=>W=>s.value[W]?s.value[W].year:0),_=(W,ne,ye)=>{s.value[W].month=ne,s.value[W].year=ye},M=(W,ne)=>s.value[W].month=ne,I=(W,ne)=>s.value[W].year=ne,k=(W=!0)=>e.enableSeconds?Array.isArray(f.value)?W?f.value[0]:f.value[1]:f.value:0,w=()=>{e.startTime&&(Ble(e.startTime)?(u.value=[+e.startTime[0].hours,+e.startTime[1].hours],d.value=[+e.startTime[0].minutes,+e.startTime[1].minutes],e.enableSeconds&&(f.value=[+e.startTime[0].seconds,+e.startTime[1].seconds])):(u.value=+e.startTime.hours,d.value=+e.startTime.minutes,e.enableSeconds&&(f.value=+e.startTime.seconds)))},S=qe({get:()=>e.internalModelValue,set:W=>{!e.readonly&&!e.disabled&&t("update:internalModelValue",W)}});Bt(S,()=>j());const L=W=>{const{validate:ne}=n4(e.minDate,e.maxDate,e.disabledDates,e.allowedDates,e.filters,e.disabledWeekDays,e.yearRange);return!ne(W)},A=W=>!S.value||e.hideOffsetDates&&!W.current||e.range?!1:e.multiDates&&Array.isArray(S.value)?S.value.some(ne=>xr(ne,W.value)):xr(W.value,S.value?S.value:o.value),O=W=>t4(S.value,i.value,W.value),H=W=>{if((!e.multiCalendars||!e.multiStatic)&&(M(0,Jr(W)),I(0,Vr(W))),e.multiCalendars)for(let ne=1;ne<=e.multiCalendars;ne++){const ye=ks(new Date,{month:g.value(ne-1),year:v.value(ne-1)}),Be=LN(ye,{months:1});s.value[ne]={month:Jr(Be),year:Vr(Be)}}},q=()=>{if(Array.isArray(S.value)&&S.value.length===2){const W=new Date(S.value[1]?S.value[1]:ml(S.value[0],1)),[ne,ye]=[Jr(S.value[0]),Vr(S.value[0])],[Be,je]=[Jr(S.value[1]),Vr(S.value[1])];(ne!==Be||ne===Be&&ye!==je)&&e.multiCalendarsSolo&&(M(1,Jr(W)),I(1,Vr(W)))}},P=W=>{H(W),u.value=Hs(W),d.value=qs(W),f.value=eu(W)},B=()=>Array.isArray(S.value)&&S.value.length?S.value[S.value.length-1]:null,j=()=>{if(S.value)if(nh(S.value)){if(S.value.length===2&&!e.multiDates)H(S.value[0]),u.value=[Hs(S.value[0]),S.value[1]?Hs(S.value[1]):Hs(new Date)],d.value=[qs(S.value[0]),S.value[1]?qs(S.value[1]):qs(new Date)],f.value=[eu(S.value[0]),S.value[1]?eu(S.value[1]):eu(new Date)];else if(nh(S.value)&&e.multiDates){const W=S.value[S.value.length-1];W&&P(W)}e.multiCalendars&&e.multiCalendarsSolo&&q()}else P(S.value);else e.timePicker?(w(),e.range?Gs(u.value)&&Gs(d.value)&&(S.value=[Vi(new Date,u.value[0],d.value[0],k()),Vi(new Date,u.value[1],d.value[1],k(!1))]):S.value=Vi(new Date,u.value,d.value,k())):e.monthPicker&&!e.range?S.value=Wc(new Date,g.value(0),v.value(0)):e.multiCalendars?H(new Date):e.yearPicker&&(S.value=new Date)},$=W=>{const ne=Jr(new Date(W)),ye=Vr(new Date(W));if(M(0,ne),I(0,ye),e.multiCalendars>0)for(let Be=1;Be{if(S.value&&Array.isArray(S.value))if(S.value.some(ne=>xr(W,ne))){const ne=S.value.filter(ye=>!xr(ye,W));S.value=ne.length?ne:null}else(e.multiDatesLimit&&+e.multiDatesLimit>S.value.length||!e.multiDatesLimit)&&S.value.push(W);else S.value=[W]},T=W=>{if(Array.isArray(S.value)&&S.value[0]){const ne=Yoe(W,S.value[0]),ye=Math.abs(ne<0?ne+1:ne-1);if(e.minRange&&e.maxRange)return ye>=+e.minRange&&ye<=+e.maxRange;if(e.minRange)return ye>=+e.minRange;if(e.maxRange)return ye<=+e.maxRange}return!0},x=W=>Array.isArray(S.value)&&S.value.length===2?e.fixedStart&&(ss(W,S.value[0])||xr(W,S.value[0]))?[S.value[0],W]:e.fixedEnd&&(ci(W,S.value[1])||xr(W,S.value[1]))?[W,S.value[1]]:S.value:[],Z=()=>{e.autoApply&&t("autoApply")},K=W=>!Qoe({start:W[0],end:W[1]}).some(ne=>L(ne)),re=(W,ne=!1)=>{if(!L(W.value)&&!(!W.current&&e.hideOffsetDates)){if(e.weekPicker)return S.value=Am(new Date(W.value),+e.weekStart),Z();if(!e.range&&!Gs(u.value)&&!Gs(d.value)){const ye=Vi(new Date(W.value),u.value,d.value,k());e.multiDates?R(ye):S.value=ye,n(),Z()}else if(Gs(u.value)&&Gs(d.value)&&!e.multiDates){let ye=S.value?S.value.slice():[];if(ye.length===2&&!(e.fixedStart||e.fixedEnd)&&(ye=[]),e.autoRange){const Be=[new Date(W.value),jc(new Date(W.value),+e.autoRange)];K(Be)&&(ne&&$(W.value),ye=Be)}else e.fixedStart||e.fixedEnd?ye=x(new Date(W.value)):ye[0]?T(new Date(W.value))&&(ci(new Date(W.value),new Date(ye[0]))?ye.unshift(new Date(W.value)):ye[1]=new Date(W.value)):ye[0]=new Date(W.value);ye.length&&(ye[0]&&!ye[1]?ye[0]=Vi(ye[0],u.value[0],d.value[0],k()):(ye[0]=Vi(ye[0],u.value[0],d.value[0],k()),ye[1]=Vi(ye[1],u.value[1],d.value[1],k(!1)),n()),S.value=ye,ye[0]&&ye[1]&&e.autoApply&&t("autoApply"))}}},X=W=>{const ne=W.find(ye=>ye.current);return ne?lse(ne.value):""},ie=W=>{!W.current&&e.hideOffsetDates||(i.value=W.value)},he=W=>{if(e.autoRange||e.weekPicker){if(i.value){if(e.hideOffsetDates&&!W.current)return!1;const ne=jc(i.value,+e.autoRange),ye=Am(new Date(i.value),+e.weekStart);return e.weekPicker?xr(ye[1],new Date(W.value)):xr(ne,new Date(W.value))}return!1}return!1},ae=W=>{if(e.autoRange||e.weekPicker){if(i.value){const ne=jc(i.value,+e.autoRange);if(e.hideOffsetDates&&!W.current)return!1;const ye=Am(new Date(i.value),+e.weekStart);return e.weekPicker?ss(W.value,ye[0])&&ci(W.value,ye[1]):ss(W.value,i.value)&&ci(W.value,ne)}return!1}return!1},de=W=>{if(e.autoRange||e.weekPicker){if(i.value){if(e.hideOffsetDates&&!W.current)return!1;const ne=Am(new Date(i.value),+e.weekStart);return e.weekPicker?xr(ne[0],W.value):xr(i.value,W.value)}return!1}return!1},Y=W=>{for(let ne=W-1;ne>=0;ne--){const ye=og(ks(new Date,{month:g.value(ne+1),year:v.value(ne+1)}),1);_(ne,Jr(ye),Vr(ye))}for(let ne=W+1;ne<=e.multiCalendars-1;ne++){const ye=ml(ks(new Date,{month:g.value(ne-1),year:v.value(ne-1)}),1);_(ne,Jr(ye),Vr(ye))}},te=W=>Wc(new Date,g.value(W),v.value(W)),fe=(W,ne,ye=!0)=>{if(ye?M(W,ne):I(W,ne),e.multiCalendars&&!e.multiCalendarsSolo&&Y(W),e.monthPicker)if(e.range){if(ye){let Be=S.value?S.value.slice():[];Be.length===2&&Be[1]!==null&&(Be=[]),Be.length?ci(te(W),Be[0])?Be.unshift(te(W)):Be[1]=te(W):Be=[te(W)],S.value=Be}}else S.value=te(W);n(),t("updateMonthYear",{instance:W,value:ne,isMonth:ye}),Te(e.multiCalendarsSolo?W:void 0)},Re=W=>Vi(W,u.value,d.value,k()),ve=W=>{nh(W)&&nh(S.value)&&Gs(u.value)&&Gs(d.value)?(W[0]&&S.value[0]&&(S.value[0]=Vi(W[0],u.value[0],d.value[0],k())),W[1]&&S.value[1]&&(S.value[1]=Vi(W[1],u.value[1],d.value[1],k(!1)))):e.multiDates&&Array.isArray(S.value)?S.value[S.value.length-1]=Re(W):!e.range&&!fv(W)&&(S.value=Re(W)),t("timeUpdate")},be=(W,ne=!0,ye=!1)=>{const Be=ne?W:u.value,je=!ne&&!ye?W:d.value,ct=ye?W:f.value;if(e.range&&fv(S.value)&&Gs(Be)&&Gs(je)&&Gs(ct)){const Fe=St=>Vi(S.value[St],Be[St],je[St],ct[St]),at=St=>OT(S.value[St],0);if(xr(S.value[0],S.value[1])&&(BN(Fe(0),at(1))||HN(Fe(1),at(0))))return}if(u.value=Be,d.value=je,f.value=ct,S.value)if(e.multiDates){const Fe=B();Fe&&ve(Fe)}else ve(S.value);else e.timePicker&&ve(e.range?[new Date,new Date]:new Date);n()},ue=()=>{i.value=null},ce=W=>ID(S.value,e.range)&&S.value[0]&&i.value?W?ss(i.value,S.value[0]):ci(i.value,S.value[0]):!0,Ee=(W,ne=!0)=>(e.range||e.weekPicker)&&fv(S.value)?e.hideOffsetDates&&!W.current?!1:xr(new Date(W.value),S.value[ne?0:1]):e.range?xr(new Date(W.value),S.value&&Array.isArray(S.value)?ne?S.value[0]||null:S.value[1]:null)&&(ne?!ci(i.value||null,Array.isArray(S.value)?S.value[0]:null):!0)||xr(W.value,Array.isArray(S.value)?S.value[0]:null)&&ce(ne):!1,pe=(W,ne)=>Array.isArray(e.internalModelValue)&&e.internalModelValue.length||e.weekPicker?!1:!W&&!A(ne)&&!(!ne.current&&e.hideOffsetDates)&&(e.range?!Ee(ne)&&!Ee(ne,!1):!0),V=(W,ne,ye)=>Array.isArray(e.internalModelValue)&&e.internalModelValue[0]&&e.internalModelValue.length===1?W?!1:ye?ss(e.internalModelValue[0],ne.value):ci(e.internalModelValue[0],ne.value):!1,ee=(W=!1)=>{W&&e.yearPicker&&(S.value=vf(new Date,s.value[0].year),e.autoApply&&t("autoApply")),e.autoApply&&e.monthPicker&&wr().then(()=>{e.range?t("autoApply",W||!S.value||S.value.length===1):t("autoApply",W)})},se=(W,ne)=>{const ye=ks(new Date,{month:g.value(ne),year:v.value(ne)}),Be=W<0?ml(ye,1):og(ye,1);h4(e.minDate,e.maxDate,Jr(Be),Vr(Be),W<0,e.preventMinMaxNavigation)&&(_(ne,Jr(Be),Vr(Be)),e.multiCalendars&&!e.multiCalendarsSolo&&Y(ne),Te())},Ce=(W,ne)=>{e.monthChangeOnScroll&&se(e.monthChangeOnScroll!=="inverse"?-W.deltaY:W.deltaY,ne)},le=(W,ne,ye=!1)=>{e.monthChangeOnArrows&&e.vertical===ye&&ke(W,ne)},ke=(W,ne)=>{se(W==="right"?-1:1,ne)},Pe=W=>e.markers.find(ne=>xr(Is(new Date(W.value)),Is(new Date(ne.date)))),xe=()=>{e.range?ID(S.value,e.range)&&(S.value&&S.value[0]?S.value=ci(new Date,S.value[0])?[new Date,S.value[0]]:[S.value[0],new Date]:S.value=[new Date]):t("update:internalModelValue",new Date),e.autoApply&&t("selectDate")},He=W=>{W.length&&W.length<=2&&e.range&&(S.value=W.map(ne=>new Date(ne)),e.autoApply&&t("selectDate"))},Te=W=>{W||W===0?r.value[W].triggerTransition(g.value(W),v.value(W)):r.value.forEach((ne,ye)=>ne.triggerTransition(g.value(ye),v.value(ye)))};return{today:o,hours:u,minutes:d,seconds:f,month:g,year:v,monthYearSelect:ee,isDisabled:L,updateTime:be,setHoverDate:ie,getWeekNum:X,selectDate:re,rangeActive:O,isActiveDate:A,updateMonthYear:fe,isHoverRangeEnd:he,isAutoRangeInBetween:ae,isAutoRangeStart:de,clearHoverDate:ue,rangeActiveStartEnd:Ee,handleScroll:Ce,getMarker:Pe,handleArrow:le,handleSwipe:ke,selectCurrentDate:xe,isHoverDate:pe,isHoverDateStartEnd:V,presetDateRange:He}},Iue=["id","aria-label","onKeydown"],Cue={key:0,class:"dp__preset_ranges"},Tue=["onClick"],wue={key:1,class:"dp__now_wrap"},Sue=it({props:ls(En(En(En({},d4),PT),NT),{internalModelValue:{type:[Date,Array],default:null},multiCalendars:{type:Number,default:0},openOnTop:{type:Boolean,default:!1}}),emits:["update:internalModelValue","closePicker","selectDate","dpOpen","autoApply","timeUpdate","flow-step","updateMonthYear"],setup(e,{emit:t}){const n=e,r=vg(),o=Ne(null),i=Wt({timePicker:!!(!n.enableTimePicker||n.timePicker||n.monthPicker),monthYearInput:!!n.timePicker,calendar:!1}),s=Ne([]),u=Ne([]),d=Ne(null),f=Ne(null),g=Ne(0),v=Ne(!1),_=Ne(0),M=en(f0),I=en(Nu),k=en(Pu),{setMenuFocused:w,setShiftKey:S}=FT();Rn(()=>{var ze;v.value=!0,(ze=n.presetRanges)!=null&&ze.length||ye();const kt=Po(f);if(kt&&!n.textInput&&!n.inline&&(w(!0),q()),kt){const Mt=qt=>{qt.stopImmediatePropagation(),qt.stopPropagation()};kt.addEventListener("pointerdown",Mt),kt.addEventListener("mousedown",Mt)}document.addEventListener("resize",ye)}),_l(()=>{document.removeEventListener("resize",ye)});const{arrowRight:L,arrowLeft:A,arrowDown:O,arrowUp:H}=xu(),q=()=>{const ze=Po(f);ze&&ze.focus({preventScroll:!0})},P=()=>{var ze;(ze=n.flow)!=null&&ze.length&&_.value!==-1&&(_.value+=1,t("flow-step",_.value),tn())},B=()=>{_.value=-1},{updateTime:j,updateMonthYear:$,today:R,month:T,year:x,hours:Z,minutes:K,seconds:re,isDisabled:X,isActiveDate:ie,selectDate:he,getWeekNum:ae,setHoverDate:de,isHoverRangeEnd:Y,isAutoRangeInBetween:te,isAutoRangeStart:fe,rangeActive:Re,clearHoverDate:ve,rangeActiveStartEnd:be,monthYearSelect:ue,handleScroll:ce,handleArrow:Ee,handleSwipe:pe,getMarker:V,selectCurrentDate:ee,isHoverDateStartEnd:se,isHoverDate:Ce,presetDateRange:le}=Mue(n,t,P,u),ke=Mc(r,"calendar"),Pe=Mc(r,"action"),xe=Mc(r,"timePicker"),He=Mc(r,"monthYear"),Te=qe(()=>n.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),W=qe(()=>fle(n.yearRange)),ne=qe(()=>ple(n.locale,n.monthNameFormat)),ye=()=>{const ze=Po(o);ze&&(g.value=ze.getBoundingClientRect().width)},Be=qe(()=>ze=>ule(T.value(ze),x.value(ze),+n.weekStart,n.hideOffsetDates)),je=qe(()=>n.multiCalendars>0&&n.range?[...Array(n.multiCalendars).keys()]:[0]),ct=qe(()=>ze=>ze===1),Fe=qe(()=>n.monthPicker||n.timePicker||n.yearPicker),at=qe(()=>({dp__flex_display:n.multiCalendars>0})),St=qe(()=>({dp__instance_calendar:n.multiCalendars>0})),vn=qe(()=>({dp__menu_disabled:n.disabled,dp__menu_readonly:n.readonly})),Cn=qe(()=>ze=>yn(Be,ze)),Tn=qe(()=>({locale:n.locale,weekNumName:n.weekNumName,weekStart:n.weekStart,weekNumbers:n.weekNumbers,customProps:n.customProps,calendarClassName:n.calendarClassName,specificMode:Fe.value,getWeekNum:ae,multiCalendars:n.multiCalendars,modeHeight:n.modeHeight,internalModelValue:n.internalModelValue,noSwipe:n.noSwipe,vertical:n.vertical})),An=qe(()=>({dp__menu:!0,dp__menu_index:!n.inline,dp__relative:n.inline,[n.menuClassName]:!!n.menuClassName})),yn=(ze,kt)=>ze.value(kt).map(Mt=>ls(En({},Mt),{days:Mt.days.map(qt=>{const Jt=X(qt.value),Mr=Ce(Jt,qt),Sr=(n.range||n.weekPicker)&&(!(n.multiCalendars>0)||qt.current)&&!Jt&&!(!qt.current&&n.hideOffsetDates)&&!ie(qt)?Re(qt):!1;return qt.marker=V(qt),qt.classData={dp__cell_offset:!qt.current,dp__pointer:!Jt&&!(!qt.current&&n.hideOffsetDates),dp__active_date:n.range?!1:ie(qt),dp__date_hover:Mr,dp__date_hover_start:se(Mr,qt,!0),dp__date_hover_end:se(Mr,qt,!1),dp__range_between:Sr&&!n.weekPicker,dp__range_between_week:Sr&&n.weekPicker,dp__today:!n.noToday&&xr(qt.value,R.value)&&qt.current,dp__cell_disabled:Jt,dp__cell_auto_range:te(qt),dp__cell_auto_range_start:fe(qt),dp__cell_auto_range_end:Y(qt),dp__range_start:n.multiCalendars>0?qt.current&&be(qt):be(qt),dp__range_end:n.multiCalendars>0?qt.current&&be(qt,!1):be(qt,!1),[n.calendarCellClassName]:!!n.calendarCellClassName},qt})})),nt=ze=>{ze.stopPropagation(),ze.preventDefault(),ze.stopImmediatePropagation()},bt=()=>{n.escClose&&t("closePicker")},Pt=ze=>{ze.stopImmediatePropagation(),ze.preventDefault(),n.spaceConfirm&&t("selectDate")},ln=ze=>{var kt;(kt=n.flow)!=null&&kt.length&&(i[ze]=!0,Object.keys(i).filter(Mt=>!i[Mt]).length||tn())},tn=()=>{n.flow[_.value]==="month"&&s.value[0]&&s.value[0].toggleMonthPicker(!0),n.flow[_.value]==="year"&&s.value&&s.value[0].toggleYearPicker(!0),n.flow[_.value]==="calendar"&&d.value&&d.value.toggleTimePicker(!1,!0),n.flow[_.value]==="time"&&d.value&&d.value.toggleTimePicker(!0,!0);const ze=n.flow[_.value];(ze==="hours"||ze==="minutes"||ze==="seconds")&&d.value&&d.value.toggleTimePicker(!0,!0,ze)},wn=ze=>{if(k!=null&&k.value){if(ze==="up")return H();if(ze==="down")return O();if(ze==="left")return A();if(ze==="right")return L()}else ze==="left"||ze==="up"?Ee("left",0,ze==="up"):Ee("right",0,ze==="down")},Vn=ze=>{S(ze.shiftKey)};return(ze,kt)=>(J(),_t(Mo,{appear:"",name:Oe(M).menuAppear,mode:"out-in",css:!!Oe(M)},{default:Ct(()=>[G("div",{id:ze.uid?`dp-menu-${ze.uid}`:void 0,tabindex:"0",ref_key:"dpMenuRef",ref:f,role:"dialog","aria-label":Oe(I).menu,class:lt(Oe(An)),onMouseleave:kt[11]||(kt[11]=(...Mt)=>Oe(ve)&&Oe(ve)(...Mt)),onClick:nt,onKeydown:[gr(bt,["esc"]),gr(Pt,["space"]),kt[12]||(kt[12]=gr(Mn(Mt=>wn("left"),["prevent"]),["left"])),kt[13]||(kt[13]=gr(Mn(Mt=>wn("up"),["prevent"]),["up"])),kt[14]||(kt[14]=gr(Mn(Mt=>wn("down"),["prevent"]),["down"])),kt[15]||(kt[15]=gr(Mn(Mt=>wn("right"),["prevent"]),["right"])),Vn]},[(ze.disabled||ze.readonly)&&ze.inline?(J(),oe("div",{key:0,class:lt(Oe(vn))},null,2)):Ie("",!0),ze.inline?Ie("",!0):(J(),oe("div",{key:1,class:lt(Oe(Te))},null,2)),G("div",{class:lt(ze.presetRanges.length?"dp__menu_content_wrapper":null)},[ze.presetRanges.length?(J(),oe("div",Cue,[(J(!0),oe(ft,null,zt(ze.presetRanges,(Mt,qt)=>(J(),oe("div",{key:qt,class:"dp__preset_range",onClick:Jt=>Oe(le)(Mt.range)},De(Mt.label),9,Tue))),128))])):Ie("",!0),G("div",{class:"dp__instance_calendar",ref_key:"calendarWrapperRef",ref:o,role:"document"},[G("div",{class:lt(Oe(at))},[(J(!0),oe(ft,null,zt(Oe(je),(Mt,qt)=>(J(),oe("div",{key:Mt,class:lt(Oe(St))},[!ze.disableMonthYearSelect&&!ze.timePicker?(J(),_t(cf(ze.monthYearComponent?ze.monthYearComponent:bue),Lo({key:0,ref_for:!0,ref:Jt=>{Jt&&(s.value[qt]=Jt)}},{months:Oe(ne),years:Oe(W),filters:ze.filters,monthPicker:ze.monthPicker,month:Oe(T)(Mt),year:Oe(x)(Mt),customProps:ze.customProps,multiCalendars:e.multiCalendars,multiCalendarsSolo:ze.multiCalendarsSolo,instance:Mt,minDate:ze.minDate,maxDate:ze.maxDate,preventMinMaxNavigation:ze.preventMinMaxNavigation,internalModelValue:e.internalModelValue,range:ze.range,reverseYears:ze.reverseYears,vertical:ze.vertical,yearPicker:ze.yearPicker},{onMount:kt[0]||(kt[0]=Jt=>ln("monthYearInput")),onResetFlow:B,"onUpdate:month":Jt=>Oe($)(Mt,Jt,!0),"onUpdate:year":Jt=>Oe($)(Mt,Jt,!1),onMonthYearSelect:Oe(ue),onOverlayClosed:q}),Ki({_:2},[zt(Oe(He),(Jt,Mr)=>({name:Jt,fn:Ct(Sr=>[Ft(ze.$slots,Jt,Wl(Kl(Sr)))])}))]),1040,["onUpdate:month","onUpdate:year","onMonthYearSelect"])):Ie("",!0),It(Ple,Lo({ref_for:!0,ref:Jt=>{Jt&&(u.value[qt]=Jt)}},Oe(Tn),{"flow-step":_.value,"onUpdate:flow-step":kt[1]||(kt[1]=Jt=>_.value=Jt),instance:Mt,"mapped-dates":Oe(Cn)(Mt),month:Oe(T)(Mt),year:Oe(x)(Mt),onSelectDate:Jt=>Oe(he)(Jt,!Oe(ct)(Mt)),onSetHoverDate:kt[2]||(kt[2]=Jt=>Oe(de)(Jt)),onHandleScroll:Jt=>Oe(ce)(Jt,Mt),onHandleSwipe:Jt=>Oe(pe)(Jt,Mt),onMount:kt[3]||(kt[3]=Jt=>ln("calendar")),onResetFlow:B}),Ki({_:2},[zt(Oe(ke),(Jt,Mr)=>({name:Jt,fn:Ct(Sr=>[Ft(ze.$slots,Jt,Wl(Kl(En({},Sr))))])}))]),1040,["flow-step","instance","mapped-dates","month","year","onSelectDate","onHandleScroll","onHandleSwipe"])],2))),128))],2),G("div",null,[ze.enableTimePicker&&!ze.monthPicker&&!ze.weekPicker?(J(),_t(cf(ze.timePickerComponent?ze.timePickerComponent:due),Lo({key:0,ref_key:"timePickerRef",ref:d},{is24:ze.is24,hoursIncrement:ze.hoursIncrement,minutesIncrement:ze.minutesIncrement,hoursGridIncrement:ze.hoursGridIncrement,secondsIncrement:ze.secondsIncrement,minutesGridIncrement:ze.minutesGridIncrement,secondsGridIncrement:ze.secondsGridIncrement,noHoursOverlay:ze.noHoursOverlay,noMinutesOverlay:ze.noMinutesOverlay,noSecondsOverlay:ze.noSecondsOverlay,range:ze.range,filters:ze.filters,timePicker:ze.timePicker,hours:Oe(Z),minutes:Oe(K),seconds:Oe(re),customProps:ze.customProps,enableSeconds:ze.enableSeconds,fixedStart:ze.fixedStart,fixedEnd:ze.fixedEnd},{onMount:kt[4]||(kt[4]=Mt=>ln("timePicker")),"onUpdate:hours":kt[5]||(kt[5]=Mt=>Oe(j)(Mt)),"onUpdate:minutes":kt[6]||(kt[6]=Mt=>Oe(j)(Mt,!1)),"onUpdate:seconds":kt[7]||(kt[7]=Mt=>Oe(j)(Mt,!1,!0)),onResetFlow:B,onOverlayClosed:q}),Ki({_:2},[zt(Oe(xe),(Mt,qt)=>({name:Mt,fn:Ct(Jt=>[Ft(ze.$slots,Mt,Wl(Kl(Jt)))])}))]),1040)):Ie("",!0)])],512),ze.showNowButton?(J(),oe("div",wue,[ze.$slots["now-button"]?Ft(ze.$slots,"now-button",{key:0,selectCurrentDate:Oe(ee)}):Ie("",!0),ze.$slots["now-button"]?Ie("",!0):(J(),oe("button",{key:1,type:"button",role:"button",class:"dp__now_button",onClick:kt[8]||(kt[8]=(...Mt)=>Oe(ee)&&Oe(ee)(...Mt))},De(ze.nowButtonLabel),1))])):Ie("",!0)],2),!ze.autoApply||ze.keepActionRow?(J(),_t(cf(ze.actionRowComponent?ze.actionRowComponent:jle),Lo({key:2},{calendarWidth:g.value,selectText:ze.selectText,cancelText:ze.cancelText,internalModelValue:e.internalModelValue,range:ze.range,previewFormat:ze.previewFormat,inline:ze.inline,monthPicker:ze.monthPicker,timePicker:ze.timePicker,customProps:ze.customProps,multiCalendars:e.multiCalendars,menuMount:v.value,maxTime:ze.maxTime,minTime:ze.minTime,enableTimePicker:ze.enableTimePicker,minDate:ze.minDate,maxDate:ze.maxDate,multiDates:ze.multiDates},{onClosePicker:kt[9]||(kt[9]=Mt=>ze.$emit("closePicker")),onSelectDate:kt[10]||(kt[10]=Mt=>ze.$emit("selectDate"))}),Ki({_:2},[zt(Oe(Pe),(Mt,qt)=>({name:Mt,fn:Ct(Jt=>[Ft(ze.$slots,Mt,Wl(Kl(En({},Jt))))])}))]),1040)):Ie("",!0)],42,Iue)]),_:3},8,["name","css"]))}});var pv=(e=>(e.center="center",e.left="left",e.right="right",e))(pv||{});const kue=(e,t,n,r,o,i,s)=>{const u=Ne({top:"0",left:"0",transform:"none"}),d=Ne(!1),f=10,g=390,v=A=>{const O=A.getBoundingClientRect();return{left:O.left+window.scrollX,top:O.top+window.scrollY}},_=A=>{const O=A.getBoundingClientRect();let H=0,q=0;for(;A&&!isNaN(A.offsetLeft)&&!isNaN(A.offsetTop);)H+=A.offsetLeft-A.scrollLeft,q=O.top+A.scrollTop,A=A.offsetParent;return{top:q,left:H}},M=(A,O)=>{u.value.left=`${A+O}px`,u.value.transform="translateX(-100%)"},I=A=>{u.value.left=`${A}px`,u.value.transform="translateX(0)"},k=(A,O)=>{e===pv.left&&I(A),e===pv.right&&M(A,O),e===pv.center&&(u.value.left=`${A+O/2}px`,u.value.transform="translateX(-50%)")},w=()=>{const A=Po(o);if(A){const O=window.innerHeight,{top:H}=t?_(A):v(A),{left:q,width:P,top:B,height:j}=A.getBoundingClientRect(),$=O-B-j;u.value.top=B>$?`${H-g}px`:`${H}px`,k(q,P)}},S=(A=!0)=>{if(!i){const O=Po(o);if(t&&typeof t!="boolean")u.value=t(O);else if(O){const{left:H,width:q,height:P}=O.getBoundingClientRect(),{top:B}=t?_(O):v(O);u.value.top=`${P+B+f}px`,k(H,q),A&&n&&L()}}},L=()=>{const A=Po(o);if(A&&n&&!i){const{height:O,top:H,left:q,width:P}=A.getBoundingClientRect(),{top:B}=t?_(A):v(A),j=window.innerHeight-H-O,$=Po(r);if($){const{height:R,left:T,right:x}=$.getBoundingClientRect(),Z=R+O;Z>H&&Z>j?Hj?(u.value.top=`${B-R-f}px`,d.value=!0):(S(!1),d.value=!1),T<0?I(q):x>document.documentElement.clientWidth&&M(q,P)}}s("recalculatePosition")};return{openOnTop:d,menuPosition:u,setMenuPosition:S,setInitialPosition:w,recalculatePosition:L}},Due=(e,t,n,r,o,i,s,u,d,f,g,v,_,M,I)=>{const k=Ne(""),w=Ne();Bt(w,()=>{I("internalModelChange",w.value)});const S=A=>{let O=null;A?t?Ule(A)&&"hours"in A[0]&&"minutes"in A[0]?O=[Vi(null,+A[0].hours,+A[0].minutes,+A[0].seconds),Vi(null,+A[1].hours,+A[1].minutes,+A[1].seconds)]:xle(A)&&(O=Vi(null,+A.hours,+A.minutes,+A.seconds)):n?Fle(A)&&"month"in A[0]&&"year"in A[0]?(O=[Wc(null,+A[0].month,+A[0].year)],A[1]?O[1]=Wc(null,+A[1].month,+A[1].year):!A[1]&&o&&(O[1]=null)):$le(A)&&"month"in A&&"year"in A&&(O=Wc(null,+A.month,+A.year)):_?O=vf(new Date,A):f&&Array.isArray(A)?O=A.map(H=>new Date(H)):v&&Array.isArray(A)?O=[new Date(A[0]),new Date(A[1])]:r?Gle(A,o)&&(O=[new Date(A[0]),A[1]?new Date(A[1]):null]):Hle(A)&&(O=new Date(A)):O=null,vI(O)?(w.value=O,L()):(w.value=null,k.value="")},L=()=>{if(!w.value)k.value="";else if(!e||typeof e=="string"){const A=e4(e,i,u,n,t,v,_,s);Array.isArray(w.value)&&f?k.value=w.value.map(O=>uy(O,A,d==null?void 0:d.value)).join("; "):k.value=uy(w.value,A,d==null?void 0:d.value,M==null?void 0:M.rangeSeparator)}else t?k.value=e(yI(w.value)):n?k.value=e(_D(w.value)):k.value=e(w.value)};return{parseExternalModelValue:S,formatInputValue:L,internalModelValue:w,inputValue:k,emitModelValue:()=>{if(n)I("update:modelValue",_D(w.value));else if(t)I("update:modelValue",yI(w.value));else if(v)I("update:modelValue",w.value);else if(_)I("update:modelValue",Vr(w.value));else{w.value&&r&&o&&w.value.length===1&&w.value.push(null);const A=g?Array.isArray(w.value)?w.value.map(O=>O&&Is(O)):Is(w.value):w.value;I("update:modelValue",A)}L()},checkBeforeEmit:()=>w.value?r?o?w.value.length>=1:w.value.length===2:!!w.value:!1}},Eue=typeof window<"u"?window:void 0,wb=()=>{},Aue=e=>iC()?(fL(e),!0):!1,Lue=(e,t,n,r)=>{if(!e)return wb;let o=wb;const i=Bt(()=>Oe(e),u=>{o(),u&&(u.addEventListener(t,n,r),o=()=>{u.removeEventListener(t,n,r),o=wb})},{immediate:!0,flush:"post"}),s=()=>{i(),o()};return Aue(s),s},Oue=(e,t,n,r={})=>{const{window:o=Eue,event:i="pointerdown"}=r;return o?Lue(o,i,s=>{const u=Po(e),d=Po(t);!u||!d||u===s.target||s.composedPath().includes(u)||s.composedPath().includes(d)||n(s)},{passive:!0}):void 0},Rue=it({props:En({},ble),emits:["update:modelValue","textSubmit","closed","cleared","open","focus","blur","internalModelChange","recalculatePosition","flow-step","focus-prev","updateMonthYear"],setup(e,{expose:t,emit:n}){const r=e,o=vg(),i=Ne(!1),s=Kn(r,"modelValue"),u=Ne(null),d=Ne(null),f=Ne(null),g=Ne(null);Ao(RT,r.autoApply);const v=qe(()=>r.formatLocale);Ao(o4,v),Ao(r4,Kn(r,"textInput")),Ao(Pu,Kn(r,"arrowNavigation")),Rn(()=>{H(r.modelValue),r.inline||(window.addEventListener("scroll",Y),window.addEventListener("resize",te)),r.inline&&(i.value=!0)}),_l(()=>{r.inline||(window.removeEventListener("scroll",Y),window.removeEventListener("resize",te))});const _=Mc(o,"all"),M=Mc(o,"input");Bt(s,()=>{H(s.value)},{deep:!0});const{openOnTop:I,menuPosition:k,setMenuPosition:w,recalculatePosition:S,setInitialPosition:L}=kue(r.position,r.altPosition,r.autoPosition,u,d,r.inline,n),{internalModelValue:A,inputValue:O,parseExternalModelValue:H,emitModelValue:q,checkBeforeEmit:P,formatInputValue:B}=Due(r.format,r.timePicker,r.monthPicker,r.range,r.partialRange,r.is24,r.enableTimePicker,r.enableSeconds,v,r.multiDates,r.utc,r.weekPicker,r.yearPicker,r.textInputOptions,n),{clearArrowNav:j}=xu(),{setMenuFocused:$,setShiftKey:R}=FT(),T=qe(()=>({dp__main:!0,dp__theme_dark:r.dark,dp__theme_light:!r.dark,dp__flex_display:r.inline,dp__flex_display_with_input:r.inlineWithInput})),x=qe(()=>CD(r.format)?r.format:e4(null,r.is24,r.enableSeconds,r.monthPicker,r.timePicker,r.weekPicker,r.yearPicker,r.enableTimePicker)),Z=qe(()=>r.previewFormat?r.previewFormat:CD(x.value)?x.value:r.format),K=qe(()=>typeof r.transitions=="boolean"?r.transitions?MD({}):!1:MD(r.transitions));Ao(f0,K);const re=qe(()=>r.dark?"dp__theme_dark":"dp__theme_light"),X=qe(()=>Object.assign(gle(),r.textInputOptions)),ie=qe(()=>_le(r.ariaLabels));Ao(Nu,ie);const he=qe(()=>mle(r.filters)),ae=qe(()=>{const le=ke=>{const Pe={hours:Hs(new Date),minutes:qs(new Date),seconds:eu(new Date)};return Object.assign(Pe,ke)};return r.range?r.startTime&&Array.isArray(r.startTime)?[le(r.startTime[0]),le(r.startTime[1])]:null:r.startTime&&!Array.isArray(r.startTime)?le(r.startTime):null}),de=qe(()=>r.multiCalendars===null?0:typeof r.multiCalendars=="boolean"?r.multiCalendars?2:0:+r.multiCalendars>=2?+r.multiCalendars:2),Y=()=>{i.value&&(r.closeOnScroll?pe():r.autoPosition?w():window.removeEventListener("scroll",Y))},te=()=>{i.value&&w()},fe=()=>{!r.disabled&&!r.readonly&&(L(),i.value=!0,wr().then(()=>{w(),i.value&&(n("open"),n("focus"))}),i.value||Ee(),H(r.modelValue))},Re=()=>{O.value="",Ee(),n("update:modelValue",null),n("cleared"),pe()},ve=()=>{const{validate:le}=n4(r.minDate,r.maxDate,r.disabledDates,r.allowedDates,he.value,r.disabledWeekDays,r.yearRange),ke=A.value;return!Array.isArray(ke)&&le(ke)?!0:Array.isArray(ke)?ke.length===2&&le(ke[0])&&le(ke[1])?!0:!!le(ke[0]):!1},be=()=>{P()&&ve()&&(q(),pe())},ue=le=>{q(),r.closeOnAutoApply&&!le&&pe()},ce=(le=!1)=>{r.autoApply&&(!r.enableTimePicker||r.monthPicker||r.yearPicker||_I(A.value,r.maxTime,r.minTime))&&ve()&&(r.range&&Array.isArray(A.value)?(r.partialRange||A.value.length===2)&&ue(le):ue(le))},Ee=()=>{A.value=null},pe=()=>{r.inline||(i.value&&(i.value=!1,$(!1),R(!1),j(),n("closed"),n("blur"),L(),O.value&&H(s.value)),Ee(),d.value&&d.value.unFocus(),se())},V=(le,ke)=>{if(!le){A.value=null;return}A.value=le,ke&&(be(),n("textSubmit"))},ee=()=>{r.autoApply&&_I(A.value,r.maxTime,r.minTime)&&q()},se=()=>{f.value&&f.value.focus({preventScroll:!0})},Ce=()=>i.value?pe():fe();return Oue(u,d,pe),t({closeMenu:pe,selectDate:be,clearValue:Re,openMenu:fe,onScroll:Y,formatInputValue:B}),(le,ke)=>(J(),oe("div",{class:lt(Oe(T))},[G("span",{tabindex:"-1",ref_key:"focusRefBefore",ref:g},null,512),It(wle,Lo({ref_key:"inputRef",ref:d},{placeholder:le.placeholder,hideInputIcon:le.hideInputIcon,readonly:le.readonly,disabled:le.disabled,inputClassName:le.inputClassName,clearable:le.clearable,state:le.state,inline:le.inline,inlineWithInput:le.inlineWithInput,textInput:le.textInput,textInputOptions:Oe(X),range:le.range,isMenuOpen:i.value,pattern:Oe(x),autoApply:le.autoApply,uid:le.uid,openMenuOnFocus:le.openMenuOnFocus,required:le.required,name:le.name,autocomplete:le.autocomplete},{"input-value":Oe(O),"onUpdate:input-value":ke[0]||(ke[0]=Pe=>br(O)?O.value=Pe:null),onClear:Re,onOpen:fe,onSetInputDate:V,onSetEmptyDate:Oe(q),onSelectDate:be,onToggle:Ce,onClose:pe,onFocusPrev:ke[1]||(ke[1]=Pe=>le.$emit("focus-prev"))}),Ki({_:2},[zt(Oe(M),(Pe,xe)=>({name:Pe,fn:Ct(He=>[Ft(le.$slots,Pe,Wl(Kl(He)))])}))]),1040,["input-value","onSetEmptyDate"]),G("span",{tabindex:"-1",ref_key:"focusRef",ref:f},null,512),i.value?(J(),_t(wC,{key:0,to:le.teleport,disabled:le.inline},[i.value?(J(),_t(Sue,Lo({key:0,ref_key:"dpMenuRef",ref:u,class:Oe(re),style:Oe(k)},{weekNumbers:le.weekNumbers,weekStart:le.weekStart,disableMonthYearSelect:le.disableMonthYearSelect,menuClassName:le.menuClassName,calendarClassName:le.calendarClassName,yearRange:le.yearRange,range:le.range,multiCalendars:Oe(de),multiCalendarsSolo:le.multiCalendarsSolo,multiStatic:le.multiStatic,calendarCellClassName:le.calendarCellClassName,enableTimePicker:le.enableTimePicker,is24:le.is24,hoursIncrement:le.hoursIncrement,minutesIncrement:le.minutesIncrement,hoursGridIncrement:le.hoursGridIncrement,minutesGridIncrement:le.minutesGridIncrement,minDate:le.minDate,maxDate:le.maxDate,autoApply:le.autoApply,selectText:le.selectText,cancelText:le.cancelText,previewFormat:Oe(Z),locale:le.locale,weekNumName:le.weekNumName,disabledDates:le.disabledDates,filters:Oe(he),minTime:le.minTime,maxTime:le.maxTime,inline:le.inline,openOnTop:Oe(I),monthPicker:le.monthPicker,timePicker:le.timePicker,monthNameFormat:le.monthNameFormat,startDate:le.startDate,startTime:Oe(ae),monthYearComponent:le.monthYearComponent,timePickerComponent:le.timePickerComponent,actionRowComponent:le.actionRowComponent,customProps:le.customProps,hideOffsetDates:le.hideOffsetDates,autoRange:le.autoRange,noToday:le.noToday,noHoursOverlay:le.noHoursOverlay,noMinutesOverlay:le.noMinutesOverlay,disabledWeekDays:le.disabledWeekDays,allowedDates:le.allowedDates,showNowButton:le.showNowButton,nowButtonLabel:le.nowButtonLabel,monthChangeOnScroll:le.monthChangeOnScroll,markers:le.markers,uid:le.uid,modeHeight:le.modeHeight,enableSeconds:le.enableSeconds,secondsIncrement:le.secondsIncrement,secondsGridIncrement:le.secondsGridIncrement,noSecondsOverlay:le.noSecondsOverlay,escClose:le.escClose,spaceConfirm:le.spaceConfirm,monthChangeOnArrows:le.monthChangeOnArrows,textInput:le.textInput,disabled:le.disabled,readonly:le.readonly,multiDates:le.multiDates,presetRanges:le.presetRanges,flow:le.flow,preventMinMaxNavigation:le.preventMinMaxNavigation,minRange:le.minRange,maxRange:le.maxRange,fixedStart:le.fixedStart,fixedEnd:le.fixedEnd,multiDatesLimit:le.multiDatesLimit,reverseYears:le.reverseYears,keepActionRow:le.keepActionRow,weekPicker:le.weekPicker,noSwipe:le.noSwipe,vertical:le.vertical,arrowNavigation:le.arrowNavigation,yearPicker:le.yearPicker},{internalModelValue:Oe(A),"onUpdate:internalModelValue":ke[2]||(ke[2]=Pe=>br(A)?A.value=Pe:null),onClosePicker:pe,onSelectDate:be,onDpOpen:Oe(S),onAutoApply:ce,onTimeUpdate:ee,onFlowStep:ke[3]||(ke[3]=Pe=>le.$emit("flow-step",Pe)),onUpdateMonthYear:ke[4]||(ke[4]=Pe=>le.$emit("updateMonthYear",Pe))}),Ki({_:2},[zt(Oe(_),(Pe,xe)=>({name:Pe,fn:Ct(He=>[Ft(le.$slots,Pe,Wl(Kl(En({},He))))])}))]),1040,["class","style","internalModelValue","onDpOpen"])):Ie("",!0)],8,["to","disabled"])):Ie("",!0)],2))}});var $T=(()=>{const e=Rue;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),Nue=Object.freeze(Object.defineProperty({__proto__:null,default:$T},Symbol.toStringTag,{value:"Module"}));Object.entries(Nue).forEach(([e,t])=>{e!=="default"&&($T[e]=t)});const hv=it({props:{userInfo:{type:Object,default:()=>({})},isH5:{type:Boolean,default:()=>!1}},components:{Datepicker:$T},setup(e,t){const n=hv==null?void 0:hv.TUIServer,r=Wt({profile:{},isEdit:!1,avatarList:[{name:"avatar_01",avatar:" https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_1.png"},{name:"avatar_02",avatar:" https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_2.png"},{name:"avatar_03",avatar:" https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_3.png"},{name:"avatar_04",avatar:" https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_4.png"},{name:"avatar_05",avatar:" https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_5.png"},{name:"avatar_06",avatar:" https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_6.png"}],type:[{label:"男",type:n.TUICore.TIM.TYPES.GENDER_MALE},{label:"女",type:n.TUICore.TIM.TYPES.GENDER_FEMALE}],genderLabel:{[n.TUICore.TIM.TYPES.GENDER_MALE]:"男",[n.TUICore.TIM.TYPES.GENDER_FEMALE]:"女",[n.TUICore.TIM.TYPES.GENDER_UNKNOWN]:"不显示"},setName:"",editConfig:{title:"",list:[],type:"",subText:"",placeholder:"",value:""}}),o=k=>{const w=k.getDate()>9?k.getDate():`0${k.getDate()}`,S=k.getMonth()>8?k.getMonth()+1:`0${k.getMonth()+1}`;return`${k.getFullYear()}${S}${w}`};nn(()=>{r.profile=JSON.parse(JSON.stringify(e.userInfo))});const i=qe(()=>{let k=r.profile.birthday;return r.setName==="birthday"&&e.isH5&&(k=r.editConfig.value),s(k)}),s=k=>{const w=`${k}`;if(w.length===8){const S=w.slice(0,4),L=w.slice(4,6),A=w.slice(-2);return`${S}-${L}-${A}`}return""},u=k=>{r.profile.gender=k.type},d=k=>{r.profile.avatar=k.avatar},f=k=>{e.isH5?r.editConfig.value=k?Number(o(k)):0:r.profile.birthday=k?Number(o(k)):0},g=()=>{e.isH5&&(r.profile[r.setName]=r.editConfig.value,I()),t.emit("submit",r.profile)},v=()=>{t.emit("cancel",r.profile)},_=k=>{switch(r.editConfig.value=`${r.profile[k]}`,r.setName=k,k){case"avatar":r.editConfig.title="选择头像",r.editConfig.list=r.avatarList,r.editConfig.type="select";break;case"nick":r.editConfig.title="设置昵称",r.editConfig.subText="仅限中文、字母、数字和下划线,2-20个字",r.editConfig.placeholder="请输入昵称",r.editConfig.type="text";break;case"gender":r.editConfig.title="性别选择",r.editConfig.list=r.type,r.editConfig.type="select";break;case"selfSignature":r.editConfig.title="个性签名",r.editConfig.type="textarea",r.editConfig.placeholder="请输入内容";break;case"birthday":r.editConfig.title="出生年月",r.editConfig.type="date",r.editConfig.placeholder="请选择出生日期";break}},M=k=>{r.editConfig.value=(k==null?void 0:k.avatar)||(k==null?void 0:k.type)},I=()=>{r.setName="",r.editConfig={title:"",list:[],type:"",subText:"",placeholder:"",value:""}};return{...Yt(r),showChooseGender:u,chooseAvatar:d,showBirthday:f,birthday:i,submit:g,cancel:v,setProfile:_,choose:M,closeMask:I,format:o}}});const Pue={class:"edit-header"},xue={class:"edit-header-title"},Uue={class:"edit-list"},Fue={class:"edit-list-item space-top"},$ue={key:0},Gue=["src"],Bue={key:1,class:"avatar-list"},Hue=["onClick"],que=["src"],Vue={key:0,class:"icon icon-right"},zue={class:"edit-list-item space-top"},jue={key:0},Wue={key:0,class:"icon icon-right"},Kue={class:"edit-list-item"},Yue={class:"edit-list-item-content"},Jue={class:"edit-list-item space-top"},Xue={key:0},Zue={key:0,class:"icon icon-right"},Que={class:"edit-list-item"},ece={key:0},tce={key:1,class:"gender-list"},nce=["onClick"],rce={class:"name"},oce={key:0,class:"icon icon-right"},ice={class:"edit-list-item"},sce={key:0},ace={key:0,class:"icon icon-right"},lce={key:0,class:"edit-footer"},uce={class:"mask-main"},cce={class:"edit-h5-header"},dce={class:"edit-h5-main"},fce={key:0,class:"list"},pce=["onClick"],hce=["src"],gce={key:1,class:"input"},mce=["placeholder"],vce=["type","placeholder"],yce={key:2},_ce={class:"edit-h5-footer"},bce=["disabled"];function Mce(e,t,n,r,o,i){const s=xt("Datepicker");return J(),oe("div",{class:lt(["edit",[e.isH5?"edit-h5":""]])},[G("header",Pue,[e.isH5?(J(),oe("i",{key:0,class:"icon icon-back",onClick:t[0]||(t[0]=(...u)=>e.cancel&&e.cancel(...u))})):Ie("",!0),G("h1",xue,De(e.$t("TUIProfile.资料设置")),1)]),G("ul",Uue,[G("li",Fue,[G("main",{class:"edit-list-item-content",onClick:t[1]||(t[1]=u=>e.setProfile("avatar"))},[G("label",null,De(e.$t("TUIProfile.头像")),1),e.isH5?(J(),oe("span",$ue,[G("img",{src:e.profile.avatar?e.profile.avatar:"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,Gue)])):(J(),oe("ul",Bue,[(J(!0),oe(ft,null,zt(e.avatarList,(u,d)=>(J(),oe("li",{class:"avatar-list-item",key:d,onClick:f=>e.chooseAvatar(u)},[G("img",{class:lt([e.profile.avatar===u.avatar&&"selected"]),src:u.avatar},null,10,que)],8,Hue))),128))]))]),e.isH5?(J(),oe("i",Vue)):Ie("",!0)]),G("li",zue,[G("main",{class:"edit-list-item-content",onClick:t[3]||(t[3]=u=>e.setProfile("nick"))},[G("label",null,De(e.$t("TUIProfile.昵称")),1),e.isH5?(J(),oe("span",jue,De(e.profile.nick),1)):Bn((J(),oe("input",{key:1,type:"text","onUpdate:modelValue":t[2]||(t[2]=u=>e.profile.nick=u)},null,512)),[[pl,e.profile.nick]])]),e.isH5?(J(),oe("i",Wue)):Ie("",!0)]),G("li",Kue,[G("main",Yue,[G("label",null,De(e.$t("TUIProfile.账号")),1),G("span",null,De(e.profile.userID),1)])]),G("li",Jue,[G("main",{class:"edit-list-item-content",onClick:t[5]||(t[5]=u=>e.setProfile("selfSignature"))},[G("label",null,De(e.$t("TUIProfile.个性签名")),1),e.isH5?(J(),oe("span",Xue,De(e.profile.selfSignature),1)):Bn((J(),oe("input",{key:1,type:"text","onUpdate:modelValue":t[4]||(t[4]=u=>e.profile.selfSignature=u)},null,512)),[[pl,e.profile.selfSignature]])]),e.isH5?(J(),oe("i",Zue)):Ie("",!0)]),G("li",Que,[G("main",{class:"edit-list-item-content",onClick:t[6]||(t[6]=u=>e.setProfile("gender"))},[G("label",null,De(e.$t("TUIProfile.性别")),1),e.isH5?(J(),oe("span",ece,De(e.profile.gender?e.$t(`TUIProfile.${e.genderLabel[e.profile.gender]}`):""),1)):(J(),oe("ul",tce,[(J(!0),oe(ft,null,zt(e.type,(u,d)=>(J(),oe("li",{class:"gender-list-item",key:d,onClick:f=>e.showChooseGender(u)},[G("i",{class:lt(["gender",[e.profile.gender===u.type&&"gender-selected"]])},null,2),G("p",rce,De(e.$t(`TUIProfile.${u.label}`)),1)],8,nce))),128))]))]),e.isH5?(J(),oe("i",oce)):Ie("",!0)]),G("li",ice,[G("main",{class:"edit-list-item-content",onClick:t[7]||(t[7]=u=>e.setProfile("birthday"))},[G("label",null,De(e.$t("TUIProfile.出生年月")),1),e.isH5?(J(),oe("span",sce,De(e.profile.birthday),1)):(J(),_t(s,{key:1,placeholder:e.$t("TUIProfile.请选择出生日期"),enableTimePicker:!1,format:e.format,previewFormat:e.format,modelValue:e.birthday,"onUpdate:modelValue":e.showBirthday},null,8,["placeholder","format","previewFormat","modelValue","onUpdate:modelValue"]))]),e.isH5?(J(),oe("i",ace)):Ie("",!0)])]),e.isH5?Ie("",!0):(J(),oe("footer",lce,[G("button",{class:"btn-default",onClick:t[8]||(t[8]=(...u)=>e.cancel&&e.cancel(...u))},De(e.$t("TUIProfile.取消")),1),G("button",{class:"btn-submit",onClick:t[9]||(t[9]=(...u)=>e.submit&&e.submit(...u))},De(e.$t("TUIProfile.保存")),1)])),e.setName&&e.isH5?(J(),oe("div",{key:1,class:"mask",onClick:t[14]||(t[14]=Mn((...u)=>e.closeMask&&e.closeMask(...u),["self"]))},[G("div",uce,[G("header",cce,[G("h1",null,De(e.$t(`TUIProfile.${e.editConfig.title}`)),1),G("span",{class:"close",onClick:t[10]||(t[10]=(...u)=>e.closeMask&&e.closeMask(...u))},De(e.$t("关闭")),1)]),G("main",dce,[e.editConfig.type==="select"?(J(),oe("ul",fce,[(J(!0),oe(ft,null,zt(e.editConfig.list,(u,d)=>(J(),oe("li",{class:"list-item",key:d,onClick:f=>e.choose(u)},[u!=null&&u.avatar?(J(),oe("img",{key:0,class:lt([e.editConfig.value===u.avatar&&"selected"]),src:u.avatar},null,10,hce)):(J(),oe("span",{key:1,class:lt([e.editConfig.value===u.type&&"selected"])},De(e.$t(`TUIProfile.${u.label}`)),3))],8,pce))),128))])):(J(),oe("div",gce,[e.editConfig.type==="textarea"?Bn((J(),oe("textarea",{key:0,placeholder:e.editConfig.placeholder,"onUpdate:modelValue":t[11]||(t[11]=u=>e.editConfig.value=u)},null,8,mce)),[[pl,e.editConfig.value]]):e.editConfig.type==="date"?(J(),_t(s,{key:1,class:"datePicker",placeholder:e.$t("TUIProfile.请选择出生日期"),enableTimePicker:!1,format:e.format,previewFormat:e.format,modelValue:e.birthday,"onUpdate:modelValue":e.showBirthday},null,8,["placeholder","format","previewFormat","modelValue","onUpdate:modelValue"])):Bn((J(),oe("input",{key:2,type:e.editConfig.type,placeholder:e.$t(`TUIProfile.${e.editConfig.placeholder}`),"onUpdate:modelValue":t[12]||(t[12]=u=>e.editConfig.value=u)},null,8,vce)),[[V7,e.editConfig.value]])])),e.editConfig.subText?(J(),oe("sub",yce,De(e.$t(`TUIProfile.${e.editConfig.subText}`)),1)):Ie("",!0)]),G("footer",_ce,[G("button",{class:"btn btn-submit",disabled:!e.editConfig.value,onClick:t[13]||(t[13]=(...u)=>e.submit&&e.submit(...u))},De(e.$t("确定")),9,bce)])])])):Ie("",!0)],2)}const kD=Kt(hv,[["render",Mce],["__scopeId","data-v-9a583a56"]]),gv=it({name:"TUIProfile",components:{TUIProfileEdit:kD},setup(e,t){var f;const n=gv==null?void 0:gv.TUIServer,r=Wt({profile:{},isEdit:!1,genderLabel:{[n.TUICore.TIM.TYPES.GENDER_MALE]:"男",[n.TUICore.TIM.TYPES.GENDER_FEMALE]:"女",[n.TUICore.TIM.TYPES.GENDER_UNKNOWN]:"不显示"},env:n.TUICore.TUIEnv});kD.TUIServer=n,n.bind(r);const o=((f=window==null?void 0:window.TUIKitTUICore)==null?void 0:f.isOfficial)&&Ai&&Ai()||{},i=async g=>{var _;const v={nick:g.nick,avatar:g.avatar,gender:g.gender||n.TUICore.TIM.TYPES.GENDER_UNKNOWN,selfSignature:g.selfSignature,birthday:g.birthday};n.TUICore.getStore().TUIProfile.profile.nick!==g.nick&&(_=window==null?void 0:window.TUIKitTUICore)!=null&&_.isOfficial&&o!=null&&o.commit&&(o==null||o.commit("handleTask",2));try{await n.updateMyProfile(v)}catch(M){console.log(M)}r.env.isH5||s()},s=()=>{r.env.isH5?r.isEdit=!1:u()},u=()=>{t.emit("changeStatus")},d=()=>{r.env.isH5&&(r.isEdit=!0)};return{...Yt(r),submit:i,cancel:s,changeStatus:u,toggleEdit:d}}});const Ice={class:"profile-header"},Cce={class:"profile-avatar"},Tce=["src"],wce={class:"profile-main"},Sce={class:"profile-main-item"},kce={class:"profile-main-name"},Dce={key:0,class:"gender"},Ece={class:"profile-main-item"},Ace={class:"profile-main-label"},Lce={key:0,class:"profile-main-item"},Oce={class:"profile-main-label"},Rce={key:0,class:"profile-main"},Nce={class:"profile-main-item"},Pce={class:"profile-main-label"},xce={class:"profile-main-item"},Uce={class:"profile-main-label"},Fce={key:1,class:"icon icon-right"};function $ce(e,t,n,r,o,i){const s=xt("TUIProfileEdit");return J(),oe("div",{class:lt(["TUI-profile",[e.env.isH5?"TUI-profile-h5":""]])},[e.isEdit?(J(),_t(s,{key:1,userInfo:e.profile,isH5:e.env.isH5,onSubmit:e.submit,onCancel:e.cancel},null,8,["userInfo","isH5","onSubmit","onCancel"])):(J(),oe("div",{key:0,class:"profile",onClick:t[0]||(t[0]=(...u)=>e.toggleEdit&&e.toggleEdit(...u))},[G("header",Ice,[G("aside",Cce,[G("img",{class:"avatar",src:e.profile.avatar?e.profile.avatar:"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,Tce)]),G("ul",wce,[G("li",Sce,[G("h1",kce,De(e.profile.nick||"-"),1),e.env.isH5?Ie("",!0):(J(),oe("p",Dce,De(e.profile.gender?e.$t(`TUIProfile.${e.genderLabel[e.profile.gender]}`):""),1))]),G("li",Ece,[G("label",Ace,De(e.$t("TUIProfile.用户ID"))+":",1),G("span",null,De(e.profile.userID),1)]),e.env.isH5?(J(),oe("li",Lce,[G("label",Oce,De(e.$t("TUIProfile.个性签名"))+":",1),G("span",null,De(e.profile.selfSignature||e.$t("TUIProfile.暂未设置")),1)])):Ie("",!0)])]),e.env.isH5?Ie("",!0):(J(),oe("ul",Rce,[G("li",Nce,[G("label",Pce,De(e.$t("TUIProfile.个性签名")),1),G("span",null,De(e.profile.selfSignature||e.$t("TUIProfile.暂未设置")),1)]),G("li",xce,[G("label",Uce,De(e.$t("TUIProfile.出生年月")),1),G("span",null,De(e.profile.birthday?e.profile.birthday:e.$t("TUIProfile.暂未设置")),1)])])),e.env.isH5?(J(),oe("i",Fce)):Ie("",!0)]))],2)}const bI=Kt(gv,[["render",$ce],["__scopeId","data-v-37ed72e3"]]),Gce=e=>{bI.TUIServer=tu.server,e.component(tu.name,bI)},Bce=e=>(tu.server=new AN(e),e.component(tu.name,tu),tu),tu={name:"TUIProfile",component:bI,server:AN,install:Gce,plugin:Bce},Hce={};class g4 extends ld{constructor(n){super();Xt(this,"TUICore");Xt(this,"store");Xt(this,"currentStore",{});Xt(this,"storeCallback");this.TUICore=n,this.bindTIMEvent(),this.store=n.setComponentStore("TUIGroup",Hce,this.updateStore.bind(this))}destroyed(){this.unbindTIMEvent()}updateStore(n,r){this.currentStore.groupList=n.groupList,this.currentStore.searchGroup=n.searchGroup}bindTIMEvent(){this.TUICore.tim.on(this.TUICore.TIM.EVENT.GROUP_LIST_UPDATED,this.handleGroupListUpdated,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.GROUP_ATTRIBUTES_UPDATED,this.handleGroupAttributesUpdated,this)}unbindTIMEvent(){this.TUICore.tim.off(this.TUICore.TIM.EVENT.GROUP_LIST_UPDATED,this.handleGroupListUpdated),this.TUICore.tim.off(this.TUICore.TIM.EVENT.GROUP_ATTRIBUTES_UPDATED,this.handleGroupAttributesUpdated)}handleGroupListUpdated(n){this.store.groupList=n.data}handleGroupAttributesUpdated(n){const{groupID:r,groupAttributes:o}=n.data;console.log(r,o)}handlePromiseCallback(n){return new Promise((r,o)=>{const i={TUIName:"TUIGroup",callback:()=>{n&&n(r,o)}};this.TUICore.setAwaitFunc(i.TUIName,i.callback)})}async getGroupList(n){return this.handlePromiseCallback(async(r,o)=>{try{let i={};n?i=await this.TUICore.tim.getGroupList(n):i=await this.TUICore.tim.getGroupList(),this.store.groupList=i.data.groupList,r(i)}catch(i){o(i)}})}getGroupProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getGroupProfile(n);this.store.groupList=i.data.groupList,r(i)}catch(i){o(i)}})}createGroup(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.createGroup(n);r(i)}catch(i){o(i)}})}dismissGroup(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.dismissGroup(n);this.store.groupProfile=i.data.group,r(i)}catch(i){o(i)}})}updateGroupProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.updateGroupProfile(n);this.store.groupProfile=i.data.group,r(i)}catch(i){o(i)}})}joinGroup(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.joinGroup(n);r(i)}catch(i){o(i)}})}quitGroup(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.quitGroup(n);r(i)}catch(i){o(i)}})}searchGroupByID(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.searchGroupByID(n);this.store.searchGroup=i.data.group,r(i)}catch(i){o(i)}})}getGroupOnlineMemberCount(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getGroupOnlineMemberCount(n);r(i)}catch(i){o(i)}})}changeGroupOwner(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.changeGroupOwner(n);r(i)}catch(i){o(i)}})}handleGroupApplication(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.handleGroupApplication(n);r(i)}catch(i){o(i)}})}initGroupAttributes(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.initGroupAttributes(n);r(i)}catch(i){o(i)}})}setGroupAttributes(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.setGroupAttributes(n);r(i)}catch(i){o(i)}})}deleteGroupAttributes(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.deleteGroupAttributes(n);r(i)}catch(i){o(i)}})}getGroupAttributes(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getGroupAttributes(n);r(i)}catch(i){o(i)}})}getGroupMemberList(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getGroupMemberList(n);r(i)}catch(i){o(i)}})}addGroupMember(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.addGroupMember(n);r(i)}catch(i){o(i)}})}deleteGroupMember(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.deleteGroupMember(n);r(i)}catch(i){o(i)}})}setGroupMemberMuteTime(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.setGroupMemberMuteTime(n);r(i)}catch(i){o(i)}})}setGroupMemberRole(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.setGroupMemberRole(n);r(i)}catch(i){o(i)}})}setGroupMemberNameCard(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.setGroupMemberNameCard(n);r(i)}catch(i){o(i)}})}getGroupMemberProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getGroupMemberProfile(n);r(i)}catch(i){o(i)}})}async bind(n){return this.currentStore=n,await this.getGroupList(),this.currentStore}}const m4=it({name:"TUIGroup",components:{DialogTUI:Zy},props:{displayOnlineStatus:{type:Boolean,default:!1}},setup(e){const t=m4.TUIServer,n=Wt({loading:!0,page:1,rows:100,keyword:"",finshed:!1,groupList:[],searchGroup:[],searchID:"",currentGroup:null,netWork:"",userStatusList:new Map,dialogShow:!1,dialogItem:{}}),r=_=>_>0?Mg(_*1e3):"",o=async _=>{var M;try{if((M=(await H5({id:_.groupId})).data)!=null&&M.id){const k=`GROUP${_.groupId}`;t.TUICore.TUIServer.TUIConversation.getConversationProfile(k).then(w=>{t.TUICore.TUIServer.TUIConversation.handleCurrentConversation(w.data.conversation),n.currentGroup={}})}else n.dialogShow=!0,n.dialogItem=_}catch{}},i=()=>{const _=n.groupList.findIndex(M=>M.groupId==n.dialogItem.groupId);n.groupList.splice(_,1)},s=qe(()=>!0),u=async()=>{n.loading=!0;try{const _=await AV({keyword:n.keyword,page:n.page,rows:n.rows,roleType:"TEACHER"});n.groupList.push(..._.data.rows||[]),n.finshed=_.data.pages<=_.data.current}catch{}n.loading=!1},d=_=>{const M=n.groupList.findIndex(I=>I.groupId==_);n.groupList.splice(M,1)};Rn(()=>{u(),du.on("removeGroup",_=>{d(_)})}),_l(()=>{du.off("removeGroup",d)});const f=_=>{console.log(_,"val"),n.page=1,n.keyword=_,n.groupList=[],u()},g=Yy(_=>{f(_)},500),v=_=>{_.stopPropagation(),_.code==="Enter"&&g(n.keyword)};return{...Yt(n),handleListItem:o,handleManage:i,isNetwork:s,handleAvatar:NC,handleName:Jh,handleAt:PO,handleItemTime:r,noSearch:f,onKeyup:v,debouncedRequest:g}}});const Zf=e=>(pr("data-v-dd49d023"),e=e(),hr(),e),qce={style:{height:"100%"}},Vce={class:"sectionSearch"},zce=Zf(()=>G("span",{class:"icon-search-input"},null,-1)),jce={class:"TUI-group"},Wce={class:"TUI-conversation-list"},Kce={class:"TUI-contact-left"},Yce={class:"TUI-contact-list"},Jce=["onClick"],Xce={class:"left"},Zce=["src"],Qce={class:"content-header"},ede={class:"name"},tde={class:"middle-box"},nde={class:"content-footer"},rde=Zf(()=>G("span",{class:"time"},null,-1)),ode={key:0,class:"mute-icon",src:EN},ide=Zf(()=>G("i",null,null,-1)),sde={key:0,class:"theEmtpy",style:{height:"90%"}},ade=Zf(()=>G("img",{class:"emptyImg",src:dd},null,-1)),lde=Zf(()=>G("p",null,"暂无数据",-1)),ude=[ade,lde],cde=Zf(()=>G("p",null,"该群已解散,是否删除?",-1));function dde(e,t,n,r,o,i){const s=xt("n-input"),u=xt("DialogTUI");return J(),oe("div",qce,[G("div",Vce,[It(s,{class:"TheSearch",style:{"--n-font-size":"12px","--n-height":"32px","--n-caret-color":"#198cfe","--n-border-hover":"1px solid #198cfe","--n-border-focus":"1px solid #198cfe","--n-loading-color":"#198cfe","--n-box-shadow-focus":"0 0 0 2px rgba(25 140 254, 0.2)"},round:"",clearable:"",placeholder:"请输入名称",value:e.keyword,"onUpdate:value":t[0]||(t[0]=d=>e.keyword=d),onClear:t[1]||(t[1]=()=>{e.debouncedRequest("")}),onKeyup:e.onKeyup},{prefix:Ct(()=>[zce]),_:1},8,["value","onKeyup"])]),G("div",jce,[G("main",Wce,[G("aside",Kce,[G("ul",Yce,[(J(!0),oe(ft,null,zt(e.groupList,(d,f)=>{var g;return J(),oe("li",{class:"TUI-contact-list-item",key:f,onClick:v=>e.handleListItem(d)},[G("aside",Xce,[G("img",{class:"avatar",src:d.img||"https://oss.dayaedu.com/news-info/07/1690775328089.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690775328089.png'"},null,8,Zce)]),G("div",Qce,[G("label",null,[G("p",ede,De(d.name),1)]),G("div",tde,[G("p",null,"共"+De(d.memberNum||0)+"人",1)])]),G("div",nde,[rde,((g=d.selfInfo)==null?void 0:g.messageRemindType)==="AcceptNotNotify"?(J(),oe("img",ode)):Ie("",!0),ide])],8,Jce)}),128))])])]),!e.loading&&e.groupList.length<=0?(J(),oe("div",sde,ude)):Ie("",!0),It(u,{show:e.dialogShow,isHeaderShow:!0,title:"提示","is-footer-show":!0,onSubmit:t[2]||(t[2]=d=>e.handleManage()),"onUpdate:show":t[3]||(t[3]=d=>e.dialogShow=d)},{default:Ct(()=>[cde]),_:1},8,["show"])])])}const MI=Kt(m4,[["render",dde],["__scopeId","data-v-dd49d023"]]),fde=e=>{MI.TUIServer=nu.server,e.component(nu.name,MI)},pde=e=>(nu.server=new g4(e),e.component(nu.name,nu),nu),nu={name:"TUIGroup",component:MI,server:g4,install:fde,plugin:pde},hde={};class v4 extends ld{constructor(n){super();Xt(this,"TUICore");Xt(this,"store");Xt(this,"currentStore",{});Xt(this,"storeCallback");this.TUICore=n,this.bindTIMEvent(),this.store=n.setComponentStore("TUIPerson",hde,this.updateStore.bind(this))}destroyed(){this.unbindTIMEvent()}updateStore(n,r){this.currentStore.groupList=n.groupList,this.currentStore.searchGroup=n.searchGroup}bindTIMEvent(){this.TUICore.tim.on(this.TUICore.TIM.EVENT.GROUP_LIST_UPDATED,this.handleGroupListUpdated,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.GROUP_ATTRIBUTES_UPDATED,this.handleGroupAttributesUpdated,this)}unbindTIMEvent(){this.TUICore.tim.off(this.TUICore.TIM.EVENT.GROUP_LIST_UPDATED,this.handleGroupListUpdated),this.TUICore.tim.off(this.TUICore.TIM.EVENT.GROUP_ATTRIBUTES_UPDATED,this.handleGroupAttributesUpdated)}handleGroupListUpdated(n){this.store.groupList=n.data}handleGroupAttributesUpdated(n){const{groupID:r,groupAttributes:o}=n.data;console.log(r,o)}handlePromiseCallback(n){return new Promise((r,o)=>{const i={TUIName:"TUIGroup",callback:()=>{n&&n(r,o)}};this.TUICore.setAwaitFunc(i.TUIName,i.callback)})}async getFriendList(){return this.handlePromiseCallback(async(n,r)=>{try{const o=await this.TUICore.tim.getFriendList();this.currentStore.friendList=o.data,this.currentStore.userIDList=this.currentStore.friendList.map(i=>i.userID)||[],n(o)}catch(o){r(o)}})}async bind(n,r){return this.currentStore=n,await this.getFriendList(),r&&r(this.currentStore),this.currentStore}}const y4=it({name:"TUIPerson",setup(e){const t=y4.TUIServer,n=Wt({loading:!0,page:1,rows:100,keyword:"",finshed:!1,friendList:[],searchGroup:[],searchID:"",currentGroup:null}),r=async()=>{n.loading=!0;try{const d=await F5({keyword:n.keyword,page:n.page,rows:n.rows,roleType:"TEACHER"});n.friendList.push(...d.data.rows||[]),n.finshed=d.data.pages<=d.data.current}catch{}n.loading=!1},o=async d=>{const f=`C2C${d.imUserId}`;t.TUICore.TUIServer.TUIConversation.getConversationProfile(f).then(g=>{t.TUICore.TUIServer.TUIConversation.handleCurrentConversation(g.data.conversation),n.currentGroup={}})},i=d=>{n.page=1,n.keyword=d,n.friendList=[],r()};Rn(()=>{r()});const s=Yy(d=>{i(d)},500),u=d=>{d.stopPropagation(),d.code==="Enter"&&s(n.keyword)};return{...Yt(n),handleListItem:o,noSearch:i,onKeyup:u,debouncedRequest:s}}});const GT=e=>(pr("data-v-6beb8d2d"),e=e(),hr(),e),gde={style:{height:"100%"}},mde={class:"sectionSearch"},vde=GT(()=>G("span",{class:"icon-search-input"},null,-1)),yde={class:"TUI-person"},_de={class:"TUI-conversation-list"},bde={class:"TUI-contact-left"},Mde={class:"TUI-contact-list"},Ide=["onClick"],Cde={class:"left"},Tde=["src"],wde={class:"content-header"},Sde={class:"name"},kde={class:"middle-box"},Dde={key:0,class:"theEmtpy",style:{height:"90%"}},Ede=GT(()=>G("img",{class:"emptyImg",src:dd},null,-1)),Ade=GT(()=>G("p",null,"暂无数据",-1)),Lde=[Ede,Ade];function Ode(e,t,n,r,o,i){const s=xt("n-input");return J(),oe("div",gde,[G("div",mde,[It(s,{class:"TheSearch",style:{"--n-font-size":"12px","--n-height":"32px","--n-caret-color":"#198cfe","--n-border-hover":"1px solid #198cfe","--n-border-focus":"1px solid #198cfe","--n-loading-color":"#198cfe","--n-box-shadow-focus":"0 0 0 2px rgba(25 140 254, 0.2)"},round:"",clearable:"",placeholder:"请输入名称",value:e.keyword,"onUpdate:value":t[0]||(t[0]=u=>e.keyword=u),onClear:t[1]||(t[1]=()=>{e.debouncedRequest("")}),onKeyup:e.onKeyup},{prefix:Ct(()=>[vde]),_:1},8,["value","onKeyup"])]),G("div",yde,[G("main",_de,[G("aside",bde,[G("ul",Mde,[(J(!0),oe(ft,null,zt(e.friendList,(u,d)=>(J(),oe("li",{class:"TUI-contact-list-item",key:d,onClick:f=>e.handleListItem(u)},[G("aside",Cde,[G("img",{class:"avatar",src:u.friendAvatar||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,Tde)]),G("div",wde,[G("label",null,[G("p",Sde,De(u.friendNickname),1)]),G("div",kde,[G("p",null,De(u.subjectName),1)])])],8,Ide))),128))])])]),!e.loading&&e.friendList.length<=0?(J(),oe("div",Dde,Lde)):Ie("",!0)])])}const II=Kt(y4,[["render",Ode],["__scopeId","data-v-6beb8d2d"]]),Rde=e=>{II.TUIServer=ru.server,e.component(ru.name,II)},Nde=e=>(ru.server=new v4(e),e.component(ru.name,ru),ru),ru={name:"TUIPerson",component:II,server:v4,install:Rde,plugin:Nde},Pde={};class _4 extends ld{constructor(n){super();Xt(this,"TUICore");Xt(this,"store");Xt(this,"currentStore",{});Xt(this,"storeCallback");this.TUICore=n,this.bindTIMEvent(),this.store=n.setComponentStore("TUIContact",Pde,this.updateStore.bind(this))}destroyed(){this.unbindTIMEvent()}updateStore(n,r){this.currentStore.groupList=n.groupList,this.currentStore.searchGroup=n.searchGroup,this.currentStore.systemConversation=n.systemConversation,this.currentStore.systemMessageList=n.systemMessageList}bindTIMEvent(){this.TUICore.tim.on(this.TUICore.TIM.EVENT.GROUP_LIST_UPDATED,this.handleGroupListUpdated,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.GROUP_ATTRIBUTES_UPDATED,this.handleGroupAttributesUpdated,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.CONVERSATION_LIST_UPDATED,this.handleConversationListUpdate,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.FRIEND_LIST_UPDATED,this.handleFriendListUpdated,this),this.TUICore.tim.on(this.TUICore.TIM.EVENT.USER_STATUS_UPDATED,this.handleUserStatusUpdated,this)}unbindTIMEvent(){this.TUICore.tim.off(this.TUICore.TIM.EVENT.GROUP_LIST_UPDATED,this.handleGroupListUpdated),this.TUICore.tim.off(this.TUICore.TIM.EVENT.GROUP_ATTRIBUTES_UPDATED,this.handleGroupAttributesUpdated),this.TUICore.tim.off(this.TUICore.TIM.EVENT.CONVERSATION_LIST_UPDATED,this.handleConversationListUpdate),this.TUICore.tim.off(this.TUICore.TIM.EVENT.FRIEND_LIST_UPDATED,this.handleFriendListUpdated),this.TUICore.tim.off(this.TUICore.TIM.EVENT.USER_STATUS_UPDATED,this.handleUserStatusUpdated)}handleGroupListUpdated(n){this.store.groupList=n.data}handleGroupAttributesUpdated(n){const{groupID:r,groupAttributes:o}=n.data;console.log(r,o)}handleConversationListUpdate(n){this.handleFilterSystem(n.data)}handleFriendListUpdated(n){this.currentStore.friendList=n.data,this.currentStore.userIDList=this.currentStore.friendList.map(r=>r.userID)}handleUserStatusUpdated(n){n.data.forEach(o=>{var d,f,g,v,_,M,I;const{userID:i,statusType:s,customStatus:u}=o;(f=(d=this.currentStore)==null?void 0:d.userStatusList)==null||f.set(i,{statusType:s,customStatus:u}),(I=(M=(_=(v=(g=this.TUICore)==null?void 0:g.TUIServer)==null?void 0:v.TUIConversation)==null?void 0:_.currentStore)==null?void 0:M.userStatusList)==null||I.set(i,{statusType:s,customStatus:u})})}handlePromiseCallback(n){return new Promise((r,o)=>{const i={TUIName:"TUIContact",callback:()=>{n&&n(r,o)}};this.TUICore.setAwaitFunc(i.TUIName,i.callback)})}handleFilterSystem(n){const r={allConversationList:n,systemConversationList:[]};r.systemConversationList=n.filter(i=>i.type===this.TUICore.TIM.TYPES.CONV_SYSTEM),this.store.allConversationList=r.allConversationList,this.store.systemConversationList=r.systemConversationList;const[o]=r.systemConversationList;return this.store.systemConversation=o,r}async getConversationList(){return this.handlePromiseCallback(async(n,r)=>{try{const o=await this.TUICore.tim.getConversationList();this.handleFilterSystem(o.data.conversationList),n(o)}catch(o){r(o)}})}async getSystemMessageList(){const n={conversationID:this.store.systemConversation.conversationID,count:15};return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getMessageList(n);this.store.systemMessageList=i.data.messageList,r(i)}catch(i){o(i)}})}async setMessageRead(){return this.handlePromiseCallback(async(n,r)=>{try{const o=await this.TUICore.tim.setMessageRead({conversationID:this.store.systemConversation.conversationID});n(o)}catch(o){r(o)}})}async getGroupList(n){return this.handlePromiseCallback(async(r,o)=>{try{let i={};n?i=await this.TUICore.tim.getGroupList(n):i=await this.TUICore.tim.getGroupList(),this.store.groupList=i.data.groupList,r(i)}catch(i){o(i)}})}getGroupProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getGroupProfile(n);this.store.groupList=i.data.groupList,r(i)}catch(i){o(i)}})}dismissGroup(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.dismissGroup(n);this.store.groupProfile=i.data.group,r(i)}catch(i){o(i)}})}updateGroupProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.updateGroupProfile(n);this.store.groupProfile=i.data.group,r(i)}catch(i){o(i)}})}joinGroup(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.joinGroup(n);r(i)}catch(i){o(i)}})}quitGroup(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.quitGroup(n);r(i)}catch(i){o(i)}})}searchGroupByID(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.searchGroupByID(n);this.store.searchGroup=i.data.group,r(i)}catch(i){this.store.searchGroup={},o(i)}})}handleGroupApplication(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.handleGroupApplication(n);r(i)}catch(i){o(i)}})}async getFriendList(){return this.handlePromiseCallback(async(n,r)=>{try{const o=await this.TUICore.tim.getFriendList();this.currentStore.friendList=o.data,this.currentStore.userIDList=this.currentStore.friendList.map(i=>i.userID)||[],n(o)}catch(o){r(o)}})}async getUserStatus(n){return this.handlePromiseCallback(async(r,o)=>{var i,s;try{if(!n.length)return;const u=await this.TUICore.tim.getUserStatus({userIDList:n});(s=(i=u==null?void 0:u.data)==null?void 0:i.successUserList)==null||s.forEach(d=>{var f,g,v,_,M,I,k;d&&(d!=null&&d.userID)&&((g=(f=this.currentStore)==null?void 0:f.userStatusList)==null||g.set(d==null?void 0:d.userID,{statusType:d==null?void 0:d.statusType,customStatus:d==null?void 0:d.customStatus}),(k=(I=(M=(_=(v=this.TUICore)==null?void 0:v.TUIServer)==null?void 0:_.TUIConversation)==null?void 0:M.currentStore)==null?void 0:I.userStatusList)==null||k.set(d==null?void 0:d.userID,{statusType:d==null?void 0:d.statusType,customStatus:d==null?void 0:d.customStatus}))}),r(u)}catch(u){o(u)}})}async subscribeUserStatus(n){return this.handlePromiseCallback(async(r,o)=>{try{if(!n.length)return;const i=await this.TUICore.tim.subscribeUserStatus({userIDList:n});r(i)}catch(i){o(i)}})}async unsubscribeUserStatus(n){return this.handlePromiseCallback(async(r,o)=>{var i,s;try{if(n&&!n.length)return;const u=await this.TUICore.tim.unsubscribeUserStatus({userIDList:n});(s=(i=this.currentStore)==null?void 0:i.userStatusList)==null||s.clear(),r(u)}catch(u){o(u)}})}async handleUserStatus(n,r){return this.handlePromiseCallback(async(o,i)=>{try{setTimeout(async()=>{n?(await this.subscribeUserStatus(r),await this.getUserStatus(r)):await this.unsubscribeUserStatus(r)},1e3)}catch(s){i(s)}})}async bind(n){return this.currentStore=n,await this.getGroupList(),await this.getConversationList(),await this.getFriendList(),this.currentStore}}const b4=it({name:"TUIContact",components:{},props:{displayOnlineStatus:{type:Boolean,default:!1}},setup(e,t){const n=b4.TUIServer,{t:r}=n.TUICore.config.i18n.useI18n(),o=Wt({groupList:[],searchGroup:{},searchID:"",currentGroup:null,systemConversation:{unreadCount:0},systemMessageList:[],columnName:"",types:n.TUICore.TIM.TYPES,isSearch:!1,env:n.TUICore.TUIEnv,friendList:[],userIDList:[],currentFriend:{},displayOnlineStatus:!1,onlineStatus:!1,userStatusList:new Map});n.bind(o),Bt(()=>e.displayOnlineStatus,async(L,A)=>{L!==A&&(o.displayOnlineStatus=L,n.handleUserStatus(o.displayOnlineStatus,o.userIDList))},{immediate:!0}),Bt(()=>o.userIDList,(L,A)=>{pz(L,A)||n.handleUserStatus(o.displayOnlineStatus,o.userIDList)});const i=qe(()=>{const L=o.currentGroup.selfInfo.userID,A=o.currentGroup.joinOption===n.TUICore.TIM.TYPES.JOIN_OPTIONS_NEED_PERMISSION;return!L&&A}),s=async L=>{switch(o.columnName){case"group":o.currentGroup=L;break;case"friend":o.currentFriend=L;break}o.isSearch&&(o.currentGroup=L)},u=async L=>{if(o.currentGroup=null,o.searchID.trim())try{await n.searchGroupByID(o.searchID.trim())}catch{const O=r("TUIContact.该群组不存在");po(O,o.env)}},d=async L=>{const A={groupID:L.groupID,applyMessage:L.applyMessage||r("TUIContact.加群"),type:L==null?void 0:L.type};await n.joinGroup(A),o.currentGroup.apply=!0},f=async L=>{await n.quitGroup(L.groupID),o.currentGroup=null},g=async(L,A)=>{const O=`${A}${L}`;n.TUICore.TUIServer.TUIConversation.getConversationProfile(O).then(H=>{n.TUICore.TUIServer.TUIConversation.handleCurrentConversation(H.data.conversation),w()})},v=L=>{n.dismissGroup(L.groupID),o.currentGroup=null},_=async L=>{var A;o.columnName!=="system"&&L==="system"&&((A=o.systemConversation)!=null&&A.conversationID)&&(await n.getSystemMessageList(),await n.setMessageRead()),o.currentGroup={},o.columnName!=="group"&&L==="group"&&!o.env.isH5?o.currentGroup=o.groupList[0]:o.currentGroup={},o.searchID="",o.columnName=o.columnName===L?"":L},M=()=>{o.isSearch=!o.isSearch,o.columnName="",o.searchID="",o.searchGroup={},o.currentGroup={}},I=()=>{o.isSearch=!1,o.columnName="",o.searchID="",o.searchGroup={},o.currentGroup={}},k=L=>{n.handleGroupApplication(L)},w=()=>{o.currentGroup={},o.currentFriend={},o.columnName=""},S=L=>{n.TUICore.getUserStatusList(L)};return{...Yt(o),handleListItem:s,handleSearchGroup:u,join:d,quit:f,dismiss:v,isNeedPermission:i,select:_,handleGroupApplication:k,toggleSearch:M,init:I,back:w,enter:g,getUserStatusList:S}}});const M4=e=>(pr("data-v-565241f9"),e=e(),hr(),e),xde={class:"TUI-contact-left"},Ude={key:0,class:"TUI-contact-column"},Fde={class:"TUI-contact-column-item"},$de={key:0,class:"num"},Gde={key:0,class:"TUI-contact-list"},Bde={class:"TUI-contact-list-item selected not-aside"},Hde={key:0,class:"num"},qde={class:"TUI-contact-column-item"},Vde={class:"TUI-contact-list"},zde=["onClick"],jde={class:"left"},Wde=["src"],Kde={class:"content"},Yde={class:"name"},Jde={class:"ID"},Xde=M4(()=>G("label",null,"ID:",-1)),Zde={class:"type"},Qde={class:"TUI-contact-column-item"},efe={class:"TUI-contact-list"},tfe=["onClick"],nfe={class:"left"},rfe=["src"],ofe={class:"content"},ife={class:"name"},sfe={key:1,class:"TUI-contact-list"},afe={class:"left"},lfe=["src"],ufe={class:"content"},cfe={class:"name"},dfe={class:"ID"},ffe=M4(()=>G("label",null,"ID:",-1)),pfe={class:"type"};function hfe(e,t,n,r,o,i){return J(),_t(Mo,{onBeforeLeave:e.init},{default:Ct(()=>{var s,u,d,f,g,v,_;return[G("div",{class:lt(["TUI-contact",[e.env.isH5?"TUI-contact-H5":""]])},[G("aside",xde,[e.isSearch?(J(),oe("ul",sfe,[(s=e.searchGroup)!=null&&s.groupID?(J(),oe("li",{key:0,class:lt(["TUI-contact-list-item",[((u=e.currentGroup)==null?void 0:u.groupID)===((d=e.searchGroup)==null?void 0:d.groupID)&&"selected"]]),onClick:t[3]||(t[3]=M=>e.handleListItem(e.searchGroup))},[G("aside",afe,[G("img",{class:"avatar",src:((f=e.searchGroup)==null?void 0:f.avatar)||"https://oss.dayaedu.com/news-info/07/1690775328089.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690775328089.png'"},null,8,lfe)]),G("main",ufe,[G("ul",null,[G("li",cfe,De((g=e.searchGroup)==null?void 0:g.name),1),G("li",dfe,[ffe,G("span",null,De((v=e.searchGroup)==null?void 0:v.groupID),1)])]),G("span",pfe,De((_=e.searchGroup)==null?void 0:_.type),1)])],2)):Ie("",!0)])):(J(),oe("ul",Ude,[G("li",Fde,[G("header",{onClick:t[0]||(t[0]=M=>e.select("system"))},[G("i",{class:lt(["icon icon-right",[e.columnName==="system"&&"icon-down"]])},null,2),G("main",null,[G("label",null,De(e.$t("TUIContact.群聊通知")),1),e.systemConversation&&e.systemConversation.unreadCount>0?(J(),oe("span",$de,De(e.systemConversation.unreadCount),1)):Ie("",!0)])]),e.columnName==="system"?(J(),oe("ul",Gde,[G("li",Bde,[G("label",null,De(e.$t("TUIContact.系统通知")),1),e.systemConversation&&e.systemConversation.unreadCount>0?(J(),oe("span",Hde,De(e.systemConversation.unreadCount),1)):Ie("",!0)])])):Ie("",!0)]),G("li",qde,[G("header",{onClick:t[1]||(t[1]=M=>e.select("group"))},[G("i",{class:lt(["icon icon-right",[e.columnName==="group"&&"icon-down"]])},null,2),G("main",null,[G("label",null,De(e.$t("TUIContact.我的群聊")),1)])]),Bn(G("ul",Vde,[(J(!0),oe(ft,null,zt(e.groupList,(M,I)=>{var k;return J(),oe("li",{class:lt(["TUI-contact-list-item",[((k=e.currentGroup)==null?void 0:k.groupID)===(M==null?void 0:M.groupID)&&"selected"]]),key:I,onClick:w=>e.handleListItem(M)},[G("aside",jde,[G("img",{class:"avatar",src:(M==null?void 0:M.avatar)||"https://oss.dayaedu.com/news-info/07/1690775328089.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690775328089.png'"},null,8,Wde)]),G("main",Kde,[G("ul",null,[G("li",Yde,De(M==null?void 0:M.name),1),G("li",Jde,[Xde,G("span",null,De(M==null?void 0:M.groupID),1)])]),G("span",Zde,De(M==null?void 0:M.type),1)])],10,zde)}),128))],512),[[to,e.columnName==="group"]])]),G("li",Qde,[G("header",{onClick:t[2]||(t[2]=M=>e.select("friend"))},[G("i",{class:lt(["icon icon-right",[e.columnName==="friend"&&"icon-down"]])},null,2),G("main",null,[G("label",null,De(e.$t("TUIContact.我的好友")),1)])]),Bn(G("ul",efe,[(J(!0),oe(ft,null,zt(e.friendList,(M,I)=>{var k,w,S,L;return J(),oe("li",{class:lt(["TUI-contact-list-item",[((k=e.currentFriend)==null?void 0:k.userID)===(M==null?void 0:M.userID)&&"selected"]]),key:I,onClick:A=>e.handleListItem(M)},[G("aside",nfe,[G("img",{class:"avatar",src:((w=M==null?void 0:M.profile)==null?void 0:w.avatar)||"https://oss.dayaedu.com/news-info/07/1690787574969.png",onerror:"this.src='https://oss.dayaedu.com/news-info/07/1690787574969.png'"},null,8,rfe),e.displayOnlineStatus?(J(),oe("div",{key:0,class:lt(["online-status",((S=e.userStatusList.get(M==null?void 0:M.userID))==null?void 0:S.statusType)===1?"online-status-online":"online-status-offline"])},null,2)):Ie("",!0)]),G("main",ofe,[G("ul",null,[G("li",ife,De(((L=M==null?void 0:M.profile)==null?void 0:L.nick)||(M==null?void 0:M.userID)),1)])])],10,tfe)}),128))],512),[[to,e.columnName==="friend"]])])]))])],2)]}),_:1},8,["onBeforeLeave"])}const CI=Kt(b4,[["render",hfe],["__scopeId","data-v-565241f9"]]),gfe=e=>{CI.TUIServer=ou.server,e.component(ou.name,CI)},mfe=e=>(ou.server=new _4(e),e.component(ou.name,ou),ou),ou={name:"TUIContact",component:CI,server:_4,install:gfe,plugin:mfe};class I4 extends ld{constructor(n){super();Xt(this,"TUICore");Xt(this,"store");Xt(this,"currentStore",{});Xt(this,"storeCallback");this.TUICore=n,this.bindTIMEvent(),this.store=n.setComponentStore("TUISearch",{},this.updateStore.bind(this))}destroyed(){this.unbindTIMEvent()}updateStore(n,r){var o,i;(i=(o=this==null?void 0:this.currentStore)==null?void 0:o.conversationData)!=null&&i.list&&(this.currentStore.conversationData.list=n.conversationList)}handlePromiseCallback(n){return new Promise((r,o)=>{const i={TUIName:"TUISearch",callback:()=>{n&&n(r,o)}};this.TUICore.setAwaitFunc(i.TUIName,i.callback)})}bindTIMEvent(){this.TUICore.tim.on(this.TUICore.TIM.EVENT.FRIEND_LIST_UPDATED,this.handleFriendListUpdated,this)}unbindTIMEvent(){this.TUICore.tim.off(this.TUICore.TIM.EVENT.FRIEND_LIST_UPDATED,this.handleFriendListUpdated)}handleFriendListUpdated(n){this.currentStore.searchUserList=n.data.map(r=>r==null?void 0:r.profile),this.currentStore.allUserList=n.data.map(r=>r==null?void 0:r.profile)}async getConversationProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getConversationProfile(n);r(i)}catch(i){o(i)}})}async getUserProfile(n){return this.handlePromiseCallback(async(r,o)=>{try{const i=await this.TUICore.tim.getUserProfile({userIDList:n});r(i)}catch(i){o(i)}})}async getFriendList(){return this.handlePromiseCallback(async(n,r)=>{try{const o=await this.TUICore.tim.getFriendList();this.currentStore.searchUserList=o.data.map(i=>i==null?void 0:i.profile),this.currentStore.allUserList=o.data.map(i=>i==null?void 0:i.profile),n(o)}catch(o){r(o)}})}async bind(n){return this.currentStore=n,await this.getFriendList(),this.currentStore}}const rh=it({name:"group",props:{isH5:{type:Boolean,default:()=>!1}},setup(e,t){const n=Wt({profile:{groupID:"",name:"",type:"",avatar:"",introduction:"",notification:"",joinOption:""},editConfig:{title:"",value:"",key:"",type:"",placeholder:""},isEdit:!1,type:[{icon:"https://web.sdk.qcloud.com/im/assets/images/Public.svg",label:"陌生人社交群(Public)",type:rh.TUIServer.TUICore.TIM.TYPES.GRP_PUBLIC,detail:"类似 QQ 群,创建后群主可以指定群管理员,用户搜索群 ID 发起加群申请后,需要群主或管理员审批通过才能入群。详见",src:"产品文档"},{icon:"https://web.sdk.qcloud.com/im/assets/images/Meeting.svg",label:"临时会议群(Meeting)",type:rh.TUIServer.TUICore.TIM.TYPES.GRP_MEETING,detail:"创建后可以随意进出,且支持查看入群前消息;适合用于音视频会议场景、在线教育场景等与实时音视频产品结合的场景。详见",src:"产品文档"},{icon:"https://web.sdk.qcloud.com/im/assets/images/Work.svg",label:"好友工作群(Work)",type:rh.TUIServer.TUICore.TIM.TYPES.GRP_WORK,detail:"类似普通微信群,创建后仅支持已在群内的好友邀请加群,且无需被邀请方同意或群主神奇。详见",src:"产品文档"},{icon:"https://web.sdk.qcloud.com/im/assets/images/AVChatroom.svg",label:"直播群(AVChatroom)",type:rh.TUIServer.TUICore.TIM.TYPES.GRP_AVCHATROOM,detail:"创建后可以随意进出,没有群成员数量上限,但不支持历史消息存储;适合与直播产品结合,用于弹幕聊天场景。详见",src:"产品文档"}]});n.profile.type=n.type[0].type,n.profile.avatar=n.type[0].icon;const r=qe(()=>n.type.filter(f=>f.type===n.profile.type)[0]),o=f=>{n.profile.type!==f.type&&(n.profile.type=f.type,n.profile.avatar=f.icon)},i=f=>{if(n.isEdit)return n.profile[n.editConfig.key]=n.editConfig.value,n.isEdit=!n.isEdit;const g={name:f.name,type:f.type,groupID:f.groupID,avatar:f.avatar};t.emit("submit",g)},s=()=>{if(n.isEdit)return n.isEdit=!n.isEdit;t.emit("cancel")},u=f=>{switch(n.isEdit=!n.isEdit,n.editConfig.key=f,n.editConfig.value=n.profile[f],f){case"name":n.editConfig.title="设置群名称",n.editConfig.placeholder="请输入群名称",n.editConfig.type="input";break;case"groupID":n.editConfig.title="设置群ID",n.editConfig.placeholder="请输入群ID",n.editConfig.type="input";break;case"type":n.editConfig.title="选择群类型",n.editConfig.type="select";break}},d=f=>{n.editConfig.value!==f.type&&(n.editConfig.value=f.type)};return{...Yt(n),selected:o,submit:i,cancel:s,Link:W5,edit:u,selectedEdit:d,groupTypeDetail:r}}});const BT=e=>(pr("data-v-55cd6086"),e=e(),hr(),e),vfe={class:"group-box"},yfe={key:0},_fe={key:1},bfe={key:0,class:"group-list"},Mfe={class:"group-list-item"},Ife=["src"],Cfe={class:"group-list-item"},Tfe={class:"content"},wfe=BT(()=>G("i",{class:"icon icon-right"},null,-1)),Sfe={class:"group-list-item"},kfe={class:"content"},Dfe=BT(()=>G("i",{class:"icon icon-right"},null,-1)),Efe={class:"group-list-introduction"},Afe={class:"group-list-item"},Lfe={key:0,class:"select"},Ofe=["onClick"],Rfe={class:"select-item-header"},Nfe={class:"left"},Pfe=["src"],xfe={class:"select-item-label"},Ufe={key:0,class:"icon icon-selected"},Ffe={class:"select-item-detail"},$fe=["href"],Gfe={class:"content"},Bfe=BT(()=>G("i",{class:"icon icon-right"},null,-1)),Hfe={key:0,class:"group-h5-list-item-introduction"},qfe={class:"introduction-name"},Vfe={class:"introduction-detail"},zfe=["href"],jfe={key:1,class:"group-list group-list-edit"},Wfe=["placeholder"],Kfe={key:1,class:"select"},Yfe=["onClick"],Jfe={class:"select-item-header"},Xfe={class:"left"},Zfe=["src"],Qfe={class:"select-item-label"},epe={key:0,class:"icon icon-selected"},tpe={class:"select-item-detail"},npe=["href"],rpe={class:"group-profile-footer"},ope=["disabled"];function ipe(e,t,n,r,o,i){return J(),oe("div",{class:lt(["group",[e.isH5?"group-h5":""]])},[G("div",vfe,[G("header",null,[e.isEdit?(J(),oe("h1",_fe,De(e.$t(`TUISearch.${e.editConfig.title}`)),1)):(J(),oe("h1",yfe,De(e.$t("TUISearch.发起群聊")),1)),G("i",{class:lt(["icon",[e.isH5?"icon-back":"icon-close"]]),onClick:t[0]||(t[0]=(...s)=>e.cancel&&e.cancel(...s))},null,2)]),e.isEdit?(J(),oe("div",jfe,[e.editConfig.type==="input"?Bn((J(),oe("input",{key:0,type:"text","onUpdate:modelValue":t[6]||(t[6]=s=>e.editConfig.value=s),placeholder:e.$t(`TUISearch.${e.editConfig.placeholder}`)},null,8,Wfe)),[[pl,e.editConfig.value]]):(J(),oe("ul",Kfe,[(J(!0),oe(ft,null,zt(e.type,(s,u)=>(J(),oe("li",{class:lt(["select-item",[e.editConfig.value===s.type&&"selected"]]),key:u,onClick:d=>e.selectedEdit(s)},[G("main",null,[G("div",Jfe,[G("aside",Xfe,[G("img",{class:"icon",src:s.icon},null,8,Zfe),G("span",Qfe,De(s.label),1)]),e.editConfig.value===s.type?(J(),oe("i",epe)):Ie("",!0)]),G("span",tpe,De(e.$t(`TUISearch.${s.detail}`)),1),G("a",{href:e.Link.product.url,target:"view_window"},De(e.$t(`TUISearch.${s.src}`)),9,npe)])],10,Yfe))),128))]))])):(J(),oe("ul",bfe,[G("li",Mfe,[G("label",null,De(e.$t("TUISearch.群头像")),1),G("img",{class:"icon",src:e.profile.avatar},null,8,Ife)]),G("ul",null,[G("li",Cfe,[G("label",null,De(e.$t("TUISearch.群名称")),1),e.isH5?(J(),oe("span",{key:1,class:"group-h5-list-item-content",onClick:t[2]||(t[2]=s=>e.edit("name"))},[G("p",Tfe,De(e.profile.name),1),wfe])):Bn((J(),oe("input",{key:0,type:"text","onUpdate:modelValue":t[1]||(t[1]=s=>e.profile.name=s),placeholder:"请输入群名称"},null,512)),[[pl,e.profile.name]])]),G("li",Sfe,[G("label",null,[mr(De(e.$t("TUISearch.群ID")),1),G("text",null,"("+De(e.$t("TUISearch.选填"))+")",1)]),e.isH5?(J(),oe("span",{key:1,class:"group-h5-list-item-content",onClick:t[4]||(t[4]=s=>e.edit("groupID"))},[G("p",kfe,De(e.profile.groupID),1),Dfe])):Bn((J(),oe("input",{key:0,type:"text","onUpdate:modelValue":t[3]||(t[3]=s=>e.profile.groupID=s)},null,512)),[[pl,e.profile.groupID]])]),G("li",Efe,[G("div",Afe,[G("label",null,De(e.$t("TUISearch.群类型")),1),e.isH5?(J(),oe("span",{key:1,class:"group-h5-list-item-content",onClick:t[5]||(t[5]=s=>e.edit("type"))},[G("p",Gfe,De(e.groupTypeDetail.label),1),Bfe])):(J(),oe("ul",Lfe,[(J(!0),oe(ft,null,zt(e.type,(s,u)=>(J(),oe("li",{class:lt(["select-item",[e.profile.type===s.type&&"selected"]]),key:u,onClick:d=>e.selected(s)},[G("main",null,[G("div",Rfe,[G("aside",Nfe,[G("img",{class:"icon",src:s.icon},null,8,Pfe),G("span",xfe,De(s.label),1)]),e.profile.type===s.type?(J(),oe("i",Ufe)):Ie("",!0)]),G("span",Ffe,De(e.$t(`TUISearch.${s.detail}`)),1),G("a",{href:e.Link.product.url,target:"view_window"},De(e.$t(`TUISearch.${s.src}`)),9,$fe)])],10,Ofe))),128))]))]),e.isH5?(J(),oe("article",Hfe,[G("label",qfe,De(e.groupTypeDetail.label)+":",1),G("span",Vfe,De(e.$t(`TUISearch.${e.groupTypeDetail.detail}`)),1),G("a",{href:e.Link.product.url,target:"view_window"},De(e.$t(`TUISearch.${e.groupTypeDetail.src}`)),9,zfe)])):Ie("",!0)])])])),G("footer",rpe,[!e.isEdit&&!e.isH5?(J(),oe("button",{key:0,class:"btn-default",onClick:t[7]||(t[7]=(...s)=>e.cancel&&e.cancel(...s))},De(e.$t("TUISearch.取消")),1)):Ie("",!0),G("button",{class:"btn-submit",onClick:t[8]||(t[8]=s=>e.submit(e.profile)),disabled:e.profile.name===""&&!e.isEdit},De(e.$t("TUISearch.创建")),9,ope)])])],2)}const Sb=Kt(rh,[["render",ipe],["__scopeId","data-v-55cd6086"]]),mv=it({name:"TUISearch",components:{Transfer:sT,DialogTUI:Zy,CreateGroup:Sb},setup(e){var k,w,S;const t=mv==null?void 0:mv.TUIServer,{t:n}=t.TUICore.config.i18n.useI18n(),r=Wt({open:!1,searchUserID:"",selectedList:[],allUserList:[],searchUserList:[],step:1,group:{groupID:"",name:"",type:"",avatar:"",introduction:"",notification:"",joinOption:"",memberList:[{userID:""}]},showTitle:"",createConversationType:"",env:t.TUICore.TUIEnv,optionalShow:!t.TUICore.TUIEnv.isH5,needSearch:!t.TUICore.isOfficial});t.bind(r);const o=(w=(k=t==null?void 0:t.TUICore)==null?void 0:k.TUIServer)==null?void 0:w.TUIGroup;Sb.TUIServer=t;const i=((S=window==null?void 0:window.TUIKitTUICore)==null?void 0:S.isOfficial)&&Ai&&Ai()||{},s=Ne();xa(s,()=>{r.env.isH5&&(r.optionalShow=!1,r.searchUserList=[...r.allUserList])});const u=()=>{r.group={groupID:"",name:"",type:"",avatar:"",introduction:"",notification:"",joinOption:"",memberList:[{userID:""}]}},d=()=>{r.open=!r.open,r.open||(r.searchUserID="",r.step=1,u())},f=L=>{if(r.createConversationType===dn.typeC2C){const{userID:A}=L[0];v(A,"C2C"),d()}else{if(!Sb.TUIServer){const A=n("TUISearch.创建群聊,请注册 TUIGroup 模块");po(A,r.env)}u(),r.group.memberList=L.map(A=>({userID:A.userID})),r.step=2}r.searchUserList=[...r.allUserList]},g=async L=>{var O;L.type===t.TUICore.TIM.TYPES.GRP_PUBLIC&&(r.group.joinOption=t.TUICore.TIM.TYPES.JOIN_OPTIONS_NEED_PERMISSION);const A={...r.group,...L};L.type===t.TUICore.TIM.TYPES.GRP_AVCHATROOM&&(delete A.memberList,delete A.joinOption);try{const H=await o.createGroup(A),q=n("TUISearch.创建成功");fz(q,r.env),(O=window==null?void 0:window.TUIKitTUICore)!=null&&O.isOfficial&&(i!=null&&i.commit)&&(i==null||i.commit("handleTask",3)),d(),L.type===t.TUICore.TIM.TYPES.GRP_AVCHATROOM&&o.joinGroup({groupID:H.data.group.groupID,applyMessage:"",type:H.data.group.type}),v(H.data.group.groupID,"GROUP")}catch(H){po(H,r.env)}},v=(L,A)=>{const O=`${A}${L}`;t.getConversationProfile(O).then(H=>{t.TUICore.TUIServer.TUIConversation.handleCurrentConversation(H.data.conversation)})},_=L=>{switch(r.open=!0,r.searchUserList=[...r.allUserList],L){case"isC2C":return r.createConversationType=dn.typeC2C,r.showTitle=n("TUISearch.发起单聊"),r.showTitle;case"isGroup":return r.createConversationType=dn.typeGroup,r.showTitle=n("TUISearch.发起群聊"),r.showTitle}},M=()=>{r.env.isH5&&(r.optionalShow=!r.optionalShow)},I=async L=>{try{const A=await t.getUserProfile([L]);if(!A.data.length){po(n("TUISearch.该用户不存在"),r.env),r.searchUserList=[...r.allUserList];return}r.searchUserList=A.data;const O=r.allUserList.filter(H=>H.userID===A.data[0].userID);r.allUserList=O.length?r.allUserList:[...r.allUserList,...r.searchUserList]}catch{po(n("TUISearch.该用户不存在"),r.env),r.searchUserList=[...r.allUserList];return}};return{...Yt(r),toggleOpen:d,handleSearch:I,submit:f,create:g,showOpen:_,toggleOptionalShow:M,dialog:s}}});const C4=e=>(pr("data-v-9a8b306e"),e=e(),hr(),e),spe=C4(()=>G("i",{class:"plus"},null,-1)),ape={key:0},lpe={key:0,class:"icon icon-c2c"},upe=C4(()=>G("i",{class:"icon icon-group"},null,-1));function cpe(e,t,n,r,o,i){const s=xt("Transfer"),u=xt("CreateGroup"),d=xt("DialogTUI");return J(),oe("div",{class:lt(["TUI-search",[e.env.isH5?"TUI-search-H5":""]]),ref:"dialog"},[G("header",{onClick:t[2]||(t[2]=(...f)=>e.toggleOptionalShow&&e.toggleOptionalShow(...f))},[spe,e.env.isH5?(J(),oe("h1",ape,De(e.$t("TUISearch.发起会话")),1)):Ie("",!0),Bn(G("ul",null,[G("li",null,[e.env.isH5?(J(),oe("i",lpe)):Ie("",!0),G("h1",{onClick:t[0]||(t[0]=f=>e.showOpen("isC2C"))},De(e.$t("TUISearch.发起单聊")),1)]),G("li",null,[upe,G("h1",{onClick:t[1]||(t[1]=f=>e.showOpen("isGroup"))},De(e.$t("TUISearch.发起群聊")),1)])],512),[[to,e.optionalShow]])]),It(d,{show:e.open,isH5:e.env.isH5,isHeaderShow:!1,isFooterShow:!1,background:!1,"onUpdate:show":t[3]||(t[3]=f=>e.open=f)},{default:Ct(()=>[e.step===1?(J(),_t(s,{key:0,isSearch:e.needSearch,title:e.showTitle,list:e.searchUserList,isH5:e.env.isH5,isRadio:e.createConversationType==="isC2C",onSearch:e.handleSearch,onSubmit:e.submit,onCancel:e.toggleOpen},null,8,["isSearch","title","list","isH5","isRadio","onSearch","onSubmit","onCancel"])):(J(),_t(u,{key:1,onSubmit:e.create,onCancel:e.toggleOpen,isH5:e.env.isH5},null,8,["onSubmit","onCancel","isH5"]))]),_:1},8,["show","isH5"])],2)}const TI=Kt(mv,[["render",cpe],["__scopeId","data-v-9a8b306e"]]),dpe=e=>{TI.TUIServer=iu.server,e.component(iu.name,TI)},fpe=e=>(iu.server=new I4(e),e.component(iu.name,iu),iu),iu={name:"TUISearch",component:TI,server:I4,install:dpe,plugin:fpe},T4=[cl,Ql,tu,nu,ru,ou,iu],ppe=e=>{T4.forEach(t=>{t.install(e)})},hpe=e=>{T4.forEach(t=>{t.plugin(e)})},gpe={name:"TUIComponents",version:"1.0.0",TUIChat:cl,TUIConversation:Ql,TUIProfile:tu,TUIGroup:nu,TUIPerson:ru,TUIContact:ou,TUISearch:iu,install:ppe,plugin:hpe};var w4={exports:{}};(function(e,t){var n;n=function(){function r($,R){var T=Object.keys($);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols($);R&&(x=x.filter(function(Z){return Object.getOwnPropertyDescriptor($,Z).enumerable})),T.push.apply(T,x)}return T}function o($){for(var R=1;R=0||(ae[ie]=re[ie]);return ae}($,R);if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols($);for(x=0;x=0||Object.prototype.propertyIsEnumerable.call($,T)&&(Z[T]=$[T])}return Z}var v=typeof wx<"u"&&typeof wx.getSystemInfoSync=="function"&&!!wx.getSystemInfoSync().fontSizeSetting,_=typeof qq<"u"&&typeof qq.getSystemInfoSync=="function"&&!!qq.getSystemInfoSync().fontSizeSetting,M=typeof tt<"u"&&typeof tt.getSystemInfoSync=="function"&&!!tt.getSystemInfoSync().fontSizeSetting,I=typeof swan<"u"&&typeof swan.getSystemInfoSync=="function"&&!!swan.getSystemInfoSync().fontSizeSetting,k=typeof my<"u"&&typeof my.getSystemInfoSync=="function"&&!!my.getSystemInfoSync().fontSizeSetting,w=typeof uni<"u"&&typeof window>"u"&&typeof uni.requireNativePlugin=="function",S=w&&uni.getDeviceInfo().platform.toLocaleLowerCase()==="ios",L=(w&&uni.getDeviceInfo().platform.toLocaleLowerCase(),v||_||M||I||k||w),A=_?qq:M?tt:I?swan:k?my:v?wx:w?uni:{},O=function($){if(i($)!=="object"||$===null)return!1;var R=Object.getPrototypeOf($);if(R===null)return!0;for(var T=R;Object.getPrototypeOf(T)!==null;)T=Object.getPrototypeOf(T);return R===T};function H($){if($==null)return!0;if(typeof $=="boolean")return!1;if(typeof $=="number")return $===0;if(typeof $=="string"||typeof $=="function"||Array.isArray($))return $.length===0;if($ instanceof Error)return $.message==="";if(O($)){for(var R in $)if(Object.prototype.hasOwnProperty.call($,R))return!1;return!0}return!1}var q=function(){function $(){s(this,$)}return d($,[{key:"request",value:function(R,T){var x=this,Z=R.downloadUrl||"",K=(R.method||"PUT").toUpperCase(),re=R.url;if(R.qs){var X=function(de){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"=";return H(de)?"":O(de)?Object.keys(de).map(function(fe){var Re=encodeURIComponent(fe)+te;return Array.isArray(de[fe])?de[fe].map(function(ve){return Re+encodeURIComponent(ve)}).join(Y):Re+encodeURIComponent(de[fe])}).filter(Boolean).join(Y):void 0}(R.qs);X&&(re+="".concat(re.indexOf("?")===-1?"?":"&").concat(X))}var ie=new XMLHttpRequest;ie.open(K,re,!0),ie.responseType=R.dataType||"text";var he=R.headers||{};if(!H(he))for(var ae in he)he.hasOwnProperty(ae)&&ae.toLowerCase()!=="content-length"&&ae.toLowerCase()!=="user-agent"&&ae.toLowerCase()!=="origin"&&ae.toLowerCase()!=="host"&&ie.setRequestHeader(ae,he[ae]);return ie.onload=function(){if(ie.status===200)T(null,x._xhrRes(ie,x._xhrBody(ie,Z)));else{var de={code:ie.status,message:JSON.stringify(ie.responseText)};T(de,x._xhrRes(ie,x._xhrBody(ie)))}},ie.onerror=function(de){var Y=x._xhrBody(ie),te={code:ie.status,message:JSON.stringify(ie.responseText)};Y||ie.statusText||ie.status!==0||(de.message="CORS blocked or network error"),T(te,x._xhrRes(ie,Y)),te=null},R.onProgress&&ie.upload&&(ie.upload.onprogress=function(de){var Y=de.total,te=de.loaded,fe=Math.floor(100*te/Y);R.onProgress({total:Y,loaded:te,percent:(fe>=100?100:fe)/100})}),ie.send(R.resources),ie}},{key:"_xhrRes",value:function(R,T){var x={};return R.getAllResponseHeaders().trim().split(` `).forEach(function(Z){if(Z){var K=Z.indexOf(":"),re=Z.substr(0,K).trim().toLowerCase(),X=Z.substr(K+1).trim();x[re]=X}}),{statusCode:R.status,statusMessage:R.statusText,headers:x,data:T}}},{key:"_xhrBody",value:function(R,T){return R.status===200&&T?{location:T}:{response:R.responseText}}}]),$}(),P=["unknown","image","video","audio","log"],B=["name"],j=function(){function $(){s(this,$)}return d($,[{key:"request",value:function(R,T){var x=this,Z=R.resources,K=Z===void 0?"":Z,re=R.headers,X=re===void 0?{}:re,ie=R.url,he=R.downloadUrl,ae=he===void 0?"":he,de=ie,Y=null,te=ae.match(/^(https?:\/\/[^/]+\/)([^/]*\/?)(.*)$/),fe=decodeURIComponent(te[3]),Re=fe.indexOf("?")>-1?fe.split("?")[0]:fe,ve={key:R.fileKey?R.fileKey:Re,success_action_status:200,"Content-Type":""},be={};if(S){var ue=ie.split("?sign=");if(ue.length>1){var ce=ue[1];de="".concat(ue[0],"?sign=").concat(encodeURIComponent("".concat(ce))),be.sign=decodeURIComponent(ce),be.signature=decodeURIComponent(ce)}}var Ee={url:de,header:X,name:"file",filePath:K,formData:o(o({},ve),be),timeout:R.timeout||3e5};if(k){var pe=Ee;pe.name,Ee=o(o({},g(pe,B)),{},{fileName:"file",fileType:P[R.fileType]})}return(Y=A.uploadFile(o(o({},Ee),{},{success:function(V){x._handleResponse({response:V,downloadUrl:ae,callback:T})},fail:function(V){x._handleResponse({response:V,downloadUrl:ae,callback:T})}}))).onProgressUpdate&&Y.onProgressUpdate(function(V){R.onProgress&&R.onProgress({total:V.totalBytesExpectedToSend,loaded:V.totalBytesSent,percent:Math.floor(V.progress)/100})}),Y}},{key:"_handleResponse",value:function(R){var T=R.downloadUrl,x=R.response,Z=R.callback,K=x.header,re={};if(K)for(var X in K)K.hasOwnProperty(X)&&(re[X.toLowerCase()]=K[X]);var ie=+x.statusCode;ie===200?Z(null,{statusCode:ie,headers:re,data:o(o({},x.data),{},{location:T})}):Z({code:ie,message:JSON.stringify(x.data)},{statusCode:ie,headers:re,data:void 0})}}]),$}();return function(){function $(){s(this,$),console.log("TIMUploadPlugin.VERSION: ".concat("1.3.0")),this.retry=1,this.tryCount=0,this.systemClockOffset=0,this.httpRequest=L?new j:new q}return d($,[{key:"uploadFile",value:function(R,T){var x=this;return this.httpRequest.request(R,function(Z,K){Z&&x.tryCount=3e4&&(this.systemClockOffset=ie-X,T=!0)}else Math.floor(R.statusCode/100)===5&&(T=!0)}return T}}]),$}()},e.exports=n()})(w4);var mpe=w4.exports;const vpe=zf(mpe);var S4={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(mi,function(){function n(k,w){if(!(k instanceof w))throw new TypeError("Cannot call a class as a function")}function r(k,w){for(var S=0;Sk.length)&&(w=k.length);for(var S=0,L=new Array(w);S=k.length?{done:!0}:{done:!1,value:k[L++]}},e:function(P){throw P},f:A}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var O,H=!0,q=!1;return{s:function(){S=S.call(k)},n:function(){var P=S.next();return H=P.done,P},e:function(P){q=!0,O=P},f:function(){try{H||S.return==null||S.return()}finally{if(q)throw O}}}}var g=function(){for(var k=` \r ~!@#$%^&*()_+-=【】、{}|;':",。、《》?αβγδεζηθικλμνξοπρστυφχψωΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩①②③④⑤⑥⑦⑧⑨⑩⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇≈≡≠=≤≥<>≮≯∷±+-×÷/∫∮∝∞∧∨∑∏∪∩∈∵∴⊥∥∠⌒⊙≌∽√§№☆★○●◎◇◆□℃‰€■△▲※→←↑↓〓¤°#&@\︿_ ̄―♂♀┌┍┎┐┑┒┓─┄┈├┝┞┟┠┡┢┣│┆┊┬┭┮┯┰┱┲┳┼┽┾┿╀╁╂╃└┕┖┗┘┙┚┛━┅┉┤┥┦┧┨┩┪┫┃┇┋┴┵┶┷┸┹┺┻╋╊╉╈╇╆╅╄`,w=new Map,S=0,L=k.length;S1&&(P+=B),$){if(H=!0,!L)break;var T=this._map.get(j)||"*";O=O.replace(new RegExp(j,"g"),T)}}return{isMatched:H,modifiedText:O}}},{key:"reset",value:function(){this._trieTree={},this._map=null}}]),k}(),_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof mi<"u"?mi:typeof self<"u"?self:{},M={},I=function(k,w){return k(w={exports:{}},w.exports),w.exports}(function(k,w){var S,L,A,O,H,q;k.exports=(q=q||function(P,B){var j;if(typeof window<"u"&&window.crypto&&(j=window.crypto),!j&&typeof window<"u"&&window.msCrypto&&(j=window.msCrypto),!j&&_!==void 0&&_.crypto&&(j=_.crypto),!j)try{j=M}catch{}var $=function(){if(j){if(typeof j.getRandomValues=="function")try{return j.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof j.randomBytes=="function")try{return j.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},R=Object.create||function(){function Y(){}return function(te){var fe;return Y.prototype=te,fe=new Y,Y.prototype=null,fe}}(),T={},x=T.lib={},Z=x.Base={extend:function(Y){var te=R(this);return Y&&te.mixIn(Y),te.hasOwnProperty("init")&&this.init!==te.init||(te.init=function(){te.$super.init.apply(this,arguments)}),te.init.prototype=te,te.$super=this,te},create:function(){var Y=this.extend();return Y.init.apply(Y,arguments),Y},init:function(){},mixIn:function(Y){for(var te in Y)Y.hasOwnProperty(te)&&(this[te]=Y[te]);Y.hasOwnProperty("toString")&&(this.toString=Y.toString)},clone:function(){return this.init.prototype.extend(this)}},K=x.WordArray=Z.extend({init:function(Y,te){Y=this.words=Y||[],this.sigBytes=te??4*Y.length},toString:function(Y){return(Y||X).stringify(this)},concat:function(Y){var te=this.words,fe=Y.words,Re=this.sigBytes,ve=Y.sigBytes;if(this.clamp(),Re%4)for(var be=0;be>>2]>>>24-be%4*8&255;te[Re+be>>>2]|=ue<<24-(Re+be)%4*8}else for(be=0;be>>2]=fe[be>>>2];return this.sigBytes+=ve,this},clamp:function(){var Y=this.words,te=this.sigBytes;Y[te>>>2]&=4294967295<<32-te%4*8,Y.length=P.ceil(te/4)},clone:function(){var Y=Z.clone.call(this);return Y.words=this.words.slice(0),Y},random:function(Y){for(var te=[],fe=0;fe>>2]>>>24-ve%4*8&255;Re.push((be>>>4).toString(16)),Re.push((15&be).toString(16))}return Re.join("")},parse:function(Y){for(var te=Y.length,fe=[],Re=0;Re>>3]|=parseInt(Y.substr(Re,2),16)<<24-Re%8*4;return new K.init(fe,te/2)}},ie=re.Latin1={stringify:function(Y){for(var te=Y.words,fe=Y.sigBytes,Re=[],ve=0;ve>>2]>>>24-ve%4*8&255;Re.push(String.fromCharCode(be))}return Re.join("")},parse:function(Y){for(var te=Y.length,fe=[],Re=0;Re>>2]|=(255&Y.charCodeAt(Re))<<24-Re%4*8;return new K.init(fe,te)}},he=re.Utf8={stringify:function(Y){try{return decodeURIComponent(escape(ie.stringify(Y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(Y){return ie.parse(unescape(encodeURIComponent(Y)))}},ae=x.BufferedBlockAlgorithm=Z.extend({reset:function(){this._data=new K.init,this._nDataBytes=0},_append:function(Y){typeof Y=="string"&&(Y=he.parse(Y)),this._data.concat(Y),this._nDataBytes+=Y.sigBytes},_process:function(Y){var te,fe=this._data,Re=fe.words,ve=fe.sigBytes,be=this.blockSize,ue=ve/(4*be),ce=(ue=Y?P.ceil(ue):P.max((0|ue)-this._minBufferSize,0))*be,Ee=P.min(4*ce,ve);if(ce){for(var pe=0;pe>>2]>>>24-T%4*8&255)<<16|(B[T+1>>>2]>>>24-(T+1)%4*8&255)<<8|B[T+2>>>2]>>>24-(T+2)%4*8&255,Z=0;Z<4&&T+.75*Z>>6*(3-Z)&63));var K=$.charAt(64);if(K)for(;R.length%4;)R.push(K);return R.join("")},parse:function(P){var B=P.length,j=this._map,$=this._reverseMap;if(!$){$=this._reverseMap=[];for(var R=0;R>>6-he%4*2,Y=ae|de;X[ie>>>2]|=Y<<24-ie%4*8,ie++}return H.create(X,ie)}(P,B,$)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(P){var B=q,j=B.lib,$=j.WordArray,R=j.Hasher,T=B.algo,x=[];(function(){for(var he=0;he<64;he++)x[he]=4294967296*P.abs(P.sin(he+1))|0})();var Z=T.MD5=R.extend({_doReset:function(){this._hash=new $.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(he,ae){for(var de=0;de<16;de++){var Y=ae+de,te=he[Y];he[Y]=16711935&(te<<8|te>>>24)|4278255360&(te<<24|te>>>8)}var fe=this._hash.words,Re=he[ae+0],ve=he[ae+1],be=he[ae+2],ue=he[ae+3],ce=he[ae+4],Ee=he[ae+5],pe=he[ae+6],V=he[ae+7],ee=he[ae+8],se=he[ae+9],Ce=he[ae+10],le=he[ae+11],ke=he[ae+12],Pe=he[ae+13],xe=he[ae+14],He=he[ae+15],Te=fe[0],W=fe[1],ne=fe[2],ye=fe[3];Te=K(Te,W,ne,ye,Re,7,x[0]),ye=K(ye,Te,W,ne,ve,12,x[1]),ne=K(ne,ye,Te,W,be,17,x[2]),W=K(W,ne,ye,Te,ue,22,x[3]),Te=K(Te,W,ne,ye,ce,7,x[4]),ye=K(ye,Te,W,ne,Ee,12,x[5]),ne=K(ne,ye,Te,W,pe,17,x[6]),W=K(W,ne,ye,Te,V,22,x[7]),Te=K(Te,W,ne,ye,ee,7,x[8]),ye=K(ye,Te,W,ne,se,12,x[9]),ne=K(ne,ye,Te,W,Ce,17,x[10]),W=K(W,ne,ye,Te,le,22,x[11]),Te=K(Te,W,ne,ye,ke,7,x[12]),ye=K(ye,Te,W,ne,Pe,12,x[13]),ne=K(ne,ye,Te,W,xe,17,x[14]),Te=re(Te,W=K(W,ne,ye,Te,He,22,x[15]),ne,ye,ve,5,x[16]),ye=re(ye,Te,W,ne,pe,9,x[17]),ne=re(ne,ye,Te,W,le,14,x[18]),W=re(W,ne,ye,Te,Re,20,x[19]),Te=re(Te,W,ne,ye,Ee,5,x[20]),ye=re(ye,Te,W,ne,Ce,9,x[21]),ne=re(ne,ye,Te,W,He,14,x[22]),W=re(W,ne,ye,Te,ce,20,x[23]),Te=re(Te,W,ne,ye,se,5,x[24]),ye=re(ye,Te,W,ne,xe,9,x[25]),ne=re(ne,ye,Te,W,ue,14,x[26]),W=re(W,ne,ye,Te,ee,20,x[27]),Te=re(Te,W,ne,ye,Pe,5,x[28]),ye=re(ye,Te,W,ne,be,9,x[29]),ne=re(ne,ye,Te,W,V,14,x[30]),Te=X(Te,W=re(W,ne,ye,Te,ke,20,x[31]),ne,ye,Ee,4,x[32]),ye=X(ye,Te,W,ne,ee,11,x[33]),ne=X(ne,ye,Te,W,le,16,x[34]),W=X(W,ne,ye,Te,xe,23,x[35]),Te=X(Te,W,ne,ye,ve,4,x[36]),ye=X(ye,Te,W,ne,ce,11,x[37]),ne=X(ne,ye,Te,W,V,16,x[38]),W=X(W,ne,ye,Te,Ce,23,x[39]),Te=X(Te,W,ne,ye,Pe,4,x[40]),ye=X(ye,Te,W,ne,Re,11,x[41]),ne=X(ne,ye,Te,W,ue,16,x[42]),W=X(W,ne,ye,Te,pe,23,x[43]),Te=X(Te,W,ne,ye,se,4,x[44]),ye=X(ye,Te,W,ne,ke,11,x[45]),ne=X(ne,ye,Te,W,He,16,x[46]),Te=ie(Te,W=X(W,ne,ye,Te,be,23,x[47]),ne,ye,Re,6,x[48]),ye=ie(ye,Te,W,ne,V,10,x[49]),ne=ie(ne,ye,Te,W,xe,15,x[50]),W=ie(W,ne,ye,Te,Ee,21,x[51]),Te=ie(Te,W,ne,ye,ke,6,x[52]),ye=ie(ye,Te,W,ne,ue,10,x[53]),ne=ie(ne,ye,Te,W,Ce,15,x[54]),W=ie(W,ne,ye,Te,ve,21,x[55]),Te=ie(Te,W,ne,ye,ee,6,x[56]),ye=ie(ye,Te,W,ne,He,10,x[57]),ne=ie(ne,ye,Te,W,pe,15,x[58]),W=ie(W,ne,ye,Te,Pe,21,x[59]),Te=ie(Te,W,ne,ye,ce,6,x[60]),ye=ie(ye,Te,W,ne,le,10,x[61]),ne=ie(ne,ye,Te,W,be,15,x[62]),W=ie(W,ne,ye,Te,se,21,x[63]),fe[0]=fe[0]+Te|0,fe[1]=fe[1]+W|0,fe[2]=fe[2]+ne|0,fe[3]=fe[3]+ye|0},_doFinalize:function(){var he=this._data,ae=he.words,de=8*this._nDataBytes,Y=8*he.sigBytes;ae[Y>>>5]|=128<<24-Y%32;var te=P.floor(de/4294967296),fe=de;ae[15+(Y+64>>>9<<4)]=16711935&(te<<8|te>>>24)|4278255360&(te<<24|te>>>8),ae[14+(Y+64>>>9<<4)]=16711935&(fe<<8|fe>>>24)|4278255360&(fe<<24|fe>>>8),he.sigBytes=4*(ae.length+1),this._process();for(var Re=this._hash,ve=Re.words,be=0;be<4;be++){var ue=ve[be];ve[be]=16711935&(ue<<8|ue>>>24)|4278255360&(ue<<24|ue>>>8)}return Re},clone:function(){var he=R.clone.call(this);return he._hash=this._hash.clone(),he}});function K(he,ae,de,Y,te,fe,Re){var ve=he+(ae&de|~ae&Y)+te+Re;return(ve<>>32-fe)+ae}function re(he,ae,de,Y,te,fe,Re){var ve=he+(ae&Y|de&~Y)+te+Re;return(ve<>>32-fe)+ae}function X(he,ae,de,Y,te,fe,Re){var ve=he+(ae^de^Y)+te+Re;return(ve<>>32-fe)+ae}function ie(he,ae,de,Y,te,fe,Re){var ve=he+(de^(ae|~Y))+te+Re;return(ve<>>32-fe)+ae}B.MD5=R._createHelper(Z),B.HmacMD5=R._createHmacHelper(Z)}(Math),function(){var P=q,B=P.lib,j=B.WordArray,$=B.Hasher,R=P.algo,T=[],x=R.SHA1=$.extend({_doReset:function(){this._hash=new j.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(Z,K){for(var re=this._hash.words,X=re[0],ie=re[1],he=re[2],ae=re[3],de=re[4],Y=0;Y<80;Y++){if(Y<16)T[Y]=0|Z[K+Y];else{var te=T[Y-3]^T[Y-8]^T[Y-14]^T[Y-16];T[Y]=te<<1|te>>>31}var fe=(X<<5|X>>>27)+de+T[Y];fe+=Y<20?1518500249+(ie&he|~ie&ae):Y<40?1859775393+(ie^he^ae):Y<60?(ie&he|ie&ae|he&ae)-1894007588:(ie^he^ae)-899497514,de=ae,ae=he,he=ie<<30|ie>>>2,ie=X,X=fe}re[0]=re[0]+X|0,re[1]=re[1]+ie|0,re[2]=re[2]+he|0,re[3]=re[3]+ae|0,re[4]=re[4]+de|0},_doFinalize:function(){var Z=this._data,K=Z.words,re=8*this._nDataBytes,X=8*Z.sigBytes;return K[X>>>5]|=128<<24-X%32,K[14+(X+64>>>9<<4)]=Math.floor(re/4294967296),K[15+(X+64>>>9<<4)]=re,Z.sigBytes=4*K.length,this._process(),this._hash},clone:function(){var Z=$.clone.call(this);return Z._hash=this._hash.clone(),Z}});P.SHA1=$._createHelper(x),P.HmacSHA1=$._createHmacHelper(x)}(),function(P){var B=q,j=B.lib,$=j.WordArray,R=j.Hasher,T=B.algo,x=[],Z=[];(function(){function X(de){for(var Y=P.sqrt(de),te=2;te<=Y;te++)if(!(de%te))return!1;return!0}function ie(de){return 4294967296*(de-(0|de))|0}for(var he=2,ae=0;ae<64;)X(he)&&(ae<8&&(x[ae]=ie(P.pow(he,.5))),Z[ae]=ie(P.pow(he,1/3)),ae++),he++})();var K=[],re=T.SHA256=R.extend({_doReset:function(){this._hash=new $.init(x.slice(0))},_doProcessBlock:function(X,ie){for(var he=this._hash.words,ae=he[0],de=he[1],Y=he[2],te=he[3],fe=he[4],Re=he[5],ve=he[6],be=he[7],ue=0;ue<64;ue++){if(ue<16)K[ue]=0|X[ie+ue];else{var ce=K[ue-15],Ee=(ce<<25|ce>>>7)^(ce<<14|ce>>>18)^ce>>>3,pe=K[ue-2],V=(pe<<15|pe>>>17)^(pe<<13|pe>>>19)^pe>>>10;K[ue]=Ee+K[ue-7]+V+K[ue-16]}var ee=ae&de^ae&Y^de&Y,se=(ae<<30|ae>>>2)^(ae<<19|ae>>>13)^(ae<<10|ae>>>22),Ce=be+((fe<<26|fe>>>6)^(fe<<21|fe>>>11)^(fe<<7|fe>>>25))+(fe&Re^~fe&ve)+Z[ue]+K[ue];be=ve,ve=Re,Re=fe,fe=te+Ce|0,te=Y,Y=de,de=ae,ae=Ce+(se+ee)|0}he[0]=he[0]+ae|0,he[1]=he[1]+de|0,he[2]=he[2]+Y|0,he[3]=he[3]+te|0,he[4]=he[4]+fe|0,he[5]=he[5]+Re|0,he[6]=he[6]+ve|0,he[7]=he[7]+be|0},_doFinalize:function(){var X=this._data,ie=X.words,he=8*this._nDataBytes,ae=8*X.sigBytes;return ie[ae>>>5]|=128<<24-ae%32,ie[14+(ae+64>>>9<<4)]=P.floor(he/4294967296),ie[15+(ae+64>>>9<<4)]=he,X.sigBytes=4*ie.length,this._process(),this._hash},clone:function(){var X=R.clone.call(this);return X._hash=this._hash.clone(),X}});B.SHA256=R._createHelper(re),B.HmacSHA256=R._createHmacHelper(re)}(Math),function(){var P=q,B=P.lib.WordArray,j=P.enc;function $(R){return R<<8&4278255360|R>>>8&16711935}j.Utf16=j.Utf16BE={stringify:function(R){for(var T=R.words,x=R.sigBytes,Z=[],K=0;K>>2]>>>16-K%4*8&65535;Z.push(String.fromCharCode(re))}return Z.join("")},parse:function(R){for(var T=R.length,x=[],Z=0;Z>>1]|=R.charCodeAt(Z)<<16-Z%2*16;return B.create(x,2*T)}},j.Utf16LE={stringify:function(R){for(var T=R.words,x=R.sigBytes,Z=[],K=0;K>>2]>>>16-K%4*8&65535);Z.push(String.fromCharCode(re))}return Z.join("")},parse:function(R){for(var T=R.length,x=[],Z=0;Z>>1]|=$(R.charCodeAt(Z)<<16-Z%2*16);return B.create(x,2*T)}}}(),function(){if(typeof ArrayBuffer=="function"){var P=q.lib.WordArray,B=P.init;(P.init=function(j){if(j instanceof ArrayBuffer&&(j=new Uint8Array(j)),(j instanceof Int8Array||typeof Uint8ClampedArray<"u"&&j instanceof Uint8ClampedArray||j instanceof Int16Array||j instanceof Uint16Array||j instanceof Int32Array||j instanceof Uint32Array||j instanceof Float32Array||j instanceof Float64Array)&&(j=new Uint8Array(j.buffer,j.byteOffset,j.byteLength)),j instanceof Uint8Array){for(var $=j.byteLength,R=[],T=0;T<$;T++)R[T>>>2]|=j[T]<<24-T%4*8;B.call(this,R,$)}else B.apply(this,arguments)}).prototype=P}}(),function(P){var B=q,j=B.lib,$=j.WordArray,R=j.Hasher,T=B.algo,x=$.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),Z=$.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),K=$.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),re=$.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),X=$.create([0,1518500249,1859775393,2400959708,2840853838]),ie=$.create([1352829926,1548603684,1836072691,2053994217,0]),he=T.RIPEMD160=R.extend({_doReset:function(){this._hash=$.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(ve,be){for(var ue=0;ue<16;ue++){var ce=be+ue,Ee=ve[ce];ve[ce]=16711935&(Ee<<8|Ee>>>24)|4278255360&(Ee<<24|Ee>>>8)}var pe,V,ee,se,Ce,le,ke,Pe,xe,He,Te,W=this._hash.words,ne=X.words,ye=ie.words,Be=x.words,je=Z.words,ct=K.words,Fe=re.words;for(le=pe=W[0],ke=V=W[1],Pe=ee=W[2],xe=se=W[3],He=Ce=W[4],ue=0;ue<80;ue+=1)Te=pe+ve[be+Be[ue]]|0,Te+=ue<16?ae(V,ee,se)+ne[0]:ue<32?de(V,ee,se)+ne[1]:ue<48?Y(V,ee,se)+ne[2]:ue<64?te(V,ee,se)+ne[3]:fe(V,ee,se)+ne[4],Te=(Te=Re(Te|=0,ct[ue]))+Ce|0,pe=Ce,Ce=se,se=Re(ee,10),ee=V,V=Te,Te=le+ve[be+je[ue]]|0,Te+=ue<16?fe(ke,Pe,xe)+ye[0]:ue<32?te(ke,Pe,xe)+ye[1]:ue<48?Y(ke,Pe,xe)+ye[2]:ue<64?de(ke,Pe,xe)+ye[3]:ae(ke,Pe,xe)+ye[4],Te=(Te=Re(Te|=0,Fe[ue]))+He|0,le=He,He=xe,xe=Re(Pe,10),Pe=ke,ke=Te;Te=W[1]+ee+xe|0,W[1]=W[2]+se+He|0,W[2]=W[3]+Ce+le|0,W[3]=W[4]+pe+ke|0,W[4]=W[0]+V+Pe|0,W[0]=Te},_doFinalize:function(){var ve=this._data,be=ve.words,ue=8*this._nDataBytes,ce=8*ve.sigBytes;be[ce>>>5]|=128<<24-ce%32,be[14+(ce+64>>>9<<4)]=16711935&(ue<<8|ue>>>24)|4278255360&(ue<<24|ue>>>8),ve.sigBytes=4*(be.length+1),this._process();for(var Ee=this._hash,pe=Ee.words,V=0;V<5;V++){var ee=pe[V];pe[V]=16711935&(ee<<8|ee>>>24)|4278255360&(ee<<24|ee>>>8)}return Ee},clone:function(){var ve=R.clone.call(this);return ve._hash=this._hash.clone(),ve}});function ae(ve,be,ue){return ve^be^ue}function de(ve,be,ue){return ve&be|~ve&ue}function Y(ve,be,ue){return(ve|~be)^ue}function te(ve,be,ue){return ve&ue|be&~ue}function fe(ve,be,ue){return ve^(be|~ue)}function Re(ve,be){return ve<>>32-be}B.RIPEMD160=R._createHelper(he),B.HmacRIPEMD160=R._createHmacHelper(he)}(),function(){var P=q,B=P.lib.Base,j=P.enc.Utf8;P.algo.HMAC=B.extend({init:function($,R){$=this._hasher=new $.init,typeof R=="string"&&(R=j.parse(R));var T=$.blockSize,x=4*T;R.sigBytes>x&&(R=$.finalize(R)),R.clamp();for(var Z=this._oKey=R.clone(),K=this._iKey=R.clone(),re=Z.words,X=K.words,ie=0;ie>>24)|4278255360&(fe<<24|fe>>>8),Re=16711935&(Re<<8|Re>>>24)|4278255360&(Re<<24|Re>>>8),(ne=de[te]).high^=Re,ne.low^=fe}for(var ve=0;ve<24;ve++){for(var be=0;be<5;be++){for(var ue=0,ce=0,Ee=0;Ee<5;Ee++)ue^=(ne=de[be+5*Ee]).high,ce^=ne.low;var pe=X[be];pe.high=ue,pe.low=ce}for(be=0;be<5;be++){var V=X[(be+4)%5],ee=X[(be+1)%5],se=ee.high,Ce=ee.low;for(ue=V.high^(se<<1|Ce>>>31),ce=V.low^(Ce<<1|se>>>31),Ee=0;Ee<5;Ee++)(ne=de[be+5*Ee]).high^=ue,ne.low^=ce}for(var le=1;le<25;le++){var ke=(ne=de[le]).high,Pe=ne.low,xe=Z[le];xe<32?(ue=ke<>>32-xe,ce=Pe<>>32-xe):(ue=Pe<>>64-xe,ce=ke<>>64-xe);var He=X[K[le]];He.high=ue,He.low=ce}var Te=X[0],W=de[0];for(Te.high=W.high,Te.low=W.low,be=0;be<5;be++)for(Ee=0;Ee<5;Ee++){var ne=de[le=be+5*Ee],ye=X[le],Be=X[(be+1)%5+5*Ee],je=X[(be+2)%5+5*Ee];ne.high=ye.high^~Be.high&je.high,ne.low=ye.low^~Be.low&je.low}ne=de[0];var ct=re[ve];ne.high^=ct.high,ne.low^=ct.low}},_doFinalize:function(){var he=this._data,ae=he.words,de=(this._nDataBytes,8*he.sigBytes),Y=32*this.blockSize;ae[de>>>5]|=1<<24-de%32,ae[(P.ceil((de+1)/Y)*Y>>>5)-1]|=128,he.sigBytes=4*ae.length,this._process();for(var te=this._state,fe=this.cfg.outputLength/8,Re=fe/8,ve=[],be=0;be>>24)|4278255360&(ce<<24|ce>>>8),Ee=16711935&(Ee<<8|Ee>>>24)|4278255360&(Ee<<24|Ee>>>8),ve.push(Ee),ve.push(ce)}return new $.init(ve,fe)},clone:function(){for(var he=R.clone.call(this),ae=he._state=this._state.slice(0),de=0;de<25;de++)ae[de]=ae[de].clone();return he}});B.SHA3=R._createHelper(ie),B.HmacSHA3=R._createHmacHelper(ie)}(Math),function(){var P=q,B=P.lib.Hasher,j=P.x64,$=j.Word,R=j.WordArray,T=P.algo;function x(){return $.create.apply($,arguments)}var Z=[x(1116352408,3609767458),x(1899447441,602891725),x(3049323471,3964484399),x(3921009573,2173295548),x(961987163,4081628472),x(1508970993,3053834265),x(2453635748,2937671579),x(2870763221,3664609560),x(3624381080,2734883394),x(310598401,1164996542),x(607225278,1323610764),x(1426881987,3590304994),x(1925078388,4068182383),x(2162078206,991336113),x(2614888103,633803317),x(3248222580,3479774868),x(3835390401,2666613458),x(4022224774,944711139),x(264347078,2341262773),x(604807628,2007800933),x(770255983,1495990901),x(1249150122,1856431235),x(1555081692,3175218132),x(1996064986,2198950837),x(2554220882,3999719339),x(2821834349,766784016),x(2952996808,2566594879),x(3210313671,3203337956),x(3336571891,1034457026),x(3584528711,2466948901),x(113926993,3758326383),x(338241895,168717936),x(666307205,1188179964),x(773529912,1546045734),x(1294757372,1522805485),x(1396182291,2643833823),x(1695183700,2343527390),x(1986661051,1014477480),x(2177026350,1206759142),x(2456956037,344077627),x(2730485921,1290863460),x(2820302411,3158454273),x(3259730800,3505952657),x(3345764771,106217008),x(3516065817,3606008344),x(3600352804,1432725776),x(4094571909,1467031594),x(275423344,851169720),x(430227734,3100823752),x(506948616,1363258195),x(659060556,3750685593),x(883997877,3785050280),x(958139571,3318307427),x(1322822218,3812723403),x(1537002063,2003034995),x(1747873779,3602036899),x(1955562222,1575990012),x(2024104815,1125592928),x(2227730452,2716904306),x(2361852424,442776044),x(2428436474,593698344),x(2756734187,3733110249),x(3204031479,2999351573),x(3329325298,3815920427),x(3391569614,3928383900),x(3515267271,566280711),x(3940187606,3454069534),x(4118630271,4000239992),x(116418474,1914138554),x(174292421,2731055270),x(289380356,3203993006),x(460393269,320620315),x(685471733,587496836),x(852142971,1086792851),x(1017036298,365543100),x(1126000580,2618297676),x(1288033470,3409855158),x(1501505948,4234509866),x(1607167915,987167468),x(1816402316,1246189591)],K=[];(function(){for(var X=0;X<80;X++)K[X]=x()})();var re=T.SHA512=B.extend({_doReset:function(){this._hash=new R.init([new $.init(1779033703,4089235720),new $.init(3144134277,2227873595),new $.init(1013904242,4271175723),new $.init(2773480762,1595750129),new $.init(1359893119,2917565137),new $.init(2600822924,725511199),new $.init(528734635,4215389547),new $.init(1541459225,327033209)])},_doProcessBlock:function(X,ie){for(var he=this._hash.words,ae=he[0],de=he[1],Y=he[2],te=he[3],fe=he[4],Re=he[5],ve=he[6],be=he[7],ue=ae.high,ce=ae.low,Ee=de.high,pe=de.low,V=Y.high,ee=Y.low,se=te.high,Ce=te.low,le=fe.high,ke=fe.low,Pe=Re.high,xe=Re.low,He=ve.high,Te=ve.low,W=be.high,ne=be.low,ye=ue,Be=ce,je=Ee,ct=pe,Fe=V,at=ee,St=se,vn=Ce,Cn=le,Tn=ke,An=Pe,yn=xe,nt=He,bt=Te,Pt=W,ln=ne,tn=0;tn<80;tn++){var wn,Vn,ze=K[tn];if(tn<16)Vn=ze.high=0|X[ie+2*tn],wn=ze.low=0|X[ie+2*tn+1];else{var kt=K[tn-15],Mt=kt.high,qt=kt.low,Jt=(Mt>>>1|qt<<31)^(Mt>>>8|qt<<24)^Mt>>>7,Mr=(qt>>>1|Mt<<31)^(qt>>>8|Mt<<24)^(qt>>>7|Mt<<25),Sr=K[tn-2],Qo=Sr.high,go=Sr.low,Ge=(Qo>>>19|go<<13)^(Qo<<3|go>>>29)^Qo>>>6,et=(go>>>19|Qo<<13)^(go<<3|Qo>>>29)^(go>>>6|Qo<<26),Vt=K[tn-7],Sn=Vt.high,In=Vt.low,xn=K[tn-16],Kr=xn.high,Gr=xn.low;Vn=(Vn=(Vn=Jt+Sn+((wn=Mr+In)>>>0>>0?1:0))+Ge+((wn+=et)>>>0>>0?1:0))+Kr+((wn+=Gr)>>>0>>0?1:0),ze.high=Vn,ze.low=wn}var ro,ds=Cn&An^~Cn&nt,U=Tn&yn^~Tn&bt,fs=ye&je^ye&Fe^je&Fe,Gt=Be&ct^Be&at^ct&at,Il=(ye>>>28|Be<<4)^(ye<<30|Be>>>2)^(ye<<25|Be>>>7),ra=(Be>>>28|ye<<4)^(Be<<30|ye>>>2)^(Be<<25|ye>>>7),Cl=(Cn>>>14|Tn<<18)^(Cn>>>18|Tn<<14)^(Cn<<23|Tn>>>9),Tl=(Tn>>>14|Cn<<18)^(Tn>>>18|Cn<<14)^(Tn<<23|Cn>>>9),Fa=Z[tn],ei=Fa.high,$a=Fa.low,ps=Pt+Cl+((ro=ln+Tl)>>>0>>0?1:0),Qi=ra+Gt;Pt=nt,ln=bt,nt=An,bt=yn,An=Cn,yn=Tn,Cn=St+(ps=(ps=(ps=ps+ds+((ro+=U)>>>0>>0?1:0))+ei+((ro+=$a)>>>0<$a>>>0?1:0))+Vn+((ro+=wn)>>>0>>0?1:0))+((Tn=vn+ro|0)>>>0>>0?1:0)|0,St=Fe,vn=at,Fe=je,at=ct,je=ye,ct=Be,ye=ps+(Il+fs+(Qi>>>0>>0?1:0))+((Be=ro+Qi|0)>>>0>>0?1:0)|0}ce=ae.low=ce+Be,ae.high=ue+ye+(ce>>>0>>0?1:0),pe=de.low=pe+ct,de.high=Ee+je+(pe>>>0>>0?1:0),ee=Y.low=ee+at,Y.high=V+Fe+(ee>>>0>>0?1:0),Ce=te.low=Ce+vn,te.high=se+St+(Ce>>>0>>0?1:0),ke=fe.low=ke+Tn,fe.high=le+Cn+(ke>>>0>>0?1:0),xe=Re.low=xe+yn,Re.high=Pe+An+(xe>>>0>>0?1:0),Te=ve.low=Te+bt,ve.high=He+nt+(Te>>>0>>0?1:0),ne=be.low=ne+ln,be.high=W+Pt+(ne>>>0>>0?1:0)},_doFinalize:function(){var X=this._data,ie=X.words,he=8*this._nDataBytes,ae=8*X.sigBytes;return ie[ae>>>5]|=128<<24-ae%32,ie[30+(ae+128>>>10<<5)]=Math.floor(he/4294967296),ie[31+(ae+128>>>10<<5)]=he,X.sigBytes=4*ie.length,this._process(),this._hash.toX32()},clone:function(){var X=B.clone.call(this);return X._hash=this._hash.clone(),X},blockSize:32});P.SHA512=B._createHelper(re),P.HmacSHA512=B._createHmacHelper(re)}(),function(){var P=q,B=P.x64,j=B.Word,$=B.WordArray,R=P.algo,T=R.SHA512,x=R.SHA384=T.extend({_doReset:function(){this._hash=new $.init([new j.init(3418070365,3238371032),new j.init(1654270250,914150663),new j.init(2438529370,812702999),new j.init(355462360,4144912697),new j.init(1731405415,4290775857),new j.init(2394180231,1750603025),new j.init(3675008525,1694076839),new j.init(1203062813,3204075428)])},_doFinalize:function(){var Z=T._doFinalize.call(this);return Z.sigBytes-=16,Z}});P.SHA384=T._createHelper(x),P.HmacSHA384=T._createHmacHelper(x)}(),q.lib.Cipher||function(P){var B=q,j=B.lib,$=j.Base,R=j.WordArray,T=j.BufferedBlockAlgorithm,x=B.enc,Z=(x.Utf8,x.Base64),K=B.algo.EvpKDF,re=j.Cipher=T.extend({cfg:$.extend(),createEncryptor:function(ve,be){return this.create(this._ENC_XFORM_MODE,ve,be)},createDecryptor:function(ve,be){return this.create(this._DEC_XFORM_MODE,ve,be)},init:function(ve,be,ue){this.cfg=this.cfg.extend(ue),this._xformMode=ve,this._key=be,this.reset()},reset:function(){T.reset.call(this),this._doReset()},process:function(ve){return this._append(ve),this._process()},finalize:function(ve){return ve&&this._append(ve),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function ve(be){return typeof be=="string"?Re:te}return function(be){return{encrypt:function(ue,ce,Ee){return ve(ce).encrypt(be,ue,ce,Ee)},decrypt:function(ue,ce,Ee){return ve(ce).decrypt(be,ue,ce,Ee)}}}}()}),X=(j.StreamCipher=re.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),B.mode={}),ie=j.BlockCipherMode=$.extend({createEncryptor:function(ve,be){return this.Encryptor.create(ve,be)},createDecryptor:function(ve,be){return this.Decryptor.create(ve,be)},init:function(ve,be){this._cipher=ve,this._iv=be}}),he=X.CBC=function(){var ve=ie.extend();function be(ue,ce,Ee){var pe,V=this._iv;V?(pe=V,this._iv=void 0):pe=this._prevBlock;for(var ee=0;ee>>2];ve.sigBytes-=be}},de=(j.BlockCipher=re.extend({cfg:re.cfg.extend({mode:he,padding:ae}),reset:function(){var ve;re.reset.call(this);var be=this.cfg,ue=be.iv,ce=be.mode;this._xformMode==this._ENC_XFORM_MODE?ve=ce.createEncryptor:(ve=ce.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==ve?this._mode.init(this,ue&&ue.words):(this._mode=ve.call(ce,this,ue&&ue.words),this._mode.__creator=ve)},_doProcessBlock:function(ve,be){this._mode.processBlock(ve,be)},_doFinalize:function(){var ve,be=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(be.pad(this._data,this.blockSize),ve=this._process(!0)):(ve=this._process(!0),be.unpad(ve)),ve},blockSize:4}),j.CipherParams=$.extend({init:function(ve){this.mixIn(ve)},toString:function(ve){return(ve||this.formatter).stringify(this)}})),Y=(B.format={}).OpenSSL={stringify:function(ve){var be=ve.ciphertext,ue=ve.salt;return(ue?R.create([1398893684,1701076831]).concat(ue).concat(be):be).toString(Z)},parse:function(ve){var be,ue=Z.parse(ve),ce=ue.words;return ce[0]==1398893684&&ce[1]==1701076831&&(be=R.create(ce.slice(2,4)),ce.splice(0,4),ue.sigBytes-=16),de.create({ciphertext:ue,salt:be})}},te=j.SerializableCipher=$.extend({cfg:$.extend({format:Y}),encrypt:function(ve,be,ue,ce){ce=this.cfg.extend(ce);var Ee=ve.createEncryptor(ue,ce),pe=Ee.finalize(be),V=Ee.cfg;return de.create({ciphertext:pe,key:ue,iv:V.iv,algorithm:ve,mode:V.mode,padding:V.padding,blockSize:ve.blockSize,formatter:ce.format})},decrypt:function(ve,be,ue,ce){return ce=this.cfg.extend(ce),be=this._parse(be,ce.format),ve.createDecryptor(ue,ce).finalize(be.ciphertext)},_parse:function(ve,be){return typeof ve=="string"?be.parse(ve,this):ve}}),fe=(B.kdf={}).OpenSSL={execute:function(ve,be,ue,ce){ce||(ce=R.random(8));var Ee=K.create({keySize:be+ue}).compute(ve,ce),pe=R.create(Ee.words.slice(be),4*ue);return Ee.sigBytes=4*be,de.create({key:Ee,iv:pe,salt:ce})}},Re=j.PasswordBasedCipher=te.extend({cfg:te.cfg.extend({kdf:fe}),encrypt:function(ve,be,ue,ce){var Ee=(ce=this.cfg.extend(ce)).kdf.execute(ue,ve.keySize,ve.ivSize);ce.iv=Ee.iv;var pe=te.encrypt.call(this,ve,be,Ee.key,ce);return pe.mixIn(Ee),pe},decrypt:function(ve,be,ue,ce){ce=this.cfg.extend(ce),be=this._parse(be,ce.format);var Ee=ce.kdf.execute(ue,ve.keySize,ve.ivSize,be.salt);return ce.iv=Ee.iv,te.decrypt.call(this,ve,be,Ee.key,ce)}})}(),q.mode.CFB=function(){var P=q.lib.BlockCipherMode.extend();function B(j,$,R,T){var x,Z=this._iv;Z?(x=Z.slice(0),this._iv=void 0):x=this._prevBlock,T.encryptBlock(x,0);for(var K=0;K>>2]|=R<<24-T%4*8,P.sigBytes+=R},unpad:function(P){var B=255&P.words[P.sigBytes-1>>>2];P.sigBytes-=B}},q.pad.Iso10126={pad:function(P,B){var j=4*B,$=j-P.sigBytes%j;P.concat(q.lib.WordArray.random($-1)).concat(q.lib.WordArray.create([$<<24],1))},unpad:function(P){var B=255&P.words[P.sigBytes-1>>>2];P.sigBytes-=B}},q.pad.Iso97971={pad:function(P,B){P.concat(q.lib.WordArray.create([2147483648],1)),q.pad.ZeroPadding.pad(P,B)},unpad:function(P){q.pad.ZeroPadding.unpad(P),P.sigBytes--}},q.mode.OFB=(S=q.lib.BlockCipherMode.extend(),L=S.Encryptor=S.extend({processBlock:function(P,B){var j=this._cipher,$=j.blockSize,R=this._iv,T=this._keystream;R&&(T=this._keystream=R.slice(0),this._iv=void 0),j.encryptBlock(T,0);for(var x=0;x<$;x++)P[B+x]^=T[x]}}),S.Decryptor=L,S),q.pad.NoPadding={pad:function(){},unpad:function(){}},function(P){var B=q,j=B.lib.CipherParams,$=B.enc.Hex;B.format.Hex={stringify:function(R){return R.ciphertext.toString($)},parse:function(R){var T=$.parse(R);return j.create({ciphertext:T})}}}(),function(){var P=q,B=P.lib.BlockCipher,j=P.algo,$=[],R=[],T=[],x=[],Z=[],K=[],re=[],X=[],ie=[],he=[];(function(){for(var Y=[],te=0;te<256;te++)Y[te]=te<128?te<<1:te<<1^283;var fe=0,Re=0;for(te=0;te<256;te++){var ve=Re^Re<<1^Re<<2^Re<<3^Re<<4;ve=ve>>>8^255&ve^99,$[fe]=ve,R[ve]=fe;var be=Y[fe],ue=Y[be],ce=Y[ue],Ee=257*Y[ve]^16843008*ve;T[fe]=Ee<<24|Ee>>>8,x[fe]=Ee<<16|Ee>>>16,Z[fe]=Ee<<8|Ee>>>24,K[fe]=Ee,Ee=16843009*ce^65537*ue^257*be^16843008*fe,re[ve]=Ee<<24|Ee>>>8,X[ve]=Ee<<16|Ee>>>16,ie[ve]=Ee<<8|Ee>>>24,he[ve]=Ee,fe?(fe=be^Y[Y[Y[ce^be]]],Re^=Y[Y[Re]]):fe=Re=1}})();var ae=[0,1,2,4,8,16,32,64,128,27,54],de=j.AES=B.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var Y=this._keyPriorReset=this._key,te=Y.words,fe=Y.sigBytes/4,Re=4*((this._nRounds=fe+6)+1),ve=this._keySchedule=[],be=0;be6&&be%fe==4&&(Ee=$[Ee>>>24]<<24|$[Ee>>>16&255]<<16|$[Ee>>>8&255]<<8|$[255&Ee]):(Ee=$[(Ee=Ee<<8|Ee>>>24)>>>24]<<24|$[Ee>>>16&255]<<16|$[Ee>>>8&255]<<8|$[255&Ee],Ee^=ae[be/fe|0]<<24),ve[be]=ve[be-fe]^Ee);for(var ue=this._invKeySchedule=[],ce=0;ce>>24]]^X[$[Ee>>>16&255]]^ie[$[Ee>>>8&255]]^he[$[255&Ee]]}}},encryptBlock:function(Y,te){this._doCryptBlock(Y,te,this._keySchedule,T,x,Z,K,$)},decryptBlock:function(Y,te){var fe=Y[te+1];Y[te+1]=Y[te+3],Y[te+3]=fe,this._doCryptBlock(Y,te,this._invKeySchedule,re,X,ie,he,R),fe=Y[te+1],Y[te+1]=Y[te+3],Y[te+3]=fe},_doCryptBlock:function(Y,te,fe,Re,ve,be,ue,ce){for(var Ee=this._nRounds,pe=Y[te]^fe[0],V=Y[te+1]^fe[1],ee=Y[te+2]^fe[2],se=Y[te+3]^fe[3],Ce=4,le=1;le>>24]^ve[V>>>16&255]^be[ee>>>8&255]^ue[255&se]^fe[Ce++],Pe=Re[V>>>24]^ve[ee>>>16&255]^be[se>>>8&255]^ue[255&pe]^fe[Ce++],xe=Re[ee>>>24]^ve[se>>>16&255]^be[pe>>>8&255]^ue[255&V]^fe[Ce++],He=Re[se>>>24]^ve[pe>>>16&255]^be[V>>>8&255]^ue[255&ee]^fe[Ce++];pe=ke,V=Pe,ee=xe,se=He}ke=(ce[pe>>>24]<<24|ce[V>>>16&255]<<16|ce[ee>>>8&255]<<8|ce[255&se])^fe[Ce++],Pe=(ce[V>>>24]<<24|ce[ee>>>16&255]<<16|ce[se>>>8&255]<<8|ce[255&pe])^fe[Ce++],xe=(ce[ee>>>24]<<24|ce[se>>>16&255]<<16|ce[pe>>>8&255]<<8|ce[255&V])^fe[Ce++],He=(ce[se>>>24]<<24|ce[pe>>>16&255]<<16|ce[V>>>8&255]<<8|ce[255&ee])^fe[Ce++],Y[te]=ke,Y[te+1]=Pe,Y[te+2]=xe,Y[te+3]=He},keySize:8});P.AES=B._createHelper(de)}(),function(){var P=q,B=P.lib,j=B.WordArray,$=B.BlockCipher,R=P.algo,T=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],x=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],Z=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],K=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],re=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],X=R.DES=$.extend({_doReset:function(){for(var de=this._key.words,Y=[],te=0;te<56;te++){var fe=T[te]-1;Y[te]=de[fe>>>5]>>>31-fe%32&1}for(var Re=this._subKeys=[],ve=0;ve<16;ve++){var be=Re[ve]=[],ue=Z[ve];for(te=0;te<24;te++)be[te/6|0]|=Y[(x[te]-1+ue)%28]<<31-te%6,be[4+(te/6|0)]|=Y[28+(x[te+24]-1+ue)%28]<<31-te%6;for(be[0]=be[0]<<1|be[0]>>>31,te=1;te<7;te++)be[te]=be[te]>>>4*(te-1)+3;be[7]=be[7]<<5|be[7]>>>27}var ce=this._invSubKeys=[];for(te=0;te<16;te++)ce[te]=Re[15-te]},encryptBlock:function(de,Y){this._doCryptBlock(de,Y,this._subKeys)},decryptBlock:function(de,Y){this._doCryptBlock(de,Y,this._invSubKeys)},_doCryptBlock:function(de,Y,te){this._lBlock=de[Y],this._rBlock=de[Y+1],ie.call(this,4,252645135),ie.call(this,16,65535),he.call(this,2,858993459),he.call(this,8,16711935),ie.call(this,1,1431655765);for(var fe=0;fe<16;fe++){for(var Re=te[fe],ve=this._lBlock,be=this._rBlock,ue=0,ce=0;ce<8;ce++)ue|=K[ce][((be^Re[ce])&re[ce])>>>0];this._lBlock=be,this._rBlock=ve^ue}var Ee=this._lBlock;this._lBlock=this._rBlock,this._rBlock=Ee,ie.call(this,1,1431655765),he.call(this,8,16711935),he.call(this,2,858993459),ie.call(this,16,65535),ie.call(this,4,252645135),de[Y]=this._lBlock,de[Y+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function ie(de,Y){var te=(this._lBlock>>>de^this._rBlock)&Y;this._rBlock^=te,this._lBlock^=te<>>de^this._lBlock)&Y;this._lBlock^=te,this._rBlock^=te<192.");var Y=de.slice(0,2),te=de.length<4?de.slice(0,2):de.slice(2,4),fe=de.length<6?de.slice(0,2):de.slice(4,6);this._des1=X.createEncryptor(j.create(Y)),this._des2=X.createEncryptor(j.create(te)),this._des3=X.createEncryptor(j.create(fe))},encryptBlock:function(de,Y){this._des1.encryptBlock(de,Y),this._des2.decryptBlock(de,Y),this._des3.encryptBlock(de,Y)},decryptBlock:function(de,Y){this._des3.decryptBlock(de,Y),this._des2.encryptBlock(de,Y),this._des1.decryptBlock(de,Y)},keySize:6,ivSize:2,blockSize:2});P.TripleDES=$._createHelper(ae)}(),function(){var P=q,B=P.lib.StreamCipher,j=P.algo,$=j.RC4=B.extend({_doReset:function(){for(var x=this._key,Z=x.words,K=x.sigBytes,re=this._S=[],X=0;X<256;X++)re[X]=X;X=0;for(var ie=0;X<256;X++){var he=X%K,ae=Z[he>>>2]>>>24-he%4*8&255;ie=(ie+re[X]+ae)%256;var de=re[X];re[X]=re[ie],re[ie]=de}this._i=this._j=0},_doProcessBlock:function(x,Z){x[Z]^=R.call(this)},keySize:8,ivSize:0});function R(){for(var x=this._S,Z=this._i,K=this._j,re=0,X=0;X<4;X++){K=(K+x[Z=(Z+1)%256])%256;var ie=x[Z];x[Z]=x[K],x[K]=ie,re|=x[(x[Z]+x[K])%256]<<24-8*X}return this._i=Z,this._j=K,re}P.RC4=B._createHelper($);var T=j.RC4Drop=$.extend({cfg:$.cfg.extend({drop:192}),_doReset:function(){$._doReset.call(this);for(var x=this.cfg.drop;x>0;x--)R.call(this)}});P.RC4Drop=B._createHelper(T)}(),q.mode.CTRGladman=function(){var P=q.lib.BlockCipherMode.extend();function B($){if(($>>24&255)==255){var R=$>>16&255,T=$>>8&255,x=255&$;R===255?(R=0,T===255?(T=0,x===255?x=0:++x):++T):++R,$=0,$+=R<<16,$+=T<<8,$+=x}else $+=1<<24;return $}var j=P.Encryptor=P.extend({processBlock:function($,R){var T=this._cipher,x=T.blockSize,Z=this._iv,K=this._counter;Z&&(K=this._counter=Z.slice(0),this._iv=void 0),function(ie){(ie[0]=B(ie[0]))===0&&(ie[1]=B(ie[1]))}(K);var re=K.slice(0);T.encryptBlock(re,0);for(var X=0;X>>24)|4278255360&(K[X]<<24|K[X]>>>8);var ie=this._X=[K[0],K[3]<<16|K[2]>>>16,K[1],K[0]<<16|K[3]>>>16,K[2],K[1]<<16|K[0]>>>16,K[3],K[2]<<16|K[1]>>>16],he=this._C=[K[2]<<16|K[2]>>>16,4294901760&K[0]|65535&K[1],K[3]<<16|K[3]>>>16,4294901760&K[1]|65535&K[2],K[0]<<16|K[0]>>>16,4294901760&K[2]|65535&K[3],K[1]<<16|K[1]>>>16,4294901760&K[3]|65535&K[0]];for(this._b=0,X=0;X<4;X++)Z.call(this);for(X=0;X<8;X++)he[X]^=ie[X+4&7];if(re){var ae=re.words,de=ae[0],Y=ae[1],te=16711935&(de<<8|de>>>24)|4278255360&(de<<24|de>>>8),fe=16711935&(Y<<8|Y>>>24)|4278255360&(Y<<24|Y>>>8),Re=te>>>16|4294901760&fe,ve=fe<<16|65535&te;for(he[0]^=te,he[1]^=Re,he[2]^=fe,he[3]^=ve,he[4]^=te,he[5]^=Re,he[6]^=fe,he[7]^=ve,X=0;X<4;X++)Z.call(this)}},_doProcessBlock:function(K,re){var X=this._X;Z.call(this),$[0]=X[0]^X[5]>>>16^X[3]<<16,$[1]=X[2]^X[7]>>>16^X[5]<<16,$[2]=X[4]^X[1]>>>16^X[7]<<16,$[3]=X[6]^X[3]>>>16^X[1]<<16;for(var ie=0;ie<4;ie++)$[ie]=16711935&($[ie]<<8|$[ie]>>>24)|4278255360&($[ie]<<24|$[ie]>>>8),K[re+ie]^=$[ie]},blockSize:4,ivSize:2});function Z(){for(var K=this._X,re=this._C,X=0;X<8;X++)R[X]=re[X];for(re[0]=re[0]+1295307597+this._b|0,re[1]=re[1]+3545052371+(re[0]>>>0>>0?1:0)|0,re[2]=re[2]+886263092+(re[1]>>>0>>0?1:0)|0,re[3]=re[3]+1295307597+(re[2]>>>0>>0?1:0)|0,re[4]=re[4]+3545052371+(re[3]>>>0>>0?1:0)|0,re[5]=re[5]+886263092+(re[4]>>>0>>0?1:0)|0,re[6]=re[6]+1295307597+(re[5]>>>0>>0?1:0)|0,re[7]=re[7]+3545052371+(re[6]>>>0>>0?1:0)|0,this._b=re[7]>>>0>>0?1:0,X=0;X<8;X++){var ie=K[X]+re[X],he=65535&ie,ae=ie>>>16,de=((he*he>>>17)+he*ae>>>15)+ae*ae,Y=((4294901760&ie)*ie|0)+((65535&ie)*ie|0);T[X]=de^Y}K[0]=T[0]+(T[7]<<16|T[7]>>>16)+(T[6]<<16|T[6]>>>16)|0,K[1]=T[1]+(T[0]<<8|T[0]>>>24)+T[7]|0,K[2]=T[2]+(T[1]<<16|T[1]>>>16)+(T[0]<<16|T[0]>>>16)|0,K[3]=T[3]+(T[2]<<8|T[2]>>>24)+T[1]|0,K[4]=T[4]+(T[3]<<16|T[3]>>>16)+(T[2]<<16|T[2]>>>16)|0,K[5]=T[5]+(T[4]<<8|T[4]>>>24)+T[3]|0,K[6]=T[6]+(T[5]<<16|T[5]>>>16)+(T[4]<<16|T[4]>>>16)|0,K[7]=T[7]+(T[6]<<8|T[6]>>>24)+T[5]|0}P.Rabbit=B._createHelper(x)}(),q.mode.CTR=function(){var P=q.lib.BlockCipherMode.extend(),B=P.Encryptor=P.extend({processBlock:function(j,$){var R=this._cipher,T=R.blockSize,x=this._iv,Z=this._counter;x&&(Z=this._counter=x.slice(0),this._iv=void 0);var K=Z.slice(0);R.encryptBlock(K,0),Z[T-1]=Z[T-1]+1|0;for(var re=0;re>>16,K[1],K[0]<<16|K[3]>>>16,K[2],K[1]<<16|K[0]>>>16,K[3],K[2]<<16|K[1]>>>16],ie=this._C=[K[2]<<16|K[2]>>>16,4294901760&K[0]|65535&K[1],K[3]<<16|K[3]>>>16,4294901760&K[1]|65535&K[2],K[0]<<16|K[0]>>>16,4294901760&K[2]|65535&K[3],K[1]<<16|K[1]>>>16,4294901760&K[3]|65535&K[0]];this._b=0;for(var he=0;he<4;he++)Z.call(this);for(he=0;he<8;he++)ie[he]^=X[he+4&7];if(re){var ae=re.words,de=ae[0],Y=ae[1],te=16711935&(de<<8|de>>>24)|4278255360&(de<<24|de>>>8),fe=16711935&(Y<<8|Y>>>24)|4278255360&(Y<<24|Y>>>8),Re=te>>>16|4294901760&fe,ve=fe<<16|65535&te;for(ie[0]^=te,ie[1]^=Re,ie[2]^=fe,ie[3]^=ve,ie[4]^=te,ie[5]^=Re,ie[6]^=fe,ie[7]^=ve,he=0;he<4;he++)Z.call(this)}},_doProcessBlock:function(K,re){var X=this._X;Z.call(this),$[0]=X[0]^X[5]>>>16^X[3]<<16,$[1]=X[2]^X[7]>>>16^X[5]<<16,$[2]=X[4]^X[1]>>>16^X[7]<<16,$[3]=X[6]^X[3]>>>16^X[1]<<16;for(var ie=0;ie<4;ie++)$[ie]=16711935&($[ie]<<8|$[ie]>>>24)|4278255360&($[ie]<<24|$[ie]>>>8),K[re+ie]^=$[ie]},blockSize:4,ivSize:2});function Z(){for(var K=this._X,re=this._C,X=0;X<8;X++)R[X]=re[X];for(re[0]=re[0]+1295307597+this._b|0,re[1]=re[1]+3545052371+(re[0]>>>0>>0?1:0)|0,re[2]=re[2]+886263092+(re[1]>>>0>>0?1:0)|0,re[3]=re[3]+1295307597+(re[2]>>>0>>0?1:0)|0,re[4]=re[4]+3545052371+(re[3]>>>0>>0?1:0)|0,re[5]=re[5]+886263092+(re[4]>>>0>>0?1:0)|0,re[6]=re[6]+1295307597+(re[5]>>>0>>0?1:0)|0,re[7]=re[7]+3545052371+(re[6]>>>0>>0?1:0)|0,this._b=re[7]>>>0>>0?1:0,X=0;X<8;X++){var ie=K[X]+re[X],he=65535&ie,ae=ie>>>16,de=((he*he>>>17)+he*ae>>>15)+ae*ae,Y=((4294901760&ie)*ie|0)+((65535&ie)*ie|0);T[X]=de^Y}K[0]=T[0]+(T[7]<<16|T[7]>>>16)+(T[6]<<16|T[6]>>>16)|0,K[1]=T[1]+(T[0]<<8|T[0]>>>24)+T[7]|0,K[2]=T[2]+(T[1]<<16|T[1]>>>16)+(T[0]<<16|T[0]>>>16)|0,K[3]=T[3]+(T[2]<<8|T[2]>>>24)+T[1]|0,K[4]=T[4]+(T[3]<<16|T[3]>>>16)+(T[2]<<16|T[2]>>>16)|0,K[5]=T[5]+(T[4]<<8|T[4]>>>24)+T[3]|0,K[6]=T[6]+(T[5]<<16|T[5]>>>16)+(T[4]<<16|T[4]>>>16)|0,K[7]=T[7]+(T[6]<<8|T[6]>>>24)+T[5]|0}P.RabbitLegacy=B._createHelper(x)}(),q.pad.ZeroPadding={pad:function(P,B){var j=4*B;P.clamp(),P.sigBytes+=j-(P.sigBytes%j||j)},unpad:function(P){var B=P.words,j=P.sigBytes-1;for(j=P.sigBytes-1;j>=0;j--)if(B[j>>>2]>>>24-j%4*8&255){P.sigBytes=j+1;break}}},q)});return function(){function k(w){n(this,k);var S=w.logger,L=w.isArray,A=w.isMap,O=w.isDevMode;this._isArray=L,this._isMap=A,this._isDevMode=O,S.log("TIMProfanityFilterPlugin.VERSION:".concat("0.9.0")),this._interceptProfanityList=[],this._interceptFilter=null,this._interceptRegExpList=[],this._replacingProfanityMap=new Map,this._replacingFilter=null,this._replacingRegExpMap=new Map,this._key="",this._iv="",this._decryptOptions=void 0}return o(k,[{key:"onToken",value:function(w){this._key=I.enc.Utf8.parse(w.slice(0,32)),this._iv=this._key,this._decryptOptions={iv:this._iv,mode:I.mode.CBC,padding:I.pad.Pkcs7}}},{key:"onLexiconSliced",value:function(w){if(this._isArray(w)&&w.length!==0){var S,L,A,O=f(w);try{for(O.s();!(A=O.n()).done;){var H=A.value,q=H.filterType,P=H.profanityType,B=H.profanity,j=H.replacement;S=this._getDecryptedString(B),L=this._getDecryptedString(j),q===1?P===1?this._interceptProfanityList.push(S):P===2&&this._interceptRegExpList.push(S):q===2&&(P===1?this._replacingProfanityMap.set(S,L):P===2&&this._replacingRegExpMap.set(S,L))}}catch($){O.e($)}finally{O.f()}}}},{key:"_getDecryptedString",value:function(w){var S=I.AES.decrypt(w,this._key,this._decryptOptions);return I.enc.Utf8.stringify(S).toLowerCase()}},{key:"onLexiconCompleted",value:function(w){this.onLexiconSliced(w),this._interceptFilter=new v({input:this._interceptProfanityList,isArray:this._isArray,isMap:this._isMap}),this._replacingFilter=new v({input:this._replacingProfanityMap,isArray:this._isArray,isMap:this._isMap}),this._isDevMode===!0&&(console.log("TIMProfanityFilterPlugin _interceptProfanityList ->",this._interceptProfanityList),console.log("TIMProfanityFilterPlugin _interceptRegExpList ->",this._interceptRegExpList),console.log("TIMProfanityFilterPlugin _replacingProfanityMap ->",this._replacingProfanityMap),console.log("TIMProfanityFilterPlugin _replacingRegExpMap ->",this._replacingRegExpMap))}},{key:"filter",value:function(w){var S={type:0,modifiedText:w};if(this._interceptFilter.filter({text:w,replacingEnabled:!1}).isMatched===!0)return S.type=1,S;for(var L=!1,A=0,O=this._interceptRegExpList.length;A{})}destroyed(){}component(t,n){}use(t,n){}setAwaitFunc(t,n){}setCommonStore(t){}setComponentStore(t,n,r){}getStore(){}storeCommonListener(t,n){}}class Mpe{setCommonStore(t){}setComponentStore(t,n,r){}storeCommonListener(t,n){}}class Ipe extends Mpe{constructor(){super();Xt(this,"store");Xt(this,"storeListener");this.storeListener={keys:[],callback:()=>{}},this.store={};const n={};this.store.common=new Proxy(n,{get:(r,o)=>r[o],set:(r,o,i)=>{const s={};return Object.assign(s,r),r[o]=i,r[o]!==s[o]&&this.storeListener.keys.indexOf(o)>=0&&this.storeListener.callback(r[o],s[o]),r[o]}})}setCommonStore(n){return Object.keys(n).forEach(r=>{if(r in this.store.common)return new Error(`${r} 在公共数据已存在,请重新设置`);this.store.common[r]=n[r]}),this.store}setComponentStore(n,r,o){return n in this.store?new Error(`${n} 该数据模块已存在,请重新设置`):this.store[n]=new Proxy(r,{get:(i,s)=>i[s],set:(i,s,u)=>{const d={};return Object.assign(d,i),i[s]=u,i[s]!==d[s]&&o&&o(i,d),i}})}storeCommonListener(n,r){this.storeListener={keys:n,callback:r}}}const DD=e=>typeof e=="function",Pr=class Pr extends bpe{constructor(n){super();Xt(this,"isOfficial",!1);Xt(this,"isIntl",!1);Xt(this,"tim");Xt(this,"TIM");Xt(this,"isSDKReady",!1);Xt(this,"store");Xt(this,"TUIEnv");Xt(this,"SDKAppID");Xt(this,"installedPlugins",new Set);Xt(this,"config",{});Xt(this,"TUIServer");Xt(this,"TUIComponents",new Set);Xt(this,"loginResolveRejectCache");this.loginResolveRejectCache=[],this.SDKAppID=n.SDKAppID,this.TUIServer={},this.store=new Ipe,this.TIM=yt,window.TIM=yt,n.tim?window.TUIKit=n.tim:window.TUIKit=yt.create({SDKAppID:this.SDKAppID}),this.tim=window.TUIKit,this.tim.registerPlugin({"tim-upload-plugin":vpe}),this.tim.registerPlugin({"tim-profanity-filter-plugin":_pe}),this.bindTIMEvent(),this.TUIEnv=Yh(),this.isOfficial=this.SDKAppID===1400187352||this.SDKAppID===1400188366}static init(n){return Pr.instance||(Pr.instance=new Pr(n)),Yh(),window.TUIKitTUICore=Pr.instance,Pr.instance.use(tF),Pr.instance.use(xM),Pr.instance}install(n){n.config.globalProperties.$TUIKit=this.getInstance();let r=!0;this.installedPlugins.forEach(o=>{n.use(o),o.name==="TUIComponents"&&(r=!1)}),r&&this.TUIComponents.forEach(o=>{n.component(o.name,o.component)}),wG(n)}getInstance(){return Pr.instance}login(n){return new Promise((r,o)=>{this.tim.login(n).then(()=>{var i,s,u;return this.loginResolveRejectCache.push({resolve:r,reject:o}),Pr.isLogin=!0,window._isTIMCallKit=!0,(u=(s=(i=Pr==null?void 0:Pr.instance)==null?void 0:i.TUIServer)==null?void 0:s.TUICallKit)==null||u.init({SDKAppID:this.SDKAppID,userID:n.userID,userSig:n.userSig,tim:this.tim}),null}).catch(i=>{o(i)})})}logout(){return new Promise((n,r)=>{this.tim.logout().then(o=>{this.isSDKReady=!1,Pr.isLogin=!1,n(o)}).catch(o=>{r(o)})})}bindTIMEvent(){this.tim.on(yt.EVENT.SDK_READY,this.handleSDKReady,this)}unbindTIMEvent(){this.tim.off(yt.EVENT.SDK_READY,this.handleSDKReady)}handleSDKReady(){this.isSDKReady=!0,this.handelAwaitFunc(Pr.TUIServerFunMap),this.loginResolveRejectCache.forEach(({resolve:n})=>{n({msg:"登录成功,且SDK Ready"})})}handelAwaitFunc(n){const r=Object.keys(this.TUIServer);for(let o=0;o0&&i.map(s=>s()),n==null||n.delete(r[o])}return n}destroyed(){this.unbindTIMEvent(),this.isSDKReady=!1}component(n,r){const o=this.getInstance();return this.TUIServer||(this.TUIServer={}),this.TUIServer[n]=r.server,this.TUIComponents.has(r)?console.warn(`${n} component has already been applied to target TUICore.`):this.TUIComponents.add(r),o}use(n,r){const o=this.getInstance();return this.installedPlugins.has(n)?console.warn("Plugin has already been applied to target TUICore."):n&&DD(n==null?void 0:n.plugin)?(this.installedPlugins.add(n),n==null||n.plugin(o,r)):DD(n)?(this.installedPlugins.add(n),n(o,r)):console.warn('A plugin must either be a function or an object with an "plugin" function.'),o}usePlugin(n){let r={};return this.installedPlugins.forEach(o=>{o.name===n&&(r=o)}),r}setAwaitFunc(n,r){if(this.isSDKReady)r();else{Pr.TUIServerFunMap||(Pr.TUIServerFunMap=new Map);const o=Pr.TUIServerFunMap.get(n)||[];o.push(r),Pr.TUIServerFunMap.set(n,o)}}setCommonStore(n){return this.store.setCommonStore(n)}setComponentStore(n,r,o){return this.store.setComponentStore(n,r,o)}getStore(){return this.store.store}storeCommonListener(n,r){return this.store.storeCommonListener(n,r)}};Xt(Pr,"instance"),Xt(Pr,"isLogin",!1),Xt(Pr,"TUIServerFunMap");let wI=Pr;var Ff=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},Ia=[],Ms=[],Cpe=typeof Uint8Array<"u"?Uint8Array:Array,HT=!1;function k4(){HT=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t>18&63]+Ia[o>>12&63]+Ia[o>>6&63]+Ia[63&o]);return i.join("")}function ED(e){var t;HT||k4();for(var n=e.length,r=n%3,o="",i=[],s=0,u=n-r;su?u:s+16383));return r===1?(t=e[n-1],o+=Ia[t>>2],o+=Ia[t<<4&63],o+="=="):r===2&&(t=(e[n-2]<<8)+e[n-1],o+=Ia[t>>10],o+=Ia[t>>4&63],o+=Ia[t<<2&63],o+="="),i.push(o),i.join("")}function Rm(e,t,n,r,o){var i,s,u=8*o-r-1,d=(1<>1,g=-7,v=n?o-1:0,_=n?-1:1,M=e[t+v];for(v+=_,i=M&(1<<-g)-1,M>>=-g,g+=u;g>0;i=256*i+e[t+v],v+=_,g-=8);for(s=i&(1<<-g)-1,i>>=-g,g+=r;g>0;s=256*s+e[t+v],v+=_,g-=8);if(i===0)i=1-f;else{if(i===d)return s?NaN:1/0*(M?-1:1);s+=Math.pow(2,r),i-=f}return(M?-1:1)*s*Math.pow(2,i-r)}function D4(e,t,n,r,o,i){var s,u,d,f=8*i-o-1,g=(1<>1,_=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=r?0:i-1,I=r?1:-1,k=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,s=g):(s=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-s))<1&&(s--,d*=2),(t+=s+v>=1?_/d:_*Math.pow(2,1-v))*d>=2&&(s++,d/=2),s+v>=g?(u=0,s=g):s+v>=1?(u=(t*d-1)*Math.pow(2,o),s+=v):(u=t*Math.pow(2,v-1)*Math.pow(2,o),s=0));o>=8;e[n+M]=255&u,M+=I,u/=256,o-=8);for(s=s<0;e[n+M]=255&s,M+=I,s/=256,f-=8);e[n+M-I]|=128*k}var wpe={}.toString,E4=Array.isArray||function(e){return wpe.call(e)=="[object Array]"};function SI(){return Qe.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function dl(e,t){if(SI()=SI())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+SI().toString(16)+" bytes");return 0|e}function Ca(e){return!(e==null||!e._isBuffer)}function O4(e,t){if(Ca(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var n=e.length;if(n===0)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return dy(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return x4(e).length;default:if(r)return dy(e).length;t=(""+t).toLowerCase(),r=!0}}function Spe(e,t,n){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ppe(this,t,n);case"utf8":case"utf-8":return N4(this,t,n);case"ascii":return Rpe(this,t,n);case"latin1":case"binary":return Npe(this,t,n);case"base64":return Ope(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xpe(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function Zu(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function AD(e,t,n,r,o){if(e.length===0)return-1;if(typeof n=="string"?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if(typeof t=="string"&&(t=Qe.from(t,r)),Ca(t))return t.length===0?-1:LD(e,t,n,r,o);if(typeof t=="number")return t&=255,Qe.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):LD(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function LD(e,t,n,r,o){var i,s=1,u=e.length,d=t.length;if(r!==void 0&&((r=String(r).toLowerCase())==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(e.length<2||t.length<2)return-1;s=2,u/=2,d/=2,n/=2}function f(M,I){return s===1?M[I]:M.readUInt16BE(I*s)}if(o){var g=-1;for(i=n;iu&&(n=u-d),i=n;i>=0;i--){for(var v=!0,_=0;_o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s>8,d=s%256,f.push(d),f.push(u);return f}(t,e.length-n),e,n,r)}function Ope(e,t,n){return t===0&&n===e.length?ED(e):ED(e.slice(t,n))}function N4(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:f>223?3:f>191?2:1;if(o+v<=n)switch(v){case 1:f<128&&(g=f);break;case 2:(192&(i=e[o+1]))==128&&(d=(31&f)<<6|63&i)>127&&(g=d);break;case 3:i=e[o+1],s=e[o+2],(192&i)==128&&(192&s)==128&&(d=(15&f)<<12|(63&i)<<6|63&s)>2047&&(d<55296||d>57343)&&(g=d);break;case 4:i=e[o+1],s=e[o+2],u=e[o+3],(192&i)==128&&(192&s)==128&&(192&u)==128&&(d=(15&f)<<18|(63&i)<<12|(63&s)<<6|63&u)>65535&&d<1114112&&(g=d)}g===null?(g=65533,v=1):g>65535&&(g-=65536,r.push(g>>>10&1023|55296),g=56320|1023&g),r.push(g),o+=v}return function(_){var M=_.length;if(M<=OD)return String.fromCharCode.apply(String,_);for(var I="",k=0;k0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},Qe.prototype.compare=function(e,t,n,r,o){if(!Ca(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),o===void 0&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),u=Math.min(i,s),d=this.slice(r,o),f=e.slice(t,n),g=0;go)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return kpe(this,e,t,n);case"utf8":case"utf-8":return Dpe(this,e,t,n);case"ascii":return R4(this,e,t,n);case"latin1":case"binary":return Epe(this,e,t,n);case"base64":return Ape(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lpe(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},Qe.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var OD=4096;function Rpe(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function Bi(e,t,n,r,o,i){if(!Ca(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function Nm(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function Pm(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function P4(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function RD(e,t,n,r,o){return o||P4(e,0,n,4),D4(e,t,n,r,23,4),n+4}function ND(e,t,n,r,o){return o||P4(e,0,n,8),D4(e,t,n,r,52,8),n+8}Qe.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=t===void 0?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},Qe.prototype.readUInt8=function(e,t){return t||wo(e,1,this.length),this[e]},Qe.prototype.readUInt16LE=function(e,t){return t||wo(e,2,this.length),this[e]|this[e+1]<<8},Qe.prototype.readUInt16BE=function(e,t){return t||wo(e,2,this.length),this[e]<<8|this[e+1]},Qe.prototype.readUInt32LE=function(e,t){return t||wo(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Qe.prototype.readUInt32BE=function(e,t){return t||wo(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Qe.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||wo(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},Qe.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||wo(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},Qe.prototype.readInt8=function(e,t){return t||wo(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Qe.prototype.readInt16LE=function(e,t){t||wo(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},Qe.prototype.readInt16BE=function(e,t){t||wo(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},Qe.prototype.readInt32LE=function(e,t){return t||wo(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Qe.prototype.readInt32BE=function(e,t){return t||wo(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Qe.prototype.readFloatLE=function(e,t){return t||wo(e,4,this.length),Rm(this,e,!0,23,4)},Qe.prototype.readFloatBE=function(e,t){return t||wo(e,4,this.length),Rm(this,e,!1,23,4)},Qe.prototype.readDoubleLE=function(e,t){return t||wo(e,8,this.length),Rm(this,e,!0,52,8)},Qe.prototype.readDoubleBE=function(e,t){return t||wo(e,8,this.length),Rm(this,e,!1,52,8)},Qe.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||Bi(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},Qe.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Bi(this,e,t,1,255,0),Qe.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Qe.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Bi(this,e,t,2,65535,0),Qe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Nm(this,e,t,!0),t+2},Qe.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Bi(this,e,t,2,65535,0),Qe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Nm(this,e,t,!1),t+2},Qe.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Bi(this,e,t,4,4294967295,0),Qe.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Pm(this,e,t,!0),t+4},Qe.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Bi(this,e,t,4,4294967295,0),Qe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Pm(this,e,t,!1),t+4},Qe.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);Bi(this,e,t,n,o-1,-o)}var i=0,s=1,u=0;for(this[t]=255&e;++i>0)-u&255;return t+n},Qe.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);Bi(this,e,t,n,o-1,-o)}var i=n-1,s=1,u=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&u===0&&this[t+i+1]!==0&&(u=1),this[t+i]=(e/s>>0)-u&255;return t+n},Qe.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Bi(this,e,t,1,127,-128),Qe.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Qe.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Bi(this,e,t,2,32767,-32768),Qe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Nm(this,e,t,!0),t+2},Qe.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Bi(this,e,t,2,32767,-32768),Qe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Nm(this,e,t,!1),t+2},Qe.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Bi(this,e,t,4,2147483647,-2147483648),Qe.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Pm(this,e,t,!0),t+4},Qe.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Bi(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Qe.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Pm(this,e,t,!1),t+4},Qe.prototype.writeFloatLE=function(e,t,n){return RD(this,e,t,!0,n)},Qe.prototype.writeFloatBE=function(e,t,n){return RD(this,e,t,!1,n)},Qe.prototype.writeDoubleLE=function(e,t,n){return ND(this,e,t,!0,n)},Qe.prototype.writeDoubleBE=function(e,t,n){return ND(this,e,t,!1,n)},Qe.prototype.copy=function(e,t,n,r){if(n||(n=0),r||r===0||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!Qe.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=n===void 0?this.length:n>>>0,e||(e=0),typeof e=="number")for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function x4(e){return function(t){var n,r,o,i,s,u;HT||k4();var d=t.length;if(d%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s=t[d-2]==="="?2:t[d-1]==="="?1:0,u=new Cpe(3*d/4-s),o=s>0?d-4:d;var f=0;for(n=0,r=0;n>16&255,u[f++]=i>>8&255,u[f++]=255&i;return s===2?(i=Ms[t.charCodeAt(n)]<<2|Ms[t.charCodeAt(n+1)]>>4,u[f++]=255&i):s===1&&(i=Ms[t.charCodeAt(n)]<<10|Ms[t.charCodeAt(n+1)]<<4|Ms[t.charCodeAt(n+2)]>>2,u[f++]=i>>8&255,u[f++]=255&i),u}(function(t){if((t=function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}(t).replace(Upe,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(e))}function h0(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Tg(e){return e!=null&&(!!e._isBuffer||PD(e)||function(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&PD(t.slice(0,0))}(e))}function PD(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function $n(e,t){return e(t={exports:{}},t.exports),t.exports}var jn=$n(function(e,t){var n;e.exports=(n=n||function(r,o){var i=Object.create||function(){function w(){}return function(S){var L;return w.prototype=S,L=new w,w.prototype=null,L}}(),s={},u=s.lib={},d=u.Base={extend:function(w){var S=i(this);return w&&S.mixIn(w),S.hasOwnProperty("init")&&this.init!==S.init||(S.init=function(){S.$super.init.apply(this,arguments)}),S.init.prototype=S,S.$super=this,S},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var S in w)w.hasOwnProperty(S)&&(this[S]=w[S]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}},f=u.WordArray=d.extend({init:function(w,S){w=this.words=w||[],this.sigBytes=S??4*w.length},toString:function(w){return(w||v).stringify(this)},concat:function(w){var S=this.words,L=w.words,A=this.sigBytes,O=w.sigBytes;if(this.clamp(),A%4)for(var H=0;H>>2]>>>24-H%4*8&255;S[A+H>>>2]|=q<<24-(A+H)%4*8}else for(var H=0;H>>2]=L[H>>>2];return this.sigBytes+=O,this},clamp:function(){var w=this.words,S=this.sigBytes;w[S>>>2]&=4294967295<<32-S%4*8,w.length=r.ceil(S/4)},clone:function(){var w=d.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var S,L=[],A=function(P){var P=P,B=987654321,j=4294967295;return function(){var $=((B=36969*(65535&B)+(B>>16)&j)<<16)+(P=18e3*(65535&P)+(P>>16)&j)&j;return $/=4294967296,($+=.5)*(r.random()>.5?1:-1)}},O=0;O>>2]>>>24-O%4*8&255;A.push((H>>>4).toString(16)),A.push((15&H).toString(16))}return A.join("")},parse:function(w){for(var S=w.length,L=[],A=0;A>>3]|=parseInt(w.substr(A,2),16)<<24-A%8*4;return new f.init(L,S/2)}},_=g.Latin1={stringify:function(w){for(var S=w.words,L=w.sigBytes,A=[],O=0;O>>2]>>>24-O%4*8&255;A.push(String.fromCharCode(H))}return A.join("")},parse:function(w){for(var S=w.length,L=[],A=0;A>>2]|=(255&w.charCodeAt(A))<<24-A%4*8;return new f.init(L,S)}},M=g.Utf8={stringify:function(w){try{return decodeURIComponent(escape(_.stringify(w)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(w){return _.parse(unescape(encodeURIComponent(w)))}},I=u.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=M.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var S=this._data,L=S.words,A=S.sigBytes,O=this.blockSize,H=4*O,q=A/H,P=(q=w?r.ceil(q):r.max((0|q)-this._minBufferSize,0))*O,B=r.min(4*P,A);if(P){for(var j=0;j>>2]|=i[d]<<24-d%4*8;o.call(this,u,s)}else o.apply(this,arguments)}).prototype=r}}(),n.lib.WordArray)}),$n(function(e,t){var n;e.exports=(n=jn,function(){var r=n,o=r.lib.WordArray,i=r.enc;function s(u){return u<<8&4278255360|u>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(u){for(var d=u.words,f=u.sigBytes,g=[],v=0;v>>2]>>>16-v%4*8&65535;g.push(String.fromCharCode(_))}return g.join("")},parse:function(u){for(var d=u.length,f=[],g=0;g>>1]|=u.charCodeAt(g)<<16-g%2*16;return o.create(f,2*d)}},i.Utf16LE={stringify:function(u){for(var d=u.words,f=u.sigBytes,g=[],v=0;v>>2]>>>16-v%4*8&65535);g.push(String.fromCharCode(_))}return g.join("")},parse:function(u){for(var d=u.length,f=[],g=0;g>>1]|=s(u.charCodeAt(g)<<16-g%2*16);return o.create(f,2*d)}}}(),n.enc.Utf16)}),$n(function(e,t){var n,r,o;e.exports=(o=(r=n=jn).lib.WordArray,r.enc.Base64={stringify:function(i){var s=i.words,u=i.sigBytes,d=this._map;i.clamp();for(var f=[],g=0;g>>2]>>>24-g%4*8&255)<<16|(s[g+1>>>2]>>>24-(g+1)%4*8&255)<<8|s[g+2>>>2]>>>24-(g+2)%4*8&255,_=0;_<4&&g+.75*_>>6*(3-_)&63));var M=d.charAt(64);if(M)for(;f.length%4;)f.push(M);return f.join("")},parse:function(i){var s=i.length,u=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var f=0;f>>6-S%4*2;k[w>>>2]|=(L|A)<<24-w%4*8,w++}return o.create(k,w)}(i,s,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)}),$n(function(e,t){var n;e.exports=(n=jn,function(r){var o=n,i=o.lib,s=i.WordArray,u=i.Hasher,d=o.algo,f=[];(function(){for(var k=0;k<64;k++)f[k]=4294967296*r.abs(r.sin(k+1))|0})();var g=d.MD5=u.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(k,w){for(var S=0;S<16;S++){var L=w+S,A=k[L];k[L]=16711935&(A<<8|A>>>24)|4278255360&(A<<24|A>>>8)}var O=this._hash.words,H=k[w+0],q=k[w+1],P=k[w+2],B=k[w+3],j=k[w+4],$=k[w+5],R=k[w+6],T=k[w+7],x=k[w+8],Z=k[w+9],K=k[w+10],re=k[w+11],X=k[w+12],ie=k[w+13],he=k[w+14],ae=k[w+15],de=O[0],Y=O[1],te=O[2],fe=O[3];de=v(de,Y,te,fe,H,7,f[0]),fe=v(fe,de,Y,te,q,12,f[1]),te=v(te,fe,de,Y,P,17,f[2]),Y=v(Y,te,fe,de,B,22,f[3]),de=v(de,Y,te,fe,j,7,f[4]),fe=v(fe,de,Y,te,$,12,f[5]),te=v(te,fe,de,Y,R,17,f[6]),Y=v(Y,te,fe,de,T,22,f[7]),de=v(de,Y,te,fe,x,7,f[8]),fe=v(fe,de,Y,te,Z,12,f[9]),te=v(te,fe,de,Y,K,17,f[10]),Y=v(Y,te,fe,de,re,22,f[11]),de=v(de,Y,te,fe,X,7,f[12]),fe=v(fe,de,Y,te,ie,12,f[13]),te=v(te,fe,de,Y,he,17,f[14]),de=_(de,Y=v(Y,te,fe,de,ae,22,f[15]),te,fe,q,5,f[16]),fe=_(fe,de,Y,te,R,9,f[17]),te=_(te,fe,de,Y,re,14,f[18]),Y=_(Y,te,fe,de,H,20,f[19]),de=_(de,Y,te,fe,$,5,f[20]),fe=_(fe,de,Y,te,K,9,f[21]),te=_(te,fe,de,Y,ae,14,f[22]),Y=_(Y,te,fe,de,j,20,f[23]),de=_(de,Y,te,fe,Z,5,f[24]),fe=_(fe,de,Y,te,he,9,f[25]),te=_(te,fe,de,Y,B,14,f[26]),Y=_(Y,te,fe,de,x,20,f[27]),de=_(de,Y,te,fe,ie,5,f[28]),fe=_(fe,de,Y,te,P,9,f[29]),te=_(te,fe,de,Y,T,14,f[30]),de=M(de,Y=_(Y,te,fe,de,X,20,f[31]),te,fe,$,4,f[32]),fe=M(fe,de,Y,te,x,11,f[33]),te=M(te,fe,de,Y,re,16,f[34]),Y=M(Y,te,fe,de,he,23,f[35]),de=M(de,Y,te,fe,q,4,f[36]),fe=M(fe,de,Y,te,j,11,f[37]),te=M(te,fe,de,Y,T,16,f[38]),Y=M(Y,te,fe,de,K,23,f[39]),de=M(de,Y,te,fe,ie,4,f[40]),fe=M(fe,de,Y,te,H,11,f[41]),te=M(te,fe,de,Y,B,16,f[42]),Y=M(Y,te,fe,de,R,23,f[43]),de=M(de,Y,te,fe,Z,4,f[44]),fe=M(fe,de,Y,te,X,11,f[45]),te=M(te,fe,de,Y,ae,16,f[46]),de=I(de,Y=M(Y,te,fe,de,P,23,f[47]),te,fe,H,6,f[48]),fe=I(fe,de,Y,te,T,10,f[49]),te=I(te,fe,de,Y,he,15,f[50]),Y=I(Y,te,fe,de,$,21,f[51]),de=I(de,Y,te,fe,X,6,f[52]),fe=I(fe,de,Y,te,B,10,f[53]),te=I(te,fe,de,Y,K,15,f[54]),Y=I(Y,te,fe,de,q,21,f[55]),de=I(de,Y,te,fe,x,6,f[56]),fe=I(fe,de,Y,te,ae,10,f[57]),te=I(te,fe,de,Y,R,15,f[58]),Y=I(Y,te,fe,de,ie,21,f[59]),de=I(de,Y,te,fe,j,6,f[60]),fe=I(fe,de,Y,te,re,10,f[61]),te=I(te,fe,de,Y,P,15,f[62]),Y=I(Y,te,fe,de,Z,21,f[63]),O[0]=O[0]+de|0,O[1]=O[1]+Y|0,O[2]=O[2]+te|0,O[3]=O[3]+fe|0},_doFinalize:function(){var k=this._data,w=k.words,S=8*this._nDataBytes,L=8*k.sigBytes;w[L>>>5]|=128<<24-L%32;var A=r.floor(S/4294967296),O=S;w[15+(L+64>>>9<<4)]=16711935&(A<<8|A>>>24)|4278255360&(A<<24|A>>>8),w[14+(L+64>>>9<<4)]=16711935&(O<<8|O>>>24)|4278255360&(O<<24|O>>>8),k.sigBytes=4*(w.length+1),this._process();for(var H=this._hash,q=H.words,P=0;P<4;P++){var B=q[P];q[P]=16711935&(B<<8|B>>>24)|4278255360&(B<<24|B>>>8)}return H},clone:function(){var k=u.clone.call(this);return k._hash=this._hash.clone(),k}});function v(k,w,S,L,A,O,H){var q=k+(w&S|~w&L)+A+H;return(q<>>32-O)+w}function _(k,w,S,L,A,O,H){var q=k+(w&L|S&~L)+A+H;return(q<>>32-O)+w}function M(k,w,S,L,A,O,H){var q=k+(w^S^L)+A+H;return(q<>>32-O)+w}function I(k,w,S,L,A,O,H){var q=k+(S^(w|~L))+A+H;return(q<>>32-O)+w}o.MD5=u._createHelper(g),o.HmacMD5=u._createHmacHelper(g)}(Math),n.MD5)}),$n(function(e,t){var n,r,o,i,s,u,d,f;e.exports=(o=(r=n=jn).lib,i=o.WordArray,s=o.Hasher,u=r.algo,d=[],f=u.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(g,v){for(var _=this._hash.words,M=_[0],I=_[1],k=_[2],w=_[3],S=_[4],L=0;L<80;L++){if(L<16)d[L]=0|g[v+L];else{var A=d[L-3]^d[L-8]^d[L-14]^d[L-16];d[L]=A<<1|A>>>31}var O=(M<<5|M>>>27)+S+d[L];O+=L<20?1518500249+(I&k|~I&w):L<40?1859775393+(I^k^w):L<60?(I&k|I&w|k&w)-1894007588:(I^k^w)-899497514,S=w,w=k,k=I<<30|I>>>2,I=M,M=O}_[0]=_[0]+M|0,_[1]=_[1]+I|0,_[2]=_[2]+k|0,_[3]=_[3]+w|0,_[4]=_[4]+S|0},_doFinalize:function(){var g=this._data,v=g.words,_=8*this._nDataBytes,M=8*g.sigBytes;return v[M>>>5]|=128<<24-M%32,v[14+(M+64>>>9<<4)]=Math.floor(_/4294967296),v[15+(M+64>>>9<<4)]=_,g.sigBytes=4*v.length,this._process(),this._hash},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}}),r.SHA1=s._createHelper(f),r.HmacSHA1=s._createHmacHelper(f),n.SHA1)}),$n(function(e,t){var n;e.exports=(n=jn,function(r){var o=n,i=o.lib,s=i.WordArray,u=i.Hasher,d=o.algo,f=[],g=[];(function(){function M(S){for(var L=r.sqrt(S),A=2;A<=L;A++)if(!(S%A))return!1;return!0}function I(S){return 4294967296*(S-(0|S))|0}for(var k=2,w=0;w<64;)M(k)&&(w<8&&(f[w]=I(r.pow(k,.5))),g[w]=I(r.pow(k,1/3)),w++),k++})();var v=[],_=d.SHA256=u.extend({_doReset:function(){this._hash=new s.init(f.slice(0))},_doProcessBlock:function(M,I){for(var k=this._hash.words,w=k[0],S=k[1],L=k[2],A=k[3],O=k[4],H=k[5],q=k[6],P=k[7],B=0;B<64;B++){if(B<16)v[B]=0|M[I+B];else{var j=v[B-15],$=(j<<25|j>>>7)^(j<<14|j>>>18)^j>>>3,R=v[B-2],T=(R<<15|R>>>17)^(R<<13|R>>>19)^R>>>10;v[B]=$+v[B-7]+T+v[B-16]}var x=w&S^w&L^S&L,Z=(w<<30|w>>>2)^(w<<19|w>>>13)^(w<<10|w>>>22),K=P+((O<<26|O>>>6)^(O<<21|O>>>11)^(O<<7|O>>>25))+(O&H^~O&q)+g[B]+v[B];P=q,q=H,H=O,O=A+K|0,A=L,L=S,S=w,w=K+(Z+x)|0}k[0]=k[0]+w|0,k[1]=k[1]+S|0,k[2]=k[2]+L|0,k[3]=k[3]+A|0,k[4]=k[4]+O|0,k[5]=k[5]+H|0,k[6]=k[6]+q|0,k[7]=k[7]+P|0},_doFinalize:function(){var M=this._data,I=M.words,k=8*this._nDataBytes,w=8*M.sigBytes;return I[w>>>5]|=128<<24-w%32,I[14+(w+64>>>9<<4)]=r.floor(k/4294967296),I[15+(w+64>>>9<<4)]=k,M.sigBytes=4*I.length,this._process(),this._hash},clone:function(){var M=u.clone.call(this);return M._hash=this._hash.clone(),M}});o.SHA256=u._createHelper(_),o.HmacSHA256=u._createHmacHelper(_)}(Math),n.SHA256)}),$n(function(e,t){var n,r,o,i,s,u;e.exports=(o=(r=n=jn).lib.WordArray,i=r.algo,s=i.SHA256,u=i.SHA224=s.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var d=s._doFinalize.call(this);return d.sigBytes-=4,d}}),r.SHA224=s._createHelper(u),r.HmacSHA224=s._createHmacHelper(u),n.SHA224)}),$n(function(e,t){var n;e.exports=(n=jn,function(){var r=n,o=r.lib.Hasher,i=r.x64,s=i.Word,u=i.WordArray,d=r.algo;function f(){return s.create.apply(s,arguments)}var g=[f(1116352408,3609767458),f(1899447441,602891725),f(3049323471,3964484399),f(3921009573,2173295548),f(961987163,4081628472),f(1508970993,3053834265),f(2453635748,2937671579),f(2870763221,3664609560),f(3624381080,2734883394),f(310598401,1164996542),f(607225278,1323610764),f(1426881987,3590304994),f(1925078388,4068182383),f(2162078206,991336113),f(2614888103,633803317),f(3248222580,3479774868),f(3835390401,2666613458),f(4022224774,944711139),f(264347078,2341262773),f(604807628,2007800933),f(770255983,1495990901),f(1249150122,1856431235),f(1555081692,3175218132),f(1996064986,2198950837),f(2554220882,3999719339),f(2821834349,766784016),f(2952996808,2566594879),f(3210313671,3203337956),f(3336571891,1034457026),f(3584528711,2466948901),f(113926993,3758326383),f(338241895,168717936),f(666307205,1188179964),f(773529912,1546045734),f(1294757372,1522805485),f(1396182291,2643833823),f(1695183700,2343527390),f(1986661051,1014477480),f(2177026350,1206759142),f(2456956037,344077627),f(2730485921,1290863460),f(2820302411,3158454273),f(3259730800,3505952657),f(3345764771,106217008),f(3516065817,3606008344),f(3600352804,1432725776),f(4094571909,1467031594),f(275423344,851169720),f(430227734,3100823752),f(506948616,1363258195),f(659060556,3750685593),f(883997877,3785050280),f(958139571,3318307427),f(1322822218,3812723403),f(1537002063,2003034995),f(1747873779,3602036899),f(1955562222,1575990012),f(2024104815,1125592928),f(2227730452,2716904306),f(2361852424,442776044),f(2428436474,593698344),f(2756734187,3733110249),f(3204031479,2999351573),f(3329325298,3815920427),f(3391569614,3928383900),f(3515267271,566280711),f(3940187606,3454069534),f(4118630271,4000239992),f(116418474,1914138554),f(174292421,2731055270),f(289380356,3203993006),f(460393269,320620315),f(685471733,587496836),f(852142971,1086792851),f(1017036298,365543100),f(1126000580,2618297676),f(1288033470,3409855158),f(1501505948,4234509866),f(1607167915,987167468),f(1816402316,1246189591)],v=[];(function(){for(var M=0;M<80;M++)v[M]=f()})();var _=d.SHA512=o.extend({_doReset:function(){this._hash=new u.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(M,I){for(var k=this._hash.words,w=k[0],S=k[1],L=k[2],A=k[3],O=k[4],H=k[5],q=k[6],P=k[7],B=w.high,j=w.low,$=S.high,R=S.low,T=L.high,x=L.low,Z=A.high,K=A.low,re=O.high,X=O.low,ie=H.high,he=H.low,ae=q.high,de=q.low,Y=P.high,te=P.low,fe=B,Re=j,ve=$,be=R,ue=T,ce=x,Ee=Z,pe=K,V=re,ee=X,se=ie,Ce=he,le=ae,ke=de,Pe=Y,xe=te,He=0;He<80;He++){var Te=v[He];if(He<16)var W=Te.high=0|M[I+2*He],ne=Te.low=0|M[I+2*He+1];else{var ye=v[He-15],Be=ye.high,je=ye.low,ct=(Be>>>1|je<<31)^(Be>>>8|je<<24)^Be>>>7,Fe=(je>>>1|Be<<31)^(je>>>8|Be<<24)^(je>>>7|Be<<25),at=v[He-2],St=at.high,vn=at.low,Cn=(St>>>19|vn<<13)^(St<<3|vn>>>29)^St>>>6,Tn=(vn>>>19|St<<13)^(vn<<3|St>>>29)^(vn>>>6|St<<26),An=v[He-7],yn=An.high,nt=An.low,bt=v[He-16],Pt=bt.high,ln=bt.low;W=(W=(W=ct+yn+((ne=Fe+nt)>>>0>>0?1:0))+Cn+((ne+=Tn)>>>0>>0?1:0))+Pt+((ne+=ln)>>>0>>0?1:0),Te.high=W,Te.low=ne}var tn,wn=V&se^~V&le,Vn=ee&Ce^~ee&ke,ze=fe&ve^fe&ue^ve&ue,kt=Re&be^Re&ce^be&ce,Mt=(fe>>>28|Re<<4)^(fe<<30|Re>>>2)^(fe<<25|Re>>>7),qt=(Re>>>28|fe<<4)^(Re<<30|fe>>>2)^(Re<<25|fe>>>7),Jt=(V>>>14|ee<<18)^(V>>>18|ee<<14)^(V<<23|ee>>>9),Mr=(ee>>>14|V<<18)^(ee>>>18|V<<14)^(ee<<23|V>>>9),Sr=g[He],Qo=Sr.high,go=Sr.low,Ge=Pe+Jt+((tn=xe+Mr)>>>0>>0?1:0),et=qt+kt;Pe=le,xe=ke,le=se,ke=Ce,se=V,Ce=ee,V=Ee+(Ge=(Ge=(Ge=Ge+wn+((tn+=Vn)>>>0>>0?1:0))+Qo+((tn+=go)>>>0>>0?1:0))+W+((tn+=ne)>>>0>>0?1:0))+((ee=pe+tn|0)>>>0>>0?1:0)|0,Ee=ue,pe=ce,ue=ve,ce=be,ve=fe,be=Re,fe=Ge+(Mt+ze+(et>>>0>>0?1:0))+((Re=tn+et|0)>>>0>>0?1:0)|0}j=w.low=j+Re,w.high=B+fe+(j>>>0>>0?1:0),R=S.low=R+be,S.high=$+ve+(R>>>0>>0?1:0),x=L.low=x+ce,L.high=T+ue+(x>>>0>>0?1:0),K=A.low=K+pe,A.high=Z+Ee+(K>>>0>>0?1:0),X=O.low=X+ee,O.high=re+V+(X>>>0>>0?1:0),he=H.low=he+Ce,H.high=ie+se+(he>>>0>>0?1:0),de=q.low=de+ke,q.high=ae+le+(de>>>0>>0?1:0),te=P.low=te+xe,P.high=Y+Pe+(te>>>0>>0?1:0)},_doFinalize:function(){var M=this._data,I=M.words,k=8*this._nDataBytes,w=8*M.sigBytes;return I[w>>>5]|=128<<24-w%32,I[30+(w+128>>>10<<5)]=Math.floor(k/4294967296),I[31+(w+128>>>10<<5)]=k,M.sigBytes=4*I.length,this._process(),this._hash.toX32()},clone:function(){var M=o.clone.call(this);return M._hash=this._hash.clone(),M},blockSize:32});r.SHA512=o._createHelper(_),r.HmacSHA512=o._createHmacHelper(_)}(),n.SHA512)}),$n(function(e,t){var n,r,o,i,s,u,d,f;e.exports=(o=(r=n=jn).x64,i=o.Word,s=o.WordArray,u=r.algo,d=u.SHA512,f=u.SHA384=d.extend({_doReset:function(){this._hash=new s.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var g=d._doFinalize.call(this);return g.sigBytes-=16,g}}),r.SHA384=d._createHelper(f),r.HmacSHA384=d._createHmacHelper(f),n.SHA384)}),$n(function(e,t){var n;e.exports=(n=jn,function(r){var o=n,i=o.lib,s=i.WordArray,u=i.Hasher,d=o.x64.Word,f=o.algo,g=[],v=[],_=[];(function(){for(var k=1,w=0,S=0;S<24;S++){g[k+5*w]=(S+1)*(S+2)/2%64;var L=(2*k+3*w)%5;k=w%5,w=L}for(k=0;k<5;k++)for(w=0;w<5;w++)v[k+5*w]=w+(2*k+3*w)%5*5;for(var A=1,O=0;O<24;O++){for(var H=0,q=0,P=0;P<7;P++){if(1&A){var B=(1<>>24)|4278255360&(O<<24|O>>>8),H=16711935&(H<<8|H>>>24)|4278255360&(H<<24|H>>>8),(te=S[A]).high^=H,te.low^=O}for(var q=0;q<24;q++){for(var P=0;P<5;P++){for(var B=0,j=0,$=0;$<5;$++)B^=(te=S[P+5*$]).high,j^=te.low;var R=M[P];R.high=B,R.low=j}for(P=0;P<5;P++){var T=M[(P+4)%5],x=M[(P+1)%5],Z=x.high,K=x.low;for(B=T.high^(Z<<1|K>>>31),j=T.low^(K<<1|Z>>>31),$=0;$<5;$++)(te=S[P+5*$]).high^=B,te.low^=j}for(var re=1;re<25;re++){var X=(te=S[re]).high,ie=te.low,he=g[re];he<32?(B=X<>>32-he,j=ie<>>32-he):(B=ie<>>64-he,j=X<>>64-he);var ae=M[v[re]];ae.high=B,ae.low=j}var de=M[0],Y=S[0];for(de.high=Y.high,de.low=Y.low,P=0;P<5;P++)for($=0;$<5;$++){var te=S[re=P+5*$],fe=M[re],Re=M[(P+1)%5+5*$],ve=M[(P+2)%5+5*$];te.high=fe.high^~Re.high&ve.high,te.low=fe.low^~Re.low&ve.low}te=S[0];var be=_[q];te.high^=be.high,te.low^=be.low}},_doFinalize:function(){var k=this._data,w=k.words,S=(this._nDataBytes,8*k.sigBytes),L=32*this.blockSize;w[S>>>5]|=1<<24-S%32,w[(r.ceil((S+1)/L)*L>>>5)-1]|=128,k.sigBytes=4*w.length,this._process();for(var A=this._state,O=this.cfg.outputLength/8,H=O/8,q=[],P=0;P>>24)|4278255360&(j<<24|j>>>8),$=16711935&($<<8|$>>>24)|4278255360&($<<24|$>>>8),q.push($),q.push(j)}return new s.init(q,O)},clone:function(){for(var k=u.clone.call(this),w=k._state=this._state.slice(0),S=0;S<25;S++)w[S]=w[S].clone();return k}});o.SHA3=u._createHelper(I),o.HmacSHA3=u._createHmacHelper(I)}(Math),n.SHA3)}),$n(function(e,t){var n;e.exports=(n=jn,function(r){var o=n,i=o.lib,s=i.WordArray,u=i.Hasher,d=o.algo,f=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),g=s.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),v=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),_=s.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),M=s.create([0,1518500249,1859775393,2400959708,2840853838]),I=s.create([1352829926,1548603684,1836072691,2053994217,0]),k=d.RIPEMD160=u.extend({_doReset:function(){this._hash=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(q,P){for(var B=0;B<16;B++){var j=P+B,$=q[j];q[j]=16711935&($<<8|$>>>24)|4278255360&($<<24|$>>>8)}var R,T,x,Z,K,re,X,ie,he,ae,de,Y=this._hash.words,te=M.words,fe=I.words,Re=f.words,ve=g.words,be=v.words,ue=_.words;for(re=R=Y[0],X=T=Y[1],ie=x=Y[2],he=Z=Y[3],ae=K=Y[4],B=0;B<80;B+=1)de=R+q[P+Re[B]]|0,de+=B<16?w(T,x,Z)+te[0]:B<32?S(T,x,Z)+te[1]:B<48?L(T,x,Z)+te[2]:B<64?A(T,x,Z)+te[3]:O(T,x,Z)+te[4],de=(de=H(de|=0,be[B]))+K|0,R=K,K=Z,Z=H(x,10),x=T,T=de,de=re+q[P+ve[B]]|0,de+=B<16?O(X,ie,he)+fe[0]:B<32?A(X,ie,he)+fe[1]:B<48?L(X,ie,he)+fe[2]:B<64?S(X,ie,he)+fe[3]:w(X,ie,he)+fe[4],de=(de=H(de|=0,ue[B]))+ae|0,re=ae,ae=he,he=H(ie,10),ie=X,X=de;de=Y[1]+x+he|0,Y[1]=Y[2]+Z+ae|0,Y[2]=Y[3]+K+re|0,Y[3]=Y[4]+R+X|0,Y[4]=Y[0]+T+ie|0,Y[0]=de},_doFinalize:function(){var q=this._data,P=q.words,B=8*this._nDataBytes,j=8*q.sigBytes;P[j>>>5]|=128<<24-j%32,P[14+(j+64>>>9<<4)]=16711935&(B<<8|B>>>24)|4278255360&(B<<24|B>>>8),q.sigBytes=4*(P.length+1),this._process();for(var $=this._hash,R=$.words,T=0;T<5;T++){var x=R[T];R[T]=16711935&(x<<8|x>>>24)|4278255360&(x<<24|x>>>8)}return $},clone:function(){var q=u.clone.call(this);return q._hash=this._hash.clone(),q}});function w(q,P,B){return q^P^B}function S(q,P,B){return q&P|~q&B}function L(q,P,B){return(q|~P)^B}function A(q,P,B){return q&B|P&~B}function O(q,P,B){return q^(P|~B)}function H(q,P){return q<>>32-P}o.RIPEMD160=u._createHelper(k),o.HmacRIPEMD160=u._createHmacHelper(k)}(),n.RIPEMD160)}),$n(function(e,t){var n,r,o,i,s,u;e.exports=(r=(n=jn).lib,o=r.Base,i=n.enc,s=i.Utf8,u=n.algo,void(u.HMAC=o.extend({init:function(d,f){d=this._hasher=new d.init,typeof f=="string"&&(f=s.parse(f));var g=d.blockSize,v=4*g;f.sigBytes>v&&(f=d.finalize(f)),f.clamp();for(var _=this._oKey=f.clone(),M=this._iKey=f.clone(),I=_.words,k=M.words,w=0;w>>2];$.sigBytes-=R}},i.BlockCipher=M.extend({cfg:M.cfg.extend({mode:w,padding:L}),reset:function(){M.reset.call(this);var $=this.cfg,R=$.iv,T=$.mode;if(this._xformMode==this._ENC_XFORM_MODE)var x=T.createEncryptor;else{var x=T.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==x?this._mode.init(this,R&&R.words):(this._mode=x.call(T,this,R&&R.words),this._mode.__creator=x)},_doProcessBlock:function($,R){this._mode.processBlock($,R)},_doFinalize:function(){var $=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){$.pad(this._data,this.blockSize);var R=this._process(!0)}else{var R=this._process(!0);$.unpad(R)}return R},blockSize:4}),A=i.CipherParams=s.extend({init:function($){this.mixIn($)},toString:function($){return($||this.formatter).stringify(this)}}),O=o.format={},H=O.OpenSSL={stringify:function($){var R=$.ciphertext,T=$.salt;if(T)var x=u.create([1398893684,1701076831]).concat(T).concat(R);else var x=R;return x.toString(g)},parse:function($){var R=g.parse($),T=R.words;if(T[0]==1398893684&&T[1]==1701076831){var x=u.create(T.slice(2,4));T.splice(0,4),R.sigBytes-=16}return A.create({ciphertext:R,salt:x})}},q=i.SerializableCipher=s.extend({cfg:s.extend({format:H}),encrypt:function($,R,T,x){x=this.cfg.extend(x);var Z=$.createEncryptor(T,x),K=Z.finalize(R),re=Z.cfg;return A.create({ciphertext:K,key:T,iv:re.iv,algorithm:$,mode:re.mode,padding:re.padding,blockSize:$.blockSize,formatter:x.format})},decrypt:function($,R,T,x){x=this.cfg.extend(x),R=this._parse(R,x.format);var Z=$.createDecryptor(T,x).finalize(R.ciphertext);return Z},_parse:function($,R){return typeof $=="string"?R.parse($,this):$}}),P=o.kdf={},B=P.OpenSSL={execute:function($,R,T,x){x||(x=u.random(8));var Z=_.create({keySize:R+T}).compute($,x),K=u.create(Z.words.slice(R),4*T);return Z.sigBytes=4*R,A.create({key:Z,iv:K,salt:x})}},j=i.PasswordBasedCipher=q.extend({cfg:q.cfg.extend({kdf:B}),encrypt:function($,R,T,x){var Z=(x=this.cfg.extend(x)).kdf.execute(T,$.keySize,$.ivSize);x.iv=Z.iv;var K=q.encrypt.call(this,$,R,Z.key,x);return K.mixIn(Z),K},decrypt:function($,R,T,x){x=this.cfg.extend(x),R=this._parse(R,x.format);var Z=x.kdf.execute(T,$.keySize,$.ivSize,R.salt);x.iv=Z.iv;var K=q.decrypt.call(this,$,R,Z.key,x);return K}})))}),$n(function(e,t){var n;e.exports=((n=jn).mode.CFB=function(){var r=n.lib.BlockCipherMode.extend();function o(i,s,u,d){var f=this._iv;if(f){var g=f.slice(0);this._iv=void 0}else g=this._prevBlock;d.encryptBlock(g,0);for(var v=0;v>24&255)==255){var u=s>>16&255,d=s>>8&255,f=255&s;u===255?(u=0,d===255?(d=0,f===255?f=0:++f):++d):++u,s=0,s+=u<<16,s+=d<<8,s+=f}else s+=1<<24;return s}var i=r.Encryptor=r.extend({processBlock:function(s,u){var d=this._cipher,f=d.blockSize,g=this._iv,v=this._counter;g&&(v=this._counter=g.slice(0),this._iv=void 0),function(I){(I[0]=o(I[0]))===0&&(I[1]=o(I[1]))}(v);var _=v.slice(0);d.encryptBlock(_,0);for(var M=0;M>>2]|=u<<24-d%4*8,r.sigBytes+=u},unpad:function(r){var o=255&r.words[r.sigBytes-1>>>2];r.sigBytes-=o}},n.pad.Ansix923)}),$n(function(e,t){var n;e.exports=((n=jn).pad.Iso10126={pad:function(r,o){var i=4*o,s=i-r.sigBytes%i;r.concat(n.lib.WordArray.random(s-1)).concat(n.lib.WordArray.create([s<<24],1))},unpad:function(r){var o=255&r.words[r.sigBytes-1>>>2];r.sigBytes-=o}},n.pad.Iso10126)}),$n(function(e,t){var n;e.exports=((n=jn).pad.Iso97971={pad:function(r,o){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,o)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971)}),$n(function(e,t){var n;e.exports=((n=jn).pad.ZeroPadding={pad:function(r,o){var i=4*o;r.clamp(),r.sigBytes+=i-(r.sigBytes%i||i)},unpad:function(r){for(var o=r.words,i=r.sigBytes-1;!(o[i>>>2]>>>24-i%4*8&255);)i--;r.sigBytes=i+1}},n.pad.ZeroPadding)}),$n(function(e,t){var n;e.exports=((n=jn).pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)}),$n(function(e,t){var n,r,o,i;e.exports=(o=(r=n=jn).lib.CipherParams,i=r.enc.Hex,r.format.Hex={stringify:function(s){return s.ciphertext.toString(i)},parse:function(s){var u=i.parse(s);return o.create({ciphertext:u})}},n.format.Hex)}),$n(function(e,t){var n;e.exports=(n=jn,function(){var r=n,o=r.lib.BlockCipher,i=r.algo,s=[],u=[],d=[],f=[],g=[],v=[],_=[],M=[],I=[],k=[];(function(){for(var L=[],A=0;A<256;A++)L[A]=A<128?A<<1:A<<1^283;var O=0,H=0;for(A=0;A<256;A++){var q=H^H<<1^H<<2^H<<3^H<<4;q=q>>>8^255&q^99,s[O]=q,u[q]=O;var P=L[O],B=L[P],j=L[B],$=257*L[q]^16843008*q;d[O]=$<<24|$>>>8,f[O]=$<<16|$>>>16,g[O]=$<<8|$>>>24,v[O]=$,$=16843009*j^65537*B^257*P^16843008*O,_[q]=$<<24|$>>>8,M[q]=$<<16|$>>>16,I[q]=$<<8|$>>>24,k[q]=$,O?(O=P^L[L[L[j^P]]],H^=L[L[H]]):O=H=1}})();var w=[0,1,2,4,8,16,32,64,128,27,54],S=i.AES=o.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var L=this._keyPriorReset=this._key,A=L.words,O=L.sigBytes/4,H=4*((this._nRounds=O+6)+1),q=this._keySchedule=[],P=0;P6&&P%O==4&&(B=s[B>>>24]<<24|s[B>>>16&255]<<16|s[B>>>8&255]<<8|s[255&B]):(B=s[(B=B<<8|B>>>24)>>>24]<<24|s[B>>>16&255]<<16|s[B>>>8&255]<<8|s[255&B],B^=w[P/O|0]<<24),q[P]=q[P-O]^B}for(var j=this._invKeySchedule=[],$=0;$>>24]]^M[s[B>>>16&255]]^I[s[B>>>8&255]]^k[s[255&B]]}},encryptBlock:function(L,A){this._doCryptBlock(L,A,this._keySchedule,d,f,g,v,s)},decryptBlock:function(L,A){var O=L[A+1];L[A+1]=L[A+3],L[A+3]=O,this._doCryptBlock(L,A,this._invKeySchedule,_,M,I,k,u),O=L[A+1],L[A+1]=L[A+3],L[A+3]=O},_doCryptBlock:function(L,A,O,H,q,P,B,j){for(var $=this._nRounds,R=L[A]^O[0],T=L[A+1]^O[1],x=L[A+2]^O[2],Z=L[A+3]^O[3],K=4,re=1;re<$;re++){var X=H[R>>>24]^q[T>>>16&255]^P[x>>>8&255]^B[255&Z]^O[K++],ie=H[T>>>24]^q[x>>>16&255]^P[Z>>>8&255]^B[255&R]^O[K++],he=H[x>>>24]^q[Z>>>16&255]^P[R>>>8&255]^B[255&T]^O[K++],ae=H[Z>>>24]^q[R>>>16&255]^P[T>>>8&255]^B[255&x]^O[K++];R=X,T=ie,x=he,Z=ae}X=(j[R>>>24]<<24|j[T>>>16&255]<<16|j[x>>>8&255]<<8|j[255&Z])^O[K++],ie=(j[T>>>24]<<24|j[x>>>16&255]<<16|j[Z>>>8&255]<<8|j[255&R])^O[K++],he=(j[x>>>24]<<24|j[Z>>>16&255]<<16|j[R>>>8&255]<<8|j[255&T])^O[K++],ae=(j[Z>>>24]<<24|j[R>>>16&255]<<16|j[T>>>8&255]<<8|j[255&x])^O[K++],L[A]=X,L[A+1]=ie,L[A+2]=he,L[A+3]=ae},keySize:8});r.AES=o._createHelper(S)}(),n.AES)}),$n(function(e,t){var n;e.exports=(n=jn,function(){var r=n,o=r.lib,i=o.WordArray,s=o.BlockCipher,u=r.algo,d=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],f=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],g=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],v=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],_=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],M=u.DES=s.extend({_doReset:function(){for(var S=this._key.words,L=[],A=0;A<56;A++){var O=d[A]-1;L[A]=S[O>>>5]>>>31-O%32&1}for(var H=this._subKeys=[],q=0;q<16;q++){var P=H[q]=[],B=g[q];for(A=0;A<24;A++)P[A/6|0]|=L[(f[A]-1+B)%28]<<31-A%6,P[4+(A/6|0)]|=L[28+(f[A+24]-1+B)%28]<<31-A%6;for(P[0]=P[0]<<1|P[0]>>>31,A=1;A<7;A++)P[A]=P[A]>>>4*(A-1)+3;P[7]=P[7]<<5|P[7]>>>27}var j=this._invSubKeys=[];for(A=0;A<16;A++)j[A]=H[15-A]},encryptBlock:function(S,L){this._doCryptBlock(S,L,this._subKeys)},decryptBlock:function(S,L){this._doCryptBlock(S,L,this._invSubKeys)},_doCryptBlock:function(S,L,A){this._lBlock=S[L],this._rBlock=S[L+1],I.call(this,4,252645135),I.call(this,16,65535),k.call(this,2,858993459),k.call(this,8,16711935),I.call(this,1,1431655765);for(var O=0;O<16;O++){for(var H=A[O],q=this._lBlock,P=this._rBlock,B=0,j=0;j<8;j++)B|=v[j][((P^H[j])&_[j])>>>0];this._lBlock=P,this._rBlock=q^B}var $=this._lBlock;this._lBlock=this._rBlock,this._rBlock=$,I.call(this,1,1431655765),k.call(this,8,16711935),k.call(this,2,858993459),I.call(this,16,65535),I.call(this,4,252645135),S[L]=this._lBlock,S[L+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function I(S,L){var A=(this._lBlock>>>S^this._rBlock)&L;this._rBlock^=A,this._lBlock^=A<>>S^this._lBlock)&L;this._lBlock^=A,this._rBlock^=A<>>2]>>>24-k%4*8&255;I=(I+_[M]+w)%256;var S=_[M];_[M]=_[I],_[I]=S}this._i=this._j=0},_doProcessBlock:function(f,g){f[g]^=u.call(this)},keySize:8,ivSize:0});function u(){for(var f=this._S,g=this._i,v=this._j,_=0,M=0;M<4;M++){v=(v+f[g=(g+1)%256])%256;var I=f[g];f[g]=f[v],f[v]=I,_|=f[(f[g]+f[v])%256]<<24-8*M}return this._i=g,this._j=v,_}r.RC4=o._createHelper(s);var d=i.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var f=this.cfg.drop;f>0;f--)u.call(this)}});r.RC4Drop=o._createHelper(d)}(),n.RC4)}),$n(function(e,t){var n;e.exports=(n=jn,function(){var r=n,o=r.lib.StreamCipher,i=r.algo,s=[],u=[],d=[],f=i.Rabbit=o.extend({_doReset:function(){for(var v=this._key.words,_=this.cfg.iv,M=0;M<4;M++)v[M]=16711935&(v[M]<<8|v[M]>>>24)|4278255360&(v[M]<<24|v[M]>>>8);var I=this._X=[v[0],v[3]<<16|v[2]>>>16,v[1],v[0]<<16|v[3]>>>16,v[2],v[1]<<16|v[0]>>>16,v[3],v[2]<<16|v[1]>>>16],k=this._C=[v[2]<<16|v[2]>>>16,4294901760&v[0]|65535&v[1],v[3]<<16|v[3]>>>16,4294901760&v[1]|65535&v[2],v[0]<<16|v[0]>>>16,4294901760&v[2]|65535&v[3],v[1]<<16|v[1]>>>16,4294901760&v[3]|65535&v[0]];for(this._b=0,M=0;M<4;M++)g.call(this);for(M=0;M<8;M++)k[M]^=I[M+4&7];if(_){var w=_.words,S=w[0],L=w[1],A=16711935&(S<<8|S>>>24)|4278255360&(S<<24|S>>>8),O=16711935&(L<<8|L>>>24)|4278255360&(L<<24|L>>>8),H=A>>>16|4294901760&O,q=O<<16|65535&A;for(k[0]^=A,k[1]^=H,k[2]^=O,k[3]^=q,k[4]^=A,k[5]^=H,k[6]^=O,k[7]^=q,M=0;M<4;M++)g.call(this)}},_doProcessBlock:function(v,_){var M=this._X;g.call(this),s[0]=M[0]^M[5]>>>16^M[3]<<16,s[1]=M[2]^M[7]>>>16^M[5]<<16,s[2]=M[4]^M[1]>>>16^M[7]<<16,s[3]=M[6]^M[3]>>>16^M[1]<<16;for(var I=0;I<4;I++)s[I]=16711935&(s[I]<<8|s[I]>>>24)|4278255360&(s[I]<<24|s[I]>>>8),v[_+I]^=s[I]},blockSize:4,ivSize:2});function g(){for(var v=this._X,_=this._C,M=0;M<8;M++)u[M]=_[M];for(_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0>>0?1:0)|0,this._b=_[7]>>>0>>0?1:0,M=0;M<8;M++){var I=v[M]+_[M],k=65535&I,w=I>>>16,S=((k*k>>>17)+k*w>>>15)+w*w,L=((4294901760&I)*I|0)+((65535&I)*I|0);d[M]=S^L}v[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,v[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,v[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,v[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,v[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,v[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,v[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,v[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}r.Rabbit=o._createHelper(f)}(),n.Rabbit)}),$n(function(e,t){var n;e.exports=(n=jn,function(){var r=n,o=r.lib.StreamCipher,i=r.algo,s=[],u=[],d=[],f=i.RabbitLegacy=o.extend({_doReset:function(){var v=this._key.words,_=this.cfg.iv,M=this._X=[v[0],v[3]<<16|v[2]>>>16,v[1],v[0]<<16|v[3]>>>16,v[2],v[1]<<16|v[0]>>>16,v[3],v[2]<<16|v[1]>>>16],I=this._C=[v[2]<<16|v[2]>>>16,4294901760&v[0]|65535&v[1],v[3]<<16|v[3]>>>16,4294901760&v[1]|65535&v[2],v[0]<<16|v[0]>>>16,4294901760&v[2]|65535&v[3],v[1]<<16|v[1]>>>16,4294901760&v[3]|65535&v[0]];this._b=0;for(var k=0;k<4;k++)g.call(this);for(k=0;k<8;k++)I[k]^=M[k+4&7];if(_){var w=_.words,S=w[0],L=w[1],A=16711935&(S<<8|S>>>24)|4278255360&(S<<24|S>>>8),O=16711935&(L<<8|L>>>24)|4278255360&(L<<24|L>>>8),H=A>>>16|4294901760&O,q=O<<16|65535&A;for(I[0]^=A,I[1]^=H,I[2]^=O,I[3]^=q,I[4]^=A,I[5]^=H,I[6]^=O,I[7]^=q,k=0;k<4;k++)g.call(this)}},_doProcessBlock:function(v,_){var M=this._X;g.call(this),s[0]=M[0]^M[5]>>>16^M[3]<<16,s[1]=M[2]^M[7]>>>16^M[5]<<16,s[2]=M[4]^M[1]>>>16^M[7]<<16,s[3]=M[6]^M[3]>>>16^M[1]<<16;for(var I=0;I<4;I++)s[I]=16711935&(s[I]<<8|s[I]>>>24)|4278255360&(s[I]<<24|s[I]>>>8),v[_+I]^=s[I]},blockSize:4,ivSize:2});function g(){for(var v=this._X,_=this._C,M=0;M<8;M++)u[M]=_[M];for(_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0>>0?1:0)|0,this._b=_[7]>>>0>>0?1:0,M=0;M<8;M++){var I=v[M]+_[M],k=65535&I,w=I>>>16,S=((k*k>>>17)+k*w>>>15)+w*w,L=((4294901760&I)*I|0)+((65535&I)*I|0);d[M]=S^L}v[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,v[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,v[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,v[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,v[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,v[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,v[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,v[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}r.RabbitLegacy=o._createHelper(f)}(),n.RabbitLegacy)}),$n(function(e,t){e.exports=jn}));function U4(){throw new Error("setTimeout has not been defined")}function F4(){throw new Error("clearTimeout has not been defined")}var $l=U4,Gl=F4;function $4(e){if($l===setTimeout)return setTimeout(e,0);if(($l===U4||!$l)&&setTimeout)return $l=setTimeout,setTimeout(e,0);try{return $l(e,0)}catch{try{return $l.call(null,e,0)}catch{return $l.call(this,e,0)}}}typeof Ff.setTimeout=="function"&&($l=setTimeout),typeof Ff.clearTimeout=="function"&&(Gl=clearTimeout);var Ic,fl=[],yf=!1,vv=-1;function $pe(){yf&&Ic&&(yf=!1,Ic.length?fl=Ic.concat(fl):vv=-1,fl.length&&G4())}function G4(){if(!yf){var e=$4($pe);yf=!0;for(var t=fl.length;t;){for(Ic=fl,fl=[];++vv1)for(var n=1;n0&&s.length>o){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,u=d,typeof console.warn=="function"?console.warn(u):console.log(u)}}else s=i[t]=n,++e._eventsCount;return e}function FD(e,t,n){var r=!1;function o(){e.removeListener(t,o),r||(r=!0,n.apply(e,arguments))}return o.listener=n,o}function $D(e){var t=this._events;if(t){var n=t[e];if(typeof n=="function")return 1;if(n)return n.length}return 0}function wg(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}Bl.prototype=Object.create(null),Gn.EventEmitter=Gn,Gn.usingDomains=!1,Gn.prototype.domain=void 0,Gn.prototype._events=void 0,Gn.prototype._maxListeners=void 0,Gn.defaultMaxListeners=10,Gn.init=function(){this.domain=null,Gn.usingDomains&&(void 0).active&&(void 0).Domain,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Bl,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Gn.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},Gn.prototype.getMaxListeners=function(){return H4(this)},Gn.prototype.emit=function(e){var t,n,r,o,i,s,u,d=e==="error";if(s=this._events)d=d&&s.error==null;else if(!d)return!1;if(u=this.domain,d){if(t=arguments[1],!u){if(t instanceof Error)throw t;var f=new Error('Uncaught, unspecified "error" event. ('+t+")");throw f.context=t,f}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=u,t.domainThrown=!1,u.emit("error",t),!1}if(!(n=s[e]))return!1;var g=typeof n=="function";switch(r=arguments.length){case 1:Gpe(n,g,this);break;case 2:Bpe(n,g,this,arguments[1]);break;case 3:Hpe(n,g,this,arguments[1],arguments[2]);break;case 4:qpe(n,g,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(r-1),i=1;i0;)if(n[i]===t||n[i].listener&&n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;if(n.length===1){if(n[0]=void 0,--this._eventsCount==0)return this._events=new Bl,this;delete r[e]}else(function(u,d){for(var f=d,g=f+1,v=u.length;g0?Reflect.ownKeys(this._events):[]};var zi=typeof Object.create=="function"?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},zpe=/%[sdj%]/g;function jpe(e){if(!DI(e)){for(var t=[],n=0;n=o)return u;switch(u){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch{return"[Circular]"}default:return u}}),s=r[n];n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),V4(t)?n.showHidden=t:t&&function(r,o){if(!o||!Sg(o))return r;for(var i=Object.keys(o),s=i.length;s--;)r[i[s]]=o[i[s]]}(n,t),su(n.showHidden)&&(n.showHidden=!1),su(n.depth)&&(n.depth=2),su(n.colors)&&(n.colors=!1),su(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=Wpe),fy(n,e,n.depth)}function Wpe(e,t){var n=vu.styles[t];return n?"\x1B["+vu.colors[n][0]+"m"+e+"\x1B["+vu.colors[n][1]+"m":e}function Kpe(e,t){return e}function fy(e,t,n){if(e.customInspect&&t&&Rb(t.inspect)&&t.inspect!==vu&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return DI(r)||(r=fy(e,r,n)),r}var o=function(M,I){if(su(I))return M.stylize("undefined","undefined");if(DI(I)){var k="'"+JSON.stringify(I).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return M.stylize(k,"string")}if(w=I,typeof w=="number")return M.stylize(""+I,"number");var w;if(V4(I))return M.stylize(""+I,"boolean");if(VT(I))return M.stylize("null","null")}(e,t);if(o)return o;var i=Object.keys(t),s=function(M){var I={};return M.forEach(function(k,w){I[k]=!0}),I}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),Ob(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Eb(t);if(i.length===0){if(Rb(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(Lb(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(GD(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Ob(t))return Eb(t)}var d,f,g="",v=!1,_=["{","}"];return d=t,Array.isArray(d)&&(v=!0,_=["[","]"]),Rb(t)&&(g=" [Function"+(t.name?": "+t.name:"")+"]"),Lb(t)&&(g=" "+RegExp.prototype.toString.call(t)),GD(t)&&(g=" "+Date.prototype.toUTCString.call(t)),Ob(t)&&(g=" "+Eb(t)),i.length!==0||v&&t.length!=0?n<0?Lb(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),f=v?function(M,I,k,w,S){for(var L=[],A=0,O=I.length;A60?k[0]+(I===""?"":I+` `)+" "+M.join(`, `)+" "+k[1]:k[0]+I+" "+M.join(", ")+" "+k[1]}(f,g,_)):_[0]+g+_[1]}function Eb(e){return"["+Error.prototype.toString.call(e)+"]"}function Ab(e,t,n,r,o,i){var s,u,d;if((d=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=d.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):d.set&&(u=e.stylize("[Setter]","special")),z4(r,o)||(s="["+o+"]"),u||(e.seen.indexOf(d.value)<0?(u=VT(n)?fy(e,d.value,null):fy(e,d.value,n-1)).indexOf(` `)>-1&&(u=i?u.split(` `).map(function(f){return" "+f}).join(` `).substr(2):` `+u.split(` `).map(function(f){return" "+f}).join(` `)):u=e.stylize("[Circular]","special")),su(s)){if(i&&o.match(/^\d+$/))return u;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function V4(e){return typeof e=="boolean"}function VT(e){return e===null}function DI(e){return typeof e=="string"}function su(e){return e===void 0}function Lb(e){return Sg(e)&&zT(e)==="[object RegExp]"}function Sg(e){return typeof e=="object"&&e!==null}function GD(e){return Sg(e)&&zT(e)==="[object Date]"}function Ob(e){return Sg(e)&&(zT(e)==="[object Error]"||e instanceof Error)}function Rb(e){return typeof e=="function"}function zT(e){return Object.prototype.toString.call(e)}function z4(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function rc(){this.head=null,this.tail=null,this.length=0}vu.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},vu.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},rc.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},rc.prototype.unshift=function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},rc.prototype.shift=function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},rc.prototype.clear=function(){this.head=this.tail=null,this.length=0},rc.prototype.join=function(e){if(this.length===0)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},rc.prototype.concat=function(e){if(this.length===0)return Qe.alloc(0);if(this.length===1)return this.head.data;for(var t=Qe.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var Ype=Qe.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function wh(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!Ype(t))throw new Error("Unknown encoding: "+t)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Xpe;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Zpe;break;default:return void(this.write=Jpe)}this.charBuffer=new Qe(6),this.charReceived=0,this.charLength=0}function Jpe(e){return e.toString(this.encoding)}function Xpe(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function Zpe(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}wh.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&o<=56319)){if(this.charReceived=this.charLength=0,e.length===0)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var o;if(r=(t+=e.toString(this.encoding,0,r)).length-1,(o=t.charCodeAt(r))>=55296&&o<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),t.substring(0,r)}return t},wh.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(t==1&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},wh.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,o=this.encoding;t+=r.slice(0,n).toString(o)}return t},zr.ReadableState=j4;var sr=function(e){return su(Db)&&(Db=""),e=e.toUpperCase(),xm[e]||(new RegExp("\\b"+e+"\\b","i").test(Db)?xm[e]=function(){var t=jpe.apply(null,arguments);console.error("%s %d: %s",e,0,t)}:xm[e]=function(){}),xm[e]}("stream");function j4(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Ls&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||n===0?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new rc,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new wh(e.encoding),this.encoding=e.encoding)}function zr(e){if(!(this instanceof zr))return new zr(e);this._readableState=new j4(e,this),this.readable=!0,e&&typeof e.read=="function"&&(this._read=e.read),Gn.call(this)}function BD(e,t,n,r,o){var i=function(f,g){var v=null;return Tg(g)||typeof g=="string"||g==null||f.objectMode||(v=new TypeError("Invalid non-string/buffer chunk")),v}(t,n);if(i)e.emit("error",i);else if(n===null)t.reading=!1,function(f,g){if(!g.ended){if(g.decoder){var v=g.decoder.end();v&&v.length&&(g.buffer.push(v),g.length+=g.objectMode?1:v.length)}g.ended=!0,py(f)}}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!o){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&o){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var d;!t.decoder||o||r||(n=t.decoder.write(n),d=!t.objectMode&&n.length===0),o||(t.reading=!1),d||(t.flowing&&t.length===0&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,o?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&py(e))),function(f,g){g.readingMore||(g.readingMore=!0,Jo(Qpe,f,g))}(e,t)}else o||(t.reading=!1);return function(f){return!f.ended&&(f.needReadable||f.lengtht.highWaterMark&&(t.highWaterMark=function(n){return n>=HD?n=HD:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function py(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(sr("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Jo(VD,e):VD(e))}function VD(e){sr("emit readable"),e.emit("readable"),jT(e)}function Qpe(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):t.buffer.length===1?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(r,o,i){var s;return r_.length?_.length:u;if(M===_.length?v+=_:v+=_.slice(0,u),(u-=M)===0){M===_.length?(++g,f.next?d.head=f.next:d.head=d.tail=null):(d.head=f,f.data=_.slice(M));break}++g}return d.length-=g,v}(r,o):function(u,d){var f=Qe.allocUnsafe(u),g=d.head,v=1;for(g.data.copy(f),u-=g.data.length;g=g.next;){var _=g.data,M=u>_.length?_.length:u;if(_.copy(f,f.length-u,0,M),(u-=M)===0){M===_.length?(++v,g.next?d.head=g.next:d.head=d.tail=null):(d.head=g,g.data=_.slice(M));break}++v}return d.length-=v,f}(r,o),s}(e,t.buffer,t.decoder),n);var n}function Nb(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Jo(nhe,t,e))}function nhe(e,t){e.endEmitted||e.length!==0||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function jD(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return sr("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Nb(this):py(this),null;if((e=qD(e,t))===0&&t.ended)return t.length===0&&Nb(this),null;var r,o=t.needReadable;return sr("need readable",o),(t.length===0||t.length-e0?zD(e,t):null)===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&Nb(this)),r!==null&&this.emit("data",r),r},zr.prototype._read=function(e){this.emit("error",new Error("not implemented"))},zr.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,sr("pipe count=%d opts=%j",r.pipesCount,t);var o=!t||t.end!==!1?s:f;function i(w){sr("onunpipe"),w===n&&f()}function s(){sr("onend"),e.end()}r.endEmitted?Jo(o):n.once("end",o),e.on("unpipe",i);var u=function(w){return function(){var S=w._readableState;sr("pipeOnDrain",S.awaitDrain),S.awaitDrain&&S.awaitDrain--,S.awaitDrain===0&&w.listeners("data").length&&(S.flowing=!0,jT(w))}}(n);e.on("drain",u);var d=!1;function f(){sr("cleanup"),e.removeListener("close",M),e.removeListener("finish",I),e.removeListener("drain",u),e.removeListener("error",_),e.removeListener("unpipe",i),n.removeListener("end",s),n.removeListener("end",f),n.removeListener("data",v),d=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||u()}var g=!1;function v(w){sr("ondata"),g=!1,e.write(w)!==!1||g||((r.pipesCount===1&&r.pipes===e||r.pipesCount>1&&jD(r.pipes,e)!==-1)&&!d&&(sr("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,g=!0),n.pause())}function _(w){var S;sr("onerror",w),k(),e.removeListener("error",_),S="error",e.listeners(S).length===0&&e.emit("error",w)}function M(){e.removeListener("finish",I),k()}function I(){sr("onfinish"),e.removeListener("close",M),k()}function k(){sr("unpipe"),n.unpipe(e)}return n.on("data",v),function(w,S,L){if(typeof w.prependListener=="function")return w.prependListener(S,L);w._events&&w._events[S]?Array.isArray(w._events[S])?w._events[S].unshift(L):w._events[S]=[L,w._events[S]]:w.on(S,L)}(e,"error",_),e.once("close",M),e.once("finish",I),e.emit("pipe",n),r.flowing||(sr("pipe resume"),n.resume()),e},zr.prototype.unpipe=function(e){var t=this._readableState;if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},ui.prototype._write=function(e,t,n){n(new Error("not implemented"))},ui.prototype._writev=null,ui.prototype.end=function(e,t,n){var r=this._writableState;typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null),e!=null&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(o,i,s){i.ending=!0,Y4(o,i),s&&(i.finished?Jo(s):o.once("finish",s)),i.ended=!0,o.writable=!1}(this,r,n)},zi(Ls,zr);for(var YD=Object.keys(ui.prototype),Pb=0;Pb=0;)e[t]=0}var dhe=0,Z4=1,fhe=2,WT=29,kg=256,ig=kg+1+WT,_f=30,KT=19,QD=2*ig+1,Cc=15,Ub=16,phe=7,YT=256,Q4=16,e3=17,t3=18,LI=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],yv=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],hhe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],eE=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ol=new Array(2*(ig+2));Qf(ol);var kh=new Array(2*_f);Qf(kh);var sg=new Array(512);Qf(sg);var ag=new Array(256);Qf(ag);var JT=new Array(WT);Qf(JT);var tE,nE,rE,vy=new Array(_f);function Fb(e,t,n,r,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=e&&e.length}function $b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function n3(e){return e<256?sg[e]:sg[256+(e>>>7)]}function lg(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Wi(e,t,n){e.bi_valid>Ub-n?(e.bi_buf|=t<>Ub-e.bi_valid,e.bi_valid+=n-Ub):(e.bi_buf|=t<>>=1,n<<=1;while(--t>0);return n>>>1}function o3(e,t,n){var r,o,i=new Array(Cc+1),s=0;for(r=1;r<=Cc;r++)i[r]=s=s+n[r-1]<<1;for(o=0;o<=t;o++){var u=e[2*o+1];u!==0&&(e[2*o]=r3(i[u]++,u))}}function i3(e){var t;for(t=0;t8?lg(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function oE(e,t,n,r){var o=2*t,i=2*n;return e[o]>1;n>=1;n--)Gb(e,i,n);o=d;do n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Gb(e,i,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,i[2*o]=i[2*n]+i[2*r],e.depth[o]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,i[2*n+1]=i[2*r+1]=o,e.heap[1]=o++,Gb(e,i,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(g,v){var _,M,I,k,w,S,L=v.dyn_tree,A=v.max_code,O=v.stat_desc.static_tree,H=v.stat_desc.has_stree,q=v.stat_desc.extra_bits,P=v.stat_desc.extra_base,B=v.stat_desc.max_length,j=0;for(k=0;k<=Cc;k++)g.bl_count[k]=0;for(L[2*g.heap[g.heap_max]+1]=0,_=g.heap_max+1;_B&&(k=B,j++),L[2*M+1]=k,M>A||(g.bl_count[k]++,w=0,M>=P&&(w=q[M-P]),S=L[2*M],g.opt_len+=S*(k+w),H&&(g.static_len+=S*(O[2*M+1]+w)));if(j!==0){do{for(k=B-1;g.bl_count[k]===0;)k--;g.bl_count[k]--,g.bl_count[k+1]+=2,g.bl_count[B]--,j-=2}while(j>0);for(k=B;k!==0;k--)for(M=g.bl_count[k];M!==0;)(I=g.heap[--_])>A||(L[2*I+1]!==k&&(g.opt_len+=(k-L[2*I+1])*L[2*I],L[2*I+1]=k),M--)}}(e,t),o3(i,f,e.bl_count)}function sE(e,t,n){var r,o,i=-1,s=t[1],u=0,d=7,f=4;for(s===0&&(d=138,f=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)o=s,s=t[2*(r+1)+1],++u>=7;o<_f;o++)for(vy[o]=i<<7,t=0;t<1<=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(e)}function vhe(e,t,n,r){var o,i,s=0;e.level>0?(e.strm.data_type===che&&(e.strm.data_type=function(u){var d,f=4093624447;for(d=0;d<=31;d++,f>>>=1)if(1&f&&u.dyn_ltree[2*d]!==0)return XD;if(u.dyn_ltree[18]!==0||u.dyn_ltree[20]!==0||u.dyn_ltree[26]!==0)return ZD;for(d=32;d=3&&u.bl_tree[2*eE[d]+1]===0;d--);return u.opt_len+=3*(d+1)+5+5+4,d}(e),o=e.opt_len+3+7>>>3,(i=e.static_len+3+7>>>3)<=o&&(o=i)):o=i=n+5,n+4<=o&&t!==-1?a3(e,t,n,r):e.strategy===uhe||i===o?(Wi(e,(Z4<<1)+(r?1:0),3),iE(e,ol,kh)):(Wi(e,(fhe<<1)+(r?1:0),3),function(u,d,f,g){var v;for(Wi(u,d-257,5),Wi(u,f-1,5),Wi(u,g-4,4),v=0;v>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(ag[n]+kg+1)]++,e.dyn_dtree[2*n3(t)]++),e.last_lit===e.lit_bufsize-1}function OI(e,t,n,r){for(var o=65535&e|0,i=e>>>16&65535|0,s=0;n!==0;){n-=s=n>2e3?2e3:n;do i=i+(o=o+t[r++]|0)|0;while(--s);o%=65521,i%=65521}return o|i<<16|0}var yhe=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();function Do(e,t,n,r){var o=yhe,i=r+n;e^=-1;for(var s=r;s>>8^o[255&(e^t[s])];return-1^e}var nf,Kc=0,_he=1,bhe=3,jl=4,uE=5,fc=0,cE=1,Yc=-2,Mhe=-3,Hb=-5,Ihe=-1,Che=1,Um=2,The=3,whe=4,She=2,XT=8,khe=9,RI=286,Dhe=30,Ehe=19,Ahe=2*RI+1,Lhe=15,rr=3,au=258,Ys=au+rr+1,Ohe=32,ZT=42,NI=69,_v=73,bv=91,Mv=103,Tc=113,oh=666,Eo=1,Dh=2,wc=3,bf=4,Rhe=3;function lu(e,t){return e.msg=X4[t],t}function dE(e){return(e<<1)-(e>4?9:0)}function pc(e){for(var t=e.length;--t>=0;)e[t]=0}function Hl(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(al(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function Xo(e,t){vhe(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Hl(e.strm)}function Zn(e,t){e.pending_buf[e.pending++]=t}function Wp(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function l3(e,t){var n,r,o=e.max_chain_length,i=e.strstart,s=e.prev_length,u=e.nice_match,d=e.strstart>e.w_size-Ys?e.strstart-(e.w_size-Ys):0,f=e.window,g=e.w_mask,v=e.prev,_=e.strstart+au,M=f[i+s-1],I=f[i+s];e.prev_length>=e.good_match&&(o>>=2),u>e.lookahead&&(u=e.lookahead);do if(f[(n=t)+s]===I&&f[n+s-1]===M&&f[n]===f[i]&&f[++n]===f[i+1]){i+=2,n++;do;while(f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&f[++i]===f[++n]&&i<_);if(r=au-(_-i),i=_-au,r>s){if(e.match_start=t,s=r,r>=u)break;M=f[i+s-1],I=f[i+s]}}while((t=v[t&g])>d&&--o!=0);return s<=e.lookahead?s:e.lookahead}function ug(e){var t,n,r,o,i,s,u,d,f,g,v=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=v+(v-Ys)){al(e.window,e.window,v,v,0),e.match_start-=v,e.strstart-=v,e.block_start-=v,t=n=e.hash_size;do r=e.head[--t],e.head[t]=r>=v?r-v:0;while(--n);t=n=v;do r=e.prev[--t],e.prev[t]=r>=v?r-v:0;while(--n);o+=v}if(e.strm.avail_in===0)break;if(s=e.strm,u=e.window,d=e.strstart+e.lookahead,f=o,g=void 0,(g=s.avail_in)>f&&(g=f),n=g===0?0:(s.avail_in-=g,al(u,s.input,s.next_in,g,d),s.state.wrap===1?s.adler=OI(s.adler,u,g,d):s.state.wrap===2&&(s.adler=Do(s.adler,u,g,d)),s.next_in+=g,s.total_in+=g,g),e.lookahead+=n,e.lookahead+e.insert>=rr)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<=rr&&(e.ins_h=(e.ins_h<=rr)if(r=yu(e,e.strstart-e.match_start,e.match_length-rr),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=rr){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=rr&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=rr-1)),e.prev_length>=rr&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-rr,r=yu(e,e.strstart-1-e.prev_match,e.prev_length-rr),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=o&&(e.ins_h=(e.ins_h<uE||t<0)return e?lu(e,Yc):Yc;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===oh&&t!==jl)return lu(e,e.avail_out===0?Hb:Yc);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===ZT)if(r.wrap===2)e.adler=0,Zn(r,31),Zn(r,139),Zn(r,8),r.gzhead?(Zn(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Zn(r,255&r.gzhead.time),Zn(r,r.gzhead.time>>8&255),Zn(r,r.gzhead.time>>16&255),Zn(r,r.gzhead.time>>24&255),Zn(r,r.level===9?2:r.strategy>=Um||r.level<2?4:0),Zn(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Zn(r,255&r.gzhead.extra.length),Zn(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Do(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=NI):(Zn(r,0),Zn(r,0),Zn(r,0),Zn(r,0),Zn(r,0),Zn(r,r.level===9?2:r.strategy>=Um||r.level<2?4:0),Zn(r,Rhe),r.status=Tc);else{var s=XT+(r.w_bits-8<<4)<<8;s|=(r.strategy>=Um||r.level<2?0:r.level<6?1:r.level===6?2:3)<<6,r.strstart!==0&&(s|=Ohe),s+=31-s%31,r.status=Tc,Wp(r,s),r.strstart!==0&&(Wp(r,e.adler>>>16),Wp(r,65535&e.adler)),e.adler=1}if(r.status===NI)if(r.gzhead.extra){for(o=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>o&&(e.adler=Do(e.adler,r.pending_buf,r.pending-o,o)),Hl(e),o=r.pending,r.pending!==r.pending_buf_size));)Zn(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>o&&(e.adler=Do(e.adler,r.pending_buf,r.pending-o,o)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=_v)}else r.status=_v;if(r.status===_v)if(r.gzhead.name){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(e.adler=Do(e.adler,r.pending_buf,r.pending-o,o)),Hl(e),o=r.pending,r.pending===r.pending_buf_size)){i=1;break}i=r.gzindexo&&(e.adler=Do(e.adler,r.pending_buf,r.pending-o,o)),i===0&&(r.gzindex=0,r.status=bv)}else r.status=bv;if(r.status===bv)if(r.gzhead.comment){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(e.adler=Do(e.adler,r.pending_buf,r.pending-o,o)),Hl(e),o=r.pending,r.pending===r.pending_buf_size)){i=1;break}i=r.gzindexo&&(e.adler=Do(e.adler,r.pending_buf,r.pending-o,o)),i===0&&(r.status=Mv)}else r.status=Mv;if(r.status===Mv&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Hl(e),r.pending+2<=r.pending_buf_size&&(Zn(r,255&e.adler),Zn(r,e.adler>>8&255),e.adler=0,r.status=Tc)):r.status=Tc),r.pending!==0){if(Hl(e),e.avail_out===0)return r.last_flush=-1,fc}else if(e.avail_in===0&&dE(t)<=dE(n)&&t!==jl)return lu(e,Hb);if(r.status===oh&&e.avail_in!==0)return lu(e,Hb);if(e.avail_in!==0||r.lookahead!==0||t!==Kc&&r.status!==oh){var u=r.strategy===Um?function(d,f){for(var g;;){if(d.lookahead===0&&(ug(d),d.lookahead===0)){if(f===Kc)return Eo;break}if(d.match_length=0,g=yu(d,0,d.window[d.strstart]),d.lookahead--,d.strstart++,g&&(Xo(d,!1),d.strm.avail_out===0))return Eo}return d.insert=0,f===jl?(Xo(d,!0),d.strm.avail_out===0?wc:bf):d.last_lit&&(Xo(d,!1),d.strm.avail_out===0)?Eo:Dh}(r,t):r.strategy===The?function(d,f){for(var g,v,_,M,I=d.window;;){if(d.lookahead<=au){if(ug(d),d.lookahead<=au&&f===Kc)return Eo;if(d.lookahead===0)break}if(d.match_length=0,d.lookahead>=rr&&d.strstart>0&&(v=I[_=d.strstart-1])===I[++_]&&v===I[++_]&&v===I[++_]){M=d.strstart+au;do;while(v===I[++_]&&v===I[++_]&&v===I[++_]&&v===I[++_]&&v===I[++_]&&v===I[++_]&&v===I[++_]&&v===I[++_]&&_d.lookahead&&(d.match_length=d.lookahead)}if(d.match_length>=rr?(g=yu(d,1,d.match_length-rr),d.lookahead-=d.match_length,d.strstart+=d.match_length,d.match_length=0):(g=yu(d,0,d.window[d.strstart]),d.lookahead--,d.strstart++),g&&(Xo(d,!1),d.strm.avail_out===0))return Eo}return d.insert=0,f===jl?(Xo(d,!0),d.strm.avail_out===0?wc:bf):d.last_lit&&(Xo(d,!1),d.strm.avail_out===0)?Eo:Dh}(r,t):nf[r.level].func(r,t);if(u!==wc&&u!==bf||(r.status=oh),u===Eo||u===wc)return e.avail_out===0&&(r.last_flush=-1),fc;if(u===Dh&&(t===_he?mhe(r):t!==uE&&(a3(r,0,0,!1),t===bhe&&(pc(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Hl(e),e.avail_out===0))return r.last_flush=-1,fc}return t!==jl?fc:r.wrap<=0?cE:(r.wrap===2?(Zn(r,255&e.adler),Zn(r,e.adler>>8&255),Zn(r,e.adler>>16&255),Zn(r,e.adler>>24&255),Zn(r,255&e.total_in),Zn(r,e.total_in>>8&255),Zn(r,e.total_in>>16&255),Zn(r,e.total_in>>24&255)):(Wp(r,e.adler>>>16),Wp(r,65535&e.adler)),Hl(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?fc:cE)}nf=[new da(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ug(e),e.lookahead===0&&t===Kc)return Eo;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Xo(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ys&&(Xo(e,!1),e.strm.avail_out===0))return Eo}return e.insert=0,t===jl?(Xo(e,!0),e.strm.avail_out===0?wc:bf):(e.strstart>e.block_start&&(Xo(e,!1),e.strm.avail_out),Eo)}),new da(4,4,8,4,qb),new da(4,5,16,8,qb),new da(4,6,32,32,qb),new da(4,4,16,16,Hd),new da(8,16,32,32,Hd),new da(8,16,128,128,Hd),new da(8,32,128,256,Hd),new da(32,128,258,1024,Hd),new da(32,258,258,4096,Hd)];var Fm=30,xhe=12;function Uhe(e,t){var n,r,o,i,s,u,d,f,g,v,_,M,I,k,w,S,L,A,O,H,q,P,B,j,$;n=e.state,r=e.next_in,j=e.input,o=r+(e.avail_in-5),i=e.next_out,$=e.output,s=i-(t-e.avail_out),u=i+(e.avail_out-257),d=n.dmax,f=n.wsize,g=n.whave,v=n.wnext,_=n.window,M=n.hold,I=n.bits,k=n.lencode,w=n.distcode,S=(1<>>=O=A>>>24,I-=O,(O=A>>>16&255)===0)$[i++]=65535&A;else{if(!(16&O)){if(!(64&O)){A=k[(65535&A)+(M&(1<>>=O,I-=O),I<15&&(M+=j[r++]<>>=O=A>>>24,I-=O,!(16&(O=A>>>16&255))){if(!(64&O)){A=w[(65535&A)+(M&(1<d){e.msg="invalid distance too far back",n.mode=Fm;break e}if(M>>>=O,I-=O,q>(O=i-s)){if((O=q-O)>g&&n.sane){e.msg="invalid distance too far back",n.mode=Fm;break e}if(P=0,B=_,v===0){if(P+=f-O,O2;)$[i++]=B[P++],$[i++]=B[P++],$[i++]=B[P++],H-=3;H&&($[i++]=B[P++],H>1&&($[i++]=B[P++]))}else{P=i-q;do $[i++]=$[P++],$[i++]=$[P++],$[i++]=$[P++],H-=3;while(H>2);H&&($[i++]=$[P++],H>1&&($[i++]=$[P++]))}break}}break}}while(r>3,M&=(1<<(I-=H<<3))-1,e.next_in=r,e.next_out=i,e.avail_in=r=1&&Z[H]===0;H--);if(q>H&&(q=H),H===0)return o[i++]=20971520,o[i++]=20971520,u.bits=1,0;for(O=1;O0&&(e===gE||H!==1))return-1;for(K[1]=0,L=1;LpE||e===mE&&$>hE)return 1;for(;;){I=L-B,s[A]M?(k=re[X+s[A]],w=T[x+s[A]]):(k=96,w=0),d=1<>B)+(f-=d)]=I<<24|k<<16|w|0;while(f!==0);for(d=1<>=1;if(d!==0?(R&=d-1,R+=d):R=0,A++,--Z[L]==0){if(L===H)break;L=t[n+s[A]]}if(L>q&&(R&v)!==g){for(B===0&&(B=q),_+=O,j=1<<(P=L-B);P+BpE||e===mE&&$>hE)return 1;o[g=R&v]=q<<24|P<<16|_-i|0}}return R!==0&&(o[_+R]=L-B<<24|64<<16|0),u.bits=q,0}var Hhe=0,u3=1,c3=2,vE=4,qhe=5,$m=6,yy=0,Vhe=1,zhe=2,_u=-2,jhe=-3,Whe=-4,Khe=-5,yE=8,d3=1,_E=2,bE=3,ME=4,IE=5,CE=6,TE=7,wE=8,SE=9,kE=10,DE=11,Ya=12,zb=13,EE=14,jb=15,AE=16,LE=17,OE=18,RE=19,Gm=20,Bm=21,NE=22,PE=23,xE=24,UE=25,FE=26,Wb=27,$E=28,GE=29,Lr=30,Yhe=31,Jhe=32,Xhe=852,Zhe=592;function BE(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function Qhe(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new ws(320),this.work=new ws(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f3(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,function(n){var r;return n&&n.state?(r=n.state,n.total_in=n.total_out=r.total=0,n.msg="",r.wrap&&(n.adler=1&r.wrap),r.mode=d3,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new gy(Xhe),r.distcode=r.distdyn=new gy(Zhe),r.sane=1,r.back=-1,yy):_u}(e)):_u}function ege(e,t){var n,r;return e?(r=new Qhe,e.state=r,r.window=null,(n=function(o,i){var s,u;return o&&o.state?(u=o.state,i<0?(s=0,i=-i):(s=1+(i>>4),i<48&&(i&=15)),i&&(i<8||i>15)?_u:(u.window!==null&&u.wbits!==i&&(u.window=null),u.wrap=s,u.wbits=i,f3(o))):_u}(e,t))!==yy&&(e.state=null),n):_u}var Kb,Yb,HE=!0;function tge(e){if(HE){var t;for(Kb=new gy(512),Yb=new gy(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Eh(u3,e.lens,0,288,Kb,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Eh(c3,e.lens,0,32,Yb,0,e.work,{bits:5}),HE=!1}e.lencode=Kb,e.lenbits=9,e.distcode=Yb,e.distbits=5}function nge(e,t){var n,r,o,i,s,u,d,f,g,v,_,M,I,k,w,S,L,A,O,H,q,P,B,j,$=0,R=new hy(4),T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return _u;(n=e.state).mode===Ya&&(n.mode=zb),s=e.next_out,o=e.output,d=e.avail_out,i=e.next_in,r=e.input,u=e.avail_in,f=n.hold,g=n.bits,v=u,_=d,P=yy;e:for(;;)switch(n.mode){case d3:if(n.wrap===0){n.mode=zb;break}for(;g<16;){if(u===0)break e;u--,f+=r[i++]<>>8&255,n.check=Do(n.check,R,2,0),f=0,g=0,n.mode=_E;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&f)<<8)+(f>>8))%31){e.msg="incorrect header check",n.mode=Lr;break}if((15&f)!==yE){e.msg="unknown compression method",n.mode=Lr;break}if(g-=4,q=8+(15&(f>>>=4)),n.wbits===0)n.wbits=q;else if(q>n.wbits){e.msg="invalid window size",n.mode=Lr;break}n.dmax=1<>8&1),512&n.flags&&(R[0]=255&f,R[1]=f>>>8&255,n.check=Do(n.check,R,2,0)),f=0,g=0,n.mode=bE;case bE:for(;g<32;){if(u===0)break e;u--,f+=r[i++]<>>8&255,R[2]=f>>>16&255,R[3]=f>>>24&255,n.check=Do(n.check,R,4,0)),f=0,g=0,n.mode=ME;case ME:for(;g<16;){if(u===0)break e;u--,f+=r[i++]<>8),512&n.flags&&(R[0]=255&f,R[1]=f>>>8&255,n.check=Do(n.check,R,2,0)),f=0,g=0,n.mode=IE;case IE:if(1024&n.flags){for(;g<16;){if(u===0)break e;u--,f+=r[i++]<>>8&255,n.check=Do(n.check,R,2,0)),f=0,g=0}else n.head&&(n.head.extra=null);n.mode=CE;case CE:if(1024&n.flags&&((M=n.length)>u&&(M=u),M&&(n.head&&(q=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),al(n.head.extra,r,i,M,q)),512&n.flags&&(n.check=Do(n.check,r,M,i)),u-=M,i+=M,n.length-=M),n.length))break e;n.length=0,n.mode=TE;case TE:if(2048&n.flags){if(u===0)break e;M=0;do q=r[i+M++],n.head&&q&&n.length<65536&&(n.head.name+=String.fromCharCode(q));while(q&&M>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Ya;break;case kE:for(;g<32;){if(u===0)break e;u--,f+=r[i++]<>>=7&g,g-=7&g,n.mode=Wb;break}for(;g<3;){if(u===0)break e;u--,f+=r[i++]<>>=1)){case 0:n.mode=EE;break;case 1:if(tge(n),n.mode=Gm,t===$m){f>>>=2,g-=2;break e}break;case 2:n.mode=LE;break;case 3:e.msg="invalid block type",n.mode=Lr}f>>>=2,g-=2;break;case EE:for(f>>>=7&g,g-=7&g;g<32;){if(u===0)break e;u--,f+=r[i++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=Lr;break}if(n.length=65535&f,f=0,g=0,n.mode=jb,t===$m)break e;case jb:n.mode=AE;case AE:if(M=n.length){if(M>u&&(M=u),M>d&&(M=d),M===0)break e;al(o,r,i,M,s),u-=M,i+=M,d-=M,s+=M,n.length-=M;break}n.mode=Ya;break;case LE:for(;g<14;){if(u===0)break e;u--,f+=r[i++]<>>=5,g-=5,n.ndist=1+(31&f),f>>>=5,g-=5,n.ncode=4+(15&f),f>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Lr;break}n.have=0,n.mode=OE;case OE:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[T[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},P=Eh(Hhe,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,P){e.msg="invalid code lengths set",n.mode=Lr;break}n.have=0,n.mode=RE;case RE:for(;n.have>>16&255,L=65535&$,!((w=$>>>24)<=g);){if(u===0)break e;u--,f+=r[i++]<>>=w,g-=w,n.lens[n.have++]=L;else{if(L===16){for(j=w+2;g>>=w,g-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=Lr;break}q=n.lens[n.have-1],M=3+(3&f),f>>>=2,g-=2}else if(L===17){for(j=w+3;g>>=w)),f>>>=3,g-=3}else{for(j=w+7;g>>=w)),f>>>=7,g-=7}if(n.have+M>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Lr;break}for(;M--;)n.lens[n.have++]=q}}if(n.mode===Lr)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Lr;break}if(n.lenbits=9,B={bits:n.lenbits},P=Eh(u3,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,P){e.msg="invalid literal/lengths set",n.mode=Lr;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},P=Eh(c3,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,P){e.msg="invalid distances set",n.mode=Lr;break}if(n.mode=Gm,t===$m)break e;case Gm:n.mode=Bm;case Bm:if(u>=6&&d>=258){e.next_out=s,e.avail_out=d,e.next_in=i,e.avail_in=u,n.hold=f,n.bits=g,Uhe(e,_),s=e.next_out,o=e.output,d=e.avail_out,i=e.next_in,r=e.input,u=e.avail_in,f=n.hold,g=n.bits,n.mode===Ya&&(n.back=-1);break}for(n.back=0;S=($=n.lencode[f&(1<>>16&255,L=65535&$,!((w=$>>>24)<=g);){if(u===0)break e;u--,f+=r[i++]<>A)])>>>16&255,L=65535&$,!(A+(w=$>>>24)<=g);){if(u===0)break e;u--,f+=r[i++]<>>=A,g-=A,n.back+=A}if(f>>>=w,g-=w,n.back+=w,n.length=L,S===0){n.mode=FE;break}if(32&S){n.back=-1,n.mode=Ya;break}if(64&S){e.msg="invalid literal/length code",n.mode=Lr;break}n.extra=15&S,n.mode=NE;case NE:if(n.extra){for(j=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=PE;case PE:for(;S=($=n.distcode[f&(1<>>16&255,L=65535&$,!((w=$>>>24)<=g);){if(u===0)break e;u--,f+=r[i++]<>A)])>>>16&255,L=65535&$,!(A+(w=$>>>24)<=g);){if(u===0)break e;u--,f+=r[i++]<>>=A,g-=A,n.back+=A}if(f>>>=w,g-=w,n.back+=w,64&S){e.msg="invalid distance code",n.mode=Lr;break}n.offset=L,n.extra=15&S,n.mode=xE;case xE:if(n.extra){for(j=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Lr;break}n.mode=UE;case UE:if(d===0)break e;if(M=_-d,n.offset>M){if((M=n.offset-M)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Lr;break}M>n.wnext?(M-=n.wnext,I=n.wsize-M):I=n.wnext-M,M>n.length&&(M=n.length),k=n.window}else k=o,I=s-n.offset,M=n.length;M>d&&(M=d),d-=M,n.length-=M;do o[s++]=k[I++];while(--M);n.length===0&&(n.mode=Bm);break;case FE:if(d===0)break e;o[s++]=n.length,d--,n.mode=Bm;break;case Wb:if(n.wrap){for(;g<32;){if(u===0)break e;u--,f|=r[i++]<=ie.wsize?(al(ie.window,Z,K-ie.wsize,ie.wsize,0),ie.wnext=0,ie.whave=ie.wsize):((X=ie.wsize-ie.wnext)>re&&(X=re),al(ie.window,Z,K-re,X,ie.wnext),(re-=X)?(al(ie.window,Z,K-re,re,0),ie.wnext=re,ie.whave=ie.wsize):(ie.wnext+=X,ie.wnext===ie.wsize&&(ie.wnext=0),ie.whaveAh)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function rge(e,t){for(var n=0;n15&&(_=2,f-=16),g<1||g>khe||d!==XT||f<8||f>15||u<0||u>9||v<0||v>whe)return lu(s,Yc);f===8&&(f=9);var M=new Nhe;return s.state=M,M.strm=s,M.wrap=_,M.gzhead=null,M.w_bits=f,M.w_size=1<Et.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitsEt.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelEt.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelEt.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=Et.Z_FILTERED&&e.strategy!=Et.Z_HUFFMAN_ONLY&&e.strategy!=Et.Z_RLE&&e.strategy!=Et.Z_FIXED&&e.strategy!=Et.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!Tg(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new Et.Zlib(t);var n=this;this._hadError=!1,this._binding.onerror=function(i,s){n._binding=null,n._hadError=!0;var u=new Error(i);u.errno=s,u.code=Et.codes[s],n.emit("error",u)};var r=Et.Z_DEFAULT_COMPRESSION;typeof e.level=="number"&&(r=e.level);var o=Et.Z_DEFAULT_STRATEGY;typeof e.strategy=="number"&&(o=e.strategy),this._binding.init(e.windowBits||Et.Z_DEFAULT_WINDOWBITS,r,e.memLevel||Et.Z_DEFAULT_MEMLEVEL,o,e.dictionary),this._buffer=new Qe(this._chunkSize),this._offset=0,this._closed=!1,this._level=r,this._strategy=o,this.once("end",this.close)}Object.keys(Iv).forEach(function(e){Iv[Iv[e]]=e}),zi(Ur,Ts),Ur.prototype.params=function(e,t,n){if(eEt.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=Et.Z_FILTERED&&t!=Et.Z_HUFFMAN_ONLY&&t!=Et.Z_RLE&&t!=Et.Z_FIXED&&t!=Et.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var r=this;this.flush(Et.Z_SYNC_FLUSH,function(){r._binding.params(e,t),r._hadError||(r._level=e,r._strategy=t,n&&n())})}else Jo(n)},Ur.prototype.reset=function(){return this._binding.reset()},Ur.prototype._flush=function(e){this._transform(new Qe(0),"",e)},Ur.prototype.flush=function(e,t){var n=this._writableState;if((typeof e=="function"||e===void 0&&!t)&&(t=e,e=Et.Z_FULL_FLUSH),n.ended)t&&Jo(t);else if(n.ending)t&&this.once("end",t);else if(n.needDrain){var r=this;this.once("drain",function(){r.flush(t)})}else this._flushFlag=e,this.write(new Qe(0),"",t)},Ur.prototype.close=function(e){if(e&&Jo(e),!this._closed){this._closed=!0,this._binding.close();var t=this;Jo(function(){t.emit("close")})}},Ur.prototype._transform=function(e,t,n){var r,o=this._writableState,i=(o.ending||o.ended)&&(!e||o.length===e.length);if(!e===null&&!Tg(e))return n(new Error("invalid input"));i?r=Et.Z_FINISH:(r=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||Et.Z_NO_FLUSH)),this._processChunk(e,r,n)},Ur.prototype._processChunk=function(e,t,n){var r=e&&e.length,o=this._chunkSize-this._offset,i=0,s=this,u=typeof n=="function";if(!u){var d,f=[],g=0;this.on("error",function(k){d=k});do var v=this._binding.writeSync(t,e,i,r,this._buffer,this._offset,o);while(!this._hadError&&I(v[0],v[1]));if(this._hadError)throw d;var _=Qe.concat(f,g);return this.close(),_}var M=this._binding.write(t,e,i,r,this._buffer,this._offset,o);function I(k,w){if(!s._hadError){var S=o-w;if(function(O,H){if(!O)throw new Error(H)}(S>=0,"have should not go down"),S>0){var L=s._buffer.slice(s._offset,s._offset+S);s._offset+=S,u?s.push(L):(f.push(L),g+=L.length)}if((w===0||s._offset>=s._chunkSize)&&(o=s._chunkSize,s._offset=0,s._buffer=new Qe(s._chunkSize)),w===0){if(i+=r-k,r=k,!u)return!0;var A=s._binding.write(t,e,i,r,s._buffer,s._offset,s._chunkSize);return A.callback=I,void(A.buffer=e)}if(!u)return!1;n()}}M.buffer=e,M.callback=I},zi(Sc,Ur),zi(kc,Ur),zi(Dc,Ur),zi(Ec,Ur),zi(Ac,Ur),zi(Lc,Ur),zi(Oc,Ur);var VE={codes:Iv,createDeflate:function(e){return new Sc(e)},createInflate:function(e){return new kc(e)},createDeflateRaw:function(e){return new Ac(e)},createInflateRaw:function(e){return new Lc(e)},createGzip:function(e){return new Dc(e)},createGunzip:function(e){return new Ec(e)},createUnzip:function(e){return new Oc(e)},deflate:function(e,t,n){return typeof t=="function"&&(n=t,t={}),Qu(new Sc(t),e,n)},deflateSync:function(e,t){return ec(new Sc(t),e)},gzip:function(e,t,n){return typeof t=="function"&&(n=t,t={}),Qu(new Dc(t),e,n)},gzipSync:function(e,t){return ec(new Dc(t),e)},deflateRaw:function(e,t,n){return typeof t=="function"&&(n=t,t={}),Qu(new Ac(t),e,n)},deflateRawSync:function(e,t){return ec(new Ac(t),e)},unzip:function(e,t,n){return typeof t=="function"&&(n=t,t={}),Qu(new Oc(t),e,n)},unzipSync:function(e,t){return ec(new Oc(t),e)},inflate:function(e,t,n){return typeof t=="function"&&(n=t,t={}),Qu(new kc(t),e,n)},inflateSync:function(e,t){return ec(new kc(t),e)},gunzip:function(e,t,n){return typeof t=="function"&&(n=t,t={}),Qu(new Ec(t),e,n)},gunzipSync:function(e,t){return ec(new Ec(t),e)},inflateRaw:function(e,t,n){return typeof t=="function"&&(n=t,t={}),Qu(new Lc(t),e,n)},inflateRawSync:function(e,t){return ec(new Lc(t),e)},Deflate:Sc,Inflate:kc,Gzip:Dc,Gunzip:Ec,DeflateRaw:Ac,InflateRaw:Lc,Unzip:Oc,Zlib:Ur};class oge{constructor(t,n,r){this.SDKAPPID=t,this.EXPIRETIME=r,this.PRIVATEKEY=n}genTestUserSig(t){return this._isNumber(this.SDKAPPID)?this._isString(this.PRIVATEKEY)?this._isString(t)?this._isNumber(this.EXPIRETIME)?(console.log("sdkAppID="+this.SDKAPPID+" key="+this.PRIVATEKEY+" userID="+t+" expire="+this.EXPIRETIME),this.genSigWithUserbuf(t,this.EXPIRETIME,null)):(console.error("expireTime must be a number"),""):(console.error("userID must be a string"),""):(console.error("privateKey must be a string"),""):(console.error("sdkAppID must be a number"),"")}newBuffer(t,n){return Qe.from?Qe.from(t,n):new Qe(t,n)}unescape(t){return t.replace(/_/g,"=").replace(/\-/g,"/").replace(/\*/g,"+")}escape(t){return t.replace(/\+/g,"*").replace(/\//g,"-").replace(/=/g,"_")}encode(t){return this.escape(this.newBuffer(t).toString("base64"))}decode(t){return this.newBuffer(this.unescape(t),"base64")}base64encode(t){return this.newBuffer(t).toString("base64")}base64decode(t){return this.newBuffer(t,"base64").toString()}_hmacsha256(t,n,r,o){let i="TLS.identifier:"+t+` `;i+="TLS.sdkappid:"+this.SDKAPPID+` `,i+="TLS.time:"+n+` `,i+="TLS.expire:"+r+` `,o!=null&&(i+="TLS.userbuf:"+o+` `);let s=xD.HmacSHA256(i,this.PRIVATEKEY);return xD.enc.Base64.stringify(s)}_utc(){return Math.round(Date.now()/1e3)}_isNumber(t){return t!==null&&(typeof t=="number"&&!isNaN(t-0)||typeof t=="object"&&t.constructor===Number)}_isString(t){return typeof t=="string"}genSigWithUserbuf(t,n,r){let o=this._utc(),i={"TLS.ver":"2.0","TLS.identifier":t,"TLS.sdkappid":this.SDKAPPID,"TLS.time":o,"TLS.expire":n},s="";if(r!=null){let g=this.base64encode(r);i["TLS.userbuf"]=g,s=this._hmacsha256(t,o,n,g)}else s=this._hmacsha256(t,o,n,null);i["TLS.sig"]=s;let u=JSON.stringify(i),d=VE.deflateSync(this.newBuffer(u)).toString("base64"),f=this.escape(d);return console.log("ret="+f),f}validate(t){let n=this.decode(t),r=VE.inflateSync(n);console.log("validate ret="+r)}}const ige=604800;function p3(e){const{SDKAppID:t,secretKey:n,userID:r}=e,i=new oge(t,n,ige).genTestUserSig(r);return{SDKAppID:t,userSig:i}}const sge=it({components:{DialogTUI:Zy},setup(e,t){const n=Xi(),r=n==null?void 0:n.appContext.config.globalProperties.$TUIKit,o=Ai&&Ai(),i=qe(()=>JSON.parse(o.state.isMsgNeedReadReceipt)),s=qe(()=>JSON.parse(o.state.displayOnlineStatus)),u=Wt({currentConversationID:"",currentModel:"message",platform:sessionStorage.getItem("platform"),disconnectStatus:!1,disconnentContent:"聊天功能已断开,是否重新连接?",disconnectBtnText:"连接",dialogShow:!1}),d=()=>{window.parent&&window.parent.postMessage({api:"onImClose"},"*")},f=_=>{u.currentModel="message",u.currentConversationID=_},g=_=>{u.dialogShow=!0,u.disconnectStatus=!0,o==null||o.commit("setImConnent",!1)},v=()=>{console.log("manage",xh),r.login({userID:xh,userSig:p3({SDKAppID:yw,secretKey:s6,userID:xh}).userSig}).then(()=>{u.disconnectStatus=!1,o==null||o.commit("setImConnent",!0)}).catch(()=>{u.disconnentContent="连接失败,请重试",u.disconnectBtnText="重新连接",o==null||o.commit("setImConnent",!1)})};return Rn(()=>{r.tim.on(r.TIM.EVENT.KICKED_OUT,_=>g()),du.on("reConnectIm",_=>{_&&(u.dialogShow=!0,u.disconnectStatus=!0,o==null||o.commit("setImConnent",!1))})}),_l(()=>{r.tim.off(r.TIM.EVENT.KICKED_OUT,g)}),{...Yt(u),handleCurrentConversation:f,isMsgNeedReadReceipt:i,displayOnlineStatus:s,onClose:d,handleManage:v}}}),age="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAqCAYAAADBNhlmAAAAAXNSR0IArs4c6QAAAuFJREFUWEfdmL+LE1EQx2febkI2jYjdgXggov4BXuzubMwPEbMRUa+xsRGsPFELSwsVtRJsbGxODzEbEZOsjbnO0z9A5RBOhOtEbG5Dsnkjb2Pi5tf+Fp6mCtk3M5/M7HzfvIcg+Qcl54P/H9AqVfYB0TwRzQGxOaciyLcRcRsQt7R69WucKkXKYKd0Osd7XCeAU0R0yAsAET8hwEumMCNdf7ERFjYUYCdfXugR3iWgxbCBnMQCritI19Jm7X1Q+0CAdGJ5d9veeUQEZ4M69s4qrGXU7CV8vfrDz58vYLtw5iBx+xUBHfBzFuY5Am4iU09mms8/e/4Zr4dWvnIMiAwC2hUmeNC1CPgTEHXNrL6dZTMzg78zt/G34AZAAhKZmpuVyamAzjvXtQRcomWdnSXczKS03LR3ciqglS8/S6ohApcbYU0za+fG108ACimxCcLrFcI3ALzZD0C3iGBvULjBOhUhNy5BE4DWcb0VReeYAqVMo9YQwdrFcpH3oB4WUOik9sZYctuNAIodwrZ778I6FutVxhbSzeoH8b1TqByxOQ8sxu54qqocde84I4DtvH6bE12PAogILUilLji23e4TIhjJRFCfDPFOxjRu/Olyl6WV1z/67a1BA0VdJ/ZuzTQOTwCKqYRsvhXVcZJ2qLL5wRQ0LLFV1BepR63ogfA7Mnzo9DCnywC0J6ovVHBJaxjrwn4IuFMonwcOq5GdujowqhIMYzNYzjZrT0cB85UVIH5PCkBkV7Nm9f5YBvUrwMn5McrHrWHxM4gr2abx4N8qcdwmSTKDU5skrswkCjhNZkS94wh1UoAzhVoAxtrqEpIZz60uzrCQVAY9hwWnzBHHrSQAfcctZ1SKPLDiF0DloqOh1HtMRPvD6mmggbXfLBKP/E4CZD80OR3dP7DLeewcvDtSH9wHkFJffQwgpb48ckuFtNdv43om7QXmNOGV8go47A4RZ73vBWYc50nYSg/4C8nCuzoKBPvlAAAAAElFTkSuQmCC";const QT=e=>(pr("data-v-d91035cb"),e=e(),hr(),e),lge={class:lt(["home"]),id:"preloadedImages"},uge={class:"home-main"},cge={class:"home-main-box"},dge={class:"home-TUIKit"},fge={class:"home-TUIKit-main"},pge={class:"conversation"},hge={key:2,class:"imDisconnent"},gge=QT(()=>G("img",{src:age,class:"iconTips"},null,-1)),mge={class:"chat"},vge=QT(()=>G("div",{class:"chat-default"},null,-1)),yge=QT(()=>G("p",null,"聊天功能已断开,是否重新连接?",-1));function _ge(e,t,n,r,o,i){const s=xt("n-tab-pane"),u=xt("n-tabs"),d=xt("TUIConversation"),f=xt("TUIGroup"),g=xt("TUIPerson"),v=xt("TUIChat"),_=xt("DialogTUI");return J(),oe("div",lge,[G("main",uge,[G("div",cge,[G("div",dge,[G("div",fge,[G("div",pge,[It(u,{style:{"padding-left":"22px","--n-tab-padding":"6px 0","--n-tab-gap":"34px","--n-tab-text-color":"#000","--n-tab-text-color-hover":"#0f0f0f","--n-tab-text-color-active":"#000","--n-tab-font-weight-active":"600","padding-top":"6px","--n-bar-color":"#198cfe"},"bar-width":20,value:e.currentModel,"onUpdate:value":t[0]||(t[0]=M=>{e.currentModel=M})},{default:Ct(()=>[It(s,{name:"message",tab:"聊天"}),e.platform!="orchestra"?(J(),_t(s,{key:0,name:"group",tab:"群聊"})):Ie("",!0),e.platform!="orchestra"?(J(),_t(s,{key:1,name:"contact",tab:"联系人"})):Ie("",!0)]),_:1},8,["value"]),Bn(It(d,{onCurrent:e.handleCurrentConversation,displayOnlineStatus:e.displayOnlineStatus},null,8,["onCurrent","displayOnlineStatus"]),[[to,e.currentModel==="message"]]),e.platform!="orchestra"&&e.currentModel==="group"?(J(),_t(f,{key:0,onCurrent:e.handleCurrentConversation,displayOnlineStatus:e.displayOnlineStatus},null,8,["onCurrent","displayOnlineStatus"])):Ie("",!0),e.platform!="orchestra"&&e.currentModel==="contact"?(J(),_t(g,{key:1,onCurrent:e.handleCurrentConversation,displayOnlineStatus:e.displayOnlineStatus},null,8,["onCurrent","displayOnlineStatus"])):Ie("",!0),e.disconnectStatus?(J(),oe("div",hge,[G("p",null,[gge,mr(" "+De(e.disconnentContent),1)]),G("span",{class:"btnConnent",onClick:t[1]||(t[1]=M=>e.dialogShow=!0)},De(e.disconnectBtnText),1)])):Ie("",!0)]),G("div",mge,[It(v,{isMsgNeedReadReceipt:e.isMsgNeedReadReceipt,isNeedTyping:!0,isNeedEmojiReact:!0},{default:Ct(()=>[vge]),_:1},8,["isMsgNeedReadReceipt"])])])])])]),G("i",{class:"closeModal",onClick:t[2]||(t[2]=(...M)=>e.onClose&&e.onClose(...M))}),It(_,{show:e.dialogShow,isHeaderShow:!0,title:"提示","is-footer-show":!0,onSubmit:t[3]||(t[3]=M=>e.handleManage()),"onUpdate:show":t[4]||(t[4]=M=>e.dialogShow=M)},{default:Ct(()=>[yge]),_:1},8,["show"])])}const bge=Kt(sge,[["render",_ge],["__scopeId","data-v-d91035cb"]]),Mge=[{id:1,label:"发送一条消息",status:!1},{id:2,label:"撤回一条消息",status:!1},{id:3,label:"修改一次我的昵称",status:!1},{id:4,label:"发起一个群聊",status:!1},{id:5,label:"开启一次群禁言",status:!1},{id:6,label:"解散一个群聊",status:!1},{id:7,label:"发起一次通话",status:!1}],us={taskList:Mge,userInfo:{},platform:"classroom",imConnent:!0,token:"",isMsgNeedReadReceipt:!0,displayOnlineStatus:!0,allowNotification:!0,_isTIMCallKit:!0};if(localStorage.getItem("TUIKit-userInfo")){const e=localStorage.getItem("TUIKit-userInfo")||{};try{us.userInfo=JSON.parse(e)}catch{us.userInfo={}}}if(sessionStorage.getItem("isMsgNeedReadReceipt")){const e=sessionStorage.getItem("isMsgNeedReadReceipt")||"";try{us.isMsgNeedReadReceipt=JSON.parse(e)}catch{us.isMsgNeedReadReceipt=!1}}if(sessionStorage.getItem("displayOnlineStatus")){const e=sessionStorage.getItem("displayOnlineStatus")||"";try{us.displayOnlineStatus=JSON.parse(e)}catch{us.displayOnlineStatus=!1}}if(sessionStorage.getItem("allowNotification")){const e=sessionStorage.getItem("allowNotification")||"";try{us.allowNotification=JSON.parse(e)}catch{us.allowNotification=!1}}if(sessionStorage.getItem("platform")){const e=sessionStorage.getItem("platform")||"";try{us.platform=JSON.parse(e)}catch{us.platform=!1}}if(sessionStorage.getItem("token")){const e=sessionStorage.getItem("token")||"";try{us.token=JSON.parse(e)}catch{us.token=!1}}const Ige=n5({state:us,mutations:{handleTask(e,t){e.taskList[t].status=!0},setUserInfo(e,t){e.userInfo=t,localStorage.setItem("TUIKit-userInfo",JSON.stringify(t))},setNeedReadReceipt(e,t){e.isMsgNeedReadReceipt=t,sessionStorage.setItem("isMsgNeedReadReceipt",JSON.stringify(t))},setDisplayOnlineStatus(e,t){e.displayOnlineStatus=t,sessionStorage.setItem("displayOnlineStatus",JSON.stringify(t))},setNotification(e,t){e.allowNotification=t,sessionStorage.setItem("allowNotification",JSON.stringify(t))},setPlatform(e,t){e.platform=t,sessionStorage.setItem("platform",t)},setImConnent(e,t){e.imConnent=t}},actions:{},modules:{}});let _y=[];const h3=new WeakMap;function Cge(){_y.forEach(e=>e(...h3.get(e))),_y=[]}function g3(e,...t){h3.set(e,t),!_y.includes(e)&&_y.push(e)===1&&requestAnimationFrame(Cge)}function by(e){return e.composedPath()[0]||null}function Tge(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function ih(e,t){const n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}const zE={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"},ep="^\\s*",tp="\\s*$",Rc="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",Nc="([0-9A-Fa-f])",Pc="([0-9A-Fa-f]{2})",wge=new RegExp(`${ep}rgb\\s*\\(${Rc},${Rc},${Rc}\\)${tp}`),Sge=new RegExp(`${ep}rgba\\s*\\(${Rc},${Rc},${Rc},${Rc}\\)${tp}`),kge=new RegExp(`${ep}#${Nc}${Nc}${Nc}${tp}`),Dge=new RegExp(`${ep}#${Pc}${Pc}${Pc}${tp}`),Ege=new RegExp(`${ep}#${Nc}${Nc}${Nc}${Nc}${tp}`),Age=new RegExp(`${ep}#${Pc}${Pc}${Pc}${Pc}${tp}`);function Hi(e){return parseInt(e,16)}function id(e){try{let t;if(t=Dge.exec(e))return[Hi(t[1]),Hi(t[2]),Hi(t[3]),1];if(t=wge.exec(e))return[di(t[1]),di(t[5]),di(t[9]),1];if(t=Sge.exec(e))return[di(t[1]),di(t[5]),di(t[9]),Lh(t[13])];if(t=kge.exec(e))return[Hi(t[1]+t[1]),Hi(t[2]+t[2]),Hi(t[3]+t[3]),1];if(t=Age.exec(e))return[Hi(t[1]),Hi(t[2]),Hi(t[3]),Lh(Hi(t[4])/255)];if(t=Ege.exec(e))return[Hi(t[1]+t[1]),Hi(t[2]+t[2]),Hi(t[3]+t[3]),Lh(Hi(t[4]+t[4])/255)];if(e in zE)return id(zE[e]);throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function Lge(e){return e>1?1:e<0?0:e}function PI(e,t,n,r){return`rgba(${di(e)}, ${di(t)}, ${di(n)}, ${Lge(r)})`}function Jb(e,t,n,r,o){return di((e*t*(1-r)+n*r)/o)}function g0(e,t){Array.isArray(e)||(e=id(e)),Array.isArray(t)||(t=id(t));const n=e[3],r=t[3],o=Lh(n+r-n*r);return PI(Jb(e[0],n,t[0],r,o),Jb(e[1],n,t[1],r,o),Jb(e[2],n,t[2],r,o),o)}function ka(e,t){const[n,r,o,i=1]=Array.isArray(e)?e:id(e);return t.alpha?PI(n,r,o,t.alpha):PI(n,r,o,i)}function qm(e,t){const[n,r,o,i=1]=Array.isArray(e)?e:id(e),{lightness:s=1,alpha:u=1}=t;return Oge([n*s,r*s,o*s,i*u])}function Lh(e){const t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function di(e){const t=Math.round(Number(e));return t>255?255:t<0?0:t}function Oge(e){const[t,n,r]=e;return 3 in e?`rgba(${di(t)}, ${di(n)}, ${di(r)}, ${Lh(e[3])})`:`rgba(${di(t)}, ${di(n)}, ${di(r)}, 1)`}function m3(e=8){return Math.random().toString(16).slice(2,2+e)}function Rge(e,t="default",n=[]){const o=e.$slots[t];return o===void 0?n:o()}function Nge(e,t=[],n){const r={};return t.forEach(o=>{r[o]=e[o]}),Object.assign(r,n)}function Pge(e,t=[],n){const r={};return Object.getOwnPropertyNames(e).forEach(i=>{t.includes(i)||(r[i]=e[i])}),Object.assign(r,n)}function Jc(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(mr(String(r)));return}if(Array.isArray(r)){Jc(r,t,n);return}if(r.type===ft){if(r.children===null)return;Array.isArray(r.children)&&Jc(r.children,t,n)}else r.type!==Ei&&n.push(r)}}),n}function cn(e,...t){if(Array.isArray(e))e.forEach(n=>cn(n,...t));else return e(...t)}const xge=(e,...t)=>typeof e=="function"?e(...t):typeof e=="string"?mr(e):typeof e=="number"?mr(String(e)):null;function jE(e,t){console.error(`[naive/${e}]: ${t}`)}function v3(e,t){throw new Error(`[naive/${e}]: ${t}`)}function WE(e,t="default",n=void 0){const r=e[t];if(!r)return jE("getFirstSlotVNode",`slot[${t}] is empty`),null;const o=Jc(r(n));return o.length===1?o[0]:(jE("getFirstSlotVNode",`slot[${t}] should have exactly one child`),null)}function Dg(e){return e.some(t=>jh(t)?!(t.type===Ei||t.type===ft&&!Dg(t.children)):!0)?e:null}function Oh(e,t){return e&&Dg(e())||t()}function Uge(e,t,n){return e&&Dg(e(t))||n(t)}function Ds(e,t){const n=e&&Dg(e());return t(n||null)}function xI(e){return!(e&&Dg(e()))}const KE=it({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),Fge=/^(\d|\.)+$/,YE=/(\d|\.)+/;function Xb(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const o=(e+n)*t;return o===0?"0":`${o}px`}else if(typeof e=="string")if(Fge.test(e)){const o=(Number(e)+n)*t;return r?o===0?"0":`${o}px`:`${o}`}else{const o=YE.exec(e);return o?e.replace(YE,String((Number(o[0])+n)*t)):e}return e}function JE(e){return e.replace(/#|\(|\)|,|\s/g,"_")}function $ge(e){let t=0;for(let n=0;n{let o=$ge(r);if(o){if(o===1){e.forEach(s=>{n.push(r.replace("&",s))});return}}else{e.forEach(s=>{n.push((s&&s+" ")+r)});return}let i=[r];for(;o--;){const s=[];i.forEach(u=>{e.forEach(d=>{s.push(u.replace("&",d))})}),i=s}i.forEach(s=>n.push(s))}),n}function Hge(e,t){const n=[];return t.split(y3).forEach(r=>{e.forEach(o=>{n.push((o&&o+" ")+r)})}),n}function qge(e){let t=[""];return e.forEach(n=>{n=n&&n.trim(),n&&(n.includes("&")?t=Bge(t,n):t=Hge(t,n))}),t.join(", ").replace(Gge," ")}function XE(e){if(!e)return;const t=e.parentElement;t&&t.removeChild(e)}function m0(e){return document.querySelector(`style[cssr-id="${e}"]`)}function Vge(e){const t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Vm(e){return e?/^\s*@(s|m)/.test(e):!1}const zge=/[A-Z]/g;function _3(e){return e.replace(zge,t=>"-"+t.toLowerCase())}function jge(e,t=" "){return typeof e=="object"&&e!==null?` { `+Object.entries(e).map(n=>t+` ${_3(n[0])}: ${n[1]};`).join(` `)+` `+t+"}":`: ${e};`}function Wge(e,t,n){return typeof e=="function"?e({context:t.context,props:n}):e}function ZE(e,t,n,r){if(!t)return"";const o=Wge(t,n,r);if(!o)return"";if(typeof o=="string")return`${e} { ${o} }`;const i=Object.keys(o);if(i.length===0)return n.config.keepEmptyBlock?e+` { }`:"";const s=e?[e+" {"]:[];return i.forEach(u=>{const d=o[u];if(u==="raw"){s.push(` `+d+` `);return}u=_3(u),d!=null&&s.push(` ${u}${jge(d)}`)}),e&&s.push("}"),s.join(` `)}function UI(e,t,n){e&&e.forEach(r=>{if(Array.isArray(r))UI(r,t,n);else if(typeof r=="function"){const o=r(t);Array.isArray(o)?UI(o,t,n):o&&n(o)}else r&&n(r)})}function b3(e,t,n,r,o,i){const s=e.$;let u="";if(!s||typeof s=="string")Vm(s)?u=s:t.push(s);else if(typeof s=="function"){const g=s({context:r.context,props:o});Vm(g)?u=g:t.push(g)}else if(s.before&&s.before(r.context),!s.$||typeof s.$=="string")Vm(s.$)?u=s.$:t.push(s.$);else if(s.$){const g=s.$({context:r.context,props:o});Vm(g)?u=g:t.push(g)}const d=qge(t),f=ZE(d,e.props,r,o);u?(n.push(`${u} {`),i&&f&&i.insertRule(`${u} { ${f} } `)):(i&&f&&i.insertRule(f),!i&&f.length&&n.push(f)),e.children&&UI(e.children,{context:r.context,props:o},g=>{if(typeof g=="string"){const v=ZE(d,{raw:g},r,o);i?i.insertRule(v):n.push(v)}else b3(g,t,n,r,o,i)}),t.pop(),u&&n.push("}"),s&&s.after&&s.after(r.context)}function M3(e,t,n,r=!1){const o=[];return b3(e,[],o,t,n,r?e.instance.__styleSheet:void 0),r?"":o.join(` `)}function FI(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}typeof window<"u"&&(window.__cssrContext={});function Kge(e,t,n){const{els:r}=t;if(n===void 0)r.forEach(XE),t.els=[];else{const o=m0(n);o&&r.includes(o)&&(XE(o),t.els=r.filter(i=>i!==o))}}function QE(e,t){e.push(t)}function Yge(e,t,n,r,o,i,s,u,d){if(i&&!d){if(n===void 0){console.error("[css-render/mount]: `id` is required in `silent` mode.");return}const _=window.__cssrContext;_[n]||(_[n]=!0,M3(t,e,r,i));return}let f;if(n===void 0&&(f=t.render(r),n=FI(f)),d){d.adapter(n,f??t.render(r));return}const g=m0(n);if(g!==null&&!s)return g;const v=g??Vge(n);if(f===void 0&&(f=t.render(r)),v.textContent=f,g!==null)return g;if(u){const _=document.head.querySelector(`meta[name="${u}"]`);if(_)return document.head.insertBefore(v,_),QE(t.els,v),v}return o?document.head.insertBefore(v,document.head.querySelector("style, link")):document.head.appendChild(v),QE(t.els,v),v}function Jge(e){return M3(this,this.instance,e)}function Xge(e={}){const{id:t,ssr:n,props:r,head:o=!1,silent:i=!1,force:s=!1,anchorMetaName:u}=e;return Yge(this.instance,this,t,r,o,i,s,u,n)}function Zge(e={}){const{id:t}=e;Kge(this.instance,this,t)}const zm=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:Jge,mount:Xge,unmount:Zge}},Qge=function(e,t,n,r){return Array.isArray(t)?zm(e,{$:null},null,t):Array.isArray(n)?zm(e,t,null,n):Array.isArray(r)?zm(e,t,n,r):zm(e,t,n,null)};function I3(e={}){let t=null;const n={c:(...r)=>Qge(n,...r),use:(r,...o)=>r.install(n,...o),find:m0,context:{},config:e,get __styleSheet(){if(!t){const r=document.createElement("style");return document.head.appendChild(r),t=document.styleSheets[document.styleSheets.length-1],t}return t}};return n}function eme(e,t){if(e===void 0)return!1;if(t){const{context:{ids:n}}=t;return n.has(e)}return m0(e)!==null}function tme(e){let t=".",n="__",r="--",o;if(e){let I=e.blockPrefix;I&&(t=I),I=e.elementPrefix,I&&(n=I),I=e.modifierPrefix,I&&(r=I)}const i={install(I){o=I.c;const k=I.context;k.bem={},k.bem.b=null,k.bem.els=null}};function s(I){let k,w;return{before(S){k=S.bem.b,w=S.bem.els,S.bem.els=null},after(S){S.bem.b=k,S.bem.els=w},$({context:S,props:L}){return I=typeof I=="string"?I:I({context:S,props:L}),S.bem.b=I,`${(L==null?void 0:L.bPrefix)||t}${S.bem.b}`}}}function u(I){let k;return{before(w){k=w.bem.els},after(w){w.bem.els=k},$({context:w,props:S}){return I=typeof I=="string"?I:I({context:w,props:S}),w.bem.els=I.split(",").map(L=>L.trim()),w.bem.els.map(L=>`${(S==null?void 0:S.bPrefix)||t}${w.bem.b}${n}${L}`).join(", ")}}}function d(I){return{$({context:k,props:w}){I=typeof I=="string"?I:I({context:k,props:w});const S=I.split(",").map(O=>O.trim());function L(O){return S.map(H=>`&${(w==null?void 0:w.bPrefix)||t}${k.bem.b}${O!==void 0?`${n}${O}`:""}${r}${H}`).join(", ")}const A=k.bem.els;return A!==null?L(A[0]):L()}}}function f(I){return{$({context:k,props:w}){I=typeof I=="string"?I:I({context:k,props:w});const S=k.bem.els;return`&:not(${(w==null?void 0:w.bPrefix)||t}${k.bem.b}${S!==null&&S.length>0?`${n}${S[0]}`:""}${r}${I})`}}}return Object.assign(i,{cB:(...I)=>o(s(I[0]),I[1],I[2]),cE:(...I)=>o(u(I[0]),I[1],I[2]),cM:(...I)=>o(d(I[0]),I[1],I[2]),cNotM:(...I)=>o(f(I[0]),I[1],I[2])}),i}function Ht(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,n=>n.toUpperCase()))}Ht("abc","def");const nme="n",My=`.${nme}-`,rme="__",ome="--",C3=I3(),T3=tme({blockPrefix:My,elementPrefix:rme,modifierPrefix:ome});C3.use(T3);const{c:Ze,find:lTe}=C3,{cB:Je,cE:rt,cM:mt,cNotM:gi}=T3;function ime(e){return Ze(({props:{bPrefix:t}})=>`${t||My}modal, ${t||My}drawer`,[e])}function sme(e){return Ze(({props:{bPrefix:t}})=>`${t||My}popover`,[e])}const ame=(...e)=>Ze(">",[Je(...e)]);let Zb;function lme(){return Zb===void 0&&(Zb=navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),Zb}const Eg=typeof document<"u"&&typeof window<"u";function ume(e){const t=Ne(!!e.value);if(t.value)return $h(t);const n=Bt(e,r=>{r&&(t.value=!0,n())});return $h(t)}function Zs(e){const t=qe(e),n=Ne(t.value);return Bt(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}const cme=typeof window<"u";let Mf,Rh;const dme=()=>{var e,t;Mf=cme?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Rh=!1,Mf!==void 0?Mf.then(()=>{Rh=!0}):Rh=!0};dme();function w3(e){if(Rh)return;let t=!1;Rn(()=>{Rh||Mf==null||Mf.then(()=>{t||e()})}),yi(()=>{t=!0})}function Cv(e){return e.composedPath()[0]}const fme={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function pme(e,t,n){if(e==="mousemoveoutside"){const r=o=>{t.contains(Cv(o))||n(o)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const o=s=>{r=!t.contains(Cv(s))},i=s=>{r&&(t.contains(Cv(s))||n(s))};return{mousedown:o,mouseup:i,touchstart:o,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function S3(e,t,n){const r=fme[e];let o=r.get(t);o===void 0&&r.set(t,o=new WeakMap);let i=o.get(n);return i===void 0&&o.set(n,i=pme(e,t,n)),i}function hme(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const o=S3(e,t,n);return Object.keys(o).forEach(i=>{eo(i,document,o[i],r)}),!0}return!1}function gme(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const o=S3(e,t,n);return Object.keys(o).forEach(i=>{Tr(i,document,o[i],r)}),!0}return!1}function mme(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function o(P,B,j){const $=P[B];return P[B]=function(){return j.apply(P,arguments),$.apply(P,arguments)},P}function i(P,B){P[B]=Event.prototype[B]}const s=new WeakMap,u=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function d(){var P;return(P=s.get(this))!==null&&P!==void 0?P:null}function f(P,B){u!==void 0&&Object.defineProperty(P,"currentTarget",{configurable:!0,enumerable:!0,get:B??u.get})}const g={bubble:{},capture:{}},v={};function _(){const P=function(B){const{type:j,eventPhase:$,bubbles:R}=B,T=Cv(B);if($===2)return;const x=$===1?"capture":"bubble";let Z=T;const K=[];for(;Z===null&&(Z=window),K.push(Z),Z!==window;)Z=Z.parentNode||null;const re=g.capture[j],X=g.bubble[j];if(o(B,"stopPropagation",n),o(B,"stopImmediatePropagation",r),f(B,d),x==="capture"){if(re===void 0)return;for(let ie=K.length-1;ie>=0&&!e.has(B);--ie){const he=K[ie],ae=re.get(he);if(ae!==void 0){s.set(B,he);for(const de of ae){if(t.has(B))break;de(B)}}if(ie===0&&!R&&X!==void 0){const de=X.get(he);if(de!==void 0)for(const Y of de){if(t.has(B))break;Y(B)}}}}else if(x==="bubble"){if(X===void 0)return;for(let ie=0;ieT(B))};return P.displayName="evtdUnifiedWindowEventHandler",P}const I=_(),k=M();function w(P,B){const j=g[P];return j[B]===void 0&&(j[B]=new Map,window.addEventListener(B,I,P==="capture")),j[B]}function S(P){return v[P]===void 0&&(v[P]=new Set,window.addEventListener(P,k)),v[P]}function L(P,B){let j=P.get(B);return j===void 0&&P.set(B,j=new Set),j}function A(P,B,j,$){const R=g[B][j];if(R!==void 0){const T=R.get(P);if(T!==void 0&&T.has($))return!0}return!1}function O(P,B){const j=v[P];return!!(j!==void 0&&j.has(B))}function H(P,B,j,$){let R;if(typeof $=="object"&&$.once===!0?R=re=>{q(P,B,R,$),j(re)}:R=j,hme(P,B,R,$))return;const x=$===!0||typeof $=="object"&&$.capture===!0?"capture":"bubble",Z=w(x,P),K=L(Z,B);if(K.has(R)||K.add(R),B===window){const re=S(P);re.has(R)||re.add(R)}}function q(P,B,j,$){if(gme(P,B,j,$))return;const T=$===!0||typeof $=="object"&&$.capture===!0,x=T?"capture":"bubble",Z=w(x,P),K=L(Z,B);if(B===window&&!A(B,T?"bubble":"capture",P,j)&&O(P,j)){const X=v[P];X.delete(j),X.size===0&&(window.removeEventListener(P,k),v[P]=void 0)}K.has(j)&&K.delete(j),K.size===0&&Z.delete(B),Z.size===0&&(window.removeEventListener(P,I,x==="capture"),g[x][P]=void 0)}return{on:H,off:q}}const{on:eo,off:Tr}=mme();function hd(e,t){return Bt(e,n=>{n!==void 0&&(t.value=n)}),qe(()=>e.value===void 0?t.value:e.value)}function v0(){const e=Ne(!1);return Rn(()=>{e.value=!0}),$h(e)}function Iy(e,t){return qe(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const vme=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function yme(){return vme}const _me="n-internal-select-menu-body",k3="n-modal-body",D3="n-drawer-body",E3="n-popover-body",A3="__disabled__";function $f(e){const t=en(k3,null),n=en(D3,null),r=en(E3,null),o=en(_me,null),i=Ne();if(typeof document<"u"){i.value=document.fullscreenElement;const s=()=>{i.value=document.fullscreenElement};Rn(()=>{eo("fullscreenchange",document,s)}),yi(()=>{Tr("fullscreenchange",document,s)})}return Zs(()=>{var s;const{to:u}=e;return u!==void 0?u===!1?A3:u===!0?i.value||"body":u:t!=null&&t.value?(s=t.value.$el)!==null&&s!==void 0?s:t.value:n!=null&&n.value?n.value:r!=null&&r.value?r.value:o!=null&&o.value?o.value:u??(i.value||"body")})}$f.tdkey=A3;$f.propTo={type:[String,Object,Boolean],default:void 0};function $I(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function GI(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(mr(String(r)));return}if(Array.isArray(r)){GI(r,t,n);return}if(r.type===ft){if(r.children===null)return;Array.isArray(r.children)&&GI(r.children,t,n)}else r.type!==Ei&&n.push(r)}}),n}function eA(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);const o=GI(r());if(o.length===1)return o[0];throw new Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}let Pl=null;function L3(){if(Pl===null&&(Pl=document.getElementById("v-binder-view-measurer"),Pl===null)){Pl=document.createElement("div"),Pl.id="v-binder-view-measurer";const{style:e}=Pl;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild(Pl)}return Pl.getBoundingClientRect()}function bme(e,t){const n=L3();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function Qb(e){const t=e.getBoundingClientRect(),n=L3();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function Mme(e){return e.nodeType===9?null:e.parentNode}function O3(e){if(e===null)return null;const t=Mme(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(n+o+r))return t}return O3(t)}const Ime=it({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;Ao("VBinder",(t=Xi())===null||t===void 0?void 0:t.proxy);const n=en("VBinder",null),r=Ne(null),o=S=>{r.value=S,n&&e.syncTargetWithParent&&n.setTargetRef(S)};let i=[];const s=()=>{let S=r.value;for(;S=O3(S),S!==null;)i.push(S);for(const L of i)eo("scroll",L,v,!0)},u=()=>{for(const S of i)Tr("scroll",S,v,!0);i=[]},d=new Set,f=S=>{d.size===0&&s(),d.has(S)||d.add(S)},g=S=>{d.has(S)&&d.delete(S),d.size===0&&u()},v=()=>{g3(_)},_=()=>{d.forEach(S=>S())},M=new Set,I=S=>{M.size===0&&eo("resize",window,w),M.has(S)||M.add(S)},k=S=>{M.has(S)&&M.delete(S),M.size===0&&Tr("resize",window,w)},w=()=>{M.forEach(S=>S())};return yi(()=>{Tr("resize",window,w),u()}),{targetRef:r,setTargetRef:o,addScrollListener:f,removeScrollListener:g,addResizeListener:I,removeResizeListener:k}},render(){return $I("binder",this.$slots)}}),Cme=Ime,Tme=it({name:"Target",setup(){const{setTargetRef:e,syncTarget:t}=en("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){const{syncTarget:e,setTargetDirective:t}=this;return e?Bn(eA("follower",this.$slots),[[t]]):eA("follower",this.$slots)}}),Vd="@@mmoContext",wme={mounted(e,{value:t}){e[Vd]={handler:void 0},typeof t=="function"&&(e[Vd].handler=t,eo("mousemoveoutside",e,t))},updated(e,{value:t}){const n=e[Vd];typeof t=="function"?n.handler?n.handler!==t&&(Tr("mousemoveoutside",e,n.handler),n.handler=t,eo("mousemoveoutside",e,t)):(e[Vd].handler=t,eo("mousemoveoutside",e,t)):n.handler&&(Tr("mousemoveoutside",e,n.handler),n.handler=void 0)},unmounted(e){const{handler:t}=e[Vd];t&&Tr("mousemoveoutside",e,t),e[Vd].handler=void 0}},Sme=wme,zd="@@coContext",kme={mounted(e,{value:t,modifiers:n}){e[zd]={handler:void 0},typeof t=="function"&&(e[zd].handler=t,eo("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[zd];typeof t=="function"?r.handler?r.handler!==t&&(Tr("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,eo("clickoutside",e,t,{capture:n.capture})):(e[zd].handler=t,eo("clickoutside",e,t,{capture:n.capture})):r.handler&&(Tr("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[zd];n&&Tr("clickoutside",e,n,{capture:t.capture}),e[zd].handler=void 0}},tA=kme;function Dme(e,t){console.error(`[vdirs/${e}]: ${t}`)}class Eme{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:o}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${o}`,r.set(t,o),this.nextZIndex=o+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&Dme("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],o=this.nextZIndex++;`${o}`!==r.style.zIndex&&(r.style.zIndex=`${o}`)})}}const eM=new Eme,Wd="@@ziContext",Ame={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:o}=n;e[Wd]={enabled:!!o,initialized:!1},o&&(eM.ensureZIndex(e,r),e[Wd].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:o}=n,i=e[Wd].enabled;o&&!i&&(eM.ensureZIndex(e,r),e[Wd].initialized=!0),e[Wd].enabled=!!o},unmounted(e,t){if(!e[Wd].initialized)return;const{value:n={}}=t,{zIndex:r}=n;eM.unregister(e,r)}},ew=Ame,R3=Symbol("@css-render/vue3-ssr");function Lme(e,t){return``}function Ome(e,t){const n=en(R3,null);if(n===null){console.error("[css-render/vue3-ssr]: no ssr context found.");return}const{styles:r,ids:o}=n;o.has(e)||r!==null&&(o.add(e),r.push(Lme(e,t)))}const Rme=typeof document<"u";function np(){if(Rme)return;const e=en(R3,null);if(e!==null)return{adapter:Ome,context:e}}function nA(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:of}=I3(),N3="vueuc-style";function rA(e){return typeof e=="string"?document.querySelector(e):e()}const P3=it({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:ume(Kn(e,"show")),mergedTo:qe(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?$I("lazy-teleport",this.$slots):Se(wC,{disabled:this.disabled,to:this.mergedTo},$I("lazy-teleport",this.$slots)):null}}),jm={top:"bottom",bottom:"top",left:"right",right:"left"},oA={start:"end",center:"center",end:"start"},tM={top:"height",bottom:"height",left:"width",right:"width"},Nme={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},Pme={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},xme={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},iA={top:!0,bottom:!1,left:!0,right:!1},sA={top:"end",bottom:"start",left:"end",right:"start"};function Ume(e,t,n,r,o,i){if(!o||i)return{placement:e,top:0,left:0};const[s,u]=e.split("-");let d=u??"center",f={top:0,left:0};const g=(M,I,k)=>{let w=0,S=0;const L=n[M]-t[I]-t[M];return L>0&&r&&(k?S=iA[I]?L:-L:w=iA[I]?L:-L),{left:w,top:S}},v=s==="left"||s==="right";if(d!=="center"){const M=xme[e],I=jm[M],k=tM[M];if(n[k]>t[k]){if(t[M]+t[k]t[I]&&(d=oA[u])}else{const M=s==="bottom"||s==="top"?"left":"top",I=jm[M],k=tM[M],w=(n[k]-t[k])/2;(t[M]t[I]?(d=sA[M],f=g(k,M,v)):(d=sA[I],f=g(k,I,v)))}let _=s;return t[s] *",{pointerEvents:"all"})])]),Bme=it({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){const t=en("VBinder"),n=Zs(()=>e.enabled!==void 0?e.enabled:e.show),r=Ne(null),o=Ne(null),i=()=>{const{syncTrigger:_}=e;_.includes("scroll")&&t.addScrollListener(d),_.includes("resize")&&t.addResizeListener(d)},s=()=>{t.removeScrollListener(d),t.removeResizeListener(d)};Rn(()=>{n.value&&(d(),i())});const u=np();Gme.mount({id:"vueuc/binder",head:!0,anchorMetaName:N3,ssr:u}),yi(()=>{s()}),w3(()=>{n.value&&d()});const d=()=>{if(!n.value)return;const _=r.value;if(_===null)return;const M=t.targetRef,{x:I,y:k,overlap:w}=e,S=I!==void 0&&k!==void 0?bme(I,k):Qb(M);_.style.setProperty("--v-target-width",`${Math.round(S.width)}px`),_.style.setProperty("--v-target-height",`${Math.round(S.height)}px`);const{width:L,minWidth:A,placement:O,internalShift:H,flip:q}=e;_.setAttribute("v-placement",O),w?_.setAttribute("v-overlap",""):_.removeAttribute("v-overlap");const{style:P}=_;L==="target"?P.width=`${S.width}px`:L!==void 0?P.width=L:P.width="",A==="target"?P.minWidth=`${S.width}px`:A!==void 0?P.minWidth=A:P.minWidth="";const B=Qb(_),j=Qb(o.value),{left:$,top:R,placement:T}=Ume(O,S,B,H,q,w),x=Fme(T,w),{left:Z,top:K,transform:re}=$me(T,j,S,R,$,w);_.setAttribute("v-placement",T),_.style.setProperty("--v-offset-left",`${Math.round($)}px`),_.style.setProperty("--v-offset-top",`${Math.round(R)}px`),_.style.transform=`translateX(${Z}) translateY(${K}) ${re}`,_.style.setProperty("--v-transform-origin",x),_.style.transformOrigin=x};Bt(n,_=>{_?(i(),f()):s()});const f=()=>{wr().then(d).catch(_=>console.error(_))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(_=>{Bt(Kn(e,_),d)}),["teleportDisabled"].forEach(_=>{Bt(Kn(e,_),f)}),Bt(Kn(e,"syncTrigger"),_=>{_.includes("resize")?t.addResizeListener(d):t.removeResizeListener(d),_.includes("scroll")?t.addScrollListener(d):t.removeScrollListener(d)});const g=v0(),v=Zs(()=>{const{to:_}=e;if(_!==void 0)return _;g.value});return{VBinder:t,mergedEnabled:n,offsetContainerRef:o,followerRef:r,mergedTo:v,syncPosition:d}},render(){return Se(P3,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;const n=Se("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[Se("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?Bn(n,[[ew,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}});var Xc=[],Hme=function(){return Xc.some(function(e){return e.activeTargets.length>0})},qme=function(){return Xc.some(function(e){return e.skippedTargets.length>0})},aA="ResizeObserver loop completed with undelivered notifications.",Vme=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:aA}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=aA),window.dispatchEvent(e)},cg;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(cg||(cg={}));var Zc=function(e){return Object.freeze(e)},zme=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Zc(this)}return e}(),x3=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Zc(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,s=t.bottom,u=t.left,d=t.width,f=t.height;return{x:n,y:r,top:o,right:i,bottom:s,left:u,width:d,height:f}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),tw=function(e){return e instanceof SVGElement&&"getBBox"in e},U3=function(e){if(tw(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},lA=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},jme=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Nh=typeof window<"u"?window:{},Wm=new WeakMap,uA=/auto|scroll/,Wme=/^tb|vertical/,Kme=/msie|trident/i.test(Nh.navigator&&Nh.navigator.userAgent),fa=function(e){return parseFloat(e||"0")},If=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new zme((n?t:e)||0,(n?e:t)||0)},cA=Zc({devicePixelContentBoxSize:If(),borderBoxSize:If(),contentBoxSize:If(),contentRect:new x3(0,0,0,0)}),F3=function(e,t){if(t===void 0&&(t=!1),Wm.has(e)&&!t)return Wm.get(e);if(U3(e))return Wm.set(e,cA),cA;var n=getComputedStyle(e),r=tw(e)&&e.ownerSVGElement&&e.getBBox(),o=!Kme&&n.boxSizing==="border-box",i=Wme.test(n.writingMode||""),s=!r&&uA.test(n.overflowY||""),u=!r&&uA.test(n.overflowX||""),d=r?0:fa(n.paddingTop),f=r?0:fa(n.paddingRight),g=r?0:fa(n.paddingBottom),v=r?0:fa(n.paddingLeft),_=r?0:fa(n.borderTopWidth),M=r?0:fa(n.borderRightWidth),I=r?0:fa(n.borderBottomWidth),k=r?0:fa(n.borderLeftWidth),w=v+f,S=d+g,L=k+M,A=_+I,O=u?e.offsetHeight-A-e.clientHeight:0,H=s?e.offsetWidth-L-e.clientWidth:0,q=o?w+L:0,P=o?S+A:0,B=r?r.width:fa(n.width)-q-H,j=r?r.height:fa(n.height)-P-O,$=B+w+H+L,R=j+S+O+A,T=Zc({devicePixelContentBoxSize:If(Math.round(B*devicePixelRatio),Math.round(j*devicePixelRatio),i),borderBoxSize:If($,R,i),contentBoxSize:If(B,j,i),contentRect:new x3(v,d,B,j)});return Wm.set(e,T),T},$3=function(e,t,n){var r=F3(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case cg.DEVICE_PIXEL_CONTENT_BOX:return s;case cg.BORDER_BOX:return o;default:return i}},Yme=function(){function e(t){var n=F3(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Zc([n.borderBoxSize]),this.contentBoxSize=Zc([n.contentBoxSize]),this.devicePixelContentBoxSize=Zc([n.devicePixelContentBoxSize])}return e}(),G3=function(e){if(U3(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Jme=function(){var e=1/0,t=[];Xc.forEach(function(s){if(s.activeTargets.length!==0){var u=[];s.activeTargets.forEach(function(f){var g=new Yme(f.target),v=G3(f.target);u.push(g),f.lastReportedSize=$3(f.target,f.observedBox),ve?n.activeTargets.push(o):n.skippedTargets.push(o))})})},Xme=function(){var e=0;for(dA(e);Hme();)e=Jme(),dA(e);return qme()&&Vme(),e>0},nM,B3=[],Zme=function(){return B3.splice(0).forEach(function(e){return e()})},Qme=function(e){if(!nM){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Zme()}).observe(n,r),nM=function(){n.textContent="".concat(t?t--:t++)}}B3.push(e),nM()},eve=function(e){Qme(function(){requestAnimationFrame(e)})},Tv=0,tve=function(){return!!Tv},nve=250,rve={attributes:!0,characterData:!0,childList:!0,subtree:!0},fA=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],pA=function(e){return e===void 0&&(e=0),Date.now()+e},rM=!1,ove=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=nve),!rM){rM=!0;var r=pA(t);eve(function(){var o=!1;try{o=Xme()}finally{if(rM=!1,t=r-pA(),!tve())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,rve)};document.body?n():Nh.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),fA.forEach(function(n){return Nh.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),fA.forEach(function(n){return Nh.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),BI=new ove,hA=function(e){!Tv&&e>0&&BI.start(),Tv+=e,!Tv&&BI.stop()},ive=function(e){return!tw(e)&&!jme(e)&&getComputedStyle(e).display==="inline"},sve=function(){function e(t,n){this.target=t,this.observedBox=n||cg.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=$3(this.target,this.observedBox,!0);return ive(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),ave=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),Km=new WeakMap,gA=function(e,t){for(var n=0;n=0&&(i&&Xc.splice(Xc.indexOf(r),1),r.observationTargets.splice(o,1),hA(-1))},e.disconnect=function(t){var n=this,r=Km.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),lve=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ym.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!lA(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ym.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!lA(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ym.unobserve(this,t)},e.prototype.disconnect=function(){Ym.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class uve{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||lve)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(t,n){this.elHandlersMap.set(t,n),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const mA=new uve,dg=it({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=Xi().proxy;function r(o){const{onResize:i}=e;i!==void 0&&i(o)}Rn(()=>{const o=n.$el;if(o===void 0){nA("resize-observer","$el does not exist.");return}if(o.nextElementSibling!==o.nextSibling&&o.nodeType===3&&o.nodeValue!==""){nA("resize-observer","$el can not be observed (it may be a text node).");return}o.nextElementSibling!==null&&(mA.registerHandler(o.nextElementSibling,r),t=!0)}),yi(()=>{t&&mA.unregisterHandler(n.$el.nextElementSibling)})},render(){return Ft(this.$slots,"default")}}),cve=of(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[of("&::-webkit-scrollbar",{width:0,height:0})]),dve=it({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=Ne(null);function t(o){!(o.currentTarget.offsetWidth=0;t--){const n=e.childNodes[t];if(H3(n)&&(z3(n)||V3(n)))return!0}return!1}function z3(e){if(!fve(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function fve(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Kp=[];const pve=it({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=m3(),n=Ne(null),r=Ne(null);let o=!1,i=!1;const s=typeof document>"u"?null:document.activeElement;function u(){return Kp[Kp.length-1]===t}function d(w){var S;w.code==="Escape"&&u()&&((S=e.onEsc)===null||S===void 0||S.call(e,w))}Rn(()=>{Bt(()=>e.active,w=>{w?(v(),eo("keydown",document,d)):(Tr("keydown",document,d),o&&_())},{immediate:!0})}),yi(()=>{Tr("keydown",document,d),o&&_()});function f(w){if(!i&&u()){const S=g();if(S===null||S.contains(by(w)))return;M("first")}}function g(){const w=n.value;if(w===null)return null;let S=w;for(;S=S.nextSibling,!(S===null||S instanceof Element&&S.tagName==="DIV"););return S}function v(){var w;if(!e.disabled){if(Kp.push(t),e.autoFocus){const{initialFocusTo:S}=e;S===void 0?M("first"):(w=rA(S))===null||w===void 0||w.focus({preventScroll:!0})}o=!0,document.addEventListener("focus",f,!0)}}function _(){var w;if(e.disabled||(document.removeEventListener("focus",f,!0),Kp=Kp.filter(L=>L!==t),u()))return;const{finalFocusTo:S}=e;S!==void 0?(w=rA(S))===null||w===void 0||w.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&s instanceof HTMLElement&&(i=!0,s.focus({preventScroll:!0}),i=!1)}function M(w){if(u()&&e.active){const S=n.value,L=r.value;if(S!==null&&L!==null){const A=g();if(A==null||A===L){i=!0,S.focus({preventScroll:!0}),i=!1;return}i=!0;const O=w==="first"?q3(A):V3(A);i=!1,O||(i=!0,S.focus({preventScroll:!0}),i=!1)}}}function I(w){if(i)return;const S=g();S!==null&&(w.relatedTarget!==null&&S.contains(w.relatedTarget)?M("last"):M("first"))}function k(w){i||(w.relatedTarget!==null&&w.relatedTarget===n.value?M("last"):M("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:I,handleEndFocus:k}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return Se(ft,null,[Se("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),Se("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function hve(e){const t={isDeactivated:!1};let n=!1;return UL(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),FL(()=>{t.isDeactivated=!0,n||(n=!0)}),t}const vA="n-form-item";function rp(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const o=en(vA,null);Ao(vA,null);const i=qe(n?()=>n(o):()=>{const{size:d}=e;if(d)return d;if(o){const{mergedSize:f}=o;if(f.value!==void 0)return f.value}return t}),s=qe(r?()=>r(o):()=>{const{disabled:d}=e;return d!==void 0?d:o?o.disabled.value:!1}),u=qe(()=>{const{status:d}=e;return d||(o==null?void 0:o.mergedValidationStatus.value)});return yi(()=>{o&&o.restoreValidation()}),{mergedSizeRef:i,mergedDisabledRef:s,mergedStatusRef:u,nTriggerFormBlur(){o&&o.handleContentBlur()},nTriggerFormChange(){o&&o.handleContentChange()},nTriggerFormFocus(){o&&o.handleContentFocus()},nTriggerFormInput(){o&&o.handleContentInput()}}}var gve=typeof global=="object"&&global&&global.Object===Object&&global;const j3=gve;var mve=typeof self=="object"&&self&&self.Object===Object&&self,vve=j3||mve||Function("return this")();const ea=vve;var yve=ea.Symbol;const wu=yve;var W3=Object.prototype,_ve=W3.hasOwnProperty,bve=W3.toString,Yp=wu?wu.toStringTag:void 0;function Mve(e){var t=_ve.call(e,Yp),n=e[Yp];try{e[Yp]=void 0;var r=!0}catch{}var o=bve.call(e);return r&&(t?e[Yp]=n:delete e[Yp]),o}var Ive=Object.prototype,Cve=Ive.toString;function Tve(e){return Cve.call(e)}var wve="[object Null]",Sve="[object Undefined]",yA=wu?wu.toStringTag:void 0;function gd(e){return e==null?e===void 0?Sve:wve:yA&&yA in Object(e)?Mve(e):Tve(e)}function Su(e){return e!=null&&typeof e=="object"}var kve="[object Symbol]";function y0(e){return typeof e=="symbol"||Su(e)&&gd(e)==kve}function K3(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n0){if(++t>=sye)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function cye(e){return function(){return e}}var dye=function(){try{var e=vd(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Cy=dye;var fye=Cy?function(e,t){return Cy(e,"toString",{configurable:!0,enumerable:!1,value:cye(t),writable:!0})}:nw;const pye=fye;var hye=uye(pye);const gye=hye;var mye=9007199254740991,vye=/^(?:0|[1-9]\d*)$/;function ow(e,t){var n=typeof e;return t=t??mye,!!t&&(n=="number"||n!="symbol"&&vye.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Tye}function op(e){return e!=null&&sw(e.length)&&!rw(e)}function wye(e,t,n){if(!Ns(n))return!1;var r=typeof t;return(r=="number"?op(n)&&ow(t,n.length):r=="string"&&t in n)?Ag(n[t],e):!1}function Sye(e){return Cye(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,s&&wye(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r-1}function q0e(e,t){var n=this.__data__,r=_0(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function bl(e){var t=-1,n=e==null?0:e.length;for(this.clear();++to?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=r?e:h_e(e,t,n)}var m_e="\\ud800-\\udfff",v_e="\\u0300-\\u036f",y_e="\\ufe20-\\ufe2f",__e="\\u20d0-\\u20ff",b_e=v_e+y_e+__e,M_e="\\ufe0e\\ufe0f",I_e="\\u200d",C_e=RegExp("["+I_e+m_e+b_e+M_e+"]");function sP(e){return C_e.test(e)}function T_e(e){return e.split("")}var aP="\\ud800-\\udfff",w_e="\\u0300-\\u036f",S_e="\\ufe20-\\ufe2f",k_e="\\u20d0-\\u20ff",D_e=w_e+S_e+k_e,E_e="\\ufe0e\\ufe0f",A_e="["+aP+"]",qI="["+D_e+"]",VI="\\ud83c[\\udffb-\\udfff]",L_e="(?:"+qI+"|"+VI+")",lP="[^"+aP+"]",uP="(?:\\ud83c[\\udde6-\\uddff]){2}",cP="[\\ud800-\\udbff][\\udc00-\\udfff]",O_e="\\u200d",dP=L_e+"?",fP="["+E_e+"]?",R_e="(?:"+O_e+"(?:"+[lP,uP,cP].join("|")+")"+fP+dP+")*",N_e=fP+dP+R_e,P_e="(?:"+[lP+qI+"?",qI,uP,cP,A_e].join("|")+")",x_e=RegExp(VI+"(?="+VI+")|"+P_e+N_e,"g");function U_e(e){return e.match(x_e)||[]}function F_e(e){return sP(e)?U_e(e):T_e(e)}function $_e(e){return function(t){t=M0(t);var n=sP(t)?F_e(t):void 0,r=n?n[0]:t.charAt(0),o=n?g_e(n,1).join(""):t.slice(1);return r[e]()+o}}var G_e=$_e("toUpperCase");const B_e=G_e;function H_e(e,t,n,r){var o=-1,i=e==null?0:e.length;for(r&&i&&(n=e[++o]);++ou))return!1;var f=i.get(e),g=i.get(t);if(f&&g)return f==t&&g==e;var v=-1,_=!0,M=n&fbe?new ky:void 0;for(i.set(e,t),i.set(t,e);++v=t||P<0||v&&B>=i}function S(){var q=aM();if(w(q))return L(q);u=setTimeout(S,k(q))}function L(q){return u=void 0,_&&r?M(q):(r=o=void 0,s)}function A(){u!==void 0&&clearTimeout(u),f=0,r=d=o=u=void 0}function O(){return u===void 0?s:L(aM())}function H(){var q=aM(),P=w(q);if(r=arguments,o=this,d=q,P){if(u===void 0)return I(d);if(v)return clearTimeout(u),u=setTimeout(S,t),M(d)}return u===void 0&&(u=setTimeout(S,t)),s}return H.cancel=A,H.flush=O,H}function KI(e,t,n){(n!==void 0&&!Ag(e[t],n)||n===void 0&&!(t in e))&&iw(e,t,n)}function lMe(e){return Su(e)&&op(e)}function YI(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function uMe(e){return Mye(e,tP(e))}function cMe(e,t,n,r,o,i,s){var u=YI(e,n),d=YI(t,n),f=s.get(d);if(f){KI(e,n,f);return}var g=i?i(u,d,n+"",e,t,s):void 0,v=g===void 0;if(v){var _=Rs(d),M=!_&&wy(d),I=!_&&!M&&lw(d);g=d,_||M||I?Rs(u)?g=u:lMe(u)?g=iye(u):M?(v=!1,g=$1e(d,!0)):I?(v=!1,g=obe(d,!0)):g=[]:p_e(d)||Ty(d)?(g=u,Ty(u)?g=uMe(u):(!Ns(u)||rw(u))&&(g=ibe(d))):v=!1}v&&(s.set(d,g),o(g,d,r,i,s),s.delete(d)),KI(e,n,g)}function LP(e,t,n,r,o){e!==t&&AP(t,function(i,s){if(o||(o=new Da),Ns(i))cMe(e,t,s,n,LP,r,o);else{var u=r?r(YI(e,s),i,s+"",e,t,o):void 0;u===void 0&&(u=i),KI(e,s,u)}},tP)}function dMe(e,t){var n=-1,r=op(e)?Array(e.length):[];return nMe(e,function(o,i,s){r[++n]=t(o,i,s)}),r}function fMe(e,t){var n=Rs(e)?K3:dMe;return n(e,Jbe(t))}var pMe=L1e(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});const hMe=pMe;var gMe=Sye(function(e,t,n){LP(e,t,n)});const Xm=gMe;var mMe="Expected a function";function lM(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(mMe);return Ns(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),aMe(e,t,{leading:r,maxWait:t,trailing:o})}const ip={fontFamily:'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontFamilyMono:"v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace",fontWeight:"400",fontWeightStrong:"500",cubicBezierEaseInOut:"cubic-bezier(.4, 0, .2, 1)",cubicBezierEaseOut:"cubic-bezier(0, 0, .2, 1)",cubicBezierEaseIn:"cubic-bezier(.4, 0, 1, 1)",borderRadius:"3px",borderRadiusSmall:"2px",fontSize:"14px",fontSizeMini:"12px",fontSizeTiny:"12px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",lineHeight:"1.6",heightMini:"16px",heightTiny:"22px",heightSmall:"28px",heightMedium:"34px",heightLarge:"40px",heightHuge:"46px"},{fontSize:vMe,fontFamily:yMe,lineHeight:_Me}=ip,OP=Ze("body",` margin: 0; font-size: ${vMe}; font-family: ${yMe}; line-height: ${_Me}; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; `,[Ze("input",` font-family: inherit; font-size: inherit; `)]),yd="n-config-provider",hg="naive-ui-style";function vr(e,t,n,r,o,i){const s=np(),u=en(yd,null);if(n){const f=()=>{const g=i==null?void 0:i.value;n.mount({id:g===void 0?t:g+t,head:!0,props:{bPrefix:g?`.${g}-`:void 0},anchorMetaName:hg,ssr:s}),u!=null&&u.preflightStyleDisabled||OP.mount({id:"n-global",head:!0,anchorMetaName:hg,ssr:s})};s?f():qf(f)}return qe(()=>{var f;const{theme:{common:g,self:v,peers:_={}}={},themeOverrides:M={},builtinThemeOverrides:I={}}=o,{common:k,peers:w}=M,{common:S=void 0,[e]:{common:L=void 0,self:A=void 0,peers:O={}}={}}=(u==null?void 0:u.mergedThemeRef.value)||{},{common:H=void 0,[e]:q={}}=(u==null?void 0:u.mergedThemeOverridesRef.value)||{},{common:P,peers:B={}}=q,j=Xm({},g||L||S||r.common,H,P,k),$=Xm((f=v||A||r.self)===null||f===void 0?void 0:f(j),I,q,M);return{common:j,self:$,peers:Xm({},r.peers,O,_),peerOverrides:Xm({},I.peers,B,w)}})}vr.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};const bMe="n";function Pi(e={},t={defaultBordered:!0}){const n=en(yd,null);return{inlineThemeDisabled:n==null?void 0:n.inlineThemeDisabled,mergedRtlRef:n==null?void 0:n.mergedRtlRef,mergedComponentPropsRef:n==null?void 0:n.mergedComponentPropsRef,mergedBreakpointsRef:n==null?void 0:n.mergedBreakpointsRef,mergedBorderedRef:qe(()=>{var r,o;const{bordered:i}=e;return i!==void 0?i:(o=(r=n==null?void 0:n.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&o!==void 0?o:!0}),mergedClsPrefixRef:qe(()=>(n==null?void 0:n.mergedClsPrefixRef.value)||bMe),namespaceRef:qe(()=>n==null?void 0:n.mergedNamespaceRef.value)}}const MMe={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}},IMe=MMe,CMe={name:"en-US",locale:ET},TMe=CMe;function pw(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=en(yd,null)||{},r=qe(()=>{var i,s;return(s=(i=t==null?void 0:t.value)===null||i===void 0?void 0:i[e])!==null&&s!==void 0?s:IMe[e]});return{dateLocaleRef:qe(()=>{var i;return(i=n==null?void 0:n.value)!==null&&i!==void 0?i:TMe}),localeRef:r}}function sp(e,t,n){if(!t)return;const r=np(),o=en(yd,null),i=()=>{const s=n==null?void 0:n.value;t.mount({id:s===void 0?e:s+e,head:!0,anchorMetaName:hg,props:{bPrefix:s?`.${s}-`:void 0},ssr:r}),o!=null&&o.preflightStyleDisabled||OP.mount({id:"n-global",head:!0,anchorMetaName:hg,ssr:r})};r?i():qf(i)}function ta(e,t,n,r){var o;n||v3("useThemeClass","cssVarsRef is not passed");const i=(o=en(yd,null))===null||o===void 0?void 0:o.mergedThemeHashRef,s=Ne(""),u=np();let d;const f=`__${e}`,g=()=>{let v=f;const _=t?t.value:void 0,M=i==null?void 0:i.value;M&&(v+="-"+M),_&&(v+="-"+_);const{themeOverrides:I,builtinThemeOverrides:k}=r;I&&(v+="-"+FI(JSON.stringify(I))),k&&(v+="-"+FI(JSON.stringify(k))),s.value=v,d=()=>{const w=n.value;let S="";for(const L in w)S+=`${L}: ${w[L]};`;Ze(`.${v}`,S).mount({id:v,ssr:u}),d=void 0}};return nn(()=>{g()}),{themeClass:s,onRender:()=>{d==null||d()}}}function ap(e,t,n){if(!t)return;const r=np(),o=qe(()=>{const{value:s}=t;if(!s)return;const u=s[e];if(u)return u}),i=()=>{nn(()=>{const{value:s}=n,u=`${s}${e}Rtl`;if(eme(u,r))return;const{value:d}=o;d&&d.style.mount({id:u,head:!0,anchorMetaName:hg,props:{bPrefix:s?`.${s}-`:void 0},ssr:r})})};return r?i():qf(i),o}const wMe=it({name:"Add",render(){return Se("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});function lp(e,t){return it({name:B_e(e),setup(){var n;const r=(n=en(yd,null))===null||n===void 0?void 0:n.mergedIconsRef;return()=>{var o;const i=(o=r==null?void 0:r.value)===null||o===void 0?void 0:o[e];return i?i():t}}})}const SMe=lp("close",Se("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},Se("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},Se("g",{fill:"currentColor","fill-rule":"nonzero"},Se("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"}))))),kMe=it({name:"Eye",render(){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Se("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),Se("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),DMe=it({name:"EyeOff",render(){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Se("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),Se("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),Se("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),Se("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),Se("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),EMe=it({name:"Empty",render(){return Se("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),Se("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}}),AMe=it({name:"ChevronDown",render(){return Se("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),LMe=lp("clear",Se("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Se("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},Se("g",{fill:"currentColor","fill-rule":"nonzero"},Se("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),OMe=lp("rotateClockwise",Se("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se("path",{d:"M3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 12.7916 15.3658 15.2026 13 16.3265V14.5C13 14.2239 12.7761 14 12.5 14C12.2239 14 12 14.2239 12 14.5V17.5C12 17.7761 12.2239 18 12.5 18H15.5C15.7761 18 16 17.7761 16 17.5C16 17.2239 15.7761 17 15.5 17H13.8758C16.3346 15.6357 18 13.0128 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 10.2761 2.22386 10.5 2.5 10.5C2.77614 10.5 3 10.2761 3 10Z",fill:"currentColor"}),Se("path",{d:"M10 12C11.1046 12 12 11.1046 12 10C12 8.89543 11.1046 8 10 8C8.89543 8 8 8.89543 8 10C8 11.1046 8.89543 12 10 12ZM10 11C9.44772 11 9 10.5523 9 10C9 9.44772 9.44772 9 10 9C10.5523 9 11 9.44772 11 10C11 10.5523 10.5523 11 10 11Z",fill:"currentColor"}))),RMe=lp("rotateClockwise",Se("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se("path",{d:"M17 10C17 6.13401 13.866 3 10 3C6.13401 3 3 6.13401 3 10C3 12.7916 4.63419 15.2026 7 16.3265V14.5C7 14.2239 7.22386 14 7.5 14C7.77614 14 8 14.2239 8 14.5V17.5C8 17.7761 7.77614 18 7.5 18H4.5C4.22386 18 4 17.7761 4 17.5C4 17.2239 4.22386 17 4.5 17H6.12422C3.66539 15.6357 2 13.0128 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 10.2761 17.7761 10.5 17.5 10.5C17.2239 10.5 17 10.2761 17 10Z",fill:"currentColor"}),Se("path",{d:"M10 12C8.89543 12 8 11.1046 8 10C8 8.89543 8.89543 8 10 8C11.1046 8 12 8.89543 12 10C12 11.1046 11.1046 12 10 12ZM10 11C10.5523 11 11 10.5523 11 10C11 9.44772 10.5523 9 10 9C9.44772 9 9 9.44772 9 10C9 10.5523 9.44772 11 10 11Z",fill:"currentColor"}))),NMe=lp("zoomIn",Se("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se("path",{d:"M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5Z",fill:"currentColor"}),Se("path",{d:"M8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z",fill:"currentColor"}))),PMe=lp("zoomOut",Se("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se("path",{d:"M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11Z",fill:"currentColor"}),Se("path",{d:"M14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z",fill:"currentColor"}))),xMe=it({name:"ResizeSmall",render(){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Se("g",{fill:"none"},Se("path",{d:"M5.5 4A1.5 1.5 0 0 0 4 5.5v1a.5.5 0 0 1-1 0v-1A2.5 2.5 0 0 1 5.5 3h1a.5.5 0 0 1 0 1h-1zM16 5.5A1.5 1.5 0 0 0 14.5 4h-1a.5.5 0 0 1 0-1h1A2.5 2.5 0 0 1 17 5.5v1a.5.5 0 0 1-1 0v-1zm0 9a1.5 1.5 0 0 1-1.5 1.5h-1a.5.5 0 0 0 0 1h1a2.5 2.5 0 0 0 2.5-2.5v-1a.5.5 0 0 0-1 0v1zm-12 0A1.5 1.5 0 0 0 5.5 16h1.25a.5.5 0 0 1 0 1H5.5A2.5 2.5 0 0 1 3 14.5v-1.25a.5.5 0 0 1 1 0v1.25zM8.5 7A1.5 1.5 0 0 0 7 8.5v3A1.5 1.5 0 0 0 8.5 13h3a1.5 1.5 0 0 0 1.5-1.5v-3A1.5 1.5 0 0 0 11.5 7h-3zM8 8.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-3z",fill:"currentColor"})))}}),C0=it({name:"BaseIconSwitchTransition",setup(e,{slots:t}){const n=v0();return()=>Se(Mo,{name:"icon-switch-transition",appear:n.value},t)}}),UMe=it({name:"FadeInExpandTransition",props:{appear:Boolean,group:Boolean,mode:String,onLeave:Function,onAfterLeave:Function,onAfterEnter:Function,width:Boolean,reverse:Boolean},setup(e,{slots:t}){function n(u){e.width?u.style.maxWidth=`${u.offsetWidth}px`:u.style.maxHeight=`${u.offsetHeight}px`,u.offsetWidth}function r(u){e.width?u.style.maxWidth="0":u.style.maxHeight="0",u.offsetWidth;const{onLeave:d}=e;d&&d()}function o(u){e.width?u.style.maxWidth="":u.style.maxHeight="";const{onAfterLeave:d}=e;d&&d()}function i(u){if(u.style.transition="none",e.width){const d=u.offsetWidth;u.style.maxWidth="0",u.offsetWidth,u.style.transition="",u.style.maxWidth=`${d}px`}else if(e.reverse)u.style.maxHeight=`${u.offsetHeight}px`,u.offsetHeight,u.style.transition="",u.style.maxHeight="0";else{const d=u.offsetHeight;u.style.maxHeight="0",u.offsetWidth,u.style.transition="",u.style.maxHeight=`${d}px`}u.offsetWidth}function s(u){var d;e.width?u.style.maxWidth="":e.reverse||(u.style.maxHeight=""),(d=e.onAfterEnter)===null||d===void 0||d.call(e)}return()=>{const{group:u,width:d,appear:f,mode:g}=e,v=u?cO:Mo,_={name:d?"fade-in-width-expand-transition":"fade-in-height-expand-transition",appear:f,onEnter:i,onAfterEnter:s,onBeforeLeave:n,onLeave:r,onAfterLeave:o};return u||(_.mode=g),Se(v,_,t)}}}),FMe=Je("base-icon",` height: 1em; width: 1em; line-height: 1em; text-align: center; display: inline-block; position: relative; fill: currentColor; transform: translateZ(0); `,[Ze("svg",` height: 1em; width: 1em; `)]),ki=it({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){sp("-base-icon",FMe,Kn(e,"clsPrefix"))},render(){return Se("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}}),$Me=Je("base-close",` display: flex; align-items: center; justify-content: center; cursor: pointer; background-color: transparent; color: var(--n-close-icon-color); border-radius: var(--n-close-border-radius); height: var(--n-close-size); width: var(--n-close-size); font-size: var(--n-close-icon-size); outline: none; border: none; position: relative; padding: 0; `,[mt("absolute",` height: var(--n-close-icon-size); width: var(--n-close-icon-size); `),Ze("&::before",` content: ""; position: absolute; width: var(--n-close-size); height: var(--n-close-size); left: 50%; top: 50%; transform: translateY(-50%) translateX(-50%); transition: inherit; border-radius: inherit; `),gi("disabled",[Ze("&:hover",` color: var(--n-close-icon-color-hover); `),Ze("&:hover::before",` background-color: var(--n-close-color-hover); `),Ze("&:focus::before",` background-color: var(--n-close-color-hover); `),Ze("&:active",` color: var(--n-close-icon-color-pressed); `),Ze("&:active::before",` background-color: var(--n-close-color-pressed); `)]),mt("disabled",` cursor: not-allowed; color: var(--n-close-icon-color-disabled); background-color: transparent; `),mt("round",[Ze("&::before",` border-radius: 50%; `)])]),GMe=it({name:"BaseClose",props:{isButtonTag:{type:Boolean,default:!0},clsPrefix:{type:String,required:!0},disabled:{type:Boolean,default:void 0},focusable:{type:Boolean,default:!0},round:Boolean,onClick:Function,absolute:Boolean},setup(e){return sp("-base-close",$Me,Kn(e,"clsPrefix")),()=>{const{clsPrefix:t,disabled:n,absolute:r,round:o,isButtonTag:i}=e;return Se(i?"button":"div",{type:i?"button":void 0,tabindex:n||!e.focusable?-1:0,"aria-disabled":n,"aria-label":"close",role:i?void 0:"button",disabled:n,class:[`${t}-base-close`,r&&`${t}-base-close--absolute`,n&&`${t}-base-close--disabled`,o&&`${t}-base-close--round`],onMousedown:u=>{e.focusable||u.preventDefault()},onClick:e.onClick},Se(ki,{clsPrefix:t},{default:()=>Se(SMe,null)}))}}}),{cubicBezierEaseInOut:BMe}=ip;function gg({originalTransform:e="",left:t=0,top:n=0,transition:r=`all .3s ${BMe} !important`}={}){return[Ze("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to",{transform:e+" scale(0.75)",left:t,top:n,opacity:0}),Ze("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from",{transform:`scale(1) ${e}`,left:t,top:n,opacity:1}),Ze("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active",{transformOrigin:"center",position:"absolute",left:t,top:n,transition:r})]}const HMe=Ze([Ze("@keyframes loading-container-rotate",` to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } `),Ze("@keyframes loading-layer-rotate",` 12.5% { -webkit-transform: rotate(135deg); transform: rotate(135deg); } 25% { -webkit-transform: rotate(270deg); transform: rotate(270deg); } 37.5% { -webkit-transform: rotate(405deg); transform: rotate(405deg); } 50% { -webkit-transform: rotate(540deg); transform: rotate(540deg); } 62.5% { -webkit-transform: rotate(675deg); transform: rotate(675deg); } 75% { -webkit-transform: rotate(810deg); transform: rotate(810deg); } 87.5% { -webkit-transform: rotate(945deg); transform: rotate(945deg); } 100% { -webkit-transform: rotate(1080deg); transform: rotate(1080deg); } `),Ze("@keyframes loading-left-spin",` from { -webkit-transform: rotate(265deg); transform: rotate(265deg); } 50% { -webkit-transform: rotate(130deg); transform: rotate(130deg); } to { -webkit-transform: rotate(265deg); transform: rotate(265deg); } `),Ze("@keyframes loading-right-spin",` from { -webkit-transform: rotate(-265deg); transform: rotate(-265deg); } 50% { -webkit-transform: rotate(-130deg); transform: rotate(-130deg); } to { -webkit-transform: rotate(-265deg); transform: rotate(-265deg); } `),Je("base-loading",` position: relative; line-height: 0; width: 1em; height: 1em; `,[rt("transition-wrapper",` position: absolute; width: 100%; height: 100%; `,[gg()]),rt("container",` display: inline-flex; position: relative; direction: ltr; line-height: 0; animation: loading-container-rotate 1568.2352941176ms linear infinite; font-size: 0; letter-spacing: 0; white-space: nowrap; opacity: 1; width: 100%; height: 100%; `,[rt("svg",` stroke: var(--n-text-color); fill: transparent; position: absolute; height: 100%; overflow: hidden; `),rt("container-layer",` position: absolute; width: 100%; height: 100%; animation: loading-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; `,[rt("container-layer-left",` display: inline-flex; position: relative; width: 50%; height: 100%; overflow: hidden; `,[rt("svg",` animation: loading-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; width: 200%; `)]),rt("container-layer-patch",` position: absolute; top: 0; left: 47.5%; box-sizing: border-box; width: 5%; height: 100%; overflow: hidden; `,[rt("svg",` left: -900%; width: 2000%; transform: rotate(180deg); `)]),rt("container-layer-right",` display: inline-flex; position: relative; width: 50%; height: 100%; overflow: hidden; `,[rt("svg",` animation: loading-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; left: -100%; width: 200%; `)])])]),rt("placeholder",` position: absolute; left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); `,[gg({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})])])]),qMe={strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0}},hw=it({name:"BaseLoading",props:Object.assign({clsPrefix:{type:String,required:!0},show:{type:Boolean,default:!0},scale:{type:Number,default:1},radius:{type:Number,default:100}},qMe),setup(e){sp("-base-loading",HMe,Kn(e,"clsPrefix"))},render(){const{clsPrefix:e,radius:t,strokeWidth:n,stroke:r,scale:o}=this,i=t/o;return Se("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},Se(C0,null,{default:()=>this.show?Se("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},Se("div",{class:`${e}-base-loading__container`},Se("div",{class:`${e}-base-loading__container-layer`},Se("div",{class:`${e}-base-loading__container-layer-left`},Se("svg",{class:`${e}-base-loading__svg`,viewBox:`0 0 ${2*i} ${2*i}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},Se("circle",{fill:"none",stroke:"currentColor","stroke-width":n,"stroke-linecap":"round",cx:i,cy:i,r:t-n/2,"stroke-dasharray":4.91*t,"stroke-dashoffset":2.46*t}))),Se("div",{class:`${e}-base-loading__container-layer-patch`},Se("svg",{class:`${e}-base-loading__svg`,viewBox:`0 0 ${2*i} ${2*i}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},Se("circle",{fill:"none",stroke:"currentColor","stroke-width":n,"stroke-linecap":"round",cx:i,cy:i,r:t-n/2,"stroke-dasharray":4.91*t,"stroke-dashoffset":2.46*t}))),Se("div",{class:`${e}-base-loading__container-layer-right`},Se("svg",{class:`${e}-base-loading__svg`,viewBox:`0 0 ${2*i} ${2*i}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},Se("circle",{fill:"none",stroke:"currentColor","stroke-width":n,"stroke-linecap":"round",cx:i,cy:i,r:t-n/2,"stroke-dasharray":4.91*t,"stroke-dashoffset":2.46*t})))))):Se("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}}),Qt={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.6",alphaDisabled:"0.5",alphaDisabledInput:"0.02",alphaPending:"0.05",alphaTablePending:"0.02",alphaPressed:"0.07",alphaAvatar:"0.2",alphaRail:"0.14",alphaProgressRail:".08",alphaBorder:"0.12",alphaDivider:"0.06",alphaInput:"0",alphaAction:"0.02",alphaTab:"0.04",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",alphaCode:"0.05",alphaTag:"0.02",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},VMe=id(Qt.neutralBase),RP=id(Qt.neutralInvertBase),zMe="rgba("+RP.slice(0,3).join(", ")+", ";function JA(e){return zMe+String(e)+")"}function si(e){const t=Array.from(RP);return t[3]=Number(e),g0(VMe,t)}const jMe=Object.assign(Object.assign({name:"common"},ip),{baseColor:Qt.neutralBase,primaryColor:Qt.primaryDefault,primaryColorHover:Qt.primaryHover,primaryColorPressed:Qt.primaryActive,primaryColorSuppl:Qt.primarySuppl,infoColor:Qt.infoDefault,infoColorHover:Qt.infoHover,infoColorPressed:Qt.infoActive,infoColorSuppl:Qt.infoSuppl,successColor:Qt.successDefault,successColorHover:Qt.successHover,successColorPressed:Qt.successActive,successColorSuppl:Qt.successSuppl,warningColor:Qt.warningDefault,warningColorHover:Qt.warningHover,warningColorPressed:Qt.warningActive,warningColorSuppl:Qt.warningSuppl,errorColor:Qt.errorDefault,errorColorHover:Qt.errorHover,errorColorPressed:Qt.errorActive,errorColorSuppl:Qt.errorSuppl,textColorBase:Qt.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:si(Qt.alpha4),placeholderColor:si(Qt.alpha4),placeholderColorDisabled:si(Qt.alpha5),iconColor:si(Qt.alpha4),iconColorHover:qm(si(Qt.alpha4),{lightness:.75}),iconColorPressed:qm(si(Qt.alpha4),{lightness:.9}),iconColorDisabled:si(Qt.alpha5),opacity1:Qt.alpha1,opacity2:Qt.alpha2,opacity3:Qt.alpha3,opacity4:Qt.alpha4,opacity5:Qt.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeIconColor:si(Number(Qt.alphaClose)),closeIconColorHover:si(Number(Qt.alphaClose)),closeIconColorPressed:si(Number(Qt.alphaClose)),closeColorHover:"rgba(0, 0, 0, .09)",closeColorPressed:"rgba(0, 0, 0, .13)",clearColor:si(Qt.alpha4),clearColorHover:qm(si(Qt.alpha4),{lightness:.75}),clearColorPressed:qm(si(Qt.alpha4),{lightness:.9}),scrollbarColor:JA(Qt.alphaScrollbar),scrollbarColorHover:JA(Qt.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:si(Qt.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:Qt.neutralPopover,tableColor:Qt.neutralCard,cardColor:Qt.neutralCard,modalColor:Qt.neutralModal,bodyColor:Qt.neutralBody,tagColor:"#eee",avatarColor:si(Qt.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:si(Qt.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:Qt.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),na=jMe,WMe={iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"},KMe=e=>{const{textColorDisabled:t,iconColor:n,textColor2:r,fontSizeSmall:o,fontSizeMedium:i,fontSizeLarge:s,fontSizeHuge:u}=e;return Object.assign(Object.assign({},WMe),{fontSizeSmall:o,fontSizeMedium:i,fontSizeLarge:s,fontSizeHuge:u,textColor:t,iconColor:n,extraTextColor:r})},YMe={name:"Empty",common:na,self:KMe},JMe=YMe,XMe=Je("empty",` display: flex; flex-direction: column; align-items: center; font-size: var(--n-font-size); `,[rt("icon",` width: var(--n-icon-size); height: var(--n-icon-size); font-size: var(--n-icon-size); line-height: var(--n-icon-size); color: var(--n-icon-color); transition: color .3s var(--n-bezier); `,[Ze("+",[rt("description",` margin-top: 8px; `)])]),rt("description",` transition: color .3s var(--n-bezier); color: var(--n-text-color); `),rt("extra",` text-align: center; transition: color .3s var(--n-bezier); margin-top: 12px; color: var(--n-extra-text-color); `)]),ZMe=Object.assign(Object.assign({},vr.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),QMe=it({name:"Empty",props:ZMe,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Pi(e),r=vr("Empty","-empty",XMe,JMe,e,t),{localeRef:o}=pw("Empty"),i=en(yd,null),s=qe(()=>{var g,v,_;return(g=e.description)!==null&&g!==void 0?g:(_=(v=i==null?void 0:i.mergedComponentPropsRef.value)===null||v===void 0?void 0:v.Empty)===null||_===void 0?void 0:_.description}),u=qe(()=>{var g,v;return((v=(g=i==null?void 0:i.mergedComponentPropsRef.value)===null||g===void 0?void 0:g.Empty)===null||v===void 0?void 0:v.renderIcon)||(()=>Se(EMe,null))}),d=qe(()=>{const{size:g}=e,{common:{cubicBezierEaseInOut:v},self:{[Ht("iconSize",g)]:_,[Ht("fontSize",g)]:M,textColor:I,iconColor:k,extraTextColor:w}}=r.value;return{"--n-icon-size":_,"--n-font-size":M,"--n-bezier":v,"--n-text-color":I,"--n-icon-color":k,"--n-extra-text-color":w}}),f=n?ta("empty",qe(()=>{let g="";const{size:v}=e;return g+=v[0],g}),d,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:u,localizedDescription:qe(()=>s.value||o.value.description),cssVars:n?void 0:d,themeClass:f==null?void 0:f.themeClass,onRender:f==null?void 0:f.onRender}},render(){const{$slots:e,mergedClsPrefix:t,onRender:n}=this;return n==null||n(),Se("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?Se("div",{class:`${t}-empty__icon`},e.icon?e.icon():Se(ki,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?Se("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?Se("div",{class:`${t}-empty__extra`},e.extra()):null)}}),eIe=e=>{const{scrollbarColor:t,scrollbarColorHover:n}=e;return{color:t,colorHover:n}},tIe={name:"Scrollbar",common:na,self:eIe},nIe=tIe,{cubicBezierEaseInOut:XA}=ip;function Dy({name:e="fade-in",enterDuration:t="0.2s",leaveDuration:n="0.2s",enterCubicBezier:r=XA,leaveCubicBezier:o=XA}={}){return[Ze(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),Ze(`&.${e}-transition-leave-active`,{transition:`all ${n} ${o}!important`}),Ze(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),Ze(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}const rIe=Je("scrollbar",` overflow: hidden; position: relative; z-index: auto; height: 100%; width: 100%; `,[Ze(">",[Je("scrollbar-container",` width: 100%; overflow: scroll; height: 100%; max-height: inherit; scrollbar-width: none; `,[Ze("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",` width: 0; height: 0; display: none; `),Ze(">",[Je("scrollbar-content",` box-sizing: border-box; min-width: 100%; `)])])]),Ze(">, +",[Je("scrollbar-rail",` position: absolute; pointer-events: none; user-select: none; -webkit-user-select: none; `,[mt("horizontal",` left: 2px; right: 2px; bottom: 4px; height: var(--n-scrollbar-height); `,[Ze(">",[rt("scrollbar",` height: var(--n-scrollbar-height); border-radius: var(--n-scrollbar-border-radius); right: 0; `)])]),mt("vertical",` right: 4px; top: 2px; bottom: 2px; width: var(--n-scrollbar-width); `,[Ze(">",[rt("scrollbar",` width: var(--n-scrollbar-width); border-radius: var(--n-scrollbar-border-radius); bottom: 0; `)])]),mt("disabled",[Ze(">",[rt("scrollbar",{pointerEvents:"none"})])]),Ze(">",[rt("scrollbar",` position: absolute; cursor: pointer; pointer-events: all; background-color: var(--n-scrollbar-color); transition: background-color .2s var(--n-scrollbar-bezier); `,[Dy(),Ze("&:hover",{backgroundColor:"var(--n-scrollbar-color-hover)"})])])])])]),oIe=Object.assign(Object.assign({},vr.props),{size:{type:Number,default:5},duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:"hover"},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:String,contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean}),NP=it({name:"Scrollbar",props:oIe,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=Pi(e),o=ap("Scrollbar",r,t),i=Ne(null),s=Ne(null),u=Ne(null),d=Ne(null),f=Ne(null),g=Ne(null),v=Ne(null),_=Ne(null),M=Ne(null),I=Ne(null),k=Ne(null),w=Ne(0),S=Ne(0),L=Ne(!1),A=Ne(!1);let O=!1,H=!1,q,P,B=0,j=0,$=0,R=0;const T=yme(),x=qe(()=>{const{value:nt}=_,{value:bt}=g,{value:Pt}=I;return nt===null||bt===null||Pt===null?0:Math.min(nt,Pt*nt/bt+e.size*1.5)}),Z=qe(()=>`${x.value}px`),K=qe(()=>{const{value:nt}=M,{value:bt}=v,{value:Pt}=k;return nt===null||bt===null||Pt===null?0:Pt*nt/bt+e.size*1.5}),re=qe(()=>`${K.value}px`),X=qe(()=>{const{value:nt}=_,{value:bt}=w,{value:Pt}=g,{value:ln}=I;if(nt===null||Pt===null||ln===null)return 0;{const tn=Pt-nt;return tn?bt/tn*(ln-x.value):0}}),ie=qe(()=>`${X.value}px`),he=qe(()=>{const{value:nt}=M,{value:bt}=S,{value:Pt}=v,{value:ln}=k;if(nt===null||Pt===null||ln===null)return 0;{const tn=Pt-nt;return tn?bt/tn*(ln-K.value):0}}),ae=qe(()=>`${he.value}px`),de=qe(()=>{const{value:nt}=_,{value:bt}=g;return nt!==null&&bt!==null&&bt>nt}),Y=qe(()=>{const{value:nt}=M,{value:bt}=v;return nt!==null&&bt!==null&&bt>nt}),te=qe(()=>{const{trigger:nt}=e;return nt==="none"||L.value}),fe=qe(()=>{const{trigger:nt}=e;return nt==="none"||A.value}),Re=qe(()=>{const{container:nt}=e;return nt?nt():s.value}),ve=qe(()=>{const{content:nt}=e;return nt?nt():u.value}),be=hve(()=>{e.container||Ee({top:w.value,left:S.value})}),ue=()=>{be.isDeactivated||ye()},ce=nt=>{if(be.isDeactivated)return;const{onResize:bt}=e;bt&&bt(nt),ye()},Ee=(nt,bt)=>{if(!e.scrollable)return;if(typeof nt=="number"){V(bt??0,nt,0,!1,"auto");return}const{left:Pt,top:ln,index:tn,elSize:wn,position:Vn,behavior:ze,el:kt,debounce:Mt=!0}=nt;(Pt!==void 0||ln!==void 0)&&V(Pt??0,ln??0,0,!1,ze),kt!==void 0?V(0,kt.offsetTop,kt.offsetHeight,Mt,ze):tn!==void 0&&wn!==void 0?V(0,tn*wn,wn,Mt,ze):Vn==="bottom"?V(0,Number.MAX_SAFE_INTEGER,0,!1,ze):Vn==="top"&&V(0,0,0,!1,ze)},pe=(nt,bt)=>{if(!e.scrollable)return;const{value:Pt}=Re;Pt&&(typeof nt=="object"?Pt.scrollBy(nt):Pt.scrollBy(nt,bt||0))};function V(nt,bt,Pt,ln,tn){const{value:wn}=Re;if(wn){if(ln){const{scrollTop:Vn,offsetHeight:ze}=wn;if(bt>Vn){bt+Pt<=Vn+ze||wn.scrollTo({left:nt,top:bt+Pt-ze,behavior:tn});return}}wn.scrollTo({left:nt,top:bt,behavior:tn})}}function ee(){Pe(),xe(),ye()}function se(){Ce()}function Ce(){le(),ke()}function le(){P!==void 0&&window.clearTimeout(P),P=window.setTimeout(()=>{A.value=!1},e.duration)}function ke(){q!==void 0&&window.clearTimeout(q),q=window.setTimeout(()=>{L.value=!1},e.duration)}function Pe(){q!==void 0&&window.clearTimeout(q),L.value=!0}function xe(){P!==void 0&&window.clearTimeout(P),A.value=!0}function He(nt){const{onScroll:bt}=e;bt&&bt(nt),Te()}function Te(){const{value:nt}=Re;nt&&(w.value=nt.scrollTop,S.value=nt.scrollLeft*(o!=null&&o.value?-1:1))}function W(){const{value:nt}=ve;nt&&(g.value=nt.offsetHeight,v.value=nt.offsetWidth);const{value:bt}=Re;bt&&(_.value=bt.offsetHeight,M.value=bt.offsetWidth);const{value:Pt}=f,{value:ln}=d;Pt&&(k.value=Pt.offsetWidth),ln&&(I.value=ln.offsetHeight)}function ne(){const{value:nt}=Re;nt&&(w.value=nt.scrollTop,S.value=nt.scrollLeft*(o!=null&&o.value?-1:1),_.value=nt.offsetHeight,M.value=nt.offsetWidth,g.value=nt.scrollHeight,v.value=nt.scrollWidth);const{value:bt}=f,{value:Pt}=d;bt&&(k.value=bt.offsetWidth),Pt&&(I.value=Pt.offsetHeight)}function ye(){e.scrollable&&(e.useUnifiedContainer?ne():(W(),Te()))}function Be(nt){var bt;return!(!((bt=i.value)===null||bt===void 0)&&bt.contains(by(nt)))}function je(nt){nt.preventDefault(),nt.stopPropagation(),H=!0,eo("mousemove",window,ct,!0),eo("mouseup",window,Fe,!0),j=S.value,$=o!=null&&o.value?window.innerWidth-nt.clientX:nt.clientX}function ct(nt){if(!H)return;q!==void 0&&window.clearTimeout(q),P!==void 0&&window.clearTimeout(P);const{value:bt}=M,{value:Pt}=v,{value:ln}=K;if(bt===null||Pt===null)return;const wn=(o!=null&&o.value?window.innerWidth-nt.clientX-$:nt.clientX-$)*(Pt-bt)/(bt-ln),Vn=Pt-bt;let ze=j+wn;ze=Math.min(Vn,ze),ze=Math.max(ze,0);const{value:kt}=Re;if(kt){kt.scrollLeft=ze*(o!=null&&o.value?-1:1);const{internalOnUpdateScrollLeft:Mt}=e;Mt&&Mt(ze)}}function Fe(nt){nt.preventDefault(),nt.stopPropagation(),Tr("mousemove",window,ct,!0),Tr("mouseup",window,Fe,!0),H=!1,ye(),Be(nt)&&Ce()}function at(nt){nt.preventDefault(),nt.stopPropagation(),O=!0,eo("mousemove",window,St,!0),eo("mouseup",window,vn,!0),B=w.value,R=nt.clientY}function St(nt){if(!O)return;q!==void 0&&window.clearTimeout(q),P!==void 0&&window.clearTimeout(P);const{value:bt}=_,{value:Pt}=g,{value:ln}=x;if(bt===null||Pt===null)return;const wn=(nt.clientY-R)*(Pt-bt)/(bt-ln),Vn=Pt-bt;let ze=B+wn;ze=Math.min(Vn,ze),ze=Math.max(ze,0);const{value:kt}=Re;kt&&(kt.scrollTop=ze)}function vn(nt){nt.preventDefault(),nt.stopPropagation(),Tr("mousemove",window,St,!0),Tr("mouseup",window,vn,!0),O=!1,ye(),Be(nt)&&Ce()}nn(()=>{const{value:nt}=Y,{value:bt}=de,{value:Pt}=t,{value:ln}=f,{value:tn}=d;ln&&(nt?ln.classList.remove(`${Pt}-scrollbar-rail--disabled`):ln.classList.add(`${Pt}-scrollbar-rail--disabled`)),tn&&(bt?tn.classList.remove(`${Pt}-scrollbar-rail--disabled`):tn.classList.add(`${Pt}-scrollbar-rail--disabled`))}),Rn(()=>{e.container||ye()}),yi(()=>{q!==void 0&&window.clearTimeout(q),P!==void 0&&window.clearTimeout(P),Tr("mousemove",window,St,!0),Tr("mouseup",window,vn,!0)});const Cn=vr("Scrollbar","-scrollbar",rIe,nIe,e,t),Tn=qe(()=>{const{common:{cubicBezierEaseInOut:nt,scrollbarBorderRadius:bt,scrollbarHeight:Pt,scrollbarWidth:ln},self:{color:tn,colorHover:wn}}=Cn.value;return{"--n-scrollbar-bezier":nt,"--n-scrollbar-color":tn,"--n-scrollbar-color-hover":wn,"--n-scrollbar-border-radius":bt,"--n-scrollbar-width":ln,"--n-scrollbar-height":Pt}}),An=n?ta("scrollbar",void 0,Tn,e):void 0;return Object.assign(Object.assign({},{scrollTo:Ee,scrollBy:pe,sync:ye,syncUnifiedContainer:ne,handleMouseEnterWrapper:ee,handleMouseLeaveWrapper:se}),{mergedClsPrefix:t,rtlEnabled:o,containerScrollTop:w,wrapperRef:i,containerRef:s,contentRef:u,yRailRef:d,xRailRef:f,needYBar:de,needXBar:Y,yBarSizePx:Z,xBarSizePx:re,yBarTopPx:ie,xBarLeftPx:ae,isShowXBar:te,isShowYBar:fe,isIos:T,handleScroll:He,handleContentResize:ue,handleContainerResize:ce,handleYScrollMouseDown:at,handleXScrollMouseDown:je,cssVars:n?void 0:Tn,themeClass:An==null?void 0:An.themeClass,onRender:An==null?void 0:An.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:r,rtlEnabled:o,internalHoistYRail:i}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const s=this.trigger==="none",u=()=>Se("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`],"data-scrollbar-rail":!0,style:this.verticalRailStyle,"aria-hidden":!0},Se(s?KE:Mo,s?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?Se("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),d=()=>{var g,v;return(g=this.onRender)===null||g===void 0||g.call(this),Se("div",Lo(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,o&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(v=t.default)===null||v===void 0?void 0:v.call(t):Se("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},Se(dg,{onResize:this.handleContentResize},{default:()=>Se("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),i?null:u(),this.xScrollable&&Se("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},Se(s?KE:Mo,s?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?Se("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:o?this.xBarLeftPx:void 0,left:o?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},f=this.container?d():Se(dg,{onResize:this.handleContainerResize},{default:d});return i?Se(ft,null,f,u()):f}}),PP=NP,iIe=NP,{cubicBezierEaseIn:ZA,cubicBezierEaseOut:QA}=ip;function sIe({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:r="",originalTransition:o=""}={}){return[Ze("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${ZA}, transform ${t} ${ZA} ${o&&","+o}`}),Ze("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${QA}, transform ${t} ${QA} ${o&&","+o}`}),Ze("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${n})`}),Ze("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}const aIe=Je("base-wave",` position: absolute; left: 0; right: 0; top: 0; bottom: 0; border-radius: inherit; `),lIe=it({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){sp("-base-wave",aIe,Kn(e,"clsPrefix"));const t=Ne(null),n=Ne(!1);let r=null;return yi(()=>{r!==null&&window.clearTimeout(r)}),{active:n,selfRef:t,play(){r!==null&&(window.clearTimeout(r),n.value=!1,r=null),wr(()=>{var o;(o=t.value)===null||o===void 0||o.offsetHeight,n.value=!0,r=window.setTimeout(()=>{n.value=!1,r=null},1e3)})}}},render(){const{clsPrefix:e}=this;return Se("div",{ref:"selfRef","aria-hidden":!0,class:[`${e}-base-wave`,this.active&&`${e}-base-wave--active`]})}}),uIe={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"},cIe=e=>{const{boxShadow2:t,popoverColor:n,textColor2:r,borderRadius:o,fontSize:i,dividerColor:s}=e;return Object.assign(Object.assign({},uIe),{fontSize:i,borderRadius:o,color:n,dividerColor:s,textColor:r,boxShadow:t})},dIe={name:"Popover",common:na,self:cIe},xP=dIe,uM={top:"bottom",bottom:"top",left:"right",right:"left"},_o="var(--n-arrow-height) * 1.414",fIe=Ze([Je("popover",` transition: box-shadow .3s var(--n-bezier), background-color .3s var(--n-bezier), color .3s var(--n-bezier); position: relative; font-size: var(--n-font-size); color: var(--n-text-color); box-shadow: var(--n-box-shadow); word-break: break-word; `,[Ze(">",[Je("scrollbar",` height: inherit; max-height: inherit; `)]),gi("raw",` background-color: var(--n-color); border-radius: var(--n-border-radius); `,[gi("scrollable",[gi("show-header-or-footer","padding: var(--n-padding);")])]),rt("header",` padding: var(--n-padding); border-bottom: 1px solid var(--n-divider-color); transition: border-color .3s var(--n-bezier); `),rt("footer",` padding: var(--n-padding); border-top: 1px solid var(--n-divider-color); transition: border-color .3s var(--n-bezier); `),mt("scrollable, show-header-or-footer",[rt("content",` padding: var(--n-padding); `)])]),Je("popover-shared",` transform-origin: inherit; `,[Je("popover-arrow-wrapper",` position: absolute; overflow: hidden; pointer-events: none; `,[Je("popover-arrow",` transition: background-color .3s var(--n-bezier); position: absolute; display: block; width: calc(${_o}); height: calc(${_o}); box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12); transform: rotate(45deg); background-color: var(--n-color); pointer-events: all; `)]),Ze("&.popover-transition-enter-from, &.popover-transition-leave-to",` opacity: 0; transform: scale(.85); `),Ze("&.popover-transition-enter-to, &.popover-transition-leave-from",` transform: scale(1); opacity: 1; `),Ze("&.popover-transition-enter-active",` transition: box-shadow .3s var(--n-bezier), background-color .3s var(--n-bezier), color .3s var(--n-bezier), opacity .15s var(--n-bezier-ease-out), transform .15s var(--n-bezier-ease-out); `),Ze("&.popover-transition-leave-active",` transition: box-shadow .3s var(--n-bezier), background-color .3s var(--n-bezier), color .3s var(--n-bezier), opacity .15s var(--n-bezier-ease-in), transform .15s var(--n-bezier-ease-in); `)]),_s("top-start",` top: calc(${_o} / -2); left: calc(${Ja("top-start")} - var(--v-offset-left)); `),_s("top",` top: calc(${_o} / -2); transform: translateX(calc(${_o} / -2)) rotate(45deg); left: 50%; `),_s("top-end",` top: calc(${_o} / -2); right: calc(${Ja("top-end")} + var(--v-offset-left)); `),_s("bottom-start",` bottom: calc(${_o} / -2); left: calc(${Ja("bottom-start")} - var(--v-offset-left)); `),_s("bottom",` bottom: calc(${_o} / -2); transform: translateX(calc(${_o} / -2)) rotate(45deg); left: 50%; `),_s("bottom-end",` bottom: calc(${_o} / -2); right: calc(${Ja("bottom-end")} + var(--v-offset-left)); `),_s("left-start",` left: calc(${_o} / -2); top: calc(${Ja("left-start")} - var(--v-offset-top)); `),_s("left",` left: calc(${_o} / -2); transform: translateY(calc(${_o} / -2)) rotate(45deg); top: 50%; `),_s("left-end",` left: calc(${_o} / -2); bottom: calc(${Ja("left-end")} + var(--v-offset-top)); `),_s("right-start",` right: calc(${_o} / -2); top: calc(${Ja("right-start")} - var(--v-offset-top)); `),_s("right",` right: calc(${_o} / -2); transform: translateY(calc(${_o} / -2)) rotate(45deg); top: 50%; `),_s("right-end",` right: calc(${_o} / -2); bottom: calc(${Ja("right-end")} + var(--v-offset-top)); `),...fMe({top:["right-start","left-start"],right:["top-end","bottom-end"],bottom:["right-end","left-end"],left:["top-start","bottom-start"]},(e,t)=>{const n=["right","left"].includes(t),r=n?"width":"height";return e.map(o=>{const i=o.split("-")[1]==="end",u=`calc((${`var(--v-target-${r}, 0px)`} - ${_o}) / 2)`,d=Ja(o);return Ze(`[v-placement="${o}"] >`,[Je("popover-shared",[mt("center-arrow",[Je("popover-arrow",`${t}: calc(max(${u}, ${d}) ${i?"+":"-"} var(--v-offset-${n?"left":"top"}));`)])])])})})]);function Ja(e){return["top","bottom"].includes(e.split("-")[0])?"var(--n-arrow-offset)":"var(--n-arrow-offset-vertical)"}function _s(e,t){const n=e.split("-")[0],r=["top","bottom"].includes(n)?"height: var(--n-space-arrow);":"width: var(--n-space-arrow);";return Ze(`[v-placement="${e}"] >`,[Je("popover-shared",` margin-${uM[n]}: var(--n-space); `,[mt("show-arrow",` margin-${uM[n]}: var(--n-space-arrow); `),mt("overlap",` margin: 0; `),ame("popover-arrow-wrapper",` right: 0; left: 0; top: 0; bottom: 0; ${n}: 100%; ${uM[n]}: auto; ${r} `,[Je("popover-arrow",t)])])])}const UP=Object.assign(Object.assign({},vr.props),{to:$f.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentStyle:[Object,String],headerStyle:[Object,String],footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number}),pIe=({arrowStyle:e,clsPrefix:t})=>Se("div",{key:"__popover-arrow__",class:`${t}-popover-arrow-wrapper`},Se("div",{class:`${t}-popover-arrow`,style:e})),hIe=it({name:"PopoverBody",inheritAttrs:!1,props:UP,setup(e,{slots:t,attrs:n}){const{namespaceRef:r,mergedClsPrefixRef:o,inlineThemeDisabled:i}=Pi(e),s=vr("Popover","-popover",fIe,xP,e,o),u=Ne(null),d=en("NPopover"),f=Ne(null),g=Ne(e.show),v=Ne(!1);nn(()=>{const{show:P}=e;P&&!lme()&&!e.internalDeactivateImmediately&&(v.value=!0)});const _=qe(()=>{const{trigger:P,onClickoutside:B}=e,j=[],{positionManuallyRef:{value:$}}=d;return $||(P==="click"&&!B&&j.push([tA,O,void 0,{capture:!0}]),P==="hover"&&j.push([Sme,A])),B&&j.push([tA,O,void 0,{capture:!0}]),(e.displayDirective==="show"||e.animated&&v.value)&&j.push([to,e.show]),j}),M=qe(()=>{const P=e.width==="trigger"?void 0:Xb(e.width),B=[];P&&B.push({width:P});const{maxWidth:j,minWidth:$}=e;return j&&B.push({maxWidth:Xb(j)}),$&&B.push({maxWidth:Xb($)}),i||B.push(I.value),B}),I=qe(()=>{const{common:{cubicBezierEaseInOut:P,cubicBezierEaseIn:B,cubicBezierEaseOut:j},self:{space:$,spaceArrow:R,padding:T,fontSize:x,textColor:Z,dividerColor:K,color:re,boxShadow:X,borderRadius:ie,arrowHeight:he,arrowOffset:ae,arrowOffsetVertical:de}}=s.value;return{"--n-box-shadow":X,"--n-bezier":P,"--n-bezier-ease-in":B,"--n-bezier-ease-out":j,"--n-font-size":x,"--n-text-color":Z,"--n-color":re,"--n-divider-color":K,"--n-border-radius":ie,"--n-arrow-height":he,"--n-arrow-offset":ae,"--n-arrow-offset-vertical":de,"--n-padding":T,"--n-space":$,"--n-space-arrow":R}}),k=i?ta("popover",void 0,I,e):void 0;d.setBodyInstance({syncPosition:w}),yi(()=>{d.setBodyInstance(null)}),Bt(Kn(e,"show"),P=>{e.animated||(P?g.value=!0:g.value=!1)});function w(){var P;(P=u.value)===null||P===void 0||P.syncPosition()}function S(P){e.trigger==="hover"&&e.keepAliveOnHover&&e.show&&d.handleMouseEnter(P)}function L(P){e.trigger==="hover"&&e.keepAliveOnHover&&d.handleMouseLeave(P)}function A(P){e.trigger==="hover"&&!H().contains(by(P))&&d.handleMouseMoveOutside(P)}function O(P){(e.trigger==="click"&&!H().contains(by(P))||e.onClickoutside)&&d.handleClickOutside(P)}function H(){return d.getTriggerElement()}Ao(E3,f),Ao(D3,null),Ao(k3,null);function q(){if(k==null||k.onRender(),!(e.displayDirective==="show"||e.show||e.animated&&v.value))return null;let B;const j=d.internalRenderBodyRef.value,{value:$}=o;if(j)B=j([`${$}-popover-shared`,k==null?void 0:k.themeClass.value,e.overlap&&`${$}-popover-shared--overlap`,e.showArrow&&`${$}-popover-shared--show-arrow`,e.arrowPointToCenter&&`${$}-popover-shared--center-arrow`],f,M.value,S,L);else{const{value:R}=d.extraClassRef,{internalTrapFocus:T}=e,x=!xI(t.header)||!xI(t.footer),Z=()=>{var K;const re=x?Se(ft,null,Ds(t.header,he=>he?Se("div",{class:`${$}-popover__header`,style:e.headerStyle},he):null),Ds(t.default,he=>he?Se("div",{class:`${$}-popover__content`,style:e.contentStyle},t):null),Ds(t.footer,he=>he?Se("div",{class:`${$}-popover__footer`,style:e.footerStyle},he):null)):e.scrollable?(K=t.default)===null||K===void 0?void 0:K.call(t):Se("div",{class:`${$}-popover__content`,style:e.contentStyle},t),X=e.scrollable?Se(iIe,{contentClass:x?void 0:`${$}-popover__content`,contentStyle:x?void 0:e.contentStyle},{default:()=>re}):re,ie=e.showArrow?pIe({arrowStyle:e.arrowStyle,clsPrefix:$}):null;return[X,ie]};B=Se("div",Lo({class:[`${$}-popover`,`${$}-popover-shared`,k==null?void 0:k.themeClass.value,R.map(K=>`${$}-${K}`),{[`${$}-popover--scrollable`]:e.scrollable,[`${$}-popover--show-header-or-footer`]:x,[`${$}-popover--raw`]:e.raw,[`${$}-popover-shared--overlap`]:e.overlap,[`${$}-popover-shared--show-arrow`]:e.showArrow,[`${$}-popover-shared--center-arrow`]:e.arrowPointToCenter}],ref:f,style:M.value,onKeydown:d.handleKeydown,onMouseenter:S,onMouseleave:L},n),T?Se(pve,{active:e.show,autoFocus:!0},{default:Z}):Z())}return Bn(B,_.value)}return{displayed:v,namespace:r,isMounted:d.isMountedRef,zIndex:d.zIndexRef,followerRef:u,adjustedTo:$f(e),followerEnabled:g,renderContentNode:q}},render(){return Se(Bme,{ref:"followerRef",zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width==="trigger"?"target":void 0,teleportDisabled:this.adjustedTo===$f.tdkey},{default:()=>this.animated?Se(Mo,{name:"popover-transition",appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)===null||e===void 0||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),gIe=Object.keys(UP),mIe={focus:["onFocus","onBlur"],click:["onClick"],hover:["onMouseenter","onMouseleave"],manual:[],nested:["onFocus","onBlur","onMouseenter","onMouseleave","onClick"]};function vIe(e,t,n){mIe[t].forEach(r=>{e.props?e.props=Object.assign({},e.props):e.props={};const o=e.props[r],i=n[r];o?e.props[r]=(...s)=>{o(...s),i(...s)}:e.props[r]=i})}const FP={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:"hover"},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:"top"},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:"if"},arrowStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:$f.propTo,scrollable:Boolean,contentStyle:[Object,String],headerStyle:[Object,String],footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},yIe=Object.assign(Object.assign(Object.assign({},vr.props),FP),{internalOnAfterLeave:Function,internalRenderBody:Function}),$P=it({name:"Popover",inheritAttrs:!1,props:yIe,__popover__:!0,setup(e){const t=v0(),n=Ne(null),r=qe(()=>e.show),o=Ne(e.defaultShow),i=hd(r,o),s=Zs(()=>e.disabled?!1:i.value),u=()=>{if(e.disabled)return!0;const{getDisabled:Z}=e;return!!(Z!=null&&Z())},d=()=>u()?!1:i.value,f=Iy(e,["arrow","showArrow"]),g=qe(()=>e.overlap?!1:f.value);let v=null;const _=Ne(null),M=Ne(null),I=Zs(()=>e.x!==void 0&&e.y!==void 0);function k(Z){const{"onUpdate:show":K,onUpdateShow:re,onShow:X,onHide:ie}=e;o.value=Z,K&&cn(K,Z),re&&cn(re,Z),Z&&X&&cn(X,!0),Z&&ie&&cn(ie,!1)}function w(){v&&v.syncPosition()}function S(){const{value:Z}=_;Z&&(window.clearTimeout(Z),_.value=null)}function L(){const{value:Z}=M;Z&&(window.clearTimeout(Z),M.value=null)}function A(){const Z=u();if(e.trigger==="focus"&&!Z){if(d())return;k(!0)}}function O(){const Z=u();if(e.trigger==="focus"&&!Z){if(!d())return;k(!1)}}function H(){const Z=u();if(e.trigger==="hover"&&!Z){if(L(),_.value!==null||d())return;const K=()=>{k(!0),_.value=null},{delay:re}=e;re===0?K():_.value=window.setTimeout(K,re)}}function q(){const Z=u();if(e.trigger==="hover"&&!Z){if(S(),M.value!==null||!d())return;const K=()=>{k(!1),M.value=null},{duration:re}=e;re===0?K():M.value=window.setTimeout(K,re)}}function P(){q()}function B(Z){var K;d()&&(e.trigger==="click"&&(S(),L(),k(!1)),(K=e.onClickoutside)===null||K===void 0||K.call(e,Z))}function j(){if(e.trigger==="click"&&!u()){S(),L();const Z=!d();k(Z)}}function $(Z){e.internalTrapFocus&&Z.key==="Escape"&&(S(),L(),k(!1))}function R(Z){o.value=Z}function T(){var Z;return(Z=n.value)===null||Z===void 0?void 0:Z.targetRef}function x(Z){v=Z}return Ao("NPopover",{getTriggerElement:T,handleKeydown:$,handleMouseEnter:H,handleMouseLeave:q,handleClickOutside:B,handleMouseMoveOutside:P,setBodyInstance:x,positionManuallyRef:I,isMountedRef:t,zIndexRef:Kn(e,"zIndex"),extraClassRef:Kn(e,"internalExtraClass"),internalRenderBodyRef:Kn(e,"internalRenderBody")}),nn(()=>{i.value&&u()&&k(!1)}),{binderInstRef:n,positionManually:I,mergedShowConsideringDisabledProp:s,uncontrolledShow:o,mergedShowArrow:g,getMergedShow:d,setShow:R,handleClick:j,handleMouseEnter:H,handleMouseLeave:q,handleFocus:A,handleBlur:O,syncPosition:w}},render(){var e;const{positionManually:t,$slots:n}=this;let r,o=!1;if(!t&&(n.activator?r=WE(n,"activator"):r=WE(n,"trigger"),r)){r=Aa(r),r=r.type===Vf?Se("span",[r]):r;const i={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(!((e=r.type)===null||e===void 0)&&e.__popover__)o=!0,r.props||(r.props={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]}),r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[i,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[i];else{const{internalInheritedEventHandlers:s}=this,u=[i,...s],d={onBlur:f=>{u.forEach(g=>{g.onBlur(f)})},onFocus:f=>{u.forEach(g=>{g.onFocus(f)})},onClick:f=>{u.forEach(g=>{g.onClick(f)})},onMouseenter:f=>{u.forEach(g=>{g.onMouseenter(f)})},onMouseleave:f=>{u.forEach(g=>{g.onMouseleave(f)})}};vIe(r,s?"nested":t?"manual":this.trigger,d)}}return Se(Cme,{ref:"binderInstRef",syncTarget:!o,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;const i=this.getMergedShow();return[this.internalTrapFocus&&i?Bn(Se("div",{style:{position:"fixed",inset:0}}),[[ew,{enabled:i,zIndex:this.zIndex}]]):null,t?null:Se(Tme,null,{default:()=>r}),Se(hIe,Nge(this.$props,gIe,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:i})),{default:()=>{var s,u;return(u=(s=this.$slots).default)===null||u===void 0?void 0:u.call(s)},header:()=>{var s,u;return(u=(s=this.$slots).header)===null||u===void 0?void 0:u.call(s)},footer:()=>{var s,u;return(u=(s=this.$slots).footer)===null||u===void 0?void 0:u.call(s)}})]}})}}),_Ie=Je("base-clear",` flex-shrink: 0; height: 1em; width: 1em; position: relative; `,[Ze(">",[rt("clear",` font-size: var(--n-clear-size); height: 1em; width: 1em; cursor: pointer; color: var(--n-clear-color); transition: color .3s var(--n-bezier); display: flex; `,[Ze("&:hover",` color: var(--n-clear-color-hover)!important; `),Ze("&:active",` color: var(--n-clear-color-pressed)!important; `)]),rt("placeholder",` display: flex; `),rt("clear, placeholder",` position: absolute; left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); `,[gg({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),JI=it({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return sp("-base-clear",_Ie,Kn(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){const{clsPrefix:e}=this;return Se("div",{class:`${e}-base-clear`},Se(C0,null,{default:()=>{var t,n;return this.show?Se("div",{key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},Oh(this.$slots.icon,()=>[Se(ki,{clsPrefix:e},{default:()=>Se(LMe,null)})])):Se("div",{key:"icon",class:`${e}-base-clear__placeholder`},(n=(t=this.$slots).placeholder)===null||n===void 0?void 0:n.call(t))}}))}}),bIe=it({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{const{clsPrefix:n}=e;return Se(hw,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?Se(JI,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>Se(ki,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>Oh(t.default,()=>[Se(AMe,null)])})}):null})}}}),{cubicBezierEaseInOut:xl}=ip;function MIe({duration:e=".2s",delay:t=".1s"}={}){return[Ze("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),Ze("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",` opacity: 0!important; margin-left: 0!important; margin-right: 0!important; `),Ze("&.fade-in-width-expand-transition-leave-active",` overflow: hidden; transition: opacity ${e} ${xl}, max-width ${e} ${xl} ${t}, margin-left ${e} ${xl} ${t}, margin-right ${e} ${xl} ${t}; `),Ze("&.fade-in-width-expand-transition-enter-active",` overflow: hidden; transition: opacity ${e} ${xl} ${t}, max-width ${e} ${xl}, margin-left ${e} ${xl}, margin-right ${e} ${xl}; `)]}const IIe=Eg&&"chrome"in window;Eg&&navigator.userAgent.includes("Firefox");const GP=Eg&&navigator.userAgent.includes("Safari")&&!IIe,CIe={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"},TIe=e=>{const{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:o,primaryColorHover:i,inputColor:s,inputColorDisabled:u,borderColor:d,warningColor:f,warningColorHover:g,errorColor:v,errorColorHover:_,borderRadius:M,lineHeight:I,fontSizeTiny:k,fontSizeSmall:w,fontSizeMedium:S,fontSizeLarge:L,heightTiny:A,heightSmall:O,heightMedium:H,heightLarge:q,actionColor:P,clearColor:B,clearColorHover:j,clearColorPressed:$,placeholderColor:R,placeholderColorDisabled:T,iconColor:x,iconColorDisabled:Z,iconColorHover:K,iconColorPressed:re}=e;return Object.assign(Object.assign({},CIe),{countTextColorDisabled:r,countTextColor:n,heightTiny:A,heightSmall:O,heightMedium:H,heightLarge:q,fontSizeTiny:k,fontSizeSmall:w,fontSizeMedium:S,fontSizeLarge:L,lineHeight:I,lineHeightTextarea:I,borderRadius:M,iconSize:"16px",groupLabelColor:P,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:o,placeholderColor:R,placeholderColorDisabled:T,color:s,colorDisabled:u,colorFocus:s,groupLabelBorder:`1px solid ${d}`,border:`1px solid ${d}`,borderHover:`1px solid ${i}`,borderDisabled:`1px solid ${d}`,borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 0 2px ${ka(o,{alpha:.2})}`,loadingColor:o,loadingColorWarning:f,borderWarning:`1px solid ${f}`,borderHoverWarning:`1px solid ${g}`,colorFocusWarning:s,borderFocusWarning:`1px solid ${g}`,boxShadowFocusWarning:`0 0 0 2px ${ka(f,{alpha:.2})}`,caretColorWarning:f,loadingColorError:v,borderError:`1px solid ${v}`,borderHoverError:`1px solid ${_}`,colorFocusError:s,borderFocusError:`1px solid ${_}`,boxShadowFocusError:`0 0 0 2px ${ka(v,{alpha:.2})}`,caretColorError:v,clearColor:B,clearColorHover:j,clearColorPressed:$,iconColor:x,iconColorDisabled:Z,iconColorHover:K,iconColorPressed:re,suffixTextColor:t})},wIe={name:"Input",common:na,self:TIe},SIe=wIe,BP="n-input";function kIe(e){let t=0;for(const n of e)t++;return t}function Zm(e){return e===""||e==null}function DIe(e){const t=Ne(null);function n(){const{value:i}=e;if(!(i!=null&&i.focus)){o();return}const{selectionStart:s,selectionEnd:u,value:d}=i;if(s==null||u==null){o();return}t.value={start:s,end:u,beforeText:d.slice(0,s),afterText:d.slice(u)}}function r(){var i;const{value:s}=t,{value:u}=e;if(!s||!u)return;const{value:d}=u,{start:f,beforeText:g,afterText:v}=s;let _=d.length;if(d.endsWith(v))_=d.length-v.length;else if(d.startsWith(g))_=g.length;else{const M=g[f-1],I=d.indexOf(M,f-1);I!==-1&&(_=I+1)}(i=u.setSelectionRange)===null||i===void 0||i.call(u,_,_)}function o(){t.value=null}return Bt(e,o),{recordCursor:n,restoreCursor:r}}const eL=it({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:n,maxlengthRef:r,mergedClsPrefixRef:o,countGraphemesRef:i}=en(BP),s=qe(()=>{const{value:u}=n;return u===null||Array.isArray(u)?0:(i.value||kIe)(u)});return()=>{const{value:u}=r,{value:d}=n;return Se("span",{class:`${o.value}-input-word-count`},Uge(t.default,{value:d===null||Array.isArray(d)?"":d},()=>[u===void 0?s.value:`${s.value} / ${u}`]))}}}),EIe=Je("input",` max-width: 100%; cursor: text; line-height: 1.5; z-index: auto; outline: none; box-sizing: border-box; position: relative; display: inline-flex; border-radius: var(--n-border-radius); background-color: var(--n-color); transition: background-color .3s var(--n-bezier); font-size: var(--n-font-size); --n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2); `,[rt("input, textarea",` overflow: hidden; flex-grow: 1; position: relative; `),rt("input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder",` box-sizing: border-box; font-size: inherit; line-height: 1.5; font-family: inherit; border: none; outline: none; background-color: #0000; text-align: inherit; transition: -webkit-text-fill-color .3s var(--n-bezier), caret-color .3s var(--n-bezier), color .3s var(--n-bezier), text-decoration-color .3s var(--n-bezier); `),rt("input-el, textarea-el",` -webkit-appearance: none; scrollbar-width: none; width: 100%; min-width: 0; text-decoration-color: var(--n-text-decoration-color); color: var(--n-text-color); caret-color: var(--n-caret-color); background-color: transparent; `,[Ze("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",` width: 0; height: 0; display: none; `),Ze("&::placeholder",` color: #0000; -webkit-text-fill-color: transparent !important; `),Ze("&:-webkit-autofill ~",[rt("placeholder","display: none;")])]),mt("round",[gi("textarea","border-radius: calc(var(--n-height) / 2);")]),rt("placeholder",` pointer-events: none; position: absolute; left: 0; right: 0; top: 0; bottom: 0; overflow: hidden; color: var(--n-placeholder-color); `,[Ze("span",` width: 100%; display: inline-block; `)]),mt("textarea",[rt("placeholder","overflow: visible;")]),gi("autosize","width: 100%;"),mt("autosize",[rt("textarea-el, input-el",` position: absolute; top: 0; left: 0; height: 100%; `)]),Je("input-wrapper",` overflow: hidden; display: inline-flex; flex-grow: 1; position: relative; padding-left: var(--n-padding-left); padding-right: var(--n-padding-right); `),rt("input-mirror",` padding: 0; height: var(--n-height); line-height: var(--n-height); overflow: hidden; visibility: hidden; position: static; white-space: pre; pointer-events: none; `),rt("input-el",` padding: 0; height: var(--n-height); line-height: var(--n-height); `,[Ze("+",[rt("placeholder",` display: flex; align-items: center; `)])]),gi("textarea",[rt("placeholder","white-space: nowrap;")]),rt("eye",` display: flex; align-items: center; justify-content: center; transition: color .3s var(--n-bezier); `),mt("textarea","width: 100%;",[Je("input-word-count",` position: absolute; right: var(--n-padding-right); bottom: var(--n-padding-vertical); `),mt("resizable",[Je("input-wrapper",` resize: vertical; min-height: var(--n-height); `)]),rt("textarea-el, textarea-mirror, placeholder",` height: 100%; padding-left: 0; padding-right: 0; padding-top: var(--n-padding-vertical); padding-bottom: var(--n-padding-vertical); word-break: break-word; display: inline-block; vertical-align: bottom; box-sizing: border-box; line-height: var(--n-line-height-textarea); margin: 0; resize: none; white-space: pre-wrap; `),rt("textarea-mirror",` width: 100%; pointer-events: none; overflow: hidden; visibility: hidden; position: static; white-space: pre-wrap; overflow-wrap: break-word; `)]),mt("pair",[rt("input-el, placeholder","text-align: center;"),rt("separator",` display: flex; align-items: center; transition: color .3s var(--n-bezier); color: var(--n-text-color); white-space: nowrap; `,[Je("icon",` color: var(--n-icon-color); `),Je("base-icon",` color: var(--n-icon-color); `)])]),mt("disabled",` cursor: not-allowed; background-color: var(--n-color-disabled); `,[rt("border","border: var(--n-border-disabled);"),rt("input-el, textarea-el",` cursor: not-allowed; color: var(--n-text-color-disabled); text-decoration-color: var(--n-text-color-disabled); `),rt("placeholder","color: var(--n-placeholder-color-disabled);"),rt("separator","color: var(--n-text-color-disabled);",[Je("icon",` color: var(--n-icon-color-disabled); `),Je("base-icon",` color: var(--n-icon-color-disabled); `)]),Je("input-word-count",` color: var(--n-count-text-color-disabled); `),rt("suffix, prefix","color: var(--n-text-color-disabled);",[Je("icon",` color: var(--n-icon-color-disabled); `),Je("internal-icon",` color: var(--n-icon-color-disabled); `)])]),gi("disabled",[rt("eye",` color: var(--n-icon-color); cursor: pointer; `,[Ze("&:hover",` color: var(--n-icon-color-hover); `),Ze("&:active",` color: var(--n-icon-color-pressed); `)]),Ze("&:hover",[rt("state-border","border: var(--n-border-hover);")]),mt("focus","background-color: var(--n-color-focus);",[rt("state-border",` border: var(--n-border-focus); box-shadow: var(--n-box-shadow-focus); `)])]),rt("border, state-border",` box-sizing: border-box; position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; border-radius: inherit; border: var(--n-border); transition: box-shadow .3s var(--n-bezier), border-color .3s var(--n-bezier); `),rt("state-border",` border-color: #0000; z-index: 1; `),rt("prefix","margin-right: 4px;"),rt("suffix",` margin-left: 4px; `),rt("suffix, prefix",` transition: color .3s var(--n-bezier); flex-wrap: nowrap; flex-shrink: 0; line-height: var(--n-height); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; color: var(--n-suffix-text-color); `,[Je("base-loading",` font-size: var(--n-icon-size); margin: 0 2px; color: var(--n-loading-color); `),Je("base-clear",` font-size: var(--n-icon-size); `,[rt("placeholder",[Je("base-icon",` transition: color .3s var(--n-bezier); color: var(--n-icon-color); font-size: var(--n-icon-size); `)])]),Ze(">",[Je("icon",` transition: color .3s var(--n-bezier); color: var(--n-icon-color); font-size: var(--n-icon-size); `)]),Je("base-icon",` font-size: var(--n-icon-size); `)]),Je("input-word-count",` pointer-events: none; line-height: 1.5; font-size: .85em; color: var(--n-count-text-color); transition: color .3s var(--n-bezier); margin-left: 4px; font-variant: tabular-nums; `),["warning","error"].map(e=>mt(`${e}-status`,[gi("disabled",[Je("base-loading",` color: var(--n-loading-color-${e}) `),rt("input-el, textarea-el",` caret-color: var(--n-caret-color-${e}); `),rt("state-border",` border: var(--n-border-${e}); `),Ze("&:hover",[rt("state-border",` border: var(--n-border-hover-${e}); `)]),Ze("&:focus",` background-color: var(--n-color-focus-${e}); `,[rt("state-border",` box-shadow: var(--n-box-shadow-focus-${e}); border: var(--n-border-focus-${e}); `)]),mt("focus",` background-color: var(--n-color-focus-${e}); `,[rt("state-border",` box-shadow: var(--n-box-shadow-focus-${e}); border: var(--n-border-focus-${e}); `)])])]))]),AIe=Je("input",[mt("disabled",[rt("input-el, textarea-el",` -webkit-text-fill-color: var(--n-text-color-disabled); `)])]),LIe=Object.assign(Object.assign({},vr.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:Function,onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:Boolean,showPasswordToggle:Boolean}),OIe=it({name:"Input",props:LIe,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:o}=Pi(e),i=vr("Input","-input",EIe,SIe,e,t);GP&&sp("-input-safari",AIe,t);const s=Ne(null),u=Ne(null),d=Ne(null),f=Ne(null),g=Ne(null),v=Ne(null),_=Ne(null),M=DIe(_),I=Ne(null),{localeRef:k}=pw("Input"),w=Ne(e.defaultValue),S=Kn(e,"value"),L=hd(S,w),A=rp(e),{mergedSizeRef:O,mergedDisabledRef:H,mergedStatusRef:q}=A,P=Ne(!1),B=Ne(!1),j=Ne(!1),$=Ne(!1);let R=null;const T=qe(()=>{const{placeholder:Ge,pair:et}=e;return et?Array.isArray(Ge)?Ge:Ge===void 0?["",""]:[Ge,Ge]:Ge===void 0?[k.value.placeholder]:[Ge]}),x=qe(()=>{const{value:Ge}=j,{value:et}=L,{value:Vt}=T;return!Ge&&(Zm(et)||Array.isArray(et)&&Zm(et[0]))&&Vt[0]}),Z=qe(()=>{const{value:Ge}=j,{value:et}=L,{value:Vt}=T;return!Ge&&Vt[1]&&(Zm(et)||Array.isArray(et)&&Zm(et[1]))}),K=Zs(()=>e.internalForceFocus||P.value),re=Zs(()=>{if(H.value||e.readonly||!e.clearable||!K.value&&!B.value)return!1;const{value:Ge}=L,{value:et}=K;return e.pair?!!(Array.isArray(Ge)&&(Ge[0]||Ge[1]))&&(B.value||et):!!Ge&&(B.value||et)}),X=qe(()=>{const{showPasswordOn:Ge}=e;if(Ge)return Ge;if(e.showPasswordToggle)return"click"}),ie=Ne(!1),he=qe(()=>{const{textDecoration:Ge}=e;return Ge?Array.isArray(Ge)?Ge.map(et=>({textDecoration:et})):[{textDecoration:Ge}]:["",""]}),ae=Ne(void 0),de=()=>{var Ge,et;if(e.type==="textarea"){const{autosize:Vt}=e;if(Vt&&(ae.value=(et=(Ge=I.value)===null||Ge===void 0?void 0:Ge.$el)===null||et===void 0?void 0:et.offsetWidth),!u.value||typeof Vt=="boolean")return;const{paddingTop:Sn,paddingBottom:In,lineHeight:xn}=window.getComputedStyle(u.value),Kr=Number(Sn.slice(0,-2)),Gr=Number(In.slice(0,-2)),ro=Number(xn.slice(0,-2)),{value:ds}=d;if(!ds)return;if(Vt.minRows){const U=Math.max(Vt.minRows,1),fs=`${Kr+Gr+ro*U}px`;ds.style.minHeight=fs}if(Vt.maxRows){const U=`${Kr+Gr+ro*Vt.maxRows}px`;ds.style.maxHeight=U}}},Y=qe(()=>{const{maxlength:Ge}=e;return Ge===void 0?void 0:Number(Ge)});Rn(()=>{const{value:Ge}=L;Array.isArray(Ge)||Vn(Ge)});const te=Xi().proxy;function fe(Ge){const{onUpdateValue:et,"onUpdate:value":Vt,onInput:Sn}=e,{nTriggerFormInput:In}=A;et&&cn(et,Ge),Vt&&cn(Vt,Ge),Sn&&cn(Sn,Ge),w.value=Ge,In()}function Re(Ge){const{onChange:et}=e,{nTriggerFormChange:Vt}=A;et&&cn(et,Ge),w.value=Ge,Vt()}function ve(Ge){const{onBlur:et}=e,{nTriggerFormBlur:Vt}=A;et&&cn(et,Ge),Vt()}function be(Ge){const{onFocus:et}=e,{nTriggerFormFocus:Vt}=A;et&&cn(et,Ge),Vt()}function ue(Ge){const{onClear:et}=e;et&&cn(et,Ge)}function ce(Ge){const{onInputBlur:et}=e;et&&cn(et,Ge)}function Ee(Ge){const{onInputFocus:et}=e;et&&cn(et,Ge)}function pe(){const{onDeactivate:Ge}=e;Ge&&cn(Ge)}function V(){const{onActivate:Ge}=e;Ge&&cn(Ge)}function ee(Ge){const{onClick:et}=e;et&&cn(et,Ge)}function se(Ge){const{onWrapperFocus:et}=e;et&&cn(et,Ge)}function Ce(Ge){const{onWrapperBlur:et}=e;et&&cn(et,Ge)}function le(){j.value=!0}function ke(Ge){j.value=!1,Ge.target===v.value?Pe(Ge,1):Pe(Ge,0)}function Pe(Ge,et=0,Vt="input"){const Sn=Ge.target.value;if(Vn(Sn),Ge instanceof InputEvent&&!Ge.isComposing&&(j.value=!1),e.type==="textarea"){const{value:xn}=I;xn&&xn.syncUnifiedContainer()}if(R=Sn,j.value)return;M.recordCursor();const In=xe(Sn);if(In)if(!e.pair)Vt==="input"?fe(Sn):Re(Sn);else{let{value:xn}=L;Array.isArray(xn)?xn=[xn[0],xn[1]]:xn=["",""],xn[et]=Sn,Vt==="input"?fe(xn):Re(xn)}te.$forceUpdate(),In||wr(M.restoreCursor)}function xe(Ge){const{countGraphemes:et,maxlength:Vt,minlength:Sn}=e;if(et){let xn;if(Vt!==void 0&&(xn===void 0&&(xn=et(Ge)),xn>Number(Vt))||Sn!==void 0&&(xn===void 0&&(xn=et(Ge)),xn{Sn.preventDefault(),Tr("mouseup",document,et)};if(eo("mouseup",document,et),X.value!=="mousedown")return;ie.value=!0;const Vt=()=>{ie.value=!1,Tr("mouseup",document,Vt)};eo("mouseup",document,Vt)}function Tn(Ge){var et;switch((et=e.onKeydown)===null||et===void 0||et.call(e,Ge),Ge.key){case"Escape":yn();break;case"Enter":An(Ge);break}}function An(Ge){var et,Vt;if(e.passivelyActivated){const{value:Sn}=$;if(Sn){e.internalDeactivateOnEnter&&yn();return}Ge.preventDefault(),e.type==="textarea"?(et=u.value)===null||et===void 0||et.focus():(Vt=g.value)===null||Vt===void 0||Vt.focus()}}function yn(){e.passivelyActivated&&($.value=!1,wr(()=>{var Ge;(Ge=s.value)===null||Ge===void 0||Ge.focus()}))}function nt(){var Ge,et,Vt;H.value||(e.passivelyActivated?(Ge=s.value)===null||Ge===void 0||Ge.focus():((et=u.value)===null||et===void 0||et.focus(),(Vt=g.value)===null||Vt===void 0||Vt.focus()))}function bt(){var Ge;!((Ge=s.value)===null||Ge===void 0)&&Ge.contains(document.activeElement)&&document.activeElement.blur()}function Pt(){var Ge,et;(Ge=u.value)===null||Ge===void 0||Ge.select(),(et=g.value)===null||et===void 0||et.select()}function ln(){H.value||(u.value?u.value.focus():g.value&&g.value.focus())}function tn(){const{value:Ge}=s;Ge!=null&&Ge.contains(document.activeElement)&&Ge!==document.activeElement&&yn()}function wn(Ge){if(e.type==="textarea"){const{value:et}=u;et==null||et.scrollTo(Ge)}else{const{value:et}=g;et==null||et.scrollTo(Ge)}}function Vn(Ge){const{type:et,pair:Vt,autosize:Sn}=e;if(!Vt&&Sn)if(et==="textarea"){const{value:In}=d;In&&(In.textContent=(Ge??"")+`\r `)}else{const{value:In}=f;In&&(Ge?In.textContent=Ge:In.innerHTML=" ")}}function ze(){de()}const kt=Ne({top:"0"});function Mt(Ge){var et;const{scrollTop:Vt}=Ge.target;kt.value.top=`${-Vt}px`,(et=I.value)===null||et===void 0||et.syncUnifiedContainer()}let qt=null;nn(()=>{const{autosize:Ge,type:et}=e;Ge&&et==="textarea"?qt=Bt(L,Vt=>{!Array.isArray(Vt)&&Vt!==R&&Vn(Vt)}):qt==null||qt()});let Jt=null;nn(()=>{e.type==="textarea"?Jt=Bt(L,Ge=>{var et;!Array.isArray(Ge)&&Ge!==R&&((et=I.value)===null||et===void 0||et.syncUnifiedContainer())}):Jt==null||Jt()}),Ao(BP,{mergedValueRef:L,maxlengthRef:Y,mergedClsPrefixRef:t,countGraphemesRef:Kn(e,"countGraphemes")});const Mr={wrapperElRef:s,inputElRef:g,textareaElRef:u,isCompositing:j,focus:nt,blur:bt,select:Pt,deactivate:tn,activate:ln,scrollTo:wn},Sr=ap("Input",o,t),Qo=qe(()=>{const{value:Ge}=O,{common:{cubicBezierEaseInOut:et},self:{color:Vt,borderRadius:Sn,textColor:In,caretColor:xn,caretColorError:Kr,caretColorWarning:Gr,textDecorationColor:ro,border:ds,borderDisabled:U,borderHover:fs,borderFocus:Gt,placeholderColor:Il,placeholderColorDisabled:ra,lineHeightTextarea:Cl,colorDisabled:Tl,colorFocus:Fa,textColorDisabled:ei,boxShadowFocus:$a,iconSize:ps,colorFocusWarning:Qi,boxShadowFocusWarning:_d,borderWarning:bd,borderFocusWarning:oa,borderHoverWarning:up,colorFocusError:Md,boxShadowFocusError:Br,borderError:un,borderFocusError:At,borderHoverError:es,clearSize:_n,clearColor:st,clearColorHover:$e,clearColorPressed:hs,iconColor:Bo,iconColorDisabled:cp,suffixTextColor:Id,countTextColor:Ps,countTextColorDisabled:Cd,iconColorHover:xi,iconColorPressed:wl,loadingColor:Sl,loadingColorError:ti,loadingColorWarning:Td,[Ht("padding",Ge)]:dp,[Ht("fontSize",Ge)]:ia,[Ht("height",Ge)]:kl}}=i.value,{left:Dl,right:wd}=ih(dp);return{"--n-bezier":et,"--n-count-text-color":Ps,"--n-count-text-color-disabled":Cd,"--n-color":Vt,"--n-font-size":ia,"--n-border-radius":Sn,"--n-height":kl,"--n-padding-left":Dl,"--n-padding-right":wd,"--n-text-color":In,"--n-caret-color":xn,"--n-text-decoration-color":ro,"--n-border":ds,"--n-border-disabled":U,"--n-border-hover":fs,"--n-border-focus":Gt,"--n-placeholder-color":Il,"--n-placeholder-color-disabled":ra,"--n-icon-size":ps,"--n-line-height-textarea":Cl,"--n-color-disabled":Tl,"--n-color-focus":Fa,"--n-text-color-disabled":ei,"--n-box-shadow-focus":$a,"--n-loading-color":Sl,"--n-caret-color-warning":Gr,"--n-color-focus-warning":Qi,"--n-box-shadow-focus-warning":_d,"--n-border-warning":bd,"--n-border-focus-warning":oa,"--n-border-hover-warning":up,"--n-loading-color-warning":Td,"--n-caret-color-error":Kr,"--n-color-focus-error":Md,"--n-box-shadow-focus-error":Br,"--n-border-error":un,"--n-border-focus-error":At,"--n-border-hover-error":es,"--n-loading-color-error":ti,"--n-clear-color":st,"--n-clear-size":_n,"--n-clear-color-hover":$e,"--n-clear-color-pressed":hs,"--n-icon-color":Bo,"--n-icon-color-hover":xi,"--n-icon-color-pressed":wl,"--n-icon-color-disabled":cp,"--n-suffix-text-color":Id}}),go=r?ta("input",qe(()=>{const{value:Ge}=O;return Ge[0]}),Qo,e):void 0;return Object.assign(Object.assign({},Mr),{wrapperElRef:s,inputElRef:g,inputMirrorElRef:f,inputEl2Ref:v,textareaElRef:u,textareaMirrorElRef:d,textareaScrollbarInstRef:I,rtlEnabled:Sr,uncontrolledValue:w,mergedValue:L,passwordVisible:ie,mergedPlaceholder:T,showPlaceholder1:x,showPlaceholder2:Z,mergedFocus:K,isComposing:j,activated:$,showClearButton:re,mergedSize:O,mergedDisabled:H,textDecorationStyle:he,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:X,placeholderStyle:kt,mergedStatus:q,textAreaScrollContainerWidth:ae,handleTextAreaScroll:Mt,handleCompositionStart:le,handleCompositionEnd:ke,handleInput:Pe,handleInputBlur:He,handleInputFocus:Te,handleWrapperBlur:W,handleWrapperFocus:ne,handleMouseEnter:at,handleMouseLeave:St,handleMouseDown:Fe,handleChange:Be,handleClick:je,handleClear:ct,handlePasswordToggleClick:vn,handlePasswordToggleMousedown:Cn,handleWrapperKeydown:Tn,handleTextAreaMirrorResize:ze,getTextareaScrollContainer:()=>u.value,mergedTheme:i,cssVars:r?void 0:Qo,themeClass:go==null?void 0:go.themeClass,onRender:go==null?void 0:go.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:o,type:i,countGraphemes:s,onRender:u}=this,d=this.$slots;return u==null||u(),Se("div",{ref:"wrapperElRef",class:[`${n}-input`,o,r&&`${n}-input--${r}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:i==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&i!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.onKeyup,onKeydown:this.handleWrapperKeydown},Se("div",{class:`${n}-input-wrapper`},Ds(d.prefix,f=>f&&Se("div",{class:`${n}-input__prefix`},f)),i==="textarea"?Se(PP,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var f,g;const{textAreaScrollContainerWidth:v}=this,_={width:this.autosize&&v&&`${v}px`};return Se(ft,null,Se("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(f=this.inputProps)===null||f===void 0?void 0:f.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:s?void 0:this.maxlength,minlength:s?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(g=this.inputProps)===null||g===void 0?void 0:g.style,_],onBlur:this.handleInputBlur,onFocus:M=>{this.handleInputFocus(M,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?Se("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,_],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?Se(dg,{onResize:this.handleTextAreaMirrorResize},{default:()=>Se("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):Se("div",{class:`${n}-input__input`},Se("input",Object.assign({type:i==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":i},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:s?void 0:this.maxlength,minlength:s?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:f=>{this.handleInputFocus(f,0)},onInput:f=>{this.handleInput(f,0)},onChange:f=>{this.handleChange(f,0)}})),this.showPlaceholder1?Se("div",{class:`${n}-input__placeholder`},Se("span",null,this.mergedPlaceholder[0])):null,this.autosize?Se("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Ds(d.suffix,f=>f||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?Se("div",{class:`${n}-input__suffix`},[Ds(d["clear-icon-placeholder"],g=>(this.clearable||g)&&Se(JI,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>g,icon:()=>{var v,_;return(_=(v=this.$slots)["clear-icon"])===null||_===void 0?void 0:_.call(v)}})),this.internalLoadingBeforeSuffix?null:f,this.loading!==void 0?Se(bIe,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?f:null,this.showCount&&this.type!=="textarea"?Se(eL,null,{default:g=>{var v;return(v=d.count)===null||v===void 0?void 0:v.call(d,g)}}):null,this.mergedShowPasswordOn&&this.type==="password"?Se("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?Oh(d["password-visible-icon"],()=>[Se(ki,{clsPrefix:n},{default:()=>Se(kMe,null)})]):Oh(d["password-invisible-icon"],()=>[Se(ki,{clsPrefix:n},{default:()=>Se(DMe,null)})])):null]):null)),this.pair?Se("span",{class:`${n}-input__separator`},Oh(d.separator,()=>[this.separator])):null,this.pair?Se("div",{class:`${n}-input-wrapper`},Se("div",{class:`${n}-input__input`},Se("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:s?void 0:this.maxlength,minlength:s?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:f=>{this.handleInputFocus(f,1)},onInput:f=>{this.handleInput(f,1)},onChange:f=>{this.handleChange(f,1)}}),this.showPlaceholder2?Se("div",{class:`${n}-input__placeholder`},Se("span",null,this.mergedPlaceholder[1])):null),Ds(d.suffix,f=>(this.clearable||f)&&Se("div",{class:`${n}-input__suffix`},[this.clearable&&Se(JI,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var g;return(g=d["clear-icon"])===null||g===void 0?void 0:g.call(d)},placeholder:()=>{var g;return(g=d["clear-icon-placeholder"])===null||g===void 0?void 0:g.call(d)}}),f]))):null,this.mergedBordered?Se("div",{class:`${n}-input__border`}):null,this.mergedBordered?Se("div",{class:`${n}-input__state-border`}):null,this.showCount&&i==="textarea"?Se(eL,null,{default:f=>{var g;const{renderCount:v}=this;return v?v(f):(g=d.count)===null||g===void 0?void 0:g.call(d,f)}}):null)}}),RIe=Eg&&"loading"in document.createElement("img"),NIe=(e={})=>{var t;const{root:n=null}=e;return{hash:`${e.rootMargin||"0px 0px 0px 0px"}-${Array.isArray(e.threshold)?e.threshold.join(","):(t=e.threshold)!==null&&t!==void 0?t:"0"}`,options:Object.assign(Object.assign({},e),{root:(typeof n=="string"?document.querySelector(n):n)||document.documentElement})}},cM=new WeakMap,dM=new WeakMap,fM=new WeakMap,PIe=(e,t,n)=>{if(!e)return()=>{};const r=NIe(t),{root:o}=r.options;let i;const s=cM.get(o);s?i=s:(i=new Map,cM.set(o,i));let u,d;i.has(r.hash)?(d=i.get(r.hash),d[1].has(e)||(u=d[0],d[1].add(e),u.observe(e))):(u=new IntersectionObserver(v=>{v.forEach(_=>{if(_.isIntersecting){const M=dM.get(_.target),I=fM.get(_.target);M&&M(),I&&(I.value=!0)}})},r.options),u.observe(e),d=[u,new Set([e])],i.set(r.hash,d));let f=!1;const g=()=>{f||(dM.delete(e),fM.delete(e),f=!0,d[1].has(e)&&(d[0].unobserve(e),d[1].delete(e)),d[1].size<=0&&i.delete(r.hash),i.size||cM.delete(o))};return dM.set(e,g),fM.set(e,n),g};function tc(e){return g0(e,[255,255,255,.16])}function Qm(e){return g0(e,[0,0,0,.12])}const xIe="n-button-group",UIe={paddingTiny:"0 6px",paddingSmall:"0 10px",paddingMedium:"0 14px",paddingLarge:"0 18px",paddingRoundTiny:"0 10px",paddingRoundSmall:"0 14px",paddingRoundMedium:"0 18px",paddingRoundLarge:"0 22px",iconMarginTiny:"6px",iconMarginSmall:"6px",iconMarginMedium:"6px",iconMarginLarge:"6px",iconSizeTiny:"14px",iconSizeSmall:"18px",iconSizeMedium:"18px",iconSizeLarge:"20px",rippleDuration:".6s"},FIe=e=>{const{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:o,borderRadius:i,fontSizeTiny:s,fontSizeSmall:u,fontSizeMedium:d,fontSizeLarge:f,opacityDisabled:g,textColor2:v,textColor3:_,primaryColorHover:M,primaryColorPressed:I,borderColor:k,primaryColor:w,baseColor:S,infoColor:L,infoColorHover:A,infoColorPressed:O,successColor:H,successColorHover:q,successColorPressed:P,warningColor:B,warningColorHover:j,warningColorPressed:$,errorColor:R,errorColorHover:T,errorColorPressed:x,fontWeight:Z,buttonColor2:K,buttonColor2Hover:re,buttonColor2Pressed:X,fontWeightStrong:ie}=e;return Object.assign(Object.assign({},UIe),{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:o,borderRadiusTiny:i,borderRadiusSmall:i,borderRadiusMedium:i,borderRadiusLarge:i,fontSizeTiny:s,fontSizeSmall:u,fontSizeMedium:d,fontSizeLarge:f,opacityDisabled:g,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:K,colorSecondaryHover:re,colorSecondaryPressed:X,colorTertiary:K,colorTertiaryHover:re,colorTertiaryPressed:X,colorQuaternary:"#0000",colorQuaternaryHover:re,colorQuaternaryPressed:X,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:v,textColorTertiary:_,textColorHover:M,textColorPressed:I,textColorFocus:M,textColorDisabled:v,textColorText:v,textColorTextHover:M,textColorTextPressed:I,textColorTextFocus:M,textColorTextDisabled:v,textColorGhost:v,textColorGhostHover:M,textColorGhostPressed:I,textColorGhostFocus:M,textColorGhostDisabled:v,border:`1px solid ${k}`,borderHover:`1px solid ${M}`,borderPressed:`1px solid ${I}`,borderFocus:`1px solid ${M}`,borderDisabled:`1px solid ${k}`,rippleColor:w,colorPrimary:w,colorHoverPrimary:M,colorPressedPrimary:I,colorFocusPrimary:M,colorDisabledPrimary:w,textColorPrimary:S,textColorHoverPrimary:S,textColorPressedPrimary:S,textColorFocusPrimary:S,textColorDisabledPrimary:S,textColorTextPrimary:w,textColorTextHoverPrimary:M,textColorTextPressedPrimary:I,textColorTextFocusPrimary:M,textColorTextDisabledPrimary:v,textColorGhostPrimary:w,textColorGhostHoverPrimary:M,textColorGhostPressedPrimary:I,textColorGhostFocusPrimary:M,textColorGhostDisabledPrimary:w,borderPrimary:`1px solid ${w}`,borderHoverPrimary:`1px solid ${M}`,borderPressedPrimary:`1px solid ${I}`,borderFocusPrimary:`1px solid ${M}`,borderDisabledPrimary:`1px solid ${w}`,rippleColorPrimary:w,colorInfo:L,colorHoverInfo:A,colorPressedInfo:O,colorFocusInfo:A,colorDisabledInfo:L,textColorInfo:S,textColorHoverInfo:S,textColorPressedInfo:S,textColorFocusInfo:S,textColorDisabledInfo:S,textColorTextInfo:L,textColorTextHoverInfo:A,textColorTextPressedInfo:O,textColorTextFocusInfo:A,textColorTextDisabledInfo:v,textColorGhostInfo:L,textColorGhostHoverInfo:A,textColorGhostPressedInfo:O,textColorGhostFocusInfo:A,textColorGhostDisabledInfo:L,borderInfo:`1px solid ${L}`,borderHoverInfo:`1px solid ${A}`,borderPressedInfo:`1px solid ${O}`,borderFocusInfo:`1px solid ${A}`,borderDisabledInfo:`1px solid ${L}`,rippleColorInfo:L,colorSuccess:H,colorHoverSuccess:q,colorPressedSuccess:P,colorFocusSuccess:q,colorDisabledSuccess:H,textColorSuccess:S,textColorHoverSuccess:S,textColorPressedSuccess:S,textColorFocusSuccess:S,textColorDisabledSuccess:S,textColorTextSuccess:H,textColorTextHoverSuccess:q,textColorTextPressedSuccess:P,textColorTextFocusSuccess:q,textColorTextDisabledSuccess:v,textColorGhostSuccess:H,textColorGhostHoverSuccess:q,textColorGhostPressedSuccess:P,textColorGhostFocusSuccess:q,textColorGhostDisabledSuccess:H,borderSuccess:`1px solid ${H}`,borderHoverSuccess:`1px solid ${q}`,borderPressedSuccess:`1px solid ${P}`,borderFocusSuccess:`1px solid ${q}`,borderDisabledSuccess:`1px solid ${H}`,rippleColorSuccess:H,colorWarning:B,colorHoverWarning:j,colorPressedWarning:$,colorFocusWarning:j,colorDisabledWarning:B,textColorWarning:S,textColorHoverWarning:S,textColorPressedWarning:S,textColorFocusWarning:S,textColorDisabledWarning:S,textColorTextWarning:B,textColorTextHoverWarning:j,textColorTextPressedWarning:$,textColorTextFocusWarning:j,textColorTextDisabledWarning:v,textColorGhostWarning:B,textColorGhostHoverWarning:j,textColorGhostPressedWarning:$,textColorGhostFocusWarning:j,textColorGhostDisabledWarning:B,borderWarning:`1px solid ${B}`,borderHoverWarning:`1px solid ${j}`,borderPressedWarning:`1px solid ${$}`,borderFocusWarning:`1px solid ${j}`,borderDisabledWarning:`1px solid ${B}`,rippleColorWarning:B,colorError:R,colorHoverError:T,colorPressedError:x,colorFocusError:T,colorDisabledError:R,textColorError:S,textColorHoverError:S,textColorPressedError:S,textColorFocusError:S,textColorDisabledError:S,textColorTextError:R,textColorTextHoverError:T,textColorTextPressedError:x,textColorTextFocusError:T,textColorTextDisabledError:v,textColorGhostError:R,textColorGhostHoverError:T,textColorGhostPressedError:x,textColorGhostFocusError:T,textColorGhostDisabledError:R,borderError:`1px solid ${R}`,borderHoverError:`1px solid ${T}`,borderPressedError:`1px solid ${x}`,borderFocusError:`1px solid ${T}`,borderDisabledError:`1px solid ${R}`,rippleColorError:R,waveOpacity:"0.6",fontWeight:Z,fontWeightStrong:ie})},$Ie={name:"Button",common:na,self:FIe},GIe=$Ie,BIe=Ze([Je("button",` margin: 0; font-weight: var(--n-font-weight); line-height: 1; font-family: inherit; padding: var(--n-padding); height: var(--n-height); font-size: var(--n-font-size); border-radius: var(--n-border-radius); color: var(--n-text-color); background-color: var(--n-color); width: var(--n-width); white-space: nowrap; outline: none; position: relative; z-index: auto; border: none; display: inline-flex; flex-wrap: nowrap; flex-shrink: 0; align-items: center; justify-content: center; user-select: none; -webkit-user-select: none; text-align: center; cursor: pointer; text-decoration: none; transition: color .3s var(--n-bezier), background-color .3s var(--n-bezier), opacity .3s var(--n-bezier), border-color .3s var(--n-bezier); `,[mt("color",[rt("border",{borderColor:"var(--n-border-color)"}),mt("disabled",[rt("border",{borderColor:"var(--n-border-color-disabled)"})]),gi("disabled",[Ze("&:focus",[rt("state-border",{borderColor:"var(--n-border-color-focus)"})]),Ze("&:hover",[rt("state-border",{borderColor:"var(--n-border-color-hover)"})]),Ze("&:active",[rt("state-border",{borderColor:"var(--n-border-color-pressed)"})]),mt("pressed",[rt("state-border",{borderColor:"var(--n-border-color-pressed)"})])])]),mt("disabled",{backgroundColor:"var(--n-color-disabled)",color:"var(--n-text-color-disabled)"},[rt("border",{border:"var(--n-border-disabled)"})]),gi("disabled",[Ze("&:focus",{backgroundColor:"var(--n-color-focus)",color:"var(--n-text-color-focus)"},[rt("state-border",{border:"var(--n-border-focus)"})]),Ze("&:hover",{backgroundColor:"var(--n-color-hover)",color:"var(--n-text-color-hover)"},[rt("state-border",{border:"var(--n-border-hover)"})]),Ze("&:active",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[rt("state-border",{border:"var(--n-border-pressed)"})]),mt("pressed",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[rt("state-border",{border:"var(--n-border-pressed)"})])]),mt("loading","cursor: wait;"),Je("base-wave",` pointer-events: none; top: 0; right: 0; bottom: 0; left: 0; animation-iteration-count: 1; animation-duration: var(--n-ripple-duration); animation-timing-function: var(--n-bezier-ease-out), var(--n-bezier-ease-out); `,[mt("active",{zIndex:1,animationName:"button-wave-spread, button-wave-opacity"})]),Eg&&"MozBoxSizing"in document.createElement("div").style?Ze("&::moz-focus-inner",{border:0}):null,rt("border, state-border",` position: absolute; left: 0; top: 0; right: 0; bottom: 0; border-radius: inherit; transition: border-color .3s var(--n-bezier); pointer-events: none; `),rt("border",{border:"var(--n-border)"}),rt("state-border",{border:"var(--n-border)",borderColor:"#0000",zIndex:1}),rt("icon",` margin: var(--n-icon-margin); margin-left: 0; height: var(--n-icon-size); width: var(--n-icon-size); max-width: var(--n-icon-size); font-size: var(--n-icon-size); position: relative; flex-shrink: 0; `,[Je("icon-slot",` height: var(--n-icon-size); width: var(--n-icon-size); position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; `,[gg({top:"50%",originalTransform:"translateY(-50%)"})]),MIe()]),rt("content",` display: flex; align-items: center; flex-wrap: nowrap; min-width: 0; `,[Ze("~",[rt("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),mt("block",` display: flex; width: 100%; `),mt("dashed",[rt("border, state-border",{borderStyle:"dashed !important"})]),mt("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),Ze("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),Ze("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),HIe=Object.assign(Object.assign({},vr.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!GP}}),qIe=it({name:"Button",props:HIe,setup(e){const t=Ne(null),n=Ne(null),r=Ne(!1),o=Zs(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),i=en(xIe,{}),{mergedSizeRef:s}=rp({},{defaultSize:"medium",mergedSize:O=>{const{size:H}=e;if(H)return H;const{size:q}=i;if(q)return q;const{mergedSize:P}=O||{};return P?P.value:"medium"}}),u=qe(()=>e.focusable&&!e.disabled),d=O=>{var H;u.value||O.preventDefault(),!e.nativeFocusBehavior&&(O.preventDefault(),!e.disabled&&u.value&&((H=t.value)===null||H===void 0||H.focus({preventScroll:!0})))},f=O=>{var H;if(!e.disabled&&!e.loading){const{onClick:q}=e;q&&cn(q,O),e.text||(H=n.value)===null||H===void 0||H.play()}},g=O=>{switch(O.key){case"Enter":if(!e.keyboard)return;r.value=!1}},v=O=>{switch(O.key){case"Enter":if(!e.keyboard||e.loading){O.preventDefault();return}r.value=!0}},_=()=>{r.value=!1},{inlineThemeDisabled:M,mergedClsPrefixRef:I,mergedRtlRef:k}=Pi(e),w=vr("Button","-button",BIe,GIe,e,I),S=ap("Button",k,I),L=qe(()=>{const O=w.value,{common:{cubicBezierEaseInOut:H,cubicBezierEaseOut:q},self:P}=O,{rippleDuration:B,opacityDisabled:j,fontWeight:$,fontWeightStrong:R}=P,T=s.value,{dashed:x,type:Z,ghost:K,text:re,color:X,round:ie,circle:he,textColor:ae,secondary:de,tertiary:Y,quaternary:te,strong:fe}=e,Re={"font-weight":fe?R:$};let ve={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const be=Z==="tertiary",ue=Z==="default",ce=be?"default":Z;if(re){const He=ae||X;ve={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":He||P[Ht("textColorText",ce)],"--n-text-color-hover":He?tc(He):P[Ht("textColorTextHover",ce)],"--n-text-color-pressed":He?Qm(He):P[Ht("textColorTextPressed",ce)],"--n-text-color-focus":He?tc(He):P[Ht("textColorTextHover",ce)],"--n-text-color-disabled":He||P[Ht("textColorTextDisabled",ce)]}}else if(K||x){const He=ae||X;ve={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":X||P[Ht("rippleColor",ce)],"--n-text-color":He||P[Ht("textColorGhost",ce)],"--n-text-color-hover":He?tc(He):P[Ht("textColorGhostHover",ce)],"--n-text-color-pressed":He?Qm(He):P[Ht("textColorGhostPressed",ce)],"--n-text-color-focus":He?tc(He):P[Ht("textColorGhostHover",ce)],"--n-text-color-disabled":He||P[Ht("textColorGhostDisabled",ce)]}}else if(de){const He=ue?P.textColor:be?P.textColorTertiary:P[Ht("color",ce)],Te=X||He,W=Z!=="default"&&Z!=="tertiary";ve={"--n-color":W?ka(Te,{alpha:Number(P.colorOpacitySecondary)}):P.colorSecondary,"--n-color-hover":W?ka(Te,{alpha:Number(P.colorOpacitySecondaryHover)}):P.colorSecondaryHover,"--n-color-pressed":W?ka(Te,{alpha:Number(P.colorOpacitySecondaryPressed)}):P.colorSecondaryPressed,"--n-color-focus":W?ka(Te,{alpha:Number(P.colorOpacitySecondaryHover)}):P.colorSecondaryHover,"--n-color-disabled":P.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":Te,"--n-text-color-hover":Te,"--n-text-color-pressed":Te,"--n-text-color-focus":Te,"--n-text-color-disabled":Te}}else if(Y||te){const He=ue?P.textColor:be?P.textColorTertiary:P[Ht("color",ce)],Te=X||He;Y?(ve["--n-color"]=P.colorTertiary,ve["--n-color-hover"]=P.colorTertiaryHover,ve["--n-color-pressed"]=P.colorTertiaryPressed,ve["--n-color-focus"]=P.colorSecondaryHover,ve["--n-color-disabled"]=P.colorTertiary):(ve["--n-color"]=P.colorQuaternary,ve["--n-color-hover"]=P.colorQuaternaryHover,ve["--n-color-pressed"]=P.colorQuaternaryPressed,ve["--n-color-focus"]=P.colorQuaternaryHover,ve["--n-color-disabled"]=P.colorQuaternary),ve["--n-ripple-color"]="#0000",ve["--n-text-color"]=Te,ve["--n-text-color-hover"]=Te,ve["--n-text-color-pressed"]=Te,ve["--n-text-color-focus"]=Te,ve["--n-text-color-disabled"]=Te}else ve={"--n-color":X||P[Ht("color",ce)],"--n-color-hover":X?tc(X):P[Ht("colorHover",ce)],"--n-color-pressed":X?Qm(X):P[Ht("colorPressed",ce)],"--n-color-focus":X?tc(X):P[Ht("colorFocus",ce)],"--n-color-disabled":X||P[Ht("colorDisabled",ce)],"--n-ripple-color":X||P[Ht("rippleColor",ce)],"--n-text-color":ae||(X?P.textColorPrimary:be?P.textColorTertiary:P[Ht("textColor",ce)]),"--n-text-color-hover":ae||(X?P.textColorHoverPrimary:P[Ht("textColorHover",ce)]),"--n-text-color-pressed":ae||(X?P.textColorPressedPrimary:P[Ht("textColorPressed",ce)]),"--n-text-color-focus":ae||(X?P.textColorFocusPrimary:P[Ht("textColorFocus",ce)]),"--n-text-color-disabled":ae||(X?P.textColorDisabledPrimary:P[Ht("textColorDisabled",ce)])};let Ee={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};re?Ee={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Ee={"--n-border":P[Ht("border",ce)],"--n-border-hover":P[Ht("borderHover",ce)],"--n-border-pressed":P[Ht("borderPressed",ce)],"--n-border-focus":P[Ht("borderFocus",ce)],"--n-border-disabled":P[Ht("borderDisabled",ce)]};const{[Ht("height",T)]:pe,[Ht("fontSize",T)]:V,[Ht("padding",T)]:ee,[Ht("paddingRound",T)]:se,[Ht("iconSize",T)]:Ce,[Ht("borderRadius",T)]:le,[Ht("iconMargin",T)]:ke,waveOpacity:Pe}=P,xe={"--n-width":he&&!re?pe:"initial","--n-height":re?"initial":pe,"--n-font-size":V,"--n-padding":he||re?"initial":ie?se:ee,"--n-icon-size":Ce,"--n-icon-margin":ke,"--n-border-radius":re?"initial":he||ie?pe:le};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":H,"--n-bezier-ease-out":q,"--n-ripple-duration":B,"--n-opacity-disabled":j,"--n-wave-opacity":Pe},Re),ve),Ee),xe)}),A=M?ta("button",qe(()=>{let O="";const{dashed:H,type:q,ghost:P,text:B,color:j,round:$,circle:R,textColor:T,secondary:x,tertiary:Z,quaternary:K,strong:re}=e;H&&(O+="a"),P&&(O+="b"),B&&(O+="c"),$&&(O+="d"),R&&(O+="e"),x&&(O+="f"),Z&&(O+="g"),K&&(O+="h"),re&&(O+="i"),j&&(O+="j"+JE(j)),T&&(O+="k"+JE(T));const{value:X}=s;return O+="l"+X[0],O+="m"+q[0],O}),L,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:I,mergedFocusable:u,mergedSize:s,showBorder:o,enterPressed:r,rtlEnabled:S,handleMousedown:d,handleKeydown:v,handleBlur:_,handleKeyup:g,handleClick:f,customColorCssVars:qe(()=>{const{color:O}=e;if(!O)return null;const H=tc(O);return{"--n-border-color":O,"--n-border-color-hover":H,"--n-border-color-pressed":Qm(O),"--n-border-color-focus":H,"--n-border-color-disabled":O}}),cssVars:M?void 0:L,themeClass:A==null?void 0:A.themeClass,onRender:A==null?void 0:A.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const r=Ds(this.$slots.default,o=>o&&Se("span",{class:`${e}-button__content`},o));return Se(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,Se(UMe,{width:!0},{default:()=>Ds(this.$slots.icon,o=>(this.loading||this.renderIcon||o)&&Se("span",{class:`${e}-button__icon`,style:{margin:xI(this.$slots.default)?"0":""}},Se(C0,null,{default:()=>this.loading?Se(hw,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):Se("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():o)})))}),this.iconPlacement==="left"&&r,this.text?null:Se(lIe,{ref:"waveElRef",clsPrefix:e}),this.showBorder?Se("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?Se("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),VIe=qIe,zIe={sizeSmall:"14px",sizeMedium:"16px",sizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"},jIe=e=>{const{baseColor:t,inputColorDisabled:n,cardColor:r,modalColor:o,popoverColor:i,textColorDisabled:s,borderColor:u,primaryColor:d,textColor2:f,fontSizeSmall:g,fontSizeMedium:v,fontSizeLarge:_,borderRadiusSmall:M,lineHeight:I}=e;return Object.assign(Object.assign({},zIe),{labelLineHeight:I,fontSizeSmall:g,fontSizeMedium:v,fontSizeLarge:_,borderRadius:M,color:t,colorChecked:d,colorDisabled:n,colorDisabledChecked:n,colorTableHeader:r,colorTableHeaderModal:o,colorTableHeaderPopover:i,checkMarkColor:t,checkMarkColorDisabled:s,checkMarkColorDisabledChecked:s,border:`1px solid ${u}`,borderDisabled:`1px solid ${u}`,borderDisabledChecked:`1px solid ${u}`,borderChecked:`1px solid ${d}`,borderFocus:`1px solid ${d}`,boxShadowFocus:`0 0 0 2px ${ka(d,{alpha:.3})}`,textColor:f,textColorDisabled:s})},WIe={name:"Checkbox",common:na,self:jIe},KIe=WIe,YIe=Se("svg",{viewBox:"0 0 64 64",class:"check-icon"},Se("path",{d:"M50.42,16.76L22.34,39.45l-8.1-11.46c-1.12-1.58-3.3-1.96-4.88-0.84c-1.58,1.12-1.95,3.3-0.84,4.88l10.26,14.51 c0.56,0.79,1.42,1.31,2.38,1.45c0.16,0.02,0.32,0.03,0.48,0.03c0.8,0,1.57-0.27,2.2-0.78l30.99-25.03c1.5-1.21,1.74-3.42,0.52-4.92 C54.13,15.78,51.93,15.55,50.42,16.76z"})),JIe=Se("svg",{viewBox:"0 0 100 100",class:"line-icon"},Se("path",{d:"M80.2,55.5H21.4c-2.8,0-5.1-2.5-5.1-5.5l0,0c0-3,2.3-5.5,5.1-5.5h58.7c2.8,0,5.1,2.5,5.1,5.5l0,0C85.2,53.1,82.9,55.5,80.2,55.5z"})),HP="n-checkbox-group",XIe={min:Number,max:Number,size:String,value:Array,defaultValue:{type:Array,default:null},disabled:{type:Boolean,default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onChange:[Function,Array]},ZIe=it({name:"CheckboxGroup",props:XIe,setup(e){const{mergedClsPrefixRef:t}=Pi(e),n=rp(e),{mergedSizeRef:r,mergedDisabledRef:o}=n,i=Ne(e.defaultValue),s=qe(()=>e.value),u=hd(s,i),d=qe(()=>{var v;return((v=u.value)===null||v===void 0?void 0:v.length)||0}),f=qe(()=>Array.isArray(u.value)?new Set(u.value):new Set);function g(v,_){const{nTriggerFormInput:M,nTriggerFormChange:I}=n,{onChange:k,"onUpdate:value":w,onUpdateValue:S}=e;if(Array.isArray(u.value)){const L=Array.from(u.value),A=L.findIndex(O=>O===_);v?~A||(L.push(_),S&&cn(S,L,{actionType:"check",value:_}),w&&cn(w,L,{actionType:"check",value:_}),M(),I(),i.value=L,k&&cn(k,L)):~A&&(L.splice(A,1),S&&cn(S,L,{actionType:"uncheck",value:_}),w&&cn(w,L,{actionType:"uncheck",value:_}),k&&cn(k,L),i.value=L,M(),I())}else v?(S&&cn(S,[_],{actionType:"check",value:_}),w&&cn(w,[_],{actionType:"check",value:_}),k&&cn(k,[_]),i.value=[_],M(),I()):(S&&cn(S,[],{actionType:"uncheck",value:_}),w&&cn(w,[],{actionType:"uncheck",value:_}),k&&cn(k,[]),i.value=[],M(),I())}return Ao(HP,{checkedCountRef:d,maxRef:Kn(e,"max"),minRef:Kn(e,"min"),valueSetRef:f,disabledRef:o,mergedSizeRef:r,toggleCheckbox:g}),{mergedClsPrefix:t}},render(){return Se("div",{class:`${this.mergedClsPrefix}-checkbox-group`,role:"group"},this.$slots)}}),QIe=Ze([Je("checkbox",` line-height: var(--n-label-line-height); font-size: var(--n-font-size); outline: none; cursor: pointer; display: inline-flex; flex-wrap: nowrap; align-items: flex-start; word-break: break-word; --n-merged-color-table: var(--n-color-table); `,[Ze("&:hover",[Je("checkbox-box",[rt("border",{border:"var(--n-border-checked)"})])]),Ze("&:focus:not(:active)",[Je("checkbox-box",[rt("border",` border: var(--n-border-focus); box-shadow: var(--n-box-shadow-focus); `)])]),mt("inside-table",[Je("checkbox-box",` background-color: var(--n-merged-color-table); `)]),mt("checked",[Je("checkbox-box",` background-color: var(--n-color-checked); `,[Je("checkbox-icon",[Ze(".check-icon",` opacity: 1; transform: scale(1); `)])])]),mt("indeterminate",[Je("checkbox-box",[Je("checkbox-icon",[Ze(".check-icon",` opacity: 0; transform: scale(.5); `),Ze(".line-icon",` opacity: 1; transform: scale(1); `)])])]),mt("checked, indeterminate",[Ze("&:focus:not(:active)",[Je("checkbox-box",[rt("border",` border: var(--n-border-checked); box-shadow: var(--n-box-shadow-focus); `)])]),Je("checkbox-box",` background-color: var(--n-color-checked); border-left: 0; border-top: 0; `,[rt("border",{border:"var(--n-border-checked)"})])]),mt("disabled",{cursor:"not-allowed"},[mt("checked",[Je("checkbox-box",` background-color: var(--n-color-disabled-checked); `,[rt("border",{border:"var(--n-border-disabled-checked)"}),Je("checkbox-icon",[Ze(".check-icon, .line-icon",{fill:"var(--n-check-mark-color-disabled-checked)"})])])]),Je("checkbox-box",` background-color: var(--n-color-disabled); `,[rt("border",{border:"var(--n-border-disabled)"}),Je("checkbox-icon",[Ze(".check-icon, .line-icon",{fill:"var(--n-check-mark-color-disabled)"})])]),rt("label",{color:"var(--n-text-color-disabled)"})]),Je("checkbox-box-wrapper",` position: relative; width: var(--n-size); flex-shrink: 0; flex-grow: 0; user-select: none; -webkit-user-select: none; `),Je("checkbox-box",` position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: var(--n-size); width: var(--n-size); display: inline-block; box-sizing: border-box; border-radius: var(--n-border-radius); background-color: var(--n-color); transition: background-color 0.3s var(--n-bezier); `,[rt("border",` transition: border-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier); border-radius: inherit; position: absolute; left: 0; right: 0; top: 0; bottom: 0; border: var(--n-border); `),Je("checkbox-icon",` display: flex; align-items: center; justify-content: center; position: absolute; left: 1px; right: 1px; top: 1px; bottom: 1px; `,[Ze(".check-icon, .line-icon",` width: 100%; fill: var(--n-check-mark-color); opacity: 0; transform: scale(0.5); transform-origin: center; transition: fill 0.3s var(--n-bezier), transform 0.3s var(--n-bezier), opacity 0.3s var(--n-bezier), border-color 0.3s var(--n-bezier); `),gg({left:"1px",top:"1px"})])]),rt("label",` color: var(--n-text-color); transition: color .3s var(--n-bezier); user-select: none; -webkit-user-select: none; padding: var(--n-label-padding); font-weight: var(--n-label-font-weight); `,[Ze("&:empty",{display:"none"})])]),ime(Je("checkbox",` --n-merged-color-table: var(--n-color-table-modal); `)),sme(Je("checkbox",` --n-merged-color-table: var(--n-color-table-popover); `))]),eCe=Object.assign(Object.assign({},vr.props),{size:String,checked:{type:[Boolean,String,Number],default:void 0},defaultChecked:{type:[Boolean,String,Number],default:!1},value:[String,Number],disabled:{type:Boolean,default:void 0},indeterminate:Boolean,label:String,focusable:{type:Boolean,default:!0},checkedValue:{type:[Boolean,String,Number],default:!0},uncheckedValue:{type:[Boolean,String,Number],default:!1},"onUpdate:checked":[Function,Array],onUpdateChecked:[Function,Array],privateInsideTable:Boolean,onChange:[Function,Array]}),tCe=it({name:"Checkbox",props:eCe,setup(e){const t=Ne(null),{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:o}=Pi(e),i=rp(e,{mergedSize(q){const{size:P}=e;if(P!==void 0)return P;if(d){const{value:B}=d.mergedSizeRef;if(B!==void 0)return B}if(q){const{mergedSize:B}=q;if(B!==void 0)return B.value}return"medium"},mergedDisabled(q){const{disabled:P}=e;if(P!==void 0)return P;if(d){if(d.disabledRef.value)return!0;const{maxRef:{value:B},checkedCountRef:j}=d;if(B!==void 0&&j.value>=B&&!_.value)return!0;const{minRef:{value:$}}=d;if($!==void 0&&j.value<=$&&_.value)return!0}return q?q.disabled.value:!1}}),{mergedDisabledRef:s,mergedSizeRef:u}=i,d=en(HP,null),f=Ne(e.defaultChecked),g=Kn(e,"checked"),v=hd(g,f),_=Zs(()=>{if(d){const q=d.valueSetRef.value;return q&&e.value!==void 0?q.has(e.value):!1}else return v.value===e.checkedValue}),M=vr("Checkbox","-checkbox",QIe,KIe,e,n);function I(q){if(d&&e.value!==void 0)d.toggleCheckbox(!_.value,e.value);else{const{onChange:P,"onUpdate:checked":B,onUpdateChecked:j}=e,{nTriggerFormInput:$,nTriggerFormChange:R}=i,T=_.value?e.uncheckedValue:e.checkedValue;B&&cn(B,T,q),j&&cn(j,T,q),P&&cn(P,T,q),$(),R(),f.value=T}}function k(q){s.value||I(q)}function w(q){if(!s.value)switch(q.key){case" ":case"Enter":I(q)}}function S(q){switch(q.key){case" ":q.preventDefault()}}const L={focus:()=>{var q;(q=t.value)===null||q===void 0||q.focus()},blur:()=>{var q;(q=t.value)===null||q===void 0||q.blur()}},A=ap("Checkbox",o,n),O=qe(()=>{const{value:q}=u,{common:{cubicBezierEaseInOut:P},self:{borderRadius:B,color:j,colorChecked:$,colorDisabled:R,colorTableHeader:T,colorTableHeaderModal:x,colorTableHeaderPopover:Z,checkMarkColor:K,checkMarkColorDisabled:re,border:X,borderFocus:ie,borderDisabled:he,borderChecked:ae,boxShadowFocus:de,textColor:Y,textColorDisabled:te,checkMarkColorDisabledChecked:fe,colorDisabledChecked:Re,borderDisabledChecked:ve,labelPadding:be,labelLineHeight:ue,labelFontWeight:ce,[Ht("fontSize",q)]:Ee,[Ht("size",q)]:pe}}=M.value;return{"--n-label-line-height":ue,"--n-label-font-weight":ce,"--n-size":pe,"--n-bezier":P,"--n-border-radius":B,"--n-border":X,"--n-border-checked":ae,"--n-border-focus":ie,"--n-border-disabled":he,"--n-border-disabled-checked":ve,"--n-box-shadow-focus":de,"--n-color":j,"--n-color-checked":$,"--n-color-table":T,"--n-color-table-modal":x,"--n-color-table-popover":Z,"--n-color-disabled":R,"--n-color-disabled-checked":Re,"--n-text-color":Y,"--n-text-color-disabled":te,"--n-check-mark-color":K,"--n-check-mark-color-disabled":re,"--n-check-mark-color-disabled-checked":fe,"--n-font-size":Ee,"--n-label-padding":be}}),H=r?ta("checkbox",qe(()=>u.value[0]),O,e):void 0;return Object.assign(i,L,{rtlEnabled:A,selfRef:t,mergedClsPrefix:n,mergedDisabled:s,renderedChecked:_,mergedTheme:M,labelId:m3(),handleClick:k,handleKeyUp:w,handleKeyDown:S,cssVars:r?void 0:O,themeClass:H==null?void 0:H.themeClass,onRender:H==null?void 0:H.onRender})},render(){var e;const{$slots:t,renderedChecked:n,mergedDisabled:r,indeterminate:o,privateInsideTable:i,cssVars:s,labelId:u,label:d,mergedClsPrefix:f,focusable:g,handleKeyUp:v,handleKeyDown:_,handleClick:M}=this;return(e=this.onRender)===null||e===void 0||e.call(this),Se("div",{ref:"selfRef",class:[`${f}-checkbox`,this.themeClass,this.rtlEnabled&&`${f}-checkbox--rtl`,n&&`${f}-checkbox--checked`,r&&`${f}-checkbox--disabled`,o&&`${f}-checkbox--indeterminate`,i&&`${f}-checkbox--inside-table`],tabindex:r||!g?void 0:0,role:"checkbox","aria-checked":o?"mixed":n,"aria-labelledby":u,style:s,onKeyup:v,onKeydown:_,onClick:M,onMousedown:()=>{eo("selectstart",window,I=>{I.preventDefault()},{once:!0})}},Se("div",{class:`${f}-checkbox-box-wrapper`}," ",Se("div",{class:`${f}-checkbox-box`},Se(C0,null,{default:()=>this.indeterminate?Se("div",{key:"indeterminate",class:`${f}-checkbox-icon`},JIe):Se("div",{key:"check",class:`${f}-checkbox-icon`},YIe)}),Se("div",{class:`${f}-checkbox-box__border`}))),d!==null||t.default?Se("span",{class:`${f}-checkbox__label`,id:u},t.default?t.default():d):null)}}),nCe={padding:"8px 14px"},rCe=e=>{const{borderRadius:t,boxShadow2:n,baseColor:r}=e;return Object.assign(Object.assign({},nCe),{borderRadius:t,boxShadow:n,color:g0(r,"rgba(0, 0, 0, .85)"),textColor:r})},oCe={name:"Tooltip",common:na,peers:{Popover:xP},self:rCe},qP=oCe,iCe={radioSizeSmall:"14px",radioSizeMedium:"16px",radioSizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"},sCe=e=>{const{borderColor:t,primaryColor:n,baseColor:r,textColorDisabled:o,inputColorDisabled:i,textColor2:s,opacityDisabled:u,borderRadius:d,fontSizeSmall:f,fontSizeMedium:g,fontSizeLarge:v,heightSmall:_,heightMedium:M,heightLarge:I,lineHeight:k}=e;return Object.assign(Object.assign({},iCe),{labelLineHeight:k,buttonHeightSmall:_,buttonHeightMedium:M,buttonHeightLarge:I,fontSizeSmall:f,fontSizeMedium:g,fontSizeLarge:v,boxShadow:`inset 0 0 0 1px ${t}`,boxShadowActive:`inset 0 0 0 1px ${n}`,boxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${ka(n,{alpha:.2})}`,boxShadowHover:`inset 0 0 0 1px ${n}`,boxShadowDisabled:`inset 0 0 0 1px ${t}`,color:r,colorDisabled:i,colorActive:"#0000",textColor:s,textColorDisabled:o,dotColorActive:n,dotColorDisabled:t,buttonBorderColor:t,buttonBorderColorActive:n,buttonBorderColorHover:t,buttonColor:r,buttonColorActive:r,buttonTextColor:s,buttonTextColorActive:n,buttonTextColorHover:n,opacityDisabled:u,buttonBoxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${ka(n,{alpha:.3})}`,buttonBoxShadowHover:"inset 0 0 0 1px #0000",buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:d})},aCe={name:"Radio",common:na,self:sCe},VP=aCe,lCe=Object.assign(Object.assign({},FP),vr.props),zP=it({name:"Tooltip",props:lCe,__popover__:!0,setup(e){const{mergedClsPrefixRef:t}=Pi(e),n=vr("Tooltip","-tooltip",void 0,qP,e,t),r=Ne(null);return Object.assign(Object.assign({},{syncPosition(){r.value.syncPosition()},setShow(i){r.value.setShow(i)}}),{popoverRef:r,mergedTheme:n,popoverThemeOverrides:qe(()=>n.value.self)})},render(){const{mergedTheme:e,internalExtraClass:t}=this;return Se($P,Object.assign(Object.assign({},this.$props),{theme:e.peers.Popover,themeOverrides:e.peerOverrides.Popover,builtinThemeOverrides:this.popoverThemeOverrides,internalExtraClass:t.concat("tooltip"),ref:"popoverRef"}),this.$slots)}}),uCe={name:String,value:{type:[String,Number,Boolean],default:"on"},checked:{type:Boolean,default:void 0},defaultChecked:Boolean,disabled:{type:Boolean,default:void 0},label:String,size:String,onUpdateChecked:[Function,Array],"onUpdate:checked":[Function,Array],checkedValue:{type:Boolean,default:void 0}},jP="n-radio-group";function cCe(e){const t=rp(e,{mergedSize(L){const{size:A}=e;if(A!==void 0)return A;if(s){const{mergedSizeRef:{value:O}}=s;if(O!==void 0)return O}return L?L.mergedSize.value:"medium"},mergedDisabled(L){return!!(e.disabled||s!=null&&s.disabledRef.value||L!=null&&L.disabled.value)}}),{mergedSizeRef:n,mergedDisabledRef:r}=t,o=Ne(null),i=Ne(null),s=en(jP,null),u=Ne(e.defaultChecked),d=Kn(e,"checked"),f=hd(d,u),g=Zs(()=>s?s.valueRef.value===e.value:f.value),v=Zs(()=>{const{name:L}=e;if(L!==void 0)return L;if(s)return s.nameRef.value}),_=Ne(!1);function M(){if(s){const{doUpdateValue:L}=s,{value:A}=e;cn(L,A)}else{const{onUpdateChecked:L,"onUpdate:checked":A}=e,{nTriggerFormInput:O,nTriggerFormChange:H}=t;L&&cn(L,!0),A&&cn(A,!0),O(),H(),u.value=!0}}function I(){r.value||g.value||M()}function k(){I()}function w(){_.value=!1}function S(){_.value=!0}return{mergedClsPrefix:s?s.mergedClsPrefixRef:Pi(e).mergedClsPrefixRef,inputRef:o,labelRef:i,mergedName:v,mergedDisabled:r,uncontrolledChecked:u,renderSafeChecked:g,focus:_,mergedSize:n,handleRadioInputChange:k,handleRadioInputBlur:w,handleRadioInputFocus:S}}const dCe=Je("radio",` line-height: var(--n-label-line-height); outline: none; position: relative; user-select: none; -webkit-user-select: none; display: inline-flex; align-items: flex-start; flex-wrap: nowrap; font-size: var(--n-font-size); word-break: break-word; `,[mt("checked",[rt("dot",` background-color: var(--n-color-active); `)]),rt("dot-wrapper",` position: relative; flex-shrink: 0; flex-grow: 0; width: var(--n-radio-size); `),Je("radio-input",` position: absolute; border: 0; border-radius: inherit; left: 0; right: 0; top: 0; bottom: 0; opacity: 0; z-index: 1; cursor: pointer; `),rt("dot",` position: absolute; top: 50%; left: 0; transform: translateY(-50%); height: var(--n-radio-size); width: var(--n-radio-size); background: var(--n-color); box-shadow: var(--n-box-shadow); border-radius: 50%; transition: background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier); `,[Ze("&::before",` content: ""; opacity: 0; position: absolute; left: 4px; top: 4px; height: calc(100% - 8px); width: calc(100% - 8px); border-radius: 50%; transform: scale(.8); background: var(--n-dot-color-active); transition: opacity .3s var(--n-bezier), background-color .3s var(--n-bezier), transform .3s var(--n-bezier); `),mt("checked",{boxShadow:"var(--n-box-shadow-active)"},[Ze("&::before",` opacity: 1; transform: scale(1); `)])]),rt("label",` color: var(--n-text-color); padding: var(--n-label-padding); font-weight: var(--n-label-font-weight); display: inline-block; transition: color .3s var(--n-bezier); `),gi("disabled",` cursor: pointer; `,[Ze("&:hover",[rt("dot",{boxShadow:"var(--n-box-shadow-hover)"})]),mt("focus",[Ze("&:not(:active)",[rt("dot",{boxShadow:"var(--n-box-shadow-focus)"})])])]),mt("disabled",` cursor: not-allowed; `,[rt("dot",{boxShadow:"var(--n-box-shadow-disabled)",backgroundColor:"var(--n-color-disabled)"},[Ze("&::before",{backgroundColor:"var(--n-dot-color-disabled)"}),mt("checked",` opacity: 1; `)]),rt("label",{color:"var(--n-text-color-disabled)"}),Je("radio-input",` cursor: not-allowed; `)])]),fCe=it({name:"Radio",props:Object.assign(Object.assign({},vr.props),uCe),setup(e){const t=cCe(e),n=vr("Radio","-radio",dCe,VP,e,t.mergedClsPrefix),r=qe(()=>{const{mergedSize:{value:f}}=t,{common:{cubicBezierEaseInOut:g},self:{boxShadow:v,boxShadowActive:_,boxShadowDisabled:M,boxShadowFocus:I,boxShadowHover:k,color:w,colorDisabled:S,colorActive:L,textColor:A,textColorDisabled:O,dotColorActive:H,dotColorDisabled:q,labelPadding:P,labelLineHeight:B,labelFontWeight:j,[Ht("fontSize",f)]:$,[Ht("radioSize",f)]:R}}=n.value;return{"--n-bezier":g,"--n-label-line-height":B,"--n-label-font-weight":j,"--n-box-shadow":v,"--n-box-shadow-active":_,"--n-box-shadow-disabled":M,"--n-box-shadow-focus":I,"--n-box-shadow-hover":k,"--n-color":w,"--n-color-active":L,"--n-color-disabled":S,"--n-dot-color-active":H,"--n-dot-color-disabled":q,"--n-font-size":$,"--n-radio-size":R,"--n-text-color":A,"--n-text-color-disabled":O,"--n-label-padding":P}}),{inlineThemeDisabled:o,mergedClsPrefixRef:i,mergedRtlRef:s}=Pi(e),u=ap("Radio",s,i),d=o?ta("radio",qe(()=>t.mergedSize.value[0]),r,e):void 0;return Object.assign(t,{rtlEnabled:u,cssVars:o?void 0:r,themeClass:d==null?void 0:d.themeClass,onRender:d==null?void 0:d.onRender})},render(){const{$slots:e,mergedClsPrefix:t,onRender:n,label:r}=this;return n==null||n(),Se("label",{class:[`${t}-radio`,this.themeClass,{[`${t}-radio--rtl`]:this.rtlEnabled,[`${t}-radio--disabled`]:this.mergedDisabled,[`${t}-radio--checked`]:this.renderSafeChecked,[`${t}-radio--focus`]:this.focus}],style:this.cssVars},Se("input",{ref:"inputRef",type:"radio",class:`${t}-radio-input`,value:this.value,name:this.mergedName,checked:this.renderSafeChecked,disabled:this.mergedDisabled,onChange:this.handleRadioInputChange,onFocus:this.handleRadioInputFocus,onBlur:this.handleRadioInputBlur}),Se("div",{class:`${t}-radio__dot-wrapper`}," ",Se("div",{class:[`${t}-radio__dot`,this.renderSafeChecked&&`${t}-radio__dot--checked`]})),Ds(e.default,o=>!o&&!r?null:Se("div",{ref:"labelRef",class:`${t}-radio__label`},o||r)))}}),pCe=Je("radio-group",` display: inline-block; font-size: var(--n-font-size); `,[rt("splitor",` display: inline-block; vertical-align: bottom; width: 1px; transition: background-color .3s var(--n-bezier), opacity .3s var(--n-bezier); background: var(--n-button-border-color); `,[mt("checked",{backgroundColor:"var(--n-button-border-color-active)"}),mt("disabled",{opacity:"var(--n-opacity-disabled)"})]),mt("button-group",` white-space: nowrap; height: var(--n-height); line-height: var(--n-height); `,[Je("radio-button",{height:"var(--n-height)",lineHeight:"var(--n-height)"}),rt("splitor",{height:"var(--n-height)"})]),Je("radio-button",` vertical-align: bottom; outline: none; position: relative; user-select: none; -webkit-user-select: none; display: inline-block; box-sizing: border-box; padding-left: 14px; padding-right: 14px; white-space: nowrap; transition: background-color .3s var(--n-bezier), opacity .3s var(--n-bezier), border-color .3s var(--n-bezier), color .3s var(--n-bezier); color: var(--n-button-text-color); border-top: 1px solid var(--n-button-border-color); border-bottom: 1px solid var(--n-button-border-color); `,[Je("radio-input",` pointer-events: none; position: absolute; border: 0; border-radius: inherit; left: 0; right: 0; top: 0; bottom: 0; opacity: 0; z-index: 1; `),rt("state-border",` z-index: 1; pointer-events: none; position: absolute; box-shadow: var(--n-button-box-shadow); transition: box-shadow .3s var(--n-bezier); left: -1px; bottom: -1px; right: -1px; top: -1px; `),Ze("&:first-child",` border-top-left-radius: var(--n-button-border-radius); border-bottom-left-radius: var(--n-button-border-radius); border-left: 1px solid var(--n-button-border-color); `,[rt("state-border",` border-top-left-radius: var(--n-button-border-radius); border-bottom-left-radius: var(--n-button-border-radius); `)]),Ze("&:last-child",` border-top-right-radius: var(--n-button-border-radius); border-bottom-right-radius: var(--n-button-border-radius); border-right: 1px solid var(--n-button-border-color); `,[rt("state-border",` border-top-right-radius: var(--n-button-border-radius); border-bottom-right-radius: var(--n-button-border-radius); `)]),gi("disabled",` cursor: pointer; `,[Ze("&:hover",[rt("state-border",` transition: box-shadow .3s var(--n-bezier); box-shadow: var(--n-button-box-shadow-hover); `),gi("checked",{color:"var(--n-button-text-color-hover)"})]),mt("focus",[Ze("&:not(:active)",[rt("state-border",{boxShadow:"var(--n-button-box-shadow-focus)"})])])]),mt("checked",` background: var(--n-button-color-active); color: var(--n-button-text-color-active); border-color: var(--n-button-border-color-active); `),mt("disabled",` cursor: not-allowed; opacity: var(--n-opacity-disabled); `)])]);function hCe(e,t,n){var r;const o=[];let i=!1;for(let s=0;s{const{value:H}=n,{common:{cubicBezierEaseInOut:q},self:{buttonBorderColor:P,buttonBorderColorActive:B,buttonBorderRadius:j,buttonBoxShadow:$,buttonBoxShadowFocus:R,buttonBoxShadowHover:T,buttonColorActive:x,buttonTextColor:Z,buttonTextColorActive:K,buttonTextColorHover:re,opacityDisabled:X,[Ht("buttonHeight",H)]:ie,[Ht("fontSize",H)]:he}}=v.value;return{"--n-font-size":he,"--n-bezier":q,"--n-button-border-color":P,"--n-button-border-color-active":B,"--n-button-border-radius":j,"--n-button-box-shadow":$,"--n-button-box-shadow-focus":R,"--n-button-box-shadow-hover":T,"--n-button-color-active":x,"--n-button-text-color":Z,"--n-button-text-color-hover":re,"--n-button-text-color-active":K,"--n-height":ie,"--n-opacity-disabled":X}}),O=f?ta("radio-group",qe(()=>n.value[0]),A,e):void 0;return{selfElRef:t,rtlEnabled:L,mergedClsPrefix:d,mergedValue:I,handleFocusout:S,handleFocusin:w,cssVars:f?void 0:A,themeClass:O==null?void 0:O.themeClass,onRender:O==null?void 0:O.onRender}},render(){var e;const{mergedValue:t,mergedClsPrefix:n,handleFocusin:r,handleFocusout:o}=this,{children:i,isButtonGroup:s}=hCe(Jc(Rge(this)),t,n);return(e=this.onRender)===null||e===void 0||e.call(this),Se("div",{onFocusin:r,onFocusout:o,ref:"selfElRef",class:[`${n}-radio-group`,this.rtlEnabled&&`${n}-radio-group--rtl`,this.themeClass,s&&`${n}-radio-group--button-group`],style:this.cssVars},i)}}),WP=Object.assign(Object.assign({},vr.props),{showToolbar:{type:Boolean,default:!0},showToolbarTooltip:Boolean}),KP="n-image";function vCe(){return{toolbarIconColor:"rgba(255, 255, 255, .9)",toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}const yCe={name:"Image",common:na,peers:{Tooltip:qP},self:vCe},_Ce=e=>{const{opacityDisabled:t,heightTiny:n,heightSmall:r,heightMedium:o,heightLarge:i,heightHuge:s,primaryColor:u,fontSize:d}=e;return{fontSize:d,textColor:u,sizeTiny:n,sizeSmall:r,sizeMedium:o,sizeLarge:i,sizeHuge:s,color:u,opacitySpinning:t}},bCe={name:"Spin",common:na,self:_Ce},MCe=bCe,ICe={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabGapSmallLineVertical:"8px",tabGapMediumLineVertical:"8px",tabGapLargeLineVertical:"8px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabPaddingVerticalSmallLine:"6px 12px",tabPaddingVerticalMediumLine:"8px 16px",tabPaddingVerticalLargeLine:"10px 20px",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabGapSmallBarVertical:"8px",tabGapMediumBarVertical:"8px",tabGapLargeBarVertical:"8px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabPaddingVerticalSmallBar:"6px 12px",tabPaddingVerticalMediumBar:"8px 16px",tabPaddingVerticalLargeBar:"10px 20px",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabGapSmallCardVertical:"4px",tabGapMediumCardVertical:"4px",tabGapLargeCardVertical:"4px",tabPaddingSmallCard:"8px 16px",tabPaddingMediumCard:"10px 20px",tabPaddingLargeCard:"12px 24px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabPaddingVerticalLargeSegment:"0 8px",tabPaddingVerticalSmallCard:"8px 12px",tabPaddingVerticalMediumCard:"10px 16px",tabPaddingVerticalLargeCard:"12px 20px",tabPaddingVerticalSmallSegment:"0 4px",tabPaddingVerticalMediumSegment:"0 6px",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",tabGapSmallSegmentVertical:"0",tabGapMediumSegmentVertical:"0",tabGapLargeSegmentVertical:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0",closeSize:"18px",closeIconSize:"14px"},CCe=e=>{const{textColor2:t,primaryColor:n,textColorDisabled:r,closeIconColor:o,closeIconColorHover:i,closeIconColorPressed:s,closeColorHover:u,closeColorPressed:d,tabColor:f,baseColor:g,dividerColor:v,fontWeight:_,textColor1:M,borderRadius:I,fontSize:k,fontWeightStrong:w}=e;return Object.assign(Object.assign({},ICe),{colorSegment:f,tabFontSizeCard:k,tabTextColorLine:M,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:r,tabTextColorSegment:M,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:M,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:r,tabTextColorCard:M,tabTextColorHoverCard:M,tabTextColorActiveCard:n,tabTextColorDisabledCard:r,barColor:n,closeIconColor:o,closeIconColorHover:i,closeIconColorPressed:s,closeColorHover:u,closeColorPressed:d,closeBorderRadius:I,tabColor:f,tabColorSegment:g,tabBorderColor:v,tabFontWeightActive:_,tabFontWeight:_,tabBorderRadius:I,paneTextColor:t,fontWeightStrong:w})},TCe={name:"Tabs",common:na,self:CCe},wCe=TCe,SCe=Se("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se("path",{d:"M6 5C5.75454 5 5.55039 5.17688 5.50806 5.41012L5.5 5.5V14.5C5.5 14.7761 5.72386 15 6 15C6.24546 15 6.44961 14.8231 6.49194 14.5899L6.5 14.5V5.5C6.5 5.22386 6.27614 5 6 5ZM13.8536 5.14645C13.68 4.97288 13.4106 4.9536 13.2157 5.08859L13.1464 5.14645L8.64645 9.64645C8.47288 9.82001 8.4536 10.0894 8.58859 10.2843L8.64645 10.3536L13.1464 14.8536C13.3417 15.0488 13.6583 15.0488 13.8536 14.8536C14.0271 14.68 14.0464 14.4106 13.9114 14.2157L13.8536 14.1464L9.70711 10L13.8536 5.85355C14.0488 5.65829 14.0488 5.34171 13.8536 5.14645Z",fill:"currentColor"})),kCe=Se("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se("path",{d:"M13.5 5C13.7455 5 13.9496 5.17688 13.9919 5.41012L14 5.5V14.5C14 14.7761 13.7761 15 13.5 15C13.2545 15 13.0504 14.8231 13.0081 14.5899L13 14.5V5.5C13 5.22386 13.2239 5 13.5 5ZM5.64645 5.14645C5.82001 4.97288 6.08944 4.9536 6.28431 5.08859L6.35355 5.14645L10.8536 9.64645C11.0271 9.82001 11.0464 10.0894 10.9114 10.2843L10.8536 10.3536L6.35355 14.8536C6.15829 15.0488 5.84171 15.0488 5.64645 14.8536C5.47288 14.68 5.4536 14.4106 5.58859 14.2157L5.64645 14.1464L9.79289 10L5.64645 5.85355C5.45118 5.65829 5.45118 5.34171 5.64645 5.14645Z",fill:"currentColor"})),DCe=Se("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Se("path",{d:"M4.089 4.216l.057-.07a.5.5 0 0 1 .638-.057l.07.057L10 9.293l5.146-5.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 .057.638l-.057.07L10.707 10l5.147 5.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.638.057l-.07-.057L10 10.707l-5.146 5.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1-.057-.638l.057-.07L9.293 10L4.146 4.854a.5.5 0 0 1-.057-.638l.057-.07l-.057.07z",fill:"currentColor"})),ECe=Ze([Ze("body >",[Je("image-container","position: fixed;")]),Je("image-preview-container",` position: fixed; left: 0; right: 0; top: 0; bottom: 0; display: flex; `),Je("image-preview-overlay",` z-index: -1; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, .3); `,[Dy()]),Je("image-preview-toolbar",` z-index: 1; position: absolute; left: 50%; transform: translateX(-50%); border-radius: var(--n-toolbar-border-radius); height: 48px; bottom: 40px; padding: 0 12px; background: var(--n-toolbar-color); box-shadow: var(--n-toolbar-box-shadow); color: var(--n-toolbar-icon-color); transition: color .3s var(--n-bezier); display: flex; align-items: center; `,[Je("base-icon",` padding: 0 8px; font-size: 28px; cursor: pointer; `),Dy()]),Je("image-preview-wrapper",` position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; pointer-events: none; `,[sIe()]),Je("image-preview",` user-select: none; -webkit-user-select: none; pointer-events: all; margin: auto; max-height: calc(100vh - 32px); max-width: calc(100vw - 32px); transition: transform .3s var(--n-bezier); `),Je("image",` display: inline-flex; max-height: 100%; max-width: 100%; `,[gi("preview-disabled",` cursor: pointer; `),Ze("img",` border-radius: inherit; `)])]),ev=32,ACe=it({name:"ImagePreview",props:Object.assign(Object.assign({},WP),{onNext:Function,onPrev:Function,clsPrefix:{type:String,required:!0}}),setup(e){const t=vr("Image","-image",ECe,yCe,e,Kn(e,"clsPrefix"));let n=null;const r=Ne(null),o=Ne(null),i=Ne(void 0),s=Ne(!1),u=Ne(!1),{localeRef:d}=pw("Image");function f(){const{value:V}=o;if(!n||!V)return;const{style:ee}=V,se=n.getBoundingClientRect(),Ce=se.left+se.width/2,le=se.top+se.height/2;ee.transformOrigin=`${Ce}px ${le}px`}function g(V){var ee,se;switch(V.key){case" ":V.preventDefault();break;case"ArrowLeft":(ee=e.onPrev)===null||ee===void 0||ee.call(e);break;case"ArrowRight":(se=e.onNext)===null||se===void 0||se.call(e);break;case"Escape":Re();break}}Bt(s,V=>{V?eo("keydown",document,g):Tr("keydown",document,g)}),yi(()=>{Tr("keydown",document,g)});let v=0,_=0,M=0,I=0,k=0,w=0,S=0,L=0,A=!1;function O(V){const{clientX:ee,clientY:se}=V;M=ee-v,I=se-_,g3(fe)}function H(V){const{mouseUpClientX:ee,mouseUpClientY:se,mouseDownClientX:Ce,mouseDownClientY:le}=V,ke=Ce-ee,Pe=le-se,xe=`vertical${Pe>0?"Top":"Bottom"}`,He=`horizontal${ke>0?"Left":"Right"}`;return{moveVerticalDirection:xe,moveHorizontalDirection:He,deltaHorizontal:ke,deltaVertical:Pe}}function q(V){const{value:ee}=r;if(!ee)return{offsetX:0,offsetY:0};const se=ee.getBoundingClientRect(),{moveVerticalDirection:Ce,moveHorizontalDirection:le,deltaHorizontal:ke,deltaVertical:Pe}=V||{};let xe=0,He=0;return se.width<=window.innerWidth?xe=0:se.left>0?xe=(se.width-window.innerWidth)/2:se.right0?He=(se.height-window.innerHeight)/2:se.bottom.5){const V=x;T-=1,x=Math.max(.5,Math.pow(R,T));const ee=V-x;fe(!1);const se=q();x+=ee,fe(!1),x-=ee,M=se.offsetX,I=se.offsetY,fe()}}function fe(V=!0){var ee;const{value:se}=r;if(!se)return;const{style:Ce}=se,le=No((ee=B==null?void 0:B.previewedImgPropsRef.value)===null||ee===void 0?void 0:ee.style);let ke="";if(typeof le=="string")ke=le+";";else for(const xe in le)ke+=`${hMe(xe)}: ${le[xe]};`;const Pe=`transform-origin: center; transform: translateX(${M}px) translateY(${I}px) rotate(${Z}deg) scale(${x});`;A?Ce.cssText=ke+"cursor: grabbing; transition: none;"+Pe:Ce.cssText=ke+"cursor: grab;"+Pe+(V?"":"transition: none;"),V||se.offsetHeight}function Re(){s.value=!s.value,u.value=!0}function ve(){x=de(),T=Math.ceil(Math.log(x)/Math.log(R)),M=0,I=0,fe()}const be={setPreviewSrc:V=>{i.value=V},setThumbnailEl:V=>{n=V},toggleShow:Re};function ue(V,ee){if(e.showToolbarTooltip){const{value:se}=t;return Se(zP,{to:!1,theme:se.peers.Tooltip,themeOverrides:se.peerOverrides.Tooltip,keepAliveOnHover:!1},{default:()=>d.value[ee],trigger:()=>V})}else return V}const ce=qe(()=>{const{common:{cubicBezierEaseInOut:V},self:{toolbarIconColor:ee,toolbarBorderRadius:se,toolbarBoxShadow:Ce,toolbarColor:le}}=t.value;return{"--n-bezier":V,"--n-toolbar-icon-color":ee,"--n-toolbar-color":le,"--n-toolbar-border-radius":se,"--n-toolbar-box-shadow":Ce}}),{inlineThemeDisabled:Ee}=Pi(),pe=Ee?ta("image-preview",void 0,ce,e):void 0;return Object.assign({previewRef:r,previewWrapperRef:o,previewSrc:i,show:s,appear:v0(),displayed:u,previewedImgProps:B==null?void 0:B.previewedImgPropsRef,handleWheel(V){V.preventDefault()},handlePreviewMousedown:j,handlePreviewDblclick:$,syncTransformOrigin:f,handleAfterLeave:()=>{K(),Z=0,u.value=!1},handleDragStart:V=>{var ee,se;(se=(ee=B==null?void 0:B.previewedImgPropsRef.value)===null||ee===void 0?void 0:ee.onDragstart)===null||se===void 0||se.call(ee,V),V.preventDefault()},zoomIn:Y,zoomOut:te,rotateCounterclockwise:ie,rotateClockwise:he,handleSwitchPrev:re,handleSwitchNext:X,withTooltip:ue,resizeToOrignalImageSize:ve,cssVars:Ee?void 0:ce,themeClass:pe==null?void 0:pe.themeClass,onRender:pe==null?void 0:pe.onRender},be)},render(){var e,t;const{clsPrefix:n}=this;return Se(ft,null,(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e),Se(P3,{show:this.show},{default:()=>{var r;return this.show||this.displayed?((r=this.onRender)===null||r===void 0||r.call(this),Bn(Se("div",{class:[`${n}-image-preview-container`,this.themeClass],style:this.cssVars,onWheel:this.handleWheel},Se(Mo,{name:"fade-in-transition",appear:this.appear},{default:()=>this.show?Se("div",{class:`${n}-image-preview-overlay`,onClick:this.toggleShow}):null}),this.showToolbar?Se(Mo,{name:"fade-in-transition",appear:this.appear},{default:()=>{if(!this.show)return null;const{withTooltip:o}=this;return Se("div",{class:`${n}-image-preview-toolbar`},this.onPrev?Se(ft,null,o(Se(ki,{clsPrefix:n,onClick:this.handleSwitchPrev},{default:()=>SCe}),"tipPrevious"),o(Se(ki,{clsPrefix:n,onClick:this.handleSwitchNext},{default:()=>kCe}),"tipNext")):null,o(Se(ki,{clsPrefix:n,onClick:this.rotateCounterclockwise},{default:()=>Se(RMe,null)}),"tipCounterclockwise"),o(Se(ki,{clsPrefix:n,onClick:this.rotateClockwise},{default:()=>Se(OMe,null)}),"tipClockwise"),o(Se(ki,{clsPrefix:n,onClick:this.resizeToOrignalImageSize},{default:()=>Se(xMe,null)}),"tipOriginalSize"),o(Se(ki,{clsPrefix:n,onClick:this.zoomOut},{default:()=>Se(PMe,null)}),"tipZoomOut"),o(Se(ki,{clsPrefix:n,onClick:this.zoomIn},{default:()=>Se(NMe,null)}),"tipZoomIn"),o(Se(ki,{clsPrefix:n,onClick:this.toggleShow},{default:()=>DCe}),"tipClose"))}}):null,Se(Mo,{name:"fade-in-scale-up-transition",onAfterLeave:this.handleAfterLeave,appear:this.appear,onEnter:this.syncTransformOrigin,onBeforeLeave:this.syncTransformOrigin},{default:()=>{const{previewedImgProps:o={}}=this;return Bn(Se("div",{class:`${n}-image-preview-wrapper`,ref:"previewWrapperRef"},Se("img",Object.assign({},o,{draggable:!1,onMousedown:this.handlePreviewMousedown,onDblclick:this.handlePreviewDblclick,class:[`${n}-image-preview`,o.class],key:this.previewSrc,src:this.previewSrc,ref:"previewRef",onDragstart:this.handleDragStart}))),[[to,this.show]])}})),[[ew,{enabled:this.show}]])):null}}))}}),LCe="n-image-group",OCe=Object.assign({alt:String,height:[String,Number],imgProps:Object,previewedImgProps:Object,lazy:Boolean,intersectionObserverOptions:Object,objectFit:{type:String,default:"fill"},previewSrc:String,fallbackSrc:String,width:[String,Number],src:String,previewDisabled:Boolean,loadDescription:String,onError:Function,onLoad:Function},WP),RCe=it({name:"Image",props:OCe,inheritAttrs:!1,setup(e){const t=Ne(null),n=Ne(!1),r=Ne(null),o=en(LCe,null),{mergedClsPrefixRef:i}=o||Pi(e),s={click:()=>{if(e.previewDisabled||n.value)return;const f=e.previewSrc||e.src;if(o){o.setPreviewSrc(f),o.setThumbnailEl(t.value),o.toggleShow();return}const{value:g}=r;g&&(g.setPreviewSrc(f),g.setThumbnailEl(t.value),g.toggleShow())}},u=Ne(!e.lazy);Rn(()=>{var f;(f=t.value)===null||f===void 0||f.setAttribute("data-group-id",(o==null?void 0:o.groupId)||"")}),Rn(()=>{if(e.lazy&&e.intersectionObserverOptions){let f;const g=nn(()=>{f==null||f(),f=void 0,f=PIe(t.value,e.intersectionObserverOptions,u)});yi(()=>{g(),f==null||f()})}}),nn(()=>{var f;e.src,(f=e.imgProps)===null||f===void 0||f.src,n.value=!1});const d=Ne(!1);return Ao(KP,{previewedImgPropsRef:Kn(e,"previewedImgProps")}),Object.assign({mergedClsPrefix:i,groupId:o==null?void 0:o.groupId,previewInstRef:r,imageRef:t,showError:n,shouldStartLoading:u,loaded:d,mergedOnClick:f=>{var g,v;s.click(),(v=(g=e.imgProps)===null||g===void 0?void 0:g.onClick)===null||v===void 0||v.call(g,f)},mergedOnError:f=>{if(!u.value)return;n.value=!0;const{onError:g,imgProps:{onError:v}={}}=e;g==null||g(f),v==null||v(f)},mergedOnLoad:f=>{const{onLoad:g,imgProps:{onLoad:v}={}}=e;g==null||g(f),v==null||v(f),d.value=!0}},s)},render(){var e,t;const{mergedClsPrefix:n,imgProps:r={},loaded:o,$attrs:i,lazy:s}=this,u=(t=(e=this.$slots).placeholder)===null||t===void 0?void 0:t.call(e),d=this.src||r.src,f=Se("img",Object.assign(Object.assign({},r),{ref:"imageRef",width:this.width||r.width,height:this.height||r.height,src:this.showError?this.fallbackSrc:s&&this.intersectionObserverOptions?this.shouldStartLoading?d:void 0:d,alt:this.alt||r.alt,"aria-label":this.alt||r.alt,onClick:this.mergedOnClick,onError:this.mergedOnError,onLoad:this.mergedOnLoad,loading:RIe&&s&&!this.intersectionObserverOptions?"lazy":"eager",style:[r.style||"",u&&!o?{height:"0",width:"0",visibility:"hidden"}:"",{objectFit:this.objectFit}],"data-error":this.showError,"data-preview-src":this.previewSrc||this.src}));return Se("div",Object.assign({},i,{role:"none",class:[i.class,`${n}-image`,(this.previewDisabled||this.showError)&&`${n}-image--preview-disabled`]}),this.groupId?f:Se(ACe,{theme:this.theme,themeOverrides:this.themeOverrides,clsPrefix:n,ref:"previewInstRef",showToolbar:this.showToolbar,showToolbarTooltip:this.showToolbarTooltip},{default:()=>f}),!o&&u)}}),NCe=Object.assign(Object.assign({},vr.props),{trigger:String,xScrollable:Boolean,onScroll:Function,size:Number}),PCe=it({name:"Scrollbar",props:NCe,setup(){const e=Ne(null);return Object.assign(Object.assign({},{scrollTo:(...n)=>{var r;(r=e.value)===null||r===void 0||r.scrollTo(n[0],n[1])},scrollBy:(...n)=>{var r;(r=e.value)===null||r===void 0||r.scrollBy(n[0],n[1])}}),{scrollbarInstRef:e})},render(){return Se(PP,Object.assign({ref:"scrollbarInstRef"},this.$props),this.$slots)}}),xCe=PCe,UCe=Ze([Ze("@keyframes spin-rotate",` from { transform: rotate(0); } to { transform: rotate(360deg); } `),Je("spin-container",{position:"relative"},[Je("spin-body",` position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%); `,[Dy()])]),Je("spin-body",` display: inline-flex; align-items: center; justify-content: center; flex-direction: column; `),Je("spin",` display: inline-flex; height: var(--n-size); width: var(--n-size); font-size: var(--n-size); color: var(--n-color); `,[mt("rotate",` animation: spin-rotate 2s linear infinite; `)]),Je("spin-description",` display: inline-block; font-size: var(--n-font-size); color: var(--n-text-color); transition: color .3s var(--n-bezier); margin-top: 8px; `),Je("spin-content",` opacity: 1; transition: opacity .3s var(--n-bezier); pointer-events: all; `,[mt("spinning",` user-select: none; -webkit-user-select: none; pointer-events: none; opacity: var(--n-opacity-spinning); `)])]),FCe={small:20,medium:18,large:16},$Ce=Object.assign(Object.assign({},vr.props),{description:String,stroke:String,size:{type:[String,Number],default:"medium"},show:{type:Boolean,default:!0},strokeWidth:Number,rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0}}),GCe=it({name:"Spin",props:$Ce,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Pi(e),r=vr("Spin","-spin",UCe,MCe,e,t),o=qe(()=>{const{size:s}=e,{common:{cubicBezierEaseInOut:u},self:d}=r.value,{opacitySpinning:f,color:g,textColor:v}=d,_=typeof s=="number"?Tge(s):d[Ht("size",s)];return{"--n-bezier":u,"--n-opacity-spinning":f,"--n-size":_,"--n-color":g,"--n-text-color":v}}),i=n?ta("spin",qe(()=>{const{size:s}=e;return typeof s=="number"?String(s):s[0]}),o,e):void 0;return{mergedClsPrefix:t,compitableShow:Iy(e,["spinning","show"]),mergedStrokeWidth:qe(()=>{const{strokeWidth:s}=e;if(s!==void 0)return s;const{size:u}=e;return FCe[typeof u=="number"?"medium":u]}),cssVars:n?void 0:o,themeClass:i==null?void 0:i.themeClass,onRender:i==null?void 0:i.onRender}},render(){var e,t;const{$slots:n,mergedClsPrefix:r,description:o}=this,i=n.icon&&this.rotate,s=(o||n.description)&&Se("div",{class:`${r}-spin-description`},o||((e=n.description)===null||e===void 0?void 0:e.call(n))),u=n.icon?Se("div",{class:[`${r}-spin-body`,this.themeClass]},Se("div",{class:[`${r}-spin`,i&&`${r}-spin--rotate`],style:n.default?"":this.cssVars},n.icon()),s):Se("div",{class:[`${r}-spin-body`,this.themeClass]},Se(hw,{clsPrefix:r,style:n.default?"":this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,class:`${r}-spin`}),s);return(t=this.onRender)===null||t===void 0||t.call(this),n.default?Se("div",{class:[`${r}-spin-container`,this.themeClass],style:this.cssVars},Se("div",{class:[`${r}-spin-content`,this.compitableShow&&`${r}-spin-content--spinning`]},n),Se(Mo,{name:"fade-in-transition"},{default:()=>this.compitableShow?u:null})):u}}),gw="n-tabs",YP={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:"if"},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},BCe=it({__TAB_PANE__:!0,name:"TabPane",alias:["TabPanel"],props:YP,setup(e){const t=en(gw,null);return t||v3("tab-pane","`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return Se("div",{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),HCe=Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},Pge(YP,["displayDirective"])),XI=it({__TAB__:!0,inheritAttrs:!1,name:"Tab",props:HCe,setup(e){const{mergedClsPrefixRef:t,valueRef:n,typeRef:r,closableRef:o,tabStyleRef:i,tabChangeIdRef:s,onBeforeLeaveRef:u,triggerRef:d,handleAdd:f,activateTab:g,handleClose:v}=en(gw);return{trigger:d,mergedClosable:qe(()=>{if(e.internalAddable)return!1;const{closable:_}=e;return _===void 0?o.value:_}),style:i,clsPrefix:t,value:n,type:r,handleClose(_){_.stopPropagation(),!e.disabled&&v(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){f();return}const{name:_}=e,M=++s.id;if(_!==n.value){const{value:I}=u;I?Promise.resolve(I(e.name,n.value)).then(k=>{k&&s.id===M&&g(_)}):g(_)}}}},render(){const{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:o,tab:i,value:s,mergedClosable:u,style:d,trigger:f,$slots:{default:g}}=this,v=o??i;return Se("div",{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?Se("div",{class:`${t}-tabs-tab-pad`}):null,Se("div",Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},Lo({class:[`${t}-tabs-tab`,s===n&&`${t}-tabs-tab--active`,r&&`${t}-tabs-tab--disabled`,u&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`],onClick:f==="click"?this.activateTab:void 0,onMouseenter:f==="hover"?this.activateTab:void 0,style:e?void 0:d},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),Se("span",{class:`${t}-tabs-tab__label`},e?Se(ft,null,Se("div",{class:`${t}-tabs-tab__height-placeholder`}," "),Se(ki,{clsPrefix:t},{default:()=>Se(wMe,null)})):g?g():typeof v=="object"?v:xge(v??n)),u&&this.type==="card"?Se(GMe,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),qCe=Je("tabs",` box-sizing: border-box; width: 100%; display: flex; flex-direction: column; transition: background-color .3s var(--n-bezier), border-color .3s var(--n-bezier); `,[mt("segment-type",[Je("tabs-rail",[Ze("&.transition-disabled","color: red;",[Je("tabs-tab",` transition: none; `)])])]),mt("top",[Je("tab-pane",` padding: var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left); `)]),mt("left",[Je("tab-pane",` padding: var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left) var(--n-pane-padding-top); `)]),mt("left, right",` flex-direction: row; `,[Je("tabs-bar",` width: 2px; right: 0; transition: top .2s var(--n-bezier), max-height .2s var(--n-bezier), background-color .3s var(--n-bezier); `),Je("tabs-tab",` padding: var(--n-tab-padding-vertical); `)]),mt("right",` flex-direction: row-reverse; `,[Je("tab-pane",` padding: var(--n-pane-padding-left) var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom); `),Je("tabs-bar",` left: 0; `)]),mt("bottom",` flex-direction: column-reverse; justify-content: flex-end; `,[Je("tab-pane",` padding: var(--n-pane-padding-bottom) var(--n-pane-padding-right) var(--n-pane-padding-top) var(--n-pane-padding-left); `),Je("tabs-bar",` top: 0; `)]),Je("tabs-rail",` padding: 3px; border-radius: var(--n-tab-border-radius); width: 100%; background-color: var(--n-color-segment); transition: background-color .3s var(--n-bezier); display: flex; align-items: center; `,[Je("tabs-tab-wrapper",` flex-basis: 0; flex-grow: 1; display: flex; align-items: center; justify-content: center; `,[Je("tabs-tab",` overflow: hidden; border-radius: var(--n-tab-border-radius); width: 100%; display: flex; align-items: center; justify-content: center; `,[mt("active",` font-weight: var(--n-font-weight-strong); color: var(--n-tab-text-color-active); background-color: var(--n-tab-color-segment); box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .08); `),Ze("&:hover",` color: var(--n-tab-text-color-hover); `)])])]),mt("flex",[Je("tabs-nav",{width:"100%"},[Je("tabs-wrapper",{width:"100%"},[Je("tabs-tab",{marginRight:0})])])]),Je("tabs-nav",` box-sizing: border-box; line-height: 1.5; display: flex; transition: border-color .3s var(--n-bezier); `,[rt("prefix, suffix",` display: flex; align-items: center; `),rt("prefix","padding-right: 16px;"),rt("suffix","padding-left: 16px;")]),mt("top, bottom",[Je("tabs-nav-scroll-wrapper",[Ze("&::before",` top: 0; bottom: 0; left: 0; width: 20px; `),Ze("&::after",` top: 0; bottom: 0; right: 0; width: 20px; `),mt("shadow-start",[Ze("&::before",` box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, .12); `)]),mt("shadow-end",[Ze("&::after",` box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, .12); `)])])]),mt("left, right",[Je("tabs-nav-scroll-wrapper",[Ze("&::before",` top: 0; left: 0; right: 0; height: 20px; `),Ze("&::after",` bottom: 0; left: 0; right: 0; height: 20px; `),mt("shadow-start",[Ze("&::before",` box-shadow: inset 0 10px 8px -8px rgba(0, 0, 0, .12); `)]),mt("shadow-end",[Ze("&::after",` box-shadow: inset 0 -10px 8px -8px rgba(0, 0, 0, .12); `)])])]),Je("tabs-nav-scroll-wrapper",` flex: 1; position: relative; overflow: hidden; `,[Je("tabs-nav-y-scroll",` height: 100%; width: 100%; overflow-y: auto; scrollbar-width: none; `,[Ze("&::-webkit-scrollbar",` width: 0; height: 0; `)]),Ze("&::before, &::after",` transition: box-shadow .3s var(--n-bezier); pointer-events: none; content: ""; position: absolute; z-index: 1; `)]),Je("tabs-nav-scroll-content",` display: flex; position: relative; min-width: 100%; width: fit-content; box-sizing: border-box; `),Je("tabs-wrapper",` display: inline-flex; flex-wrap: nowrap; position: relative; `),Je("tabs-tab-wrapper",` display: flex; flex-wrap: nowrap; flex-shrink: 0; flex-grow: 0; `),Je("tabs-tab",` cursor: pointer; white-space: nowrap; flex-wrap: nowrap; display: inline-flex; align-items: center; color: var(--n-tab-text-color); font-size: var(--n-tab-font-size); background-clip: padding-box; padding: var(--n-tab-padding); transition: box-shadow .3s var(--n-bezier), color .3s var(--n-bezier), background-color .3s var(--n-bezier), border-color .3s var(--n-bezier); `,[mt("disabled",{cursor:"not-allowed"}),rt("close",` margin-left: 6px; transition: background-color .3s var(--n-bezier), color .3s var(--n-bezier); `),rt("label",` display: flex; align-items: center; `)]),Je("tabs-bar",` position: absolute; bottom: 0; height: 2px; border-radius: 1px; background-color: var(--n-bar-color); transition: left .2s var(--n-bezier), max-width .2s var(--n-bezier), background-color .3s var(--n-bezier); `,[Ze("&.transition-disabled",` transition: none; `),mt("disabled",` background-color: var(--n-tab-text-color-disabled) `)]),Je("tabs-pane-wrapper",` position: relative; overflow: hidden; transition: max-height .2s var(--n-bezier); `),Je("tab-pane",` color: var(--n-pane-text-color); width: 100%; transition: color .3s var(--n-bezier), background-color .3s var(--n-bezier), opacity .2s var(--n-bezier); left: 0; right: 0; top: 0; `,[Ze("&.next-transition-leave-active, &.prev-transition-leave-active, &.next-transition-enter-active, &.prev-transition-enter-active",` transition: color .3s var(--n-bezier), background-color .3s var(--n-bezier), transform .2s var(--n-bezier), opacity .2s var(--n-bezier); `),Ze("&.next-transition-leave-active, &.prev-transition-leave-active",` position: absolute; `),Ze("&.next-transition-enter-from, &.prev-transition-leave-to",` transform: translateX(32px); opacity: 0; `),Ze("&.next-transition-leave-to, &.prev-transition-enter-from",` transform: translateX(-32px); opacity: 0; `),Ze("&.next-transition-leave-from, &.next-transition-enter-to, &.prev-transition-leave-from, &.prev-transition-enter-to",` transform: translateX(0); opacity: 1; `)]),Je("tabs-tab-pad",` box-sizing: border-box; width: var(--n-tab-gap); flex-grow: 0; flex-shrink: 0; `),mt("line-type, bar-type",[Je("tabs-tab",` font-weight: var(--n-tab-font-weight); box-sizing: border-box; vertical-align: bottom; `,[Ze("&:hover",{color:"var(--n-tab-text-color-hover)"}),mt("active",` color: var(--n-tab-text-color-active); font-weight: var(--n-tab-font-weight-active); `),mt("disabled",{color:"var(--n-tab-text-color-disabled)"})])]),Je("tabs-nav",[mt("line-type",[mt("top",[rt("prefix, suffix",` border-bottom: 1px solid var(--n-tab-border-color); `),Je("tabs-nav-scroll-content",` border-bottom: 1px solid var(--n-tab-border-color); `),Je("tabs-bar",` bottom: -1px; `)]),mt("left",[rt("prefix, suffix",` border-right: 1px solid var(--n-tab-border-color); `),Je("tabs-nav-scroll-content",` border-right: 1px solid var(--n-tab-border-color); `),Je("tabs-bar",` right: -1px; `)]),mt("right",[rt("prefix, suffix",` border-left: 1px solid var(--n-tab-border-color); `),Je("tabs-nav-scroll-content",` border-left: 1px solid var(--n-tab-border-color); `),Je("tabs-bar",` left: -1px; `)]),mt("bottom",[rt("prefix, suffix",` border-top: 1px solid var(--n-tab-border-color); `),Je("tabs-nav-scroll-content",` border-top: 1px solid var(--n-tab-border-color); `),Je("tabs-bar",` top: -1px; `)]),rt("prefix, suffix",` transition: border-color .3s var(--n-bezier); `),Je("tabs-nav-scroll-content",` transition: border-color .3s var(--n-bezier); `),Je("tabs-bar",` border-radius: 0; `)]),mt("card-type",[rt("prefix, suffix",` transition: border-color .3s var(--n-bezier); border-bottom: 1px solid var(--n-tab-border-color); `),Je("tabs-pad",` flex-grow: 1; transition: border-color .3s var(--n-bezier); border-bottom: 1px solid var(--n-tab-border-color); `),Je("tabs-tab-pad",` transition: border-color .3s var(--n-bezier); `),Je("tabs-tab",` font-weight: var(--n-tab-font-weight); border: 1px solid var(--n-tab-border-color); background-color: var(--n-tab-color); box-sizing: border-box; position: relative; vertical-align: bottom; display: flex; justify-content: space-between; font-size: var(--n-tab-font-size); color: var(--n-tab-text-color); `,[mt("addable",` padding-left: 8px; padding-right: 8px; font-size: 16px; `,[rt("height-placeholder",` width: 0; font-size: var(--n-tab-font-size); `),gi("disabled",[Ze("&:hover",` color: var(--n-tab-text-color-hover); `)])]),mt("closable","padding-right: 8px;"),mt("active",` background-color: #0000; font-weight: var(--n-tab-font-weight-active); color: var(--n-tab-text-color-active); `),mt("disabled","color: var(--n-tab-text-color-disabled);")]),Je("tabs-scroll-padding","border-bottom: 1px solid var(--n-tab-border-color);")]),mt("left, right",[Je("tabs-wrapper",` flex-direction: column; `,[Je("tabs-tab-wrapper",` flex-direction: column; `,[Je("tabs-tab-pad",` height: var(--n-tab-gap-vertical); width: 100%; `)])])]),mt("top",[mt("card-type",[Je("tabs-tab",` border-top-left-radius: var(--n-tab-border-radius); border-top-right-radius: var(--n-tab-border-radius); `,[mt("active",` border-bottom: 1px solid #0000; `)]),Je("tabs-tab-pad",` border-bottom: 1px solid var(--n-tab-border-color); `)])]),mt("left",[mt("card-type",[Je("tabs-tab",` border-top-left-radius: var(--n-tab-border-radius); border-bottom-left-radius: var(--n-tab-border-radius); `,[mt("active",` border-right: 1px solid #0000; `)]),Je("tabs-tab-pad",` border-right: 1px solid var(--n-tab-border-color); `)])]),mt("right",[mt("card-type",[Je("tabs-tab",` border-top-right-radius: var(--n-tab-border-radius); border-bottom-right-radius: var(--n-tab-border-radius); `,[mt("active",` border-left: 1px solid #0000; `)]),Je("tabs-tab-pad",` border-left: 1px solid var(--n-tab-border-color); `)])]),mt("bottom",[mt("card-type",[Je("tabs-tab",` border-bottom-left-radius: var(--n-tab-border-radius); border-bottom-right-radius: var(--n-tab-border-radius); `,[mt("active",` border-top: 1px solid #0000; `)]),Je("tabs-tab-pad",` border-top: 1px solid var(--n-tab-border-color); `)])])])]),VCe=Object.assign(Object.assign({},vr.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),zCe=it({name:"Tabs",props:VCe,setup(e,{slots:t}){var n,r,o,i;const{mergedClsPrefixRef:s,inlineThemeDisabled:u}=Pi(e),d=vr("Tabs","-tabs",qCe,wCe,e,s),f=Ne(null),g=Ne(null),v=Ne(null),_=Ne(null),M=Ne(null),I=Ne(!0),k=Ne(!0),w=Iy(e,["labelSize","size"]),S=Iy(e,["activeName","value"]),L=Ne((r=(n=S.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(i=(o=Jc(t.default())[0])===null||o===void 0?void 0:o.props)===null||i===void 0?void 0:i.name:null),A=hd(S,L),O={id:0},H=qe(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});Bt(A,()=>{O.id=0,j(),$()});function q(){var le;const{value:ke}=A;return ke===null?null:(le=f.value)===null||le===void 0?void 0:le.querySelector(`[data-name="${ke}"]`)}function P(le){if(e.type==="card")return;const{value:ke}=g;if(ke&&le){const Pe=`${s.value}-tabs-bar--disabled`,{barWidth:xe,placement:He}=e;if(le.dataset.disabled==="true"?ke.classList.add(Pe):ke.classList.remove(Pe),["top","bottom"].includes(He)){if(B(["top","maxHeight","height"]),typeof xe=="number"&&le.offsetWidth>=xe){const Te=Math.floor((le.offsetWidth-xe)/2)+le.offsetLeft;ke.style.left=`${Te}px`,ke.style.maxWidth=`${xe}px`}else ke.style.left=`${le.offsetLeft}px`,ke.style.maxWidth=`${le.offsetWidth}px`;ke.style.width="8192px",ke.offsetWidth}else{if(B(["left","maxWidth","width"]),typeof xe=="number"&&le.offsetHeight>=xe){const Te=Math.floor((le.offsetHeight-xe)/2)+le.offsetTop;ke.style.top=`${Te}px`,ke.style.maxHeight=`${xe}px`}else ke.style.top=`${le.offsetTop}px`,ke.style.maxHeight=`${le.offsetHeight}px`;ke.style.height="8192px",ke.offsetHeight}}}function B(le){const{value:ke}=g;if(ke)for(const Pe of le)ke.style[Pe]=""}function j(){if(e.type==="card")return;const le=q();le&&P(le)}function $(le){var ke;const Pe=(ke=M.value)===null||ke===void 0?void 0:ke.$el;if(!Pe)return;const xe=q();if(!xe)return;const{scrollLeft:He,offsetWidth:Te}=Pe,{offsetLeft:W,offsetWidth:ne}=xe;He>W?Pe.scrollTo({top:0,left:W,behavior:"smooth"}):W+ne>He+Te&&Pe.scrollTo({top:0,left:W+ne-Te,behavior:"smooth"})}const R=Ne(null);let T=0,x=null;function Z(le){const ke=R.value;if(ke){T=le.getBoundingClientRect().height;const Pe=`${T}px`,xe=()=>{ke.style.height=Pe,ke.style.maxHeight=Pe};x?(xe(),x(),x=null):x=xe}}function K(le){const ke=R.value;if(ke){const Pe=le.getBoundingClientRect().height,xe=()=>{document.body.offsetHeight,ke.style.maxHeight=`${Pe}px`,ke.style.height=`${Math.max(T,Pe)}px`};x?(x(),x=null,xe()):x=xe}}function re(){const le=R.value;le&&(le.style.maxHeight="",le.style.height="")}const X={value:[]},ie=Ne("next");function he(le){const ke=A.value;let Pe="next";for(const xe of X.value){if(xe===ke)break;if(xe===le){Pe="prev";break}}ie.value=Pe,ae(le)}function ae(le){const{onActiveNameChange:ke,onUpdateValue:Pe,"onUpdate:value":xe}=e;ke&&cn(ke,le),Pe&&cn(Pe,le),xe&&cn(xe,le),L.value=le}function de(le){const{onClose:ke}=e;ke&&cn(ke,le)}function Y(){const{value:le}=g;if(!le)return;const ke="transition-disabled";le.classList.add(ke),j(),le.classList.remove(ke)}let te=0;function fe(le){var ke;if(le.contentRect.width===0&&le.contentRect.height===0||te===le.contentRect.width)return;te=le.contentRect.width;const{type:Pe}=e;(Pe==="line"||Pe==="bar")&&Y(),Pe!=="segment"&&Ee((ke=M.value)===null||ke===void 0?void 0:ke.$el)}const Re=lM(fe,64);Bt([()=>e.justifyContent,()=>e.size],()=>{wr(()=>{const{type:le}=e;(le==="line"||le==="bar")&&Y()})});const ve=Ne(!1);function be(le){var ke;const{target:Pe,contentRect:{width:xe}}=le,He=Pe.parentElement.offsetWidth;if(!ve.value)HeTe.$el.offsetWidth&&(ve.value=!1)}Ee((ke=M.value)===null||ke===void 0?void 0:ke.$el)}const ue=lM(be,64);function ce(){const{onAdd:le}=e;le&&le(),wr(()=>{const ke=q(),{value:Pe}=M;!ke||!Pe||Pe.scrollTo({left:ke.offsetLeft,top:0,behavior:"smooth"})})}function Ee(le){if(!le)return;const{placement:ke}=e;if(ke==="top"||ke==="bottom"){const{scrollLeft:Pe,scrollWidth:xe,offsetWidth:He}=le;I.value=Pe<=0,k.value=Pe+He>=xe}else{const{scrollTop:Pe,scrollHeight:xe,offsetHeight:He}=le;I.value=Pe<=0,k.value=Pe+He>=xe}}const pe=lM(le=>{Ee(le.target)},64);Ao(gw,{triggerRef:Kn(e,"trigger"),tabStyleRef:Kn(e,"tabStyle"),paneClassRef:Kn(e,"paneClass"),paneStyleRef:Kn(e,"paneStyle"),mergedClsPrefixRef:s,typeRef:Kn(e,"type"),closableRef:Kn(e,"closable"),valueRef:A,tabChangeIdRef:O,onBeforeLeaveRef:Kn(e,"onBeforeLeave"),activateTab:he,handleClose:de,handleAdd:ce}),w3(()=>{j(),$()}),nn(()=>{const{value:le}=v;if(!le)return;const{value:ke}=s,Pe=`${ke}-tabs-nav-scroll-wrapper--shadow-start`,xe=`${ke}-tabs-nav-scroll-wrapper--shadow-end`;I.value?le.classList.remove(Pe):le.classList.add(Pe),k.value?le.classList.remove(xe):le.classList.add(xe)});const V=Ne(null);Bt(A,()=>{if(e.type==="segment"){const le=V.value;le&&wr(()=>{le.classList.add("transition-disabled"),le.offsetWidth,le.classList.remove("transition-disabled")})}});const ee={syncBarPosition:()=>{j()}},se=qe(()=>{const{value:le}=w,{type:ke}=e,Pe={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[ke],xe=`${le}${Pe}`,{self:{barColor:He,closeIconColor:Te,closeIconColorHover:W,closeIconColorPressed:ne,tabColor:ye,tabBorderColor:Be,paneTextColor:je,tabFontWeight:ct,tabBorderRadius:Fe,tabFontWeightActive:at,colorSegment:St,fontWeightStrong:vn,tabColorSegment:Cn,closeSize:Tn,closeIconSize:An,closeColorHover:yn,closeColorPressed:nt,closeBorderRadius:bt,[Ht("panePadding",le)]:Pt,[Ht("tabPadding",xe)]:ln,[Ht("tabPaddingVertical",xe)]:tn,[Ht("tabGap",xe)]:wn,[Ht("tabGap",`${xe}Vertical`)]:Vn,[Ht("tabTextColor",ke)]:ze,[Ht("tabTextColorActive",ke)]:kt,[Ht("tabTextColorHover",ke)]:Mt,[Ht("tabTextColorDisabled",ke)]:qt,[Ht("tabFontSize",le)]:Jt},common:{cubicBezierEaseInOut:Mr}}=d.value;return{"--n-bezier":Mr,"--n-color-segment":St,"--n-bar-color":He,"--n-tab-font-size":Jt,"--n-tab-text-color":ze,"--n-tab-text-color-active":kt,"--n-tab-text-color-disabled":qt,"--n-tab-text-color-hover":Mt,"--n-pane-text-color":je,"--n-tab-border-color":Be,"--n-tab-border-radius":Fe,"--n-close-size":Tn,"--n-close-icon-size":An,"--n-close-color-hover":yn,"--n-close-color-pressed":nt,"--n-close-border-radius":bt,"--n-close-icon-color":Te,"--n-close-icon-color-hover":W,"--n-close-icon-color-pressed":ne,"--n-tab-color":ye,"--n-tab-font-weight":ct,"--n-tab-font-weight-active":at,"--n-tab-padding":ln,"--n-tab-padding-vertical":tn,"--n-tab-gap":wn,"--n-tab-gap-vertical":Vn,"--n-pane-padding-left":ih(Pt,"left"),"--n-pane-padding-right":ih(Pt,"right"),"--n-pane-padding-top":ih(Pt,"top"),"--n-pane-padding-bottom":ih(Pt,"bottom"),"--n-font-weight-strong":vn,"--n-tab-color-segment":Cn}}),Ce=u?ta("tabs",qe(()=>`${w.value[0]}${e.type[0]}`),se,e):void 0;return Object.assign({mergedClsPrefix:s,mergedValue:A,renderedNames:new Set,tabsRailElRef:V,tabsPaneWrapperRef:R,tabsElRef:f,barElRef:g,addTabInstRef:_,xScrollInstRef:M,scrollWrapperElRef:v,addTabFixed:ve,tabWrapperStyle:H,handleNavResize:Re,mergedSize:w,handleScroll:pe,handleTabsResize:ue,cssVars:u?void 0:se,themeClass:Ce==null?void 0:Ce.themeClass,animationDirection:ie,renderNameListRef:X,onAnimationBeforeLeave:Z,onAnimationEnter:K,onAnimationAfterEnter:re,onRender:Ce==null?void 0:Ce.onRender},ee)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:o,mergedSize:i,renderNameListRef:s,onRender:u,paneWrapperClass:d,paneWrapperStyle:f,$slots:{default:g,prefix:v,suffix:_}}=this;u==null||u();const M=g?Jc(g()).filter(H=>H.type.__TAB_PANE__===!0):[],I=g?Jc(g()).filter(H=>H.type.__TAB__===!0):[],k=!I.length,w=t==="card",S=t==="segment",L=!w&&!S&&this.justifyContent;s.value=[];const A=()=>{const H=Se("div",{style:this.tabWrapperStyle,class:[`${e}-tabs-wrapper`]},L?null:Se("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}),k?M.map((q,P)=>(s.value.push(q.props.name),pM(Se(XI,Object.assign({},q.props,{internalCreatedByPane:!0,internalLeftPadded:P!==0&&(!L||L==="center"||L==="start"||L==="end")}),q.children?{default:q.children.tab}:void 0)))):I.map((q,P)=>(s.value.push(q.props.name),pM(P!==0&&!L?rL(q):q))),!r&&o&&w?nL(o,(k?M.length:I.length)!==0):null,L?null:Se("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return Se("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},w&&o?Se(dg,{onResize:this.handleTabsResize},{default:()=>H}):H,w?Se("div",{class:`${e}-tabs-pad`}):null,w?null:Se("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},O=S?"top":n;return Se("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${i}-size`,L&&`${e}-tabs--flex`,`${e}-tabs--${O}`],style:this.cssVars},Se("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${O}`,`${e}-tabs-nav`]},Ds(v,H=>H&&Se("div",{class:`${e}-tabs-nav__prefix`},H)),S?Se("div",{class:`${e}-tabs-rail`,ref:"tabsRailElRef"},k?M.map((H,q)=>(s.value.push(H.props.name),Se(XI,Object.assign({},H.props,{internalCreatedByPane:!0,internalLeftPadded:q!==0}),H.children?{default:H.children.tab}:void 0))):I.map((H,q)=>(s.value.push(H.props.name),q===0?H:rL(H)))):Se(dg,{onResize:this.handleNavResize},{default:()=>Se("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes(O)?Se(dve,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:A}):Se("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll},A()))}),r&&o&&w?nL(o,!0):null,Ds(_,H=>H&&Se("div",{class:`${e}-tabs-nav__suffix`},H))),k&&(this.animated&&(O==="top"||O==="bottom")?Se("div",{ref:"tabsPaneWrapperRef",style:f,class:[`${e}-tabs-pane-wrapper`,d]},tL(M,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):tL(M,this.mergedValue,this.renderedNames)))}});function tL(e,t,n,r,o,i,s){const u=[];return e.forEach(d=>{const{name:f,displayDirective:g,"display-directive":v}=d.props,_=I=>g===I||v===I,M=t===f;if(d.key!==void 0&&(d.key=f),M||_("show")||_("show:lazy")&&n.has(f)){n.has(f)||n.add(f);const I=!_("if");u.push(I?Bn(d,[[to,M]]):d)}}),s?Se(cO,{name:`${s}-transition`,onBeforeLeave:r,onEnter:o,onAfterEnter:i},{default:()=>u}):u}function nL(e,t){return Se(XI,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function rL(e){const t=Aa(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function pM(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}const jCe="2.34.4";function WCe({componentPrefix:e="N",components:t=[]}={}){const n=[];function r(i,s,u){i.component(e+s)||i.component(e+s,u)}function o(i){n.includes(i)||(n.push(i),t.forEach(s=>{const{name:u,alias:d}=s;r(i,u,s),d&&d.forEach(f=>{r(i,f,s)})}))}return{version:jCe,componentPrefix:e,install:o}}const JP="%[a-f0-9]{2}",oL=new RegExp("("+JP+")|([^%]+?)","gi"),iL=new RegExp("("+JP+")+","gi");function ZI(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],ZI(n),ZI(r))}function KCe(e){try{return decodeURIComponent(e)}catch{let t=e.match(oL)||[];for(let n=1;ne==null,QCe=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),QI=Symbol("encodeFragmentIdentifier");function eTe(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const o=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[co(t,e),"[",o,"]"].join("")]:[...n,[co(t,e),"[",co(o,e),"]=",co(r,e)].join("")]};case"bracket":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[co(t,e),"[]"].join("")]:[...n,[co(t,e),"[]=",co(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[co(t,e),":list="].join("")]:[...n,[co(t,e),":list=",co(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t=e.arrayFormat==="bracket-separator"?"[]=":"=";return n=>(r,o)=>o===void 0||e.skipNull&&o===null||e.skipEmptyString&&o===""?r:(o=o===null?"":o,r.length===0?[[co(n,e),t,co(o,e)].join("")]:[[r,co(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,co(t,e)]:[...n,[co(t,e),"=",co(r,e)].join("")]}}function tTe(e){let t;switch(e.arrayFormat){case"index":return(n,r,o)=>{if(t=/\[(\d*)]$/.exec(n),n=n.replace(/\[\d*]$/,""),!t){o[n]=r;return}o[n]===void 0&&(o[n]={}),o[n][t[1]]=r};case"bracket":return(n,r,o)=>{if(t=/(\[])$/.exec(n),n=n.replace(/\[]$/,""),!t){o[n]=r;return}if(o[n]===void 0){o[n]=[r];return}o[n]=[...o[n],r]};case"colon-list-separator":return(n,r,o)=>{if(t=/(:list)$/.exec(n),n=n.replace(/:list$/,""),!t){o[n]=r;return}if(o[n]===void 0){o[n]=[r];return}o[n]=[...o[n],r]};case"comma":case"separator":return(n,r,o)=>{const i=typeof r=="string"&&r.includes(e.arrayFormatSeparator),s=typeof r=="string"&&!i&&il(r,e).includes(e.arrayFormatSeparator);r=s?il(r,e):r;const u=i||s?r.split(e.arrayFormatSeparator).map(d=>il(d,e)):r===null?r:il(r,e);o[n]=u};case"bracket-separator":return(n,r,o)=>{const i=/(\[])$/.test(n);if(n=n.replace(/\[]$/,""),!i){o[n]=r&&il(r,e);return}const s=r===null?[]:r.split(e.arrayFormatSeparator).map(u=>il(u,e));if(o[n]===void 0){o[n]=s;return}o[n]=[...o[n],...s]};default:return(n,r,o)=>{if(o[n]===void 0){o[n]=r;return}o[n]=[...[o[n]].flat(),r]}}}function ZP(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function co(e,t){return t.encode?t.strict?QCe(e):encodeURIComponent(e):e}function il(e,t){return t.decode?JCe(e):e}function QP(e){return Array.isArray(e)?e.sort():typeof e=="object"?QP(Object.keys(e)).sort((t,n)=>Number(t)-Number(n)).map(t=>e[t]):e}function e6(e){const t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function nTe(e){let t="";const n=e.indexOf("#");return n!==-1&&(t=e.slice(n)),t}function sL(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function mw(e){e=e6(e);const t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function vw(e,t){t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t},ZP(t.arrayFormatSeparator);const n=tTe(t),r=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return r;for(const o of e.split("&")){if(o==="")continue;const i=t.decode?o.replace(/\+/g," "):o;let[s,u]=XP(i,"=");s===void 0&&(s=i),u=u===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?u:il(u,t),n(il(s,t),u,r)}for(const[o,i]of Object.entries(r))if(typeof i=="object"&&i!==null)for(const[s,u]of Object.entries(i))i[s]=sL(u,t);else r[o]=sL(i,t);return t.sort===!1?r:(t.sort===!0?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((o,i)=>{const s=r[i];return s&&typeof s=="object"&&!Array.isArray(s)?o[i]=QP(s):o[i]=s,o},Object.create(null))}function t6(e,t){if(!e)return"";t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t},ZP(t.arrayFormatSeparator);const n=s=>t.skipNull&&ZCe(e[s])||t.skipEmptyString&&e[s]==="",r=eTe(t),o={};for(const[s,u]of Object.entries(e))n(s)||(o[s]=u);const i=Object.keys(o);return t.sort!==!1&&i.sort(t.sort),i.map(s=>{const u=e[s];return u===void 0?"":u===null?co(s,t):Array.isArray(u)?u.length===0&&t.arrayFormat==="bracket-separator"?co(s,t)+"[]":u.reduce(r(s),[]).join("&"):co(s,t)+"="+co(u,t)}).filter(s=>s.length>0).join("&")}function n6(e,t){var o;t={decode:!0,...t};let[n,r]=XP(e,"#");return n===void 0&&(n=e),{url:((o=n==null?void 0:n.split("?"))==null?void 0:o[0])??"",query:vw(mw(e),t),...t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:il(r,t)}:{}}}function r6(e,t){t={encode:!0,strict:!0,[QI]:!0,...t};const n=e6(e.url).split("?")[0]||"",r=mw(e.url),o={...vw(r,{sort:!1}),...e.query};let i=t6(o,t);i&&(i=`?${i}`);let s=nTe(e.url);if(e.fragmentIdentifier){const u=new URL(n);u.hash=e.fragmentIdentifier,s=t[QI]?u.hash:`#${e.fragmentIdentifier}`}return`${n}${i}${s}`}function o6(e,t,n){n={parseFragmentIdentifier:!0,[QI]:!1,...n};const{url:r,query:o,fragmentIdentifier:i}=n6(e,n);return r6({url:r,query:XCe(o,t),fragmentIdentifier:i},n)}function rTe(e,t,n){const r=Array.isArray(t)?o=>!t.includes(o):(o,i)=>!t(o,i);return o6(e,r,n)}const i6=Object.freeze(Object.defineProperty({__proto__:null,exclude:rTe,extract:mw,parse:vw,parseUrl:n6,pick:o6,stringify:t6,stringifyUrl:r6},Symbol.toStringTag,{value:"Module"})),oTe=WCe({components:[VIe,zCe,BCe,OIe,QMe,RCe,GCe,xCe,$P,zP,tCe,ZIe,fCe,mCe]}),Lg=i6.parse(location.search),T0=i6.parse(location.hash.split("?")[1]),iTe=Lg.Authorization||T0.Authorization||"";sessionStorage.setItem("Authorization",iTe);sessionStorage.setItem("platform",Lg.platform||T0.platform||"");console.log(!1,"false");const yw=Lg.appId||T0.appId||1400799837,s6=Lg.secretKey||T0.secretKey||"37bfb220843e25e78768cadd0dc06756e460e55bd631354930a4149565a1d0c9",xh=Lg.userID,_w=wI.init({SDKAppID:yw});_w.use(gpe);_w.login({userID:xh,userSig:p3({SDKAppID:yw,secretKey:s6,userID:xh}).userSig});J7(bge).use(oTe).use(Ige).use(_w).mount("#app");