koishi-plugin-chat-patch 5.0.0 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/web/dist/assets/AppIcon-DIku6-h0.png +0 -0
- package/client/web/dist/assets/AppIconDark-BYymN71t.png +0 -0
- package/client/web/dist/assets/CapacitorAppIcon-CSZwNhvi.png +0 -0
- package/client/web/dist/assets/CapacitorAppIconDark-BMvMOzsg.png +0 -0
- package/client/web/dist/assets/Chat-CTdyeaX2.css +1 -0
- package/client/web/dist/assets/Chat-DkZvD7d8.js +28 -0
- package/client/web/dist/assets/MealHungryPan-Beos3lRI.js +1 -0
- package/client/web/dist/assets/MsgBody-aZ4_aija.js +1 -0
- package/client/web/dist/assets/MsgBody.vue_vue_type_script_setup_true_lang-CPZjRLp6.js +67 -0
- package/client/web/dist/assets/NapcatAppIcon-C7VOAkW9.png +0 -0
- package/client/web/dist/assets/Vue-lEhHouxB.png +0 -0
- package/client/web/dist/assets/append_darwin-CqBNU62J.css +1 -0
- package/client/web/dist/assets/append_full_vibrancy-j0D2LM9m.css +1 -0
- package/client/web/dist/assets/append_linux-uhxeBqeC.css +1 -0
- package/client/web/dist/assets/append_linux_vibrancy-COiZq8MS.css +1 -0
- package/client/web/dist/assets/append_napcat-DV8CAyAd.css +1 -0
- package/client/web/dist/assets/append_new-407Lo5_V.css +1 -0
- package/client/web/dist/assets/append_vibrancy-6FHctkOY.css +1 -0
- package/client/web/dist/assets/append_win32-srmD-78y.css +1 -0
- package/client/web/dist/assets/cakes-CxTVKdnK.svg +189 -0
- package/client/web/dist/assets/core-DhEqZVGG.js +1 -0
- package/client/web/dist/assets/event-Cadp6m6J.js +1 -0
- package/client/web/dist/assets/index-CPTXiemn.js +4045 -0
- package/client/web/dist/assets/index-Cg_esKB0.js +1 -0
- package/client/web/dist/assets/index-Cln012sP.css +1 -0
- package/client/web/dist/assets//346/226/271/346/255/243/345/226/265/345/221/234/344/275/223-CJKIKBn3.ttf +0 -0
- package/client/web/dist/assets//346/234/237/345/276/205-C90_OY60.png +0 -0
- package/client/web/dist/bcui/css/color-dark.css +35 -0
- package/client/web/dist/bcui/css/color-light.css +35 -0
- package/client/web/dist/bcui/css/style.css +468 -0
- package/client/web/dist/bcui/js/main.js +193 -0
- package/client/web/dist/css/append-dark.css +13 -0
- package/client/web/dist/css/append-light.css +13 -0
- package/client/web/dist/css/append-napcat-dark.css +14 -0
- package/client/web/dist/css/append-napcat-light.css +14 -0
- package/client/web/dist/favicon.ico +0 -0
- package/client/web/dist/img/icons/icon-for-fuck-apple.png +0 -0
- package/client/web/dist/img/icons/icon-maskable.png +0 -0
- package/client/web/dist/img/icons/icon.png +0 -0
- package/client/web/dist/img/icons/icon.svg +10 -0
- package/client/web/dist/index.html +22 -0
- package/client/web/dist/robots.txt +2 -0
- package/client/web/dist/sw.js +58 -0
- package/package.json +1 -1
- package/readme.md +45 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vue-recycle-scroller__resize-observer[data-v-08cc04ab]{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;pointer-events:none;z-index:-1}.vue-recycle-scroller{position:relative}.vue-recycle-scroller.direction-vertical:not(.page-mode){overflow-y:auto}.vue-recycle-scroller.direction-horizontal:not(.page-mode){overflow-x:auto}.vue-recycle-scroller.grid-mode:not(.page-mode){overflow:auto}.vue-recycle-scroller.direction-horizontal{display:-webkit-box;display:-ms-flexbox;display:flex}.vue-recycle-scroller__slot{-webkit-box-flex:1;-ms-flex:auto 0 0px;flex:auto 0 0}.vue-recycle-scroller__item-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;position:relative}.vue-recycle-scroller.ready .vue-recycle-scroller__item-view{position:absolute;top:0;left:0;will-change:transform}.vue-recycle-scroller.direction-vertical .vue-recycle-scroller__item-wrapper{width:100%}.vue-recycle-scroller.direction-horizontal .vue-recycle-scroller__item-wrapper{height:100%}.vue-recycle-scroller.ready.direction-vertical .vue-recycle-scroller__item-view{width:100%}.vue-recycle-scroller.ready.direction-horizontal .vue-recycle-scroller__item-view{height:100%}.search-view[data-v-3d25f20e]{background:transparent!important;padding:0 20px;margin-bottom:10px}.search-view>input[data-v-3d25f20e]{background:var(--color-card-1);border-radius:7px;padding:0 10px;height:35px;width:100%;border:0}div[name=成员][data-v-3d25f20e]{overflow:hidden}.member-scroller[data-v-3d25f20e]{flex:1;height:calc(100vh - 330px);min-height:210px}.member-item[data-v-3d25f20e]{transition:background .3s;margin:0 20px -10px;align-items:center;border-radius:7px;cursor:pointer;display:flex;padding:10px}.member-item[data-v-3d25f20e]:hover{background:var(--color-card-1)}.member-item>img[data-v-3d25f20e]{border-radius:100%;margin-right:10px;height:30px;width:30px}.member-item>div[data-v-3d25f20e]{overflow:hidden;align-items:center;display:flex;flex:1}.member-item>div>a[data-v-3d25f20e]{color:var(--color-font);white-space:nowrap;text-overflow:ellipsis;max-width:80%;overflow:hidden;cursor:pointer}.member-item>div>svg[data-v-3d25f20e]{color:var(--color-main);margin-left:5px;height:.8rem}.member-item>span[data-v-3d25f20e]{color:var(--color-font-2);transition:all .2s;opacity:1}.member-item.edit:hover>span[data-v-3d25f20e]{transform:translate(-10px);opacity:0}.member-item>svg[data-v-3d25f20e]{color:var(--color-font-2);transition:all .2s;margin-right:-25px;margin-left:10px;width:15px;opacity:0}.member-item>svg[data-v-3d25f20e]:hover{color:var(--color-main)}.member-item.edit:hover>svg[data-v-3d25f20e]{margin-right:5px;display:block;opacity:1}.info-copy[data-v-3d25f20e]{display:flex;align-items:center;gap:8px}.info-copy>span[data-v-3d25f20e]{flex:1;min-width:0}.info-copy>svg[data-v-3d25f20e]{color:var(--color-font-2);cursor:pointer}.info-copy>svg[data-v-3d25f20e]:hover{color:var(--color-main)}.tab-body{overflow:hidden!important;flex-direction:column;display:flex}.tab-body>div{overflow:scroll;flex:1}.tooltip-enter-active[data-v-28512f0d],.tooltip-leave-active[data-v-28512f0d]{transition:opacity .2s,transform .2s;transform-origin:bottom}.tooltip-enter-from[data-v-28512f0d],.tooltip-leave-to[data-v-28512f0d]{opacity:0;transform:translate(-50%,calc(-100% - .8rem)) scale(.5) scaleY(0)}.tooltip-enter-to[data-v-28512f0d],.tooltip-leave-from[data-v-28512f0d]{opacity:1;transform:translate(-50%,calc(-100% - .8rem)) scale(.5) scaleY(1)}.msglist-move[data-v-5a030688]{transition:all .3s}.msglist-enter-active[data-v-5a030688]{transition:all .4s}.msglist-leave-active[data-v-5a030688]{transition:all .2s}.msglist-enter-from[data-v-5a030688]{transform:translate(-50px);opacity:0}.msglist-leave-to[data-v-5a030688]{opacity:0}.msglist-move[data-v-3cdf13e7]{transition:all .3s}.msglist-enter-active[data-v-3cdf13e7]{transition:all .4s}.msglist-leave-active[data-v-3cdf13e7]{transition:all .2s}.msglist-enter-from[data-v-3cdf13e7]{transform:translate(-20px);opacity:0}.msglist-leave-to[data-v-3cdf13e7]{opacity:0}.pan-enter-active[data-v-3cdf13e7],.pan-leave-active[data-v-3cdf13e7]{transition:opacity .3s}.pan-enter-from[data-v-3cdf13e7]{transform:translate(20px);opacity:0}.pan-leave-to[data-v-3cdf13e7]{opacity:0}.more-detail[data-v-3cdf13e7]{position:relative}.more-detail.voice-menu-open[data-v-3cdf13e7]{overflow:visible}.voice-menu-wrap[data-v-3cdf13e7]{position:relative;width:50px;height:50px;margin:0 10px;cursor:pointer;border-radius:7px;background:var(--color-card-1)}.voice-menu-wrap>div[data-v-3cdf13e7]:first-child{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.voice-menu-wrap>div:first-child>svg[data-v-3cdf13e7]{color:var(--color-font-1);margin:15px;height:20px;width:20px}.voice-menu-wrap>div:first-child.active[data-v-3cdf13e7]{background:#f443361f}.voice-menu-wrap>div:first-child.active>svg[data-v-3cdf13e7]{color:#f44336}.voice-menu[data-v-3cdf13e7]{position:absolute;right:0;bottom:56px;z-index:20;min-width:120px;overflow:hidden;border-radius:8px;box-shadow:0 8px 24px #0000002e;background:var(--color-card, #fff)}.voice-menu>div[data-v-3cdf13e7]{padding:8px 14px;cursor:pointer;white-space:nowrap}.voice-menu>div[data-v-3cdf13e7]:hover{background:var(--color-hover-bg, rgba(0, 0, 0, .06))}.voice-pending[data-v-3cdf13e7]{display:flex;align-items:center;justify-content:space-between;height:36px;padding:0 12px;cursor:pointer;border-radius:6px;color:var(--color-main, #3b82f6);background:var(--color-active-bg, rgba(59, 130, 246, .08))}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Cg_esKB0.js","./core-DhEqZVGG.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as zt,w as Ce,u as D,o as V,c as ee,r as Wt,a as fe,e as xe,f as kt,F as ke,g as dt,m as di,h as vo,n as vt,j as In,k as Ii,l as ie,p as he,q as Pt,s as be,v as cn,x as pt,y as po,z as Kn,A as It,B as rn,C as yo,D as xn,E as _i,G as Fn,H as Si,i as $n,I as Ln,b as g,t as Q,J as Cn,K as Qe,T as Ci,L as un,M as at,N as hi,O as mi,P as Zt,Q as ft,R as Le,S as Mi,_ as Rn,U as Ai,V as yt,W as wo,X as Ti,Y as bo,Z as Jn,$ as Ei,a0 as ko,a1 as qt,a2 as gn,a3 as gi,a4 as xi,a5 as Vn,a6 as Fi,a7 as $i,a8 as Wn,a9 as Qn,aa as Io,ab as _o,ac as nn,ad as vn,ae as vi,af as So,ag as Co,ah as Ut,ai as pn,aj as Mo,ak as yn,al as on,am as an,an as sn,ao as Nn,ap as Ao,aq as To,ar as Eo,as as xo,at as Fo,au as pi,av as yi,aw as $o,ax as jt,ay as Lo,az as Ro,aA as wn,aB as Do,aC as Bo,aD as Oo,aE as Uo,aF as zo,aG as No,aH as Po,aI as Ho,aJ as jo}from"./index-CPTXiemn.js";import{_ as _n,a as ln}from"./MsgBody.vue_vue_type_script_setup_true_lang-CPZjRLp6.js";function Yn(n,f,B){if(!B)return f;const r=n==null?void 0:n[B];if(r==null)throw new Error(`Key is ${r} on item (keyField is '${B}')`);return r}function bn(n,f){return n.map((B,r)=>Yn(B,r,f))}function qo(n,f,B){const r=[],e=[];for(let t=0;t<n.length;t++){const l=n[t],u=Yn(l,t,f),w=B(l,t,u);r.push(u),e.push(typeof w=="number"&&w>0?w:null)}return{keys:r,sizes:e}}function Vo(n,f,B){if(!n||n.keys.length!==f.length||n.sizes.length!==f.length)return!1;for(let r=0;r<f.length;r++)if(n.keys[r]!==Yn(f[r],r,B))return!1;return!0}function Wo(n,f,B){if(!Vo(n,f,B))return{};const r={};for(let e=0;e<n.keys.length;e++){const t=n.sizes[e];typeof t=="number"&&t>0&&(r[n.keys[e]]=t)}return r}function Qo(n,f){if(!n.length||f.length<=n.length)return 0;const B=n[0],r=f.indexOf(B);if(r<=0||r+n.length<f.length&&n.length>f.length-r)return 0;for(let e=0;e<n.length;e++)if(f[r+e]!==n[e])return 0;return r}function wi(n,f,B,r,e,t=0){const l=e??"start";if(l==="nearest"){const u=B+r,w=n+f;return n>=B&&w<=u?null:n<B?n+t:w-r+t}return l==="end"?n+f-r+t:l==="center"?n+(f-r)/2+t:n+t}const Go={itemsLimit:1e3};function Li(n){return typeof window<"u"&&n===window}const Ko=(()=>{if(typeof document>"u")return"negative";const n=document.createElement("div"),f=document.createElement("div");n.style.width="4px",n.style.height="1px",n.style.overflow="auto",n.style.direction="rtl",f.style.width="8px",f.style.height="1px",n.appendChild(f),document.body.appendChild(n),n.scrollLeft=-1;const B=n.scrollLeft<0;return document.body.removeChild(n),B?"negative":"default"})();function Yt(n,f,B){return f!=="horizontal"||!B||Li(B)||getComputedStyle(B).direction!=="rtl"?n:Ko==="negative"?-n:n}function Jo(n,f,B){return Yt(n,f,B)}function Pn(n,f,B,r){const e=Jo(B,f,n),t=!!(r!=null&&r.smooth);if(Li(n)){f==="vertical"?n.scrollTo({top:e,behavior:t?"smooth":"auto"}):n.scrollTo({left:e,behavior:t?"smooth":"auto"});return}if(typeof n.scrollTo=="function"){n.scrollTo(f==="vertical"?{top:e,behavior:t?"smooth":"auto"}:{left:e,behavior:t?"smooth":"auto"});return}f==="vertical"?n.scrollTop=e:n.scrollLeft=e}function Yo(n,f,B){return B?f==="vertical"?window.innerHeight:window.innerWidth:f==="vertical"?n.clientHeight:n.clientWidth}const Xo=/auto|scroll/;function Ri(n,f){return n.parentNode===null?f:Ri(n.parentNode,[...f,n])}function Hn(n,f){return getComputedStyle(n,null).getPropertyValue(f)}function Zo(n){return Hn(n,"overflow")+Hn(n,"overflow-y")+Hn(n,"overflow-x")}function ea(n){return Xo.test(Zo(n))}function kn(n){if(!(n instanceof HTMLElement||n instanceof SVGElement))return;const f=Ri(n.parentNode,[]);for(let B=0;B<f.length;B+=1)if(f[B]instanceof Element&&ea(f[B]))return f[B];return document.scrollingElement||document.documentElement}let Gn=!1;function ta(){return Gn}if(typeof window<"u"){Gn=!1;try{const n=Object.defineProperty({},"passive",{get(){Gn=!0}});window.addEventListener("test",null,n)}catch{}}let na=0;function jn(n){const f=n;f._vs_styleStamp++}function ia(n,f,B){const r=n==null?void 0:n[B];if(r==null)throw new Error(`Key is ${r} on item (keyField is '${B}')`);return r}function oa(n,f,B,r,e){const t=he([]),l=he(0),u=he(!1);let w=0,$=0;const i=new Map,a=new Map;let o=!1,d=0,v=0,R=!1,b=null,T=null,K=null,j=0,x=null,q=[],M=null,N=null,y=null,p=!1;const F=new Set,_=he({}),S=Pt(()=>{const P=be(n);return P.items.length>0&&typeof P.items[0]!="object"}),A=Pt(()=>{const P=be(n);if(P.itemSize===null){const W={[-1]:{accumulator:0}},te=P.items,ae=P.sizeField??"size",se=P.minItemSize,le=_.value;let ue=1e4,Ae=0,lt;for(let qe=0,nt=te.length;qe<nt;qe++){const Ve=S.value?qe:ia(te[qe],qe,P.keyField);lt=le[Ve]||te[qe][ae]||se,lt<ue&&(ue=lt),Ae+=lt,W[qe]={accumulator:Ae,size:lt}}return j=ue,W}return[]}),I=Pt(()=>t.value.filter(P=>P.nr.used).sort((P,W)=>P.nr.index-W.nr.index)),L=Pt(()=>{const P=be(n),W=S.value?null:P.keyField;return qo(P.items,W,(te,ae,se)=>P.itemSize!=null?P.itemSize:_.value[se]||(te==null?void 0:te[P.sizeField??"size"])||void 0)});function m(P){const W=be(n);return _.value=Wo(P,W.items,S.value?null:W.keyField),Object.keys(_.value).length>0}function h(P){let W=a.get(P);return W||(W=[],a.set(P,W)),W}function O(P,W,te,ae,se){const le=rn({id:na++,index:W,used:!0,key:ae,type:se}),ue=yo({item:te,position:0,offset:0,nr:le,_vs_styleStamp:0});return P.push(ue),ue}function C(P){const W=h(P);if(W&&W.length){const te=W.pop();return te.nr.used=!0,jn(te),te}}function z(P){const W=P.nr.type;h(W).push(P),P.nr.used=!1,P.position=-9999,jn(P),i.delete(P.nr.key)}function G(){i.clear(),a.clear();for(let P=0,W=t.value.length;P<W;P++){const te=t.value[P];te&&z(te)}}function Y(P){let W=-1;return W=requestAnimationFrame(()=>{F.delete(W),P()}),F.add(W),W}function ne(){for(const P of F)cancelAnimationFrame(P);F.clear()}function X(){b&&(clearTimeout(b),b=null),T&&(clearTimeout(T),T=null),K&&(clearTimeout(K),K=null),N&&(clearTimeout(N),N=null),y&&(clearTimeout(y),y=null)}function H(){var P;(P=e==null?void 0:e.onResize)==null||P.call(e),u.value&&ce(!1)}function re(){M&&!p&&ve();const P=be(n);if(!o){if(o=!0,b)return;const W=()=>Y(()=>{o=!1;const{continuous:te}=ce(!1,!0);te||(T&&clearTimeout(T),T=setTimeout(re,P.updateInterval+100))});W(),P.updateInterval&&(b=setTimeout(()=>{b=null,o&&W()},P.updateInterval))}}function Fe(P,W){var te,ae;u.value&&(P||W.boundingClientRect.width!==0||W.boundingClientRect.height!==0?((te=e==null?void 0:e.onVisible)==null||te.call(e),Y(()=>{ce(!1)})):(ae=e==null?void 0:e.onHidden)==null||ae.call(e))}function Me(){const P=be(f),W=P?kn(P):void 0;return window.document&&(W===window.document.documentElement||W===window.document.body)?window:W||window}function ge(){const P=be(B);return P?be(n).direction==="vertical"?P.scrollHeight:P.scrollWidth:0}function Ie(){const P=be(f);if(!P)return{start:0,end:0};const W=be(n),te=W.direction==="vertical";let ae;if(W.pageMode){const se=P.getBoundingClientRect(),le=te?se.height:se.width;let ue=-(te?se.top:se.left),Ae=te?window.innerHeight:window.innerWidth;ue<0&&(Ae+=ue,ue=0),ue+Ae>le&&(Ae=le-ue),ae={start:ue,end:ue+Ae}}else te?ae={start:P.scrollTop,end:P.scrollTop+P.clientHeight}:ae={start:Yt(P.scrollLeft,W.direction,P),end:Yt(P.scrollLeft,W.direction,P)+P.clientWidth};return ae}function Be(){const P=be(f);if(!P)return{start:0,end:0};if(be(n).direction==="vertical"){const W=Yt(P.scrollLeft,"horizontal",P);return{start:W,end:W+P.clientWidth}}return{start:P.scrollTop,end:P.scrollTop+P.clientHeight}}function Ne(P){const W=be(n);if(W.itemSize!=null)return W.itemSize;const te=A.value[P];return(te==null?void 0:te.size)||Number(W.minItemSize)||0}function Je(P){var W;const te=be(n),ae=te.gridItems||1;return P<=0?0:te.itemSize!=null?Math.floor(P/ae)*te.itemSize:((W=A.value[P-1])==null?void 0:W.accumulator)||0}function et(P){const W=be(n),te=W.items.length,ae=W.gridItems||1;if(!te)return 0;if(W.itemSize!=null){const Ae=Math.floor(P/W.itemSize)*ae;return Math.min(Math.max(Ae,0),te-1)}let se=0,le=te-1,ue=0;for(;se<=le;){const Ae=Math.floor((se+le)/2);Je(Ae)<=P?(ue=Ae,se=Ae+1):le=Ae-1}return ue}function ve(){N&&(clearTimeout(N),N=null),M=null}function Re(){N&&clearTimeout(N),N=setTimeout(()=>{M=null,N=null},150)}function ye(P,W){if(!P.length){ve();return}const te=Math.max(Ie().start-ge(),0),ae=Math.min(et(te),P.length-1),se=P[ae],le=W?se==null?void 0:se[W]:ae;if(le==null){ve();return}const ue=ge()+Je(ae);M={key:le,offset:Ie().start-ue}}function pe(P){if(!M)return!1;const W=be(n),te=P??W.items,ae=S.value?null:W.keyField,se=bn(te,ae).indexOf(M.key);if(se===-1)return ve(),!1;const le=ge()+Je(se)+M.offset,ue=Ie().start;return Math.abs(le-ue)<.5?!1:(p=!0,wt(le),Y(()=>{p=!1}),!0)}function Pe(){be(n).pageMode?Oe():Ue()}function Oe(){x=Me(),x.addEventListener("scroll",re,ta()?{passive:!0}:!1),x.addEventListener("resize",H)}function Ue(){x&&(x.removeEventListener("scroll",re),x.removeEventListener("resize",H),x=null)}function tt(P,W,te,ae,se,le){const ue=Math.ceil(P/W)*te,Ae=Math.max(0,Math.floor(se.start/te)),lt=Math.min(Math.ceil(se.end/te),Math.ceil(P/W)),qe=Math.max(0,Math.floor(le.start/ae)),nt=Math.min(Math.ceil(le.end/ae),W),Ve=[];for(let st=Ae;st<lt;st++){const St=st*W;for(let it=qe;it<nt;it++){const ot=St+it;if(ot>=P)break;Ve.push(ot)}}const we=Ve[0]??0,ze=Ve.at(-1)??-1;return{renderedIndices:Ve,startIndex:we,endIndex:ze+1,visibleStartIndex:we,visibleEndIndex:ze,totalSize:ue}}function He(){const P=be(n);if(!P.gridItems||P.itemSize==null)return!1;const W=be(f);if(!W)return!1;const te=P.itemSecondarySize||P.itemSize,ae=P.direction==="vertical"?W.clientWidth:W.clientHeight;return te*P.gridItems>ae}function ce(P,W=!1){var te,ae;const se=be(n),le=se.itemSize,ue=se.gridItems||1,Ae=se.itemSecondarySize||le,lt=j,qe=se.typeField,nt=S.value?null:se.keyField,Ve=se.items,we=Ve.length,ze=A.value,st=i,St=t.value;let it=null,ot=null,rt,De,Ft,bt,ht;if(!we)rt=De=bt=ht=Ft=0;else if(R)rt=bt=0,De=ht=Math.min(se.prerender,Ve.length),Ft=0;else{const Se=Ie(),Ke=Be();if(W){let Ye=Se.start-d;Ye<0&&(Ye=-Ye);let Bt=Ke.start-v;Bt<0&&(Bt=-Bt);const Kt=le===null&&Ye>=lt||le!==null&&Ye>=le,mt=ue>1&&le!=null&&Bt>=Ae;if(!Kt&&!mt)return{continuous:!0}}d=Se.start,v=Ke.start;const Tt=se.buffer;Se.start-=Tt,Se.end+=Tt,Ke.start-=Tt,Ke.end+=Tt;let Mt=0;const Gt=be(B);Gt&&(Mt=Gt.scrollHeight,Se.start-=Mt);const fn=be(r);if(fn){const Ye=fn.scrollHeight;Se.end+=Ye}if(le===null){let Ye,Bt=0,Kt=we-1,mt=~~(we/2),dn;do dn=mt,Ye=ze[mt].accumulator,Ye<Se.start?Bt=mt:mt<we-1&&ze[mt+1].accumulator>Se.start&&(Kt=mt),mt=~~((Bt+Kt)/2);while(mt!==dn);for(mt<0&&(mt=0),rt=mt,Ft=ze[we-1].accumulator,De=mt;De<we&&ze[De].accumulator<Se.end;De++);for(De===-1?De=Ve.length-1:(De++,De>we&&(De=we)),bt=rt;bt<we&&Mt+ze[bt].accumulator<Se.start;bt++);for(ht=bt;ht<we&&Mt+ze[ht].accumulator<Se.end;ht++);}else if(ue>1){const Ye=tt(we,ue,le,Ae,Se,Ke);it=Ye.renderedIndices,ot=new Set(it),rt=Ye.startIndex,De=Ye.endIndex,bt=Ye.visibleStartIndex,ht=Ye.visibleEndIndex,Ft=Ye.totalSize}else{rt=~~(Se.start/le*ue);const Ye=rt%ue;rt-=Ye,De=Math.ceil(Se.end/le*ue),bt=Math.max(0,Math.floor((Se.start-Mt)/le*ue)),ht=Math.floor((Se.end-Mt)/le*ue),rt<0&&(rt=0),De>we&&(De=we),bt<0&&(bt=0),ht>we&&(ht=we),Ft=Math.ceil(we/ue)*le}}De-rt>Go.itemsLimit&&Ge(),l.value=Ft;let _e;const en=rt<=$&&De>=w;if(!en||P)G();else for(let Se=0,Ke=St.length;Se<Ke;Se++){const Tt=St[Se];if(Tt&&(_e=Tt,_e.nr.used)){const Mt=ot?ot.has(_e.nr.index):_e.nr.index>=rt&&_e.nr.index<De,Gt=le||ze[_e.nr.index]&&ze[_e.nr.index].size;(!Mt||!Gt)&&z(_e)}}let Dt,Nt;const Bn=it??Array.from({length:Math.max(0,De-rt)},(Se,Ke)=>rt+Ke);for(const Se of Bn){if(!(le||ze[Se]&&ze[Se].size))continue;Dt=Ve[Se];const Ke=nt?Dt[nt]:Se;if(Ke==null)throw new Error(`Key is ${Ke} on item (keyField is '${nt}')`);if(_e=st.get(Ke),_e)_e.item!==Dt&&(_e.item=Dt),_e.nr.used||console.warn(`Expected existing view's used flag to be true, got ${_e.nr.used}`);else{if(Nt=Dt[qe],_e=C(Nt),_e){const Tt=_e.nr.index!==Se||_e.nr.key!==Ke;_e.item=Dt,_e.nr.index=Se,_e.nr.key=Ke,_e.nr.type!==Nt&&console.warn("Reused view's type does not match pool's type"),Tt&&jn(_e)}else _e=O(St,Se,Dt,Ke,Nt);st.set(Ke,_e)}le===null?(_e.position=((te=ze[Se-1])==null?void 0:te.accumulator)||0,_e.offset=0):(_e.position=Math.floor(Se/ue)*le,_e.offset=Se%ue*Ae)}return w=rt,$=De,se.emitUpdate&&((ae=e==null?void 0:e.onUpdate)==null||ae.call(e,rt,De,bt,ht)),K&&clearTimeout(K),K=setTimeout(Rt,se.updateInterval+300),{continuous:en}}function Ge(){throw y=setTimeout(()=>{y=null,console.warn("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",be(f)),console.warn("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")}function Ct(){if(He())return!1;const P=t.value.filter(({nr:W})=>W.used);for(let W=1;W<P.length;W++)if(P[W].nr.index!==P[W-1].nr.index+1)return!0;return!1}function Rt(){t.value.sort((P,W)=>P.nr.index-W.nr.index),Ct()&&(ce(!1),K&&clearTimeout(K))}function je(P,W){const te=be(n),ae=be(f);if(!ae)return;const se=Math.max(0,Math.min(P,te.items.length-1)),le=Ie().start,ue=Yo(ae,te.direction,te.pageMode),Ae=Je(se),lt=Ne(se),qe=wi(Ae,lt,le,ue,W==null?void 0:W.align,(W==null?void 0:W.offset)??0);if(qe!=null&&(wt(qe,W),te.gridItems&&te.itemSize!=null)){const nt=be(f);if(!nt)return;const Ve=te.gridItems,we=te.itemSecondarySize||te.itemSize,ze=se%Ve*we,st=te.direction==="vertical"?"horizontal":"vertical",St=st==="horizontal"?Yt(nt.scrollLeft,"horizontal",nt):nt.scrollTop,it=st==="horizontal"?nt.clientWidth:nt.clientHeight,ot=wi(ze,we,St,it,W==null?void 0:W.align,(W==null?void 0:W.offset)??0);ot!=null&&Pn(nt,st,ot,W)}}function wt(P,W){const te=be(n),ae=be(f);if(ae)if(te.pageMode){const se=kn(ae),le=se.getBoundingClientRect(),ue=ae.getBoundingClientRect(),Ae=te.direction==="vertical"?"top":"left",lt=kn(ae)===document.documentElement||kn(ae)===document.body?te.direction==="vertical"?window.scrollY:window.scrollX:Yt(te.direction==="vertical"?se.scrollTop:se.scrollLeft,te.direction,se),qe=ue[Ae]-le[Ae];Pn(se.tagName==="HTML"?window:se,te.direction,P+lt+qe,W)}else Pn(ae,te.direction,P,W)}const $e=be(n);return q=bn($e.items,$e.items.length>0&&typeof $e.items[0]!="object"?null:$e.keyField),$e.cache&&m($e.cache),$e.prerender&&(R=!0,ce(!1)),$e.gridItems&&!$e.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems"),cn(()=>{Pe(),pt(()=>{R=!1,ce(!0),u.value=!0})}),po(()=>{const P=d;typeof P=="number"&&pt(()=>{wt(P)})}),Kn(()=>{X(),ne(),Ue()}),It(()=>be(n).cache,P=>{m(P),ce(!0)}),It(()=>be(n).items,(P,W)=>{const te=be(n),ae=S.value?null:te.keyField,se=bn(P,ae);if(te.shift){const le=W?bn(W,ae):q;Qo(le,se)>0?ye(W??[],ae):ve()}else ve();q=se,pe(P),ce(!0)}),It(()=>be(n).pageMode,()=>{Pe(),ce(!1)}),It(A,()=>{pe()&&Re(),ce(!1)},{deep:!0}),It(()=>be(n).gridItems,()=>{ce(!0)}),It(()=>be(n).itemSecondarySize,()=>{ce(!0)}),{pool:t,visiblePool:I,totalSize:l,ready:u,sizes:A,simpleArray:S,scrollToItem:je,scrollToPosition:wt,getScroll:Ie,findItemIndex:et,getItemOffset:Je,getItemSize:Ne,cacheSnapshot:L,restoreCache:m,updateVisibleItems:ce,handleScroll:re,handleResize:H,handleVisibilityChange:Fe,sortViews:Rt}}const Xn=new WeakMap;function aa(n){return typeof n=="function"?{callback:n,observer:null,intersection:void 0,visible:null}:{callback:n.callback,observer:null,intersection:n.intersection,visible:null}}function bi(n,f){Di(n);const B=aa(f.value);if(Xn.set(n,B),typeof IntersectionObserver>"u"){const r=n.getBoundingClientRect();B.visible=!0,B.callback(!0,{boundingClientRect:r});return}B.observer=new IntersectionObserver(r=>{const e=r[0],t=!!(e!=null&&e.isIntersecting);B.visible!==null&&B.visible===t||(B.visible=t,B.callback(t,e))},B.intersection),B.observer.observe(n)}function Di(n){const f=Xn.get(n);f!=null&&f.observer&&(f.observer.disconnect(),f.observer=null)}const sa={mounted(n,f){bi(n,f)},updated(n,f){f.value!==f.oldValue&&bi(n,f)},unmounted(n){Di(n),Xn.delete(n)}},ra=zt({__name:"ItemView",props:{view:{},itemTag:{}},setup(n){const f=n;return(B,r)=>(V(),xe(Ii(f.itemTag),{class:"vue-recycle-scroller__item-view"},{default:kt(()=>[Wt(B.$slots,"default",{item:f.view.item,index:f.view.nr.index,active:f.view.nr.used})]),_:3}))}}),la=zt({__name:"ResizeObserver",emits:["notify"],setup(n,{emit:f}){const B=f,r=he();let e=null,t=null;function l(){B("notify")}return cn(()=>{var u;const w=(u=r.value)==null?void 0:u.parentElement;if(w){if(typeof ResizeObserver<"u"){e=new ResizeObserver(()=>{l()}),e.observe(w);return}t=()=>l(),window.addEventListener("resize",t)}}),Kn(()=>{e&&(e.disconnect(),e=null),t&&(window.removeEventListener("resize",t),t=null)}),(u,w)=>(V(),ee("div",{ref_key:"el",ref:r,class:"vue-recycle-scroller__resize-observer","aria-hidden":"true"},null,512))}}),ua=(n,f)=>{const B=n.__vccOpts||n;for(const[r,e]of f)B[r]=e;return B},ca=ua(la,[["__scopeId","data-v-08cc04ab"]]),fa=zt({__name:"RecycleScroller",props:{items:{},keyField:{default:"id"},direction:{default:"vertical"},listTag:{default:"div"},itemTag:{default:"div"},itemSize:{default:null},gridItems:{default:void 0},itemSecondarySize:{default:void 0},minItemSize:{default:null},sizeField:{default:"size"},typeField:{default:"type"},buffer:{default:200},pageMode:{type:Boolean,default:!1},shift:{type:Boolean,default:!1},cache:{default:void 0},prerender:{default:0},emitUpdate:{type:Boolean,default:!1},disableTransform:{type:Boolean,default:!1},updateInterval:{default:0},skipHover:{type:Boolean,default:!1},listClass:{default:""},itemClass:{default:""}},emits:["resize","visible","hidden","update","scrollStart","scrollEnd"],setup(n,{expose:f,emit:B}){const r=n,e=B,t=sa,l=he(),u=he(),w=he(),$=he(null),i=oa(r,l,u,w,{onResize:()=>e("resize"),onVisible:()=>e("visible"),onHidden:()=>e("hidden"),onUpdate:(I,L,m,h)=>{e("update",I,L,m,h),m<=0&&e("scrollStart"),h>=r.items.length-1&&e("scrollEnd")}}),{pool:a,visiblePool:o,totalSize:d,ready:v,scrollToItem:R,scrollToPosition:b,getScroll:T,findItemIndex:K,getItemOffset:j,getItemSize:x,cacheSnapshot:q,restoreCache:M,updateVisibleItems:N,handleScroll:y,handleResize:p,handleVisibilityChange:F}=i;function _(I){$.value=I}function S(){$.value=null}const A=Pt(()=>{const I={[r.direction==="vertical"?"minHeight":"minWidth"]:`${d.value}px`};if(r.gridItems&&r.itemSize!=null){const L=(r.itemSecondarySize||r.itemSize)*r.gridItems;I[r.direction==="vertical"?"minWidth":"minHeight"]=`${L}px`}return I});return f({el:l,visiblePool:o,scrollToItem:R,scrollToPosition:b,getScroll:T,findItemIndex:K,getItemOffset:j,getItemSize:x,cacheSnapshot:q,restoreCache:M,updateVisibleItems:N}),(I,L)=>Ce((V(),ee("div",{ref_key:"el",ref:l,class:vt(["vue-recycle-scroller",{"grid-mode":r.gridItems,ready:D(v),"page-mode":r.pageMode,[`direction-${r.direction}`]:!0}]),onScrollPassive:L[0]||(L[0]=(...m)=>D(y)&&D(y)(...m))},[I.$slots.before?(V(),ee("div",{key:0,ref_key:"before",ref:u,class:"vue-recycle-scroller__slot"},[Wt(I.$slots,"before")],512)):fe("",!0),(V(),xe(Ii(r.listTag),{style:In(A.value),class:vt(["vue-recycle-scroller__item-wrapper",r.listClass])},{default:kt(()=>[(V(!0),ee(ke,null,dt(D(a),m=>(V(),xe(ra,di({key:m.nr.id,view:m,"item-tag":r.itemTag,style:D(v)?[r.disableTransform?{[r.direction==="vertical"?"top":"left"]:`${m.position}px`,willChange:"unset"}:{transform:`translate${r.direction==="vertical"?"Y":"X"}(${m.position}px) translate${r.direction==="vertical"?"X":"Y"}(${m.offset}px)`},{width:r.gridItems?`${r.direction==="vertical"&&r.itemSecondarySize||r.itemSize}px`:void 0,height:r.gridItems?`${r.direction==="horizontal"&&r.itemSecondarySize||r.itemSize}px`:void 0,visibility:m.nr.used?"visible":"hidden"}]:null,class:["vue-recycle-scroller__item-view",[r.itemClass,{hover:!r.skipHover&&$.value===m.nr.key}]]},vo(r.skipHover?{}:{mouseenter:()=>{_(m.nr.key)},mouseleave:()=>{S()}})),{default:kt(h=>[Wt(I.$slots,"default",di({ref_for:!0},h))]),_:2},1040,["view","item-tag","style","class"]))),128)),r.items.length===0?Wt(I.$slots,"empty",{key:0}):fe("",!0)]),_:3},8,["style","class"])),I.$slots.after?(V(),ee("div",{key:1,ref_key:"after",ref:w,class:"vue-recycle-scroller__slot"},[Wt(I.$slots,"after")],512)):fe("",!0),ie(ca,{onNotify:D(p)},null,8,["onNotify"])],34)),[[D(t),D(F)]])}}),da={key:0,class:"chat-info-pan"},ha={class:"ss-card chat-info"},ma={key:0},ga={key:1},va={class:"chat-info-base user"},pa=["src"],ya={key:0},wa={class:"info-copy"},ba={class:"info-copy"},ka={class:"info-copy"},Ia={style:{"word-break":"break-all"}},_a={key:1},Sa=["innerHTML"],Ca={class:"tags"},Ma={key:2},Aa={class:"info-copy"},Ta={class:"info-copy"},Ea={class:"info-copy"},xa={style:{"word-break":"break-all"}},Fa={class:"info-copy"},$a=["name"],La={class:"search-view"},Ra={for:"info-member-search",class:"sr-only"},Da=["placeholder"],Ba={class:"member-item edit"},Oa=["src"],Ua=["onClick"],za=["onClick"],Na=["src"],Pa={class:"opt-item"},Ha={for:"info-member-card"},ja={key:0,class:"opt-item"},qa={for:"info-member-title"},Va={class:"opt-item"},Wa={for:"info-member-ban-min"},Qa=zt({name:"ViewInfo",__name:"Info",props:{tags:{},chat:{}},emits:["close"],setup(n,{emit:f}){const B=xn(),r=_i(),e=Fn(),t=Si(),l=n,u=f,{t:w}=$n.global;function $(O){const C=String(O??"");return!C||C==="/img/icons/icon.svg"||C.includes("/img/icons/icon.svg")}function i(){return String(l.chat.show.channel_id||l.chat.show.channelId||l.chat.info.user_info.channel_id||l.chat.info.user_info.channelId||`private:${l.chat.show.id}`)}function a(){return String(l.chat.show.channel_id||l.chat.show.channelId||l.chat.info.group_info.channel_id||l.chat.info.group_info.channelId||`group:${l.chat.show.id}`)}const o=he([]),d=he(""),v=he({}),R=he({});function b(O){return typeof O!="object"||O===null?{}:O}function T(O){return String(b(O).user_id??"")}function K(O){const C=b(O);return String(C.card||C.nickname||C.name||T(O))}function j(O){return String(b(O).avatar??"")}function x(O){return String(b(O).role??"")}const q=he({banMin:0});function M(O,C,z){const G={title:w("提醒"),html:`<span>${w("真的要将 {user} 移出群聊吗",{user:O})}</span>`,button:[{text:w("确定"),fun:()=>{at.send("set_group_kick",{group_id:C,user_id:z},"setGroupKick"),t.popBoxList.shift(),v.value={};const Y={title:w("操作"),html:`<span>${w("正在确认操作……")}</span>`};t.popBoxList.push(Y),hi(1e3).then(()=>(mi(String(e.chatInfo.show.id)),hi(1e3))).then(()=>{mi(String(e.chatInfo.show.id)),t.popBoxList.shift()})}},{text:w("取消"),master:!0,fun:()=>{t.popBoxList.shift()}}]};t.popBoxList.push(G)}function N(O){const C=new ft;Zt.config.globalProperties.$copyText(String(O)).then(()=>{C.add(Le.INFO,w("复制成功"),!0)},()=>{C.add(Le.ERR,w("复制失败"),!0)})}function y(O,C){const z=O.target.value;if(z!==""){const G=parseInt(z);if(G>0){const Y={title:w("操作"),html:`<span>${w("确认禁言?")}</span>`,button:[{text:w("确认"),fun:()=>{var X;const ne=(X=B.jsonMap.ban_mumber)==null?void 0:X.name;ne&&at.send(ne,{group_id:e.chatInfo.show.id,user_id:C.user_id,duration:G*60},"banMumber"),t.popBoxList.shift(),A()}},{text:w("取消"),master:!0,fun:()=>{R.value=JSON.parse(JSON.stringify(C)),t.popBoxList.shift()}}]};t.popBoxList.push(Y)}}}function p(O,C){const z=O.target.value;if(v.value.card!==z){const G={title:w("操作"),html:`<span>${w("确认修改昵称?")}</span>`,button:[{text:w("确认"),fun:()=>{var ne;const Y=(ne=B.jsonMap.set_group_nickname)==null?void 0:ne.name;Y&&at.send(Y,{group_id:e.chatInfo.show.id,user_id:C.user_id,card:z},"updateGroupMemberInfo"),t.popBoxList.shift(),A()}},{text:w("取消"),master:!0,fun:()=>{R.value=JSON.parse(JSON.stringify(C)),t.popBoxList.shift()}}]};t.popBoxList.push(G)}}function F(O,C){const z=O.target.value;if(v.value.card!==z){const G={title:w("操作"),html:`<span>${w("确认修改头衔?")}</span>`,button:[{text:w("确认"),fun:()=>{var ne;const Y=(ne=B.jsonMap.set_group_title)==null?void 0:ne.name;Y&&at.send(Y,{group_id:e.chatInfo.show.id,user_id:C.user_id,special_title:z},"updateGroupMemberInfo"),t.popBoxList.shift(),A()}},{text:w("取消"),master:!0,fun:()=>{R.value=JSON.parse(JSON.stringify(C)),t.popBoxList.shift()}}]};t.popBoxList.push(G)}}function _(O){O<1e10&&(O*=1e3);const C=new Date().getTime(),z=O-C;return z>0?Math.floor(z/1e3/60):0}function S(O){const C=O.target.value;if(C!==""){const z=parseInt(C);isNaN(z)?O.target.value="":z<0&&(O.target.value="0")}}function A(){v.value={},u("close")}function I(O){if(O.user_id!=B.loginInfo.uin){let C=r.userList.find(z=>z.user_id==O.user_id);C||(C={user_id:O.user_id,nickname:w("临时会话"),remark:O.user_id,group_id:O.group_id,group_name:""}),r.baseOnMsgList.set(String(O.user_id),C),pt(()=>{if(C){const z=document.getElementById("user-"+C.user_id);z&&z.click()}})}}function L(O){h(O.role)?(v.value=O,R.value=JSON.parse(JSON.stringify(O)),q.value.banMin=_(O.shut_up_timestamp)):N(O.user_id)}function m(O){O&&(d.value=O.target.value);const C=d.value.trim();if(!C){o.value=[];return}const z=C.toLowerCase(),G=Array.isArray(l.chat.info.group_members)?l.chat.info.group_members:[];o.value=Mi(G).filter(Y=>{const ne=K(Y).toLowerCase(),X=T(Y);return ne.includes(z)||X.includes(C)||X.toLowerCase().includes(z)})}It(()=>l.chat.info.group_members,()=>{d.value.trim()&&m()},{deep:!0});function h(O){return l.chat.info.me_info.role==="owner"||l.chat.info.me_info.role==="admin"&&O!=="owner"}return(O,C)=>{const z=Ln("font-awesome-icon");return n.tags.openChatInfo?(V(),ee("div",da,[g("div",ha,[g("header",null,[n.chat.show.type==="group"?(V(),ee("span",ma,Q(D(w)("群资料")),1)):fe("",!0),n.chat.show.type==="user"?(V(),ee("span",ga,Q(D(w)("好友")),1)):fe("",!0),ie(z,{icon:["fas","xmark"],onClick:A})]),g("div",va,[g("div",null,[g("img",{src:n.chat.show.avatar||"/img/icons/icon.svg",onError:C[0]||(C[0]=(...G)=>D(Cn)&&D(Cn)(...G))},null,40,pa),g("div",null,[g("a",null,Q(n.chat.show.name),1),g("span",null,Q(n.chat.show.id),1)]),g("div",{style:{display:"flex","align-items":"center","justify-content":"center",cursor:"pointer"},onClick:C[1]||(C[1]=G=>N(n.chat.show.id))},[ie(z,{icon:["fas","copy"]})])]),n.chat.show.type==="group"?(V(),ee("div",ya,[g("header",null,[g("span",null,Q(D(w)("群组 ID")),1)]),g("div",wa,[g("span",null,Q(n.chat.show.id),1),ie(z,{icon:["fas","copy"],onClick:C[2]||(C[2]=G=>N(n.chat.show.id))})]),g("header",null,[g("span",null,Q(D(w)("频道 ID")),1)]),g("div",ba,[g("span",null,Q(a()),1),ie(z,{icon:["fas","copy"],onClick:C[3]||(C[3]=G=>N(a()))})]),g("header",null,[g("span",null,Q(D(w)("群头像")),1)]),g("div",ka,[g("span",Ia,Q($(n.chat.show.avatar)?D(w)("无"):n.chat.show.avatar),1),$(n.chat.show.avatar)?fe("",!0):(V(),xe(z,{key:0,icon:["fas","copy"],onClick:C[4]||(C[4]=G=>N(n.chat.show.avatar))}))])])):fe("",!0),n.chat.show.type==="group"?Ce((V(),ee("div",_a,[g("header",null,[g("span",null,Q(D(w)("介绍")),1)]),g("span",{innerHTML:n.chat.info.group_info.gIntro===void 0||n.chat.info.group_info.gIntro===""?D(w)("群主很懒,还没有群介绍哦~"):n.chat.info.group_info.gIntro},null,8,Sa),g("div",Ca,[(V(!0),ee(ke,null,dt(n.chat.info.group_info.tags,G=>(V(),ee("div",{key:G.md},Q(G.tag),1))),128))])],512)),[[Qe,Object.keys(n.chat.info.group_info).length>0]]):n.chat.show.type==="user"?(V(),ee("div",Ma,[g("header",null,[g("span",null,Q(D(w)("用户 ID")),1)]),g("div",Aa,[g("span",null,Q(n.chat.show.id),1),ie(z,{icon:["fas","copy"],onClick:C[5]||(C[5]=G=>N(n.chat.show.id))})]),g("header",null,[g("span",null,Q(D(w)("用户名称")),1)]),g("div",Ta,[g("span",null,Q(n.chat.show.name),1),ie(z,{icon:["fas","copy"],onClick:C[6]||(C[6]=G=>N(n.chat.show.name))})]),g("header",null,[g("span",null,Q(D(w)("用户头像链接")),1)]),g("div",Ea,[g("span",xa,Q($(n.chat.show.avatar)?D(w)("无"):n.chat.show.avatar),1),$(n.chat.show.avatar)?fe("",!0):(V(),xe(z,{key:0,icon:["fas","copy"],onClick:C[7]||(C[7]=G=>N(n.chat.show.avatar))}))]),g("header",null,[g("span",null,Q(D(w)("频道 ID")),1)]),g("div",Fa,[g("span",null,Q(i()),1),ie(z,{icon:["fas","copy"],onClick:C[8]||(C[8]=G=>N(i()))})])])):fe("",!0)]),n.chat.show.type==="group"?(V(),xe(D(Ci),{key:0,class:"chat-info-tab"},{default:kt(()=>[g("div",{name:D(w)("成员")},[g("div",La,[g("label",Ra,Q(D(w)("搜索成员")),1),g("input",{id:"info-member-search",placeholder:D(w)("搜索 ……"),onInput:C[9]||(C[9]=G=>m(G))},null,40,Da)]),ie(D(fa),{class:"member-scroller",items:d.value.trim()?o.value:n.chat.info.group_members,"item-size":60,"key-field":"user_id"},{default:kt(({item:G})=>[g("div",Ba,[g("img",{alt:"nk",loading:"lazy",src:j(G)||"/img/icons/icon.svg"},null,8,Oa),g("div",null,[g("a",{onClick:Y=>I(G)},Q(K(G)),9,Ua),x(G)==="owner"?(V(),xe(z,{key:0,icon:["fas","crown"]})):fe("",!0),x(G)==="admin"?(V(),xe(z,{key:1,icon:["fas","star"]})):fe("",!0)]),g("span",{onClick:Y=>L(G)},Q(T(G)),9,za),h(x(G))?(V(),xe(z,{key:0,icon:["fas","wrench"],onClick:Y=>L(G)},null,8,["onClick"])):(V(),xe(z,{key:1,icon:["fas","copy"],onClick:Y=>N(T(G))},null,8,["onClick"]))])]),_:1},8,["items"])],8,$a)]),_:1})):fe("",!0),g("div",{class:vt("ss-card user-config"+(Object.keys(v.value).length>0?" show":""))},[g("div",null,[g("img",{alt:"nk",src:v.value.avatar||"/img/icons/icon.svg"},null,8,Na),g("div",null,[g("a",null,Q(v.value.card!=""?v.value.card:v.value.nickname),1),g("span",null,Q(v.value.user_id),1)]),ie(z,{style:{"margin-right":"20px"},icon:["fas","copy"],onClick:C[10]||(C[10]=G=>N(v.value.user_id))}),ie(z,{icon:["fas","angle-down"],onClick:C[11]||(C[11]=G=>v.value={})})]),g("div",null,[g("header",null,Q(D(w)("成员信息")),1),g("div",Pa,[ie(z,{icon:["fas","clipboard-list"]}),g("div",null,[g("label",Ha,Q(D(w)("成员昵称")),1),g("span",null,Q(D(w)("啊吧啊吧……")),1)]),Ce(g("input",{id:"info-member-card","onUpdate:modelValue":C[12]||(C[12]=G=>R.value.card=G),style:{width:"50%"},class:"ss-input",type:"text",onChange:C[13]||(C[13]=G=>p(G,v.value))},null,544),[[un,R.value.card]])]),n.chat.info.me_info.role==="owner"?(V(),ee("div",ja,[ie(z,{icon:["fas","clipboard-list"]}),g("div",null,[g("label",qa,Q(D(w)("成员头衔")),1),g("span",null,Q(D(w)("猪咪猪咪")),1)]),Ce(g("input",{id:"info-member-title","onUpdate:modelValue":C[14]||(C[14]=G=>R.value.title=G),style:{width:"50%"},class:"ss-input",type:"text",onChange:C[15]||(C[15]=G=>F(G,v.value))},null,544),[[un,R.value.title]])])):fe("",!0),n.chat.info.me_info.role==="owner"&&v.value.role!="owner"||n.chat.info.me_info.role==="admin"&&v.value.role==="member"?(V(),ee(ke,{key:1},[g("header",null,Q(D(w)("操作")),1),g("div",Va,[ie(z,{icon:["fas","clipboard-list"]}),g("div",null,[g("label",Wa,Q(D(w)("禁言成员")),1),g("span",null,Q(D(w)("要让小猫咪不许说话几分钟呢?")),1)]),Ce(g("input",{id:"info-member-ban-min","onUpdate:modelValue":C[16]||(C[16]=G=>q.value.banMin=G),style:{width:"50%"},class:"ss-input",type:"text",onInput:S,onChange:C[17]||(C[17]=G=>y(G,v.value))},null,544),[[un,q.value.banMin]])]),g("button",{class:"ss-button",onClick:C[18]||(C[18]=G=>M(v.value.nickname,n.chat.show.id,v.value.user_id))},Q(D(w)("移出群聊")),1)],64)):fe("",!0)])],2)])])):fe("",!0)}}}),Ga=Rn(Qa,[["__scopeId","data-v-3d25f20e"]]),Ka=["id"],Ja={key:0,class:"note-recall note-base"},Ya={key:1,class:"note-ban note-base"},Xa={key:1},Za={key:2,class:"note-recall note-base"},es=["innerHTML"],ts={key:4,class:"note-time note-base"},Vt=zt({name:"NoticeBody",__name:"NoticeBody",props:["data","id"],emits:["reedit"],setup(n){const f=$n.global.t,B=xn(),r=Fn(),e=n,t=Ai(),l=he(e.data);function u(i){return B.loginInfo.uin===i}function w(i){const a=r.chatInfo.info.group_members.filter(o=>o.user_id===i);return a.length===1?a[0].card===""||a[0].card==null?a[0].nickname:a[0].card:i}function $(i){const a=Math.floor(i/86400),o=Math.floor(i%86400/3600),d=Math.floor(i%3600/60),v=i%60;let R="";return a>0&&(R+=`${a} ${f("天")} `),o>0&&(R+=`${o} ${f("小时")} `),d>0&&(R+=`${d} ${f("分钟")} `),v>0&&(R+=`${v} ${f("秒")} `),R}return cn(async()=>{var a;let i=null;if(i=await yt.call(void 0,"win:getWindowInfo",!0),l.value.notice_type&&l.value.notice_type.indexOf("recall")>=0)if(r.chatInfo.show.type==="group"){const o=l.value.operator_id;if(r.chatInfo.info.group_members!==void 0){const d=r.chatInfo.info.group_members.filter(v=>v.user_id===Number(o));d.length===1?l.value.name=d[0].card===""||d[0].card==null?d[0].nickname:d[0].card:l.value.name=o}else l.value.name=o}else l.value.name=r.chatInfo.show.name;if(l.value.sub_type==="poke"&&l.value.pokeMe&&l.value==r.messageList[r.messageList.length-1]){let o=document.getElementById("app");yt.isDesktop()&&(o=(a=document.getElementById("notice-"+e.id))==null?void 0:a.getElementsByClassName("space")[0]),wo(o,i)}}),(i,a)=>(V(),ee("div",{id:"notice-"+n.id,class:"note"},[n.data.notice_type&&n.data.notice_type.indexOf("recall")>=0?(V(),ee("div",Ja,[g("a",null,Q(l.value.name),1),g("span",null,Q(D(f)("撤回了一条消息")),1),a[1]||(a[1]=g("div",null,null,-1)),n.data.originMsg?(V(),ee("a",{key:0,onClick:a[0]||(a[0]=o=>i.$emit("reedit",n.data.originMsg))},Q(D(f)("重新编辑")),1)):fe("",!0)])):n.data.notice_type=="group_ban"?(V(),ee("div",Ya,[n.data.sub_type==="ban"?(V(),ee(ke,{key:0},[u(n.data.user_id)?(V(),ee(ke,{key:0},[g("span",null,Q(D(f)("成员类型_admin")),1),g("a",null," "+Q(w(n.data.operator_id))+" ",1),g("span",null,Q(D(f)("禁言了你")),1),g("span",null," "+Q($(n.data.duration)),1)],64)):(V(),ee(ke,{key:1},[g("span",null,Q(D(f)("管理员禁言了")),1),g("a",null," "+Q(w(n.data.user_id))+" ",1),g("span",null,Q($(n.data.duration)),1)],64))],64)):(V(),ee("span",Xa,Q(D(f)("管理员解除了 {name} 的禁言",{name:u(n.data.user_id)?D(f)("你"):w(n.data.user_id)})),1))])):n.data.sub_type==="delete"?(V(),ee("div",Za,[g("span",null,Q(D(f)("这条消息迷失在虚空里了")),1),a[2]||(a[2]=g("div",null,null,-1))])):n.data.sub_type==="poke"?(V(),ee("div",{key:3,class:"note-notify note-base",innerHTML:n.data.str+"<div class='space'</div>"},null,8,es)):n.data.sub_type==="time"&&n.data.time!=null?(V(),ee("div",ts,[g("a",null,Q(Intl.DateTimeFormat(D(t),D(Ti)(new Date(n.data.time*1e3))).format(new Date(n.data.time*1e3))),1)])):fe("",!0)],8,Ka))}}),ns=["src","alt"],is=zt({__name:"CustomFaceTooltip",props:{url:{}},setup(n){return(f,B)=>(V(),ee("img",{src:n.url,alt:f.$t("预览图片加载失败"),class:"custom-face-tooltip"},null,8,ns))}}),os=Rn(is,[["__scopeId","data-v-28512f0d"]]),as={class:"ss-card face-pan"},ss={icon:"fa-solid fa-face-laugh-squint"},rs={class:"system-face-bar"},ls={class:"title"},us={class:"face"},cs={class:"title"},fs={class:"face"},ds={class:"title"},hs={class:"face"},ms={icon:"fa-solid fa-heart"},gs={class:"title"},vs={class:"face"},ps=["src","alt","onClick"],ys={class:"title"},ws={class:"face"},bs={key:0,class:"ss-card"},ks=["src","alt","onClick"],Is={key:0,icon:"fa-solid fa-folder-open"},_s={class:"system-face-bar custom-face-bar"},Ss={class:"title"},Cs={class:"face"},Ms=["src","alt","onClick"],As={class:"title"},Ts={class:"face"},Es={key:0,class:"ss-card"},xs={key:1,class:"ss-card"},Fs=["src","alt","onClick"],$s=zt({__name:"FacePan",emits:["addSpecialMsg","sendMsg"],setup(n,{emit:f}){const{recordList:B,showList:r}=y("recent-emojis-id"),{recordList:e,showList:t}=y("recent-custom-faces-id"),{recordList:l,showList:u}=y("recent-local-faces-id"),w=Pt(()=>{const _=[];for(const S of u.value){const A=v.value.find(I=>I.path===S);A&&_.push(A)}return _}),$=new ft,i=bo(),a=Jn(),o=xn(),d=gi(1),v=gi([]),R=f;i.stickerCache&&i.stickerCache.length==0&&o.jsonMap.roaming_stamp&&K(),yt.isDesktop()&&a.sysConfig.local_emoji_folder&&M();function b(_,S){R("addSpecialMsg",{addText:S,msgObj:_})}function T(_){p(B,_),_<5e3?b({type:"face",id:_},!0):b({type:"text",text:qt.get(_).value},!0)}function K(){i.stickerCache=void 0,o.jsonMap.roaming_stamp.pagerType=="full"?at.send(o.jsonMap.roaming_stamp.name,{count:48},"getRoamingStamp_48"):at.send(o.jsonMap.roaming_stamp.name,{},"getRoamingStamp")}function j(_){const S=_.target;if(S.scrollHeight-S.scrollTop<S.clientHeight+.5&&i.stickerCache&&o.jsonMap.roaming_stamp.pagerType=="full"&&i.stickerCache[i.stickerCache.length-1]!="end"){const A=48+48*d.value;at.send(o.jsonMap.roaming_stamp.name,{count:A},"getRoamingStamp_"+A),d.value++}}function x(_){p(e,_),b({type:"image",file:_,subType:1},!0),a.sysConfig.send_face==!0&&R("sendMsg")}async function q(){const{$t:_}=Zt.config.globalProperties;try{const S=await yt.call(void 0,"sys:selectFolder",!0);S&&(xi.save("local_emoji_folder",S),$.add(Le.INFO,_("已设置本地表情文件夹")),M())}catch{$.add(Le.ERR,_("选择文件夹失败"))}}async function M(){try{const _=a.sysConfig.local_emoji_folder;if(!_){v.value=[];return}const S=await yt.call(void 0,"sys:getLocalEmojis",!0,_);if(S&&Array.isArray(S))if(yt.type==="tauri"){const{convertFileSrc:A}=await Ei(async()=>{const{convertFileSrc:I}=await import("./core-DhEqZVGG.js");return{convertFileSrc:I}},[],import.meta.url);v.value=S.map(I=>({name:I.name,path:I.path,url:A(I.path)}))}else v.value=S.map(A=>({name:A.name,path:A.path,url:A.url}));else v.value=[]}catch{v.value=[]}}async function N(_){try{const S=await yt.call(void 0,"sys:readFileAsBase64",!0,_.path);p(l,_.path),b({type:"image",file:"base64://"+S,subType:1},!0),a.sysConfig.send_face==!0&&R("sendMsg")}catch{const{$t:A}=Zt.config.globalProperties;$.add(Le.ERR,A("添加本地表情失败"))}}function y(_){const S=ko(_,[]),A=Pt(()=>{if(a.sysConfig.record_recent_emoji==="none")return[];if(a.sysConfig.record_recent_emoji==="order")return S.value.slice(0,30);{const I=new Map;for(const L of S.value)I.set(L,(I.get(L)||0)+1);return Array.from(I.entries()).sort((L,m)=>m[1]-L[1]).map(L=>L[0]).slice(0,30)}});return{recordList:S,showList:A}}function p(_,S){if(a.sysConfig.record_recent_emoji==="none")return;let A;switch(a.sysConfig.record_recent_emoji){case"order":A=30;break;case"100times":A=100;break;case"500times":A=500;break;default:throw new Error("Invalid recent emoji record setting")}const I=_.value;if(a.sysConfig.record_recent_emoji==="order"){const L=I.indexOf(S);L!==-1&&I.splice(L,1)}I.unshift(S),I.length>A&&I.pop(),_.value=I}function F(_){return{comp:os,model:void 0,props:{url:_}}}return(_,S)=>{const A=Ln("font-awesome-icon");return V(),ee("div",as,[ie(D(Ci),null,{default:kt(()=>[g("div",ss,[g("div",rs,[D(r).length>0?(V(),ee(ke,{key:0},[g("div",ls,[g("span",null,Q(_.$t("最近使用")),1)]),g("div",us,[(V(!0),ee(ke,null,dt(D(r),I=>(V(),ee("div",{key:I},[ie(_n,{emoji:D(qt).get(I),onClick:L=>T(I)},null,8,["emoji","onClick"])]))),128))])],64)):fe("",!0),g("div",cs,[g("span",null,Q(_.$t("小黄脸表情")),1)]),g("div",fs,[(V(!0),ee(ke,null,dt(D(qt).normalList,I=>(V(),ee("div",{key:I},[ie(_n,{emoji:D(qt).get(I),onClick:L=>T(I)},null,8,["emoji","onClick"])]))),128))]),g("div",ds,[g("span",null,Q(_.$t("emoji 表情")),1)]),g("div",hs,[(V(!0),ee(ke,null,dt(D(qt).emojiList,I=>(V(),ee("div",{key:I},[ie(_n,{emoji:D(qt).get(I),onClick:L=>T(I)},null,8,["emoji","onClick"])]))),128))])])]),g("div",ms,[g("div",{class:"system-face-bar custom-face-bar",onScroll:j},[D(t).length>0?(V(),ee(ke,{key:0},[g("div",gs,[g("span",null,Q(_.$t("最近使用")),1)]),g("div",vs,[(V(!0),ee(ke,null,dt(D(t),(I,L)=>Ce((V(),ee("span",{key:L},[g("img",{loading:"lazy",src:I,alt:"["+_.$t("动画表情")+"]",onClick:m=>x(I)},null,8,ps)])),[[D(gn),F(I)]])),128))])],64)):fe("",!0),g("div",ys,[g("span",null,Q(_.$t("收藏的表情")),1),ie(A,{icon:["fas","fa-rotate-right"],onClick:K})]),g("div",ws,[D(i).stickerCache&&D(i).stickerCache.length<=0?(V(),ee("div",bs,[ie(A,{icon:["fas","face-dizzy"]}),g("span",null,Q(_.$t("一无所有")),1)])):D(i).stickerCache&&D(i).stickerCache.length>0?(V(!0),ee(ke,{key:1},dt(D(i).stickerCache,(I,L)=>(V(),ee("span",{key:"stickers-"+L},[Ce(g("img",{loading:"lazy",src:I,alt:"["+_.$t("动画表情")+"]",onClick:m=>x(I)},null,8,ks),[[Qe,I!="end"],[D(gn),F(I)]])]))),128)):fe("",!0)])],32)]),D(yt).isDesktop()?(V(),ee("div",Is,[g("div",_s,[w.value.length>0?(V(),ee(ke,{key:0},[g("div",Ss,[g("span",null,Q(_.$t("最近使用")),1)]),g("div",Cs,[(V(!0),ee(ke,null,dt(w.value,(I,L)=>(V(),ee("span",{key:L},[Ce(g("img",{loading:"lazy",src:I.url,alt:"["+_.$t("动画表情")+"]",onClick:m=>N(I)},null,8,Ms),[[D(gn),F(I.url)]])]))),128))])],64)):fe("",!0),g("div",As,[g("span",null,Q(_.$t("本地表情")),1),ie(A,{icon:["fas","fa-folder-plus"],title:_.$t("选择文件夹"),onClick:q},null,8,["title"]),D(a).sysConfig.local_emoji_folder?(V(),xe(A,{key:0,icon:["fas","fa-rotate-right"],title:_.$t("重新加载"),onClick:M},null,8,["title"])):fe("",!0)]),g("div",Ts,[D(a).sysConfig.local_emoji_folder?D(a).sysConfig.local_emoji_folder&&v.value.length<=0?(V(),ee("div",xs,[ie(A,{icon:["fas","face-dizzy"]}),g("span",null,Q(_.$t("暂无图片")),1)])):D(a).sysConfig.local_emoji_folder&&v.value.length>0?(V(!0),ee(ke,{key:2},dt(v.value,(I,L)=>(V(),ee("span",{key:L},[Ce(g("img",{loading:"lazy",src:I.url,alt:"["+_.$t("动画表情")+"]",onClick:m=>N(I)},null,8,Fs),[[D(gn),F(I.url)]])]))),128)):fe("",!0):(V(),ee("div",Es,[ie(A,{icon:["fas","folder-open"]}),g("span",null,Q(_.$t("选择文件夹")),1)]))])])])):fe("",!0)]),_:1})])}}}),Ls={class:"ss-card"},Rs={key:0},Ds=zt({name:"MergePan",__name:"MergePan",setup(n,{expose:f}){const B=$n.global.t,r=Fn(),e=Jn(),t=r.mergeMsgStack,l=he(),u=Pt(()=>{var a;return Qn.fromList((((a=l.value)==null?void 0:a.imageList)??[]).map(o=>o.img_url))});function w(){t.length--}function $(){t.length=0}function i(){return t.length>0}return f({closeMergeMsg:$,isMergeOpen:i}),cn(()=>{It(()=>r.mergeMsgStack.length,()=>{t.length===0?r.mergeMessageImgList=void 0:l.value=t.at(-1)}),It(()=>{var a;return(a=l.value)==null?void 0:a.imageList},()=>{var a;r.mergeMsgStack.length===0||((a=l.value)==null?void 0:a.imageList)===void 0||(r.mergeMessageImgList=l.value.imageList)})}),(a,o)=>{const d=Ln("font-awesome-icon");return V(),ee("div",{class:vt("merge-pan"+(D(r).mergeMsgStack.length>0?" show":""))},[g("div",{onClick:$}),g("div",Ls,[g("div",null,[ie(d,{style:{"margin-top":"5px"},icon:["fas","message"]}),g("span",null,Q(D(B)("合并消息")),1),D(t).length<=1?(V(),xe(d,{key:0,icon:["fas","xmark"],onClick:w})):(V(),xe(d,{key:1,icon:["fas","angles-left"],onClick:w}))]),l.value===void 0?(V(),ee("div",Rs)):(V(),xe(Wn,{key:1,name:D(e).sysConfig.opt_fast_animation?"":"msglist",tag:"div"},{default:kt(()=>[(V(!0),ee(ke,null,dt(l.value.messageList,(v,R)=>(V(),ee(ke,{key:"merge-"+l.value.forwardMsg.message[0].id+"-"+R},[D(Vn)(l.value.messageList[R-1]?l.value.messageList[R-1].time:void 0,v.time,R==0)?(V(),xe(Vt,{id:D(Fi)(),key:"notice-time-"+R,data:{sub_type:"time",time:v.time}},null,8,["id","data"])):D($i)(v)?(V(),xe(Vt,{key:"delete-"+v.message_id,data:{sub_type:"delete"}})):fe("",!0),ie(ln,{data:v,type:"merge","image-list-header":u.value},null,8,["data","image-list-header"])],64))),128))]),_:1},8,["name"]))])],2)}}}),Bs=Rn(Ds,[["__scopeId","data-v-5a030688"]]);function Os(n,f){return f.forEach((function(B){B&&typeof B!="string"&&!Array.isArray(B)&&Object.keys(B).forEach((function(r){if(r!=="default"&&!(r in n)){var e=Object.getOwnPropertyDescriptor(B,r);Object.defineProperty(n,r,e.get?e:{enumerable:!0,get:function(){return B[r]}})}}))})),Object.freeze(n)}function Bi(n,f){return new Promise((function(B,r){let e;return Us(n).then((function(t){try{return e=t,B(new Blob([f.slice(0,2),e,f.slice(2)],{type:"image/jpeg"}))}catch(l){return r(l)}}),r)}))}const Us=n=>new Promise(((f,B)=>{const r=new FileReader;r.addEventListener("load",(({target:{result:e}})=>{const t=new DataView(e);let l=0;if(t.getUint16(l)!==65496)return B("not a valid JPEG");for(l+=2;;){const u=t.getUint16(l);if(u===65498)break;const w=t.getUint16(l+2);if(u===65505&&t.getUint32(l+4)===1165519206){const $=l+10;let i;switch(t.getUint16($)){case 18761:i=!0;break;case 19789:i=!1;break;default:return B("TIFF header contains invalid endian")}if(t.getUint16($+2,i)!==42)return B("TIFF header contains invalid version");const a=t.getUint32($+4,i),o=$+a+2+12*t.getUint16($+a,i);for(let d=$+a+2;d<o;d+=12)if(t.getUint16(d,i)==274){if(t.getUint16(d+2,i)!==3)return B("Orientation data type is invalid");if(t.getUint32(d+4,i)!==1)return B("Orientation data count is invalid");t.setUint16(d+8,1,i);break}return f(e.slice(l,l+2+w))}l+=2+w}return f(new Blob)})),r.readAsArrayBuffer(n)}));var Mn={},zs={get exports(){return Mn},set exports(n){Mn=n}};(function(n){var f,B,r={};zs.exports=r,r.parse=function(e,t){for(var l=r.bin.readUshort,u=r.bin.readUint,w=0,$={},i=new Uint8Array(e),a=i.length-4;u(i,a)!=101010256;)a--;w=a,w+=4;var o=l(i,w+=4);l(i,w+=2);var d=u(i,w+=2),v=u(i,w+=4);w+=4,w=v;for(var R=0;R<o;R++){u(i,w),w+=4,w+=4,w+=4,u(i,w+=4),d=u(i,w+=4);var b=u(i,w+=4),T=l(i,w+=4),K=l(i,w+2),j=l(i,w+4);w+=6;var x=u(i,w+=8);w+=4,w+=T+K+j,r._readLocal(i,x,$,d,b,t)}return $},r._readLocal=function(e,t,l,u,w,$){var i=r.bin.readUshort,a=r.bin.readUint;a(e,t),i(e,t+=4),i(e,t+=2);var o=i(e,t+=2);a(e,t+=2),a(e,t+=4),t+=4;var d=i(e,t+=8),v=i(e,t+=2);t+=2;var R=r.bin.readUTF8(e,t,d);if(t+=d,t+=v,$)l[R]={size:w,csize:u};else{var b=new Uint8Array(e.buffer,t);if(o==0)l[R]=new Uint8Array(b.buffer.slice(t,t+u));else{if(o!=8)throw"unknown compression method: "+o;var T=new Uint8Array(w);r.inflateRaw(b,T),l[R]=T}}},r.inflateRaw=function(e,t){return r.F.inflate(e,t)},r.inflate=function(e,t){return e[0],e[1],r.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},r.deflate=function(e,t){t==null&&(t={level:6});var l=0,u=new Uint8Array(50+Math.floor(1.1*e.length));u[l]=120,u[l+1]=156,l+=2,l=r.F.deflateRaw(e,u,l,t.level);var w=r.adler(e,0,e.length);return u[l+0]=w>>>24&255,u[l+1]=w>>>16&255,u[l+2]=w>>>8&255,u[l+3]=w>>>0&255,new Uint8Array(u.buffer,0,l+4)},r.deflateRaw=function(e,t){t==null&&(t={level:6});var l=new Uint8Array(50+Math.floor(1.1*e.length)),u=r.F.deflateRaw(e,l,u,t.level);return new Uint8Array(l.buffer,0,u)},r.encode=function(e,t){t==null&&(t=!1);var l=0,u=r.bin.writeUint,w=r.bin.writeUshort,$={};for(var i in e){var a=!r._noNeed(i)&&!t,o=e[i],d=r.crc.crc(o,0,o.length);$[i]={cpr:a,usize:o.length,crc:d,file:a?r.deflateRaw(o):o}}for(var i in $)l+=$[i].file.length+30+46+2*r.bin.sizeUTF8(i);l+=22;var v=new Uint8Array(l),R=0,b=[];for(var i in $){var T=$[i];b.push(R),R=r._writeHeader(v,R,i,T,0)}var K=0,j=R;for(var i in $)T=$[i],b.push(R),R=r._writeHeader(v,R,i,T,1,b[K++]);var x=R-j;return u(v,R,101010256),R+=4,w(v,R+=4,K),w(v,R+=2,K),u(v,R+=2,x),u(v,R+=4,j),R+=4,R+=2,v.buffer},r._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(t)!=-1},r._writeHeader=function(e,t,l,u,w,$){var i=r.bin.writeUint,a=r.bin.writeUshort,o=u.file;return i(e,t,w==0?67324752:33639248),t+=4,w==1&&(t+=2),a(e,t,20),a(e,t+=2,0),a(e,t+=2,u.cpr?8:0),i(e,t+=2,0),i(e,t+=4,u.crc),i(e,t+=4,o.length),i(e,t+=4,u.usize),a(e,t+=4,r.bin.sizeUTF8(l)),a(e,t+=2,0),t+=2,w==1&&(t+=2,t+=2,i(e,t+=6,$),t+=4),t+=r.bin.writeUTF8(e,t,l),w==0&&(e.set(o,t),t+=o.length),t},r.crc={table:(function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var l=t,u=0;u<8;u++)1&l?l=3988292384^l>>>1:l>>>=1;e[t]=l}return e})(),update:function(e,t,l,u){for(var w=0;w<u;w++)e=r.crc.table[255&(e^t[l+w])]^e>>>8;return e},crc:function(e,t,l){return 4294967295^r.crc.update(4294967295,e,t,l)}},r.adler=function(e,t,l){for(var u=1,w=0,$=t,i=t+l;$<i;){for(var a=Math.min($+5552,i);$<a;)w+=u+=e[$++];u%=65521,w%=65521}return w<<16|u},r.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,l){e[t]=255&l,e[t+1]=l>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,l){e[t]=255&l,e[t+1]=l>>8&255,e[t+2]=l>>16&255,e[t+3]=l>>24&255},readASCII:function(e,t,l){for(var u="",w=0;w<l;w++)u+=String.fromCharCode(e[t+w]);return u},writeASCII:function(e,t,l){for(var u=0;u<l.length;u++)e[t+u]=l.charCodeAt(u)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,l){for(var u,w="",$=0;$<l;$++)w+="%"+r.bin.pad(e[t+$].toString(16));try{u=decodeURIComponent(w)}catch{return r.bin.readASCII(e,t,l)}return u},writeUTF8:function(e,t,l){for(var u=l.length,w=0,$=0;$<u;$++){var i=l.charCodeAt($);if((4294967168&i)==0)e[t+w]=i,w++;else if((4294965248&i)==0)e[t+w]=192|i>>6,e[t+w+1]=128|i>>0&63,w+=2;else if((4294901760&i)==0)e[t+w]=224|i>>12,e[t+w+1]=128|i>>6&63,e[t+w+2]=128|i>>0&63,w+=3;else{if((4292870144&i)!=0)throw"e";e[t+w]=240|i>>18,e[t+w+1]=128|i>>12&63,e[t+w+2]=128|i>>6&63,e[t+w+3]=128|i>>0&63,w+=4}}return w},sizeUTF8:function(e){for(var t=e.length,l=0,u=0;u<t;u++){var w=e.charCodeAt(u);if((4294967168&w)==0)l++;else if((4294965248&w)==0)l+=2;else if((4294901760&w)==0)l+=3;else{if((4292870144&w)!=0)throw"e";l+=4}}return l}},r.F={},r.F.deflateRaw=function(e,t,l,u){var w=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][u],$=r.F.U,i=r.F._goodIndex;r.F._hash;var a=r.F._putsE,o=0,d=l<<3,v=0,R=e.length;if(u==0){for(;o<R;)a(t,d,o+(_=Math.min(65535,R-o))==R?1:0),d=r.F._copyExact(e,o,_,t,d+8),o+=_;return d>>>3}var b=$.lits,T=$.strt,K=$.prev,j=0,x=0,q=0,M=0,N=0,y=0;for(R>2&&(T[y=r.F._hash(e,0)]=0),o=0;o<R;o++){if(N=y,o+1<R-2){y=r.F._hash(e,o+1);var p=o+1&32767;K[p]=T[y],T[y]=p}if(v<=o){(j>14e3||x>26697)&&R-o>100&&(v<o&&(b[j]=o-v,j+=2,v=o),d=r.F._writeBlock(o==R-1||v==R?1:0,b,j,M,e,q,o-q,t,d),j=x=M=0,q=o);var F=0;o<R-2&&(F=r.F._bestMatch(e,o,K,N,Math.min(w[2],R-o),w[3]));var _=F>>>16,S=65535&F;if(F!=0){S=65535&F;var A=i(_=F>>>16,$.of0);$.lhst[257+A]++;var I=i(S,$.df0);$.dhst[I]++,M+=$.exb[A]+$.dxb[I],b[j]=_<<23|o-v,b[j+1]=S<<16|A<<8|I,j+=2,v=o+_}else $.lhst[e[o]]++;x++}}for(q==o&&e.length!=0||(v<o&&(b[j]=o-v,j+=2,v=o),d=r.F._writeBlock(1,b,j,M,e,q,o-q,t,d),j=0,x=0,j=x=M=0,q=o);(7&d)!=0;)d++;return d>>>3},r.F._bestMatch=function(e,t,l,u,w,$){var i=32767&t,a=l[i],o=i-a+32768&32767;if(a==i||u!=r.F._hash(e,t-o))return 0;for(var d=0,v=0,R=Math.min(32767,t);o<=R&&--$!=0&&a!=i;){if(d==0||e[t+d]==e[t+d-o]){var b=r.F._howLong(e,t,o);if(b>d){if(v=o,(d=b)>=w)break;o+2<b&&(b=o+2);for(var T=0,K=0;K<b-2;K++){var j=t-o+K+32768&32767,x=j-l[j]+32768&32767;x>T&&(T=x,a=j)}}}o+=(i=a)-(a=l[i])+32768&32767}return d<<16|v},r.F._howLong=function(e,t,l){if(e[t]!=e[t-l]||e[t+1]!=e[t+1-l]||e[t+2]!=e[t+2-l])return 0;var u=t,w=Math.min(e.length,t+258);for(t+=3;t<w&&e[t]==e[t-l];)t++;return t-u},r.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(e,t,l,u,w,$,i,a,o){var d,v,R,b,T,K,j,x,q,M=r.F.U,N=r.F._putsF,y=r.F._putsE;M.lhst[256]++,v=(d=r.F.getTrees())[0],R=d[1],b=d[2],T=d[3],K=d[4],j=d[5],x=d[6],q=d[7];var p=32+((o+3&7)==0?0:8-(o+3&7))+(i<<3),F=u+r.F.contSize(M.fltree,M.lhst)+r.F.contSize(M.fdtree,M.dhst),_=u+r.F.contSize(M.ltree,M.lhst)+r.F.contSize(M.dtree,M.dhst);_+=14+3*j+r.F.contSize(M.itree,M.ihst)+(2*M.ihst[16]+3*M.ihst[17]+7*M.ihst[18]);for(var S=0;S<286;S++)M.lhst[S]=0;for(S=0;S<30;S++)M.dhst[S]=0;for(S=0;S<19;S++)M.ihst[S]=0;var A=p<F&&p<_?0:F<_?1:2;if(N(a,o,e),N(a,o+1,A),o+=3,A==0){for(;(7&o)!=0;)o++;o=r.F._copyExact(w,$,i,a,o)}else{var I,L;if(A==1&&(I=M.fltree,L=M.fdtree),A==2){r.F.makeCodes(M.ltree,v),r.F.revCodes(M.ltree,v),r.F.makeCodes(M.dtree,R),r.F.revCodes(M.dtree,R),r.F.makeCodes(M.itree,b),r.F.revCodes(M.itree,b),I=M.ltree,L=M.dtree,y(a,o,T-257),y(a,o+=5,K-1),y(a,o+=5,j-4),o+=4;for(var m=0;m<j;m++)y(a,o+3*m,M.itree[1+(M.ordr[m]<<1)]);o+=3*j,o=r.F._codeTiny(x,M.itree,a,o),o=r.F._codeTiny(q,M.itree,a,o)}for(var h=$,O=0;O<l;O+=2){for(var C=t[O],z=C>>>23,G=h+(8388607&C);h<G;)o=r.F._writeLit(w[h++],I,a,o);if(z!=0){var Y=t[O+1],ne=Y>>16,X=Y>>8&255,H=255&Y;y(a,o=r.F._writeLit(257+X,I,a,o),z-M.of0[X]),o+=M.exb[X],N(a,o=r.F._writeLit(H,L,a,o),ne-M.df0[H]),o+=M.dxb[H],h+=z}}o=r.F._writeLit(256,I,a,o)}return o},r.F._copyExact=function(e,t,l,u,w){var $=w>>>3;return u[$]=l,u[$+1]=l>>>8,u[$+2]=255-u[$],u[$+3]=255-u[$+1],$+=4,u.set(new Uint8Array(e.buffer,t,l),$),w+(l+4<<3)},r.F.getTrees=function(){for(var e=r.F.U,t=r.F._hufTree(e.lhst,e.ltree,15),l=r.F._hufTree(e.dhst,e.dtree,15),u=[],w=r.F._lenCodes(e.ltree,u),$=[],i=r.F._lenCodes(e.dtree,$),a=0;a<u.length;a+=2)e.ihst[u[a]]++;for(a=0;a<$.length;a+=2)e.ihst[$[a]]++;for(var o=r.F._hufTree(e.ihst,e.itree,7),d=19;d>4&&e.itree[1+(e.ordr[d-1]<<1)]==0;)d--;return[t,l,o,w,i,d,u,$]},r.F.getSecond=function(e){for(var t=[],l=0;l<e.length;l+=2)t.push(e[l+1]);return t},r.F.nonZero=function(e){for(var t="",l=0;l<e.length;l+=2)e[l+1]!=0&&(t+=(l>>1)+",");return t},r.F.contSize=function(e,t){for(var l=0,u=0;u<t.length;u++)l+=t[u]*e[1+(u<<1)];return l},r.F._codeTiny=function(e,t,l,u){for(var w=0;w<e.length;w+=2){var $=e[w],i=e[w+1];u=r.F._writeLit($,t,l,u);var a=$==16?2:$==17?3:7;$>15&&(r.F._putsE(l,u,i,a),u+=a)}return u},r.F._lenCodes=function(e,t){for(var l=e.length;l!=2&&e[l-1]==0;)l-=2;for(var u=0;u<l;u+=2){var w=e[u+1],$=u+3<l?e[u+3]:-1,i=u+5<l?e[u+5]:-1,a=u==0?-1:e[u-1];if(w==0&&$==w&&i==w){for(var o=u+5;o+2<l&&e[o+2]==w;)o+=2;(d=Math.min(o+1-u>>>1,138))<11?t.push(17,d-3):t.push(18,d-11),u+=2*d-2}else if(w==a&&$==w&&i==w){for(o=u+5;o+2<l&&e[o+2]==w;)o+=2;var d=Math.min(o+1-u>>>1,6);t.push(16,d-3),u+=2*d-2}else t.push(w,0)}return l>>>1},r.F._hufTree=function(e,t,l){var u=[],w=e.length,$=t.length,i=0;for(i=0;i<$;i+=2)t[i]=0,t[i+1]=0;for(i=0;i<w;i++)e[i]!=0&&u.push({lit:i,f:e[i]});var a=u.length,o=u.slice(0);if(a==0)return 0;if(a==1){var d=u[0].lit;return o=d==0?1:0,t[1+(d<<1)]=1,t[1+(o<<1)]=1,1}u.sort((function(x,q){return x.f-q.f}));var v=u[0],R=u[1],b=0,T=1,K=2;for(u[0]={lit:-1,f:v.f+R.f,l:v,r:R,d:0};T!=a-1;)v=b!=T&&(K==a||u[b].f<u[K].f)?u[b++]:u[K++],R=b!=T&&(K==a||u[b].f<u[K].f)?u[b++]:u[K++],u[T++]={lit:-1,f:v.f+R.f,l:v,r:R};var j=r.F.setDepth(u[T-1],0);for(j>l&&(r.F.restrictDepth(o,l,j),j=l),i=0;i<a;i++)t[1+(o[i].lit<<1)]=o[i].d;return j},r.F.setDepth=function(e,t){return e.lit!=-1?(e.d=t,t):Math.max(r.F.setDepth(e.l,t+1),r.F.setDepth(e.r,t+1))},r.F.restrictDepth=function(e,t,l){var u=0,w=1<<l-t,$=0;for(e.sort((function(a,o){return o.d==a.d?a.f-o.f:o.d-a.d})),u=0;u<e.length&&e[u].d>t;u++){var i=e[u].d;e[u].d=t,$+=w-(1<<l-i)}for($>>>=l-t;$>0;)(i=e[u].d)<t?(e[u].d++,$-=1<<t-i-1):u++;for(;u>=0;u--)e[u].d==t&&$<0&&(e[u].d--,$++);$!=0&&console.log("debt left")},r.F._goodIndex=function(e,t){var l=0;return t[16|l]<=e&&(l|=16),t[8|l]<=e&&(l|=8),t[4|l]<=e&&(l|=4),t[2|l]<=e&&(l|=2),t[1|l]<=e&&(l|=1),l},r.F._writeLit=function(e,t,l,u){return r.F._putsF(l,u,t[e<<1]),u+t[1+(e<<1)]},r.F.inflate=function(e,t){var l=Uint8Array;if(e[0]==3&&e[1]==0)return t||new l(0);var u=r.F,w=u._bitsF,$=u._bitsE,i=u._decodeTiny,a=u.makeCodes,o=u.codes2map,d=u._get17,v=u.U,R=t==null;R&&(t=new l(e.length>>>2<<3));for(var b,T,K=0,j=0,x=0,q=0,M=0,N=0,y=0,p=0,F=0;K==0;)if(K=w(e,F,1),j=w(e,F+1,2),F+=3,j!=0){if(R&&(t=r.F._check(t,p+(1<<17))),j==1&&(b=v.flmap,T=v.fdmap,N=511,y=31),j==2){x=$(e,F,5)+257,q=$(e,F+5,5)+1,M=$(e,F+10,4)+4,F+=14;for(var _=0;_<38;_+=2)v.itree[_]=0,v.itree[_+1]=0;var S=1;for(_=0;_<M;_++){var A=$(e,F+3*_,3);v.itree[1+(v.ordr[_]<<1)]=A,A>S&&(S=A)}F+=3*M,a(v.itree,S),o(v.itree,S,v.imap),b=v.lmap,T=v.dmap,F=i(v.imap,(1<<S)-1,x+q,e,F,v.ttree);var I=u._copyOut(v.ttree,0,x,v.ltree);N=(1<<I)-1;var L=u._copyOut(v.ttree,x,q,v.dtree);y=(1<<L)-1,a(v.ltree,I),o(v.ltree,I,b),a(v.dtree,L),o(v.dtree,L,T)}for(;;){var m=b[d(e,F)&N];F+=15&m;var h=m>>>4;if(!(h>>>8))t[p++]=h;else{if(h==256)break;var O=p+h-254;if(h>264){var C=v.ldef[h-257];O=p+(C>>>3)+$(e,F,7&C),F+=7&C}var z=T[d(e,F)&y];F+=15&z;var G=z>>>4,Y=v.ddef[G],ne=(Y>>>4)+w(e,F,15&Y);for(F+=15&Y,R&&(t=r.F._check(t,p+(1<<17)));p<O;)t[p]=t[p++-ne],t[p]=t[p++-ne],t[p]=t[p++-ne],t[p]=t[p++-ne];p=O}}}else{(7&F)!=0&&(F+=8-(7&F));var X=4+(F>>>3),H=e[X-4]|e[X-3]<<8;R&&(t=r.F._check(t,p+H)),t.set(new l(e.buffer,e.byteOffset+X,H),p),F=X+H<<3,p+=H}return t.length==p?t:t.slice(0,p)},r.F._check=function(e,t){var l=e.length;if(t<=l)return e;var u=new Uint8Array(Math.max(l<<1,t));return u.set(e,0),u},r.F._decodeTiny=function(e,t,l,u,w,$){for(var i=r.F._bitsE,a=r.F._get17,o=0;o<l;){var d=e[a(u,w)&t];w+=15&d;var v=d>>>4;if(v<=15)$[o]=v,o++;else{var R=0,b=0;v==16?(b=3+i(u,w,2),w+=2,R=$[o-1]):v==17?(b=3+i(u,w,3),w+=3):v==18&&(b=11+i(u,w,7),w+=7);for(var T=o+b;o<T;)$[o]=R,o++}}return w},r.F._copyOut=function(e,t,l,u){for(var w=0,$=0,i=u.length>>>1;$<l;){var a=e[$+t];u[$<<1]=0,u[1+($<<1)]=a,a>w&&(w=a),$++}for(;$<i;)u[$<<1]=0,u[1+($<<1)]=0,$++;return w},r.F.makeCodes=function(e,t){for(var l,u,w,$,i=r.F.U,a=e.length,o=i.bl_count,d=0;d<=t;d++)o[d]=0;for(d=1;d<a;d+=2)o[e[d]]++;var v=i.next_code;for(l=0,o[0]=0,u=1;u<=t;u++)l=l+o[u-1]<<1,v[u]=l;for(w=0;w<a;w+=2)($=e[w+1])!=0&&(e[w]=v[$],v[$]++)},r.F.codes2map=function(e,t,l){for(var u=e.length,w=r.F.U.rev15,$=0;$<u;$+=2)if(e[$+1]!=0)for(var i=$>>1,a=e[$+1],o=i<<4|a,d=t-a,v=e[$]<<d,R=v+(1<<d);v!=R;)l[w[v]>>>15-t]=o,v++},r.F.revCodes=function(e,t){for(var l=r.F.U.rev15,u=15-t,w=0;w<e.length;w+=2){var $=e[w]<<t-e[w+1];e[w]=l[$]>>>u}},r.F._putsE=function(e,t,l){l<<=7&t;var u=t>>>3;e[u]|=l,e[u+1]|=l>>>8},r.F._putsF=function(e,t,l){l<<=7&t;var u=t>>>3;e[u]|=l,e[u+1]|=l>>>8,e[u+2]|=l>>>16},r.F._bitsE=function(e,t,l){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<l)-1},r.F._bitsF=function(e,t,l){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<l)-1},r.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},r.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},r.F.U=(f=Uint16Array,B=Uint32Array,{next_code:new f(16),bl_count:new f(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[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,0,0,0],ldef:new f(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[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,0,0],ddef:new B(32),flmap:new f(512),fltree:[],fdmap:new f(32),fdtree:[],lmap:new f(32768),ltree:[],ttree:[],dmap:new f(32768),dtree:[],imap:new f(512),itree:[],rev15:new f(32768),lhst:new B(286),dhst:new B(30),ihst:new B(19),lits:new B(15e3),strt:new f(65536),prev:new f(32768)}),(function(){for(var e=r.F.U,t=0;t<32768;t++){var l=t;l=(4278255360&(l=(4042322160&(l=(3435973836&(l=(2863311530&l)>>>1|(1431655765&l)<<1))>>>2|(858993459&l)<<2))>>>4|(252645135&l)<<4))>>>8|(16711935&l)<<8,e.rev15[t]=(l>>>16|l<<16)>>>17}function u(w,$,i){for(;$--!=0;)w.push(0,i)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];u(e.fltree,144,8),u(e.fltree,112,9),u(e.fltree,24,7),u(e.fltree,8,8),r.F.makeCodes(e.fltree,9),r.F.codes2map(e.fltree,9,e.flmap),r.F.revCodes(e.fltree,9),u(e.fdtree,32,5),r.F.makeCodes(e.fdtree,5),r.F.codes2map(e.fdtree,5,e.fdmap),r.F.revCodes(e.fdtree,5),u(e.itree,19,0),u(e.ltree,286,0),u(e.dtree,30,0),u(e.ttree,320,0)})()})();var Ns=Os({__proto__:null,default:Mn},[Mn]);const xt=(function(){var n={nextZero(i,a){for(;i[a]!=0;)a++;return a},readUshort:(i,a)=>i[a]<<8|i[a+1],writeUshort(i,a,o){i[a]=o>>8&255,i[a+1]=255&o},readUint:(i,a)=>16777216*i[a]+(i[a+1]<<16|i[a+2]<<8|i[a+3]),writeUint(i,a,o){i[a]=o>>24&255,i[a+1]=o>>16&255,i[a+2]=o>>8&255,i[a+3]=255&o},readASCII(i,a,o){let d="";for(let v=0;v<o;v++)d+=String.fromCharCode(i[a+v]);return d},writeASCII(i,a,o){for(let d=0;d<o.length;d++)i[a+d]=o.charCodeAt(d)},readBytes(i,a,o){const d=[];for(let v=0;v<o;v++)d.push(i[a+v]);return d},pad:i=>i.length<2?`0${i}`:i,readUTF8(i,a,o){let d,v="";for(let R=0;R<o;R++)v+=`%${n.pad(i[a+R].toString(16))}`;try{d=decodeURIComponent(v)}catch{return n.readASCII(i,a,o)}return d}};function f(i,a,o,d){const v=a*o,R=t(d),b=Math.ceil(a*R/8),T=new Uint8Array(4*v),K=new Uint32Array(T.buffer),{ctype:j}=d,{depth:x}=d,q=n.readUshort;if(j==6){const C=v<<2;if(x==8)for(var M=0;M<C;M+=4)T[M]=i[M],T[M+1]=i[M+1],T[M+2]=i[M+2],T[M+3]=i[M+3];if(x==16)for(M=0;M<C;M++)T[M]=i[M<<1]}else if(j==2){const C=d.tabs.tRNS;if(C==null){if(x==8)for(M=0;M<v;M++){var N=3*M;K[M]=255<<24|i[N+2]<<16|i[N+1]<<8|i[N]}if(x==16)for(M=0;M<v;M++)N=6*M,K[M]=255<<24|i[N+4]<<16|i[N+2]<<8|i[N]}else{var y=C[0];const z=C[1],G=C[2];if(x==8)for(M=0;M<v;M++){var p=M<<2;N=3*M,K[M]=255<<24|i[N+2]<<16|i[N+1]<<8|i[N],i[N]==y&&i[N+1]==z&&i[N+2]==G&&(T[p+3]=0)}if(x==16)for(M=0;M<v;M++)p=M<<2,N=6*M,K[M]=255<<24|i[N+4]<<16|i[N+2]<<8|i[N],q(i,N)==y&&q(i,N+2)==z&&q(i,N+4)==G&&(T[p+3]=0)}}else if(j==3){const C=d.tabs.PLTE,z=d.tabs.tRNS,G=z?z.length:0;if(x==1)for(var F=0;F<o;F++){var _=F*b,S=F*a;for(M=0;M<a;M++){p=S+M<<2;var A=3*(I=i[_+(M>>3)]>>7-((7&M)<<0)&1);T[p]=C[A],T[p+1]=C[A+1],T[p+2]=C[A+2],T[p+3]=I<G?z[I]:255}}if(x==2)for(F=0;F<o;F++)for(_=F*b,S=F*a,M=0;M<a;M++)p=S+M<<2,A=3*(I=i[_+(M>>2)]>>6-((3&M)<<1)&3),T[p]=C[A],T[p+1]=C[A+1],T[p+2]=C[A+2],T[p+3]=I<G?z[I]:255;if(x==4)for(F=0;F<o;F++)for(_=F*b,S=F*a,M=0;M<a;M++)p=S+M<<2,A=3*(I=i[_+(M>>1)]>>4-((1&M)<<2)&15),T[p]=C[A],T[p+1]=C[A+1],T[p+2]=C[A+2],T[p+3]=I<G?z[I]:255;if(x==8)for(M=0;M<v;M++){var I;p=M<<2,A=3*(I=i[M]),T[p]=C[A],T[p+1]=C[A+1],T[p+2]=C[A+2],T[p+3]=I<G?z[I]:255}}else if(j==4){if(x==8)for(M=0;M<v;M++){p=M<<2;var L=i[m=M<<1];T[p]=L,T[p+1]=L,T[p+2]=L,T[p+3]=i[m+1]}if(x==16)for(M=0;M<v;M++){var m;p=M<<2,L=i[m=M<<2],T[p]=L,T[p+1]=L,T[p+2]=L,T[p+3]=i[m+2]}}else if(j==0)for(y=d.tabs.tRNS?d.tabs.tRNS:-1,F=0;F<o;F++){const C=F*b,z=F*a;if(x==1)for(var h=0;h<a;h++){var O=(L=255*(i[C+(h>>>3)]>>>7-(7&h)&1))==255*y?0:255;K[z+h]=O<<24|L<<16|L<<8|L}else if(x==2)for(h=0;h<a;h++)O=(L=85*(i[C+(h>>>2)]>>>6-((3&h)<<1)&3))==85*y?0:255,K[z+h]=O<<24|L<<16|L<<8|L;else if(x==4)for(h=0;h<a;h++)O=(L=17*(i[C+(h>>>1)]>>>4-((1&h)<<2)&15))==17*y?0:255,K[z+h]=O<<24|L<<16|L<<8|L;else if(x==8)for(h=0;h<a;h++)O=(L=i[C+h])==y?0:255,K[z+h]=O<<24|L<<16|L<<8|L;else if(x==16)for(h=0;h<a;h++)L=i[C+(h<<1)],O=q(i,C+(h<<1))==y?0:255,K[z+h]=O<<24|L<<16|L<<8|L}return T}function B(i,a,o,d){const v=t(i),R=Math.ceil(o*v/8),b=new Uint8Array((R+1+i.interlace)*d);return a=i.tabs.CgBI?e(a,b):r(a,b),i.interlace==0?a=l(a,i,0,o,d):i.interlace==1&&(a=(function(K,j){const x=j.width,q=j.height,M=t(j),N=M>>3,y=Math.ceil(x*M/8),p=new Uint8Array(q*y);let F=0;const _=[0,0,4,0,2,0,1],S=[0,4,0,2,0,1,0],A=[8,8,8,4,4,2,2],I=[8,8,4,4,2,2,1];let L=0;for(;L<7;){const h=A[L],O=I[L];let C=0,z=0,G=_[L];for(;G<q;)G+=h,z++;let Y=S[L];for(;Y<x;)Y+=O,C++;const ne=Math.ceil(C*M/8);l(K,j,F,C,z);let X=0,H=_[L];for(;H<q;){let re=S[L],Fe=F+X*ne<<3;for(;re<x;){var m;if(M==1&&(m=(m=K[Fe>>3])>>7-(7&Fe)&1,p[H*y+(re>>3)]|=m<<7-((7&re)<<0)),M==2&&(m=(m=K[Fe>>3])>>6-(7&Fe)&3,p[H*y+(re>>2)]|=m<<6-((3&re)<<1)),M==4&&(m=(m=K[Fe>>3])>>4-(7&Fe)&15,p[H*y+(re>>1)]|=m<<4-((1&re)<<2)),M>=8){const Me=H*y+re*N;for(let ge=0;ge<N;ge++)p[Me+ge]=K[(Fe>>3)+ge]}Fe+=M,re+=O}X++,H+=h}C*z!=0&&(F+=z*(1+ne)),L+=1}return p})(a,i)),a}function r(i,a){return e(new Uint8Array(i.buffer,2,i.length-6),a)}var e=(function(){const i={H:{}};return i.H.N=function(a,o){const d=Uint8Array;let v,R,b=0,T=0,K=0,j=0,x=0,q=0,M=0,N=0,y=0;if(a[0]==3&&a[1]==0)return o||new d(0);const p=i.H,F=p.b,_=p.e,S=p.R,A=p.n,I=p.A,L=p.Z,m=p.m,h=o==null;for(h&&(o=new d(a.length>>>2<<5));b==0;)if(b=F(a,y,1),T=F(a,y+1,2),y+=3,T!=0){if(h&&(o=i.H.W(o,N+(1<<17))),T==1&&(v=m.J,R=m.h,q=511,M=31),T==2){K=_(a,y,5)+257,j=_(a,y+5,5)+1,x=_(a,y+10,4)+4,y+=14;let C=1;for(var O=0;O<38;O+=2)m.Q[O]=0,m.Q[O+1]=0;for(O=0;O<x;O++){const Y=_(a,y+3*O,3);m.Q[1+(m.X[O]<<1)]=Y,Y>C&&(C=Y)}y+=3*x,A(m.Q,C),I(m.Q,C,m.u),v=m.w,R=m.d,y=S(m.u,(1<<C)-1,K+j,a,y,m.v);const z=p.V(m.v,0,K,m.C);q=(1<<z)-1;const G=p.V(m.v,K,j,m.D);M=(1<<G)-1,A(m.C,z),I(m.C,z,v),A(m.D,G),I(m.D,G,R)}for(;;){const C=v[L(a,y)&q];y+=15&C;const z=C>>>4;if(!(z>>>8))o[N++]=z;else{if(z==256)break;{let G=N+z-254;if(z>264){const re=m.q[z-257];G=N+(re>>>3)+_(a,y,7&re),y+=7&re}const Y=R[L(a,y)&M];y+=15&Y;const ne=Y>>>4,X=m.c[ne],H=(X>>>4)+F(a,y,15&X);for(y+=15&X;N<G;)o[N]=o[N++-H],o[N]=o[N++-H],o[N]=o[N++-H],o[N]=o[N++-H];N=G}}}}else{(7&y)!=0&&(y+=8-(7&y));const C=4+(y>>>3),z=a[C-4]|a[C-3]<<8;h&&(o=i.H.W(o,N+z)),o.set(new d(a.buffer,a.byteOffset+C,z),N),y=C+z<<3,N+=z}return o.length==N?o:o.slice(0,N)},i.H.W=function(a,o){const d=a.length;if(o<=d)return a;const v=new Uint8Array(d<<1);return v.set(a,0),v},i.H.R=function(a,o,d,v,R,b){const T=i.H.e,K=i.H.Z;let j=0;for(;j<d;){const x=a[K(v,R)&o];R+=15&x;const q=x>>>4;if(q<=15)b[j]=q,j++;else{let M=0,N=0;q==16?(N=3+T(v,R,2),R+=2,M=b[j-1]):q==17?(N=3+T(v,R,3),R+=3):q==18&&(N=11+T(v,R,7),R+=7);const y=j+N;for(;j<y;)b[j]=M,j++}}return R},i.H.V=function(a,o,d,v){let R=0,b=0;const T=v.length>>>1;for(;b<d;){const K=a[b+o];v[b<<1]=0,v[1+(b<<1)]=K,K>R&&(R=K),b++}for(;b<T;)v[b<<1]=0,v[1+(b<<1)]=0,b++;return R},i.H.n=function(a,o){const d=i.H.m,v=a.length;let R,b,T,K;const j=d.j;for(var x=0;x<=o;x++)j[x]=0;for(x=1;x<v;x+=2)j[a[x]]++;const q=d.K;for(R=0,j[0]=0,b=1;b<=o;b++)R=R+j[b-1]<<1,q[b]=R;for(T=0;T<v;T+=2)K=a[T+1],K!=0&&(a[T]=q[K],q[K]++)},i.H.A=function(a,o,d){const v=a.length,R=i.H.m.r;for(let b=0;b<v;b+=2)if(a[b+1]!=0){const T=b>>1,K=a[b+1],j=T<<4|K,x=o-K;let q=a[b]<<x;const M=q+(1<<x);for(;q!=M;)d[R[q]>>>15-o]=j,q++}},i.H.l=function(a,o){const d=i.H.m.r,v=15-o;for(let R=0;R<a.length;R+=2){const b=a[R]<<o-a[R+1];a[R]=d[b]>>>v}},i.H.M=function(a,o,d){d<<=7&o;const v=o>>>3;a[v]|=d,a[v+1]|=d>>>8},i.H.I=function(a,o,d){d<<=7&o;const v=o>>>3;a[v]|=d,a[v+1]|=d>>>8,a[v+2]|=d>>>16},i.H.e=function(a,o,d){return(a[o>>>3]|a[1+(o>>>3)]<<8)>>>(7&o)&(1<<d)-1},i.H.b=function(a,o,d){return(a[o>>>3]|a[1+(o>>>3)]<<8|a[2+(o>>>3)]<<16)>>>(7&o)&(1<<d)-1},i.H.Z=function(a,o){return(a[o>>>3]|a[1+(o>>>3)]<<8|a[2+(o>>>3)]<<16)>>>(7&o)},i.H.i=function(a,o){return(a[o>>>3]|a[1+(o>>>3)]<<8|a[2+(o>>>3)]<<16|a[3+(o>>>3)]<<24)>>>(7&o)},i.H.m=(function(){const a=Uint16Array,o=Uint32Array;return{K:new a(16),j:new a(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[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,0,0,0],q:new a(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[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,0,0],c:new o(32),J:new a(512),_:[],h:new a(32),$:[],w:new a(32768),C:[],v:[],d:new a(32768),D:[],u:new a(512),Q:[],r:new a(32768),s:new o(286),Y:new o(30),a:new o(19),t:new o(15e3),k:new a(65536),g:new a(32768)}})(),(function(){const a=i.H.m;for(var o=0;o<32768;o++){let v=o;v=(2863311530&v)>>>1|(1431655765&v)<<1,v=(3435973836&v)>>>2|(858993459&v)<<2,v=(4042322160&v)>>>4|(252645135&v)<<4,v=(4278255360&v)>>>8|(16711935&v)<<8,a.r[o]=(v>>>16|v<<16)>>>17}function d(v,R,b){for(;R--!=0;)v.push(0,b)}for(o=0;o<32;o++)a.q[o]=a.S[o]<<3|a.T[o],a.c[o]=a.p[o]<<4|a.z[o];d(a._,144,8),d(a._,112,9),d(a._,24,7),d(a._,8,8),i.H.n(a._,9),i.H.A(a._,9,a.J),i.H.l(a._,9),d(a.$,32,5),i.H.n(a.$,5),i.H.A(a.$,5,a.h),i.H.l(a.$,5),d(a.Q,19,0),d(a.C,286,0),d(a.D,30,0),d(a.v,320,0)})(),i.H.N})();function t(i){return[1,null,3,1,2,null,4][i.ctype]*i.depth}function l(i,a,o,d,v){let R=t(a);const b=Math.ceil(d*R/8);let T,K;R=Math.ceil(R/8);let j=i[o],x=0;if(j>1&&(i[o]=[0,0,1][j-2]),j==3)for(x=R;x<b;x++)i[x+1]=i[x+1]+(i[x+1-R]>>>1)&255;for(let q=0;q<v;q++)if(T=o+q*b,K=T+q+1,j=i[K-1],x=0,j==0)for(;x<b;x++)i[T+x]=i[K+x];else if(j==1){for(;x<R;x++)i[T+x]=i[K+x];for(;x<b;x++)i[T+x]=i[K+x]+i[T+x-R]}else if(j==2)for(;x<b;x++)i[T+x]=i[K+x]+i[T+x-b];else if(j==3){for(;x<R;x++)i[T+x]=i[K+x]+(i[T+x-b]>>>1);for(;x<b;x++)i[T+x]=i[K+x]+(i[T+x-b]+i[T+x-R]>>>1)}else{for(;x<R;x++)i[T+x]=i[K+x]+u(0,i[T+x-b],0);for(;x<b;x++)i[T+x]=i[K+x]+u(i[T+x-R],i[T+x-b],i[T+x-R-b])}return i}function u(i,a,o){const d=i+a-o,v=d-i,R=d-a,b=d-o;return v*v<=R*R&&v*v<=b*b?i:R*R<=b*b?a:o}function w(i,a,o){o.width=n.readUint(i,a),a+=4,o.height=n.readUint(i,a),a+=4,o.depth=i[a],a++,o.ctype=i[a],a++,o.compress=i[a],a++,o.filter=i[a],a++,o.interlace=i[a],a++}function $(i,a,o,d,v,R,b,T,K){const j=Math.min(a,v),x=Math.min(o,R);let q=0,M=0;for(let L=0;L<x;L++)for(let m=0;m<j;m++)if(b>=0&&T>=0?(q=L*a+m<<2,M=(T+L)*v+b+m<<2):(q=(-T+L)*a-b+m<<2,M=L*v+m<<2),K==0)d[M]=i[q],d[M+1]=i[q+1],d[M+2]=i[q+2],d[M+3]=i[q+3];else if(K==1){var N=i[q+3]*.00392156862745098,y=i[q]*N,p=i[q+1]*N,F=i[q+2]*N,_=d[M+3]*(1/255),S=d[M]*_,A=d[M+1]*_,I=d[M+2]*_;const h=1-N,O=N+_*h,C=O==0?0:1/O;d[M+3]=255*O,d[M+0]=(y+S*h)*C,d[M+1]=(p+A*h)*C,d[M+2]=(F+I*h)*C}else if(K==2)N=i[q+3],y=i[q],p=i[q+1],F=i[q+2],_=d[M+3],S=d[M],A=d[M+1],I=d[M+2],N==_&&y==S&&p==A&&F==I?(d[M]=0,d[M+1]=0,d[M+2]=0,d[M+3]=0):(d[M]=y,d[M+1]=p,d[M+2]=F,d[M+3]=N);else if(K==3){if(N=i[q+3],y=i[q],p=i[q+1],F=i[q+2],_=d[M+3],S=d[M],A=d[M+1],I=d[M+2],N==_&&y==S&&p==A&&F==I)continue;if(N<220&&_>20)return!1}return!0}return{decode:function(a){const o=new Uint8Array(a);let d=8;const v=n,R=v.readUshort,b=v.readUint,T={tabs:{},frames:[]},K=new Uint8Array(o.length);let j,x=0,q=0;const M=[137,80,78,71,13,10,26,10];for(var N=0;N<8;N++)if(o[N]!=M[N])throw"The input is not a PNG file!";for(;d<o.length;){const L=v.readUint(o,d);d+=4;const m=v.readASCII(o,d,4);if(d+=4,m=="IHDR")w(o,d,T);else if(m=="iCCP"){for(var y=d;o[y]!=0;)y++;v.readASCII(o,d,y-d),o[y+1];const h=o.slice(y+2,d+L);let O=null;try{O=r(h)}catch{O=e(h)}T.tabs[m]=O}else if(m=="CgBI")T.tabs[m]=o.slice(d,d+4);else if(m=="IDAT"){for(N=0;N<L;N++)K[x+N]=o[d+N];x+=L}else if(m=="acTL")T.tabs[m]={num_frames:b(o,d),num_plays:b(o,d+4)},j=new Uint8Array(o.length);else if(m=="fcTL"){q!=0&&((I=T.frames[T.frames.length-1]).data=B(T,j.slice(0,q),I.rect.width,I.rect.height),q=0);const h={x:b(o,d+12),y:b(o,d+16),width:b(o,d+4),height:b(o,d+8)};let O=R(o,d+22);O=R(o,d+20)/(O==0?100:O);const C={rect:h,delay:Math.round(1e3*O),dispose:o[d+24],blend:o[d+25]};T.frames.push(C)}else if(m=="fdAT"){for(N=0;N<L-4;N++)j[q+N]=o[d+N+4];q+=L-4}else if(m=="pHYs")T.tabs[m]=[v.readUint(o,d),v.readUint(o,d+4),o[d+8]];else if(m=="cHRM")for(T.tabs[m]=[],N=0;N<8;N++)T.tabs[m].push(v.readUint(o,d+4*N));else if(m=="tEXt"||m=="zTXt"){T.tabs[m]==null&&(T.tabs[m]={});var p=v.nextZero(o,d),F=v.readASCII(o,d,p-d),_=d+L-p-1;if(m=="tEXt")A=v.readASCII(o,p+1,_);else{var S=r(o.slice(p+2,p+2+_));A=v.readUTF8(S,0,S.length)}T.tabs[m][F]=A}else if(m=="iTXt"){T.tabs[m]==null&&(T.tabs[m]={}),p=0,y=d,p=v.nextZero(o,y),F=v.readASCII(o,y,p-y);const h=o[y=p+1];var A;o[y+1],y+=2,p=v.nextZero(o,y),v.readASCII(o,y,p-y),y=p+1,p=v.nextZero(o,y),v.readUTF8(o,y,p-y),_=L-((y=p+1)-d),h==0?A=v.readUTF8(o,y,_):(S=r(o.slice(y,y+_)),A=v.readUTF8(S,0,S.length)),T.tabs[m][F]=A}else if(m=="PLTE")T.tabs[m]=v.readBytes(o,d,L);else if(m=="hIST"){const h=T.tabs.PLTE.length/3;for(T.tabs[m]=[],N=0;N<h;N++)T.tabs[m].push(R(o,d+2*N))}else if(m=="tRNS")T.ctype==3?T.tabs[m]=v.readBytes(o,d,L):T.ctype==0?T.tabs[m]=R(o,d):T.ctype==2&&(T.tabs[m]=[R(o,d),R(o,d+2),R(o,d+4)]);else if(m=="gAMA")T.tabs[m]=v.readUint(o,d)/1e5;else if(m=="sRGB")T.tabs[m]=o[d];else if(m=="bKGD")T.ctype==0||T.ctype==4?T.tabs[m]=[R(o,d)]:T.ctype==2||T.ctype==6?T.tabs[m]=[R(o,d),R(o,d+2),R(o,d+4)]:T.ctype==3&&(T.tabs[m]=o[d]);else if(m=="IEND")break;d+=L,v.readUint(o,d),d+=4}var I;return q!=0&&((I=T.frames[T.frames.length-1]).data=B(T,j.slice(0,q),I.rect.width,I.rect.height)),T.data=B(T,K,T.width,T.height),delete T.compress,delete T.interlace,delete T.filter,T},toRGBA8:function(a){const o=a.width,d=a.height;if(a.tabs.acTL==null)return[f(a.data,o,d,a).buffer];const v=[];a.frames[0].data==null&&(a.frames[0].data=a.data);const R=o*d*4,b=new Uint8Array(R),T=new Uint8Array(R),K=new Uint8Array(R);for(let x=0;x<a.frames.length;x++){const q=a.frames[x],M=q.rect.x,N=q.rect.y,y=q.rect.width,p=q.rect.height,F=f(q.data,y,p,a);if(x!=0)for(var j=0;j<R;j++)K[j]=b[j];if(q.blend==0?$(F,y,p,b,o,d,M,N,0):q.blend==1&&$(F,y,p,b,o,d,M,N,1),v.push(b.buffer.slice(0)),q.dispose!=0){if(q.dispose==1)$(T,y,p,b,o,d,M,N,0);else if(q.dispose==2)for(j=0;j<R;j++)b[j]=K[j]}}return v},_paeth:u,_copyTile:$,_bin:n}})();(function(){const{_copyTile:n}=xt,{_bin:f}=xt,B=xt._paeth;var r={table:(function(){const y=new Uint32Array(256);for(let p=0;p<256;p++){let F=p;for(let _=0;_<8;_++)1&F?F=3988292384^F>>>1:F>>>=1;y[p]=F}return y})(),update(y,p,F,_){for(let S=0;S<_;S++)y=r.table[255&(y^p[F+S])]^y>>>8;return y},crc:(y,p,F)=>4294967295^r.update(4294967295,y,p,F)};function e(y,p,F,_){p[F]+=y[0]*_>>4,p[F+1]+=y[1]*_>>4,p[F+2]+=y[2]*_>>4,p[F+3]+=y[3]*_>>4}function t(y){return Math.max(0,Math.min(255,y))}function l(y,p){const F=y[0]-p[0],_=y[1]-p[1],S=y[2]-p[2],A=y[3]-p[3];return F*F+_*_+S*S+A*A}function u(y,p,F,_,S,A,I){I==null&&(I=1);const L=_.length,m=[];for(var h=0;h<L;h++){const H=_[h];m.push([H>>>0&255,H>>>8&255,H>>>16&255,H>>>24&255])}for(h=0;h<L;h++){let H=4294967295;for(var O=0,C=0;C<L;C++){var z=l(m[h],m[C]);C!=h&&z<H&&(H=z,O=C)}}const G=new Uint32Array(S.buffer),Y=new Int16Array(p*F*4),ne=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(h=0;h<ne.length;h++)ne[h]=255*((ne[h]+.5)/16-.5);for(let H=0;H<F;H++)for(let re=0;re<p;re++){var X;h=4*(H*p+re),I!=2?X=[t(y[h]+Y[h]),t(y[h+1]+Y[h+1]),t(y[h+2]+Y[h+2]),t(y[h+3]+Y[h+3])]:(z=ne[4*(3&H)+(3&re)],X=[t(y[h]+z),t(y[h+1]+z),t(y[h+2]+z),t(y[h+3]+z)]),O=0;let Fe=16777215;for(C=0;C<L;C++){const Ie=l(X,m[C]);Ie<Fe&&(Fe=Ie,O=C)}const Me=m[O],ge=[X[0]-Me[0],X[1]-Me[1],X[2]-Me[2],X[3]-Me[3]];I==1&&(re!=p-1&&e(ge,Y,h+4,7),H!=F-1&&(re!=0&&e(ge,Y,h+4*p-4,3),e(ge,Y,h+4*p,5),re!=p-1&&e(ge,Y,h+4*p+4,1))),A[h>>2]=O,G[h>>2]=_[O]}}function w(y,p,F,_,S){S==null&&(S={});const{crc:A}=r,I=f.writeUint,L=f.writeUshort,m=f.writeASCII;let h=8;const O=y.frames.length>1;let C,z=!1,G=33+(O?20:0);if(S.sRGB!=null&&(G+=13),S.pHYs!=null&&(G+=21),S.iCCP!=null&&(C=pako.deflate(S.iCCP),G+=21+C.length+4),y.ctype==3){for(var Y=y.plte.length,ne=0;ne<Y;ne++)y.plte[ne]>>>24!=255&&(z=!0);G+=8+3*Y+4+(z?8+1*Y+4:0)}for(var X=0;X<y.frames.length;X++)O&&(G+=38),G+=(Me=y.frames[X]).cimg.length+12,X!=0&&(G+=4);G+=12;const H=new Uint8Array(G),re=[137,80,78,71,13,10,26,10];for(ne=0;ne<8;ne++)H[ne]=re[ne];if(I(H,h,13),h+=4,m(H,h,"IHDR"),h+=4,I(H,h,p),h+=4,I(H,h,F),h+=4,H[h]=y.depth,h++,H[h]=y.ctype,h++,H[h]=0,h++,H[h]=0,h++,H[h]=0,h++,I(H,h,A(H,h-17,17)),h+=4,S.sRGB!=null&&(I(H,h,1),h+=4,m(H,h,"sRGB"),h+=4,H[h]=S.sRGB,h++,I(H,h,A(H,h-5,5)),h+=4),S.iCCP!=null){const ge=13+C.length;I(H,h,ge),h+=4,m(H,h,"iCCP"),h+=4,m(H,h,"ICC profile"),h+=11,h+=2,H.set(C,h),h+=C.length,I(H,h,A(H,h-(ge+4),ge+4)),h+=4}if(S.pHYs!=null&&(I(H,h,9),h+=4,m(H,h,"pHYs"),h+=4,I(H,h,S.pHYs[0]),h+=4,I(H,h,S.pHYs[1]),h+=4,H[h]=S.pHYs[2],h++,I(H,h,A(H,h-13,13)),h+=4),O&&(I(H,h,8),h+=4,m(H,h,"acTL"),h+=4,I(H,h,y.frames.length),h+=4,I(H,h,S.loop!=null?S.loop:0),h+=4,I(H,h,A(H,h-12,12)),h+=4),y.ctype==3){for(I(H,h,3*(Y=y.plte.length)),h+=4,m(H,h,"PLTE"),h+=4,ne=0;ne<Y;ne++){const ge=3*ne,Ie=y.plte[ne],Be=255&Ie,Ne=Ie>>>8&255,Je=Ie>>>16&255;H[h+ge+0]=Be,H[h+ge+1]=Ne,H[h+ge+2]=Je}if(h+=3*Y,I(H,h,A(H,h-3*Y-4,3*Y+4)),h+=4,z){for(I(H,h,Y),h+=4,m(H,h,"tRNS"),h+=4,ne=0;ne<Y;ne++)H[h+ne]=y.plte[ne]>>>24&255;h+=Y,I(H,h,A(H,h-Y-4,Y+4)),h+=4}}let Fe=0;for(X=0;X<y.frames.length;X++){var Me=y.frames[X];O&&(I(H,h,26),h+=4,m(H,h,"fcTL"),h+=4,I(H,h,Fe++),h+=4,I(H,h,Me.rect.width),h+=4,I(H,h,Me.rect.height),h+=4,I(H,h,Me.rect.x),h+=4,I(H,h,Me.rect.y),h+=4,L(H,h,_[X]),h+=2,L(H,h,1e3),h+=2,H[h]=Me.dispose,h++,H[h]=Me.blend,h++,I(H,h,A(H,h-30,30)),h+=4);const ge=Me.cimg;I(H,h,(Y=ge.length)+(X==0?0:4)),h+=4;const Ie=h;m(H,h,X==0?"IDAT":"fdAT"),h+=4,X!=0&&(I(H,h,Fe++),h+=4),H.set(ge,h),h+=Y,I(H,h,A(H,Ie,h-Ie)),h+=4}return I(H,h,0),h+=4,m(H,h,"IEND"),h+=4,I(H,h,A(H,h-4,4)),h+=4,H.buffer}function $(y,p,F){for(let _=0;_<y.frames.length;_++){const S=y.frames[_];S.rect.width;const A=S.rect.height,I=new Uint8Array(A*S.bpl+A);S.cimg=d(S.img,A,S.bpp,S.bpl,I,p,F)}}function i(y,p,F,_,S){const A=S[0],I=S[1],L=S[2],m=S[3],h=S[4],O=S[5];let C=6,z=8,G=255;for(var Y=0;Y<y.length;Y++){const Re=new Uint8Array(y[Y]);for(var ne=Re.length,X=0;X<ne;X+=4)G&=Re[X+3]}const H=G!=255,re=(function(ye,pe,Pe,Oe,Ue,tt){const He=[];for(var ce=0;ce<ye.length;ce++){const $e=new Uint8Array(ye[ce]),P=new Uint32Array($e.buffer);var Ge;let W=0,te=0,ae=pe,se=Pe,le=Oe?1:0;if(ce!=0){const ue=tt||Oe||ce==1||He[ce-2].dispose!=0?1:2;let Ae=0,lt=1e9;for(let qe=0;qe<ue;qe++){var Ct=new Uint8Array(ye[ce-1-qe]);const nt=new Uint32Array(ye[ce-1-qe]);let Ve=pe,we=Pe,ze=-1,st=-1;for(let it=0;it<Pe;it++)for(let ot=0;ot<pe;ot++)P[je=it*pe+ot]!=nt[je]&&(ot<Ve&&(Ve=ot),ot>ze&&(ze=ot),it<we&&(we=it),it>st&&(st=it));ze==-1&&(Ve=we=ze=st=0),Ue&&((1&Ve)==1&&Ve--,(1&we)==1&&we--);const St=(ze-Ve+1)*(st-we+1);St<lt&&(lt=St,Ae=qe,W=Ve,te=we,ae=ze-Ve+1,se=st-we+1)}Ct=new Uint8Array(ye[ce-1-Ae]),Ae==1&&(He[ce-1].dispose=2),Ge=new Uint8Array(ae*se*4),n(Ct,pe,Pe,Ge,ae,se,-W,-te,0),le=n($e,pe,Pe,Ge,ae,se,-W,-te,3)?1:0,le==1?o($e,pe,Pe,Ge,{x:W,y:te,width:ae,height:se}):n($e,pe,Pe,Ge,ae,se,-W,-te,0)}else Ge=$e.slice(0);He.push({rect:{x:W,y:te,width:ae,height:se},img:Ge,blend:le,dispose:0})}if(Oe)for(ce=0;ce<He.length;ce++){if((wt=He[ce]).blend==1)continue;const $e=wt.rect,P=He[ce-1].rect,W=Math.min($e.x,P.x),te=Math.min($e.y,P.y),ae={x:W,y:te,width:Math.max($e.x+$e.width,P.x+P.width)-W,height:Math.max($e.y+$e.height,P.y+P.height)-te};He[ce-1].dispose=1,ce-1!=0&&a(ye,pe,Pe,He,ce-1,ae,Ue),a(ye,pe,Pe,He,ce,ae,Ue)}let Rt=0;if(ye.length!=1)for(var je=0;je<He.length;je++){var wt;Rt+=(wt=He[je]).rect.width*wt.rect.height}return He})(y,p,F,A,I,L),Fe={},Me=[],ge=[];if(_!=0){const Re=[];for(X=0;X<re.length;X++)Re.push(re[X].img.buffer);const ye=(function(Ue){let tt=0;for(var He=0;He<Ue.length;He++)tt+=Ue[He].byteLength;const ce=new Uint8Array(tt);let Ge=0;for(He=0;He<Ue.length;He++){const Ct=new Uint8Array(Ue[He]),Rt=Ct.length;for(let je=0;je<Rt;je+=4){let wt=Ct[je],$e=Ct[je+1],P=Ct[je+2];const W=Ct[je+3];W==0&&(wt=$e=P=0),ce[Ge+je]=wt,ce[Ge+je+1]=$e,ce[Ge+je+2]=P,ce[Ge+je+3]=W}Ge+=Rt}return ce.buffer})(Re),pe=R(ye,_);for(X=0;X<pe.plte.length;X++)Me.push(pe.plte[X].est.rgba);let Pe=0;for(X=0;X<re.length;X++){const Oe=(Be=re[X]).img.length;var Ie=new Uint8Array(pe.inds.buffer,Pe>>2,Oe>>2);ge.push(Ie);const Ue=new Uint8Array(pe.abuf,Pe,Oe);O&&u(Be.img,Be.rect.width,Be.rect.height,Me,Ue,Ie),Be.img.set(Ue),Pe+=Oe}}else for(Y=0;Y<re.length;Y++){var Be=re[Y];const Re=new Uint32Array(Be.img.buffer);var Ne=Be.rect.width;for(ne=Re.length,Ie=new Uint8Array(ne),ge.push(Ie),X=0;X<ne;X++){const ye=Re[X];if(X!=0&&ye==Re[X-1])Ie[X]=Ie[X-1];else if(X>Ne&&ye==Re[X-Ne])Ie[X]=Ie[X-Ne];else{let pe=Fe[ye];if(pe==null&&(Fe[ye]=pe=Me.length,Me.push(ye),Me.length>=300))break;Ie[X]=pe}}}const Je=Me.length;for(Je<=256&&h==0&&(z=Je<=2?1:Je<=4?2:Je<=16?4:8,z=Math.max(z,m)),Y=0;Y<re.length;Y++){(Be=re[Y]).rect.x,Be.rect.y,Ne=Be.rect.width;const Re=Be.rect.height;let ye=Be.img;new Uint32Array(ye.buffer);let pe=4*Ne,Pe=4;if(Je<=256&&h==0){pe=Math.ceil(z*Ne/8);var et=new Uint8Array(pe*Re);const Oe=ge[Y];for(let Ue=0;Ue<Re;Ue++){X=Ue*pe;const tt=Ue*Ne;if(z==8)for(var ve=0;ve<Ne;ve++)et[X+ve]=Oe[tt+ve];else if(z==4)for(ve=0;ve<Ne;ve++)et[X+(ve>>1)]|=Oe[tt+ve]<<4-4*(1&ve);else if(z==2)for(ve=0;ve<Ne;ve++)et[X+(ve>>2)]|=Oe[tt+ve]<<6-2*(3&ve);else if(z==1)for(ve=0;ve<Ne;ve++)et[X+(ve>>3)]|=Oe[tt+ve]<<7-1*(7&ve)}ye=et,C=3,Pe=1}else if(H==0&&re.length==1){et=new Uint8Array(Ne*Re*3);const Oe=Ne*Re;for(X=0;X<Oe;X++){const Ue=3*X,tt=4*X;et[Ue]=ye[tt],et[Ue+1]=ye[tt+1],et[Ue+2]=ye[tt+2]}ye=et,C=2,Pe=3,pe=3*Ne}Be.img=ye,Be.bpl=pe,Be.bpp=Pe}return{ctype:C,depth:z,plte:Me,frames:re}}function a(y,p,F,_,S,A,I){const L=Uint8Array,m=Uint32Array,h=new L(y[S-1]),O=new m(y[S-1]),C=S+1<y.length?new L(y[S+1]):null,z=new L(y[S]),G=new m(z.buffer);let Y=p,ne=F,X=-1,H=-1;for(let Fe=0;Fe<A.height;Fe++)for(let Me=0;Me<A.width;Me++){const ge=A.x+Me,Ie=A.y+Fe,Be=Ie*p+ge,Ne=G[Be];Ne==0||_[S-1].dispose==0&&O[Be]==Ne&&(C==null||C[4*Be+3]!=0)||(ge<Y&&(Y=ge),ge>X&&(X=ge),Ie<ne&&(ne=Ie),Ie>H&&(H=Ie))}X==-1&&(Y=ne=X=H=0),I&&((1&Y)==1&&Y--,(1&ne)==1&&ne--),A={x:Y,y:ne,width:X-Y+1,height:H-ne+1};const re=_[S];re.rect=A,re.blend=1,re.img=new Uint8Array(A.width*A.height*4),_[S-1].dispose==0?(n(h,p,F,re.img,A.width,A.height,-A.x,-A.y,0),o(z,p,F,re.img,A)):n(z,p,F,re.img,A.width,A.height,-A.x,-A.y,0)}function o(y,p,F,_,S){n(y,p,F,_,S.width,S.height,-S.x,-S.y,2)}function d(y,p,F,_,S,A,I){const L=[];let m,h=[0,1,2,3,4];A!=-1?h=[A]:(p*_>5e5||F==1)&&(h=[0]),I&&(m={level:0});const O=Ns;for(var C=0;C<h.length;C++){for(let Y=0;Y<p;Y++)v(S,y,Y,_,F,h[C]);L.push(O.deflate(S,m))}let z,G=1e9;for(C=0;C<L.length;C++)L[C].length<G&&(z=C,G=L[C].length);return L[z]}function v(y,p,F,_,S,A){const I=F*_;let L=I+F;if(y[L]=A,L++,A==0)if(_<500)for(var m=0;m<_;m++)y[L+m]=p[I+m];else y.set(new Uint8Array(p.buffer,I,_),L);else if(A==1){for(m=0;m<S;m++)y[L+m]=p[I+m];for(m=S;m<_;m++)y[L+m]=p[I+m]-p[I+m-S]+256&255}else if(F==0){for(m=0;m<S;m++)y[L+m]=p[I+m];if(A==2)for(m=S;m<_;m++)y[L+m]=p[I+m];if(A==3)for(m=S;m<_;m++)y[L+m]=p[I+m]-(p[I+m-S]>>1)+256&255;if(A==4)for(m=S;m<_;m++)y[L+m]=p[I+m]-B(p[I+m-S],0,0)+256&255}else{if(A==2)for(m=0;m<_;m++)y[L+m]=p[I+m]+256-p[I+m-_]&255;if(A==3){for(m=0;m<S;m++)y[L+m]=p[I+m]+256-(p[I+m-_]>>1)&255;for(m=S;m<_;m++)y[L+m]=p[I+m]+256-(p[I+m-_]+p[I+m-S]>>1)&255}if(A==4){for(m=0;m<S;m++)y[L+m]=p[I+m]+256-B(0,p[I+m-_],0)&255;for(m=S;m<_;m++)y[L+m]=p[I+m]+256-B(p[I+m-S],p[I+m-_],p[I+m-S-_])&255}}}function R(y,p){const F=new Uint8Array(y),_=F.slice(0),S=new Uint32Array(_.buffer),A=b(_,p),I=A[0],L=A[1],m=F.length,h=new Uint8Array(m>>2);let O;if(F.length<2e7)for(var C=0;C<m;C+=4)O=T(I,z=F[C]*(1/255),G=F[C+1]*(1/255),Y=F[C+2]*(1/255),ne=F[C+3]*(1/255)),h[C>>2]=O.ind,S[C>>2]=O.est.rgba;else for(C=0;C<m;C+=4){var z=F[C]*.00392156862745098,G=F[C+1]*(1/255),Y=F[C+2]*(1/255),ne=F[C+3]*(1/255);for(O=I;O.left;)O=K(O.est,z,G,Y,ne)<=0?O.left:O.right;h[C>>2]=O.ind,S[C>>2]=O.est.rgba}return{abuf:_.buffer,inds:h,plte:L}}function b(y,p,F){F==null&&(F=1e-4);const _=new Uint32Array(y.buffer),S={i0:0,i1:y.length,bst:null,est:null,tdst:0,left:null,right:null};S.bst=q(y,S.i0,S.i1),S.est=M(S.bst);const A=[S];for(;A.length<p;){let L=0,m=0;for(var I=0;I<A.length;I++)A[I].est.L>L&&(L=A[I].est.L,m=I);if(L<F)break;const h=A[m],O=j(y,_,h.i0,h.i1,h.est.e,h.est.eMq255);if(h.i0>=O||h.i1<=O){h.est.L=0;continue}const C={i0:h.i0,i1:O,bst:null,est:null,tdst:0,left:null,right:null};C.bst=q(y,C.i0,C.i1),C.est=M(C.bst);const z={i0:O,i1:h.i1,bst:null,est:null,tdst:0,left:null,right:null};for(z.bst={R:[],m:[],N:h.bst.N-C.bst.N},I=0;I<16;I++)z.bst.R[I]=h.bst.R[I]-C.bst.R[I];for(I=0;I<4;I++)z.bst.m[I]=h.bst.m[I]-C.bst.m[I];z.est=M(z.bst),h.left=C,h.right=z,A[m]=C,A.push(z)}for(A.sort(((L,m)=>m.bst.N-L.bst.N)),I=0;I<A.length;I++)A[I].ind=I;return[S,A]}function T(y,p,F,_,S){if(y.left==null)return y.tdst=(function(C,z,G,Y,ne){const X=z-C[0],H=G-C[1],re=Y-C[2],Fe=ne-C[3];return X*X+H*H+re*re+Fe*Fe})(y.est.q,p,F,_,S),y;const A=K(y.est,p,F,_,S);let I=y.left,L=y.right;A>0&&(I=y.right,L=y.left);const m=T(I,p,F,_,S);if(m.tdst<=A*A)return m;const h=T(L,p,F,_,S);return h.tdst<m.tdst?h:m}function K(y,p,F,_,S){const{e:A}=y;return A[0]*p+A[1]*F+A[2]*_+A[3]*S-y.eMq}function j(y,p,F,_,S,A){for(_-=4;F<_;){for(;x(y,F,S)<=A;)F+=4;for(;x(y,_,S)>A;)_-=4;if(F>=_)break;const I=p[F>>2];p[F>>2]=p[_>>2],p[_>>2]=I,F+=4,_-=4}for(;x(y,F,S)>A;)F-=4;return F+4}function x(y,p,F){return y[p]*F[0]+y[p+1]*F[1]+y[p+2]*F[2]+y[p+3]*F[3]}function q(y,p,F){const _=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S=[0,0,0,0],A=F-p>>2;for(let I=p;I<F;I+=4){const L=y[I]*.00392156862745098,m=y[I+1]*(1/255),h=y[I+2]*(1/255),O=y[I+3]*(1/255);S[0]+=L,S[1]+=m,S[2]+=h,S[3]+=O,_[0]+=L*L,_[1]+=L*m,_[2]+=L*h,_[3]+=L*O,_[5]+=m*m,_[6]+=m*h,_[7]+=m*O,_[10]+=h*h,_[11]+=h*O,_[15]+=O*O}return _[4]=_[1],_[8]=_[2],_[9]=_[6],_[12]=_[3],_[13]=_[7],_[14]=_[11],{R:_,m:S,N:A}}function M(y){const{R:p}=y,{m:F}=y,{N:_}=y,S=F[0],A=F[1],I=F[2],L=F[3],m=_==0?0:1/_,h=[p[0]-S*S*m,p[1]-S*A*m,p[2]-S*I*m,p[3]-S*L*m,p[4]-A*S*m,p[5]-A*A*m,p[6]-A*I*m,p[7]-A*L*m,p[8]-I*S*m,p[9]-I*A*m,p[10]-I*I*m,p[11]-I*L*m,p[12]-L*S*m,p[13]-L*A*m,p[14]-L*I*m,p[15]-L*L*m],O=h,C=N;let z=[Math.random(),Math.random(),Math.random(),Math.random()],G=0,Y=0;if(_!=0)for(let X=0;X<16&&(z=C.multVec(O,z),Y=Math.sqrt(C.dot(z,z)),z=C.sml(1/Y,z),!(X!=0&&Math.abs(Y-G)<1e-9));X++)G=Y;const ne=[S*m,A*m,I*m,L*m];return{Cov:h,q:ne,e:z,L:G,eMq255:C.dot(C.sml(255,ne),z),eMq:C.dot(z,ne),rgba:(Math.round(255*ne[3])<<24|Math.round(255*ne[2])<<16|Math.round(255*ne[1])<<8|Math.round(255*ne[0])<<0)>>>0}}var N={multVec:(y,p)=>[y[0]*p[0]+y[1]*p[1]+y[2]*p[2]+y[3]*p[3],y[4]*p[0]+y[5]*p[1]+y[6]*p[2]+y[7]*p[3],y[8]*p[0]+y[9]*p[1]+y[10]*p[2]+y[11]*p[3],y[12]*p[0]+y[13]*p[1]+y[14]*p[2]+y[15]*p[3]],dot:(y,p)=>y[0]*p[0]+y[1]*p[1]+y[2]*p[2]+y[3]*p[3],sml:(y,p)=>[y*p[0],y*p[1],y*p[2],y*p[3]]};xt.encode=function(p,F,_,S,A,I,L){S==null&&(S=0),L==null&&(L=!1);const m=i(p,F,_,S,[!1,!1,!1,0,L,!1]);return $(m,-1),w(m,F,_,A,I)},xt.encodeLL=function(p,F,_,S,A,I,L,m){const h={ctype:0+(S==1?0:2)+(A==0?0:4),depth:I,frames:[]},O=(S+A)*I,C=O*F;for(let z=0;z<p.length;z++)h.frames.push({rect:{x:0,y:0,width:F,height:_},img:new Uint8Array(p[z]),blend:0,dispose:1,bpp:Math.ceil(O/8),bpl:Math.ceil(C/8)});return $(h,0,!0),w(h,F,_,L,m)},xt.encode.compress=i,xt.encode.dither=u,xt.quantize=R,xt.quantize.getKDtree=b,xt.quantize.getNearest=T})();const Oi={toArrayBuffer(n,f){const B=n.width,r=n.height,e=B<<2,t=n.getContext("2d").getImageData(0,0,B,r),l=new Uint32Array(t.data.buffer),u=(32*B+31)/32<<2,w=u*r,$=122+w,i=new ArrayBuffer($),a=new DataView(i),o=1<<20;let d,v,R,b,T=o,K=0,j=0,x=0;function q(y){a.setUint16(j,y,!0),j+=2}function M(y){a.setUint32(j,y,!0),j+=4}function N(y){j+=y}q(19778),M($),N(4),M(122),M(108),M(B),M(-r>>>0),q(1),q(32),M(3),M(w),M(2835),M(2835),N(8),M(16711680),M(65280),M(255),M(4278190080),M(1466527264),(function y(){for(;K<r&&T>0;){for(b=122+K*u,d=0;d<e;)T--,v=l[x++],R=v>>>24,a.setUint32(b+d,v<<8|R),d+=4;K++}x<l.length?(T=o,setTimeout(y,Oi._dly)):f(i)})()},toBlob(n,f){this.toArrayBuffer(n,(B=>{f(new Blob([B],{type:"image/bmp"}))}))},_dly:9};var _t={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},Ps={[_t.CHROME]:16384,[_t.FIREFOX]:11180,[_t.DESKTOP_SAFARI]:16384,[_t.IE]:8192,[_t.IOS]:4096,[_t.ETC]:8192};const Zn=typeof window<"u",Ui=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,An=Zn&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),Hs=(Zn||Ui)&&(An&&An.getOriginalSymbol(window,"File")||typeof File<"u"&&File),zi=(Zn||Ui)&&(An&&An.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function ei(n,f,B=Date.now()){return new Promise((r=>{const e=n.split(","),t=e[0].match(/:(.*?);/)[1],l=globalThis.atob(e[1]);let u=l.length;const w=new Uint8Array(u);for(;u--;)w[u]=l.charCodeAt(u);const $=new Blob([w],{type:t});$.name=f,$.lastModified=B,r($)}))}function Ni(n){return new Promise(((f,B)=>{const r=new zi;r.onload=()=>f(r.result),r.onerror=e=>B(e),r.readAsDataURL(n)}))}function Pi(n){return new Promise(((f,B)=>{const r=new Image;r.onload=()=>f(r),r.onerror=e=>B(e),r.src=n}))}function Qt(){if(Qt.cachedResult!==void 0)return Qt.cachedResult;let n=_t.ETC;const{userAgent:f}=navigator;return/Chrom(e|ium)/i.test(f)?n=_t.CHROME:/iP(ad|od|hone)/i.test(f)&&/WebKit/i.test(f)?n=_t.IOS:/Safari/i.test(f)?n=_t.DESKTOP_SAFARI:/Firefox/i.test(f)?n=_t.FIREFOX:(/MSIE/i.test(f)||document.documentMode)&&(n=_t.IE),Qt.cachedResult=n,Qt.cachedResult}function Hi(n,f){const B=Qt(),r=Ps[B];let e=n,t=f,l=e*t;const u=e>t?t/e:e/t;for(;l>r*r;){const w=(r+e)/2,$=(r+t)/2;w<$?(t=$,e=$*u):(t=w*u,e=w),l=e*t}return{width:e,height:t}}function Dn(n,f){let B,r;try{if(B=new OffscreenCanvas(n,f),r=B.getContext("2d"),r===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{B=document.createElement("canvas"),r=B.getContext("2d")}return B.width=n,B.height=f,[B,r]}function ji(n,f){const{width:B,height:r}=Hi(n.width,n.height),[e,t]=Dn(B,r);return f&&/jpe?g/.test(f)&&(t.fillStyle="white",t.fillRect(0,0,e.width,e.height)),t.drawImage(n,0,0,e.width,e.height),e}function Sn(){return Sn.cachedResult!==void 0||(Sn.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),Sn.cachedResult}function Tn(n,f={}){return new Promise((function(B,r){let e,t;var l=function(){try{return t=ji(e,f.fileType||n.type),B([e,t])}catch(w){return r(w)}},u=function(w){try{var $=function(i){try{throw i}catch(a){return r(a)}};try{let i;return Ni(n).then((function(a){try{return i=a,Pi(i).then((function(o){try{return e=o,(function(){try{return l()}catch(d){return r(d)}})()}catch(d){return $(d)}}),$)}catch(o){return $(o)}}),$)}catch(i){$(i)}}catch(i){return r(i)}};try{if(Sn()||[_t.DESKTOP_SAFARI,_t.MOBILE_SAFARI].includes(Qt()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(n).then((function(w){try{return e=w,l()}catch{return u()}}),u)}catch{u()}}))}function En(n,f,B,r,e=1){return new Promise((function(t,l){let u;if(f==="image/png"){let $,i,a;return $=n.getContext("2d"),{data:i}=$.getImageData(0,0,n.width,n.height),a=xt.encode([i.buffer],n.width,n.height,4096*e),u=new Blob([a],{type:f}),u.name=B,u.lastModified=r,w.call(this)}{let $=function(){return w.call(this)};if(f==="image/bmp")return new Promise((i=>Oi.toBlob(n,i))).then((function(i){try{return u=i,u.name=B,u.lastModified=r,$.call(this)}catch(a){return l(a)}}).bind(this),l);{let i=function(){return $.call(this)};if(typeof OffscreenCanvas=="function"&&n instanceof OffscreenCanvas)return n.convertToBlob({type:f,quality:e}).then((function(a){try{return u=a,u.name=B,u.lastModified=r,i.call(this)}catch(o){return l(o)}}).bind(this),l);{let a;return a=n.toDataURL(f,e),ei(a,B,r).then((function(o){try{return u=o,i.call(this)}catch(d){return l(d)}}).bind(this),l)}}}function w(){return t(u)}}))}function Lt(n){n.width=0,n.height=0}function Xt(){return new Promise((function(n,f){let B,r,e,t;return Xt.cachedResult!==void 0?n(Xt.cachedResult):ei("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(l){try{return B=l,Tn(B).then((function(u){try{return r=u[1],En(r,B.type,B.name,B.lastModified).then((function(w){try{return e=w,Lt(r),Tn(e).then((function($){try{return t=$[0],Xt.cachedResult=t.width===1&&t.height===2,n(Xt.cachedResult)}catch(i){return f(i)}}),f)}catch($){return f($)}}),f)}catch(w){return f(w)}}),f)}catch(u){return f(u)}}),f)}))}function qi(n){return new Promise(((f,B)=>{const r=new zi;r.onload=e=>{const t=new DataView(e.target.result);if(t.getUint16(0,!1)!=65496)return f(-2);const l=t.byteLength;let u=2;for(;u<l;){if(t.getUint16(u+2,!1)<=8)return f(-1);const w=t.getUint16(u,!1);if(u+=2,w==65505){if(t.getUint32(u+=2,!1)!=1165519206)return f(-1);const $=t.getUint16(u+=6,!1)==18761;u+=t.getUint32(u+4,$);const i=t.getUint16(u,$);u+=2;for(let a=0;a<i;a++)if(t.getUint16(u+12*a,$)==274)return f(t.getUint16(u+12*a+8,$))}else{if((65280&w)!=65280)break;u+=t.getUint16(u,!1)}}return f(-1)},r.onerror=e=>B(e),r.readAsArrayBuffer(n)}))}function Vi(n,f){const{width:B}=n,{height:r}=n,{maxWidthOrHeight:e}=f;let t,l=n;return isFinite(e)&&(B>e||r>e)&&([l,t]=Dn(B,r),B>r?(l.width=e,l.height=r/B*e):(l.width=B/r*e,l.height=e),t.drawImage(n,0,0,l.width,l.height),Lt(n)),l}function Wi(n,f){const{width:B}=n,{height:r}=n,[e,t]=Dn(B,r);switch(f>4&&f<9?(e.width=r,e.height=B):(e.width=B,e.height=r),f){case 2:t.transform(-1,0,0,1,B,0);break;case 3:t.transform(-1,0,0,-1,B,r);break;case 4:t.transform(1,0,0,-1,0,r);break;case 5:t.transform(0,1,1,0,0,0);break;case 6:t.transform(0,1,-1,0,r,0);break;case 7:t.transform(0,-1,-1,0,r,B);break;case 8:t.transform(0,-1,1,0,0,B)}return t.drawImage(n,0,0,B,r),Lt(n),e}function ki(n,f,B=0){return new Promise((function(r,e){let t,l,u,w,$,i,a,o,d,v,R,b,T,K,j,x,q,M,N,y;function p(_=5){if(f.signal&&f.signal.aborted)throw f.signal.reason;t+=_,f.onProgress(Math.min(t,100))}function F(_){if(f.signal&&f.signal.aborted)throw f.signal.reason;t=Math.min(Math.max(_,t),100),f.onProgress(t)}return t=B,l=f.maxIteration||10,u=1024*f.maxSizeMB*1024,p(),Tn(n,f).then((function(_){try{return[,w]=_,p(),$=Vi(w,f),p(),new Promise((function(S,A){var I;if(!(I=f.exifOrientation))return qi(n).then((function(m){try{return I=m,L.call(this)}catch(h){return A(h)}}).bind(this),A);function L(){return S(I)}return L.call(this)})).then((function(S){try{return i=S,p(),Xt().then((function(A){try{return a=A?$:Wi($,i),p(),o=f.initialQuality||1,d=f.fileType||n.type,En(a,d,n.name,n.lastModified,o).then((function(I){try{{let m=function(){if(l--&&(j>u||j>T)){let O,C;return O=y?.95*N.width:N.width,C=y?.95*N.height:N.height,[q,M]=Dn(O,C),M.drawImage(N,0,0,O,C),o*=d==="image/png"?.85:.95,En(q,d,n.name,n.lastModified,o).then((function(z){try{return x=z,Lt(N),N=q,j=x.size,F(Math.min(99,Math.floor((K-j)/(K-u)*100))),m}catch(G){return e(G)}}),e)}return[1]},h=function(){return Lt(N),Lt(q),Lt($),Lt(a),Lt(w),F(100),r(x)};if(v=I,p(),R=v.size>u,b=v.size>n.size,!R&&!b)return F(100),r(v);var L;return T=n.size,K=v.size,j=K,N=a,y=!f.alwaysKeepResolution&&R,(L=(function(O){for(;O;){if(O.then)return void O.then(L,e);try{if(O.pop){if(O.length)return O.pop()?h.call(this):O;O=m}else O=O.call(this)}catch(C){return e(C)}}}).bind(this))(m)}}catch(m){return e(m)}}).bind(this),e)}catch(I){return e(I)}}).bind(this),e)}catch(A){return e(A)}}).bind(this),e)}catch(S){return e(S)}}).bind(this),e)}))}const js=`
|
|
3
|
+
let scriptImported = false
|
|
4
|
+
self.addEventListener('message', async (e) => {
|
|
5
|
+
const { file, id, imageCompressionLibUrl, options } = e.data
|
|
6
|
+
options.onProgress = (progress) => self.postMessage({ progress, id })
|
|
7
|
+
try {
|
|
8
|
+
if (!scriptImported) {
|
|
9
|
+
// console.log('[worker] importScripts', imageCompressionLibUrl)
|
|
10
|
+
self.importScripts(imageCompressionLibUrl)
|
|
11
|
+
scriptImported = true
|
|
12
|
+
}
|
|
13
|
+
// console.log('[worker] self', self)
|
|
14
|
+
const compressedFile = await imageCompression(file, options)
|
|
15
|
+
self.postMessage({ file: compressedFile, id })
|
|
16
|
+
} catch (e) {
|
|
17
|
+
// console.error('[worker] error', e)
|
|
18
|
+
self.postMessage({ error: e.message + '\\n' + e.stack, id })
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
`;let qn;function qs(n,f){return new Promise(((B,r)=>{qn||(qn=(function(l){const u=[];return u.push(l),URL.createObjectURL(new Blob(u))})(js));const e=new Worker(qn);e.addEventListener("message",(function(l){if(f.signal&&f.signal.aborted)e.terminate();else if(l.data.progress===void 0){if(l.data.error)return r(new Error(l.data.error)),void e.terminate();B(l.data.file),e.terminate()}else f.onProgress(l.data.progress)})),e.addEventListener("error",r),f.signal&&f.signal.addEventListener("abort",(()=>{r(f.signal.reason),e.terminate()})),e.postMessage({file:n,imageCompressionLibUrl:f.libURL,options:{...f,onProgress:void 0,signal:void 0}})}))}function gt(n,f){return new Promise((function(B,r){let e,t,l,u,w,$;if(e={...f},l=0,{onProgress:u}=e,e.maxSizeMB=e.maxSizeMB||Number.POSITIVE_INFINITY,w=typeof e.useWebWorker!="boolean"||e.useWebWorker,delete e.useWebWorker,e.onProgress=d=>{l=d,typeof u=="function"&&u(l)},!(n instanceof Blob||n instanceof Hs))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(n.type))return r(new Error("The file given is not an image"));if($=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!w||typeof Worker!="function"||$)return ki(n,e).then((function(d){try{return t=d,o.call(this)}catch(v){return r(v)}}).bind(this),r);var i=(function(){try{return o.call(this)}catch(d){return r(d)}}).bind(this),a=function(d){try{return ki(n,e).then((function(v){try{return t=v,i()}catch(R){return r(R)}}),r)}catch(v){return r(v)}};try{return e.libURL=e.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",qs(n,e).then((function(d){try{return t=d,i()}catch{return a()}}),a)}catch{a()}function o(){try{t.name=n.name,t.lastModified=n.lastModified}catch{}try{e.preserveExif&&n.type==="image/jpeg"&&(!e.fileType||e.fileType&&e.fileType===n.type)&&(t=Bi(n,t))}catch{}return B(t)}}))}gt.getDataUrlFromFile=Ni,gt.getFilefromDataUrl=ei,gt.loadImage=Pi,gt.drawImageInCanvas=ji,gt.drawFileInCanvas=Tn,gt.canvasToFile=En,gt.getExifOrientation=qi,gt.handleMaxWidthOrHeight=Vi,gt.followExifOrientation=Wi,gt.cleanupCanvasMemory=Lt,gt.isAutoOrientationInBrowser=Xt,gt.approximateBelowMaximumCanvasSizeOfBrowser=Hi,gt.copyExifWithoutOrientation=Bi,gt.getBrowserName=Qt,gt.version="2.0.2";const Vs={class:"info"},Ws=["src"],Qs={class:"info"},Gs={key:0},Ks={key:1},Js={class:"more"},Ys={key:0,class:"note note-nomsg"},Xs={key:1,class:"note note-nomsg"},Zs={class:"ss-card"},er={key:0},tr={class:"ss-card jin-pan"},nr=["src"],ir={class:"context"},or={key:0},ar=["src","onClick"],sr={class:"jin-pan-load"},rr={class:"imgs"},lr={class:"img-btns"},ur=["onClick"],cr=["onClick"],fr={class:"img"},dr=["src"],hr=["onClick"],mr={key:0,class:"emp"},gr=["title"],vr={for:"choice-pic",class:"sr-only"},pr=["title"],yr={for:"choice-file",class:"sr-only"},wr=["title"],br={for:"choice-video",class:"sr-only"},kr={class:"voice-menu-wrap"},Ir=["title"],_r=["title"],Sr={for:"main-input",class:"sr-only"},Cr=["disabled","placeholder"],Mr={for:"main-input-ex",class:"sr-only"},Ar=["disabled"],Tr={key:0,class:"forward-pan"},Er={class:"ss-card card"},xr={for:"chat-forward-search",class:"sr-only"},Fr=["placeholder"],$r=["onClick"],Lr=["title","src"],Rr=4,Dr=zt({name:"ViewChat",__name:"Chat",props:{chat:{},list:{},imgView:{}},setup(n){const f=$n.global.t,{viewer:B}=Io("viewer",{viewer:null}),r=_o(),e=Si(),t=Jn(),l=xn(),u=Fn(),w=_i(),$=nn("mergePan"),i=nn("msgPan"),a=nn("chatPadding"),o=nn("sendMore"),d=nn("mainInput"),v=he([]),R=he("single-message"),b=he({sendTag:"REFUSE",showBottomButton:!1,showMoreDetail:!1,showMsgMenu:!1,showForwardPan:!1,openChatInfo:!1,isReply:!1,isJinLoading:!1,onAtFind:!1,menuDisplay:{menuSelectedMsgId:null,jumpToMsg:!1,add:!0,relpy:!0,forward:!0,select:!0,copy:!0,copySelect:!1,copyImg:!1,downloadImg:!1,revoke:!1,reedit:!1,at:!0,poke:!1,remove:!1,respond:!1,showRespond:!0,config:!1},search:{userId:-1,list:vn(n.list)},msgTouch:{x:-1,y:-1,msgOnTouchDown:!1,onMove:"no"},checkNewLineFlag:!1}),T=he([{open:!1},{open:!1},{open:!1},{open:!1}]),K=he([]),j=he(0),x=he(""),q=he(""),M=he(new Map),N=he(!1),y=he(null),p=he(!1),F=he(null);let _=[];const S=he([]),A=he(null),I=he(""),L=he(null),m=he(0),h=he(null),O=he(null),C=he(null),z=he(0),G=he(w.userList),Y=he(void 0),ne=Ai(),X=!1;let H=null;function re(s,c){return/^(?:group|room|chat|channel|guild|private):/i.test(s)?s:`${c}:${s}`}function Fe(s){const c=Number((s==null?void 0:s.local_time)??(s==null?void 0:s.timestamp_ms)??(s==null?void 0:s.time_ms)??0);if(c)return c;const k=Number((s==null?void 0:s.time)??0);return Number.isFinite(k)&&k>0?k*1e3:0}async function Me(){const s=n.chat.show.id;if(!s||s===0||T.value[3].open||b.value.showForwardPan)return;const c=n.chat.show.type==="group"?re(String(n.chat.show.channel_id??s),"group"):re(String(n.chat.show.channel_id??s),"private");let k=[];try{k=await pi({platform:String(l.loginInfo.platform??""),selfId:String(l.loginInfo.uin??""),channelId:c,limit:30})}catch{return}if(!k.length||String(n.chat.show.id)!==String(s))return;const U=new Set,E=oe=>{const de=String((oe==null?void 0:oe.message_id)??""),Te=String((oe==null?void 0:oe.fake_message_id)??"");de&&U.add(de),Te&&U.add(Te)},J=[...u.messageList];for(const oe of J)E(oe);let Z=!1;for(const oe of k){const de=String(oe.message_id??""),Te=String(oe.fake_message_id??"");de&&U.has(de)||Te&&U.has(Te)||!de&&!Te||(E(oe),J.push(oe),Z=!0)}Z&&(J.sort((oe,de)=>Fe(oe)-Fe(de)),u.messageList.splice(0,u.messageList.length,...J))}function ge(){H!==null&&(window.clearInterval(H),H=null),n.chat.show.id&&(Me(),H=window.setInterval(()=>{Me()},2500))}function Ie(){H!==null&&(window.clearInterval(H),H=null)}const Be={beforeHook:s=>{const c=zn();if(!c)return;c.style.transition="all 0s";const k=document.getElementById("chat-pan");if(!k)return;const U=k.getElementsByClassName("chat")[0];U&&(U.style.overflowY="hidden")},moveHook:(s,c)=>{const k=zn();k&&(k.style.transform="translateX("+c+"px)")},endHook:s=>{const c=document.getElementById("chat-pan"),k=c==null?void 0:c.getElementsByClassName("chat")[0];k&&(k.style.overflowY="scroll");const U=zn();U&&(U.style.transition="transform 0.3s",U.style.transform="")},rightLimit:{value:100,type:"%"},speedCondition:{minMove:{value:.5*e.inch,type:"px"},minSpeed:5*e.inch},moveCondition:{minMove:{value:33,type:"%"}}};function Ne(){j.value=0,b.value={sendTag:"REFUSE",showBottomButton:!1,showMoreDetail:!1,showMsgMenu:!1,showForwardPan:!1,openChatInfo:!1,isReply:!1,isJinLoading:!1,onAtFind:!1,menuDisplay:{menuSelectedMsgId:null,jumpToMsg:!1,add:!0,relpy:!0,forward:!0,select:!0,copy:!0,copySelect:!1,copyImg:!1,downloadImg:!1,revoke:!1,reedit:!1,at:!0,poke:!1,remove:!1,respond:!1,showRespond:!0,config:!1},search:{userId:-1,list:vn(n.list)},msgTouch:{x:-1,y:-1,msgOnTouchDown:!1,onMove:"no"},checkNewLineFlag:!1},K.value=[],pe=!0}It(()=>n.chat,()=>{Ne(),S.value=[],M.value.clear(),v.value=[],ot(),pt(()=>{Oe(),Ge(),je()}),ge();const s=vi(),c=n.chat.show.id,k=[...w.userList].find(U=>(U.user_id??U.group_id)===c);k&&s.add(k)}),It(()=>x.value,(s,c)=>{q.value=c,Oe()}),cn(()=>{ge();const s=vi(),c=n.chat.show.id,k=[...w.userList].find(U=>(U.user_id??U.group_id)===c);k&&s.add(k),ri(n.list.length,0),It(()=>n.list.map(U=>U.message_id+"_"+U.fake_msg),(U,E=[])=>{ri(U.length,E.length),U.length>0&&E.length===0&&pt(ae)}),It(()=>n.chat.info.jin_info.list.length,()=>{b.value.isJinLoading=!1}),yt.type=="capacitor"&&yt.platform==="android"&&yt.addListener("App","backButton",()=>{mn()}),It(()=>r.backTimes,()=>{mn()}),pt(()=>{He(),ce(),Oe(),Ge(),je()})}),Kn(()=>{if(Ie(),Je!==null&&(cancelAnimationFrame(Je),Je=null),et!==null&&(cancelAnimationFrame(et),et=null),ve!==null&&(ve.disconnect(),ve=null),Re!==null&&(Re.disconnect(),Re=null),ye!==null){const s=i.value;s==null||s.removeEventListener("load",ye,!0),s==null||s.removeEventListener("error",ye,!0),s==null||s.removeEventListener("loadedmetadata",ye,!0),s==null||s.removeEventListener("loadeddata",ye,!0),ye=null}});let Je=null,et=null,ve=null,Re=null,ye=null,pe=!0,Pe=[];function Oe(s,c=!1){pt(()=>{Je!==null&&cancelAnimationFrame(Je),Je=requestAnimationFrame(()=>{Je=null,Ct(s??d.value),tt(c?()=>ae():void 0)})})}function Ue(){const s=o.value,c=a.value,k=i.value;if(!s||!c||!k)return;const U=Array.from(s.children).flatMap(Z=>Array.from(Z.children)).filter(Z=>Z instanceof HTMLElement&&Z.offsetHeight>0),E=U.length>0?U.reduce((Z,oe)=>Math.min(Z,oe.getBoundingClientRect().top),Number.POSITIVE_INFINITY):s.getBoundingClientRect().top,J=k.getBoundingClientRect().bottom;c.style.height=Math.max(0,J-E)+"px"}function tt(s){s&&Pe.push(s),et===null&&(et=requestAnimationFrame(()=>{et=null,Ue();const c=Pe;Pe=[],c.forEach(k=>k())}))}function He(){if(ve!==null)return;const s=o.value;if(!s||typeof ResizeObserver>"u"){tt();return}ve=new ResizeObserver(()=>{tt()}),ve.observe(s),tt()}function ce(){const s=i.value;if(!s||Re!==null||ye!==null)return;const c=()=>{je(),Ge()};ye=c,s.addEventListener("load",c,!0),s.addEventListener("error",c,!0),s.addEventListener("loadedmetadata",c,!0),s.addEventListener("loadeddata",c,!0),!(typeof ResizeObserver>"u")&&(Re=new ResizeObserver(()=>{c()}),Re.observe(s),s.firstElementChild&&Re.observe(s.firstElementChild))}function Ge(){!pe||!i.value||(ae(!1),requestAnimationFrame(()=>{!pe||!i.value||(ae(!1),requestAnimationFrame(()=>{pe&&i.value&&ae(!1)}))}))}function Ct(s){const c=s??d.value;if(!c)return;if(t.sysConfig.send_key==="none"){c.style.height="";return}if(!(c instanceof HTMLTextAreaElement)){c.style.height="";return}const k=getComputedStyle(c),U=Number.parseFloat(k.lineHeight),E=Number.parseFloat(k.fontSize),J=Number.isFinite(U)?U:E,Z=Number.parseFloat(k.paddingTop)||0,oe=Number.parseFloat(k.paddingBottom)||0,de=Number.parseFloat(k.borderTopWidth)||0,Te=Number.parseFloat(k.borderBottomWidth)||0;let me=(Number.isFinite(J)?J:0)+Z+oe+de+Te;if(me<=0){const Xe=c.offsetHeight||Number.parseFloat(k.height)||E;Xe&&Number.isFinite(Xe)&&(me=Xe)}c.dataset.baseHeight||(c.dataset.baseHeight=String(me));const ut=c.style.transition;c.style.transition="none";const We=c.style.overflow,Ee=Number.parseFloat(c.dataset.baseHeight)||me;if(c.value==="")c.style.height=Ee+"px";else{c.style.overflow="hidden",c.style.height="0px";const Xe=Math.max(c.scrollHeight-Rr,Ee);c.style.height=Xe+"px",c.style.overflow=We}c.getBoundingClientRect(),c.style.transition=ut}function Rt(){ui(),pt(()=>{var s;A.value&&(on("chat-"+((s=A.value)==null?void 0:s.message_id),!0),ct())})}function je(){const s=i.value;if(!s)return;const c=s.scrollHeight>s.clientHeight+1,k=s.scrollTop+s.clientHeight+10>=s.scrollHeight;b.value.showBottomButton=c&&!k}function wt(s,c){if(c)return;const k=s.target;k.scrollTop===0&&n.list.length>0&&$e(),k.scrollTop+k.clientHeight+10>=k.scrollHeight?(pe=!0,j.value=0,b.value.showBottomButton=!1):(pe&&(pe=!1),je())}async function $e(){if(!e.nowGetHistory&&e.canLoadHistory!==!1){const s=n.list[0],c=s.message_id,k=Number(s==null?void 0:s.time),U=Number((s==null?void 0:s.local_time)??(s==null?void 0:s.timestamp_ms)??(s==null?void 0:s.time_ms)??0)||(Number.isFinite(k)?k*1e3:0),E=t.sysConfig.enable_local_history&&t.sysConfig.mixed_load_messages!==!1;if(e.nowGetHistory=!0,E&&Number.isFinite(k)?e.historyBeforeTime=k:e.historyBeforeTime=void 0,e.loadHistoryFail=!1,E){let We=[];if(Number.isFinite(k)?We=await xo(l.loginInfo.uin,u.chatInfo.show.id,k,20):We=await Fo(l.loginInfo.uin,u.chatInfo.show.id,c,20),We.length>0){const Ee=new Set(u.messageList.map($t=>String($t.message_id??""))),Xe=We.filter($t=>{const At=String(($t==null?void 0:$t.message_id)??"");return At.length===0||!Ee.has(At)});Xe.length>0&&u.messageList.splice(0,0,...Xe);const Ze=n.list[Xe.length]??n.list[Xe.length-1],Et=P([...Xe,Ze]);Et.length>0&&W(Et)}}const J=u.chatInfo.show.type,Z=u.chatInfo.show.id,oe=String(u.chatInfo.show.channel_id??""),de=J==="group"?re(oe||String(Z),"group"):re(oe||String(Z),"private"),Te=await pi({platform:String(l.loginInfo.platform??""),selfId:String(l.loginInfo.uin??""),channelId:de,limit:20,beforeTimeMs:U>0?U:void 0}),me=new Set(u.messageList.map(We=>String(We.message_id??""))),ut=Te.filter(We=>{const Ee=String(We.message_id??"");return Ee.length===0||!me.has(Ee)});ut.length>0&&u.messageList.splice(0,0,...ut),Te.length<20&&(e.canLoadHistory=!1),e.nowGetHistory=!1}}function P(s){const c=[];for(let k=0;k<s.length-1;k++){const U=s[k].message_seq??s[k].seq??null,E=s[k+1].message_seq??s[k+1].seq??null;if(U==null||E==null)return[];E-U>1&&c.push(s[k+1].message_id)}return c}function W(s){var Z;const c=u.chatInfo.show.type,k=u.chatInfo.show.id,U=String(u.chatInfo.show.channel_id??k),E=String(u.chatInfo.show.guild_id??k);let J;l.jsonMap.message_list&&c!="group"?J=l.jsonMap.message_list.private_name:J=(Z=l.jsonMap.message_list)==null?void 0:Z.name;for(const oe of s)at.send(J??"get_chat_history",{group_id:c=="group"?E||k:void 0,guild_id:c=="group"?E||k:void 0,channel_id:U,user_id:c!="group"?k:void 0,message_id:oe,count:20},"getChatHistoryGapFill_"+oe)}function te(s,c=!0){const k=document.getElementById("msgPan");k!==null&&s&&(c===!1?k.style.scrollBehavior="unset":k.style.scrollBehavior="smooth",k.scrollTop=s,k.style.scrollBehavior="smooth")}function ae(s=!1){const c=document.getElementById("msgPan");c!==null&&te(c.scrollHeight,s)}function se(s){on(s,!0)||new ft().add(Le.INFO,f("无法定位上下文"))}function le(s){const c=document.getElementById("msgPan");c&&(n.list.length<=20&&!b.value.showBottomButton?ae():te(c.scrollTop+s,!1))}function ue(s){if(Ae(s)||b.value.onAtFind||s.key!=="Enter")return;let c=!1;switch(t.sysConfig.send_key){case"none":if(s.shiftKey||s.ctrlKey||s.altKey||s.metaKey)break;c=!0;break;case"shift":if(!s.shiftKey)break;c=!0;break;case"ctrl":if(!s.ctrlKey)break;c=!0;break;case"alt":if(!s.altKey)break;c=!0;break;case"meta":if(!s.metaKey)break;c=!0;break}c&&b.value.sendTag!="PASS"&&(b.value.sendTag="READY"),b.value.sendTag=="READY"&&x.value!==""?(s.preventDefault(),tn()):s.key==="Enter"&&(s.ctrlKey||s.metaKey||s.altKey)&&(x.value+=`
|
|
22
|
+
`),b.value.sendTag="REFUSE"}function Ae(s){var c;if(!b.value.onAtFind)return!1;if(s.keyCode===38||s.keyCode===40){s.preventDefault();const k=s.keyCode===38?-1:1;return st(k),h.value!==null||(h.value=setTimeout(()=>{O.value=setInterval(()=>{st(k)},50)},300)),!0}if(s.keyCode===13){s.preventDefault();const k=(c=L.value)==null?void 0:c[m.value];return k&&we(k.user_id),!0}return s.keyCode===27?(s.preventDefault(),b.value.onAtFind=!1,L.value=null,m.value=0,!0):!1}function lt(){b.value.sendTag="REFUSE"}function qe(){b.value.sendTag="PASS",setTimeout(()=>{b.value.sendTag="REFUSE"},50)}function nt(s){const c=new Ut;if(s.keyCode!==27&&((s.keyCode===38||s.keyCode===40)&&(h.value!==null&&(clearTimeout(h.value),h.value=null),O.value!==null&&(clearInterval(O.value),O.value=null)),b.value.checkNewLineFlag&&(b.value.checkNewLineFlag=!1,x.value==`
|
|
23
|
+
`&&(x.value="",Oe())),!(b.value.onAtFind&&L.value&&L.value.length>0&&(s.keyCode===38||s.keyCode===40||s.keyCode===13||s.keyCode===27))&&s.keyCode!=13)){const k=x.value.substring(x.value.length-1);if(!b.value.onAtFind&&k=="@"&&u.chatInfo.info.group_members.length>0&&u.chatInfo.show.type=="group"&&(c.add(pn.UI,"开始匹配群成员列表 ……"),b.value.onAtFind=!0,m.value=0),b.value.onAtFind)if(x.value.lastIndexOf("@")<0)c.add(pn.UI,"匹配群成员列表被打断 ……"),b.value.onAtFind=!1,L.value=null,m.value=0;else{const U=x.value.substring(x.value.lastIndexOf("@")+1).toLowerCase();L.value=u.chatInfo.info.group_members.filter(E=>E.card!=""&&E.card!=null&&E.card.toLowerCase().indexOf(U)>=0||E.nickname.toLowerCase().indexOf(U)>=0||U==E.user_id.toString()),L.value.length==0&&(L.value=u.chatInfo.info.group_members),m.value=0}}}function Ve(s){s.preventDefault(),x.value!=""&&tn()}function we(s){s!=null&&(x.value=x.value.substring(0,x.value.lastIndexOf("@")),Ht({msgObj:{type:"at",qq:String(s)},addText:!0})),Jt(),b.value.onAtFind=!1,L.value=null,m.value=0}function ze(){pt(()=>{const s=document.querySelector(".at-tag.show"),c=document.querySelector(".at-tag.show > div.selected");if(s&&c){const k=s.getBoundingClientRect(),U=c.getBoundingClientRect();U.top<k.top?c.scrollIntoView({block:"nearest",behavior:"smooth"}):U.bottom>k.bottom&&c.scrollIntoView({block:"nearest",behavior:"smooth"})}})}function st(s){!L.value||L.value.length===0||(s===-1?m.value=m.value>0?m.value-1:L.value.length-1:m.value=m.value<L.value.length-1?m.value+1:0,ze())}function St(){const s=document.getElementById("main-input")??document.getElementById("main-input-ex");if(s!==null&&s.selectionStart===s.selectionEnd){let c=-1;typeof s.selectionStart=="number"&&(c=s.selectionStart);const k=yi.getSQList(x.value);k!=null&&k.forEach(U=>{const E=x.value.indexOf(U),J=E+U.length;E!==-1&&c>E&&c<J&&pt(()=>{s.selectionStart=E,s.selectionEnd=J})})}}function it(s,c){var J;if(A.value=c,b.value.menuDisplay.menuSelectedMsgId=c.message_id,xi.get("log_level")==="debug"&&new Ut().debug("右击消息:"+c),v.value.length>0)return;const k=document.getElementById("msgMenu"),U=s.target;let E="member";if(u.chatInfo.show.type=="group"&&u.chatInfo.info.group_members&&u.chatInfo.info.group_members.forEach(Z=>{Z.user_id==c.sender.user_id&&(E=Z.role)}),k!==null&&c!==null){if($o("close_respond")==!0&&(b.value.menuDisplay.showRespond=!1),U.nodeName=="IMG"&&U.name=="avatar")Object.keys(b.value.menuDisplay).forEach(me=>{b.value.menuDisplay[me]=!1}),b.value.menuDisplay.showRespond=!1,b.value.menuDisplay.at=!0,b.value.menuDisplay.poke=!0,b.value.menuDisplay.remove=!0,(u.chatInfo.show.type!="group"||c.sender.user_id===l.loginInfo.uin||u.chatInfo.info.me_info.role==="member"||E=="owner"||E=="admin"&&u.chatInfo.info.me_info.role!="owner")&&(b.value.menuDisplay.remove=!1),c.sender.user_id===l.loginInfo.uin&&(b.value.menuDisplay.at=!1),u.chatInfo.show.type=="group"&&u.chatInfo.info.me_info.role!="member"&&(b.value.menuDisplay.config=!0);else{(c.sender.user_id===l.loginInfo.uin||u.chatInfo.info.me_info.role==="admin"||u.chatInfo.info.me_info.role==="owner")&&(b.value.menuDisplay.revoke=!0),b.value.menuDisplay.reedit=b.value.menuDisplay.revoke&&c.sender.user_id===l.loginInfo.uin,c.revoke===!0&&(b.value.menuDisplay.relpy=!1,b.value.menuDisplay.forward=!1,b.value.menuDisplay.revoke=!1,b.value.menuDisplay.select=!1),T.value[3].open&&(Object.keys(b.value.menuDisplay).forEach(Ze=>{b.value.menuDisplay[Ze]=!1}),b.value.menuDisplay.jumpToMsg=!0);const me=document.getSelection(),ut=(J=me==null?void 0:me.anchorNode)==null?void 0:J.parentElement;let We=null,Ee=ut;if(Ee)for(;Ee.className!="chat";){if(Ee.className.startsWith("message")&&Ee.className.indexOf("-")<0){We=Ee;break}if(Ee=Ee.parentElement,!Ee)break}ut&&ut.className.indexOf("msg-text")>-1&&me.focusNode==me.anchorNode&&We&&We.id==c.message_id&&(I.value=me.toString(),I.value.length>0&&(b.value.menuDisplay.copySelect=!0));const Xe=["xml","json"];c.message.forEach(Ze=>{Xe.indexOf(Ze.type)>0&&(b.value.menuDisplay.forward=!1,b.value.menuDisplay.add=!1)}),U.nodeName=="IMG"&&U.src.length>0&&(b.value.menuDisplay.downloadImg=U.src,yt.isDesktop()&&(b.value.menuDisplay.copyImg=!0))}const Z=s.x,oe=s.y;k.style.marginLeft=Z+"px",k.style.marginTop=oe+"px";let de=k.clientWidth;b.value.menuDisplay.showRespond&&(de=k.children[0].clientWidth);const Te=window.innerWidth;Z+de>Te+27&&(k.style.marginLeft=Te+7-de+"px"),b.value.showMsgMenu=!0,pt(()=>{const me=k.clientHeight,ut=document.body.clientHeight;oe+me>ut-20&&(k.classList.add("topOut"),k.style.marginTop=ut-me-10+"px")})}}function ot(){b.value.menuDisplay={menuSelectedMsgId:null,jumpToMsg:!1,add:!0,relpy:!0,forward:!0,select:!0,copy:!0,copySelect:!1,downloadImg:!1,copyImg:!1,revoke:!1,reedit:!1,at:!1,poke:!1,remove:!1,respond:!1,showRespond:!0,config:!1}}function rt(s=!0){const c=A.value;c&&(De(c),s&&ct())}function De(s){const c=s.message_id;A.value=s,Ht({msgObj:{type:"reply",id:String(c)},addText:!1,addTop:!0}),b.value.isReply=!0,Jt()}function Ft(){S.value=S.value.filter(s=>s.type!=="reply"),b.value.isReply=!1}function bt(){var c;if(!A.value)return;const s=((c=A.value)==null?void 0:c._rawSatori)??A.value;try{console.log(JSON.stringify(s,null,2))}catch{console.dir(s,{depth:null})}ct()}function ht(){G.value=w.userList,b.value.showForwardPan=!1,R.value="single-message",ct()}function _e(s,...c){const k=s;for(const U of c){const E=k[U],J=typeof E=="string"||typeof E=="number"?String(E):"";if(J&&J!=="undefined")return J}return""}function en(s){if(s.group_id)return _e(s,"group_name","name")||String(s.group_id);const c=_e(s,"nickname","name","nick","username","remark")||String(s.user_id??""),k=String(s.user_id??"");return k?`${c}(${k})`:c}function Dt(s){const c=s.target.value;G.value=w.userList.filter(k=>{const U=k.user_id?_e(k,"nickname","name","nick","remark")||String(k.user_id):_e(k,"group_name","name")||String(k.group_id||""),E=String(k.user_id??k.group_id??"");return U.toLowerCase().indexOf(c.toLowerCase())!==-1||E.length>0&&E===c})}function Nt(s="single-message"){R.value=s,b.value.showForwardPan=!0,[...w.onMsgList].reverse().forEach(k=>{const U=G.value.indexOf(k);U>-1&&(G.value.splice(U,1),G.value.unshift(k))}),ct()}function Bn(){if(A.value){const s=JSON.parse(JSON.stringify(A.value));jt(n.chat.show.id,n.chat.show.type,s.message,!0)}ct()}function Se(){A.value&&v.value.push(A.value.message_id),ct()}function Ke(s){const c=Mi(s);if(typeof structuredClone=="function")try{return structuredClone(c)}catch{return JSON.parse(JSON.stringify(c))}return JSON.parse(JSON.stringify(c))}function Tt(s){const c=R.value,k=A.value?Ke(A.value):null,U=s.group_id?s.group_id:s.user_id,E=String(U),J=s.group_id?"group":"user",Z=String(s.channel_id??s.channelId??""),oe=String(s.guild_id??s.guildId??""),de=u.messageList.filter(me=>v.value.includes(me.message_id)),Te=()=>String(n.chat.show.id)===E&&n.chat.show.type===J;if(c!=="single-message"&&de.length===0){ht();return}if(c==="individual-messages"){const me={title:f("逐条转发"),html:f("将按顺序逐条转发 {count} 条消息,是否继续?",{count:de.length}),button:[{text:f("取消"),fun:()=>{e.popBoxList.shift()}},{text:f("确定"),master:!0,fun:()=>{de.forEach(ut=>{jt(E,J,Ke(ut.message),Te(),"sendMsgBack",Z||void 0,oe||void 0)}),v.value=[],e.popBoxList.shift(),Mt(s,U)}}]};e.popBoxList.push(me)}else if(c==="merged-messages"){const me={app:"com.tencent.multimsg",meta:{detail:{source:f("合并转发消息"),news:[...de.slice(0,3).map(Ee=>({text:(Ee.sender.card&&Ee.sender.card!=""?Ee.sender.card:Ee.sender.nickname)+": "+sn(Ee)}))],summary:f("查看 {count} 条转发消息",{count:de.length}),resid:""}}},ut={message:[{type:"json",data:JSON.stringify(me),id:""}],sender:{user_id:l.loginInfo.uin,nickname:l.loginInfo.nickname,avatar:l.loginInfo.avatar}},We={title:f("合并转发消息"),template:rn(ln),templateValue:rn({data:ut,type:"forward"}),button:[{text:f("取消"),fun:()=>{e.popBoxList.shift()}},{text:f("确定"),master:!0,fun:async()=>{const Ee=de.map(Ze=>{var Et,$t,At;return{type:"node",id:Ze.message_id,user_id:String(((Et=Ze.sender)==null?void 0:Et.user_id)??""),nickname:String((($t=Ze.sender)==null?void 0:$t.card)||((At=Ze.sender)==null?void 0:At.nickname)||""),time:Ze.time,content:Ke(Ze.message)}}),Xe=await Lo(String(l.loginInfo.platform??""),String(l.loginInfo.uin??""),J,E,Ee);if(!Xe.ok)new ft().add(Le.ERR,f("合并转发发送失败"));else{const Ze=Date.now(),Et={fake_msg:"pending",message_id:"forward-"+Ze,fake_message_id:"forward-"+Ze,message_type:J,channel_type:J==="group"?0:1,time:Math.floor(Ze/1e3),local_time:Ze,timestamp_ms:Ze,post_type:"message",sender:{user_id:String(l.loginInfo.uin??""),nickname:String(l.loginInfo.nickname??""),avatar:String(l.loginInfo.avatar??"")},message:[{type:"forward",id:"",content:Ee.map(Ot=>({message_id:String(Ot.id??""),time:Number(Ot.time??Math.floor(Ze/1e3)),sender:{user_id:String(Ot.user_id??""),nickname:String(Ot.nickname??"")},message:Ot.content??[]}))}],raw_message:`[${f("聊天记录")}]`};Te()&&(u.messageList.push(Et),pt(()=>{on("chat-"+Et.message_id,!0)}));const $t=J==="group"?Z||E:/^(?:private|direct):/i.test(Z||"")?Z:`private:${E}`;Xe.native&&!Xe.messageId||await Ro({id:String(Et.fake_message_id??""),platform:String(l.loginInfo.platform??""),selfId:String(l.loginInfo.uin??""),channelId:$t,guildId:oe||void 0,channelType:J,messageId:Xe.messageId,content:String(Et.raw_message??""),message:Et.message,forwardContent:Ee,source:"webui",sentAt:Ze,kind:"forward"});const At=w.baseOnMsgList.get(wn(E));if(At){const Ot=`[${f("聊天记录")}]`;At.raw_msg_base=Ot,At.raw_msg=At.group_id?`${String(l.loginInfo.nickname??"")}: ${Ot}`:Ot,At.time=Math.floor(Ze/1e3),w.baseOnMsgList.set(wn(E),At),Do()}}v.value=[],e.popBoxList.shift(),Mt(s,U)}}]};e.popBoxList.push(We)}else if(A.value&&k){const me={title:f("转发消息"),template:rn(ln),templateValue:rn({data:k,type:"forward"}),button:[{text:f("取消"),fun:()=>{e.popBoxList.shift()}},{text:f("确定"),master:!0,fun:()=>{jt(E,J,Ke(k.message),Te(),"sendMsgBack",Z||void 0,oe||void 0),e.popBoxList.shift(),Mt(s,U)}}]};e.popBoxList.push(me)}}function Mt(s,c){ht(),w.baseOnMsgList.get(wn(c))==null&&w.baseOnMsgList.set(wn(c),s),pt(()=>{const k=document.getElementById("user-"+c);k&&k.click()})}function Gt(){const s=A.value;if(s!==null){s.raw_message||(s.raw_message=sn(s));const c=new ft;Zt.config.globalProperties.$copyText(s.raw_message).then(()=>{c.add(Le.INFO,f("复制成功"),!0)},()=>{c.add(Le.ERR,f("复制失败"),!0)})}ct()}function fn(){if(I.value!=""){const s=new ft;Zt.config.globalProperties.$copyText(I.value).then(()=>{s.add(Le.INFO,f("复制成功"),!0)},()=>{s.add(Le.ERR,f("复制失败"),!0)})}ct()}async function Ye(){const s=b.value.menuDisplay.downloadImg;if(!s)return;ct();const{blob:c,buffer:k}=await Bo(s),U=new ft;if(yt.type==="tauri")try{await(await Ei(()=>import("./index-Cg_esKB0.js"),__vite__mapDeps([0,1]),import.meta.url)).writeImage(k),U.add(Le.INFO,f("复制成功"))}catch(E){U.add(Le.ERR,f("复制失败")),new Ut().error(E,"复制图片失败")}else{const E=new ClipboardItem({[c.type]:c});try{await Oo([E]),U.add(Le.INFO,f("复制成功"))}catch(J){U.add(Le.ERR,f("复制失败")),new Ut().error(J,"复制图片失败")}}}function Bt(){const s=b.value.menuDisplay.downloadImg;s!=!1&&Uo(s,`img_${new Date().getTime()}.png`,()=>{},()=>{}),ct()}async function Kt(){const s=A.value;if(ct(),!s){new ft().add(Le.ERR,f("获取选中消息失败"));return}const c=s.message_id,k=String(s.channel_id??s.channelId??u.chatInfo.show.channel_id??n.chat.show.id);await at.callApi("delete_msg",{channel_id:k,message_id:c})}async function mt(){const s=A.value;if(ct(),!s){new ft().add(Le.ERR,f("获取选中消息失败"));return}const c=s.message_id,k=String(s.channel_id??s.channelId??u.chatInfo.show.channel_id??n.chat.show.id);await at.callApi("delete_msg",{channel_id:k,message_id:c}),ho(s)}function dn(){const s=A.value;if(s!==null){const c={title:f("提醒"),html:`<span>${f("真的要将 {user} 移出群聊吗",{user:s.sender.nickname})}</span>`,button:[{text:f("确定"),fun:()=>{s&&(at.send("set_group_kick",{group_id:u.chatInfo.show.id,user_id:s.sender.user_id},"setGroupKick"),ct(),e.popBoxList.shift())}},{text:f("取消"),master:!0,fun:()=>{e.popBoxList.shift()}}]};e.popBoxList.push(c)}}function ct(){b.value.showMsgMenu=!1,b.value.menuDisplay.menuSelectedMsgId=null,setTimeout(()=>{ot()},300)}function hn(){var s,c,k,U,E,J,Z;if(b.value.openChatInfo=!b.value.openChatInfo,b.value.openChatInfo){if(n.chat.show.type==="group"&&((s=n.chat.info.group_info)==null?void 0:s.gc)!==n.chat.show.id){const de=`https://qinfo.clt.qq.com/cgi-bin/qun_info/get_group_info_all?gc=${n.chat.show.id}&bkn=${l.loginInfo.bkn}`;at.send("http_proxy",{url:de},"getMoreGroupInfo")}else if(n.chat.show.type==="user"&&((c=n.chat.info.user_info)==null?void 0:c.uin)!==n.chat.show.id){const de=(U=(k=l.jsonMap)==null?void 0:k.friend_info)==null?void 0:U.name;de!=null&&at.send(de,{user_id:n.chat.show.id},"getMoreUserInfo")}const oe=(J=(E=l.jsonMap)==null?void 0:E.group_notices)==null?void 0:J.name;if(n.chat.show.type==="group"&&(n.chat.info.group_notices===void 0||Object.keys(n.chat.info.group_notices??{}).length===0)&&oe&&at.send(oe,{group_id:n.chat.show.id},"getGroupNotices"),n.chat.show.type==="group"&&Object.keys(n.chat.info.group_files??{}).length===0){const de=(Z=l.jsonMap.group_files)==null?void 0:Z.name;de&&at.send(de,{group_id:n.chat.show.id},"getGroupFiles")}}}function Qi(s,c,k){let U=-1;for(let E=0;E<k;E++)if(U=s.indexOf(c,U+1),U<0)return s;return U<0?s:s.slice(0,U)+s.slice(U+c.length)}function ti(s){const c=S.value[s];if((c==null?void 0:c.type)==="image")return"[图片]";if((c==null?void 0:c.type)==="at"){const k=String(c.qq??c.id??""),U=u.chatInfo.info.group_members.find(J=>String(J.user_id)===k);return"[@"+String(c.text||(U==null?void 0:U.card)||(U==null?void 0:U.nickname)||k)+"]"}return"[SQ:"+s+"]"}function On(s){var k;M.value.delete(s);const c=S.value[s];if((c==null?void 0:c.type)==="image"){let U=0;for(let E=0;E<=s;E++)((k=S.value[E])==null?void 0:k.type)==="image"&&U++;x.value=Qi(x.value,"[图片]",U)}else x.value=x.value.replace("[SQ:"+s+"]",""),x.value=x.value.replace("[SQ:"+s,"")}async function Gi(s){const c=M.value.get(s);if(!c||!(B!=null&&B.value))return;const k=await B.value.edit(c);M.value.set(s,k)}function Ht(s){const c=document.getElementById("main-input")??document.getElementById("main-input-ex");if(s!==void 0){if(s.msgObj.type==="at"){const J=String(s.msgObj.qq??s.msgObj.id??""),Z=u.chatInfo.info.group_members.find(oe=>String(oe.user_id)===J);s.msgObj={...s.msgObj,qq:J,text:String((Z==null?void 0:Z.card)||(Z==null?void 0:Z.nickname)||J)}}const k=S.value.length;if(S.value.push(s.msgObj),!s.addText)return k;const U=ti(k),E=s.msgObj.type==="at"?" ":"";if(s.addTop===!0)x.value=U+E+x.value;else{const J=c==null?void 0:c.selectionStart,Z=(c==null?void 0:c.selectionEnd)??J;if(J!=null){const oe=x.value.substring(0,J),de=x.value.substring(Z,x.value.length);x.value=oe+U+E+de,pt(()=>{const Te=J+U.length+E.length;c.selectionStart=Te,c.selectionEnd=Te})}else x.value+=U+E}return k}return-1}function ni(s){if(s.clipboardData&&s.clipboardData.items)for(let c=0,k=s.clipboardData.items.length;c<k;c++){const U=s.clipboardData.items[c];U.kind==="file"&&(Un(U.getAsFile()),s.preventDefault())}}function ii(){const s=document.getElementById("choice-pic");s&&s.click()}function Ki(s){b.value.showMoreDetail=!1;const c=s.target;c&&c.files&&Un(c.files[0])}function oi(){const s=document.getElementById("choice-file");s&&s.click()}function Ji(){const s=document.getElementById("choice-video");s&&s.click()}function Yi(s){b.value.showMoreDetail=!1;const c=s.target;if(c.files!=null){const k=c.files[0],U=k.name;if(k.size>500*1024*1024){const J={title:f("提醒"),html:`<span>${f("文件大于 500MB。发送速度可能会非常缓慢;确认要发送吗?")}</span>`,button:[{text:f("发送"),fun:()=>{e.popBoxList.shift()}},{text:f("取消"),master:!0,fun:()=>{e.popBoxList.shift()}}]};e.popBoxList.push(J)}else Zi(k,U);c.value=""}}function Xi(s){b.value.showMoreDetail=!1;const c=s.target;if(c.files!=null){const k=c.files[0],U=k.name;k.size>500*1024*1024?new ft().add(Le.ERR,f("视频文件不能超过 500MB")):eo(k,U),c.value=""}}function ai(s,c,k){const U=c??s.name??f("未知文件"),E=Ho({fileName:U,fileSize:s.size,execute:J=>{const Z=new FileReader;Z.onprogress=oe=>{oe.lengthComputable&&J(oe.loaded,oe.total)},Z.readAsDataURL(s),Z.onloadend=()=>{let oe=Z.result;oe=oe.substring(oe.indexOf("base64,")+7,oe.length),S.value=[],M.value.clear(),x.value="",Ht({addText:!0,msgObj:{type:k,file:"base64://"+oe,name:U}}),tn("sendFileBack_"+E)},Z.onerror=()=>{jo(E,"文件读取失败")}}})}function Zi(s,c){ai(s,c,"file")}function eo(s,c){ai(s,c,"video")}async function Un(s){const c=new ft;if(!s||!s.type.includes("image/")||s.size===0)return;if(s.size>3145728){const J={maxSizeMB:3,useWebWorker:!0};try{c.add(Le.INFO,f("正在压缩图片 ……"));const Z=await gt(s,J);new Ut().add(pn.INFO,"图片压缩成功,原大小:"+s.size/1024/1024+" MB,压缩后大小:"+Z.size/1024/1024+" MB"),Un(Z)}catch(Z){new Ut().error(Z,"图片压缩失败"),c.add(Le.INFO,f("压缩图片失败"))}return}const k=await si(s),U=S.value.length,E={type:"image",text:`[${f("图片")}]`};M.value.set(U,k),Ht({addText:!0,msgObj:E})}async function si(s){return new Promise((c,k)=>{const U=new FileReader;U.onload=function(E){E.target?c(E.target.result):k(new Error("读取文件失败"))},U.onerror=function(E){k(E)},U.readAsDataURL(s)})}function to(s){return new Promise((c,k)=>{const U=new FileReader;U.onload=function(E){var oe;const J=String(((oe=E.target)==null?void 0:oe.result)??""),Z=J.indexOf("base64,");c(Z>=0?J.slice(Z+7):J)},U.onerror=function(E){k(E)},U.readAsDataURL(s)})}function no(){var s;if(N.value){(s=F.value)==null||s.stop(),p.value=!1;return}p.value=!p.value}async function io(){var s,c;if(p.value=!1,!N.value){if(!((s=navigator.mediaDevices)!=null&&s.getUserMedia)||typeof MediaRecorder>"u"){new ft().add(Le.ERR,f("当前浏览器不支持录音"));return}try{if((c=navigator.permissions)!=null&&c.query)try{if((await navigator.permissions.query({name:"microphone"})).state==="denied"){new ft().add(Le.ERR,f("麦克风权限被拒绝,请在浏览器设置中允许访问麦克风"));return}}catch{}const k=await navigator.mediaDevices.getUserMedia({audio:!0});_=[];const U=new MediaRecorder(k);F.value=U,N.value=!0,U.ondataavailable=E=>{E.data.size>0&&_.push(E.data)},U.onstop=async()=>{N.value=!1,F.value=null,k.getTracks().forEach(de=>de.stop());const E=new Blob(_,{type:U.mimeType||"audio/webm"}),J=await to(E),Z=U.mimeType.includes("mp4")?"voice.m4a":"voice.webm",oe=U.mimeType.includes("mp4")?"audio/mp4":"audio/webm";_.length>0&&(y.value={type:"record",file:"base64://"+J,url:`data:${oe};base64,${J}`,fileName:Z,name:f("语音")},x.value="",S.value=[],M.value.clear()),_=[]},U.start()}catch(k){N.value=!1,F.value=null,k instanceof DOMException&&k.name==="NotAllowedError"&&new ft().add(Le.ERR,f("麦克风权限被拒绝,请在浏览器设置中允许访问麦克风")),new Ut().error(k,f("录音失败"))}}}function oo(){y.value=null,p.value=!1,_=[],x.value="",Jt()}function ao(){p.value=!1;const s=document.getElementById("choice-audio");s==null||s.click()}async function so(s){var E;const c=s.target,k=(E=c.files)==null?void 0:E[0];if(c.value="",!k)return;if(!k.type.startsWith("audio/")&&!/\.(mp3|wav|m4a|aac|ogg|webm|flac)$/i.test(k.name)){new ft().add(Le.ERR,f("请选择音频文件"));return}const U=await si(k);y.value={type:"record",file:U,url:U,fileName:k.name,name:f("语音")},x.value="",S.value=[],M.value.clear(),_=[]}function Jt(){const s=document.getElementById("main-input")??document.getElementById("main-input-ex");s!==null&&s.focus()}function tn(s="sendMsgBack"){if(T.value[3].open)return;if(T.value.forEach(k=>{k.open=!1}),y.value){const k=y.value;y.value=null,p.value=!1,_=[],n.chat.show.temp?jt(n.chat.show.id+"/"+n.chat.show.temp,n.chat.show.type,[k],!0,s):jt(n.chat.show.id,n.chat.show.type,[k],!0,s),x.value="",S.value=[],M.value.clear();return}for(const[k,U]of M.value)S.value[k]={type:"image",file:"base64://"+U.substring(U.indexOf("base64,")+7,U.length)};const c=yi.parseMsg(x.value,S.value,[]);n.chat.show.temp?jt(n.chat.show.id+"/"+n.chat.show.temp,n.chat.show.type,c,!0,s):jt(n.chat.show.id,n.chat.show.type,c,!0,s),b.value.checkNewLineFlag=!0,x.value="",S.value=[],M.value.clear(),ae(),Ft(),Oe(void 0,!0)}function ri(s,c){var U,E;if(c==0&&s>0){const J=((U=l.jsonMap.set_message_read)==null?void 0:U.name)??void 0;if(!J)return;let Z=((E=l.jsonMap.set_message_read)==null?void 0:E.private_name)??J;Z||(Z=J),u.chatInfo.show.type=="group"?at.send(J,{group_id:n.chat.show.id,message_id:n.list[n.list.length-1].message_id},"setMessageRead"):at.send(Z,{user_id:n.chat.show.id,message_id:n.list[n.list.length-1].message_id},"setMessageRead"),So()&&Jt()}if(b.value.showBottomButton&&!e.nowGetHistory&&c>0&&(j.value!==0?j.value=j.value+Math.abs(s-c):j.value=Math.abs(s-c)),n.list.length>200&&!e.nowGetHistory&&!b.value.showBottomButton){u.messageList=[];const J={type:n.chat.show.type,id:n.chat.show.id,name:n.chat.show.name,avatar:n.chat.show.avatar,jump:n.chat.show.jump};Co(J),e.nowGetHistory=!0}const k=document.getElementById("msgPan");if(k!==null){const J=k.scrollHeight;pt(()=>{const Z=document.getElementById("msgPan");Z!==null&&(e.nowGetHistory&&te(Z.scrollHeight-J,!1),e.nowGetHistory||(b.value.showBottomButton||te(Z.scrollHeight),c<=0&&(te(Z.scrollHeight,!1),Ge()),je()));const oe=()=>{const de=[];for(const Te of n.list)if(Te.message!==void 0)for(const me of Te.message)me.type==="image"&&me.file!="marketface"&&de.push(me.url);return de};Y.value=Qn.fromList(oe()),u.chatInfo.show&&u.chatInfo.show.jump&&(new Ut().debug("进入跳转至消息:"+u.chatInfo.show.jump),se("chat-"+u.chatInfo.show.jump),u.chatInfo.show.jump=void 0)})}}function ro(s,c){const k=c.message_id;v.value.length>0&&(v.value.indexOf(k)>-1?v.value=v.value.filter(U=>U!=k):v.value.push(k))}function lo(){new ft().add(Le.INFO,f("欸嘿,这个按钮只是用来占位置的"))}function uo(){const s=n.list.filter(E=>v.value.indexOf(E.message_id)>-1);let c="",k="";s.forEach(E=>{const J=new Date(zo(E.time)),Z=J.getFullYear()+"-"+(J.getMonth()+1)+"-"+J.getDate();Z!=k&&(c+=`
|
|
24
|
+
—— `+Z+` ——
|
|
25
|
+
`,k=Z),c+=E.sender.nickname+" "+J.getHours()+":"+J.getMinutes()+":"+J.getSeconds()+`
|
|
26
|
+
`+sn(E)+`
|
|
27
|
+
|
|
28
|
+
`});const U=new ft;Zt.config.globalProperties.$copyText(c).then(()=>{U.add(Le.INFO,f("复制成功"),!0),v.value=[]},()=>{U.add(Le.ERR,f("复制失败"),!0)})}async function co(){const s=n.list.filter(k=>v.value.includes(k.message_id)),c=[];for(const k of s){const U=k.message_id,E=String(k.channel_id??k.channelId??u.chatInfo.show.channel_id??n.chat.show.id);c.push(at.callApi("delete_msg",{channel_id:E,message_id:U}))}v.value=[],await Promise.all(c)}async function li(s){const c=s.target;Oe(c);const k=No(x.value,q.value);let{end:U,str:E}={end:0,str:""};if(k.length>0&&({end:U,str:E}=k[0]),E.indexOf("]")>=0){const J=q.value.substring(0,U),Z=J.lastIndexOf("[图片]");if(Z>=0&&Z<U){let Te=0,me=-1;for(;(me=J.indexOf("[图片]",me+1))>=0;)Te++;const We=S.value.map((Ee,Xe)=>(Ee==null?void 0:Ee.type)==="image"?Xe:-1).filter(Ee=>Ee>=0)[Te-1];We!==void 0&&M.value.has(We)&&On(We)}const oe=q.value.substring(0,U).lastIndexOf("[SQ:");if(oe>=0&&oe<U){const Te=q.value.substring(oe),ut=q.value.slice(oe,Te.indexOf("]")+oe+1).replace("[SQ:","").replace("]",""),We=Number(ut);!isNaN(We)&&M.value.has(We)&&On(We)}if(q.value.substring(0,U).match(/\[@[^\]]+\]$/)){const Te=S.value.findIndex(me=>(me==null?void 0:me.type)==="at");Te>=0&&S.value.splice(Te,1)}}if(T.value[3].open){C.value&&(clearTimeout(C.value),C.value=null);const J=c.value;if(J.length==0)z.value++,b.value.search.list=vn(n.list);else if(t.sysConfig.enable_local_history){const Z=++z.value;C.value=setTimeout(async()=>{const oe=await Po(l.loginInfo.uin,u.chatInfo.show.id,J);Z!==z.value||!T.value[3].open||(b.value.search.list=oe)},180)}else z.value++,b.value.search.list=n.list.filter(Z=>sn(Z).indexOf(J)!==-1)}}function fo(){T.value[3].open=!T.value[3].open,b.value.showMoreDetail=!b.value.showMoreDetail}function ui(){C.value&&(clearTimeout(C.value),C.value=null),z.value++,T.value[3].open=!T.value[3].open,x.value="",b.value.search.list=vn(n.list),Oe()}function ci(s){var c;if(l.jsonMap.poke){let k=(c=l.jsonMap.poke)==null?void 0:c.name;n.chat.show.type=="user"&&l.jsonMap.poke.private_name&&(k=l.jsonMap.poke.private_name),at.send(k,{user_id:s,group_id:n.chat.show.id},"sendPoke")}b.value.showMoreDetail=!1,b.value.menuDisplay.poke=!1}function ho(s){x.value="",S.value=[],M.value.clear(),Ft();for(const c of s.message)if(c.type==="text")x.value+=c.text;else if(c.type==="reply"){const k=n.list.find(U=>U.message_id==c.id);if(!k)continue;De(k)}else c.type==="record"||c.type==="audio"?(y.value={...c,name:c.name||f("语音")},x.value="",S.value=[],M.value.clear()):(Ht({addText:!1,msgObj:c}),x.value+=ti(S.value.length-1));Jt()}function mo(s){var k,U;const c=s.target;if(c.scrollTop+c.clientHeight===c.scrollHeight&&!b.value.isJinLoading&&n.chat.info.jin_info.is_end==!1){b.value.isJinLoading=!0;const E=((U=(k=l.jsonMap)==null?void 0:k.group_essence)==null?void 0:U.name)??"get_essence_msg_list";at.send(E,{group_id:n.chat.show.id,pages:n.chat.info.jin_info.pages+1},"getJin")}}function go(s){B!=null&&B.value&&B.value.open(new Qn(s))}function fi(s="default"){let c=!1;if(T.value.forEach(k=>{k.open&&(c=!0),k.open=!1}),!c){if(b.value.showMoreDetail){b.value.showMoreDetail=!1;return}switch(s){case"default":b.value.showMoreDetail=!0;break;case"img":ii();break;case"file":oi();break;case"face":T.value[1].open=!T.value[1].open;break}}}function zn(){var c;const s=document.getElementById("chat-pan");if(s)return b.value.openChatInfo?s.getElementsByClassName("chat-info-pan")[0]:(c=$.value)!=null&&c.isMergeOpen()?s.getElementsByClassName("merge-pan")[0]:s}function mn(){var s,c;b.value.openChatInfo?hn():(s=$.value)!=null&&s.isMergeOpen()?((c=$.value)==null||c.closeMergeMsg(),setTimeout(()=>{const U=document.getElementById("chat-pan").getElementsByClassName("merge-pan")[0];U&&(U.style.transform="")},500)):(u.chatInfo.show.id=0,e.openSideBar=!0,new Ut().add(pn.UI,"右滑打开侧边栏触发完成"))}return(s,c)=>{var U;const k=Ln("font-awesome-icon");return Ce((V(),ee("div",{id:"chat-pan",class:vt("chat-pan"+(D(e).openSideBar?" open":"")+(["linux","win32"].includes(D(yt).platform??"")?" withBar":"")),style:In({"background-image":D(Eo)(D(t).sysConfig.chat_more_blur?"":D(t).sysConfig.chat_background),"background-position":D(t).sysConfig.chat_background_align??"center","background-size":D(t).sysConfig.chat_background_fit??"cover"}),onVMoveRight:c[22]||(c[22]=Nn(E=>mn(),["prevent"]))},[Wt(s.$slots,"chat-extra",{},void 0,!0),g("div",Vs,[ie(k,{class:"back",icon:["fas","angle-left"],onClick:mn}),g("img",{src:n.chat.show.avatar||"/img/icons/icon.svg",onError:c[0]||(c[0]=(...E)=>D(Cn)&&D(Cn)(...E))},null,40,Ws),g("div",Qs,[g("p",null,[yn(Q(n.chat.show.name)+" ",1),n.chat.show.type=="group"?(V(),ee(ke,{key:0},[yn(" ("+Q(n.chat.info.group_members.length)+") ",1)],64)):fe("",!0)]),n.chat.show.temp?(V(),ee("span",Gs,Q(D(f)("来自群聊:{group}",{group:n.chat.show.temp})),1)):(V(),ee("span",Ks,[n.chat.show.appendInfo?(V(),ee(ke,{key:0},[yn(Q(n.chat.show.appendInfo),1)],64)):(V(),ee(ke,{key:1},[yn(Q(n.list[n.list.length-1]?D(f)("上次消息 - {time}",{time:Intl.DateTimeFormat(D(ne),{hour:"numeric",minute:"numeric",second:"numeric"}).format(new Date(n.list[n.list.length-1].time*1e3))}):D(f)("暂无消息")),1)],64))]))]),c[23]||(c[23]=g("div",{class:"space"},null,-1)),g("div",Js,[ie(k,{icon:["fas","ellipsis-vertical"],onClick:hn})])]),g("div",{class:vt("loading"+(D(e).nowGetHistory&&D(e).canLoadHistory?" show":""))},[ie(k,{icon:["fas","spinner"]}),g("span",null,Q(D(f)("加载中")),1)],2),g("div",{id:"msgPan",ref_key:"msgPan",ref:i,class:"chat",style:{"scroll-behavior":"smooth"},onScroll:c[1]||(c[1]=E=>wt(E,T.value[3].open))},[T.value[3].open?(V(),xe(Wn,{key:1,name:D(t).sysConfig.opt_fast_animation?"":"msglist",tag:"div"},{default:kt(()=>[(V(!0),ee(ke,null,dt(b.value.search.list,(E,J)=>(V(),ee(ke,null,[D(Vn)(n.list[Number(J)-1]?n.list[Number(J)-1].time:void 0,E.time)?(V(),xe(Vt,{key:"notice-time-"+J,data:{sub_type:"time",time:E.time}},null,8,["data"])):fe("",!0),(E.post_type==="message"||E.post_type==="message_sent")&&E.message.length>0?(V(),xe(ln,{key:E.fake_message_id??E.message_id,selected:v.value.includes(E.message_id)||b.value.menuDisplay.menuSelectedMsgId==E.message_id,selecting:v.value.length>0,data:E,onScrollToMsg:D(on),onShowMenu:it,onImageLoaded:le,onLeftMove:De,onContentRendered:Ge},null,8,["selected","selecting","data","onScrollToMsg"])):fe("",!0)],64))),256))]),_:1},8,["name"])):(V(),ee(ke,{key:0},[D(e).canLoadHistory?fe("",!0):(V(),ee("div",Ys,[c[24]||(c[24]=g("hr",null,null,-1)),g("a",null,Q(D(f)("没有更多消息了")),1)])),D(e).loadHistoryFail?(V(),ee("div",Xs,[c[25]||(c[25]=g("hr",null,null,-1)),g("a",null,Q(D(f)("获取历史记录失败")),1)])):fe("",!0),D(e).nowGetHistory&&n.list.length>0?(V(),xe(Vt,{key:2,data:{sub_type:"time",time:n.list[0].time}},null,8,["data"])):fe("",!0),ie(Wn,{name:D(t).sysConfig.opt_fast_animation?"":"msglist",tag:"div"},{default:kt(()=>[(V(!0),ee(ke,null,dt(n.list,(E,J)=>(V(),ee(ke,null,[D(Vn)(n.list[Number(J)-1]?n.list[Number(J)-1].time:void 0,E.time)?(V(),xe(Vt,{key:"notice-time-"+(E.time/240).toFixed(0),data:{sub_type:"time",time:E.time}},null,8,["data"])):fe("",!0),D($i)(E)?(V(),xe(Vt,{key:"delete-"+E.message_id,data:{sub_type:"delete"}})):(E.post_type==="message"||E.post_type==="message_sent")&&E.message.length>0?(V(),xe(ln,{key:E.fake_message_id??E.message_id,selected:v.value.includes(E.message_id)||b.value.menuDisplay.menuSelectedMsgId==E.message_id,selecting:v.value.length>0,data:E,"image-list-header":Y.value,onClick:Z=>ro(Z,E),onShowMenu:it,onScrollToMsg:D(on),onImageLoaded:le,onLeftMove:De,onSendPoke:ci,onContentRendered:Ge},null,8,["selected","selecting","data","image-list-header","onClick","onScrollToMsg"])):E.post_type==="notice"?(V(),xe(Vt,{id:D(Fi)(),key:"notice-"+J,data:E},null,8,["id","data"])):fe("",!0)],64))),256))]),_:1},8,["name"])],64)),g("span",{ref_key:"chatPadding",ref:a,class:"chat-padding"}," ",512)],544),g("div",{class:"new-msg",style:In({opacity:b.value.showBottomButton?1:0}),onClick:c[2]||(c[2]=E=>ae(!0))},[g("div",Zs,[ie(k,{icon:["fas","angle-down"]}),j.value>0?(V(),ee("span",er,Q(j.value),1)):fe("",!0)])],4),g("div",{id:"send-more",ref_key:"sendMore",ref:o,class:"more"},[g("div",null,[g("div",null,[ie(an,{name:"pan"},{default:kt(()=>[Ce(ie($s,{onAddSpecialMsg:Ht,onSendMsg:tn},null,512),[[Qe,T.value[1].open]])]),_:1}),ie(an,{name:"pan"},{default:kt(()=>[Ce(g("div",tr,[g("div",null,[ie(k,{icon:["fas","message"]}),g("span",null,Q(D(f)("精华消息")),1),ie(k,{icon:["fas","xmark"],onClick:c[3]||(c[3]=E=>T.value[2].open=!T.value[2].open)})]),g("div",{class:"jin-pan-body",onScroll:mo},[(V(!0),ee(ke,null,dt(n.chat.info.jin_info.list,(E,J)=>(V(),ee("div",{key:"jin-"+J},[g("div",null,[g("img",{src:E.sender_avatar||"/img/icons/icon.svg"},null,8,nr),g("div",null,[g("a",null,Q(E.sender_nick),1),g("span",null,Q(E.sender_time?Intl.DateTimeFormat(D(ne),{hour:"numeric",minute:"numeric"}).format(new Date(E.sender_time*1e3)):"")+" "+Q(D(f)("发送")),1)]),g("span",null,Q(D(f)("{time},由 {name} 设置",{time:E.sender_time?Intl.DateTimeFormat(D(ne),{hour:"numeric",minute:"numeric"}).format(new Date(E.sender_time*1e3)):"",name:E.add_digest_nick})),1)]),g("div",ir,[(V(!0),ee(ke,null,dt(E.msg_content,(Z,oe)=>(V(),ee(ke,{key:"jinc-"+J+"-"+oe},[Z.type==="text"?(V(),ee("span",or,Q(Z.data.text),1)):fe("",!0),Z.type==="face"?(V(),xe(_n,{key:1,emoji:D(qt).get(Number(Z.data.id))},null,8,["emoji"])):fe("",!0),Z.type==="image"?(V(),ee("img",{key:2,src:Z.data.url,onClick:de=>go(Z.data.url)},null,8,ar)):fe("",!0)],64))),128))])]))),128)),Ce(g("div",sr,[ie(k,{icon:["fas","spinner"]})],512),[[Qe,b.value.isJinLoading]])],32)],512),[[Qe,T.value[2].open&&n.chat.info.jin_info.list.length>0]])]),_:1})]),g("div",{class:vt(v.value.length>0?"select-tag show":"select-tag")},[g("div",null,[ie(k,{icon:["fas","share-from-square"],onClick:c[4]||(c[4]=E=>Nt("individual-messages"))}),g("span",null,Q(D(f)("逐条转发")),1)]),g("div",null,[ie(k,{icon:["fas","share"],onClick:c[5]||(c[5]=E=>Nt("merged-messages"))}),g("span",null,Q(D(f)("合并转发")),1)]),g("div",null,[ie(k,{icon:["fas","scissors"]}),g("span",null,Q(D(f)("截图")),1)]),g("div",null,[ie(k,{icon:["fas","trash-can"],onClick:lo}),g("span",null,Q(D(f)("删除")),1)]),g("div",null,[ie(k,{icon:["fas","copy"],onClick:uo}),g("span",null,Q(D(f)("复制")),1)]),g("div",null,[ie(k,{icon:["fas","xmark"],onClick:co}),g("span",null,Q(D(f)("撤回")),1)]),g("div",null,[g("span",{onClick:c[6]||(c[6]=E=>v.value=[])},Q(v.value.length),1),g("span",null,Q(D(f)("取消")),1)])],2),ie(an,{name:"img-pan"},{default:kt(()=>[Ce(g("div",{class:vt({"img-pan":!0,"ss-card":!0}),onWheel:c[7]||(c[7]=E=>E.currentTarget.scrollLeft+=E.deltaY)},[g("div",rr,[(V(!0),ee(ke,null,dt(M.value,([E,J])=>(V(),ee("div",{key:"imgCache-"+E},[g("div",lr,[g("div",{onClick:Z=>Gi(E)},[ie(k,{icon:["fas","pencil"]})],8,ur),c[26]||(c[26]=g("hr",null,null,-1)),g("div",{onClick:Z=>On(E)},[ie(k,{style:{color:"var(--color-red)"},icon:["fas","xmark"]})],8,cr)]),g("div",fr,[g("img",{src:J,alt:"[图片]"},null,8,dr)]),g("span",null,"#"+Q(E),1)]))),128))])],544),[[Qe,M.value.size>0]])]),_:1}),g("div",{class:vt(T.value[3].open?"search-tag show":"search-tag")},[ie(k,{icon:["fas","search"]}),g("span",null,Q(D(t).sysConfig.enable_local_history?D(f)("搜索已保存的消息"):D(f)("搜索已加载的消息")),1),g("div",{onClick:ui},[ie(k,{icon:["fas","xmark"]})])],2),g("div",{class:vt(b.value.isReply?"replay-tag show":"replay-tag")},[ie(k,{icon:["fas","reply"]}),g("span",null,Q(A.value===null?"":A.value.sender.nickname+": "+D(sn)(A.value)),1),g("div",{onClick:Ft},[ie(k,{icon:["fas","xmark"]})])],2),g("div",{class:vt(L.value!=null?"at-tag show":"at-tag"),contenteditable:"true",onBlur:c[8]||(c[8]=E=>we(void 0))},[(V(!0),ee(ke,null,dt(L.value!=null?L.value:[],(E,J)=>(V(),ee("div",{key:"atFind-"+E.user_id,class:vt({selected:J===m.value}),onClick:Z=>we(E.user_id)},[c[27]||(c[27]=g("img",{src:"/img/icons/icon.svg"},null,-1)),g("span",null,Q(E.card!=""&&E.card!=null?E.card:E.nickname),1),g("a",null,Q(E.user_id),1)],10,hr))),128)),((U=L.value)==null?void 0:U.length)==0?(V(),ee("div",mr,[g("span",null,Q(D(f)("没有找到匹配的群成员")),1)])):fe("",!0)],34),g("div",{class:vt((b.value.showMoreDetail?"more-detail show":"more-detail")+(p.value?" voice-menu-open":"")),onClick:c[10]||(c[10]=E=>p.value=!1)},[g("div",{title:D(f)("图片"),onClick:ii},[ie(k,{icon:["fas","image"]}),g("input",{id:"choice-pic",type:"file",accept:"image/*",style:{display:"none"},onChange:Ki},null,32),g("label",vr,Q(D(f)("选择图片")),1)],8,gr),g("div",{title:D(f)("文件"),onClick:oi},[ie(k,{icon:["fas","folder"]}),g("input",{id:"choice-file",type:"file",style:{display:"none"},onChange:Yi},null,32),g("label",yr,Q(D(f)("选择文件")),1)],8,pr),g("div",{title:D(f)("视频"),onClick:Ji},[ie(k,{icon:["fas","video"]}),g("input",{id:"choice-video",type:"file",accept:"video/*",style:{display:"none"},onChange:Xi},null,32),g("label",br,Q(D(f)("选择视频")),1)],8,wr),g("div",kr,[g("div",{title:N.value?D(f)("停止录音"):D(f)("发送语音"),class:vt({active:N.value}),onClick:Nn(no,["stop"])},[ie(k,{icon:["fas",N.value?"stop":"microphone"]},null,8,["icon"])],10,Ir),p.value?(V(),ee("div",{key:0,class:"voice-menu",onClick:c[9]||(c[9]=Nn(()=>{},["stop"]))},[g("div",{onClick:io},Q(D(f)("浏览器录音")),1),g("div",{onClick:ao},Q(D(f)("音频文件")),1)])):fe("",!0),g("input",{id:"choice-audio",type:"file",accept:"audio/*",style:{display:"none"},onChange:so},null,32)]),c[28]||(c[28]=g("div",{class:"space"},null,-1)),g("div",{title:D(f)("搜索消息"),onClick:fo},[ie(k,{icon:["fas","search"]})],8,_r)],2)]),g("div",null,[Ce((V(),ee("div",{onClick:c[11]||(c[11]=E=>fi(D(t).sysConfig.quick_send))},[b.value.showMoreDetail||T.value.find(E=>E.open)?(V(),xe(k,{key:0,icon:["fas","minus"]})):D(t).sysConfig.quick_send=="default"?(V(),xe(k,{key:1,icon:["fas","plus"]})):D(t).sysConfig.quick_send=="img"?(V(),xe(k,{key:2,icon:["fas","image"]})):D(t).sysConfig.quick_send=="file"?(V(),xe(k,{key:3,icon:["fas","folder"]})):fe("",!0)])),[[D(Ao),E=>fi(),void 0,{prevent:!0}]]),g("div",null,[g("form",{onSubmit:Ve},[y.value?(V(),ee("div",{key:0,id:"voice-pending-input",class:"voice-pending",role:"button",onClick:oo},[g("span",null,"["+Q(D(f)("语音"))+"]",1),ie(k,{icon:["fas","xmark"]})])):(V(),ee(ke,{key:1},[D(t).sysConfig.send_key==="none"?(V(),ee(ke,{key:0},[g("label",Sr,Q(D(f)("消息输入框")),1),Ce(g("input",{id:"main-input",ref_key:"mainInput",ref:d,"onUpdate:modelValue":c[12]||(c[12]=E=>x.value=E),type:"text",autocomplete:"off",disabled:D(e).openSideBar||n.chat.info.me_info.shut_up_timestamp>0,placeholder:n.chat.info.me_info.shut_up_timestamp>0?D(f)("已被禁言至:{time}",{time:Intl.DateTimeFormat(D(ne),D(Ti)(new Date(n.chat.info.me_info.shut_up_timestamp*1e3))).format(new Date(n.chat.info.me_info.shut_up_timestamp*1e3))}):"",onPaste:ni,onKeydown:Ae,onKeyup:nt,onClick:St,onInput:li},null,40,Cr),[[un,x.value]])],64)):(V(),ee(ke,{key:1},[g("label",Mr,Q(D(f)("消息输入框")),1),Ce(g("textarea",{id:"main-input-ex",ref_key:"mainInput",ref:d,"onUpdate:modelValue":c[13]||(c[13]=E=>x.value=E),type:"text",disabled:D(e).openSideBar,onPaste:ni,onKeydown:ue,onKeyup:nt,onClick:St,onInput:li,onCompositionstart:lt,onCompositionend:qe},null,40,Ar),[[un,x.value]])],64))],64))],32),Wt(s.$slots,"main-input-button",{},void 0,!0),g("div",{onClick:c[14]||(c[14]=E=>tn("sendMsgBack"))},[T.value[3].open?(V(),xe(k,{key:0,icon:["fas","search"]})):(V(),xe(k,{key:1,icon:["fas","angle-right"]}))])])]),c[29]||(c[29]=g("div",null,null,-1))],512),ie(Bs,{ref_key:"mergePan",ref:$},null,512),(V(),xe(To,{to:"body"},[g("div",{class:vt("msg-menu"+(["linux","win32"].includes(D(yt).platform??"")?" withBar":""))},[Ce(g("div",{class:"msg-menu-bg",onClick:ct},null,512),[[Qe,b.value.showMsgMenu]]),g("div",{id:"msgMenu",class:vt(b.value.showMsgMenu?"ss-card msg-menu-body show":"ss-card msg-menu-body")},[Ce(g("div",{onClick:c[15]||(c[15]=E=>Bn())},[g("div",null,[ie(k,{icon:["fas","plus"]})]),g("a",null,Q(D(f)("+ 1")),1)],512),[[Qe,b.value.menuDisplay.add]]),Ce(g("div",{onClick:c[16]||(c[16]=E=>rt(!0))},[g("div",null,[ie(k,{icon:["fas","message"]})]),g("a",null,Q(D(f)("回复")),1)],512),[[Qe,b.value.menuDisplay.relpy]]),Ce(g("div",{onClick:c[17]||(c[17]=E=>Nt())},[g("div",null,[ie(k,{icon:["fas","share"]})]),g("a",null,Q(D(f)("转发")),1)],512),[[Qe,b.value.menuDisplay.forward]]),Ce(g("div",{onClick:c[18]||(c[18]=E=>Se())},[g("div",null,[ie(k,{icon:["fas","circle-check"]})]),g("a",null,Q(D(f)("多选")),1)],512),[[Qe,b.value.menuDisplay.select]]),Ce(g("div",{onClick:Gt},[g("div",null,[ie(k,{icon:["fas","clipboard"]})]),g("a",null,Q(D(f)("复制")),1)],512),[[Qe,b.value.menuDisplay.copy]]),Ce(g("div",{onClick:fn},[g("div",null,[ie(k,{icon:["fas","code"]})]),g("a",null,Q(D(f)("复制选中文本")),1)],512),[[Qe,b.value.menuDisplay.copySelect]]),Ce(g("div",{onClick:Ye},[g("div",null,[ie(k,{icon:["fas","object-ungroup"]})]),g("a",null,Q(D(f)("复制图片")),1)],512),[[Qe,b.value.menuDisplay.copyImg]]),Ce(g("div",{onClick:Bt},[g("div",null,[ie(k,{icon:["fas","floppy-disk"]})]),g("a",null,Q(D(f)("下载图片")),1)],512),[[Qe,b.value.menuDisplay.downloadImg!=!1]]),Ce(g("div",{onClick:Kt},[g("div",null,[ie(k,{icon:["fas","xmark"]})]),g("a",null,Q(D(f)("撤回")),1)],512),[[Qe,b.value.menuDisplay.revoke]]),Ce(g("div",{onClick:mt},[g("div",null,[ie(k,{icon:["fas","pencil"]})]),g("a",null,Q(D(f)("重新编辑")),1)],512),[[Qe,b.value.menuDisplay.reedit]]),Ce(g("div",{onClick:c[19]||(c[19]=E=>{A.value&&Ht({msgObj:{type:"at",qq:Number(A.value.sender.user_id)},addText:!0}),Jt(),ct()})},[g("div",null,[ie(k,{icon:["fas","at"]})]),g("a",null,Q(D(f)("提及")),1)],512),[[Qe,b.value.menuDisplay.at]]),Ce(g("div",{onClick:c[20]||(c[20]=E=>ci(A.value?A.value.sender.user_id:void 0))},[g("div",null,[ie(k,{icon:["fas","fa-hand-point-up"]})]),g("a",null,Q(D(f)("戳一戳")),1)],512),[[Qe,b.value.menuDisplay.poke]]),Ce(g("div",{onClick:dn},[g("div",null,[ie(k,{icon:["fas","trash-can"]})]),g("a",null,Q(D(f)("移出群聊")),1)],512),[[Qe,b.value.menuDisplay.remove]]),Ce(g("div",{onClick:c[21]||(c[21]=E=>{var J;hn(),s.$refs.infoRef.openMoreConfig((J=A.value)==null?void 0:J.sender.user_id),ct()})},[g("div",null,[ie(k,{icon:["fas","cog"]})]),g("a",null,Q(D(f)("成员设置")),1)],512),[[Qe,b.value.menuDisplay.config]]),Ce(g("div",{onClick:Rt},[g("div",null,[ie(k,{icon:["fas","arrow-up-right-from-square"]})]),g("a",null,Q(D(f)("跳转到消息")),1)],512),[[Qe,b.value.menuDisplay.jumpToMsg]]),Ce(g("div",{onClick:bt},[g("div",null,[ie(k,{icon:["fas","screwdriver-wrench"]})]),g("a",null,Q(D(f)("调试信息")),1)],512),[[Qe,D(X)]])],2)],2)])),ie(an,{name:"chat-info-float",duration:{enter:300,leave:200}},{default:kt(()=>[ie(Ga,{ref:"infoRef",chat:n.chat,tags:b.value,onClose:hn},null,8,["chat","tags"])]),_:1}),ie(an,null,{default:kt(()=>[b.value.showForwardPan?(V(),ee("div",Tr,[g("div",Er,[g("header",null,[g("span",null,Q(D(f)("转发消息")),1),ie(k,{icon:["fas","xmark"],onClick:ht})]),g("label",xr,Q(D(f)("搜索转发对象")),1),g("input",{id:"chat-forward-search",placeholder:D(f)("搜索 ……"),onInput:Dt},null,40,Fr),g("div",null,[(V(!0),ee(ke,null,dt(G.value,E=>(V(),ee("div",{key:"forwardList-"+(E.user_id??E.group_id),onClick:J=>Tt(E)},[g("img",{loading:"lazy",title:en(E),src:E.avatar||"/img/icons/icon.svg"},null,8,Lr),g("div",null,[g("p",null,Q(en(E)),1),g("span",null,Q(E.group_id?D(f)("群组"):D(f)("好友")),1)])],8,$r))),128))])]),g("div",{class:"bg",onClick:ht})])):fe("",!0)]),_:1}),g("div",{class:"bg",style:In({"backdrop-filter":`blur(${D(t).sysConfig.chat_more_blur?0:D(t).sysConfig.chat_background_blur}px)`})},null,4)],38)),[[D(Mo),Be]])}}}),Ur=Rn(Dr,[["__scopeId","data-v-3cdf13e7"]]);export{Ur as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as l,i as r,o as n,c as s,t as i,u as m,a as c,b as e}from"./index-CPTXiemn.js";const p={class:"meal-hungry-pan"},u={key:0},y=l({name:"MealHungryPan",__name:"MealHungryPan",props:{times:{}},setup(t){const o=r.global.t;return(d,a)=>(n(),s("div",p,[t.times?(n(),s("span",u,i(m(o)("好耶!Stapxs QQ Lite 已经被打开 {times} 次了!",{times:t.times})),1)):c("",!0),a[0]||(a[0]=e("div",null,[e("div",{class:"hun-text"},[e("span",null,"饿饿!饭饭!"),e("a",null,"非常感谢使用本项目,并给予关注与支持;你的信任是我持续改进与维护的最大动力。"),e("a",null,"本项目驱动自咖啡,如果你觉得这个项目帮到了你,欢迎赞助我一杯咖啡!"),e("a",{style:{"font-size":"0.8rem","text-align":"center",display:"block","margin-top":"15px",color:"var(--color-font-2)"}},"-- 表情包:Copyright @ 鹰角网络 --"),e("br"),e("a",{style:{"text-align":"center","font-size":"0.8rem","text-wrap":"nowrap",color:"var(--color-font-1)","font-family":"meow, sans-serif"}},"戳下面戳下面,打开去看看嘛—— (。•́︿•̀。)")]),e("div",null,[e("div",{class:"meme"})])],-1))]))}});export{y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as m}from"./MsgBody.vue_vue_type_script_setup_true_lang-CPZjRLp6.js";import"./index-CPTXiemn.js";export{m as default};
|