koishi-plugin-chat-patch 5.5.0 → 5.5.1
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-Clqxn7CB.js → Chat-B5Jdrz_2.js} +1 -1
- package/client/web/dist/assets/{MsgBody-C0TKsXhC.js → MsgBody-tPnKSZOs.js} +1 -1
- package/client/web/dist/assets/{MsgBody.vue_vue_type_script_setup_true_lang-CCdBwlN_.js → MsgBody.vue_vue_type_script_setup_true_lang-ClDybRo_.js} +1 -1
- package/client/web/dist/assets/{index-BA37EQGa.js → index-CSGfOsfr.js} +59 -59
- package/client/web/dist/index.html +1 -1
- package/client/web/src/function/msg.ts +1 -1
- package/client/web/src/function/satori-model.ts +20 -2
- package/client/web/src/pages/Messages.vue +4 -5
- package/package.json +1 -1
|
@@ -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 Bt,w as Ce,u as B,o as W,c as ee,r as Pt,a as me,b as Me,e as It,F as Ie,f as vt,m as ci,t as mo,n as gt,g as In,h as bi,i as ie,j as ge,k as Ut,l as ye,p as cn,q as wt,s as go,v as Gn,x as _t,y as sn,z as vo,A as En,B as ki,C as xn,D as Ii,E as Fn,G as Ln,H as g,I as G,J as Sn,K as Ke,T as _i,L as un,M as it,N as fi,O as di,P as Jt,Q as ut,R as Be,S as Si,_ as $n,U as Ci,V as bt,W as po,X as Mi,Y as yo,Z as Kn,$ as Ai,a0 as wo,a1 as gn,a2 as hi,a3 as Ti,a4 as jn,a5 as Ei,a6 as xi,a7 as qn,a8 as Vn,a9 as bo,aa as ko,ab as tn,ac as vn,ad as mi,ae as Io,af as _o,ag as Dt,ah as pn,ai as So,aj as yn,ak as nn,al as on,am as an,an as Un,ao as Co,ap as Mo,aq as Ao,ar as To,as as Eo,at as gi,au as vi,av as xo,aw as Nt,ax as Fo,ay as Lo,az as wn,aA as $o,aB as Ro,aC as Do,aD as Bo,aE as Oo,aF as Uo,aG as zo,aH as No,aI as Ho}from"./index-BA37EQGa.js";import{_ as Wn,E as rn,a as ln}from"./MsgBody.vue_vue_type_script_setup_true_lang-CCdBwlN_.js";function Jn(n,f,D){if(!D)return f;const r=n==null?void 0:n[D];if(r==null)throw new Error(`Key is ${r} on item (keyField is '${D}')`);return r}function bn(n,f){return n.map((D,r)=>Jn(D,r,f))}function Po(n,f,D){const r=[],e=[];for(let t=0;t<n.length;t++){const l=n[t],u=Jn(l,t,f),w=D(l,t,u);r.push(u),e.push(typeof w=="number"&&w>0?w:null)}return{keys:r,sizes:e}}function jo(n,f,D){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]!==Jn(f[r],r,D))return!1;return!0}function qo(n,f,D){if(!jo(n,f,D))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 Vo(n,f){if(!n.length||f.length<=n.length)return 0;const D=n[0],r=f.indexOf(D);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 pi(n,f,D,r,e,t=0){const l=e??"start";if(l==="nearest"){const u=D+r,w=n+f;return n>=D&&w<=u?null:n<D?n+t:w-r+t}return l==="end"?n+f-r+t:l==="center"?n+(f-r)/2+t:n+t}const Wo={itemsLimit:1e3};function Fi(n){return typeof window<"u"&&n===window}const Qo=(()=>{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 D=n.scrollLeft<0;return document.body.removeChild(n),D?"negative":"default"})();function Gt(n,f,D){return f!=="horizontal"||!D||Fi(D)||getComputedStyle(D).direction!=="rtl"?n:Qo==="negative"?-n:n}function Go(n,f,D){return Gt(n,f,D)}function zn(n,f,D,r){const e=Go(D,f,n),t=!!(r!=null&&r.smooth);if(Fi(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 Ko(n,f,D){return D?f==="vertical"?window.innerHeight:window.innerWidth:f==="vertical"?n.clientHeight:n.clientWidth}const Jo=/auto|scroll/;function Li(n,f){return n.parentNode===null?f:Li(n.parentNode,[...f,n])}function Nn(n,f){return getComputedStyle(n,null).getPropertyValue(f)}function Yo(n){return Nn(n,"overflow")+Nn(n,"overflow-y")+Nn(n,"overflow-x")}function Xo(n){return Jo.test(Yo(n))}function kn(n){if(!(n instanceof HTMLElement||n instanceof SVGElement))return;const f=Li(n.parentNode,[]);for(let D=0;D<f.length;D+=1)if(f[D]instanceof Element&&Xo(f[D]))return f[D];return document.scrollingElement||document.documentElement}let Qn=!1;function Zo(){return Qn}if(typeof window<"u"){Qn=!1;try{const n=Object.defineProperty({},"passive",{get(){Qn=!0}});window.addEventListener("test",null,n)}catch{}}let ea=0;function Hn(n){const f=n;f._vs_styleStamp++}function ta(n,f,D){const r=n==null?void 0:n[D];if(r==null)throw new Error(`Key is ${r} on item (keyField is '${D}')`);return r}function na(n,f,D,r,e){const t=ge([]),l=ge(0),u=ge(!1);let w=0,L=0;const i=new Map,a=new Map;let o=!1,d=0,v=0,R=!1,k=null,T=null,K=null,P=0,x=null,q=[],M=null,N=null,y=null,p=!1;const F=new Set,_=ge({}),S=Ut(()=>{const H=ye(n);return H.items.length>0&&typeof H.items[0]!="object"}),A=Ut(()=>{const H=ye(n);if(H.itemSize===null){const V={[-1]:{accumulator:0}},te=H.items,ae=H.sizeField??"size",se=H.minItemSize,le=_.value;let ce=1e4,Te=0,tt;for(let je=0,nt=te.length;je<nt;je++){const Ne=S.value?je:ta(te[je],je,H.keyField);tt=le[Ne]||te[je][ae]||se,tt<ce&&(ce=tt),Te+=tt,V[je]={accumulator:Te,size:tt}}return P=ce,V}return[]}),I=Ut(()=>t.value.filter(H=>H.nr.used).sort((H,V)=>H.nr.index-V.nr.index)),$=Ut(()=>{const H=ye(n),V=S.value?null:H.keyField;return Po(H.items,V,(te,ae,se)=>H.itemSize!=null?H.itemSize:_.value[se]||(te==null?void 0:te[H.sizeField??"size"])||void 0)});function m(H){const V=ye(n);return _.value=qo(H,V.items,S.value?null:V.keyField),Object.keys(_.value).length>0}function h(H){let V=a.get(H);return V||(V=[],a.set(H,V)),V}function O(H,V,te,ae,se){const le=sn({id:ea++,index:V,used:!0,key:ae,type:se}),ce=vo({item:te,position:0,offset:0,nr:le,_vs_styleStamp:0});return H.push(ce),ce}function C(H){const V=h(H);if(V&&V.length){const te=V.pop();return te.nr.used=!0,Hn(te),te}}function z(H){const V=H.nr.type;h(V).push(H),H.nr.used=!1,H.position=-9999,Hn(H),i.delete(H.nr.key)}function Q(){i.clear(),a.clear();for(let H=0,V=t.value.length;H<V;H++){const te=t.value[H];te&&z(te)}}function Y(H){let V=-1;return V=requestAnimationFrame(()=>{F.delete(V),H()}),F.add(V),V}function ne(){for(const H of F)cancelAnimationFrame(H);F.clear()}function X(){k&&(clearTimeout(k),k=null),T&&(clearTimeout(T),T=null),K&&(clearTimeout(K),K=null),N&&(clearTimeout(N),N=null),y&&(clearTimeout(y),y=null)}function j(){var H;(H=e==null?void 0:e.onResize)==null||H.call(e),u.value&&ue(!1)}function re(){M&&!p&&_e();const H=ye(n);if(!o){if(o=!0,k)return;const V=()=>Y(()=>{o=!1;const{continuous:te}=ue(!1,!0);te||(T&&clearTimeout(T),T=setTimeout(re,H.updateInterval+100))});V(),H.updateInterval&&(k=setTimeout(()=>{k=null,o&&V()},H.updateInterval))}}function Re(H,V){var te,ae;u.value&&(H||V.boundingClientRect.width!==0||V.boundingClientRect.height!==0?((te=e==null?void 0:e.onVisible)==null||te.call(e),Y(()=>{ue(!1)})):(ae=e==null?void 0:e.onHidden)==null||ae.call(e))}function Ae(){const H=ye(f),V=H?kn(H):void 0;return window.document&&(V===window.document.documentElement||V===window.document.body)?window:V||window}function fe(){const H=ye(D);return H?ye(n).direction==="vertical"?H.scrollHeight:H.scrollWidth:0}function ve(){const H=ye(f);if(!H)return{start:0,end:0};const V=ye(n),te=V.direction==="vertical";let ae;if(V.pageMode){const se=H.getBoundingClientRect(),le=te?se.height:se.width;let ce=-(te?se.top:se.left),Te=te?window.innerHeight:window.innerWidth;ce<0&&(Te+=ce,ce=0),ce+Te>le&&(Te=le-ce),ae={start:ce,end:ce+Te}}else te?ae={start:H.scrollTop,end:H.scrollTop+H.clientHeight}:ae={start:Gt(H.scrollLeft,V.direction,H),end:Gt(H.scrollLeft,V.direction,H)+H.clientWidth};return ae}function xe(){const H=ye(f);if(!H)return{start:0,end:0};if(ye(n).direction==="vertical"){const V=Gt(H.scrollLeft,"horizontal",H);return{start:V,end:V+H.clientWidth}}return{start:H.scrollTop,end:H.scrollTop+H.clientHeight}}function Fe(H){const V=ye(n);if(V.itemSize!=null)return V.itemSize;const te=A.value[H];return(te==null?void 0:te.size)||Number(V.minItemSize)||0}function qe(H){var V;const te=ye(n),ae=te.gridItems||1;return H<=0?0:te.itemSize!=null?Math.floor(H/ae)*te.itemSize:((V=A.value[H-1])==null?void 0:V.accumulator)||0}function Je(H){const V=ye(n),te=V.items.length,ae=V.gridItems||1;if(!te)return 0;if(V.itemSize!=null){const Te=Math.floor(H/V.itemSize)*ae;return Math.min(Math.max(Te,0),te-1)}let se=0,le=te-1,ce=0;for(;se<=le;){const Te=Math.floor((se+le)/2);qe(Te)<=H?(ce=Te,se=Te+1):le=Te-1}return ce}function _e(){N&&(clearTimeout(N),N=null),M=null}function Oe(){N&&clearTimeout(N),N=setTimeout(()=>{M=null,N=null},150)}function De(H,V){if(!H.length){_e();return}const te=Math.max(ve().start-fe(),0),ae=Math.min(Je(te),H.length-1),se=H[ae],le=V?se==null?void 0:se[V]:ae;if(le==null){_e();return}const ce=fe()+qe(ae);M={key:le,offset:ve().start-ce}}function Se(H){if(!M)return!1;const V=ye(n),te=H??V.items,ae=S.value?null:V.keyField,se=bn(te,ae).indexOf(M.key);if(se===-1)return _e(),!1;const le=fe()+qe(se)+M.offset,ce=ve().start;return Math.abs(le-ce)<.5?!1:(p=!0,rt(le),Y(()=>{p=!1}),!0)}function Ve(){ye(n).pageMode?ot():Le()}function ot(){x=Ae(),x.addEventListener("scroll",re,Zo()?{passive:!0}:!1),x.addEventListener("resize",j)}function Le(){x&&(x.removeEventListener("scroll",re),x.removeEventListener("resize",j),x=null)}function ct(H,V,te,ae,se,le){const ce=Math.ceil(H/V)*te,Te=Math.max(0,Math.floor(se.start/te)),tt=Math.min(Math.ceil(se.end/te),Math.ceil(H/V)),je=Math.max(0,Math.floor(le.start/ae)),nt=Math.min(Math.ceil(le.end/ae),V),Ne=[];for(let lt=Te;lt<tt;lt++){const pt=lt*V;for(let Ye=je;Ye<nt;Ye++){const at=pt+Ye;if(at>=H)break;Ne.push(at)}}const be=Ne[0]??0,Ue=Ne.at(-1)??-1;return{renderedIndices:Ne,startIndex:be,endIndex:Ue+1,visibleStartIndex:be,visibleEndIndex:Ue,totalSize:ce}}function Pe(){const H=ye(n);if(!H.gridItems||H.itemSize==null)return!1;const V=ye(f);if(!V)return!1;const te=H.itemSecondarySize||H.itemSize,ae=H.direction==="vertical"?V.clientWidth:V.clientHeight;return te*H.gridItems>ae}function ue(H,V=!1){var te,ae;const se=ye(n),le=se.itemSize,ce=se.gridItems||1,Te=se.itemSecondarySize||le,tt=P,je=se.typeField,nt=S.value?null:se.keyField,Ne=se.items,be=Ne.length,Ue=A.value,lt=i,pt=t.value;let Ye=null,at=null,We,ze,Lt,kt,yt;if(!be)We=ze=kt=yt=Lt=0;else if(R)We=kt=0,ze=yt=Math.min(se.prerender,Ne.length),Lt=0;else{const ke=ve(),st=xe();if(V){let Xe=ke.start-d;Xe<0&&(Xe=-Xe);let He=st.start-v;He<0&&(He=-He);const $t=le===null&&Xe>=tt||le!==null&&Xe>=le,ht=ce>1&&le!=null&&He>=Te;if(!$t&&!ht)return{continuous:!0}}d=ke.start,v=st.start;const At=se.buffer;ke.start-=At,ke.end+=At,st.start-=At,st.end+=At;let Et=0;const Vt=ye(D);Vt&&(Et=Vt.scrollHeight,ke.start-=Et);const dn=ye(r);if(dn){const Xe=dn.scrollHeight;ke.end+=Xe}if(le===null){let Xe,He=0,$t=be-1,ht=~~(be/2),Xt;do Xt=ht,Xe=Ue[ht].accumulator,Xe<ke.start?He=ht:ht<be-1&&Ue[ht+1].accumulator>ke.start&&($t=ht),ht=~~((He+$t)/2);while(ht!==Xt);for(ht<0&&(ht=0),We=ht,Lt=Ue[be-1].accumulator,ze=ht;ze<be&&Ue[ze].accumulator<ke.end;ze++);for(ze===-1?ze=Ne.length-1:(ze++,ze>be&&(ze=be)),kt=We;kt<be&&Et+Ue[kt].accumulator<ke.start;kt++);for(yt=kt;yt<be&&Et+Ue[yt].accumulator<ke.end;yt++);}else if(ce>1){const Xe=ct(be,ce,le,Te,ke,st);Ye=Xe.renderedIndices,at=new Set(Ye),We=Xe.startIndex,ze=Xe.endIndex,kt=Xe.visibleStartIndex,yt=Xe.visibleEndIndex,Lt=Xe.totalSize}else{We=~~(ke.start/le*ce);const Xe=We%ce;We-=Xe,ze=Math.ceil(ke.end/le*ce),kt=Math.max(0,Math.floor((ke.start-Et)/le*ce)),yt=Math.floor((ke.end-Et)/le*ce),We<0&&(We=0),ze>be&&(ze=be),kt<0&&(kt=0),yt>be&&(yt=be),Lt=Math.ceil(be/ce)*le}}ze-We>Wo.itemsLimit&&ft(),l.value=Lt;let Ee;const fn=We<=L&&ze>=w;if(!fn||H)Q();else for(let ke=0,st=pt.length;ke<st;ke++){const At=pt[ke];if(At&&(Ee=At,Ee.nr.used)){const Et=at?at.has(Ee.nr.index):Ee.nr.index>=We&&Ee.nr.index<ze,Vt=le||Ue[Ee.nr.index]&&Ue[Ee.nr.index].size;(!Et||!Vt)&&z(Ee)}}let Mt,qt;const Yt=Ye??Array.from({length:Math.max(0,ze-We)},(ke,st)=>We+st);for(const ke of Yt){if(!(le||Ue[ke]&&Ue[ke].size))continue;Mt=Ne[ke];const st=nt?Mt[nt]:ke;if(st==null)throw new Error(`Key is ${st} on item (keyField is '${nt}')`);if(Ee=lt.get(st),Ee)Ee.item!==Mt&&(Ee.item=Mt),Ee.nr.used||console.warn(`Expected existing view's used flag to be true, got ${Ee.nr.used}`);else{if(qt=Mt[je],Ee=C(qt),Ee){const At=Ee.nr.index!==ke||Ee.nr.key!==st;Ee.item=Mt,Ee.nr.index=ke,Ee.nr.key=st,Ee.nr.type!==qt&&console.warn("Reused view's type does not match pool's type"),At&&Hn(Ee)}else Ee=O(pt,ke,Mt,st,qt);lt.set(st,Ee)}le===null?(Ee.position=((te=Ue[ke-1])==null?void 0:te.accumulator)||0,Ee.offset=0):(Ee.position=Math.floor(ke/ce)*le,Ee.offset=ke%ce*Te)}return w=We,L=ze,se.emitUpdate&&((ae=e==null?void 0:e.onUpdate)==null||ae.call(e,We,ze,kt,yt)),K&&clearTimeout(K),K=setTimeout(Ft,se.updateInterval+300),{continuous:fn}}function ft(){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:",ye(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(Pe())return!1;const H=t.value.filter(({nr:V})=>V.used);for(let V=1;V<H.length;V++)if(H[V].nr.index!==H[V-1].nr.index+1)return!0;return!1}function Ft(){t.value.sort((H,V)=>H.nr.index-V.nr.index),Ct()&&(ue(!1),K&&clearTimeout(K))}function et(H,V){const te=ye(n),ae=ye(f);if(!ae)return;const se=Math.max(0,Math.min(H,te.items.length-1)),le=ve().start,ce=Ko(ae,te.direction,te.pageMode),Te=qe(se),tt=Fe(se),je=pi(Te,tt,le,ce,V==null?void 0:V.align,(V==null?void 0:V.offset)??0);if(je!=null&&(rt(je,V),te.gridItems&&te.itemSize!=null)){const nt=ye(f);if(!nt)return;const Ne=te.gridItems,be=te.itemSecondarySize||te.itemSize,Ue=se%Ne*be,lt=te.direction==="vertical"?"horizontal":"vertical",pt=lt==="horizontal"?Gt(nt.scrollLeft,"horizontal",nt):nt.scrollTop,Ye=lt==="horizontal"?nt.clientWidth:nt.clientHeight,at=pi(Ue,be,pt,Ye,V==null?void 0:V.align,(V==null?void 0:V.offset)??0);at!=null&&zn(nt,lt,at,V)}}function rt(H,V){const te=ye(n),ae=ye(f);if(ae)if(te.pageMode){const se=kn(ae),le=se.getBoundingClientRect(),ce=ae.getBoundingClientRect(),Te=te.direction==="vertical"?"top":"left",tt=kn(ae)===document.documentElement||kn(ae)===document.body?te.direction==="vertical"?window.scrollY:window.scrollX:Gt(te.direction==="vertical"?se.scrollTop:se.scrollLeft,te.direction,se),je=ce[Te]-le[Te];zn(se.tagName==="HTML"?window:se,te.direction,H+tt+je,V)}else zn(ae,te.direction,H,V)}const we=ye(n);return q=bn(we.items,we.items.length>0&&typeof we.items[0]!="object"?null:we.keyField),we.cache&&m(we.cache),we.prerender&&(R=!0,ue(!1)),we.gridItems&&!we.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems"),cn(()=>{Ve(),wt(()=>{R=!1,ue(!0),u.value=!0})}),go(()=>{const H=d;typeof H=="number"&&wt(()=>{rt(H)})}),Gn(()=>{X(),ne(),Le()}),_t(()=>ye(n).cache,H=>{m(H),ue(!0)}),_t(()=>ye(n).items,(H,V)=>{const te=ye(n),ae=S.value?null:te.keyField,se=bn(H,ae);if(te.shift){const le=V?bn(V,ae):q;Vo(le,se)>0?De(V??[],ae):_e()}else _e();q=se,Se(H),ue(!0)}),_t(()=>ye(n).pageMode,()=>{Ve(),ue(!1)}),_t(A,()=>{Se()&&Oe(),ue(!1)},{deep:!0}),_t(()=>ye(n).gridItems,()=>{ue(!0)}),_t(()=>ye(n).itemSecondarySize,()=>{ue(!0)}),{pool:t,visiblePool:I,totalSize:l,ready:u,sizes:A,simpleArray:S,scrollToItem:et,scrollToPosition:rt,getScroll:ve,findItemIndex:Je,getItemOffset:qe,getItemSize:Fe,cacheSnapshot:$,restoreCache:m,updateVisibleItems:ue,handleScroll:re,handleResize:j,handleVisibilityChange:Re,sortViews:Ft}}const Yn=new WeakMap;function ia(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 yi(n,f){$i(n);const D=ia(f.value);if(Yn.set(n,D),typeof IntersectionObserver>"u"){const r=n.getBoundingClientRect();D.visible=!0,D.callback(!0,{boundingClientRect:r});return}D.observer=new IntersectionObserver(r=>{const e=r[0],t=!!(e!=null&&e.isIntersecting);D.visible!==null&&D.visible===t||(D.visible=t,D.callback(t,e))},D.intersection),D.observer.observe(n)}function $i(n){const f=Yn.get(n);f!=null&&f.observer&&(f.observer.disconnect(),f.observer=null)}const oa={mounted(n,f){yi(n,f)},updated(n,f){f.value!==f.oldValue&&yi(n,f)},unmounted(n){$i(n),Yn.delete(n)}},aa=Bt({__name:"ItemView",props:{view:{},itemTag:{}},setup(n){const f=n;return(D,r)=>(W(),Me(bi(f.itemTag),{class:"vue-recycle-scroller__item-view"},{default:It(()=>[Pt(D.$slots,"default",{item:f.view.item,index:f.view.nr.index,active:f.view.nr.used})]),_:3}))}}),sa=Bt({__name:"ResizeObserver",emits:["notify"],setup(n,{emit:f}){const D=f,r=ge();let e=null,t=null;function l(){D("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)}}),Gn(()=>{e&&(e.disconnect(),e=null),t&&(window.removeEventListener("resize",t),t=null)}),(u,w)=>(W(),ee("div",{ref_key:"el",ref:r,class:"vue-recycle-scroller__resize-observer","aria-hidden":"true"},null,512))}}),ra=(n,f)=>{const D=n.__vccOpts||n;for(const[r,e]of f)D[r]=e;return D},la=ra(sa,[["__scopeId","data-v-08cc04ab"]]),ua=Bt({__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:D}){const r=n,e=D,t=oa,l=ge(),u=ge(),w=ge(),L=ge(null),i=na(r,l,u,w,{onResize:()=>e("resize"),onVisible:()=>e("visible"),onHidden:()=>e("hidden"),onUpdate:(I,$,m,h)=>{e("update",I,$,m,h),m<=0&&e("scrollStart"),h>=r.items.length-1&&e("scrollEnd")}}),{pool:a,visiblePool:o,totalSize:d,ready:v,scrollToItem:R,scrollToPosition:k,getScroll:T,findItemIndex:K,getItemOffset:P,getItemSize:x,cacheSnapshot:q,restoreCache:M,updateVisibleItems:N,handleScroll:y,handleResize:p,handleVisibilityChange:F}=i;function _(I){L.value=I}function S(){L.value=null}const A=Ut(()=>{const I={[r.direction==="vertical"?"minHeight":"minWidth"]:`${d.value}px`};if(r.gridItems&&r.itemSize!=null){const $=(r.itemSecondarySize||r.itemSize)*r.gridItems;I[r.direction==="vertical"?"minWidth":"minHeight"]=`${$}px`}return I});return f({el:l,visiblePool:o,scrollToItem:R,scrollToPosition:k,getScroll:T,findItemIndex:K,getItemOffset:P,getItemSize:x,cacheSnapshot:q,restoreCache:M,updateVisibleItems:N}),(I,$)=>Ce((W(),ee("div",{ref_key:"el",ref:l,class:gt(["vue-recycle-scroller",{"grid-mode":r.gridItems,ready:B(v),"page-mode":r.pageMode,[`direction-${r.direction}`]:!0}]),onScrollPassive:$[0]||($[0]=(...m)=>B(y)&&B(y)(...m))},[I.$slots.before?(W(),ee("div",{key:0,ref_key:"before",ref:u,class:"vue-recycle-scroller__slot"},[Pt(I.$slots,"before")],512)):me("",!0),(W(),Me(bi(r.listTag),{style:In(A.value),class:gt(["vue-recycle-scroller__item-wrapper",r.listClass])},{default:It(()=>[(W(!0),ee(Ie,null,vt(B(a),m=>(W(),Me(aa,ci({key:m.nr.id,view:m,"item-tag":r.itemTag,style:B(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&&L.value===m.nr.key}]]},mo(r.skipHover?{}:{mouseenter:()=>{_(m.nr.key)},mouseleave:()=>{S()}})),{default:It(h=>[Pt(I.$slots,"default",ci({ref_for:!0},h))]),_:2},1040,["view","item-tag","style","class"]))),128)),r.items.length===0?Pt(I.$slots,"empty",{key:0}):me("",!0)]),_:3},8,["style","class"])),I.$slots.after?(W(),ee("div",{key:1,ref_key:"after",ref:w,class:"vue-recycle-scroller__slot"},[Pt(I.$slots,"after")],512)):me("",!0),ie(la,{onNotify:B(p)},null,8,["onNotify"])],34)),[[B(t),B(F)]])}}),ca={key:0,class:"chat-info-pan"},fa={class:"ss-card chat-info"},da={key:0},ha={key:1},ma={class:"chat-info-base user"},ga=["src"],va={key:0},pa={class:"info-copy"},ya={class:"info-copy"},wa={class:"info-copy"},ba={style:{"word-break":"break-all"}},ka={key:1},Ia=["innerHTML"],_a={class:"tags"},Sa={key:2},Ca={class:"info-copy"},Ma={class:"info-copy"},Aa={class:"info-copy"},Ta={style:{"word-break":"break-all"}},Ea={class:"info-copy"},xa=["name"],Fa={class:"search-view"},La={for:"info-member-search",class:"sr-only"},$a=["placeholder"],Ra={class:"member-item edit"},Da=["src"],Ba=["onClick"],Oa=["onClick"],Ua=["src"],za={class:"opt-item"},Na={for:"info-member-card"},Ha={key:0,class:"opt-item"},Pa={for:"info-member-title"},ja={class:"opt-item"},qa={for:"info-member-ban-min"},Va=Bt({name:"ViewInfo",__name:"Info",props:{tags:{},chat:{}},emits:["close"],setup(n,{emit:f}){const D=En(),r=ki(),e=xn(),t=Ii(),l=n,u=f,{t:w}=Fn.global;function L(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||String(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||String(l.chat.show.id))}const o=ge([]),d=ge(""),v=ge({}),R=ge({});function k(O){return typeof O!="object"||O===null?{}:O}function T(O){return String(k(O).user_id??"")}function K(O){const C=k(O);return String(C.card||C.nickname||C.name||T(O))}function P(O){return String(k(O).avatar??"")}function x(O){return String(k(O).role??"")}const q=ge({banMin:0});function M(O,C,z){const Q={title:w("提醒"),html:`<span>${w("真的要将 {user} 移出群聊吗",{user:O})}</span>`,button:[{text:w("确定"),fun:()=>{it.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),fi(1e3).then(()=>(di(String(e.chatInfo.show.id)),fi(1e3))).then(()=>{di(String(e.chatInfo.show.id)),t.popBoxList.shift()})}},{text:w("取消"),master:!0,fun:()=>{t.popBoxList.shift()}}]};t.popBoxList.push(Q)}function N(O){const C=new ut;Jt.config.globalProperties.$copyText(String(O)).then(()=>{C.add(Be.INFO,w("复制成功"),!0)},()=>{C.add(Be.ERR,w("复制失败"),!0)})}function y(O,C){const z=O.target.value;if(z!==""){const Q=parseInt(z);if(Q>0){const Y={title:w("操作"),html:`<span>${w("确认禁言?")}</span>`,button:[{text:w("确认"),fun:()=>{var X;const ne=(X=D.jsonMap.ban_mumber)==null?void 0:X.name;ne&&it.send(ne,{group_id:e.chatInfo.show.id,user_id:C.user_id,duration:Q*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 Q={title:w("操作"),html:`<span>${w("确认修改昵称?")}</span>`,button:[{text:w("确认"),fun:()=>{var ne;const Y=(ne=D.jsonMap.set_group_nickname)==null?void 0:ne.name;Y&&it.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(Q)}}function F(O,C){const z=O.target.value;if(v.value.card!==z){const Q={title:w("操作"),html:`<span>${w("确认修改头衔?")}</span>`,button:[{text:w("确认"),fun:()=>{var ne;const Y=(ne=D.jsonMap.set_group_title)==null?void 0:ne.name;Y&&it.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(Q)}}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!=D.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),wt(()=>{if(C){const z=document.getElementById("user-"+C.user_id);z&&z.click()}})}}function $(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(),Q=Array.isArray(l.chat.info.group_members)?l.chat.info.group_members:[];o.value=Si(Q).filter(Y=>{const ne=K(Y).toLowerCase(),X=T(Y);return ne.includes(z)||X.includes(C)||X.toLowerCase().includes(z)})}_t(()=>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?(W(),ee("div",ca,[g("div",fa,[g("header",null,[n.chat.show.type==="group"?(W(),ee("span",da,G(B(w)("群资料")),1)):me("",!0),n.chat.show.type==="user"?(W(),ee("span",ha,G(B(w)("好友")),1)):me("",!0),ie(z,{icon:["fas","xmark"],onClick:A})]),g("div",ma,[g("div",null,[g("img",{"data-avatar":"",src:n.chat.show.avatar||"/img/icons/icon.svg",onError:C[0]||(C[0]=(...Q)=>B(Sn)&&B(Sn)(...Q))},null,40,ga),g("div",null,[g("a",null,G(n.chat.show.name),1),g("span",null,G(n.chat.show.id),1)]),g("div",{style:{display:"flex","align-items":"center","justify-content":"center",cursor:"pointer"},onClick:C[1]||(C[1]=Q=>N(n.chat.show.id))},[ie(z,{icon:["fas","copy"]})])]),n.chat.show.type==="group"?(W(),ee("div",va,[g("header",null,[g("span",null,G(B(w)("群组 ID")),1)]),g("div",pa,[g("span",null,G(n.chat.show.id),1),ie(z,{icon:["fas","copy"],onClick:C[2]||(C[2]=Q=>N(n.chat.show.id))})]),g("header",null,[g("span",null,G(B(w)("频道 ID")),1)]),g("div",ya,[g("span",null,G(a()),1),ie(z,{icon:["fas","copy"],onClick:C[3]||(C[3]=Q=>N(a()))})]),g("header",null,[g("span",null,G(B(w)("群头像")),1)]),g("div",wa,[g("span",ba,G(L(n.chat.show.avatar)?B(w)("无"):n.chat.show.avatar),1),L(n.chat.show.avatar)?me("",!0):(W(),Me(z,{key:0,icon:["fas","copy"],onClick:C[4]||(C[4]=Q=>N(n.chat.show.avatar))}))])])):me("",!0),n.chat.show.type==="group"?Ce((W(),ee("div",ka,[g("header",null,[g("span",null,G(B(w)("介绍")),1)]),g("span",{innerHTML:n.chat.info.group_info.gIntro===void 0||n.chat.info.group_info.gIntro===""?B(w)("群主很懒,还没有群介绍哦~"):n.chat.info.group_info.gIntro},null,8,Ia),g("div",_a,[(W(!0),ee(Ie,null,vt(n.chat.info.group_info.tags,Q=>(W(),ee("div",{key:Q.md},G(Q.tag),1))),128))])],512)),[[Ke,Object.keys(n.chat.info.group_info).length>0]]):n.chat.show.type==="user"?(W(),ee("div",Sa,[g("header",null,[g("span",null,G(B(w)("用户 ID")),1)]),g("div",Ca,[g("span",null,G(n.chat.show.id),1),ie(z,{icon:["fas","copy"],onClick:C[5]||(C[5]=Q=>N(n.chat.show.id))})]),g("header",null,[g("span",null,G(B(w)("用户名称")),1)]),g("div",Ma,[g("span",null,G(n.chat.show.name),1),ie(z,{icon:["fas","copy"],onClick:C[6]||(C[6]=Q=>N(n.chat.show.name))})]),g("header",null,[g("span",null,G(B(w)("用户头像链接")),1)]),g("div",Aa,[g("span",Ta,G(L(n.chat.show.avatar)?B(w)("无"):n.chat.show.avatar),1),L(n.chat.show.avatar)?me("",!0):(W(),Me(z,{key:0,icon:["fas","copy"],onClick:C[7]||(C[7]=Q=>N(n.chat.show.avatar))}))]),g("header",null,[g("span",null,G(B(w)("频道 ID")),1)]),g("div",Ea,[g("span",null,G(i()),1),ie(z,{icon:["fas","copy"],onClick:C[8]||(C[8]=Q=>N(i()))})])])):me("",!0)]),n.chat.show.type==="group"?(W(),Me(B(_i),{key:0,class:"chat-info-tab"},{default:It(()=>[g("div",{name:B(w)("成员")},[g("div",Fa,[g("label",La,G(B(w)("搜索成员")),1),g("input",{id:"info-member-search",placeholder:B(w)("搜索 ……"),onInput:C[9]||(C[9]=Q=>m(Q))},null,40,$a)]),ie(B(ua),{class:"member-scroller",items:d.value.trim()?o.value:n.chat.info.group_members,"item-size":60,"key-field":"user_id"},{default:It(({item:Q})=>[g("div",Ra,[g("img",{alt:"nk",loading:"lazy","data-avatar":"",src:P(Q)||"/img/icons/icon.svg"},null,8,Da),g("div",null,[g("a",{onClick:Y=>I(Q)},G(K(Q)),9,Ba),x(Q)==="owner"?(W(),Me(z,{key:0,icon:["fas","crown"]})):me("",!0),x(Q)==="admin"?(W(),Me(z,{key:1,icon:["fas","star"]})):me("",!0)]),g("span",{onClick:Y=>$(Q)},G(T(Q)),9,Oa),h(x(Q))?(W(),Me(z,{key:0,icon:["fas","wrench"],onClick:Y=>$(Q)},null,8,["onClick"])):(W(),Me(z,{key:1,icon:["fas","copy"],onClick:Y=>N(T(Q))},null,8,["onClick"]))])]),_:1},8,["items"])],8,xa)]),_:1})):me("",!0),g("div",{class:gt("ss-card user-config"+(Object.keys(v.value).length>0?" show":""))},[g("div",null,[g("img",{alt:"nk","data-avatar":"",src:v.value.avatar||"/img/icons/icon.svg"},null,8,Ua),g("div",null,[g("a",null,G(v.value.card!=""?v.value.card:v.value.nickname),1),g("span",null,G(v.value.user_id),1)]),ie(z,{style:{"margin-right":"20px"},icon:["fas","copy"],onClick:C[10]||(C[10]=Q=>N(v.value.user_id))}),ie(z,{icon:["fas","angle-down"],onClick:C[11]||(C[11]=Q=>v.value={})})]),g("div",null,[g("header",null,G(B(w)("成员信息")),1),g("div",za,[ie(z,{icon:["fas","clipboard-list"]}),g("div",null,[g("label",Na,G(B(w)("成员昵称")),1),g("span",null,G(B(w)("啊吧啊吧……")),1)]),Ce(g("input",{id:"info-member-card","onUpdate:modelValue":C[12]||(C[12]=Q=>R.value.card=Q),style:{width:"50%"},class:"ss-input",type:"text",onChange:C[13]||(C[13]=Q=>p(Q,v.value))},null,544),[[un,R.value.card]])]),n.chat.info.me_info.role==="owner"?(W(),ee("div",Ha,[ie(z,{icon:["fas","clipboard-list"]}),g("div",null,[g("label",Pa,G(B(w)("成员头衔")),1),g("span",null,G(B(w)("猪咪猪咪")),1)]),Ce(g("input",{id:"info-member-title","onUpdate:modelValue":C[14]||(C[14]=Q=>R.value.title=Q),style:{width:"50%"},class:"ss-input",type:"text",onChange:C[15]||(C[15]=Q=>F(Q,v.value))},null,544),[[un,R.value.title]])])):me("",!0),n.chat.info.me_info.role==="owner"&&v.value.role!="owner"||n.chat.info.me_info.role==="admin"&&v.value.role==="member"?(W(),ee(Ie,{key:1},[g("header",null,G(B(w)("操作")),1),g("div",ja,[ie(z,{icon:["fas","clipboard-list"]}),g("div",null,[g("label",qa,G(B(w)("禁言成员")),1),g("span",null,G(B(w)("要让小猫咪不许说话几分钟呢?")),1)]),Ce(g("input",{id:"info-member-ban-min","onUpdate:modelValue":C[16]||(C[16]=Q=>q.value.banMin=Q),style:{width:"50%"},class:"ss-input",type:"text",onInput:S,onChange:C[17]||(C[17]=Q=>y(Q,v.value))},null,544),[[un,q.value.banMin]])]),g("button",{class:"ss-button",onClick:C[18]||(C[18]=Q=>M(v.value.nickname,n.chat.show.id,v.value.user_id))},G(B(w)("移出群聊")),1)],64)):me("",!0)])],2)])])):me("",!0)}}}),Wa=$n(Va,[["__scopeId","data-v-317c0ff8"]]),Qa=["id"],Ga={key:0,class:"note-recall note-base"},Ka={key:1,class:"note-ban note-base"},Ja={key:1},Ya={key:2,class:"note-recall note-base"},Xa=["innerHTML"],Za={key:4,class:"note-time note-base"},Ht=Bt({name:"NoticeBody",__name:"NoticeBody",props:["data","id"],emits:["reedit"],setup(n){const f=Fn.global.t,D=En(),r=xn(),e=n,t=Ci(),l=ge(e.data);function u(i){return D.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 L(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 bt.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");bt.isDesktop()&&(o=(a=document.getElementById("notice-"+e.id))==null?void 0:a.getElementsByClassName("space")[0]),po(o,i)}}),(i,a)=>(W(),ee("div",{id:"notice-"+n.id,class:"note"},[n.data.notice_type&&n.data.notice_type.indexOf("recall")>=0?(W(),ee("div",Ga,[g("a",null,G(l.value.name),1),g("span",null,G(B(f)("撤回了一条消息")),1),a[1]||(a[1]=g("div",null,null,-1)),n.data.originMsg?(W(),ee("a",{key:0,onClick:a[0]||(a[0]=o=>i.$emit("reedit",n.data.originMsg))},G(B(f)("重新编辑")),1)):me("",!0)])):n.data.notice_type=="group_ban"?(W(),ee("div",Ka,[n.data.sub_type==="ban"?(W(),ee(Ie,{key:0},[u(n.data.user_id)?(W(),ee(Ie,{key:0},[g("span",null,G(B(f)("成员类型_admin")),1),g("a",null," "+G(w(n.data.operator_id))+" ",1),g("span",null,G(B(f)("禁言了你")),1),g("span",null," "+G(L(n.data.duration)),1)],64)):(W(),ee(Ie,{key:1},[g("span",null,G(B(f)("管理员禁言了")),1),g("a",null," "+G(w(n.data.user_id))+" ",1),g("span",null,G(L(n.data.duration)),1)],64))],64)):(W(),ee("span",Ja,G(B(f)("管理员解除了 {name} 的禁言",{name:u(n.data.user_id)?B(f)("你"):w(n.data.user_id)})),1))])):n.data.sub_type==="delete"?(W(),ee("div",Ya,[g("span",null,G(B(f)("这条消息迷失在虚空里了")),1),a[2]||(a[2]=g("div",null,null,-1))])):n.data.sub_type==="poke"?(W(),ee("div",{key:3,class:"note-notify note-base",innerHTML:n.data.str+"<div class='space'</div>"},null,8,Xa)):n.data.sub_type==="time"&&n.data.time!=null?(W(),ee("div",Za,[g("a",null,G(Intl.DateTimeFormat(B(t),B(Mi)(new Date(n.data.time*1e3))).format(new Date(n.data.time*1e3))),1)])):me("",!0)],8,Qa))}}),es=["src","alt"],ts=Bt({__name:"CustomFaceTooltip",props:{url:{}},setup(n){return(f,D)=>(W(),ee("img",{src:n.url,alt:f.$t("预览图片加载失败"),class:"custom-face-tooltip"},null,8,es))}}),ns=$n(ts,[["__scopeId","data-v-28512f0d"]]),is={class:"ss-card face-pan"},os={icon:"fa-solid fa-face-laugh-squint"},as={class:"system-face-bar"},ss={class:"title"},rs={class:"face"},ls={class:"title"},us={class:"face"},cs={icon:"fa-solid fa-heart"},fs={class:"title"},ds={class:"face"},hs=["src","alt","onClick"],ms={class:"title"},gs={class:"face"},vs={key:0,class:"ss-card"},ps=["src","alt","onClick"],ys={key:0,icon:"fa-solid fa-folder-open"},ws={class:"system-face-bar custom-face-bar"},bs={class:"title"},ks={class:"face"},Is=["src","alt","onClick"],_s={class:"title"},Ss={class:"face"},Cs={key:0,class:"ss-card"},Ms={key:1,class:"ss-card"},As=["src","alt","onClick"],Ts=Bt({__name:"FacePan",emits:["addSpecialMsg","sendMsg"],setup(n,{emit:f}){const{recordList:D,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=Ut(()=>{const _=[];for(const S of u.value){const A=v.value.find(I=>I.path===S);A&&_.push(A)}return _}),L=new ut,i=yo(),a=Kn(),o=En(),d=hi(1),v=hi([]),R=f;i.stickerCache&&i.stickerCache.length==0&&o.jsonMap.roaming_stamp&&K(),bt.isDesktop()&&a.sysConfig.local_emoji_folder&&M();function k(_,S){R("addSpecialMsg",{addText:S,msgObj:_})}function T(_){p(D,_),_<5e3?k({type:"face",id:_},!0):k({type:"text",text:rn.get(_).value},!0)}function K(){i.stickerCache=void 0,o.jsonMap.roaming_stamp.pagerType=="full"?it.send(o.jsonMap.roaming_stamp.name,{count:48},"getRoamingStamp_48"):it.send(o.jsonMap.roaming_stamp.name,{},"getRoamingStamp")}function P(_){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;it.send(o.jsonMap.roaming_stamp.name,{count:A},"getRoamingStamp_"+A),d.value++}}function x(_){p(e,_),k({type:"image",file:_,subType:1},!0),a.sysConfig.send_face==!0&&R("sendMsg")}async function q(){const{$t:_}=Jt.config.globalProperties;try{const S=await bt.call(void 0,"sys:selectFolder",!0);S&&(Ti.save("local_emoji_folder",S),L.add(Be.INFO,_("已设置本地表情文件夹")),M())}catch{L.add(Be.ERR,_("选择文件夹失败"))}}async function M(){try{const _=a.sysConfig.local_emoji_folder;if(!_){v.value=[];return}const S=await bt.call(void 0,"sys:getLocalEmojis",!0,_);if(S&&Array.isArray(S))if(bt.type==="tauri"){const{convertFileSrc:A}=await Ai(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 bt.call(void 0,"sys:readFileAsBase64",!0,_.path);p(l,_.path),k({type:"image",file:"base64://"+S,subType:1},!0),a.sysConfig.send_face==!0&&R("sendMsg")}catch{const{$t:A}=Jt.config.globalProperties;L.add(Be.ERR,A("添加本地表情失败"))}}function y(_){const S=wo(_,[]),A=Ut(()=>{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 $ of S.value)I.set($,(I.get($)||0)+1);return Array.from(I.entries()).sort(($,m)=>m[1]-$[1]).map($=>$[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 $=I.indexOf(S);$!==-1&&I.splice($,1)}I.unshift(S),I.length>A&&I.pop(),_.value=I}function F(_){return{comp:ns,model:void 0,props:{url:_}}}return(_,S)=>{const A=Ln("font-awesome-icon");return W(),ee("div",is,[ie(B(_i),null,{default:It(()=>[g("div",os,[g("div",as,[B(r).length>0?(W(),ee(Ie,{key:0},[g("div",ss,[g("span",null,G(_.$t("最近使用")),1)]),g("div",rs,[(W(!0),ee(Ie,null,vt(B(r),I=>(W(),ee("div",{key:I},[ie(Wn,{emoji:B(rn).get(I),onClick:$=>T(I)},null,8,["emoji","onClick"])]))),128))])],64)):me("",!0),g("div",ls,[g("span",null,G(_.$t("emoji 表情")),1)]),g("div",us,[(W(!0),ee(Ie,null,vt(B(rn).emojiList,I=>(W(),ee("div",{key:I},[ie(Wn,{emoji:B(rn).get(I),onClick:$=>T(I)},null,8,["emoji","onClick"])]))),128))])])]),g("div",cs,[g("div",{class:"system-face-bar custom-face-bar",onScroll:P},[B(t).length>0?(W(),ee(Ie,{key:0},[g("div",fs,[g("span",null,G(_.$t("最近使用")),1)]),g("div",ds,[(W(!0),ee(Ie,null,vt(B(t),(I,$)=>Ce((W(),ee("span",{key:$},[g("img",{loading:"lazy",src:I,alt:"["+_.$t("动画表情")+"]",onClick:m=>x(I)},null,8,hs)])),[[B(gn),F(I)]])),128))])],64)):me("",!0),g("div",ms,[g("span",null,G(_.$t("收藏的表情")),1),ie(A,{icon:["fas","fa-rotate-right"],onClick:K})]),g("div",gs,[B(i).stickerCache&&B(i).stickerCache.length<=0?(W(),ee("div",vs,[ie(A,{icon:["fas","face-dizzy"]}),g("span",null,G(_.$t("一无所有")),1)])):B(i).stickerCache&&B(i).stickerCache.length>0?(W(!0),ee(Ie,{key:1},vt(B(i).stickerCache,(I,$)=>(W(),ee("span",{key:"stickers-"+$},[Ce(g("img",{loading:"lazy",src:I,alt:"["+_.$t("动画表情")+"]",onClick:m=>x(I)},null,8,ps),[[Ke,I!="end"],[B(gn),F(I)]])]))),128)):me("",!0)])],32)]),B(bt).isDesktop()?(W(),ee("div",ys,[g("div",ws,[w.value.length>0?(W(),ee(Ie,{key:0},[g("div",bs,[g("span",null,G(_.$t("最近使用")),1)]),g("div",ks,[(W(!0),ee(Ie,null,vt(w.value,(I,$)=>(W(),ee("span",{key:$},[Ce(g("img",{loading:"lazy",src:I.url,alt:"["+_.$t("动画表情")+"]",onClick:m=>N(I)},null,8,Is),[[B(gn),F(I.url)]])]))),128))])],64)):me("",!0),g("div",_s,[g("span",null,G(_.$t("本地表情")),1),ie(A,{icon:["fas","fa-folder-plus"],title:_.$t("选择文件夹"),onClick:q},null,8,["title"]),B(a).sysConfig.local_emoji_folder?(W(),Me(A,{key:0,icon:["fas","fa-rotate-right"],title:_.$t("重新加载"),onClick:M},null,8,["title"])):me("",!0)]),g("div",Ss,[B(a).sysConfig.local_emoji_folder?B(a).sysConfig.local_emoji_folder&&v.value.length<=0?(W(),ee("div",Ms,[ie(A,{icon:["fas","face-dizzy"]}),g("span",null,G(_.$t("暂无图片")),1)])):B(a).sysConfig.local_emoji_folder&&v.value.length>0?(W(!0),ee(Ie,{key:2},vt(v.value,(I,$)=>(W(),ee("span",{key:$},[Ce(g("img",{loading:"lazy",src:I.url,alt:"["+_.$t("动画表情")+"]",onClick:m=>N(I)},null,8,As),[[B(gn),F(I.url)]])]))),128)):me("",!0):(W(),ee("div",Cs,[ie(A,{icon:["fas","folder-open"]}),g("span",null,G(_.$t("选择文件夹")),1)]))])])])):me("",!0)]),_:1})])}}}),Es={class:"ss-card"},xs={key:0},Fs=Bt({name:"MergePan",__name:"MergePan",setup(n,{expose:f}){const D=Fn.global.t,r=xn(),e=Kn(),t=r.mergeMsgStack,l=ge(),u=Ut(()=>{var a;return Vn.fromList((((a=l.value)==null?void 0:a.imageList)??[]).map(o=>o.img_url))});function w(){t.length--}function L(){t.length=0}function i(){return t.length>0}return f({closeMergeMsg:L,isMergeOpen:i}),cn(()=>{_t(()=>r.mergeMsgStack.length,()=>{t.length===0?r.mergeMessageImgList=void 0:l.value=t.at(-1)}),_t(()=>{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 W(),ee("div",{class:gt("merge-pan"+(B(r).mergeMsgStack.length>0?" show":""))},[g("div",{onClick:L}),g("div",Es,[g("div",null,[ie(d,{style:{"margin-top":"5px"},icon:["fas","message"]}),g("span",null,G(B(D)("合并消息")),1),B(t).length<=1?(W(),Me(d,{key:0,icon:["fas","xmark"],onClick:w})):(W(),Me(d,{key:1,icon:["fas","angles-left"],onClick:w}))]),l.value===void 0?(W(),ee("div",xs)):(W(),Me(qn,{key:1,name:B(e).sysConfig.opt_fast_animation?"":"msglist",tag:"div"},{default:It(()=>[(W(!0),ee(Ie,null,vt(l.value.messageList,(v,R)=>(W(),ee(Ie,{key:"merge-"+l.value.forwardMsg.message[0].id+"-"+R},[B(jn)(l.value.messageList[R-1]?l.value.messageList[R-1].time:void 0,v.time,R==0)?(W(),Me(Ht,{id:B(Ei)(),key:"notice-time-"+R,data:{sub_type:"time",time:v.time}},null,8,["id","data"])):B(xi)(v)?(W(),Me(Ht,{key:"delete-"+v.message_id,data:{sub_type:"delete"}})):me("",!0),ie(ln,{data:v,type:"merge","image-list-header":u.value},null,8,["data","image-list-header"])],64))),128))]),_:1},8,["name"]))])],2)}}}),Ls=$n(Fs,[["__scopeId","data-v-5a030688"]]);function $s(n,f){return f.forEach((function(D){D&&typeof D!="string"&&!Array.isArray(D)&&Object.keys(D).forEach((function(r){if(r!=="default"&&!(r in n)){var e=Object.getOwnPropertyDescriptor(D,r);Object.defineProperty(n,r,e.get?e:{enumerable:!0,get:function(){return D[r]}})}}))})),Object.freeze(n)}function Ri(n,f){return new Promise((function(D,r){let e;return Rs(n).then((function(t){try{return e=t,D(new Blob([f.slice(0,2),e,f.slice(2)],{type:"image/jpeg"}))}catch(l){return r(l)}}),r)}))}const Rs=n=>new Promise(((f,D)=>{const r=new FileReader;r.addEventListener("load",(({target:{result:e}})=>{const t=new DataView(e);let l=0;if(t.getUint16(l)!==65496)return D("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=l+10;let i;switch(t.getUint16(L)){case 18761:i=!0;break;case 19789:i=!1;break;default:return D("TIFF header contains invalid endian")}if(t.getUint16(L+2,i)!==42)return D("TIFF header contains invalid version");const a=t.getUint32(L+4,i),o=L+a+2+12*t.getUint16(L+a,i);for(let d=L+a+2;d<o;d+=12)if(t.getUint16(d,i)==274){if(t.getUint16(d+2,i)!==3)return D("Orientation data type is invalid");if(t.getUint32(d+4,i)!==1)return D("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 Cn={},Ds={get exports(){return Cn},set exports(n){Cn=n}};(function(n){var f,D,r={};Ds.exports=r,r.parse=function(e,t){for(var l=r.bin.readUshort,u=r.bin.readUint,w=0,L={},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 k=u(i,w+=4),T=l(i,w+=4),K=l(i,w+2),P=l(i,w+4);w+=6;var x=u(i,w+=8);w+=4,w+=T+K+P,r._readLocal(i,x,L,d,k,t)}return L},r._readLocal=function(e,t,l,u,w,L){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)l[R]={size:w,csize:u};else{var k=new Uint8Array(e.buffer,t);if(o==0)l[R]=new Uint8Array(k.buffer.slice(t,t+u));else{if(o!=8)throw"unknown compression method: "+o;var T=new Uint8Array(w);r.inflateRaw(k,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,L={};for(var i in e){var a=!r._noNeed(i)&&!t,o=e[i],d=r.crc.crc(o,0,o.length);L[i]={cpr:a,usize:o.length,crc:d,file:a?r.deflateRaw(o):o}}for(var i in L)l+=L[i].file.length+30+46+2*r.bin.sizeUTF8(i);l+=22;var v=new Uint8Array(l),R=0,k=[];for(var i in L){var T=L[i];k.push(R),R=r._writeHeader(v,R,i,T,0)}var K=0,P=R;for(var i in L)T=L[i],k.push(R),R=r._writeHeader(v,R,i,T,1,k[K++]);var x=R-P;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,P),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,L){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,L),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,L=t,i=t+l;L<i;){for(var a=Math.min(L+5552,i);L<a;)w+=u+=e[L++];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="",L=0;L<l;L++)w+="%"+r.bin.pad(e[t+L].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,L=0;L<u;L++){var i=l.charCodeAt(L);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],L=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 k=L.lits,T=L.strt,K=L.prev,P=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){(P>14e3||x>26697)&&R-o>100&&(v<o&&(k[P]=o-v,P+=2,v=o),d=r.F._writeBlock(o==R-1||v==R?1:0,k,P,M,e,q,o-q,t,d),P=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,L.of0);L.lhst[257+A]++;var I=i(S,L.df0);L.dhst[I]++,M+=L.exb[A]+L.dxb[I],k[P]=_<<23|o-v,k[P+1]=S<<16|A<<8|I,P+=2,v=o+_}else L.lhst[e[o]]++;x++}}for(q==o&&e.length!=0||(v<o&&(k[P]=o-v,P+=2,v=o),d=r.F._writeBlock(1,k,P,M,e,q,o-q,t,d),P=0,x=0,P=x=M=0,q=o);(7&d)!=0;)d++;return d>>>3},r.F._bestMatch=function(e,t,l,u,w,L){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&&--L!=0&&a!=i;){if(d==0||e[t+d]==e[t+d-o]){var k=r.F._howLong(e,t,o);if(k>d){if(v=o,(d=k)>=w)break;o+2<k&&(k=o+2);for(var T=0,K=0;K<k-2;K++){var P=t-o+K+32768&32767,x=P-l[P]+32768&32767;x>T&&(T=x,a=P)}}}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,L,i,a,o){var d,v,R,k,T,K,P,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],k=d[2],T=d[3],K=d[4],P=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*P+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,L,i,a,o)}else{var I,$;if(A==1&&(I=M.fltree,$=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,k),r.F.revCodes(M.itree,k),I=M.ltree,$=M.dtree,y(a,o,T-257),y(a,o+=5,K-1),y(a,o+=5,P-4),o+=4;for(var m=0;m<P;m++)y(a,o+3*m,M.itree[1+(M.ordr[m]<<1)]);o+=3*P,o=r.F._codeTiny(x,M.itree,a,o),o=r.F._codeTiny(q,M.itree,a,o)}for(var h=L,O=0;O<l;O+=2){for(var C=t[O],z=C>>>23,Q=h+(8388607&C);h<Q;)o=r.F._writeLit(w[h++],I,a,o);if(z!=0){var Y=t[O+1],ne=Y>>16,X=Y>>8&255,j=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(j,$,a,o),ne-M.df0[j]),o+=M.dxb[j],h+=z}}o=r.F._writeLit(256,I,a,o)}return o},r.F._copyExact=function(e,t,l,u,w){var L=w>>>3;return u[L]=l,u[L+1]=l>>>8,u[L+2]=255-u[L],u[L+3]=255-u[L+1],L+=4,u.set(new Uint8Array(e.buffer,t,l),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),L=[],i=r.F._lenCodes(e.dtree,L),a=0;a<u.length;a+=2)e.ihst[u[a]]++;for(a=0;a<L.length;a+=2)e.ihst[L[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,L]},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 L=e[w],i=e[w+1];u=r.F._writeLit(L,t,l,u);var a=L==16?2:L==17?3:7;L>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],L=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&&L==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&&L==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,L=t.length,i=0;for(i=0;i<L;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],k=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=k!=T&&(K==a||u[k].f<u[K].f)?u[k++]:u[K++],R=k!=T&&(K==a||u[k].f<u[K].f)?u[k++]:u[K++],u[T++]={lit:-1,f:v.f+R.f,l:v,r:R};var P=r.F.setDepth(u[T-1],0);for(P>l&&(r.F.restrictDepth(o,l,P),P=l),i=0;i<a;i++)t[1+(o[i].lit<<1)]=o[i].d;return P},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,L=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,L+=w-(1<<l-i)}for(L>>>=l-t;L>0;)(i=e[u].d)<t?(e[u].d++,L-=1<<t-i-1):u++;for(;u>=0;u--)e[u].d==t&&L<0&&(e[u].d--,L++);L!=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,L=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 k,T,K=0,P=0,x=0,q=0,M=0,N=0,y=0,p=0,F=0;K==0;)if(K=w(e,F,1),P=w(e,F+1,2),F+=3,P!=0){if(R&&(t=r.F._check(t,p+(1<<17))),P==1&&(k=v.flmap,T=v.fdmap,N=511,y=31),P==2){x=L(e,F,5)+257,q=L(e,F+5,5)+1,M=L(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=L(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),k=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 $=u._copyOut(v.ttree,x,q,v.dtree);y=(1<<$)-1,a(v.ltree,I),o(v.ltree,I,k),a(v.dtree,$),o(v.dtree,$,T)}for(;;){var m=k[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)+L(e,F,7&C),F+=7&C}var z=T[d(e,F)&y];F+=15&z;var Q=z>>>4,Y=v.ddef[Q],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),j=e[X-4]|e[X-3]<<8;R&&(t=r.F._check(t,p+j)),t.set(new l(e.buffer,e.byteOffset+X,j),p),F=X+j<<3,p+=j}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,L){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)L[o]=v,o++;else{var R=0,k=0;v==16?(k=3+i(u,w,2),w+=2,R=L[o-1]):v==17?(k=3+i(u,w,3),w+=3):v==18&&(k=11+i(u,w,7),w+=7);for(var T=o+k;o<T;)L[o]=R,o++}}return w},r.F._copyOut=function(e,t,l,u){for(var w=0,L=0,i=u.length>>>1;L<l;){var a=e[L+t];u[L<<1]=0,u[1+(L<<1)]=a,a>w&&(w=a),L++}for(;L<i;)u[L<<1]=0,u[1+(L<<1)]=0,L++;return w},r.F.makeCodes=function(e,t){for(var l,u,w,L,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)(L=e[w+1])!=0&&(e[w]=v[L],v[L]++)},r.F.codes2map=function(e,t,l){for(var u=e.length,w=r.F.U.rev15,L=0;L<u;L+=2)if(e[L+1]!=0)for(var i=L>>1,a=e[L+1],o=i<<4|a,d=t-a,v=e[L]<<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 L=e[w]<<t-e[w+1];e[w]=l[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,D=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 D(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 D(286),dhst:new D(30),ihst:new D(19),lits:new D(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,L,i){for(;L--!=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 Bs=$s({__proto__:null,default:Cn},[Cn]);const Tt=(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),k=Math.ceil(a*R/8),T=new Uint8Array(4*v),K=new Uint32Array(T.buffer),{ctype:P}=d,{depth:x}=d,q=n.readUshort;if(P==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(P==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],Q=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]==Q&&(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)==Q&&(T[p+3]=0)}}else if(P==3){const C=d.tabs.PLTE,z=d.tabs.tRNS,Q=z?z.length:0;if(x==1)for(var F=0;F<o;F++){var _=F*k,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<Q?z[I]:255}}if(x==2)for(F=0;F<o;F++)for(_=F*k,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<Q?z[I]:255;if(x==4)for(F=0;F<o;F++)for(_=F*k,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<Q?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<Q?z[I]:255}}else if(P==4){if(x==8)for(M=0;M<v;M++){p=M<<2;var $=i[m=M<<1];T[p]=$,T[p+1]=$,T[p+2]=$,T[p+3]=i[m+1]}if(x==16)for(M=0;M<v;M++){var m;p=M<<2,$=i[m=M<<2],T[p]=$,T[p+1]=$,T[p+2]=$,T[p+3]=i[m+2]}}else if(P==0)for(y=d.tabs.tRNS?d.tabs.tRNS:-1,F=0;F<o;F++){const C=F*k,z=F*a;if(x==1)for(var h=0;h<a;h++){var O=($=255*(i[C+(h>>>3)]>>>7-(7&h)&1))==255*y?0:255;K[z+h]=O<<24|$<<16|$<<8|$}else if(x==2)for(h=0;h<a;h++)O=($=85*(i[C+(h>>>2)]>>>6-((3&h)<<1)&3))==85*y?0:255,K[z+h]=O<<24|$<<16|$<<8|$;else if(x==4)for(h=0;h<a;h++)O=($=17*(i[C+(h>>>1)]>>>4-((1&h)<<2)&15))==17*y?0:255,K[z+h]=O<<24|$<<16|$<<8|$;else if(x==8)for(h=0;h<a;h++)O=($=i[C+h])==y?0:255,K[z+h]=O<<24|$<<16|$<<8|$;else if(x==16)for(h=0;h<a;h++)$=i[C+(h<<1)],O=q(i,C+(h<<1))==y?0:255,K[z+h]=O<<24|$<<16|$<<8|$}return T}function D(i,a,o,d){const v=t(i),R=Math.ceil(o*v/8),k=new Uint8Array((R+1+i.interlace)*d);return a=i.tabs.CgBI?e(a,k):r(a,k),i.interlace==0?a=l(a,i,0,o,d):i.interlace==1&&(a=(function(K,P){const x=P.width,q=P.height,M=t(P),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 $=0;for(;$<7;){const h=A[$],O=I[$];let C=0,z=0,Q=_[$];for(;Q<q;)Q+=h,z++;let Y=S[$];for(;Y<x;)Y+=O,C++;const ne=Math.ceil(C*M/8);l(K,P,F,C,z);let X=0,j=_[$];for(;j<q;){let re=S[$],Re=F+X*ne<<3;for(;re<x;){var m;if(M==1&&(m=(m=K[Re>>3])>>7-(7&Re)&1,p[j*y+(re>>3)]|=m<<7-((7&re)<<0)),M==2&&(m=(m=K[Re>>3])>>6-(7&Re)&3,p[j*y+(re>>2)]|=m<<6-((3&re)<<1)),M==4&&(m=(m=K[Re>>3])>>4-(7&Re)&15,p[j*y+(re>>1)]|=m<<4-((1&re)<<2)),M>=8){const Ae=j*y+re*N;for(let fe=0;fe<N;fe++)p[Ae+fe]=K[(Re>>3)+fe]}Re+=M,re+=O}X++,j+=h}C*z!=0&&(F+=z*(1+ne)),$+=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,k=0,T=0,K=0,P=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,$=p.Z,m=p.m,h=o==null;for(h&&(o=new d(a.length>>>2<<5));k==0;)if(k=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,P=_(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+P,a,y,m.v);const z=p.V(m.v,0,K,m.C);q=(1<<z)-1;const Q=p.V(m.v,K,P,m.D);M=(1<<Q)-1,A(m.C,z),I(m.C,z,v),A(m.D,Q),I(m.D,Q,R)}for(;;){const C=v[$(a,y)&q];y+=15&C;const z=C>>>4;if(!(z>>>8))o[N++]=z;else{if(z==256)break;{let Q=N+z-254;if(z>264){const re=m.q[z-257];Q=N+(re>>>3)+_(a,y,7&re),y+=7&re}const Y=R[$(a,y)&M];y+=15&Y;const ne=Y>>>4,X=m.c[ne],j=(X>>>4)+F(a,y,15&X);for(y+=15&X;N<Q;)o[N]=o[N++-j],o[N]=o[N++-j],o[N]=o[N++-j],o[N]=o[N++-j];N=Q}}}}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,k){const T=i.H.e,K=i.H.Z;let P=0;for(;P<d;){const x=a[K(v,R)&o];R+=15&x;const q=x>>>4;if(q<=15)k[P]=q,P++;else{let M=0,N=0;q==16?(N=3+T(v,R,2),R+=2,M=k[P-1]):q==17?(N=3+T(v,R,3),R+=3):q==18&&(N=11+T(v,R,7),R+=7);const y=P+N;for(;P<y;)k[P]=M,P++}}return R},i.H.V=function(a,o,d,v){let R=0,k=0;const T=v.length>>>1;for(;k<d;){const K=a[k+o];v[k<<1]=0,v[1+(k<<1)]=K,K>R&&(R=K),k++}for(;k<T;)v[k<<1]=0,v[1+(k<<1)]=0,k++;return R},i.H.n=function(a,o){const d=i.H.m,v=a.length;let R,k,T,K;const P=d.j;for(var x=0;x<=o;x++)P[x]=0;for(x=1;x<v;x+=2)P[a[x]]++;const q=d.K;for(R=0,P[0]=0,k=1;k<=o;k++)R=R+P[k-1]<<1,q[k]=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 k=0;k<v;k+=2)if(a[k+1]!=0){const T=k>>1,K=a[k+1],P=T<<4|K,x=o-K;let q=a[k]<<x;const M=q+(1<<x);for(;q!=M;)d[R[q]>>>15-o]=P,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 k=a[R]<<o-a[R+1];a[R]=d[k]>>>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,k){for(;R--!=0;)v.push(0,k)}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 k=Math.ceil(d*R/8);let T,K;R=Math.ceil(R/8);let P=i[o],x=0;if(P>1&&(i[o]=[0,0,1][P-2]),P==3)for(x=R;x<k;x++)i[x+1]=i[x+1]+(i[x+1-R]>>>1)&255;for(let q=0;q<v;q++)if(T=o+q*k,K=T+q+1,P=i[K-1],x=0,P==0)for(;x<k;x++)i[T+x]=i[K+x];else if(P==1){for(;x<R;x++)i[T+x]=i[K+x];for(;x<k;x++)i[T+x]=i[K+x]+i[T+x-R]}else if(P==2)for(;x<k;x++)i[T+x]=i[K+x]+i[T+x-k];else if(P==3){for(;x<R;x++)i[T+x]=i[K+x]+(i[T+x-k]>>>1);for(;x<k;x++)i[T+x]=i[K+x]+(i[T+x-k]+i[T+x-R]>>>1)}else{for(;x<R;x++)i[T+x]=i[K+x]+u(0,i[T+x-k],0);for(;x<k;x++)i[T+x]=i[K+x]+u(i[T+x-R],i[T+x-k],i[T+x-R-k])}return i}function u(i,a,o){const d=i+a-o,v=d-i,R=d-a,k=d-o;return v*v<=R*R&&v*v<=k*k?i:R*R<=k*k?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 L(i,a,o,d,v,R,k,T,K){const P=Math.min(a,v),x=Math.min(o,R);let q=0,M=0;for(let $=0;$<x;$++)for(let m=0;m<P;m++)if(k>=0&&T>=0?(q=$*a+m<<2,M=(T+$)*v+k+m<<2):(q=(-T+$)*a-k+m<<2,M=$*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,k=v.readUint,T={tabs:{},frames:[]},K=new Uint8Array(o.length);let P,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 $=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+$);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<$;N++)K[x+N]=o[d+N];x+=$}else if(m=="acTL")T.tabs[m]={num_frames:k(o,d),num_plays:k(o,d+4)},P=new Uint8Array(o.length);else if(m=="fcTL"){q!=0&&((I=T.frames[T.frames.length-1]).data=D(T,P.slice(0,q),I.rect.width,I.rect.height),q=0);const h={x:k(o,d+12),y:k(o,d+16),width:k(o,d+4),height:k(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<$-4;N++)P[q+N]=o[d+N+4];q+=$-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+$-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),_=$-((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,$);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,$):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+=$,v.readUint(o,d),d+=4}var I;return q!=0&&((I=T.frames[T.frames.length-1]).data=D(T,P.slice(0,q),I.rect.width,I.rect.height)),T.data=D(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,k=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 P=0;P<R;P++)K[P]=k[P];if(q.blend==0?L(F,y,p,k,o,d,M,N,0):q.blend==1&&L(F,y,p,k,o,d,M,N,1),v.push(k.buffer.slice(0)),q.dispose!=0){if(q.dispose==1)L(T,y,p,k,o,d,M,N,0);else if(q.dispose==2)for(P=0;P<R;P++)k[P]=K[P]}}return v},_paeth:u,_copyTile:L,_bin:n}})();(function(){const{_copyTile:n}=Tt,{_bin:f}=Tt,D=Tt._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 $=_.length,m=[];for(var h=0;h<$;h++){const j=_[h];m.push([j>>>0&255,j>>>8&255,j>>>16&255,j>>>24&255])}for(h=0;h<$;h++){let j=4294967295;for(var O=0,C=0;C<$;C++){var z=l(m[h],m[C]);C!=h&&z<j&&(j=z,O=C)}}const Q=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 j=0;j<F;j++)for(let re=0;re<p;re++){var X;h=4*(j*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&j)+(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 Re=16777215;for(C=0;C<$;C++){const ve=l(X,m[C]);ve<Re&&(Re=ve,O=C)}const Ae=m[O],fe=[X[0]-Ae[0],X[1]-Ae[1],X[2]-Ae[2],X[3]-Ae[3]];I==1&&(re!=p-1&&e(fe,Y,h+4,7),j!=F-1&&(re!=0&&e(fe,Y,h+4*p-4,3),e(fe,Y,h+4*p,5),re!=p-1&&e(fe,Y,h+4*p+4,1))),A[h>>2]=O,Q[h>>2]=_[O]}}function w(y,p,F,_,S){S==null&&(S={});const{crc:A}=r,I=f.writeUint,$=f.writeUshort,m=f.writeASCII;let h=8;const O=y.frames.length>1;let C,z=!1,Q=33+(O?20:0);if(S.sRGB!=null&&(Q+=13),S.pHYs!=null&&(Q+=21),S.iCCP!=null&&(C=pako.deflate(S.iCCP),Q+=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);Q+=8+3*Y+4+(z?8+1*Y+4:0)}for(var X=0;X<y.frames.length;X++)O&&(Q+=38),Q+=(Ae=y.frames[X]).cimg.length+12,X!=0&&(Q+=4);Q+=12;const j=new Uint8Array(Q),re=[137,80,78,71,13,10,26,10];for(ne=0;ne<8;ne++)j[ne]=re[ne];if(I(j,h,13),h+=4,m(j,h,"IHDR"),h+=4,I(j,h,p),h+=4,I(j,h,F),h+=4,j[h]=y.depth,h++,j[h]=y.ctype,h++,j[h]=0,h++,j[h]=0,h++,j[h]=0,h++,I(j,h,A(j,h-17,17)),h+=4,S.sRGB!=null&&(I(j,h,1),h+=4,m(j,h,"sRGB"),h+=4,j[h]=S.sRGB,h++,I(j,h,A(j,h-5,5)),h+=4),S.iCCP!=null){const fe=13+C.length;I(j,h,fe),h+=4,m(j,h,"iCCP"),h+=4,m(j,h,"ICC profile"),h+=11,h+=2,j.set(C,h),h+=C.length,I(j,h,A(j,h-(fe+4),fe+4)),h+=4}if(S.pHYs!=null&&(I(j,h,9),h+=4,m(j,h,"pHYs"),h+=4,I(j,h,S.pHYs[0]),h+=4,I(j,h,S.pHYs[1]),h+=4,j[h]=S.pHYs[2],h++,I(j,h,A(j,h-13,13)),h+=4),O&&(I(j,h,8),h+=4,m(j,h,"acTL"),h+=4,I(j,h,y.frames.length),h+=4,I(j,h,S.loop!=null?S.loop:0),h+=4,I(j,h,A(j,h-12,12)),h+=4),y.ctype==3){for(I(j,h,3*(Y=y.plte.length)),h+=4,m(j,h,"PLTE"),h+=4,ne=0;ne<Y;ne++){const fe=3*ne,ve=y.plte[ne],xe=255&ve,Fe=ve>>>8&255,qe=ve>>>16&255;j[h+fe+0]=xe,j[h+fe+1]=Fe,j[h+fe+2]=qe}if(h+=3*Y,I(j,h,A(j,h-3*Y-4,3*Y+4)),h+=4,z){for(I(j,h,Y),h+=4,m(j,h,"tRNS"),h+=4,ne=0;ne<Y;ne++)j[h+ne]=y.plte[ne]>>>24&255;h+=Y,I(j,h,A(j,h-Y-4,Y+4)),h+=4}}let Re=0;for(X=0;X<y.frames.length;X++){var Ae=y.frames[X];O&&(I(j,h,26),h+=4,m(j,h,"fcTL"),h+=4,I(j,h,Re++),h+=4,I(j,h,Ae.rect.width),h+=4,I(j,h,Ae.rect.height),h+=4,I(j,h,Ae.rect.x),h+=4,I(j,h,Ae.rect.y),h+=4,$(j,h,_[X]),h+=2,$(j,h,1e3),h+=2,j[h]=Ae.dispose,h++,j[h]=Ae.blend,h++,I(j,h,A(j,h-30,30)),h+=4);const fe=Ae.cimg;I(j,h,(Y=fe.length)+(X==0?0:4)),h+=4;const ve=h;m(j,h,X==0?"IDAT":"fdAT"),h+=4,X!=0&&(I(j,h,Re++),h+=4),j.set(fe,h),h+=Y,I(j,h,A(j,ve,h-ve)),h+=4}return I(j,h,0),h+=4,m(j,h,"IEND"),h+=4,I(j,h,A(j,h-4,4)),h+=4,j.buffer}function L(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],$=S[2],m=S[3],h=S[4],O=S[5];let C=6,z=8,Q=255;for(var Y=0;Y<y.length;Y++){const Oe=new Uint8Array(y[Y]);for(var ne=Oe.length,X=0;X<ne;X+=4)Q&=Oe[X+3]}const j=Q!=255,re=(function(De,Se,Ve,ot,Le,ct){const Pe=[];for(var ue=0;ue<De.length;ue++){const we=new Uint8Array(De[ue]),H=new Uint32Array(we.buffer);var ft;let V=0,te=0,ae=Se,se=Ve,le=ot?1:0;if(ue!=0){const ce=ct||ot||ue==1||Pe[ue-2].dispose!=0?1:2;let Te=0,tt=1e9;for(let je=0;je<ce;je++){var Ct=new Uint8Array(De[ue-1-je]);const nt=new Uint32Array(De[ue-1-je]);let Ne=Se,be=Ve,Ue=-1,lt=-1;for(let Ye=0;Ye<Ve;Ye++)for(let at=0;at<Se;at++)H[et=Ye*Se+at]!=nt[et]&&(at<Ne&&(Ne=at),at>Ue&&(Ue=at),Ye<be&&(be=Ye),Ye>lt&&(lt=Ye));Ue==-1&&(Ne=be=Ue=lt=0),Le&&((1&Ne)==1&&Ne--,(1&be)==1&&be--);const pt=(Ue-Ne+1)*(lt-be+1);pt<tt&&(tt=pt,Te=je,V=Ne,te=be,ae=Ue-Ne+1,se=lt-be+1)}Ct=new Uint8Array(De[ue-1-Te]),Te==1&&(Pe[ue-1].dispose=2),ft=new Uint8Array(ae*se*4),n(Ct,Se,Ve,ft,ae,se,-V,-te,0),le=n(we,Se,Ve,ft,ae,se,-V,-te,3)?1:0,le==1?o(we,Se,Ve,ft,{x:V,y:te,width:ae,height:se}):n(we,Se,Ve,ft,ae,se,-V,-te,0)}else ft=we.slice(0);Pe.push({rect:{x:V,y:te,width:ae,height:se},img:ft,blend:le,dispose:0})}if(ot)for(ue=0;ue<Pe.length;ue++){if((rt=Pe[ue]).blend==1)continue;const we=rt.rect,H=Pe[ue-1].rect,V=Math.min(we.x,H.x),te=Math.min(we.y,H.y),ae={x:V,y:te,width:Math.max(we.x+we.width,H.x+H.width)-V,height:Math.max(we.y+we.height,H.y+H.height)-te};Pe[ue-1].dispose=1,ue-1!=0&&a(De,Se,Ve,Pe,ue-1,ae,Le),a(De,Se,Ve,Pe,ue,ae,Le)}let Ft=0;if(De.length!=1)for(var et=0;et<Pe.length;et++){var rt;Ft+=(rt=Pe[et]).rect.width*rt.rect.height}return Pe})(y,p,F,A,I,$),Re={},Ae=[],fe=[];if(_!=0){const Oe=[];for(X=0;X<re.length;X++)Oe.push(re[X].img.buffer);const De=(function(Le){let ct=0;for(var Pe=0;Pe<Le.length;Pe++)ct+=Le[Pe].byteLength;const ue=new Uint8Array(ct);let ft=0;for(Pe=0;Pe<Le.length;Pe++){const Ct=new Uint8Array(Le[Pe]),Ft=Ct.length;for(let et=0;et<Ft;et+=4){let rt=Ct[et],we=Ct[et+1],H=Ct[et+2];const V=Ct[et+3];V==0&&(rt=we=H=0),ue[ft+et]=rt,ue[ft+et+1]=we,ue[ft+et+2]=H,ue[ft+et+3]=V}ft+=Ft}return ue.buffer})(Oe),Se=R(De,_);for(X=0;X<Se.plte.length;X++)Ae.push(Se.plte[X].est.rgba);let Ve=0;for(X=0;X<re.length;X++){const ot=(xe=re[X]).img.length;var ve=new Uint8Array(Se.inds.buffer,Ve>>2,ot>>2);fe.push(ve);const Le=new Uint8Array(Se.abuf,Ve,ot);O&&u(xe.img,xe.rect.width,xe.rect.height,Ae,Le,ve),xe.img.set(Le),Ve+=ot}}else for(Y=0;Y<re.length;Y++){var xe=re[Y];const Oe=new Uint32Array(xe.img.buffer);var Fe=xe.rect.width;for(ne=Oe.length,ve=new Uint8Array(ne),fe.push(ve),X=0;X<ne;X++){const De=Oe[X];if(X!=0&&De==Oe[X-1])ve[X]=ve[X-1];else if(X>Fe&&De==Oe[X-Fe])ve[X]=ve[X-Fe];else{let Se=Re[De];if(Se==null&&(Re[De]=Se=Ae.length,Ae.push(De),Ae.length>=300))break;ve[X]=Se}}}const qe=Ae.length;for(qe<=256&&h==0&&(z=qe<=2?1:qe<=4?2:qe<=16?4:8,z=Math.max(z,m)),Y=0;Y<re.length;Y++){(xe=re[Y]).rect.x,xe.rect.y,Fe=xe.rect.width;const Oe=xe.rect.height;let De=xe.img;new Uint32Array(De.buffer);let Se=4*Fe,Ve=4;if(qe<=256&&h==0){Se=Math.ceil(z*Fe/8);var Je=new Uint8Array(Se*Oe);const ot=fe[Y];for(let Le=0;Le<Oe;Le++){X=Le*Se;const ct=Le*Fe;if(z==8)for(var _e=0;_e<Fe;_e++)Je[X+_e]=ot[ct+_e];else if(z==4)for(_e=0;_e<Fe;_e++)Je[X+(_e>>1)]|=ot[ct+_e]<<4-4*(1&_e);else if(z==2)for(_e=0;_e<Fe;_e++)Je[X+(_e>>2)]|=ot[ct+_e]<<6-2*(3&_e);else if(z==1)for(_e=0;_e<Fe;_e++)Je[X+(_e>>3)]|=ot[ct+_e]<<7-1*(7&_e)}De=Je,C=3,Ve=1}else if(j==0&&re.length==1){Je=new Uint8Array(Fe*Oe*3);const ot=Fe*Oe;for(X=0;X<ot;X++){const Le=3*X,ct=4*X;Je[Le]=De[ct],Je[Le+1]=De[ct+1],Je[Le+2]=De[ct+2]}De=Je,C=2,Ve=3,Se=3*Fe}xe.img=De,xe.bpl=Se,xe.bpp=Ve}return{ctype:C,depth:z,plte:Ae,frames:re}}function a(y,p,F,_,S,A,I){const $=Uint8Array,m=Uint32Array,h=new $(y[S-1]),O=new m(y[S-1]),C=S+1<y.length?new $(y[S+1]):null,z=new $(y[S]),Q=new m(z.buffer);let Y=p,ne=F,X=-1,j=-1;for(let Re=0;Re<A.height;Re++)for(let Ae=0;Ae<A.width;Ae++){const fe=A.x+Ae,ve=A.y+Re,xe=ve*p+fe,Fe=Q[xe];Fe==0||_[S-1].dispose==0&&O[xe]==Fe&&(C==null||C[4*xe+3]!=0)||(fe<Y&&(Y=fe),fe>X&&(X=fe),ve<ne&&(ne=ve),ve>j&&(j=ve))}X==-1&&(Y=ne=X=j=0),I&&((1&Y)==1&&Y--,(1&ne)==1&&ne--),A={x:Y,y:ne,width:X-Y+1,height:j-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 $=[];let m,h=[0,1,2,3,4];A!=-1?h=[A]:(p*_>5e5||F==1)&&(h=[0]),I&&(m={level:0});const O=Bs;for(var C=0;C<h.length;C++){for(let Y=0;Y<p;Y++)v(S,y,Y,_,F,h[C]);$.push(O.deflate(S,m))}let z,Q=1e9;for(C=0;C<$.length;C++)$[C].length<Q&&(z=C,Q=$[C].length);return $[z]}function v(y,p,F,_,S,A){const I=F*_;let $=I+F;if(y[$]=A,$++,A==0)if(_<500)for(var m=0;m<_;m++)y[$+m]=p[I+m];else y.set(new Uint8Array(p.buffer,I,_),$);else if(A==1){for(m=0;m<S;m++)y[$+m]=p[I+m];for(m=S;m<_;m++)y[$+m]=p[I+m]-p[I+m-S]+256&255}else if(F==0){for(m=0;m<S;m++)y[$+m]=p[I+m];if(A==2)for(m=S;m<_;m++)y[$+m]=p[I+m];if(A==3)for(m=S;m<_;m++)y[$+m]=p[I+m]-(p[I+m-S]>>1)+256&255;if(A==4)for(m=S;m<_;m++)y[$+m]=p[I+m]-D(p[I+m-S],0,0)+256&255}else{if(A==2)for(m=0;m<_;m++)y[$+m]=p[I+m]+256-p[I+m-_]&255;if(A==3){for(m=0;m<S;m++)y[$+m]=p[I+m]+256-(p[I+m-_]>>1)&255;for(m=S;m<_;m++)y[$+m]=p[I+m]+256-(p[I+m-_]+p[I+m-S]>>1)&255}if(A==4){for(m=0;m<S;m++)y[$+m]=p[I+m]+256-D(0,p[I+m-_],0)&255;for(m=S;m<_;m++)y[$+m]=p[I+m]+256-D(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=k(_,p),I=A[0],$=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),Q=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,Q=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,Q,Y,ne)<=0?O.left:O.right;h[C>>2]=O.ind,S[C>>2]=O.est.rgba}return{abuf:_.buffer,inds:h,plte:$}}function k(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 $=0,m=0;for(var I=0;I<A.length;I++)A[I].est.L>$&&($=A[I].est.L,m=I);if($<F)break;const h=A[m],O=P(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((($,m)=>m.bst.N-$.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,Q,Y,ne){const X=z-C[0],j=Q-C[1],re=Y-C[2],Re=ne-C[3];return X*X+j*j+re*re+Re*Re})(y.est.q,p,F,_,S),y;const A=K(y.est,p,F,_,S);let I=y.left,$=y.right;A>0&&(I=y.right,$=y.left);const m=T(I,p,F,_,S);if(m.tdst<=A*A)return m;const h=T($,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 P(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 $=y[I]*.00392156862745098,m=y[I+1]*(1/255),h=y[I+2]*(1/255),O=y[I+3]*(1/255);S[0]+=$,S[1]+=m,S[2]+=h,S[3]+=O,_[0]+=$*$,_[1]+=$*m,_[2]+=$*h,_[3]+=$*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],$=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*$*m,p[4]-A*S*m,p[5]-A*A*m,p[6]-A*I*m,p[7]-A*$*m,p[8]-I*S*m,p[9]-I*A*m,p[10]-I*I*m,p[11]-I*$*m,p[12]-$*S*m,p[13]-$*A*m,p[14]-$*I*m,p[15]-$*$*m],O=h,C=N;let z=[Math.random(),Math.random(),Math.random(),Math.random()],Q=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-Q)<1e-9));X++)Q=Y;const ne=[S*m,A*m,I*m,$*m];return{Cov:h,q:ne,e:z,L:Q,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]]};Tt.encode=function(p,F,_,S,A,I,$){S==null&&(S=0),$==null&&($=!1);const m=i(p,F,_,S,[!1,!1,!1,0,$,!1]);return L(m,-1),w(m,F,_,A,I)},Tt.encodeLL=function(p,F,_,S,A,I,$,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 L(h,0,!0),w(h,F,_,$,m)},Tt.encode.compress=i,Tt.encode.dither=u,Tt.quantize=R,Tt.quantize.getKDtree=k,Tt.quantize.getNearest=T})();const Di={toArrayBuffer(n,f){const D=n.width,r=n.height,e=D<<2,t=n.getContext("2d").getImageData(0,0,D,r),l=new Uint32Array(t.data.buffer),u=(32*D+31)/32<<2,w=u*r,L=122+w,i=new ArrayBuffer(L),a=new DataView(i),o=1<<20;let d,v,R,k,T=o,K=0,P=0,x=0;function q(y){a.setUint16(P,y,!0),P+=2}function M(y){a.setUint32(P,y,!0),P+=4}function N(y){P+=y}q(19778),M(L),N(4),M(122),M(108),M(D),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(k=122+K*u,d=0;d<e;)T--,v=l[x++],R=v>>>24,a.setUint32(k+d,v<<8|R),d+=4;K++}x<l.length?(T=o,setTimeout(y,Di._dly)):f(i)})()},toBlob(n,f){this.toArrayBuffer(n,(D=>{f(new Blob([D],{type:"image/bmp"}))}))},_dly:9};var St={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},Os={[St.CHROME]:16384,[St.FIREFOX]:11180,[St.DESKTOP_SAFARI]:16384,[St.IE]:8192,[St.IOS]:4096,[St.ETC]:8192};const Xn=typeof window<"u",Bi=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Mn=Xn&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),Us=(Xn||Bi)&&(Mn&&Mn.getOriginalSymbol(window,"File")||typeof File<"u"&&File),Oi=(Xn||Bi)&&(Mn&&Mn.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function Zn(n,f,D=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 L=new Blob([w],{type:t});L.name=f,L.lastModified=D,r(L)}))}function Ui(n){return new Promise(((f,D)=>{const r=new Oi;r.onload=()=>f(r.result),r.onerror=e=>D(e),r.readAsDataURL(n)}))}function zi(n){return new Promise(((f,D)=>{const r=new Image;r.onload=()=>f(r),r.onerror=e=>D(e),r.src=n}))}function jt(){if(jt.cachedResult!==void 0)return jt.cachedResult;let n=St.ETC;const{userAgent:f}=navigator;return/Chrom(e|ium)/i.test(f)?n=St.CHROME:/iP(ad|od|hone)/i.test(f)&&/WebKit/i.test(f)?n=St.IOS:/Safari/i.test(f)?n=St.DESKTOP_SAFARI:/Firefox/i.test(f)?n=St.FIREFOX:(/MSIE/i.test(f)||document.documentMode)&&(n=St.IE),jt.cachedResult=n,jt.cachedResult}function Ni(n,f){const D=jt(),r=Os[D];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,L=(r+t)/2;w<L?(t=L,e=L*u):(t=w*u,e=w),l=e*t}return{width:e,height:t}}function Rn(n,f){let D,r;try{if(D=new OffscreenCanvas(n,f),r=D.getContext("2d"),r===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{D=document.createElement("canvas"),r=D.getContext("2d")}return D.width=n,D.height=f,[D,r]}function Hi(n,f){const{width:D,height:r}=Ni(n.width,n.height),[e,t]=Rn(D,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 _n(){return _n.cachedResult!==void 0||(_n.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),_n.cachedResult}function An(n,f={}){return new Promise((function(D,r){let e,t;var l=function(){try{return t=Hi(e,f.fileType||n.type),D([e,t])}catch(w){return r(w)}},u=function(w){try{var L=function(i){try{throw i}catch(a){return r(a)}};try{let i;return Ui(n).then((function(a){try{return i=a,zi(i).then((function(o){try{return e=o,(function(){try{return l()}catch(d){return r(d)}})()}catch(d){return L(d)}}),L)}catch(o){return L(o)}}),L)}catch(i){L(i)}}catch(i){return r(i)}};try{if(_n()||[St.DESKTOP_SAFARI,St.MOBILE_SAFARI].includes(jt()))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 Tn(n,f,D,r,e=1){return new Promise((function(t,l){let u;if(f==="image/png"){let L,i,a;return L=n.getContext("2d"),{data:i}=L.getImageData(0,0,n.width,n.height),a=Tt.encode([i.buffer],n.width,n.height,4096*e),u=new Blob([a],{type:f}),u.name=D,u.lastModified=r,w.call(this)}{let L=function(){return w.call(this)};if(f==="image/bmp")return new Promise((i=>Di.toBlob(n,i))).then((function(i){try{return u=i,u.name=D,u.lastModified=r,L.call(this)}catch(a){return l(a)}}).bind(this),l);{let i=function(){return L.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=D,u.lastModified=r,i.call(this)}catch(o){return l(o)}}).bind(this),l);{let a;return a=n.toDataURL(f,e),Zn(a,D,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 xt(n){n.width=0,n.height=0}function Kt(){return new Promise((function(n,f){let D,r,e,t;return Kt.cachedResult!==void 0?n(Kt.cachedResult):Zn("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(l){try{return D=l,An(D).then((function(u){try{return r=u[1],Tn(r,D.type,D.name,D.lastModified).then((function(w){try{return e=w,xt(r),An(e).then((function(L){try{return t=L[0],Kt.cachedResult=t.width===1&&t.height===2,n(Kt.cachedResult)}catch(i){return f(i)}}),f)}catch(L){return f(L)}}),f)}catch(w){return f(w)}}),f)}catch(u){return f(u)}}),f)}))}function Pi(n){return new Promise(((f,D)=>{const r=new Oi;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 L=t.getUint16(u+=6,!1)==18761;u+=t.getUint32(u+4,L);const i=t.getUint16(u,L);u+=2;for(let a=0;a<i;a++)if(t.getUint16(u+12*a,L)==274)return f(t.getUint16(u+12*a+8,L))}else{if((65280&w)!=65280)break;u+=t.getUint16(u,!1)}}return f(-1)},r.onerror=e=>D(e),r.readAsArrayBuffer(n)}))}function ji(n,f){const{width:D}=n,{height:r}=n,{maxWidthOrHeight:e}=f;let t,l=n;return isFinite(e)&&(D>e||r>e)&&([l,t]=Rn(D,r),D>r?(l.width=e,l.height=r/D*e):(l.width=D/r*e,l.height=e),t.drawImage(n,0,0,l.width,l.height),xt(n)),l}function qi(n,f){const{width:D}=n,{height:r}=n,[e,t]=Rn(D,r);switch(f>4&&f<9?(e.width=r,e.height=D):(e.width=D,e.height=r),f){case 2:t.transform(-1,0,0,1,D,0);break;case 3:t.transform(-1,0,0,-1,D,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,D);break;case 8:t.transform(0,-1,1,0,0,D)}return t.drawImage(n,0,0,D,r),xt(n),e}function wi(n,f,D=0){return new Promise((function(r,e){let t,l,u,w,L,i,a,o,d,v,R,k,T,K,P,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=D,l=f.maxIteration||10,u=1024*f.maxSizeMB*1024,p(),An(n,f).then((function(_){try{return[,w]=_,p(),L=ji(w,f),p(),new Promise((function(S,A){var I;if(!(I=f.exifOrientation))return Pi(n).then((function(m){try{return I=m,$.call(this)}catch(h){return A(h)}}).bind(this),A);function $(){return S(I)}return $.call(this)})).then((function(S){try{return i=S,p(),Kt().then((function(A){try{return a=A?L:qi(L,i),p(),o=f.initialQuality||1,d=f.fileType||n.type,Tn(a,d,n.name,n.lastModified,o).then((function(I){try{{let m=function(){if(l--&&(P>u||P>T)){let O,C;return O=y?.95*N.width:N.width,C=y?.95*N.height:N.height,[q,M]=Rn(O,C),M.drawImage(N,0,0,O,C),o*=d==="image/png"?.85:.95,Tn(q,d,n.name,n.lastModified,o).then((function(z){try{return x=z,xt(N),N=q,P=x.size,F(Math.min(99,Math.floor((K-P)/(K-u)*100))),m}catch(Q){return e(Q)}}),e)}return[1]},h=function(){return xt(N),xt(q),xt(L),xt(a),xt(w),F(100),r(x)};if(v=I,p(),R=v.size>u,k=v.size>n.size,!R&&!k)return F(100),r(v);var $;return T=n.size,K=v.size,P=K,N=a,y=!f.alwaysKeepResolution&&R,($=(function(O){for(;O;){if(O.then)return void O.then($,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 zs=`
|
|
2
|
+
import{d as Bt,w as Ce,u as B,o as W,c as ee,r as Pt,a as me,b as Me,e as It,F as Ie,f as vt,m as ci,t as mo,n as gt,g as In,h as bi,i as ie,j as ge,k as Ut,l as ye,p as cn,q as wt,s as go,v as Gn,x as _t,y as sn,z as vo,A as En,B as ki,C as xn,D as Ii,E as Fn,G as Ln,H as g,I as G,J as Sn,K as Ke,T as _i,L as un,M as it,N as fi,O as di,P as Jt,Q as ut,R as Be,S as Si,_ as $n,U as Ci,V as bt,W as po,X as Mi,Y as yo,Z as Kn,$ as Ai,a0 as wo,a1 as gn,a2 as hi,a3 as Ti,a4 as jn,a5 as Ei,a6 as xi,a7 as qn,a8 as Vn,a9 as bo,aa as ko,ab as tn,ac as vn,ad as mi,ae as Io,af as _o,ag as Dt,ah as pn,ai as So,aj as yn,ak as nn,al as on,am as an,an as Un,ao as Co,ap as Mo,aq as Ao,ar as To,as as Eo,at as gi,au as vi,av as xo,aw as Nt,ax as Fo,ay as Lo,az as wn,aA as $o,aB as Ro,aC as Do,aD as Bo,aE as Oo,aF as Uo,aG as zo,aH as No,aI as Ho}from"./index-CSGfOsfr.js";import{_ as Wn,E as rn,a as ln}from"./MsgBody.vue_vue_type_script_setup_true_lang-ClDybRo_.js";function Jn(n,f,D){if(!D)return f;const r=n==null?void 0:n[D];if(r==null)throw new Error(`Key is ${r} on item (keyField is '${D}')`);return r}function bn(n,f){return n.map((D,r)=>Jn(D,r,f))}function Po(n,f,D){const r=[],e=[];for(let t=0;t<n.length;t++){const l=n[t],u=Jn(l,t,f),w=D(l,t,u);r.push(u),e.push(typeof w=="number"&&w>0?w:null)}return{keys:r,sizes:e}}function jo(n,f,D){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]!==Jn(f[r],r,D))return!1;return!0}function qo(n,f,D){if(!jo(n,f,D))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 Vo(n,f){if(!n.length||f.length<=n.length)return 0;const D=n[0],r=f.indexOf(D);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 pi(n,f,D,r,e,t=0){const l=e??"start";if(l==="nearest"){const u=D+r,w=n+f;return n>=D&&w<=u?null:n<D?n+t:w-r+t}return l==="end"?n+f-r+t:l==="center"?n+(f-r)/2+t:n+t}const Wo={itemsLimit:1e3};function Fi(n){return typeof window<"u"&&n===window}const Qo=(()=>{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 D=n.scrollLeft<0;return document.body.removeChild(n),D?"negative":"default"})();function Gt(n,f,D){return f!=="horizontal"||!D||Fi(D)||getComputedStyle(D).direction!=="rtl"?n:Qo==="negative"?-n:n}function Go(n,f,D){return Gt(n,f,D)}function zn(n,f,D,r){const e=Go(D,f,n),t=!!(r!=null&&r.smooth);if(Fi(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 Ko(n,f,D){return D?f==="vertical"?window.innerHeight:window.innerWidth:f==="vertical"?n.clientHeight:n.clientWidth}const Jo=/auto|scroll/;function Li(n,f){return n.parentNode===null?f:Li(n.parentNode,[...f,n])}function Nn(n,f){return getComputedStyle(n,null).getPropertyValue(f)}function Yo(n){return Nn(n,"overflow")+Nn(n,"overflow-y")+Nn(n,"overflow-x")}function Xo(n){return Jo.test(Yo(n))}function kn(n){if(!(n instanceof HTMLElement||n instanceof SVGElement))return;const f=Li(n.parentNode,[]);for(let D=0;D<f.length;D+=1)if(f[D]instanceof Element&&Xo(f[D]))return f[D];return document.scrollingElement||document.documentElement}let Qn=!1;function Zo(){return Qn}if(typeof window<"u"){Qn=!1;try{const n=Object.defineProperty({},"passive",{get(){Qn=!0}});window.addEventListener("test",null,n)}catch{}}let ea=0;function Hn(n){const f=n;f._vs_styleStamp++}function ta(n,f,D){const r=n==null?void 0:n[D];if(r==null)throw new Error(`Key is ${r} on item (keyField is '${D}')`);return r}function na(n,f,D,r,e){const t=ge([]),l=ge(0),u=ge(!1);let w=0,L=0;const i=new Map,a=new Map;let o=!1,d=0,v=0,R=!1,k=null,T=null,K=null,P=0,x=null,q=[],M=null,N=null,y=null,p=!1;const F=new Set,_=ge({}),S=Ut(()=>{const H=ye(n);return H.items.length>0&&typeof H.items[0]!="object"}),A=Ut(()=>{const H=ye(n);if(H.itemSize===null){const V={[-1]:{accumulator:0}},te=H.items,ae=H.sizeField??"size",se=H.minItemSize,le=_.value;let ce=1e4,Te=0,tt;for(let je=0,nt=te.length;je<nt;je++){const Ne=S.value?je:ta(te[je],je,H.keyField);tt=le[Ne]||te[je][ae]||se,tt<ce&&(ce=tt),Te+=tt,V[je]={accumulator:Te,size:tt}}return P=ce,V}return[]}),I=Ut(()=>t.value.filter(H=>H.nr.used).sort((H,V)=>H.nr.index-V.nr.index)),$=Ut(()=>{const H=ye(n),V=S.value?null:H.keyField;return Po(H.items,V,(te,ae,se)=>H.itemSize!=null?H.itemSize:_.value[se]||(te==null?void 0:te[H.sizeField??"size"])||void 0)});function m(H){const V=ye(n);return _.value=qo(H,V.items,S.value?null:V.keyField),Object.keys(_.value).length>0}function h(H){let V=a.get(H);return V||(V=[],a.set(H,V)),V}function O(H,V,te,ae,se){const le=sn({id:ea++,index:V,used:!0,key:ae,type:se}),ce=vo({item:te,position:0,offset:0,nr:le,_vs_styleStamp:0});return H.push(ce),ce}function C(H){const V=h(H);if(V&&V.length){const te=V.pop();return te.nr.used=!0,Hn(te),te}}function z(H){const V=H.nr.type;h(V).push(H),H.nr.used=!1,H.position=-9999,Hn(H),i.delete(H.nr.key)}function Q(){i.clear(),a.clear();for(let H=0,V=t.value.length;H<V;H++){const te=t.value[H];te&&z(te)}}function Y(H){let V=-1;return V=requestAnimationFrame(()=>{F.delete(V),H()}),F.add(V),V}function ne(){for(const H of F)cancelAnimationFrame(H);F.clear()}function X(){k&&(clearTimeout(k),k=null),T&&(clearTimeout(T),T=null),K&&(clearTimeout(K),K=null),N&&(clearTimeout(N),N=null),y&&(clearTimeout(y),y=null)}function j(){var H;(H=e==null?void 0:e.onResize)==null||H.call(e),u.value&&ue(!1)}function re(){M&&!p&&_e();const H=ye(n);if(!o){if(o=!0,k)return;const V=()=>Y(()=>{o=!1;const{continuous:te}=ue(!1,!0);te||(T&&clearTimeout(T),T=setTimeout(re,H.updateInterval+100))});V(),H.updateInterval&&(k=setTimeout(()=>{k=null,o&&V()},H.updateInterval))}}function Re(H,V){var te,ae;u.value&&(H||V.boundingClientRect.width!==0||V.boundingClientRect.height!==0?((te=e==null?void 0:e.onVisible)==null||te.call(e),Y(()=>{ue(!1)})):(ae=e==null?void 0:e.onHidden)==null||ae.call(e))}function Ae(){const H=ye(f),V=H?kn(H):void 0;return window.document&&(V===window.document.documentElement||V===window.document.body)?window:V||window}function fe(){const H=ye(D);return H?ye(n).direction==="vertical"?H.scrollHeight:H.scrollWidth:0}function ve(){const H=ye(f);if(!H)return{start:0,end:0};const V=ye(n),te=V.direction==="vertical";let ae;if(V.pageMode){const se=H.getBoundingClientRect(),le=te?se.height:se.width;let ce=-(te?se.top:se.left),Te=te?window.innerHeight:window.innerWidth;ce<0&&(Te+=ce,ce=0),ce+Te>le&&(Te=le-ce),ae={start:ce,end:ce+Te}}else te?ae={start:H.scrollTop,end:H.scrollTop+H.clientHeight}:ae={start:Gt(H.scrollLeft,V.direction,H),end:Gt(H.scrollLeft,V.direction,H)+H.clientWidth};return ae}function xe(){const H=ye(f);if(!H)return{start:0,end:0};if(ye(n).direction==="vertical"){const V=Gt(H.scrollLeft,"horizontal",H);return{start:V,end:V+H.clientWidth}}return{start:H.scrollTop,end:H.scrollTop+H.clientHeight}}function Fe(H){const V=ye(n);if(V.itemSize!=null)return V.itemSize;const te=A.value[H];return(te==null?void 0:te.size)||Number(V.minItemSize)||0}function qe(H){var V;const te=ye(n),ae=te.gridItems||1;return H<=0?0:te.itemSize!=null?Math.floor(H/ae)*te.itemSize:((V=A.value[H-1])==null?void 0:V.accumulator)||0}function Je(H){const V=ye(n),te=V.items.length,ae=V.gridItems||1;if(!te)return 0;if(V.itemSize!=null){const Te=Math.floor(H/V.itemSize)*ae;return Math.min(Math.max(Te,0),te-1)}let se=0,le=te-1,ce=0;for(;se<=le;){const Te=Math.floor((se+le)/2);qe(Te)<=H?(ce=Te,se=Te+1):le=Te-1}return ce}function _e(){N&&(clearTimeout(N),N=null),M=null}function Oe(){N&&clearTimeout(N),N=setTimeout(()=>{M=null,N=null},150)}function De(H,V){if(!H.length){_e();return}const te=Math.max(ve().start-fe(),0),ae=Math.min(Je(te),H.length-1),se=H[ae],le=V?se==null?void 0:se[V]:ae;if(le==null){_e();return}const ce=fe()+qe(ae);M={key:le,offset:ve().start-ce}}function Se(H){if(!M)return!1;const V=ye(n),te=H??V.items,ae=S.value?null:V.keyField,se=bn(te,ae).indexOf(M.key);if(se===-1)return _e(),!1;const le=fe()+qe(se)+M.offset,ce=ve().start;return Math.abs(le-ce)<.5?!1:(p=!0,rt(le),Y(()=>{p=!1}),!0)}function Ve(){ye(n).pageMode?ot():Le()}function ot(){x=Ae(),x.addEventListener("scroll",re,Zo()?{passive:!0}:!1),x.addEventListener("resize",j)}function Le(){x&&(x.removeEventListener("scroll",re),x.removeEventListener("resize",j),x=null)}function ct(H,V,te,ae,se,le){const ce=Math.ceil(H/V)*te,Te=Math.max(0,Math.floor(se.start/te)),tt=Math.min(Math.ceil(se.end/te),Math.ceil(H/V)),je=Math.max(0,Math.floor(le.start/ae)),nt=Math.min(Math.ceil(le.end/ae),V),Ne=[];for(let lt=Te;lt<tt;lt++){const pt=lt*V;for(let Ye=je;Ye<nt;Ye++){const at=pt+Ye;if(at>=H)break;Ne.push(at)}}const be=Ne[0]??0,Ue=Ne.at(-1)??-1;return{renderedIndices:Ne,startIndex:be,endIndex:Ue+1,visibleStartIndex:be,visibleEndIndex:Ue,totalSize:ce}}function Pe(){const H=ye(n);if(!H.gridItems||H.itemSize==null)return!1;const V=ye(f);if(!V)return!1;const te=H.itemSecondarySize||H.itemSize,ae=H.direction==="vertical"?V.clientWidth:V.clientHeight;return te*H.gridItems>ae}function ue(H,V=!1){var te,ae;const se=ye(n),le=se.itemSize,ce=se.gridItems||1,Te=se.itemSecondarySize||le,tt=P,je=se.typeField,nt=S.value?null:se.keyField,Ne=se.items,be=Ne.length,Ue=A.value,lt=i,pt=t.value;let Ye=null,at=null,We,ze,Lt,kt,yt;if(!be)We=ze=kt=yt=Lt=0;else if(R)We=kt=0,ze=yt=Math.min(se.prerender,Ne.length),Lt=0;else{const ke=ve(),st=xe();if(V){let Xe=ke.start-d;Xe<0&&(Xe=-Xe);let He=st.start-v;He<0&&(He=-He);const $t=le===null&&Xe>=tt||le!==null&&Xe>=le,ht=ce>1&&le!=null&&He>=Te;if(!$t&&!ht)return{continuous:!0}}d=ke.start,v=st.start;const At=se.buffer;ke.start-=At,ke.end+=At,st.start-=At,st.end+=At;let Et=0;const Vt=ye(D);Vt&&(Et=Vt.scrollHeight,ke.start-=Et);const dn=ye(r);if(dn){const Xe=dn.scrollHeight;ke.end+=Xe}if(le===null){let Xe,He=0,$t=be-1,ht=~~(be/2),Xt;do Xt=ht,Xe=Ue[ht].accumulator,Xe<ke.start?He=ht:ht<be-1&&Ue[ht+1].accumulator>ke.start&&($t=ht),ht=~~((He+$t)/2);while(ht!==Xt);for(ht<0&&(ht=0),We=ht,Lt=Ue[be-1].accumulator,ze=ht;ze<be&&Ue[ze].accumulator<ke.end;ze++);for(ze===-1?ze=Ne.length-1:(ze++,ze>be&&(ze=be)),kt=We;kt<be&&Et+Ue[kt].accumulator<ke.start;kt++);for(yt=kt;yt<be&&Et+Ue[yt].accumulator<ke.end;yt++);}else if(ce>1){const Xe=ct(be,ce,le,Te,ke,st);Ye=Xe.renderedIndices,at=new Set(Ye),We=Xe.startIndex,ze=Xe.endIndex,kt=Xe.visibleStartIndex,yt=Xe.visibleEndIndex,Lt=Xe.totalSize}else{We=~~(ke.start/le*ce);const Xe=We%ce;We-=Xe,ze=Math.ceil(ke.end/le*ce),kt=Math.max(0,Math.floor((ke.start-Et)/le*ce)),yt=Math.floor((ke.end-Et)/le*ce),We<0&&(We=0),ze>be&&(ze=be),kt<0&&(kt=0),yt>be&&(yt=be),Lt=Math.ceil(be/ce)*le}}ze-We>Wo.itemsLimit&&ft(),l.value=Lt;let Ee;const fn=We<=L&&ze>=w;if(!fn||H)Q();else for(let ke=0,st=pt.length;ke<st;ke++){const At=pt[ke];if(At&&(Ee=At,Ee.nr.used)){const Et=at?at.has(Ee.nr.index):Ee.nr.index>=We&&Ee.nr.index<ze,Vt=le||Ue[Ee.nr.index]&&Ue[Ee.nr.index].size;(!Et||!Vt)&&z(Ee)}}let Mt,qt;const Yt=Ye??Array.from({length:Math.max(0,ze-We)},(ke,st)=>We+st);for(const ke of Yt){if(!(le||Ue[ke]&&Ue[ke].size))continue;Mt=Ne[ke];const st=nt?Mt[nt]:ke;if(st==null)throw new Error(`Key is ${st} on item (keyField is '${nt}')`);if(Ee=lt.get(st),Ee)Ee.item!==Mt&&(Ee.item=Mt),Ee.nr.used||console.warn(`Expected existing view's used flag to be true, got ${Ee.nr.used}`);else{if(qt=Mt[je],Ee=C(qt),Ee){const At=Ee.nr.index!==ke||Ee.nr.key!==st;Ee.item=Mt,Ee.nr.index=ke,Ee.nr.key=st,Ee.nr.type!==qt&&console.warn("Reused view's type does not match pool's type"),At&&Hn(Ee)}else Ee=O(pt,ke,Mt,st,qt);lt.set(st,Ee)}le===null?(Ee.position=((te=Ue[ke-1])==null?void 0:te.accumulator)||0,Ee.offset=0):(Ee.position=Math.floor(ke/ce)*le,Ee.offset=ke%ce*Te)}return w=We,L=ze,se.emitUpdate&&((ae=e==null?void 0:e.onUpdate)==null||ae.call(e,We,ze,kt,yt)),K&&clearTimeout(K),K=setTimeout(Ft,se.updateInterval+300),{continuous:fn}}function ft(){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:",ye(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(Pe())return!1;const H=t.value.filter(({nr:V})=>V.used);for(let V=1;V<H.length;V++)if(H[V].nr.index!==H[V-1].nr.index+1)return!0;return!1}function Ft(){t.value.sort((H,V)=>H.nr.index-V.nr.index),Ct()&&(ue(!1),K&&clearTimeout(K))}function et(H,V){const te=ye(n),ae=ye(f);if(!ae)return;const se=Math.max(0,Math.min(H,te.items.length-1)),le=ve().start,ce=Ko(ae,te.direction,te.pageMode),Te=qe(se),tt=Fe(se),je=pi(Te,tt,le,ce,V==null?void 0:V.align,(V==null?void 0:V.offset)??0);if(je!=null&&(rt(je,V),te.gridItems&&te.itemSize!=null)){const nt=ye(f);if(!nt)return;const Ne=te.gridItems,be=te.itemSecondarySize||te.itemSize,Ue=se%Ne*be,lt=te.direction==="vertical"?"horizontal":"vertical",pt=lt==="horizontal"?Gt(nt.scrollLeft,"horizontal",nt):nt.scrollTop,Ye=lt==="horizontal"?nt.clientWidth:nt.clientHeight,at=pi(Ue,be,pt,Ye,V==null?void 0:V.align,(V==null?void 0:V.offset)??0);at!=null&&zn(nt,lt,at,V)}}function rt(H,V){const te=ye(n),ae=ye(f);if(ae)if(te.pageMode){const se=kn(ae),le=se.getBoundingClientRect(),ce=ae.getBoundingClientRect(),Te=te.direction==="vertical"?"top":"left",tt=kn(ae)===document.documentElement||kn(ae)===document.body?te.direction==="vertical"?window.scrollY:window.scrollX:Gt(te.direction==="vertical"?se.scrollTop:se.scrollLeft,te.direction,se),je=ce[Te]-le[Te];zn(se.tagName==="HTML"?window:se,te.direction,H+tt+je,V)}else zn(ae,te.direction,H,V)}const we=ye(n);return q=bn(we.items,we.items.length>0&&typeof we.items[0]!="object"?null:we.keyField),we.cache&&m(we.cache),we.prerender&&(R=!0,ue(!1)),we.gridItems&&!we.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems"),cn(()=>{Ve(),wt(()=>{R=!1,ue(!0),u.value=!0})}),go(()=>{const H=d;typeof H=="number"&&wt(()=>{rt(H)})}),Gn(()=>{X(),ne(),Le()}),_t(()=>ye(n).cache,H=>{m(H),ue(!0)}),_t(()=>ye(n).items,(H,V)=>{const te=ye(n),ae=S.value?null:te.keyField,se=bn(H,ae);if(te.shift){const le=V?bn(V,ae):q;Vo(le,se)>0?De(V??[],ae):_e()}else _e();q=se,Se(H),ue(!0)}),_t(()=>ye(n).pageMode,()=>{Ve(),ue(!1)}),_t(A,()=>{Se()&&Oe(),ue(!1)},{deep:!0}),_t(()=>ye(n).gridItems,()=>{ue(!0)}),_t(()=>ye(n).itemSecondarySize,()=>{ue(!0)}),{pool:t,visiblePool:I,totalSize:l,ready:u,sizes:A,simpleArray:S,scrollToItem:et,scrollToPosition:rt,getScroll:ve,findItemIndex:Je,getItemOffset:qe,getItemSize:Fe,cacheSnapshot:$,restoreCache:m,updateVisibleItems:ue,handleScroll:re,handleResize:j,handleVisibilityChange:Re,sortViews:Ft}}const Yn=new WeakMap;function ia(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 yi(n,f){$i(n);const D=ia(f.value);if(Yn.set(n,D),typeof IntersectionObserver>"u"){const r=n.getBoundingClientRect();D.visible=!0,D.callback(!0,{boundingClientRect:r});return}D.observer=new IntersectionObserver(r=>{const e=r[0],t=!!(e!=null&&e.isIntersecting);D.visible!==null&&D.visible===t||(D.visible=t,D.callback(t,e))},D.intersection),D.observer.observe(n)}function $i(n){const f=Yn.get(n);f!=null&&f.observer&&(f.observer.disconnect(),f.observer=null)}const oa={mounted(n,f){yi(n,f)},updated(n,f){f.value!==f.oldValue&&yi(n,f)},unmounted(n){$i(n),Yn.delete(n)}},aa=Bt({__name:"ItemView",props:{view:{},itemTag:{}},setup(n){const f=n;return(D,r)=>(W(),Me(bi(f.itemTag),{class:"vue-recycle-scroller__item-view"},{default:It(()=>[Pt(D.$slots,"default",{item:f.view.item,index:f.view.nr.index,active:f.view.nr.used})]),_:3}))}}),sa=Bt({__name:"ResizeObserver",emits:["notify"],setup(n,{emit:f}){const D=f,r=ge();let e=null,t=null;function l(){D("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)}}),Gn(()=>{e&&(e.disconnect(),e=null),t&&(window.removeEventListener("resize",t),t=null)}),(u,w)=>(W(),ee("div",{ref_key:"el",ref:r,class:"vue-recycle-scroller__resize-observer","aria-hidden":"true"},null,512))}}),ra=(n,f)=>{const D=n.__vccOpts||n;for(const[r,e]of f)D[r]=e;return D},la=ra(sa,[["__scopeId","data-v-08cc04ab"]]),ua=Bt({__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:D}){const r=n,e=D,t=oa,l=ge(),u=ge(),w=ge(),L=ge(null),i=na(r,l,u,w,{onResize:()=>e("resize"),onVisible:()=>e("visible"),onHidden:()=>e("hidden"),onUpdate:(I,$,m,h)=>{e("update",I,$,m,h),m<=0&&e("scrollStart"),h>=r.items.length-1&&e("scrollEnd")}}),{pool:a,visiblePool:o,totalSize:d,ready:v,scrollToItem:R,scrollToPosition:k,getScroll:T,findItemIndex:K,getItemOffset:P,getItemSize:x,cacheSnapshot:q,restoreCache:M,updateVisibleItems:N,handleScroll:y,handleResize:p,handleVisibilityChange:F}=i;function _(I){L.value=I}function S(){L.value=null}const A=Ut(()=>{const I={[r.direction==="vertical"?"minHeight":"minWidth"]:`${d.value}px`};if(r.gridItems&&r.itemSize!=null){const $=(r.itemSecondarySize||r.itemSize)*r.gridItems;I[r.direction==="vertical"?"minWidth":"minHeight"]=`${$}px`}return I});return f({el:l,visiblePool:o,scrollToItem:R,scrollToPosition:k,getScroll:T,findItemIndex:K,getItemOffset:P,getItemSize:x,cacheSnapshot:q,restoreCache:M,updateVisibleItems:N}),(I,$)=>Ce((W(),ee("div",{ref_key:"el",ref:l,class:gt(["vue-recycle-scroller",{"grid-mode":r.gridItems,ready:B(v),"page-mode":r.pageMode,[`direction-${r.direction}`]:!0}]),onScrollPassive:$[0]||($[0]=(...m)=>B(y)&&B(y)(...m))},[I.$slots.before?(W(),ee("div",{key:0,ref_key:"before",ref:u,class:"vue-recycle-scroller__slot"},[Pt(I.$slots,"before")],512)):me("",!0),(W(),Me(bi(r.listTag),{style:In(A.value),class:gt(["vue-recycle-scroller__item-wrapper",r.listClass])},{default:It(()=>[(W(!0),ee(Ie,null,vt(B(a),m=>(W(),Me(aa,ci({key:m.nr.id,view:m,"item-tag":r.itemTag,style:B(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&&L.value===m.nr.key}]]},mo(r.skipHover?{}:{mouseenter:()=>{_(m.nr.key)},mouseleave:()=>{S()}})),{default:It(h=>[Pt(I.$slots,"default",ci({ref_for:!0},h))]),_:2},1040,["view","item-tag","style","class"]))),128)),r.items.length===0?Pt(I.$slots,"empty",{key:0}):me("",!0)]),_:3},8,["style","class"])),I.$slots.after?(W(),ee("div",{key:1,ref_key:"after",ref:w,class:"vue-recycle-scroller__slot"},[Pt(I.$slots,"after")],512)):me("",!0),ie(la,{onNotify:B(p)},null,8,["onNotify"])],34)),[[B(t),B(F)]])}}),ca={key:0,class:"chat-info-pan"},fa={class:"ss-card chat-info"},da={key:0},ha={key:1},ma={class:"chat-info-base user"},ga=["src"],va={key:0},pa={class:"info-copy"},ya={class:"info-copy"},wa={class:"info-copy"},ba={style:{"word-break":"break-all"}},ka={key:1},Ia=["innerHTML"],_a={class:"tags"},Sa={key:2},Ca={class:"info-copy"},Ma={class:"info-copy"},Aa={class:"info-copy"},Ta={style:{"word-break":"break-all"}},Ea={class:"info-copy"},xa=["name"],Fa={class:"search-view"},La={for:"info-member-search",class:"sr-only"},$a=["placeholder"],Ra={class:"member-item edit"},Da=["src"],Ba=["onClick"],Oa=["onClick"],Ua=["src"],za={class:"opt-item"},Na={for:"info-member-card"},Ha={key:0,class:"opt-item"},Pa={for:"info-member-title"},ja={class:"opt-item"},qa={for:"info-member-ban-min"},Va=Bt({name:"ViewInfo",__name:"Info",props:{tags:{},chat:{}},emits:["close"],setup(n,{emit:f}){const D=En(),r=ki(),e=xn(),t=Ii(),l=n,u=f,{t:w}=Fn.global;function L(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||String(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||String(l.chat.show.id))}const o=ge([]),d=ge(""),v=ge({}),R=ge({});function k(O){return typeof O!="object"||O===null?{}:O}function T(O){return String(k(O).user_id??"")}function K(O){const C=k(O);return String(C.card||C.nickname||C.name||T(O))}function P(O){return String(k(O).avatar??"")}function x(O){return String(k(O).role??"")}const q=ge({banMin:0});function M(O,C,z){const Q={title:w("提醒"),html:`<span>${w("真的要将 {user} 移出群聊吗",{user:O})}</span>`,button:[{text:w("确定"),fun:()=>{it.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),fi(1e3).then(()=>(di(String(e.chatInfo.show.id)),fi(1e3))).then(()=>{di(String(e.chatInfo.show.id)),t.popBoxList.shift()})}},{text:w("取消"),master:!0,fun:()=>{t.popBoxList.shift()}}]};t.popBoxList.push(Q)}function N(O){const C=new ut;Jt.config.globalProperties.$copyText(String(O)).then(()=>{C.add(Be.INFO,w("复制成功"),!0)},()=>{C.add(Be.ERR,w("复制失败"),!0)})}function y(O,C){const z=O.target.value;if(z!==""){const Q=parseInt(z);if(Q>0){const Y={title:w("操作"),html:`<span>${w("确认禁言?")}</span>`,button:[{text:w("确认"),fun:()=>{var X;const ne=(X=D.jsonMap.ban_mumber)==null?void 0:X.name;ne&&it.send(ne,{group_id:e.chatInfo.show.id,user_id:C.user_id,duration:Q*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 Q={title:w("操作"),html:`<span>${w("确认修改昵称?")}</span>`,button:[{text:w("确认"),fun:()=>{var ne;const Y=(ne=D.jsonMap.set_group_nickname)==null?void 0:ne.name;Y&&it.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(Q)}}function F(O,C){const z=O.target.value;if(v.value.card!==z){const Q={title:w("操作"),html:`<span>${w("确认修改头衔?")}</span>`,button:[{text:w("确认"),fun:()=>{var ne;const Y=(ne=D.jsonMap.set_group_title)==null?void 0:ne.name;Y&&it.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(Q)}}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!=D.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),wt(()=>{if(C){const z=document.getElementById("user-"+C.user_id);z&&z.click()}})}}function $(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(),Q=Array.isArray(l.chat.info.group_members)?l.chat.info.group_members:[];o.value=Si(Q).filter(Y=>{const ne=K(Y).toLowerCase(),X=T(Y);return ne.includes(z)||X.includes(C)||X.toLowerCase().includes(z)})}_t(()=>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?(W(),ee("div",ca,[g("div",fa,[g("header",null,[n.chat.show.type==="group"?(W(),ee("span",da,G(B(w)("群资料")),1)):me("",!0),n.chat.show.type==="user"?(W(),ee("span",ha,G(B(w)("好友")),1)):me("",!0),ie(z,{icon:["fas","xmark"],onClick:A})]),g("div",ma,[g("div",null,[g("img",{"data-avatar":"",src:n.chat.show.avatar||"/img/icons/icon.svg",onError:C[0]||(C[0]=(...Q)=>B(Sn)&&B(Sn)(...Q))},null,40,ga),g("div",null,[g("a",null,G(n.chat.show.name),1),g("span",null,G(n.chat.show.id),1)]),g("div",{style:{display:"flex","align-items":"center","justify-content":"center",cursor:"pointer"},onClick:C[1]||(C[1]=Q=>N(n.chat.show.id))},[ie(z,{icon:["fas","copy"]})])]),n.chat.show.type==="group"?(W(),ee("div",va,[g("header",null,[g("span",null,G(B(w)("群组 ID")),1)]),g("div",pa,[g("span",null,G(n.chat.show.id),1),ie(z,{icon:["fas","copy"],onClick:C[2]||(C[2]=Q=>N(n.chat.show.id))})]),g("header",null,[g("span",null,G(B(w)("频道 ID")),1)]),g("div",ya,[g("span",null,G(a()),1),ie(z,{icon:["fas","copy"],onClick:C[3]||(C[3]=Q=>N(a()))})]),g("header",null,[g("span",null,G(B(w)("群头像")),1)]),g("div",wa,[g("span",ba,G(L(n.chat.show.avatar)?B(w)("无"):n.chat.show.avatar),1),L(n.chat.show.avatar)?me("",!0):(W(),Me(z,{key:0,icon:["fas","copy"],onClick:C[4]||(C[4]=Q=>N(n.chat.show.avatar))}))])])):me("",!0),n.chat.show.type==="group"?Ce((W(),ee("div",ka,[g("header",null,[g("span",null,G(B(w)("介绍")),1)]),g("span",{innerHTML:n.chat.info.group_info.gIntro===void 0||n.chat.info.group_info.gIntro===""?B(w)("群主很懒,还没有群介绍哦~"):n.chat.info.group_info.gIntro},null,8,Ia),g("div",_a,[(W(!0),ee(Ie,null,vt(n.chat.info.group_info.tags,Q=>(W(),ee("div",{key:Q.md},G(Q.tag),1))),128))])],512)),[[Ke,Object.keys(n.chat.info.group_info).length>0]]):n.chat.show.type==="user"?(W(),ee("div",Sa,[g("header",null,[g("span",null,G(B(w)("用户 ID")),1)]),g("div",Ca,[g("span",null,G(n.chat.show.id),1),ie(z,{icon:["fas","copy"],onClick:C[5]||(C[5]=Q=>N(n.chat.show.id))})]),g("header",null,[g("span",null,G(B(w)("用户名称")),1)]),g("div",Ma,[g("span",null,G(n.chat.show.name),1),ie(z,{icon:["fas","copy"],onClick:C[6]||(C[6]=Q=>N(n.chat.show.name))})]),g("header",null,[g("span",null,G(B(w)("用户头像链接")),1)]),g("div",Aa,[g("span",Ta,G(L(n.chat.show.avatar)?B(w)("无"):n.chat.show.avatar),1),L(n.chat.show.avatar)?me("",!0):(W(),Me(z,{key:0,icon:["fas","copy"],onClick:C[7]||(C[7]=Q=>N(n.chat.show.avatar))}))]),g("header",null,[g("span",null,G(B(w)("频道 ID")),1)]),g("div",Ea,[g("span",null,G(i()),1),ie(z,{icon:["fas","copy"],onClick:C[8]||(C[8]=Q=>N(i()))})])])):me("",!0)]),n.chat.show.type==="group"?(W(),Me(B(_i),{key:0,class:"chat-info-tab"},{default:It(()=>[g("div",{name:B(w)("成员")},[g("div",Fa,[g("label",La,G(B(w)("搜索成员")),1),g("input",{id:"info-member-search",placeholder:B(w)("搜索 ……"),onInput:C[9]||(C[9]=Q=>m(Q))},null,40,$a)]),ie(B(ua),{class:"member-scroller",items:d.value.trim()?o.value:n.chat.info.group_members,"item-size":60,"key-field":"user_id"},{default:It(({item:Q})=>[g("div",Ra,[g("img",{alt:"nk",loading:"lazy","data-avatar":"",src:P(Q)||"/img/icons/icon.svg"},null,8,Da),g("div",null,[g("a",{onClick:Y=>I(Q)},G(K(Q)),9,Ba),x(Q)==="owner"?(W(),Me(z,{key:0,icon:["fas","crown"]})):me("",!0),x(Q)==="admin"?(W(),Me(z,{key:1,icon:["fas","star"]})):me("",!0)]),g("span",{onClick:Y=>$(Q)},G(T(Q)),9,Oa),h(x(Q))?(W(),Me(z,{key:0,icon:["fas","wrench"],onClick:Y=>$(Q)},null,8,["onClick"])):(W(),Me(z,{key:1,icon:["fas","copy"],onClick:Y=>N(T(Q))},null,8,["onClick"]))])]),_:1},8,["items"])],8,xa)]),_:1})):me("",!0),g("div",{class:gt("ss-card user-config"+(Object.keys(v.value).length>0?" show":""))},[g("div",null,[g("img",{alt:"nk","data-avatar":"",src:v.value.avatar||"/img/icons/icon.svg"},null,8,Ua),g("div",null,[g("a",null,G(v.value.card!=""?v.value.card:v.value.nickname),1),g("span",null,G(v.value.user_id),1)]),ie(z,{style:{"margin-right":"20px"},icon:["fas","copy"],onClick:C[10]||(C[10]=Q=>N(v.value.user_id))}),ie(z,{icon:["fas","angle-down"],onClick:C[11]||(C[11]=Q=>v.value={})})]),g("div",null,[g("header",null,G(B(w)("成员信息")),1),g("div",za,[ie(z,{icon:["fas","clipboard-list"]}),g("div",null,[g("label",Na,G(B(w)("成员昵称")),1),g("span",null,G(B(w)("啊吧啊吧……")),1)]),Ce(g("input",{id:"info-member-card","onUpdate:modelValue":C[12]||(C[12]=Q=>R.value.card=Q),style:{width:"50%"},class:"ss-input",type:"text",onChange:C[13]||(C[13]=Q=>p(Q,v.value))},null,544),[[un,R.value.card]])]),n.chat.info.me_info.role==="owner"?(W(),ee("div",Ha,[ie(z,{icon:["fas","clipboard-list"]}),g("div",null,[g("label",Pa,G(B(w)("成员头衔")),1),g("span",null,G(B(w)("猪咪猪咪")),1)]),Ce(g("input",{id:"info-member-title","onUpdate:modelValue":C[14]||(C[14]=Q=>R.value.title=Q),style:{width:"50%"},class:"ss-input",type:"text",onChange:C[15]||(C[15]=Q=>F(Q,v.value))},null,544),[[un,R.value.title]])])):me("",!0),n.chat.info.me_info.role==="owner"&&v.value.role!="owner"||n.chat.info.me_info.role==="admin"&&v.value.role==="member"?(W(),ee(Ie,{key:1},[g("header",null,G(B(w)("操作")),1),g("div",ja,[ie(z,{icon:["fas","clipboard-list"]}),g("div",null,[g("label",qa,G(B(w)("禁言成员")),1),g("span",null,G(B(w)("要让小猫咪不许说话几分钟呢?")),1)]),Ce(g("input",{id:"info-member-ban-min","onUpdate:modelValue":C[16]||(C[16]=Q=>q.value.banMin=Q),style:{width:"50%"},class:"ss-input",type:"text",onInput:S,onChange:C[17]||(C[17]=Q=>y(Q,v.value))},null,544),[[un,q.value.banMin]])]),g("button",{class:"ss-button",onClick:C[18]||(C[18]=Q=>M(v.value.nickname,n.chat.show.id,v.value.user_id))},G(B(w)("移出群聊")),1)],64)):me("",!0)])],2)])])):me("",!0)}}}),Wa=$n(Va,[["__scopeId","data-v-317c0ff8"]]),Qa=["id"],Ga={key:0,class:"note-recall note-base"},Ka={key:1,class:"note-ban note-base"},Ja={key:1},Ya={key:2,class:"note-recall note-base"},Xa=["innerHTML"],Za={key:4,class:"note-time note-base"},Ht=Bt({name:"NoticeBody",__name:"NoticeBody",props:["data","id"],emits:["reedit"],setup(n){const f=Fn.global.t,D=En(),r=xn(),e=n,t=Ci(),l=ge(e.data);function u(i){return D.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 L(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 bt.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");bt.isDesktop()&&(o=(a=document.getElementById("notice-"+e.id))==null?void 0:a.getElementsByClassName("space")[0]),po(o,i)}}),(i,a)=>(W(),ee("div",{id:"notice-"+n.id,class:"note"},[n.data.notice_type&&n.data.notice_type.indexOf("recall")>=0?(W(),ee("div",Ga,[g("a",null,G(l.value.name),1),g("span",null,G(B(f)("撤回了一条消息")),1),a[1]||(a[1]=g("div",null,null,-1)),n.data.originMsg?(W(),ee("a",{key:0,onClick:a[0]||(a[0]=o=>i.$emit("reedit",n.data.originMsg))},G(B(f)("重新编辑")),1)):me("",!0)])):n.data.notice_type=="group_ban"?(W(),ee("div",Ka,[n.data.sub_type==="ban"?(W(),ee(Ie,{key:0},[u(n.data.user_id)?(W(),ee(Ie,{key:0},[g("span",null,G(B(f)("成员类型_admin")),1),g("a",null," "+G(w(n.data.operator_id))+" ",1),g("span",null,G(B(f)("禁言了你")),1),g("span",null," "+G(L(n.data.duration)),1)],64)):(W(),ee(Ie,{key:1},[g("span",null,G(B(f)("管理员禁言了")),1),g("a",null," "+G(w(n.data.user_id))+" ",1),g("span",null,G(L(n.data.duration)),1)],64))],64)):(W(),ee("span",Ja,G(B(f)("管理员解除了 {name} 的禁言",{name:u(n.data.user_id)?B(f)("你"):w(n.data.user_id)})),1))])):n.data.sub_type==="delete"?(W(),ee("div",Ya,[g("span",null,G(B(f)("这条消息迷失在虚空里了")),1),a[2]||(a[2]=g("div",null,null,-1))])):n.data.sub_type==="poke"?(W(),ee("div",{key:3,class:"note-notify note-base",innerHTML:n.data.str+"<div class='space'</div>"},null,8,Xa)):n.data.sub_type==="time"&&n.data.time!=null?(W(),ee("div",Za,[g("a",null,G(Intl.DateTimeFormat(B(t),B(Mi)(new Date(n.data.time*1e3))).format(new Date(n.data.time*1e3))),1)])):me("",!0)],8,Qa))}}),es=["src","alt"],ts=Bt({__name:"CustomFaceTooltip",props:{url:{}},setup(n){return(f,D)=>(W(),ee("img",{src:n.url,alt:f.$t("预览图片加载失败"),class:"custom-face-tooltip"},null,8,es))}}),ns=$n(ts,[["__scopeId","data-v-28512f0d"]]),is={class:"ss-card face-pan"},os={icon:"fa-solid fa-face-laugh-squint"},as={class:"system-face-bar"},ss={class:"title"},rs={class:"face"},ls={class:"title"},us={class:"face"},cs={icon:"fa-solid fa-heart"},fs={class:"title"},ds={class:"face"},hs=["src","alt","onClick"],ms={class:"title"},gs={class:"face"},vs={key:0,class:"ss-card"},ps=["src","alt","onClick"],ys={key:0,icon:"fa-solid fa-folder-open"},ws={class:"system-face-bar custom-face-bar"},bs={class:"title"},ks={class:"face"},Is=["src","alt","onClick"],_s={class:"title"},Ss={class:"face"},Cs={key:0,class:"ss-card"},Ms={key:1,class:"ss-card"},As=["src","alt","onClick"],Ts=Bt({__name:"FacePan",emits:["addSpecialMsg","sendMsg"],setup(n,{emit:f}){const{recordList:D,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=Ut(()=>{const _=[];for(const S of u.value){const A=v.value.find(I=>I.path===S);A&&_.push(A)}return _}),L=new ut,i=yo(),a=Kn(),o=En(),d=hi(1),v=hi([]),R=f;i.stickerCache&&i.stickerCache.length==0&&o.jsonMap.roaming_stamp&&K(),bt.isDesktop()&&a.sysConfig.local_emoji_folder&&M();function k(_,S){R("addSpecialMsg",{addText:S,msgObj:_})}function T(_){p(D,_),_<5e3?k({type:"face",id:_},!0):k({type:"text",text:rn.get(_).value},!0)}function K(){i.stickerCache=void 0,o.jsonMap.roaming_stamp.pagerType=="full"?it.send(o.jsonMap.roaming_stamp.name,{count:48},"getRoamingStamp_48"):it.send(o.jsonMap.roaming_stamp.name,{},"getRoamingStamp")}function P(_){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;it.send(o.jsonMap.roaming_stamp.name,{count:A},"getRoamingStamp_"+A),d.value++}}function x(_){p(e,_),k({type:"image",file:_,subType:1},!0),a.sysConfig.send_face==!0&&R("sendMsg")}async function q(){const{$t:_}=Jt.config.globalProperties;try{const S=await bt.call(void 0,"sys:selectFolder",!0);S&&(Ti.save("local_emoji_folder",S),L.add(Be.INFO,_("已设置本地表情文件夹")),M())}catch{L.add(Be.ERR,_("选择文件夹失败"))}}async function M(){try{const _=a.sysConfig.local_emoji_folder;if(!_){v.value=[];return}const S=await bt.call(void 0,"sys:getLocalEmojis",!0,_);if(S&&Array.isArray(S))if(bt.type==="tauri"){const{convertFileSrc:A}=await Ai(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 bt.call(void 0,"sys:readFileAsBase64",!0,_.path);p(l,_.path),k({type:"image",file:"base64://"+S,subType:1},!0),a.sysConfig.send_face==!0&&R("sendMsg")}catch{const{$t:A}=Jt.config.globalProperties;L.add(Be.ERR,A("添加本地表情失败"))}}function y(_){const S=wo(_,[]),A=Ut(()=>{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 $ of S.value)I.set($,(I.get($)||0)+1);return Array.from(I.entries()).sort(($,m)=>m[1]-$[1]).map($=>$[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 $=I.indexOf(S);$!==-1&&I.splice($,1)}I.unshift(S),I.length>A&&I.pop(),_.value=I}function F(_){return{comp:ns,model:void 0,props:{url:_}}}return(_,S)=>{const A=Ln("font-awesome-icon");return W(),ee("div",is,[ie(B(_i),null,{default:It(()=>[g("div",os,[g("div",as,[B(r).length>0?(W(),ee(Ie,{key:0},[g("div",ss,[g("span",null,G(_.$t("最近使用")),1)]),g("div",rs,[(W(!0),ee(Ie,null,vt(B(r),I=>(W(),ee("div",{key:I},[ie(Wn,{emoji:B(rn).get(I),onClick:$=>T(I)},null,8,["emoji","onClick"])]))),128))])],64)):me("",!0),g("div",ls,[g("span",null,G(_.$t("emoji 表情")),1)]),g("div",us,[(W(!0),ee(Ie,null,vt(B(rn).emojiList,I=>(W(),ee("div",{key:I},[ie(Wn,{emoji:B(rn).get(I),onClick:$=>T(I)},null,8,["emoji","onClick"])]))),128))])])]),g("div",cs,[g("div",{class:"system-face-bar custom-face-bar",onScroll:P},[B(t).length>0?(W(),ee(Ie,{key:0},[g("div",fs,[g("span",null,G(_.$t("最近使用")),1)]),g("div",ds,[(W(!0),ee(Ie,null,vt(B(t),(I,$)=>Ce((W(),ee("span",{key:$},[g("img",{loading:"lazy",src:I,alt:"["+_.$t("动画表情")+"]",onClick:m=>x(I)},null,8,hs)])),[[B(gn),F(I)]])),128))])],64)):me("",!0),g("div",ms,[g("span",null,G(_.$t("收藏的表情")),1),ie(A,{icon:["fas","fa-rotate-right"],onClick:K})]),g("div",gs,[B(i).stickerCache&&B(i).stickerCache.length<=0?(W(),ee("div",vs,[ie(A,{icon:["fas","face-dizzy"]}),g("span",null,G(_.$t("一无所有")),1)])):B(i).stickerCache&&B(i).stickerCache.length>0?(W(!0),ee(Ie,{key:1},vt(B(i).stickerCache,(I,$)=>(W(),ee("span",{key:"stickers-"+$},[Ce(g("img",{loading:"lazy",src:I,alt:"["+_.$t("动画表情")+"]",onClick:m=>x(I)},null,8,ps),[[Ke,I!="end"],[B(gn),F(I)]])]))),128)):me("",!0)])],32)]),B(bt).isDesktop()?(W(),ee("div",ys,[g("div",ws,[w.value.length>0?(W(),ee(Ie,{key:0},[g("div",bs,[g("span",null,G(_.$t("最近使用")),1)]),g("div",ks,[(W(!0),ee(Ie,null,vt(w.value,(I,$)=>(W(),ee("span",{key:$},[Ce(g("img",{loading:"lazy",src:I.url,alt:"["+_.$t("动画表情")+"]",onClick:m=>N(I)},null,8,Is),[[B(gn),F(I.url)]])]))),128))])],64)):me("",!0),g("div",_s,[g("span",null,G(_.$t("本地表情")),1),ie(A,{icon:["fas","fa-folder-plus"],title:_.$t("选择文件夹"),onClick:q},null,8,["title"]),B(a).sysConfig.local_emoji_folder?(W(),Me(A,{key:0,icon:["fas","fa-rotate-right"],title:_.$t("重新加载"),onClick:M},null,8,["title"])):me("",!0)]),g("div",Ss,[B(a).sysConfig.local_emoji_folder?B(a).sysConfig.local_emoji_folder&&v.value.length<=0?(W(),ee("div",Ms,[ie(A,{icon:["fas","face-dizzy"]}),g("span",null,G(_.$t("暂无图片")),1)])):B(a).sysConfig.local_emoji_folder&&v.value.length>0?(W(!0),ee(Ie,{key:2},vt(v.value,(I,$)=>(W(),ee("span",{key:$},[Ce(g("img",{loading:"lazy",src:I.url,alt:"["+_.$t("动画表情")+"]",onClick:m=>N(I)},null,8,As),[[B(gn),F(I.url)]])]))),128)):me("",!0):(W(),ee("div",Cs,[ie(A,{icon:["fas","folder-open"]}),g("span",null,G(_.$t("选择文件夹")),1)]))])])])):me("",!0)]),_:1})])}}}),Es={class:"ss-card"},xs={key:0},Fs=Bt({name:"MergePan",__name:"MergePan",setup(n,{expose:f}){const D=Fn.global.t,r=xn(),e=Kn(),t=r.mergeMsgStack,l=ge(),u=Ut(()=>{var a;return Vn.fromList((((a=l.value)==null?void 0:a.imageList)??[]).map(o=>o.img_url))});function w(){t.length--}function L(){t.length=0}function i(){return t.length>0}return f({closeMergeMsg:L,isMergeOpen:i}),cn(()=>{_t(()=>r.mergeMsgStack.length,()=>{t.length===0?r.mergeMessageImgList=void 0:l.value=t.at(-1)}),_t(()=>{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 W(),ee("div",{class:gt("merge-pan"+(B(r).mergeMsgStack.length>0?" show":""))},[g("div",{onClick:L}),g("div",Es,[g("div",null,[ie(d,{style:{"margin-top":"5px"},icon:["fas","message"]}),g("span",null,G(B(D)("合并消息")),1),B(t).length<=1?(W(),Me(d,{key:0,icon:["fas","xmark"],onClick:w})):(W(),Me(d,{key:1,icon:["fas","angles-left"],onClick:w}))]),l.value===void 0?(W(),ee("div",xs)):(W(),Me(qn,{key:1,name:B(e).sysConfig.opt_fast_animation?"":"msglist",tag:"div"},{default:It(()=>[(W(!0),ee(Ie,null,vt(l.value.messageList,(v,R)=>(W(),ee(Ie,{key:"merge-"+l.value.forwardMsg.message[0].id+"-"+R},[B(jn)(l.value.messageList[R-1]?l.value.messageList[R-1].time:void 0,v.time,R==0)?(W(),Me(Ht,{id:B(Ei)(),key:"notice-time-"+R,data:{sub_type:"time",time:v.time}},null,8,["id","data"])):B(xi)(v)?(W(),Me(Ht,{key:"delete-"+v.message_id,data:{sub_type:"delete"}})):me("",!0),ie(ln,{data:v,type:"merge","image-list-header":u.value},null,8,["data","image-list-header"])],64))),128))]),_:1},8,["name"]))])],2)}}}),Ls=$n(Fs,[["__scopeId","data-v-5a030688"]]);function $s(n,f){return f.forEach((function(D){D&&typeof D!="string"&&!Array.isArray(D)&&Object.keys(D).forEach((function(r){if(r!=="default"&&!(r in n)){var e=Object.getOwnPropertyDescriptor(D,r);Object.defineProperty(n,r,e.get?e:{enumerable:!0,get:function(){return D[r]}})}}))})),Object.freeze(n)}function Ri(n,f){return new Promise((function(D,r){let e;return Rs(n).then((function(t){try{return e=t,D(new Blob([f.slice(0,2),e,f.slice(2)],{type:"image/jpeg"}))}catch(l){return r(l)}}),r)}))}const Rs=n=>new Promise(((f,D)=>{const r=new FileReader;r.addEventListener("load",(({target:{result:e}})=>{const t=new DataView(e);let l=0;if(t.getUint16(l)!==65496)return D("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=l+10;let i;switch(t.getUint16(L)){case 18761:i=!0;break;case 19789:i=!1;break;default:return D("TIFF header contains invalid endian")}if(t.getUint16(L+2,i)!==42)return D("TIFF header contains invalid version");const a=t.getUint32(L+4,i),o=L+a+2+12*t.getUint16(L+a,i);for(let d=L+a+2;d<o;d+=12)if(t.getUint16(d,i)==274){if(t.getUint16(d+2,i)!==3)return D("Orientation data type is invalid");if(t.getUint32(d+4,i)!==1)return D("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 Cn={},Ds={get exports(){return Cn},set exports(n){Cn=n}};(function(n){var f,D,r={};Ds.exports=r,r.parse=function(e,t){for(var l=r.bin.readUshort,u=r.bin.readUint,w=0,L={},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 k=u(i,w+=4),T=l(i,w+=4),K=l(i,w+2),P=l(i,w+4);w+=6;var x=u(i,w+=8);w+=4,w+=T+K+P,r._readLocal(i,x,L,d,k,t)}return L},r._readLocal=function(e,t,l,u,w,L){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)l[R]={size:w,csize:u};else{var k=new Uint8Array(e.buffer,t);if(o==0)l[R]=new Uint8Array(k.buffer.slice(t,t+u));else{if(o!=8)throw"unknown compression method: "+o;var T=new Uint8Array(w);r.inflateRaw(k,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,L={};for(var i in e){var a=!r._noNeed(i)&&!t,o=e[i],d=r.crc.crc(o,0,o.length);L[i]={cpr:a,usize:o.length,crc:d,file:a?r.deflateRaw(o):o}}for(var i in L)l+=L[i].file.length+30+46+2*r.bin.sizeUTF8(i);l+=22;var v=new Uint8Array(l),R=0,k=[];for(var i in L){var T=L[i];k.push(R),R=r._writeHeader(v,R,i,T,0)}var K=0,P=R;for(var i in L)T=L[i],k.push(R),R=r._writeHeader(v,R,i,T,1,k[K++]);var x=R-P;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,P),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,L){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,L),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,L=t,i=t+l;L<i;){for(var a=Math.min(L+5552,i);L<a;)w+=u+=e[L++];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="",L=0;L<l;L++)w+="%"+r.bin.pad(e[t+L].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,L=0;L<u;L++){var i=l.charCodeAt(L);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],L=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 k=L.lits,T=L.strt,K=L.prev,P=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){(P>14e3||x>26697)&&R-o>100&&(v<o&&(k[P]=o-v,P+=2,v=o),d=r.F._writeBlock(o==R-1||v==R?1:0,k,P,M,e,q,o-q,t,d),P=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,L.of0);L.lhst[257+A]++;var I=i(S,L.df0);L.dhst[I]++,M+=L.exb[A]+L.dxb[I],k[P]=_<<23|o-v,k[P+1]=S<<16|A<<8|I,P+=2,v=o+_}else L.lhst[e[o]]++;x++}}for(q==o&&e.length!=0||(v<o&&(k[P]=o-v,P+=2,v=o),d=r.F._writeBlock(1,k,P,M,e,q,o-q,t,d),P=0,x=0,P=x=M=0,q=o);(7&d)!=0;)d++;return d>>>3},r.F._bestMatch=function(e,t,l,u,w,L){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&&--L!=0&&a!=i;){if(d==0||e[t+d]==e[t+d-o]){var k=r.F._howLong(e,t,o);if(k>d){if(v=o,(d=k)>=w)break;o+2<k&&(k=o+2);for(var T=0,K=0;K<k-2;K++){var P=t-o+K+32768&32767,x=P-l[P]+32768&32767;x>T&&(T=x,a=P)}}}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,L,i,a,o){var d,v,R,k,T,K,P,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],k=d[2],T=d[3],K=d[4],P=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*P+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,L,i,a,o)}else{var I,$;if(A==1&&(I=M.fltree,$=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,k),r.F.revCodes(M.itree,k),I=M.ltree,$=M.dtree,y(a,o,T-257),y(a,o+=5,K-1),y(a,o+=5,P-4),o+=4;for(var m=0;m<P;m++)y(a,o+3*m,M.itree[1+(M.ordr[m]<<1)]);o+=3*P,o=r.F._codeTiny(x,M.itree,a,o),o=r.F._codeTiny(q,M.itree,a,o)}for(var h=L,O=0;O<l;O+=2){for(var C=t[O],z=C>>>23,Q=h+(8388607&C);h<Q;)o=r.F._writeLit(w[h++],I,a,o);if(z!=0){var Y=t[O+1],ne=Y>>16,X=Y>>8&255,j=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(j,$,a,o),ne-M.df0[j]),o+=M.dxb[j],h+=z}}o=r.F._writeLit(256,I,a,o)}return o},r.F._copyExact=function(e,t,l,u,w){var L=w>>>3;return u[L]=l,u[L+1]=l>>>8,u[L+2]=255-u[L],u[L+3]=255-u[L+1],L+=4,u.set(new Uint8Array(e.buffer,t,l),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),L=[],i=r.F._lenCodes(e.dtree,L),a=0;a<u.length;a+=2)e.ihst[u[a]]++;for(a=0;a<L.length;a+=2)e.ihst[L[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,L]},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 L=e[w],i=e[w+1];u=r.F._writeLit(L,t,l,u);var a=L==16?2:L==17?3:7;L>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],L=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&&L==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&&L==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,L=t.length,i=0;for(i=0;i<L;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],k=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=k!=T&&(K==a||u[k].f<u[K].f)?u[k++]:u[K++],R=k!=T&&(K==a||u[k].f<u[K].f)?u[k++]:u[K++],u[T++]={lit:-1,f:v.f+R.f,l:v,r:R};var P=r.F.setDepth(u[T-1],0);for(P>l&&(r.F.restrictDepth(o,l,P),P=l),i=0;i<a;i++)t[1+(o[i].lit<<1)]=o[i].d;return P},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,L=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,L+=w-(1<<l-i)}for(L>>>=l-t;L>0;)(i=e[u].d)<t?(e[u].d++,L-=1<<t-i-1):u++;for(;u>=0;u--)e[u].d==t&&L<0&&(e[u].d--,L++);L!=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,L=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 k,T,K=0,P=0,x=0,q=0,M=0,N=0,y=0,p=0,F=0;K==0;)if(K=w(e,F,1),P=w(e,F+1,2),F+=3,P!=0){if(R&&(t=r.F._check(t,p+(1<<17))),P==1&&(k=v.flmap,T=v.fdmap,N=511,y=31),P==2){x=L(e,F,5)+257,q=L(e,F+5,5)+1,M=L(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=L(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),k=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 $=u._copyOut(v.ttree,x,q,v.dtree);y=(1<<$)-1,a(v.ltree,I),o(v.ltree,I,k),a(v.dtree,$),o(v.dtree,$,T)}for(;;){var m=k[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)+L(e,F,7&C),F+=7&C}var z=T[d(e,F)&y];F+=15&z;var Q=z>>>4,Y=v.ddef[Q],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),j=e[X-4]|e[X-3]<<8;R&&(t=r.F._check(t,p+j)),t.set(new l(e.buffer,e.byteOffset+X,j),p),F=X+j<<3,p+=j}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,L){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)L[o]=v,o++;else{var R=0,k=0;v==16?(k=3+i(u,w,2),w+=2,R=L[o-1]):v==17?(k=3+i(u,w,3),w+=3):v==18&&(k=11+i(u,w,7),w+=7);for(var T=o+k;o<T;)L[o]=R,o++}}return w},r.F._copyOut=function(e,t,l,u){for(var w=0,L=0,i=u.length>>>1;L<l;){var a=e[L+t];u[L<<1]=0,u[1+(L<<1)]=a,a>w&&(w=a),L++}for(;L<i;)u[L<<1]=0,u[1+(L<<1)]=0,L++;return w},r.F.makeCodes=function(e,t){for(var l,u,w,L,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)(L=e[w+1])!=0&&(e[w]=v[L],v[L]++)},r.F.codes2map=function(e,t,l){for(var u=e.length,w=r.F.U.rev15,L=0;L<u;L+=2)if(e[L+1]!=0)for(var i=L>>1,a=e[L+1],o=i<<4|a,d=t-a,v=e[L]<<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 L=e[w]<<t-e[w+1];e[w]=l[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,D=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 D(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 D(286),dhst:new D(30),ihst:new D(19),lits:new D(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,L,i){for(;L--!=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 Bs=$s({__proto__:null,default:Cn},[Cn]);const Tt=(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),k=Math.ceil(a*R/8),T=new Uint8Array(4*v),K=new Uint32Array(T.buffer),{ctype:P}=d,{depth:x}=d,q=n.readUshort;if(P==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(P==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],Q=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]==Q&&(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)==Q&&(T[p+3]=0)}}else if(P==3){const C=d.tabs.PLTE,z=d.tabs.tRNS,Q=z?z.length:0;if(x==1)for(var F=0;F<o;F++){var _=F*k,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<Q?z[I]:255}}if(x==2)for(F=0;F<o;F++)for(_=F*k,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<Q?z[I]:255;if(x==4)for(F=0;F<o;F++)for(_=F*k,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<Q?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<Q?z[I]:255}}else if(P==4){if(x==8)for(M=0;M<v;M++){p=M<<2;var $=i[m=M<<1];T[p]=$,T[p+1]=$,T[p+2]=$,T[p+3]=i[m+1]}if(x==16)for(M=0;M<v;M++){var m;p=M<<2,$=i[m=M<<2],T[p]=$,T[p+1]=$,T[p+2]=$,T[p+3]=i[m+2]}}else if(P==0)for(y=d.tabs.tRNS?d.tabs.tRNS:-1,F=0;F<o;F++){const C=F*k,z=F*a;if(x==1)for(var h=0;h<a;h++){var O=($=255*(i[C+(h>>>3)]>>>7-(7&h)&1))==255*y?0:255;K[z+h]=O<<24|$<<16|$<<8|$}else if(x==2)for(h=0;h<a;h++)O=($=85*(i[C+(h>>>2)]>>>6-((3&h)<<1)&3))==85*y?0:255,K[z+h]=O<<24|$<<16|$<<8|$;else if(x==4)for(h=0;h<a;h++)O=($=17*(i[C+(h>>>1)]>>>4-((1&h)<<2)&15))==17*y?0:255,K[z+h]=O<<24|$<<16|$<<8|$;else if(x==8)for(h=0;h<a;h++)O=($=i[C+h])==y?0:255,K[z+h]=O<<24|$<<16|$<<8|$;else if(x==16)for(h=0;h<a;h++)$=i[C+(h<<1)],O=q(i,C+(h<<1))==y?0:255,K[z+h]=O<<24|$<<16|$<<8|$}return T}function D(i,a,o,d){const v=t(i),R=Math.ceil(o*v/8),k=new Uint8Array((R+1+i.interlace)*d);return a=i.tabs.CgBI?e(a,k):r(a,k),i.interlace==0?a=l(a,i,0,o,d):i.interlace==1&&(a=(function(K,P){const x=P.width,q=P.height,M=t(P),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 $=0;for(;$<7;){const h=A[$],O=I[$];let C=0,z=0,Q=_[$];for(;Q<q;)Q+=h,z++;let Y=S[$];for(;Y<x;)Y+=O,C++;const ne=Math.ceil(C*M/8);l(K,P,F,C,z);let X=0,j=_[$];for(;j<q;){let re=S[$],Re=F+X*ne<<3;for(;re<x;){var m;if(M==1&&(m=(m=K[Re>>3])>>7-(7&Re)&1,p[j*y+(re>>3)]|=m<<7-((7&re)<<0)),M==2&&(m=(m=K[Re>>3])>>6-(7&Re)&3,p[j*y+(re>>2)]|=m<<6-((3&re)<<1)),M==4&&(m=(m=K[Re>>3])>>4-(7&Re)&15,p[j*y+(re>>1)]|=m<<4-((1&re)<<2)),M>=8){const Ae=j*y+re*N;for(let fe=0;fe<N;fe++)p[Ae+fe]=K[(Re>>3)+fe]}Re+=M,re+=O}X++,j+=h}C*z!=0&&(F+=z*(1+ne)),$+=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,k=0,T=0,K=0,P=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,$=p.Z,m=p.m,h=o==null;for(h&&(o=new d(a.length>>>2<<5));k==0;)if(k=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,P=_(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+P,a,y,m.v);const z=p.V(m.v,0,K,m.C);q=(1<<z)-1;const Q=p.V(m.v,K,P,m.D);M=(1<<Q)-1,A(m.C,z),I(m.C,z,v),A(m.D,Q),I(m.D,Q,R)}for(;;){const C=v[$(a,y)&q];y+=15&C;const z=C>>>4;if(!(z>>>8))o[N++]=z;else{if(z==256)break;{let Q=N+z-254;if(z>264){const re=m.q[z-257];Q=N+(re>>>3)+_(a,y,7&re),y+=7&re}const Y=R[$(a,y)&M];y+=15&Y;const ne=Y>>>4,X=m.c[ne],j=(X>>>4)+F(a,y,15&X);for(y+=15&X;N<Q;)o[N]=o[N++-j],o[N]=o[N++-j],o[N]=o[N++-j],o[N]=o[N++-j];N=Q}}}}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,k){const T=i.H.e,K=i.H.Z;let P=0;for(;P<d;){const x=a[K(v,R)&o];R+=15&x;const q=x>>>4;if(q<=15)k[P]=q,P++;else{let M=0,N=0;q==16?(N=3+T(v,R,2),R+=2,M=k[P-1]):q==17?(N=3+T(v,R,3),R+=3):q==18&&(N=11+T(v,R,7),R+=7);const y=P+N;for(;P<y;)k[P]=M,P++}}return R},i.H.V=function(a,o,d,v){let R=0,k=0;const T=v.length>>>1;for(;k<d;){const K=a[k+o];v[k<<1]=0,v[1+(k<<1)]=K,K>R&&(R=K),k++}for(;k<T;)v[k<<1]=0,v[1+(k<<1)]=0,k++;return R},i.H.n=function(a,o){const d=i.H.m,v=a.length;let R,k,T,K;const P=d.j;for(var x=0;x<=o;x++)P[x]=0;for(x=1;x<v;x+=2)P[a[x]]++;const q=d.K;for(R=0,P[0]=0,k=1;k<=o;k++)R=R+P[k-1]<<1,q[k]=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 k=0;k<v;k+=2)if(a[k+1]!=0){const T=k>>1,K=a[k+1],P=T<<4|K,x=o-K;let q=a[k]<<x;const M=q+(1<<x);for(;q!=M;)d[R[q]>>>15-o]=P,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 k=a[R]<<o-a[R+1];a[R]=d[k]>>>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,k){for(;R--!=0;)v.push(0,k)}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 k=Math.ceil(d*R/8);let T,K;R=Math.ceil(R/8);let P=i[o],x=0;if(P>1&&(i[o]=[0,0,1][P-2]),P==3)for(x=R;x<k;x++)i[x+1]=i[x+1]+(i[x+1-R]>>>1)&255;for(let q=0;q<v;q++)if(T=o+q*k,K=T+q+1,P=i[K-1],x=0,P==0)for(;x<k;x++)i[T+x]=i[K+x];else if(P==1){for(;x<R;x++)i[T+x]=i[K+x];for(;x<k;x++)i[T+x]=i[K+x]+i[T+x-R]}else if(P==2)for(;x<k;x++)i[T+x]=i[K+x]+i[T+x-k];else if(P==3){for(;x<R;x++)i[T+x]=i[K+x]+(i[T+x-k]>>>1);for(;x<k;x++)i[T+x]=i[K+x]+(i[T+x-k]+i[T+x-R]>>>1)}else{for(;x<R;x++)i[T+x]=i[K+x]+u(0,i[T+x-k],0);for(;x<k;x++)i[T+x]=i[K+x]+u(i[T+x-R],i[T+x-k],i[T+x-R-k])}return i}function u(i,a,o){const d=i+a-o,v=d-i,R=d-a,k=d-o;return v*v<=R*R&&v*v<=k*k?i:R*R<=k*k?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 L(i,a,o,d,v,R,k,T,K){const P=Math.min(a,v),x=Math.min(o,R);let q=0,M=0;for(let $=0;$<x;$++)for(let m=0;m<P;m++)if(k>=0&&T>=0?(q=$*a+m<<2,M=(T+$)*v+k+m<<2):(q=(-T+$)*a-k+m<<2,M=$*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,k=v.readUint,T={tabs:{},frames:[]},K=new Uint8Array(o.length);let P,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 $=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+$);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<$;N++)K[x+N]=o[d+N];x+=$}else if(m=="acTL")T.tabs[m]={num_frames:k(o,d),num_plays:k(o,d+4)},P=new Uint8Array(o.length);else if(m=="fcTL"){q!=0&&((I=T.frames[T.frames.length-1]).data=D(T,P.slice(0,q),I.rect.width,I.rect.height),q=0);const h={x:k(o,d+12),y:k(o,d+16),width:k(o,d+4),height:k(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<$-4;N++)P[q+N]=o[d+N+4];q+=$-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+$-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),_=$-((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,$);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,$):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+=$,v.readUint(o,d),d+=4}var I;return q!=0&&((I=T.frames[T.frames.length-1]).data=D(T,P.slice(0,q),I.rect.width,I.rect.height)),T.data=D(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,k=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 P=0;P<R;P++)K[P]=k[P];if(q.blend==0?L(F,y,p,k,o,d,M,N,0):q.blend==1&&L(F,y,p,k,o,d,M,N,1),v.push(k.buffer.slice(0)),q.dispose!=0){if(q.dispose==1)L(T,y,p,k,o,d,M,N,0);else if(q.dispose==2)for(P=0;P<R;P++)k[P]=K[P]}}return v},_paeth:u,_copyTile:L,_bin:n}})();(function(){const{_copyTile:n}=Tt,{_bin:f}=Tt,D=Tt._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 $=_.length,m=[];for(var h=0;h<$;h++){const j=_[h];m.push([j>>>0&255,j>>>8&255,j>>>16&255,j>>>24&255])}for(h=0;h<$;h++){let j=4294967295;for(var O=0,C=0;C<$;C++){var z=l(m[h],m[C]);C!=h&&z<j&&(j=z,O=C)}}const Q=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 j=0;j<F;j++)for(let re=0;re<p;re++){var X;h=4*(j*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&j)+(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 Re=16777215;for(C=0;C<$;C++){const ve=l(X,m[C]);ve<Re&&(Re=ve,O=C)}const Ae=m[O],fe=[X[0]-Ae[0],X[1]-Ae[1],X[2]-Ae[2],X[3]-Ae[3]];I==1&&(re!=p-1&&e(fe,Y,h+4,7),j!=F-1&&(re!=0&&e(fe,Y,h+4*p-4,3),e(fe,Y,h+4*p,5),re!=p-1&&e(fe,Y,h+4*p+4,1))),A[h>>2]=O,Q[h>>2]=_[O]}}function w(y,p,F,_,S){S==null&&(S={});const{crc:A}=r,I=f.writeUint,$=f.writeUshort,m=f.writeASCII;let h=8;const O=y.frames.length>1;let C,z=!1,Q=33+(O?20:0);if(S.sRGB!=null&&(Q+=13),S.pHYs!=null&&(Q+=21),S.iCCP!=null&&(C=pako.deflate(S.iCCP),Q+=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);Q+=8+3*Y+4+(z?8+1*Y+4:0)}for(var X=0;X<y.frames.length;X++)O&&(Q+=38),Q+=(Ae=y.frames[X]).cimg.length+12,X!=0&&(Q+=4);Q+=12;const j=new Uint8Array(Q),re=[137,80,78,71,13,10,26,10];for(ne=0;ne<8;ne++)j[ne]=re[ne];if(I(j,h,13),h+=4,m(j,h,"IHDR"),h+=4,I(j,h,p),h+=4,I(j,h,F),h+=4,j[h]=y.depth,h++,j[h]=y.ctype,h++,j[h]=0,h++,j[h]=0,h++,j[h]=0,h++,I(j,h,A(j,h-17,17)),h+=4,S.sRGB!=null&&(I(j,h,1),h+=4,m(j,h,"sRGB"),h+=4,j[h]=S.sRGB,h++,I(j,h,A(j,h-5,5)),h+=4),S.iCCP!=null){const fe=13+C.length;I(j,h,fe),h+=4,m(j,h,"iCCP"),h+=4,m(j,h,"ICC profile"),h+=11,h+=2,j.set(C,h),h+=C.length,I(j,h,A(j,h-(fe+4),fe+4)),h+=4}if(S.pHYs!=null&&(I(j,h,9),h+=4,m(j,h,"pHYs"),h+=4,I(j,h,S.pHYs[0]),h+=4,I(j,h,S.pHYs[1]),h+=4,j[h]=S.pHYs[2],h++,I(j,h,A(j,h-13,13)),h+=4),O&&(I(j,h,8),h+=4,m(j,h,"acTL"),h+=4,I(j,h,y.frames.length),h+=4,I(j,h,S.loop!=null?S.loop:0),h+=4,I(j,h,A(j,h-12,12)),h+=4),y.ctype==3){for(I(j,h,3*(Y=y.plte.length)),h+=4,m(j,h,"PLTE"),h+=4,ne=0;ne<Y;ne++){const fe=3*ne,ve=y.plte[ne],xe=255&ve,Fe=ve>>>8&255,qe=ve>>>16&255;j[h+fe+0]=xe,j[h+fe+1]=Fe,j[h+fe+2]=qe}if(h+=3*Y,I(j,h,A(j,h-3*Y-4,3*Y+4)),h+=4,z){for(I(j,h,Y),h+=4,m(j,h,"tRNS"),h+=4,ne=0;ne<Y;ne++)j[h+ne]=y.plte[ne]>>>24&255;h+=Y,I(j,h,A(j,h-Y-4,Y+4)),h+=4}}let Re=0;for(X=0;X<y.frames.length;X++){var Ae=y.frames[X];O&&(I(j,h,26),h+=4,m(j,h,"fcTL"),h+=4,I(j,h,Re++),h+=4,I(j,h,Ae.rect.width),h+=4,I(j,h,Ae.rect.height),h+=4,I(j,h,Ae.rect.x),h+=4,I(j,h,Ae.rect.y),h+=4,$(j,h,_[X]),h+=2,$(j,h,1e3),h+=2,j[h]=Ae.dispose,h++,j[h]=Ae.blend,h++,I(j,h,A(j,h-30,30)),h+=4);const fe=Ae.cimg;I(j,h,(Y=fe.length)+(X==0?0:4)),h+=4;const ve=h;m(j,h,X==0?"IDAT":"fdAT"),h+=4,X!=0&&(I(j,h,Re++),h+=4),j.set(fe,h),h+=Y,I(j,h,A(j,ve,h-ve)),h+=4}return I(j,h,0),h+=4,m(j,h,"IEND"),h+=4,I(j,h,A(j,h-4,4)),h+=4,j.buffer}function L(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],$=S[2],m=S[3],h=S[4],O=S[5];let C=6,z=8,Q=255;for(var Y=0;Y<y.length;Y++){const Oe=new Uint8Array(y[Y]);for(var ne=Oe.length,X=0;X<ne;X+=4)Q&=Oe[X+3]}const j=Q!=255,re=(function(De,Se,Ve,ot,Le,ct){const Pe=[];for(var ue=0;ue<De.length;ue++){const we=new Uint8Array(De[ue]),H=new Uint32Array(we.buffer);var ft;let V=0,te=0,ae=Se,se=Ve,le=ot?1:0;if(ue!=0){const ce=ct||ot||ue==1||Pe[ue-2].dispose!=0?1:2;let Te=0,tt=1e9;for(let je=0;je<ce;je++){var Ct=new Uint8Array(De[ue-1-je]);const nt=new Uint32Array(De[ue-1-je]);let Ne=Se,be=Ve,Ue=-1,lt=-1;for(let Ye=0;Ye<Ve;Ye++)for(let at=0;at<Se;at++)H[et=Ye*Se+at]!=nt[et]&&(at<Ne&&(Ne=at),at>Ue&&(Ue=at),Ye<be&&(be=Ye),Ye>lt&&(lt=Ye));Ue==-1&&(Ne=be=Ue=lt=0),Le&&((1&Ne)==1&&Ne--,(1&be)==1&&be--);const pt=(Ue-Ne+1)*(lt-be+1);pt<tt&&(tt=pt,Te=je,V=Ne,te=be,ae=Ue-Ne+1,se=lt-be+1)}Ct=new Uint8Array(De[ue-1-Te]),Te==1&&(Pe[ue-1].dispose=2),ft=new Uint8Array(ae*se*4),n(Ct,Se,Ve,ft,ae,se,-V,-te,0),le=n(we,Se,Ve,ft,ae,se,-V,-te,3)?1:0,le==1?o(we,Se,Ve,ft,{x:V,y:te,width:ae,height:se}):n(we,Se,Ve,ft,ae,se,-V,-te,0)}else ft=we.slice(0);Pe.push({rect:{x:V,y:te,width:ae,height:se},img:ft,blend:le,dispose:0})}if(ot)for(ue=0;ue<Pe.length;ue++){if((rt=Pe[ue]).blend==1)continue;const we=rt.rect,H=Pe[ue-1].rect,V=Math.min(we.x,H.x),te=Math.min(we.y,H.y),ae={x:V,y:te,width:Math.max(we.x+we.width,H.x+H.width)-V,height:Math.max(we.y+we.height,H.y+H.height)-te};Pe[ue-1].dispose=1,ue-1!=0&&a(De,Se,Ve,Pe,ue-1,ae,Le),a(De,Se,Ve,Pe,ue,ae,Le)}let Ft=0;if(De.length!=1)for(var et=0;et<Pe.length;et++){var rt;Ft+=(rt=Pe[et]).rect.width*rt.rect.height}return Pe})(y,p,F,A,I,$),Re={},Ae=[],fe=[];if(_!=0){const Oe=[];for(X=0;X<re.length;X++)Oe.push(re[X].img.buffer);const De=(function(Le){let ct=0;for(var Pe=0;Pe<Le.length;Pe++)ct+=Le[Pe].byteLength;const ue=new Uint8Array(ct);let ft=0;for(Pe=0;Pe<Le.length;Pe++){const Ct=new Uint8Array(Le[Pe]),Ft=Ct.length;for(let et=0;et<Ft;et+=4){let rt=Ct[et],we=Ct[et+1],H=Ct[et+2];const V=Ct[et+3];V==0&&(rt=we=H=0),ue[ft+et]=rt,ue[ft+et+1]=we,ue[ft+et+2]=H,ue[ft+et+3]=V}ft+=Ft}return ue.buffer})(Oe),Se=R(De,_);for(X=0;X<Se.plte.length;X++)Ae.push(Se.plte[X].est.rgba);let Ve=0;for(X=0;X<re.length;X++){const ot=(xe=re[X]).img.length;var ve=new Uint8Array(Se.inds.buffer,Ve>>2,ot>>2);fe.push(ve);const Le=new Uint8Array(Se.abuf,Ve,ot);O&&u(xe.img,xe.rect.width,xe.rect.height,Ae,Le,ve),xe.img.set(Le),Ve+=ot}}else for(Y=0;Y<re.length;Y++){var xe=re[Y];const Oe=new Uint32Array(xe.img.buffer);var Fe=xe.rect.width;for(ne=Oe.length,ve=new Uint8Array(ne),fe.push(ve),X=0;X<ne;X++){const De=Oe[X];if(X!=0&&De==Oe[X-1])ve[X]=ve[X-1];else if(X>Fe&&De==Oe[X-Fe])ve[X]=ve[X-Fe];else{let Se=Re[De];if(Se==null&&(Re[De]=Se=Ae.length,Ae.push(De),Ae.length>=300))break;ve[X]=Se}}}const qe=Ae.length;for(qe<=256&&h==0&&(z=qe<=2?1:qe<=4?2:qe<=16?4:8,z=Math.max(z,m)),Y=0;Y<re.length;Y++){(xe=re[Y]).rect.x,xe.rect.y,Fe=xe.rect.width;const Oe=xe.rect.height;let De=xe.img;new Uint32Array(De.buffer);let Se=4*Fe,Ve=4;if(qe<=256&&h==0){Se=Math.ceil(z*Fe/8);var Je=new Uint8Array(Se*Oe);const ot=fe[Y];for(let Le=0;Le<Oe;Le++){X=Le*Se;const ct=Le*Fe;if(z==8)for(var _e=0;_e<Fe;_e++)Je[X+_e]=ot[ct+_e];else if(z==4)for(_e=0;_e<Fe;_e++)Je[X+(_e>>1)]|=ot[ct+_e]<<4-4*(1&_e);else if(z==2)for(_e=0;_e<Fe;_e++)Je[X+(_e>>2)]|=ot[ct+_e]<<6-2*(3&_e);else if(z==1)for(_e=0;_e<Fe;_e++)Je[X+(_e>>3)]|=ot[ct+_e]<<7-1*(7&_e)}De=Je,C=3,Ve=1}else if(j==0&&re.length==1){Je=new Uint8Array(Fe*Oe*3);const ot=Fe*Oe;for(X=0;X<ot;X++){const Le=3*X,ct=4*X;Je[Le]=De[ct],Je[Le+1]=De[ct+1],Je[Le+2]=De[ct+2]}De=Je,C=2,Ve=3,Se=3*Fe}xe.img=De,xe.bpl=Se,xe.bpp=Ve}return{ctype:C,depth:z,plte:Ae,frames:re}}function a(y,p,F,_,S,A,I){const $=Uint8Array,m=Uint32Array,h=new $(y[S-1]),O=new m(y[S-1]),C=S+1<y.length?new $(y[S+1]):null,z=new $(y[S]),Q=new m(z.buffer);let Y=p,ne=F,X=-1,j=-1;for(let Re=0;Re<A.height;Re++)for(let Ae=0;Ae<A.width;Ae++){const fe=A.x+Ae,ve=A.y+Re,xe=ve*p+fe,Fe=Q[xe];Fe==0||_[S-1].dispose==0&&O[xe]==Fe&&(C==null||C[4*xe+3]!=0)||(fe<Y&&(Y=fe),fe>X&&(X=fe),ve<ne&&(ne=ve),ve>j&&(j=ve))}X==-1&&(Y=ne=X=j=0),I&&((1&Y)==1&&Y--,(1&ne)==1&&ne--),A={x:Y,y:ne,width:X-Y+1,height:j-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 $=[];let m,h=[0,1,2,3,4];A!=-1?h=[A]:(p*_>5e5||F==1)&&(h=[0]),I&&(m={level:0});const O=Bs;for(var C=0;C<h.length;C++){for(let Y=0;Y<p;Y++)v(S,y,Y,_,F,h[C]);$.push(O.deflate(S,m))}let z,Q=1e9;for(C=0;C<$.length;C++)$[C].length<Q&&(z=C,Q=$[C].length);return $[z]}function v(y,p,F,_,S,A){const I=F*_;let $=I+F;if(y[$]=A,$++,A==0)if(_<500)for(var m=0;m<_;m++)y[$+m]=p[I+m];else y.set(new Uint8Array(p.buffer,I,_),$);else if(A==1){for(m=0;m<S;m++)y[$+m]=p[I+m];for(m=S;m<_;m++)y[$+m]=p[I+m]-p[I+m-S]+256&255}else if(F==0){for(m=0;m<S;m++)y[$+m]=p[I+m];if(A==2)for(m=S;m<_;m++)y[$+m]=p[I+m];if(A==3)for(m=S;m<_;m++)y[$+m]=p[I+m]-(p[I+m-S]>>1)+256&255;if(A==4)for(m=S;m<_;m++)y[$+m]=p[I+m]-D(p[I+m-S],0,0)+256&255}else{if(A==2)for(m=0;m<_;m++)y[$+m]=p[I+m]+256-p[I+m-_]&255;if(A==3){for(m=0;m<S;m++)y[$+m]=p[I+m]+256-(p[I+m-_]>>1)&255;for(m=S;m<_;m++)y[$+m]=p[I+m]+256-(p[I+m-_]+p[I+m-S]>>1)&255}if(A==4){for(m=0;m<S;m++)y[$+m]=p[I+m]+256-D(0,p[I+m-_],0)&255;for(m=S;m<_;m++)y[$+m]=p[I+m]+256-D(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=k(_,p),I=A[0],$=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),Q=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,Q=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,Q,Y,ne)<=0?O.left:O.right;h[C>>2]=O.ind,S[C>>2]=O.est.rgba}return{abuf:_.buffer,inds:h,plte:$}}function k(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 $=0,m=0;for(var I=0;I<A.length;I++)A[I].est.L>$&&($=A[I].est.L,m=I);if($<F)break;const h=A[m],O=P(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((($,m)=>m.bst.N-$.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,Q,Y,ne){const X=z-C[0],j=Q-C[1],re=Y-C[2],Re=ne-C[3];return X*X+j*j+re*re+Re*Re})(y.est.q,p,F,_,S),y;const A=K(y.est,p,F,_,S);let I=y.left,$=y.right;A>0&&(I=y.right,$=y.left);const m=T(I,p,F,_,S);if(m.tdst<=A*A)return m;const h=T($,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 P(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 $=y[I]*.00392156862745098,m=y[I+1]*(1/255),h=y[I+2]*(1/255),O=y[I+3]*(1/255);S[0]+=$,S[1]+=m,S[2]+=h,S[3]+=O,_[0]+=$*$,_[1]+=$*m,_[2]+=$*h,_[3]+=$*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],$=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*$*m,p[4]-A*S*m,p[5]-A*A*m,p[6]-A*I*m,p[7]-A*$*m,p[8]-I*S*m,p[9]-I*A*m,p[10]-I*I*m,p[11]-I*$*m,p[12]-$*S*m,p[13]-$*A*m,p[14]-$*I*m,p[15]-$*$*m],O=h,C=N;let z=[Math.random(),Math.random(),Math.random(),Math.random()],Q=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-Q)<1e-9));X++)Q=Y;const ne=[S*m,A*m,I*m,$*m];return{Cov:h,q:ne,e:z,L:Q,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]]};Tt.encode=function(p,F,_,S,A,I,$){S==null&&(S=0),$==null&&($=!1);const m=i(p,F,_,S,[!1,!1,!1,0,$,!1]);return L(m,-1),w(m,F,_,A,I)},Tt.encodeLL=function(p,F,_,S,A,I,$,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 L(h,0,!0),w(h,F,_,$,m)},Tt.encode.compress=i,Tt.encode.dither=u,Tt.quantize=R,Tt.quantize.getKDtree=k,Tt.quantize.getNearest=T})();const Di={toArrayBuffer(n,f){const D=n.width,r=n.height,e=D<<2,t=n.getContext("2d").getImageData(0,0,D,r),l=new Uint32Array(t.data.buffer),u=(32*D+31)/32<<2,w=u*r,L=122+w,i=new ArrayBuffer(L),a=new DataView(i),o=1<<20;let d,v,R,k,T=o,K=0,P=0,x=0;function q(y){a.setUint16(P,y,!0),P+=2}function M(y){a.setUint32(P,y,!0),P+=4}function N(y){P+=y}q(19778),M(L),N(4),M(122),M(108),M(D),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(k=122+K*u,d=0;d<e;)T--,v=l[x++],R=v>>>24,a.setUint32(k+d,v<<8|R),d+=4;K++}x<l.length?(T=o,setTimeout(y,Di._dly)):f(i)})()},toBlob(n,f){this.toArrayBuffer(n,(D=>{f(new Blob([D],{type:"image/bmp"}))}))},_dly:9};var St={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},Os={[St.CHROME]:16384,[St.FIREFOX]:11180,[St.DESKTOP_SAFARI]:16384,[St.IE]:8192,[St.IOS]:4096,[St.ETC]:8192};const Xn=typeof window<"u",Bi=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Mn=Xn&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),Us=(Xn||Bi)&&(Mn&&Mn.getOriginalSymbol(window,"File")||typeof File<"u"&&File),Oi=(Xn||Bi)&&(Mn&&Mn.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function Zn(n,f,D=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 L=new Blob([w],{type:t});L.name=f,L.lastModified=D,r(L)}))}function Ui(n){return new Promise(((f,D)=>{const r=new Oi;r.onload=()=>f(r.result),r.onerror=e=>D(e),r.readAsDataURL(n)}))}function zi(n){return new Promise(((f,D)=>{const r=new Image;r.onload=()=>f(r),r.onerror=e=>D(e),r.src=n}))}function jt(){if(jt.cachedResult!==void 0)return jt.cachedResult;let n=St.ETC;const{userAgent:f}=navigator;return/Chrom(e|ium)/i.test(f)?n=St.CHROME:/iP(ad|od|hone)/i.test(f)&&/WebKit/i.test(f)?n=St.IOS:/Safari/i.test(f)?n=St.DESKTOP_SAFARI:/Firefox/i.test(f)?n=St.FIREFOX:(/MSIE/i.test(f)||document.documentMode)&&(n=St.IE),jt.cachedResult=n,jt.cachedResult}function Ni(n,f){const D=jt(),r=Os[D];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,L=(r+t)/2;w<L?(t=L,e=L*u):(t=w*u,e=w),l=e*t}return{width:e,height:t}}function Rn(n,f){let D,r;try{if(D=new OffscreenCanvas(n,f),r=D.getContext("2d"),r===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{D=document.createElement("canvas"),r=D.getContext("2d")}return D.width=n,D.height=f,[D,r]}function Hi(n,f){const{width:D,height:r}=Ni(n.width,n.height),[e,t]=Rn(D,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 _n(){return _n.cachedResult!==void 0||(_n.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),_n.cachedResult}function An(n,f={}){return new Promise((function(D,r){let e,t;var l=function(){try{return t=Hi(e,f.fileType||n.type),D([e,t])}catch(w){return r(w)}},u=function(w){try{var L=function(i){try{throw i}catch(a){return r(a)}};try{let i;return Ui(n).then((function(a){try{return i=a,zi(i).then((function(o){try{return e=o,(function(){try{return l()}catch(d){return r(d)}})()}catch(d){return L(d)}}),L)}catch(o){return L(o)}}),L)}catch(i){L(i)}}catch(i){return r(i)}};try{if(_n()||[St.DESKTOP_SAFARI,St.MOBILE_SAFARI].includes(jt()))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 Tn(n,f,D,r,e=1){return new Promise((function(t,l){let u;if(f==="image/png"){let L,i,a;return L=n.getContext("2d"),{data:i}=L.getImageData(0,0,n.width,n.height),a=Tt.encode([i.buffer],n.width,n.height,4096*e),u=new Blob([a],{type:f}),u.name=D,u.lastModified=r,w.call(this)}{let L=function(){return w.call(this)};if(f==="image/bmp")return new Promise((i=>Di.toBlob(n,i))).then((function(i){try{return u=i,u.name=D,u.lastModified=r,L.call(this)}catch(a){return l(a)}}).bind(this),l);{let i=function(){return L.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=D,u.lastModified=r,i.call(this)}catch(o){return l(o)}}).bind(this),l);{let a;return a=n.toDataURL(f,e),Zn(a,D,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 xt(n){n.width=0,n.height=0}function Kt(){return new Promise((function(n,f){let D,r,e,t;return Kt.cachedResult!==void 0?n(Kt.cachedResult):Zn("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(l){try{return D=l,An(D).then((function(u){try{return r=u[1],Tn(r,D.type,D.name,D.lastModified).then((function(w){try{return e=w,xt(r),An(e).then((function(L){try{return t=L[0],Kt.cachedResult=t.width===1&&t.height===2,n(Kt.cachedResult)}catch(i){return f(i)}}),f)}catch(L){return f(L)}}),f)}catch(w){return f(w)}}),f)}catch(u){return f(u)}}),f)}))}function Pi(n){return new Promise(((f,D)=>{const r=new Oi;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 L=t.getUint16(u+=6,!1)==18761;u+=t.getUint32(u+4,L);const i=t.getUint16(u,L);u+=2;for(let a=0;a<i;a++)if(t.getUint16(u+12*a,L)==274)return f(t.getUint16(u+12*a+8,L))}else{if((65280&w)!=65280)break;u+=t.getUint16(u,!1)}}return f(-1)},r.onerror=e=>D(e),r.readAsArrayBuffer(n)}))}function ji(n,f){const{width:D}=n,{height:r}=n,{maxWidthOrHeight:e}=f;let t,l=n;return isFinite(e)&&(D>e||r>e)&&([l,t]=Rn(D,r),D>r?(l.width=e,l.height=r/D*e):(l.width=D/r*e,l.height=e),t.drawImage(n,0,0,l.width,l.height),xt(n)),l}function qi(n,f){const{width:D}=n,{height:r}=n,[e,t]=Rn(D,r);switch(f>4&&f<9?(e.width=r,e.height=D):(e.width=D,e.height=r),f){case 2:t.transform(-1,0,0,1,D,0);break;case 3:t.transform(-1,0,0,-1,D,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,D);break;case 8:t.transform(0,-1,1,0,0,D)}return t.drawImage(n,0,0,D,r),xt(n),e}function wi(n,f,D=0){return new Promise((function(r,e){let t,l,u,w,L,i,a,o,d,v,R,k,T,K,P,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=D,l=f.maxIteration||10,u=1024*f.maxSizeMB*1024,p(),An(n,f).then((function(_){try{return[,w]=_,p(),L=ji(w,f),p(),new Promise((function(S,A){var I;if(!(I=f.exifOrientation))return Pi(n).then((function(m){try{return I=m,$.call(this)}catch(h){return A(h)}}).bind(this),A);function $(){return S(I)}return $.call(this)})).then((function(S){try{return i=S,p(),Kt().then((function(A){try{return a=A?L:qi(L,i),p(),o=f.initialQuality||1,d=f.fileType||n.type,Tn(a,d,n.name,n.lastModified,o).then((function(I){try{{let m=function(){if(l--&&(P>u||P>T)){let O,C;return O=y?.95*N.width:N.width,C=y?.95*N.height:N.height,[q,M]=Rn(O,C),M.drawImage(N,0,0,O,C),o*=d==="image/png"?.85:.95,Tn(q,d,n.name,n.lastModified,o).then((function(z){try{return x=z,xt(N),N=q,P=x.size,F(Math.min(99,Math.floor((K-P)/(K-u)*100))),m}catch(Q){return e(Q)}}),e)}return[1]},h=function(){return xt(N),xt(q),xt(L),xt(a),xt(w),F(100),r(x)};if(v=I,p(),R=v.size>u,k=v.size>n.size,!R&&!k)return F(100),r(v);var $;return T=n.size,K=v.size,P=K,N=a,y=!f.alwaysKeepResolution&&R,($=(function(O){for(;O;){if(O.then)return void O.then($,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 zs=`
|
|
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-ClDybRo_.js";import"./index-CSGfOsfr.js";export{m as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Qo=Object.defineProperty;var er=(e,t,n)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Me=(e,t,n)=>er(e,typeof t!="symbol"?t+"":t,n);import{aJ as tr,ag as de,aK as Ut,aL as Kt,V as ve,aM as Ne,d as pe,G as De,o as h,b as Se,c as v,I as b,C as Kn,u as l,H as y,F as we,f as Ye,i as ee,aN as nr,aw as or,_ as He,a as D,aO as Ee,aj as ye,a9 as Xt,a8 as $t,p as Yt,v as Qt,aP as rr,aQ as sr,q as zt,aR as ir,S as Xn,x as en,aS as ar,j as W,r as Yn,aT as Qn,aU as cr,ap as ur,aV as vn,e as eo,n as oe,aW as to,h as lr,k as Le,ab as no,P as dr,M as Jt,aX as fr,an as Re,g as Rt,D as pr,A as mr,B as hr,Z as gr,E as _r,aY as vr,a3 as yr,U as br,w as Ue,ao as yn,aZ as bn,a_ as wr,aE as Je,K as ct,a$ as kr,ai as $r,a7 as zr,am as wn,b0 as Sr,b1 as Ir,b2 as kn,b3 as Cr,ah as Or,b4 as Zr,X as jr,W as Er,Q as Lt,R as xt,b5 as Tr}from"./index-
|
|
1
|
+
var Qo=Object.defineProperty;var er=(e,t,n)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Me=(e,t,n)=>er(e,typeof t!="symbol"?t+"":t,n);import{aJ as tr,ag as de,aK as Ut,aL as Kt,V as ve,aM as Ne,d as pe,G as De,o as h,b as Se,c as v,I as b,C as Kn,u as l,H as y,F as we,f as Ye,i as ee,aN as nr,aw as or,_ as He,a as D,aO as Ee,aj as ye,a9 as Xt,a8 as $t,p as Yt,v as Qt,aP as rr,aQ as sr,q as zt,aR as ir,S as Xn,x as en,aS as ar,j as W,r as Yn,aT as Qn,aU as cr,ap as ur,aV as vn,e as eo,n as oe,aW as to,h as lr,k as Le,ab as no,P as dr,M as Jt,aX as fr,an as Re,g as Rt,D as pr,A as mr,B as hr,Z as gr,E as _r,aY as vr,a3 as yr,U as br,w as Ue,ao as yn,aZ as bn,a_ as wr,aE as Je,K as ct,a$ as kr,ai as $r,a7 as zr,am as wn,b0 as Sr,b1 as Ir,b2 as kn,b3 as Cr,ah as Or,b4 as Zr,X as jr,W as Er,Q as Lt,R as xt,b5 as Tr}from"./index-CSGfOsfr.js";class $n{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=tr(t,{whiteList:{a:["href","target"]}}),t}}const Pr={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 Ut(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 Ut(s+"/song/detail?ids="+r),c=await Ut(s+"/song/url?id="+r),u={detail:i,url:c},a=await Kt(ve.proxyUrl(Ne.query(u.detail,"$..al.picUrl")[0]),.4),d={type:"music163",sub_type:"song",data:{id:r,play_link:Ne.query(u.url,"$..url")[0],cover:Ne.query(u.detail,"$..al.picUrl")[0],cover_light:a[1][1]=="light",info:{name:Ne.query(u.detail,"$..name")[0],author:Ne.query(u.detail,"$..ar[*].name"),time:Ne.query(u.detail,"$..dt")[0]/1e3,free:Ne.query(u.url,"$..freeTrialInfo")[0]!=null?{start:Ne.query(u.url,"$..freeTrialInfo")[0].start,end:Ne.query(u.url,"$..freeTrialInfo")[0].end}:null}}};return t.info("[linkView] 预览网易云音乐成功"),d}catch(i){t.error(i,"[linkView] 预览网易云音乐失败")}}return null}},je=class je{constructor(t,n,o,r){Me(this,"suffixId");this.id=t,this.type=n,this.hasSuper=o,this.superSuffix=r,r.length>0&&(this.suffixId=r[0])}static get(t){if(!(t<5e3))return new je(t,"emoji",!1,[])}static has(t){return t>=5e3}static get responseId(){return this.responseEmojiId}get description(){return je.descMap.get(this.id.toString())||"表情"}get value(){return String.fromCodePoint(this.id)}get superValue(){}};Me(je,"apngMap",new Map),Me(je,"descMap",new Map),Me(je,"allList",new Set),Me(je,"allSuperList",new Set),Me(je,"normalList",[]),Me(je,"emojiList",[128522,128524,128538,128531,128560,128541,128513,128540,9786,128525,128532,128516,128527,128530,128563,128536,128557,128561,128514,128170,128074,128077,128079,128078,128591,128076,128070,128064,127836,127847,127838,127866,127867,9749,127822,127827,127817,128684,127801,127881,128157,128163,10024,128168,128166,128293,128164,128169,128137,128235,128014,128103,128102,128053,128055,128046,128020,128056,128123,128027,128054,128051,128098,9728,10068,128299,128147,127978]),Me(je,"responseEmojiId",[128522,128524,128538,128531,128560,128541,128513,128540,9786,128532,128516,128527,128530,128563,128536,128557,128514,128170,128074,128077,128079,128076,127836,127847,127838,127866,127867,9749,127822,127827,127817,127801,127881,128157,10024,128168,128166,128293,128164,128235,128103,128102,128053,128046,128027,128051,9728,10068,128147]);let Qe=je;const Ar=["title"],Dt=pe({__name:"EmojiFace",props:{emoji:{default:()=>{}}},setup(e){return(t,n)=>{const o=De("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"])):(h(),v("span",{key:1,title:e.emoji.description,class:"emoji-face"},b(e.emoji.value),9,Ar))}}});var zn;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 k=d[m];k in c||(c[k]=a[k].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 tt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class oo extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(zn=globalThis).__zod_globalConfig??(zn.__zod_globalConfig={});const tn=globalThis.__zod_globalConfig;function We(e){return tn}function ro(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 Wt(e,t){return typeof t=="bigint"?t.toString():t}function nn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function on(e){return e==null}function rn(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Mr(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 Sn=Symbol("evaluating");function x(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==Sn)return o===void 0&&(o=Sn,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Ge(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Fe(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function In(e){return JSON.stringify(e)}function Nr(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const so="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function St(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ur=nn(()=>{var e;if(tn.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 pt(e){if(St(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(St(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function io(e){return pt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Rr=new Set(["string","number","symbol"]);function nt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Be(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 Lr(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const xr={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 Dr(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=Fe(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 Ge(this,"shape",i),i},checks:[]});return Be(e,s)}function Fr(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=Fe(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 Ge(this,"shape",i),i},checks:[]});return Be(e,s)}function Br(e,t){if(!pt(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=Fe(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Ge(this,"shape",s),s}});return Be(e,r)}function Vr(e,t){if(!pt(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Fe(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Ge(this,"shape",o),o}});return Be(e,n)}function Jr(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=Fe(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Ge(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Be(e,n)}function Wr(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=Fe(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 Ge(this,"shape",u),u},checks:[]});return Be(t,i)}function qr(e,t,n){const o=Fe(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 Ge(this,"shape",s),s}});return Be(t,o)}function et(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 Hr(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 ao(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function bt(e){return typeof e=="string"?e:e==null?void 0:e.message}function qe(e,t,n){var u,a,d,m,k,_;const o=e.message?e.message:bt((d=(a=(u=e.inst)==null?void 0:u._zod.def)==null?void 0:a.error)==null?void 0:d.call(a,e))??bt((m=t==null?void 0:t.error)==null?void 0:m.call(t,e))??bt((k=n.customError)==null?void 0:k.call(n,e))??bt((_=n.localeError)==null?void 0:_.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 sn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function mt(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const co=(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,Wt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},uo=g("$ZodError",co),lo=g("$ZodError",co,{Parent:Error});function Gr(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 Kr(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 an=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 tt;if(i.issues.length){const c=new((r==null?void 0:r.Err)??e)(i.issues.map(u=>qe(u,s,We())));throw so(c,r==null?void 0:r.callee),c}return i.value},cn=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=>qe(u,s,We())));throw so(c,r==null?void 0:r.callee),c}return i.value},Zt=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 tt;return s.issues.length?{success:!1,error:new(e??uo)(s.issues.map(i=>qe(i,r,We())))}:{success:!0,data:s.value}},Xr=Zt(lo),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=>qe(i,r,We())))}:{success:!0,data:s.value}},Yr=jt(lo),Qr=e=>(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return an(e)(t,n,r)},es=e=>(t,n,o)=>an(e)(t,n,o),ts=e=>async(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return cn(e)(t,n,r)},ns=e=>async(t,n,o)=>cn(e)(t,n,o),os=e=>(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return Zt(e)(t,n,r)},rs=e=>(t,n,o)=>Zt(e)(t,n,o),ss=e=>async(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return jt(e)(t,n,r)},is=e=>async(t,n,o)=>jt(e)(t,n,o),as=/^[cC][0-9a-z]{6,}$/,cs=/^[0-9a-z]+$/,us=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ls=/^[0-9a-vA-V]{20}$/,ds=/^[A-Za-z0-9]{27}$/,fs=/^[a-zA-Z0-9_-]{21}$/,ps=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ms=/^([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})$/,Cn=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)$/,hs=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,gs="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function _s(){return new RegExp(gs,"u")}const vs=/^(?:(?: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])$/,ys=/^(([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}|:))$/,bs=/^((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])$/,ks=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fo=/^[A-Za-z0-9_-]*$/,$s=/^https?$/,zs=/^\+[1-9]\d{6,14}$/,po="(?:(?:\\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])))",Ss=new RegExp(`^${po}$`);function mo(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 Is(e){return new RegExp(`^${mo(e)}$`)}function Cs(e){const t=mo({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(`^${po}T(?:${o})$`)}const Os=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}$`)},Zs=/^-?\d+$/,js=/^-?\d+(?:\.\d+)?$/,Es=/^[^A-Z]*$/,Ts=/^[^a-z]*$/,ke=g("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ho={number:"number",bigint:"bigint",object:"date"},go=g("$ZodCheckLessThan",(e,t)=>{ke.init(e,t);const n=ho[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})}}),_o=g("$ZodCheckGreaterThan",(e,t)=>{ke.init(e,t);const n=ho[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})}}),Ps=g("$ZodCheckMultipleOf",(e,t)=>{ke.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):Mr(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})}}),As=g("$ZodCheckNumberFormat",(e,t)=>{var i;ke.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]=xr[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=Zs)}),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})}}),Ms=g("$ZodCheckMaxLength",(e,t)=>{var n;ke.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!on(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=sn(r);o.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ns=g("$ZodCheckMinLength",(e,t)=>{var n;ke.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!on(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=sn(r);o.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Us=g("$ZodCheckLengthEquals",(e,t)=>{var n;ke.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!on(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=sn(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;ke.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=()=>{})}),Rs=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})}}),Ls=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Es),Et.init(e,t)}),xs=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ts),Et.init(e,t)}),Ds=g("$ZodCheckIncludes",(e,t)=>{ke.init(e,t);const n=nt(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})}}),Fs=g("$ZodCheckStartsWith",(e,t)=>{ke.init(e,t);const n=new RegExp(`^${nt(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})}}),Bs=g("$ZodCheckEndsWith",(e,t)=>{ke.init(e,t);const n=new RegExp(`.*${nt(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})}}),Vs=g("$ZodCheckOverwrite",(e,t)=>{ke.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Js{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(`
|