koishi-plugin-chat-patch 5.0.3 → 5.1.0
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/{Chat-CXjwWCiV.js → Chat-BoNiWGxb.js} +1 -1
- package/client/web/dist/assets/{MsgBody-LNGNGtE3.js → MsgBody-DLeOklIb.js} +1 -1
- package/client/web/dist/assets/{MsgBody.vue_vue_type_script_setup_true_lang-BK5okBfM.js → MsgBody.vue_vue_type_script_setup_true_lang-CGjy4Jzz.js} +1 -1
- package/client/web/dist/assets/{index-CwyyQN13.js → index-Cz89G4we.js} +64 -64
- package/client/web/dist/index.html +1 -1
- package/client/web/src/function/connect.ts +12 -11
- package/client/web/src/function/msg.ts +14 -5
- package/client/web/src/function/satori-model.ts +4 -3
- package/client/web/src/function/utils/msgUtil.ts +36 -36
- package/client/web/src/function/utils/sessionUtil.ts +22 -0
- package/client/web/src/pages/Messages.vue +8 -4
- package/package.json +1 -1
- package/src/web.ts +712 -712
|
@@ -1,5 +1,5 @@
|
|
|
1
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,b as xe,e as kt,F as ke,f as dt,m as di,t as vo,n as vt,g as In,h as Ii,i as ie,j as he,k as Pt,l as be,p as cn,q as pt,s as po,v as Kn,x as It,y as rn,z as yo,A as xn,B as _i,C as Fn,D as Si,E as $n,G as Ln,H as g,I 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-CwyyQN13.js";import{_ as _n,a as ln}from"./MsgBody.vue_vue_type_script_setup_true_lang-BK5okBfM.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=`
|
|
2
|
+
import{d as zt,w as Ce,u as D,o as V,c as ee,r as Wt,a as fe,b as xe,e as kt,F as ke,f as dt,m as di,t as vo,n as vt,g as In,h as Ii,i as ie,j as he,k as Pt,l as be,p as cn,q as pt,s as po,v as Kn,x as It,y as rn,z as yo,A as xn,B as _i,C as Fn,D as Si,E as $n,G as Ln,H as g,I 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-Cz89G4we.js";import{_ as _n,a as ln}from"./MsgBody.vue_vue_type_script_setup_true_lang-CGjy4Jzz.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
3
|
let scriptImported = false
|
|
4
4
|
self.addEventListener('message', async (e) => {
|
|
5
5
|
const { file, id, imageCompressionLibUrl, options } = e.data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./MsgBody.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{a as m}from"./MsgBody.vue_vue_type_script_setup_true_lang-CGjy4Jzz.js";import"./index-Cz89G4we.js";export{m as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aK as Xo,ah as de,aL as Nt,aM as Ht,V as ve,aN as Ae,d as fe,G as Le,o as h,b as Se,c as _,I as b,p as Ct,aO as Yo,n as te,i as K,u as l,aP as Qo,j as x,_ as xe,C as Hn,H as y,F as ke,f as Ke,aQ as er,ax as tr,a as F,aR as Ee,ak as ye,aa as Gt,a9 as kt,v as Kt,aS as nr,aT as or,q as wt,aU as rr,S as Gn,x as Xt,aV as sr,r as Kn,aW as Xn,aX as ir,aq as ar,aY as hn,e as Yn,aZ as Qn,h as cr,k as Ue,ac as eo,P as ur,M as Bt,a_ as lr,ao as Ne,g as Ut,D as dr,A as fr,B as pr,Z as mr,E as hr,a$ as gr,a4 as _r,U as vr,w as Me,ap as gn,b0 as _n,b1 as yr,aF as Ve,a1 as st,K as it,b2 as br,aj as kr,a8 as wr,an as vn,b3 as $r,b4 as zr,b5 as yn,b6 as Sr,ai as Ir,b7 as Cr,X as Or,W as jr,Q as Rt,R as Lt,b8 as Er}from"./index-
|
|
1
|
+
import{aK as Xo,ah as de,aL as Nt,aM as Ht,V as ve,aN as Ae,d as fe,G as Le,o as h,b as Se,c as _,I as b,p as Ct,aO as Yo,n as te,i as K,u as l,aP as Qo,j as x,_ as xe,C as Hn,H as y,F as ke,f as Ke,aQ as er,ax as tr,a as F,aR as Ee,ak as ye,aa as Gt,a9 as kt,v as Kt,aS as nr,aT as or,q as wt,aU as rr,S as Gn,x as Xt,aV as sr,r as Kn,aW as Xn,aX as ir,aq as ar,aY as hn,e as Yn,aZ as Qn,h as cr,k as Ue,ac as eo,P as ur,M as Bt,a_ as lr,ao as Ne,g as Ut,D as dr,A as fr,B as pr,Z as mr,E as hr,a$ as gr,a4 as _r,U as vr,w as Me,ap as gn,b0 as _n,b1 as yr,aF as Ve,a1 as st,K as it,b2 as br,aj as kr,a8 as wr,an as vn,b3 as $r,b4 as zr,b5 as yn,b6 as Sr,ai as Ir,b7 as Cr,X as Or,W as jr,Q as Rt,R as Lt,b8 as Er}from"./index-Cz89G4we.js";class bn{static isMsgInline(t){switch(t){case"at":case"text":case"face":case"i18n":return!0;case"bface":case"image":case"record":case"video":case"file":case"json":case"xml":return!1}return!1}static parseText(t){return t=t.replaceAll(`\r
|
|
2
2
|
`,`
|
|
3
3
|
`).replaceAll("\r",`
|
|
4
4
|
`),t=t.replace(/&([^;]+);/g,"&$1;"),t=Xo(t,{whiteList:{a:["href","target"]}}),t}}const Zr={async bilibili(e){const t=new de,n=s=>{try{const i=Number(s);return i/1e4>=1?(i/1e4).toFixed(1)+" w":i/1e3>=1?(i/1e3).toFixed(1)+" k":i.toString()}catch{return s}},o="https://api.bilibili.com/x/web-interface/wbi/view?bvid=",r=e.match(/bilibili.com\/video\/(BV[0-9a-zA-Z]+)/);if(r){const s=r[1];t.info(`[linkView] 获取到 bilibili 链接:${s}`);const i=await Nt(o+s);if(i&&i.code===0){t.info(`[linkView] 预览 bilibili 链接成功:${i.data.title}`);const c=i.data.stat;return Object.keys(c).forEach(u=>{c[u]=n(c[u])}),{type:"bilibili",sub_type:"video",url:e,data:{title:i.data.title,desc:i.data.desc,pic:i.data.pic,public:i.data.pubdate,owner:i.data.owner,stat:c}}}}return null},async music163(e){const t=new de,n=new URL(e),r=new URLSearchParams(n.search).get("id");if(r!=null){t.info(`[linkView] 获取获取网易云音乐歌曲 ID:${r}`);const s=void 0;try{const i=await Nt(s+"/song/detail?ids="+r),c=await Nt(s+"/song/url?id="+r),u={detail:i,url:c},a=await Ht(ve.proxyUrl(Ae.query(u.detail,"$..al.picUrl")[0]),.4),d={type:"music163",sub_type:"song",data:{id:r,play_link:Ae.query(u.url,"$..url")[0],cover:Ae.query(u.detail,"$..al.picUrl")[0],cover_light:a[1][1]=="light",info:{name:Ae.query(u.detail,"$..name")[0],author:Ae.query(u.detail,"$..ar[*].name"),time:Ae.query(u.detail,"$..dt")[0]/1e3,free:Ae.query(u.url,"$..freeTrialInfo")[0]!=null?{start:Ae.query(u.url,"$..freeTrialInfo")[0].start,end:Ae.query(u.url,"$..freeTrialInfo")[0].end}:null}}};return t.info("[linkView] 预览网易云音乐成功"),d}catch(i){t.error(i,"[linkView] 预览网易云音乐失败")}}return null}},Tr=["alt","title","src"],Pr=["title"],kn=fe({__name:"EmojiFace",props:{emoji:{default:()=>{}}},setup(e){return(t,n)=>{const o=Le("font-awesome-icon");return e.emoji===void 0?(h(),Se(o,{key:0,icon:["fas","face-grin-wide"],title:t.$t("表情"),class:"emoji-face"},null,8,["title"])):e.emoji.type==="apng"?(h(),_("img",{key:1,class:"emoji-face",loading:"lazy",alt:e.emoji.description,title:e.emoji.description,src:e.emoji.value},null,8,Tr)):(h(),_("span",{key:2,title:e.emoji.description,class:"emoji-face"},b(e.emoji.value),9,Pr))}}}),Ar=fe({__name:"LazyLottie",props:{animationLink:{},title:{}},setup(e){const t=x(null),n=x(null),o=x(!1);let r=null;const s=()=>{var c,u;if(n.value)try{(u=(c=n.value).play)==null||u.call(c)}catch{}},i=()=>{var c,u;n.value&&((u=(c=n.value).pause)==null||u.call(c))};return Ct(()=>{t.value&&(r=new IntersectionObserver(c=>{c.forEach(u=>{u.isIntersecting&&u.intersectionRatio>=.5?s():u.intersectionRatio<.1&&i()})},{rootMargin:"50px",threshold:[.1,.5,.9]}),r.observe(t.value))}),Yo(()=>{i(),r&&t.value&&(r.unobserve(t.value),r.disconnect(),r=null)}),(c,u)=>(h(),_("div",{ref_key:"lottieContainer",ref:t,class:te(["lazy-lottie",{loaded:o.value}])},[K(l(Qo),{ref_key:"lottieRef",ref:n,"animation-link":e.animationLink,title:e.title,"auto-play":!1,onOnAnimationLoaded:u[0]||(u[0]=a=>o.value=!0)},null,8,["animation-link","title"])],2))}}),Mr=xe(Ar,[["__scopeId","data-v-95afa593"]]);var wn;function g(e,t,n){function o(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:i,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);const a=i.prototype,d=Object.keys(a);for(let m=0;m<d.length;m++){const w=d[m];w in c||(c[w]=a[w].bind(c))}}const r=(n==null?void 0:n.Parent)??Object;class s extends r{}Object.defineProperty(s,"name",{value:e});function i(c){var u;const a=n!=null&&n.Parent?new s:this;o(a,c),(u=a._zod).deferred??(u.deferred=[]);for(const d of a._zod.deferred)d();return a}return Object.defineProperty(i,"init",{value:o}),Object.defineProperty(i,Symbol.hasInstance,{value:c=>{var u,a;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(a=(u=c==null?void 0:c._zod)==null?void 0:u.traits)==null?void 0:a.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}class Ye extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class to extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(wn=globalThis).__zod_globalConfig??(wn.__zod_globalConfig={});const Yt=globalThis.__zod_globalConfig;function Je(e){return Yt}function no(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function Vt(e,t){return typeof t=="bigint"?t.toString():t}function Qt(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function en(e){return e==null}function tn(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Nr(e,t){const n=e/t,o=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o)<r?0:n-o}const $n=Symbol("evaluating");function D(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==$n)return o===void 0&&(o=$n,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function qe(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function De(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function zn(e){return JSON.stringify(e)}function Ur(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const oo="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function $t(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Rr=Qt(()=>{var e;if(Yt.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function dt(e){if($t(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!($t(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ro(e){return dt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Lr=new Set(["string","number","symbol"]);function Qe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fe(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(o._zod.parent=e),o}function O(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function xr(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Dr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Fr(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=De(e._zod.def,{get shape(){const i={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(i[c]=n.shape[c])}return qe(this,"shape",i),i},checks:[]});return Fe(e,s)}function Br(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=De(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete i[c]}return qe(this,"shape",i),i},checks:[]});return Fe(e,s)}function Vr(e,t){if(!dt(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=De(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return qe(this,"shape",s),s}});return Fe(e,r)}function Jr(e,t){if(!dt(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=De(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return qe(this,"shape",o),o}});return Fe(e,n)}function Wr(e,t){var o;if((o=e._zod.def.checks)!=null&&o.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=De(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return qe(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Fe(e,n)}function qr(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=De(t._zod.def,{get shape(){const c=t._zod.def.shape,u={...c};if(n)for(const a in n){if(!(a in c))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(u[a]=e?new e({type:"optional",innerType:c[a]}):c[a])}else for(const a in c)u[a]=e?new e({type:"optional",innerType:c[a]}):c[a];return qe(this,"shape",u),u},checks:[]});return Fe(t,i)}function Hr(e,t,n){const o=De(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:r[i]}))}else for(const i in r)s[i]=new e({type:"nonoptional",innerType:r[i]});return qe(this,"shape",s),s}});return Fe(t,o)}function Xe(e,t=0){var n;if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(((n=e.issues[o])==null?void 0:n.continue)!==!0)return!0;return!1}function Gr(e,t=0){var n;if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(((n=e.issues[o])==null?void 0:n.continue)===!1)return!0;return!1}function so(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function vt(e){return typeof e=="string"?e:e==null?void 0:e.message}function We(e,t,n){var u,a,d,m,w,v;const o=e.message?e.message:vt((d=(a=(u=e.inst)==null?void 0:u._zod.def)==null?void 0:a.error)==null?void 0:d.call(a,e))??vt((m=t==null?void 0:t.error)==null?void 0:m.call(t,e))??vt((w=n.customError)==null?void 0:w.call(n,e))??vt((v=n.localeError)==null?void 0:v.call(n,e))??"Invalid input",{inst:r,continue:s,input:i,...c}=e;return c.path??(c.path=[]),c.message=o,t!=null&&t.reportInput&&(c.input=i),c}function nn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ft(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const io=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Vt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ao=g("$ZodError",io),co=g("$ZodError",io,{Parent:Error});function Kr(e,t=n=>n.message){const n={},o=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function Xr(e,t=n=>n.message){const n={_errors:[]},o=(r,s=[])=>{for(const i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(c=>o({issues:c},[...s,...i.path]));else if(i.code==="invalid_key")o({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")o({issues:i.issues},[...s,...i.path]);else{const c=[...s,...i.path];if(c.length===0)n._errors.push(t(i));else{let u=n,a=0;for(;a<c.length;){const d=c[a];a===c.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(i))):u[d]=u[d]||{_errors:[]},u=u[d],a++}}}};return o(e),n}const on=e=>(t,n,o,r)=>{const s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Ye;if(i.issues.length){const c=new((r==null?void 0:r.Err)??e)(i.issues.map(u=>We(u,s,Je())));throw oo(c,r==null?void 0:r.callee),c}return i.value},rn=e=>async(t,n,o,r)=>{const s=o?{...o,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const c=new((r==null?void 0:r.Err)??e)(i.issues.map(u=>We(u,s,Je())));throw oo(c,r==null?void 0:r.callee),c}return i.value},Ot=e=>(t,n,o)=>{const r=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},r);if(s instanceof Promise)throw new Ye;return s.issues.length?{success:!1,error:new(e??ao)(s.issues.map(i=>We(i,r,Je())))}:{success:!0,data:s.value}},Yr=Ot(co),jt=e=>async(t,n,o)=>{const r=o?{...o,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},r);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>We(i,r,Je())))}:{success:!0,data:s.value}},Qr=jt(co),es=e=>(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return on(e)(t,n,r)},ts=e=>(t,n,o)=>on(e)(t,n,o),ns=e=>async(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return rn(e)(t,n,r)},os=e=>async(t,n,o)=>rn(e)(t,n,o),rs=e=>(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return Ot(e)(t,n,r)},ss=e=>(t,n,o)=>Ot(e)(t,n,o),is=e=>async(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return jt(e)(t,n,r)},as=e=>async(t,n,o)=>jt(e)(t,n,o),cs=/^[cC][0-9a-z]{6,}$/,us=/^[0-9a-z]+$/,ls=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ds=/^[0-9a-vA-V]{20}$/,fs=/^[A-Za-z0-9]{27}$/,ps=/^[a-zA-Z0-9_-]{21}$/,ms=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,hs=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Sn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,gs=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_s="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vs(){return new RegExp(_s,"u")}const ys=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,bs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ks=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ws=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$s=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uo=/^[A-Za-z0-9_-]*$/,zs=/^https?$/,Ss=/^\+[1-9]\d{6,14}$/,lo="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Is=new RegExp(`^${lo}$`);function fo(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Cs(e){return new RegExp(`^${fo(e)}$`)}function Os(e){const t=fo({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${lo}T(?:${o})$`)}const js=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Es=/^-?\d+$/,Zs=/^-?\d+(?:\.\d+)?$/,Ts=/^[^A-Z]*$/,Ps=/^[^a-z]*$/,we=g("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),po={number:"number",bigint:"bigint",object:"date"},mo=g("$ZodCheckLessThan",(e,t)=>{we.init(e,t);const n=po[typeof t.value];e._zod.onattach.push(o=>{const r=o._zod.bag,s=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ho=g("$ZodCheckGreaterThan",(e,t)=>{we.init(e,t);const n=po[typeof t.value];e._zod.onattach.push(o=>{const r=o._zod.bag,s=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),As=g("$ZodCheckMultipleOf",(e,t)=>{we.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Nr(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ms=g("$ZodCheckNumberFormat",(e,t)=>{var i;we.init(e,t),t.format=t.format||"float64";const n=(i=t.format)==null?void 0:i.includes("int"),o=n?"int":"number",[r,s]=Dr[t.format];e._zod.onattach.push(c=>{const u=c._zod.bag;u.format=t.format,u.minimum=r,u.maximum=s,n&&(u.pattern=Es)}),e._zod.check=c=>{const u=c.value;if(n){if(!Number.isInteger(u)){c.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?c.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):c.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}u<r&&c.issues.push({origin:"number",input:u,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),u>s&&c.issues.push({origin:"number",input:u,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Ns=g("$ZodCheckMaxLength",(e,t)=>{var n;we.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!en(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const r=o.value;if(r.length<=t.maximum)return;const i=nn(r);o.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Us=g("$ZodCheckMinLength",(e,t)=>{var n;we.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!en(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const r=o.value;if(r.length>=t.minimum)return;const i=nn(r);o.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Rs=g("$ZodCheckLengthEquals",(e,t)=>{var n;we.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!en(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{const r=o.value,s=r.length;if(s===t.length)return;const i=nn(r),c=s>t.length;o.issues.push({origin:i,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Et=g("$ZodCheckStringFormat",(e,t)=>{var n,o;we.init(e,t),e._zod.onattach.push(r=>{const s=r._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Ls=g("$ZodCheckRegex",(e,t)=>{Et.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),xs=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ts),Et.init(e,t)}),Ds=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ps),Et.init(e,t)}),Fs=g("$ZodCheckIncludes",(e,t)=>{we.init(e,t);const n=Qe(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Bs=g("$ZodCheckStartsWith",(e,t)=>{we.init(e,t);const n=new RegExp(`^${Qe(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Vs=g("$ZodCheckEndsWith",(e,t)=>{we.init(e,t);const n=new RegExp(`.*${Qe(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),Js=g("$ZodCheckOverwrite",(e,t)=>{we.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Ws{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(`
|