diff --git a/app/src/main/assets/Shiggy.bundle b/app/src/main/assets/Shiggy.bundle index 3369975..dd94b3d 100644 --- a/app/src/main/assets/Shiggy.bundle +++ b/app/src/main/assets/Shiggy.bundle @@ -1,30 +1,28 @@ -"use strict";(()=>{var Yv=Object.create;var Qi=Object.defineProperty;var Kv=Object.getOwnPropertyDescriptor;var qv=Object.getOwnPropertyNames;var Xv=Object.getPrototypeOf,Jv=Object.prototype.hasOwnProperty;var _=(e,r,t)=>()=>{if(t)throw t[0];try{return e&&(r=e(e=0)),r}catch(o){throw t=[o],o}};var Nt=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}},k=(e,r)=>{for(var t in r)Qi(e,t,{get:r[t],enumerable:!0})},bd=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(var n=qv(r),a=0,s=n.length,f;ar[d]).bind(null,f),enumerable:!(o=Kv(r,f))||o.enumerable});return e};var H=(e,r,t)=>(t=e!=null?Yv(Xv(e)):{},bd(r||!e||!e.__esModule?Qi(t,"default",{value:e,enumerable:!0}):t,e)),Ne=e=>bd(Qi({},"__esModule",{value:!0}),e);var l=_(()=>{"use strict"});var Zv,Qv,ey,h,c=_(()=>{"use strict";Zv=e=>({status:"fulfilled",value:e}),Qv=e=>({status:"rejected",reason:e}),ey=e=>Promise.resolve(e).then(Zv,Qv),h=Promise.allSettled??=e=>Promise.all(Array.from(e).map(ey))});function Ye(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var An=_(()=>{l();c();u()});function Sd(e,r){for(var t=0;t{l();c();u()});function ql(e){if(!xd){try{typeof console<"u"&&typeof console.warn=="function"&&console.warn(`[weakref-shim] ${e}`)}catch{}xd=!0}}var xd,ry,ty,oy,ny,g,v,u=_(()=>{"use strict";An();Cn();xd=!1;ry=(function(){"use strict";function e(r){Ye(this,e),this.__value=r,ql("WeakRef is not available in this runtime. Using a strong-reference fallback \u2014 memory usage/semantics may differ.")}return Ke(e,[{key:"deref",value:function(){return this.__value}}]),e})(),ty=(function(){"use strict";function e(r){Ye(this,e),this.__cleanupCallback=typeof r=="function"?r:null,ql("FinalizationRegistry is not available in this runtime. Using a no-op fallback \u2014 finalizers will not run based on GC.")}return Ke(e,[{key:"register",value:function(t){}},{key:"unregister",value:function(t){}},{key:"cleanupSome",value:function(t){var o=typeof t=="function"?t:this.__cleanupCallback;if(typeof o=="function")try{o()}catch(n){try{typeof console<"u"&&typeof console.error=="function"&&console.error("[weakref-shim] error running cleanupSome callback:",n)}catch{}}}}]),e})(),oy=typeof globalThis<"u"&&typeof globalThis.WeakRef=="function"?globalThis.WeakRef:void 0,ny=typeof globalThis<"u"&&typeof globalThis.FinalizationRegistry=="function"?globalThis.FinalizationRegistry:void 0,g=oy??ry,v=ny??ty;try{typeof globalThis<"u"&&(typeof globalThis.WeakRef>"u"&&(globalThis.WeakRef=g),typeof globalThis.FinalizationRegistry>"u"&&(globalThis.FinalizationRegistry=v))}catch(e){ql("Unable to assign WeakRef/FinalizationRegistry to globalThis: "+(e&&e.message))}});function wd(e,r,t,o,n,a,s){try{var f=e[a](s),d=f.value}catch(m){t(m);return}f.done?r(d):Promise.resolve(d).then(o,n)}function x(e){return function(){var r=this,t=arguments;return new Promise(function(o,n){var a=e.apply(r,t);function s(d){wd(a,o,n,s,f,"next",d)}function f(d){wd(a,o,n,s,f,"throw",d)}s(void 0)})}}var be=_(()=>{l();c();u()});var es={};k(es,{after:()=>uy,before:()=>ly,instead:()=>cy,unpatchAll:()=>Ed});function iy(e,r,t,o){var n=Ta.get(e);if(!n)return r(...t);for(var a of n.b.values()){var s=a.call(o,t);Array.isArray(s)&&(t=s)}var f=[...n.i.values()].reduce((p,T)=>(...I)=>T.call(o,I,p),r)(...t);for(var d of n.a.values())f=d.call(o,t,f)??f;for(var m of n.c)m();return n.c=[],f}function sy(e,r,t){var o=e.deref();if(!o||!o[t].delete(r))return!1;var n=o.p.deref();if(n&&ay.every(s=>o[s].size===0)){var a=o.n;Ta.delete(n[a]),Reflect.defineProperty(n,a,{value:o.o,writable:!0,configurable:!0})||(n[a]=o.o)}return!0}var ay,Ta,Ed,Xl,ly,cy,uy,rs=_(()=>{l();c();u();ay=["a","b","i"],Ed=()=>Ta=new WeakMap;Ed();Xl=e=>(r,t,o,n=!1)=>{var a=t[r];if(typeof a!="function")throw new Error(`${r} is not a function in ${t.constructor.name}`);var s=Ta.get(a);if(!s){s={n:r,o:a,p:new g(t),c:[],b:new Map,i:new Map,a:new Map};var f=new Proxy(a,{apply:(I,P,C)=>d(P,C,!1),construct:(I,P)=>d(a,P,!0),get:(I,P,C,F)=>(F=Reflect.get(I,P,C),(typeof F)[0]=="f"?F.bind(a):F)}),d=(I,P,C)=>iy(f,(...F)=>C?Reflect.construct(a,F,I):a.apply(I,F),P,I);Ta.set(f,s),Reflect.defineProperty(t,r,{value:f,configurable:!0,writable:!0})||(t[r]=f)}var m=Symbol(),p=new g(s),T=()=>sy(p,m,e);return n&&s.c.push(T),s[e].set(m,o),T},ly=Xl("b"),cy=Xl("i"),uy=Xl("a")});var Ad={};k(Ad,{BundleUpdaterManager:()=>Tr,ImageLoader:()=>fy,NativeCacheModule:()=>oo,NativeClientInfoModule:()=>Vo,NativeDeviceModule:()=>$o,NativeFileModule:()=>ne,NativeThemeModule:()=>Jl});function Ho(...e){for(var r of e){if(globalThis.__turboModuleProxy){var t=globalThis.__turboModuleProxy(r);if(t)return t}if(Td[r])return Td[r]}}var Td,oo,ne,Vo,$o,Jl,Tr,fy,Yr=_(()=>{"use strict";l();c();u();Td=globalThis.nativeModuleProxy;oo=Ho("NativeCacheModule","MMKVManager"),ne=Ho("NativeFileModule","RTNFileManager","DCDFileManager"),Vo=Ho("NativeClientInfoModule","RTNClientInfoManager","InfoDictionaryManager"),$o=Ho("NativeDeviceModule","RTNDeviceManager","DCDDeviceManager"),Jl=Ho("NativeThemeModule","RTNThemeManager","DCDTheme"),Tr=Ho("BundleUpdaterManager"),fy=Ho("ImageLoader")});var Aa={};k(Aa,{clearFolder:()=>Zl,downloadFile:()=>Ql,fileExists:()=>Ot,readFile:()=>Wo,removeCacheFile:()=>Cd,removeFile:()=>zo,writeFile:()=>lt});function Zl(e){return x(function*(r,{prefix:t="pyoncord/"}={}){if(typeof ne.clearFolder!="function")throw new Error("'fs.clearFolder' is not supported");yield ne.clearFolder("documents",`${t}${r}`)}).apply(this,arguments)}function zo(e){return x(function*(r,{prefix:t="pyoncord/"}={}){if(typeof ne.removeFile!="function")throw new Error("'fs.removeFile' is not supported");yield ne.removeFile("documents",`${t}${r}`)}).apply(this,arguments)}function Cd(e,r="pyoncord/"){return x(function*(){if(typeof ne.removeFile!="function")throw new Error("'fs.removeFile' is not supported");yield ne.removeFile("cache",`${r}${e}`)})()}function Ot(e){return x(function*(r,{prefix:t="pyoncord/"}={}){return yield ne.fileExists(`${ne.getConstants().DocumentsDirPath}/${t}${r}`)}).apply(this,arguments)}function lt(e,r){return x(function*(t,o,{prefix:n="pyoncord/"}={}){if(typeof o!="string")throw new Error("Argument 'data' must be a string");yield ne.writeFile("documents",`${n}${t}`,o,"utf8")}).apply(this,arguments)}function Wo(e){return x(function*(r,{prefix:t="pyoncord/"}={}){try{return yield ne.readFile(`${ne.getConstants().DocumentsDirPath}/${t}${r}`,"utf8")}catch(o){throw new Error(`An error occured while writing to '${r}'`,{cause:o})}}).apply(this,arguments)}function Ql(e,r){return x(function*(t,o,{prefix:n="pyoncord/"}={}){var a=yield fetch(t);if(!a.ok)throw new Error(`Failed to download file from ${t}: ${a.status}`);var s=yield a.arrayBuffer(),f=Buffer.from(s).toString("base64");yield ne.writeFile("documents",`${n}${o}`,f,"base64")}).apply(this,arguments)}var Ft=_(()=>{"use strict";l();c();u();be();Yr()});function yt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var ts=_(()=>{l();c();u()});function Yo(e){return Yo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Yo(e)}var ec=_(()=>{l();c();u()});function Ca(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ca=function(){return!!e})()}var rc=_(()=>{l();c();u()});function Rd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Id=_(()=>{l();c();u()});function Pd(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}var Dd=_(()=>{l();c();u()});function Ld(e,r){return r&&(Pd(r)==="object"||typeof r=="function")?r:Rd(e)}var Nd=_(()=>{l();c();u();Id();Dd()});function no(e,r,t){return r=Yo(r),Ld(e,Ca()?Reflect.construct(r,t||[],Yo(e).constructor):r.apply(e,t))}var os=_(()=>{l();c();u();ec();rc();Nd()});function ao(e,r){return ao=Object.setPrototypeOf||function(o,n){return o.__proto__=n,o},ao(e,r)}var ns=_(()=>{l();c();u()});function io(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&ao(e,r)}var as=_(()=>{l();c();u();ns()});function Ra(e,r,t){return Ca()?Ra=Reflect.construct:Ra=function(n,a,s){var f=[null];f.push.apply(f,a);var d=Function.bind.apply(n,f),m=new d;return s&&ao(m,s.prototype),m},Ra.apply(null,arguments)}var Od=_(()=>{l();c();u();rc();ns()});function Fd(e){return Function.toString.call(e).indexOf("[native code]")!==-1}var Md=_(()=>{l();c();u()});function is(e){var r=typeof Map=="function"?new Map:void 0;return is=function(o){if(o===null||!Fd(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r<"u"){if(r.has(o))return r.get(o);r.set(o,n)}function n(){return Ra(o,arguments,Yo(this).constructor)}return n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ao(n,o)},is(e)}var Bd=_(()=>{l();c();u();Od();ec();Md();ns()});function Ia(e,r,{signal:t,edges:o}={}){var n=void 0,a=null,s=o!=null&&o.includes("leading"),f=o==null||o.includes("trailing"),d=()=>{a!==null&&(e.apply(n,a),n=void 0,a=null)},m=()=>{f&&d(),P()},p=null,T=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,m()},r)},I=()=>{p!==null&&(clearTimeout(p),p=null)},P=()=>{I(),n=void 0,a=null},C=()=>{d()},F=function(...Ce){if(!t?.aborted){n=this,a=Ce;var me=p==null;T(),s&&me&&d()}};return F.schedule=T,F.cancel=P,F.flush=C,t?.addEventListener("abort",P,{once:!0}),F}var kd=_(()=>{l();c();u()});function Pa(e,r){for(var t={...e},o=0;o{l();c();u()});function ss(e){return e!=null}var Ud=_(()=>{l();c();u()});var Rn=_(()=>{l();c();u();kd();jd();Ud()});var Mt,so,ls=_(()=>{"use strict";l();c();u();Mt=(function(e){return e[e.EXISTS=1]="EXISTS",e[e.BLACKLISTED=2]="BLACKLISTED",e[e.ASSET=4]="ASSET",e})({}),so=(function(e){return e[e.FULL_LOOKUP=0]="FULL_LOOKUP",e[e.NOT_FOUND=1]="NOT_FOUND",e})({})});var Ko={};k(Ko,{_patcherDelaySymbol:()=>Da,after:()=>xe,before:()=>_t,default:()=>La,instead:()=>ct});function tc(e){function r(...o){if(typeof o[1][Da]=="function"){var n=o[1][Da],a=!1,s=()=>a=!0;return n(f=>{a||(o[1]=f,s=e.apply(this,o))}),()=>s()}return e.apply(this,o)}function t(...o){var n=o[1];if(!n||!("then"in n))throw new Error("target is not a then-able object");var a=!1,s=()=>a=!0;return n.then(f=>{a||(o[1]=f,s=r.apply(this,o))}),()=>s()}return Object.assign(r,{await:t})}var dy,my,py,Da,xe,_t,ct,La,He=_(()=>{"use strict";l();c();u();({after:dy,before:my,instead:py}=(rs(),Ne(es))),Da=Symbol.for("bunny.api.patcher.delay");xe=tc(dy),_t=tc(my),ct=tc(py),La={after:xe,before:_t,instead:ct}});var Gd={};k(Gd,{assetsModule:()=>In,patchAssets:()=>hy});function hy(e){if(!In){In=e;var r=xe("registerAsset",In,()=>{var t=nc();t!==-1&&ac(t)});return r}}var In,oc=_(()=>{"use strict";l();c();u();He();co();lo()});var gy,cs,ic=_(()=>{"use strict";l();c();u();An();Cn();ts();gy=(function(e){return e.GET="GET",e.SET="SET",e.DEL="DEL",e})({}),cs=(function(){"use strict";function e(){Ye(this,e),yt(this,"listeners",Object.values(gy).reduce((r,t)=>(r[t]=new Set,r),{}))}return Ke(e,[{key:"on",value:function(t,o){this.listeners[t].has(o)||this.listeners[t].add(o)}},{key:"off",value:function(t,o){this.listeners[t].delete(o)}},{key:"once",value:function(t,o){var n=(a,s)=>{this.off(a,n),o(a,s)};this.on(t,n)}},{key:"emit",value:function(t,o){for(var n of this.listeners[t])n(t,o)}}]),e})()});var Na={};k(Na,{createFilterDefinition:()=>Kr,createSimpleFilter:()=>vy});function Kr(e,r){function t(n,a,s){return Object.assign(n,{filter:e,raw:s,uniq:[s&&"raw::",r(a)].filter(Boolean).join("")})}var o=n=>(...a)=>t((s,f,d)=>e(a,s,f,d),a,n);return Object.assign(o(!1),{byRaw:o(!0),uniqMaker:r})}function vy(e,r){return Kr((t,o)=>e(o),()=>`dynamic::${r}`)()}var us=_(()=>{"use strict";l();c();u()});var lc={};k(lc,{byDisplayName:()=>fo,byFilePath:()=>ds,byMutableProp:()=>sc,byName:()=>uo,byProps:()=>Oa,byStoreName:()=>fs,byTypeName:()=>mo});var Oa,uo,fo,mo,fs,ds,sc,ms=_(()=>{"use strict";l();c();u();us();lo();Oa=Kr((e,r)=>e.length===0?r[e[0]]:e.every(t=>r[t]),e=>`bunny.metro.byProps(${e.join(",")})`),uo=Kr(([e],r)=>r.name===e,e=>`bunny.metro.byName(${e})`),fo=Kr(([e],r)=>r.displayName===e,e=>`bunny.metro.byDisplayName(${e})`),mo=Kr(([e],r)=>r.type?.name===e,e=>`bunny.metro.byTypeName(${e})`),fs=Kr(([e],r)=>r.getName?.length===0&&r.getName()===e,e=>`bunny.metro.byStoreName(${e})`),ds=Kr(([e,r],t,o,n)=>r===n&&gr[o]?.__filePath===e,([e,r])=>`bunny.metro.byFilePath(${e},${r})`),sc=Kr(([e],r)=>r?.[e]&&!Object.getOwnPropertyDescriptor(r,e)?.get,e=>`bunny.metro.byMutableProp(${e})`)});function Hd(e,r,t){return e.default&&e.__esModule&&t(e.default,r,!0)?{exports:t.raw?e:e.default,defaultExport:!t.raw}:!t.raw&&t(e,r,!1)?{exports:e,defaultExport:!1}:{}}function cc(e){var{cacheId:r,finish:t}=hs(e.uniq,!1);for(var[o,n]of ps(e.uniq,!1)){var{exports:a,defaultExport:s}=Hd(n,o,e);if(a!==void 0)return r(o,a),{id:o,defaultExport:s}}return t(!0),{}}function yy(e){return cc(e)?.id}function lr(e){var{id:r,defaultExport:t}=cc(e);if(r!=null)return t?Ar(r).default:Ar(r)}function uc(e){var{cacheId:r,finish:t}=hs(e.uniq,!0),o=[];for(var[n,a]of ps(e.uniq,!0)){var{exports:s,defaultExport:f}=Hd(a,n,e);s!==void 0&&typeof f=="boolean"&&(o.push({id:n,defaultExport:f}),r(n,s))}return t(o.length===0),o}function _y(e){return uc(e).map(r=>r.id)}function po(e){return uc(e).map(r=>{if(r.id){var{id:t,defaultExport:o}=r;return o?Ar(t).default:Ar(t)}})}var Pn=_(()=>{"use strict";l();c();u();co();lo()});var dc={};k(dc,{getProxyFactory:()=>fc,lazyDestructure:()=>K,proxyLazy:()=>Ve});function Ve(e,r={}){var t,o=r.hint!=="object"?function(){}:{},n=()=>t??=e(),a=new Proxy(o,Sy);return $d.set(a,n),Dn.set(o,{factory:n,options:r}),a}function K(e,r={}){var t=Ve(e);return new Proxy({},{get(o,n){return n===Symbol.iterator?function*(){throw yield t,yield new Proxy({},{get:(a,s)=>Ve(()=>t[s],r)}),new Error("This is not a real iterator, this is likely used incorrectly")}:Ve(()=>t[n],r)}})}function fc(e){return $d.get(e)}var Vd,by,$d,Dn,Sy,Oe=_(()=>{"use strict";l();c();u();Vd=new Set(["arguments","caller","prototype"]),by=e=>typeof e=="string"&&Vd.has(e),$d=new WeakMap,Dn=new WeakMap,Sy={...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(e=>[e,(r,...t)=>{var o=Dn.get(r),n=o?.factory();if(!n)throw new Error(`Trying to Reflect.${e} of ${typeof n}`);return Reflect[e](n,...t)}])),has(e,r){var t=Dn.get(e);if(t?.options){var{exemptedEntries:o}=t.options;if(o&&r in o)return!0}var n=t?.factory();if(!n)throw new Error(`Trying to Reflect.has of ${typeof n}`);return Reflect.has(n,r)},get(e,r,t){if(r==="__IS_BUNNY_LAZY_PROXY__")return!0;var o=Dn.get(e);if(o?.options){var{exemptedEntries:n}=o.options;if(n?.[r])return n[r]}var a=o?.factory();if(!a)throw new Error(`Trying to Reflect.get of ${typeof a}`);return Reflect.get(a,r,t)},ownKeys:e=>{var r=Dn.get(e),t=r?.factory();if(!t)throw new Error(`Trying to Reflect.ownKeys of ${typeof t}`);var o=Reflect.ownKeys(t);return Vd.forEach(n=>!o.includes(n)&&o.push(n)),o},getOwnPropertyDescriptor:(e,r)=>{if(by(r))return Reflect.getOwnPropertyDescriptor(e,r);var t=Dn.get(e),o=t?.factory();if(!o)throw new Error(`Trying to getOwnPropertyDescriptor of ${typeof o}`);var n=Reflect.getOwnPropertyDescriptor(o,r);return n&&Object.defineProperty(e,r,n),n}}});var mc={};k(mc,{_lazyContextSymbol:()=>gs,createLazyModule:()=>ho,getLazyContext:()=>Wd});function xy(e){var r=Bt().findIndex[e.uniq];if(r){for(var t in r)if(t[0]!=="_")return Number(t)}}function wy(e,r){var t=Wd(e);if(!t)throw new Error("Subscribing a module for non-proxy-find");if(!t.indexed)throw new Error("Attempting to subscribe to a non-indexed find");return pc(t.moduleId,()=>{r(lr(t.filter))})}function Wd(e){return zd.get(e)}function ho(e){var r=void 0,t=xy(e),o={filter:e,indexed:!!t,moduleId:t,getExports(a){return!t||gr[t]?.isInitialized?(a(this.forceLoad()),()=>{}):this.subscribe(a)},subscribe(a){return wy(n,a)},get cache(){return r},forceLoad(){if(r??=lr(e),!r)throw new Error(`${e.uniq} is ${typeof r}! (id ${o.moduleId??"unknown"})`);return r}},n=Ve(()=>o.forceLoad(),{exemptedEntries:{[gs]:o,[Da]:a=>o.getExports(a)}});return zd.set(n,o),n}var gs,zd,vs=_(()=>{"use strict";l();c();u();He();Oe();Pn();co();lo();gs=Symbol.for("bunny.metro.lazyContext"),zd=new WeakMap});var L,U,hc,ys,br,gc,vc,yc,_c,bc,Ey,Sc,qo,kt,xc,Ln,Le=_(()=>{"use strict";l();c();u();ms();Pn();vs();L=(...e)=>lr(Oa(...e)),U=(...e)=>ho(Oa(...e)),hc=(...e)=>po(Oa(...e)),ys=(e,r=!0)=>lr(r?uo(e):uo.byRaw(e)),br=(e,r=!0)=>ho(r?uo(e):uo.byRaw(e)),gc=(e,r=!0)=>po(r?uo(e):uo.byRaw(e)),vc=(e,r=!0)=>lr(r?fo(e):fo.byRaw(e)),yc=(e,r=!0)=>ho(r?fo(e):fo.byRaw(e)),_c=(e,r=!0)=>po(r?fo(e):fo.byRaw(e)),bc=(e,r=!0)=>lr(r?mo(e):mo.byRaw(e)),Ey=(e,r=!0)=>ho(r?mo(e):mo.byRaw(e)),Sc=(e,r=!0)=>po(r?mo(e):mo.byRaw(e)),qo=e=>lr(fs(e)),kt=e=>ho(fs(e)),xc=(e,r=!1)=>lr(ds(e,r)),Ln=(e,r=!1)=>ho(ds(e,r))});var go=Nt((zT,Yd)=>{"use strict";l();c();u();Le();Yd.exports={react:U("createElement"),"react-native":U("AppRegistry"),util:U("inspect","isNullOrUndefined"),moment:U("isMoment"),"chroma-js":U("brewer"),lodash:U("forEachRight"),"react-native-webview":U("WebView")}});var re=Nt((qT,Kd)=>{l();c();u();Kd.exports=go()["react-native"]});function jt(e={}){var r=new cs,t=new WeakMap,o=new WeakSet;function n(a,s){return new Proxy(a,{get(f,d){if(d===Jd)return r;var m=[...s,d],p=f[d];if(p!=null){if(r.emit("GET",{path:m,value:p}),typeof p=="object"){if(o.has(p))return p;if(t.has(p))return t.get(p);var T=n(p,m);return t.set(p,T),T}return p}return p},set(f,d,m){if(typeof m=="object")if(t.has(m))f[d]=t.get(m);else{var p=n(m,[...s,d]);t.set(m,p),o.add(m),f[d]=p}else f[d]=m;return r.emit("SET",{path:[...s,d],value:f[d]}),!0},deleteProperty(f,d){var m=typeof f[d]=="object"?t.get(f[d]):f[d],p=delete f[d];return p&&r.emit("DEL",{value:m,path:[...s,d]}),p}})}return{proxy:n(e,[]),emitter:r}}function ie(e){var r=e?.[Jd];if(!r)throw new Error("storage?.[emitterSymbol] is undefined");var[,t]=React.useReducer(o=>~o,0);return React.useEffect(()=>{var o=(n,a)=>{n==="DEL"&&a.value===e||t()};return r.on("SET",o),r.on("DEL",o),()=>{r.off("SET",o),r.off("DEL",o)}},[]),e}function Cr(e){return x(function*(){var r=yield e.get(),{proxy:t,emitter:o}=jt(r),n=()=>e.set(t);return o.on("SET",n),o.on("DEL",n),t})()}function qr(e){var r=void 0,t=[],o=n=>r?n():t.push(n);return e.then(n=>{r=n,t.forEach(a=>a())}),new Proxy({},{...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(n=>[n,(a,...s)=>Reflect[n](r??a,...s)])),get(n,a,s){return a===Zd?o:Reflect.get(r??n,a,s)}})}function Ut(...e){return Promise.all(e.map(r=>new Promise(t=>r[Zd](t))))}var Ec,Jd,Zd,qd,Xd,wc,Tc,_s,bt,Qd,Xo,$e=_(()=>{"use strict";l();c();u();be();ic();Yr();Ec=H(re()),Jd=Symbol.for("vendetta.storage.emitter"),Zd=Symbol.for("vendetta.storage.accessor");qd=/[<>:"/\\|?*]/g,Xd=new Map,wc=e=>Ec.Platform.select({default:e,ios:ne.saveFileToGallery?e:`Documents/${e}`}),Tc=e=>(qd.test(e)&&(e=e.replace(qd,"-").replace(/-+/g,"-")),`vd_mmkv/${e}`),_s=e=>x(function*(){(yield oo.getItem(e))&&oo.removeItem(e);var r=Tc(e);(yield ne.fileExists(`${ne.getConstants().DocumentsDirPath}/${r}`))&&(yield ne.removeFile?.("documents",r))})(),bt=(e,r={})=>{var t=Tc(e),o=JSON.stringify(r);return Xo(t,r,x(function*(){var n=`${ne.getConstants().DocumentsDirPath}/${t}`;if(!(yield ne.fileExists(n))){var a=(yield oo.getItem(e))??o;if(a==="!!LARGE_VALUE!!"){var s=`${ne.getConstants().CacheDirPath}/mmkv/${e}`;(yield ne.fileExists(s))?a=yield ne.readFile(s,"utf8"):(console.log(`${e}: Experienced data loss :(`),a=o)}try{JSON.parse(a)}catch{console.error(`${e} had an unparseable data while migrating`),a=o}yield ne.writeFile("documents",wc(t),a,"utf8"),(yield oo.getItem(e))!==null&&(oo.removeItem(e),console.log(`Successfully migrated ${e} store from MMKV storage to fs`))}})())},Qd=(e,r={})=>{var t=Tc(e),o=JSON.stringify(r),n={...r};x(function*(){try{var s=yield oo.getItem(e);if(s){var f=JSON.parse(s);Object.assign(n,f)}}catch{}try{var d=`${ne.getConstants().DocumentsDirPath}/${t}`;if(yield ne.fileExists(d)){var m=yield ne.readFile(d,"utf8"),p=JSON.parse(m);Object.assign(n,p)}}catch{}})();var a=s=>Ec.Platform.select({default:s,ios:ne.saveFileToGallery?s:`Documents/${s}`});return{get:()=>x(function*(){return n})(),set:s=>x(function*(){Object.assign(n,s);try{var f=Xd.get(e);f&&clearTimeout(f);var d=setTimeout(()=>x(function*(){try{yield ne.writeFile("documents",a(t),JSON.stringify(n),"utf8")}catch{}})(),120);Xd.set(e,d)}catch{}})()}},Xo=(e,r={},t)=>({get:()=>x(function*(){yield t;var o=`${ne.getConstants().DocumentsDirPath}/${e}`;if(yield ne.fileExists(o)){var n=yield ne.readFile(o,"utf8");try{return JSON.parse(n)}catch{}}return yield ne.writeFile("documents",wc(e),JSON.stringify(r),"utf8"),JSON.parse(yield ne.readFile(o,"utf8"))})(),set:o=>x(function*(){yield t,yield ne.writeFile("documents",wc(e),JSON.stringify(o),"utf8")})()})});function bs(e,r){return r.get?r.get.call(e):r.value}var Ac=_(()=>{l();c();u()});function Ss(e,r,t){if(!r.has(e))throw new TypeError("attempted to "+t+" private field on non-instance");return r.get(e)}var Cc=_(()=>{l();c();u()});function Ae(e,r){var t=Ss(e,r,"get");return bs(e,t)}var em=_(()=>{l();c();u();Ac();Cc()});function xs(e,r){if(r.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var Rc=_(()=>{l();c();u()});function Ze(e,r,t){xs(e,r),r.set(e,t)}var rm=_(()=>{l();c();u();Rc()});function tm(e,r,t){if(r.set)r.set.call(e,t);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=t}}var om=_(()=>{l();c();u()});function Qe(e,r,t){var o=Ss(e,r,"set");return tm(e,o,t),t}var nm=_(()=>{l();c();u();om();Cc()});function am(e,r,t){if(!r.has(e))throw new TypeError("attempted to get private field on non-instance");return t}var im=_(()=>{l();c();u()});function sm(e,r){xs(e,r),r.add(e)}var lm=_(()=>{l();c();u();Rc()});function cm(e,r){if(e!==r)throw new TypeError("Private static access of wrong provenance")}var um=_(()=>{l();c();u()});function fm(e,r){if(e===void 0)throw new TypeError("attempted to "+r+" private static field before its declaration")}var dm=_(()=>{l();c();u()});function vo(e,r,t){return cm(e,r),fm(t,"get"),bs(e,t)}var mm=_(()=>{l();c();u();Ac();um();dm()});var Cm={};k(Cm,{Filter:()=>Am,ObjectObserver:()=>Gy,Observable:()=>Qo,Validator:()=>vm});function Ay(e,r){var t=e[r],o=[new Ie(rn,[r],void 0,t,this.proxy)];Gt(this,o),delete e[r];var n=tn(t),a=[new Ie(rn,[r],void 0,n,this.proxy)];return Xr(this,a),!0}function Cy(e,r,t){var o=e[r];if(t!==o){var n=o===void 0?[new Ie(yo,[r],t,void 0,this.proxy)]:[new Ie(en,[r],t,o,this.proxy)];Gt(this,n);var a=_o(t,r,this);e[r]=a;var s=tn(o),f=s===void 0?[new Ie(yo,[r],a,void 0,this.proxy)]:[new Ie(en,[r],a,s,this.proxy)];Xr(this,f)}return!0}function ym(e,r,t){var o=this[qe],n=o.target,a=n.length;e=e<0?Math.max(a+e,0):e,r=r===void 0?0:r<0?Math.max(a+r,0):Math.min(r,a),t=t===void 0?a:t<0?Math.max(a+t,0):Math.min(t,a);var s=Math.min(t-r,a-e);if(e0){var f=n.slice(0),d=[];n.copyWithin(e,r,t);for(var m=e;mr){n.fill(e,r,t);for(var d=r;d0){for(var a=o.slice(r,r+n),s=new Array(n),f=0;fnew Ie(d.type,[...t,...d.path],d.value,d.oldValue,d.object)),s=0,f=n.length;s!(o in Ry));if(r.length)throw new Error(`'${r.join(", ")}' is/are not a valid Observable option/s`);if(Qe(this,Ds,!!e.async),e.validators!==void 0){if(!Array.isArray(e.validators)||e.validators.length===0)throw new Error('"validators" option, if/when provided, MUST be a non-empty array of Validator instances');for(var t of e.validators)if(!(t instanceof vm))throw new Error('"validators" option, if/when provided, MUST be a non-empty array of Validator instances');Ae(this,Ls).push(...e.validators)}}}var ws,Fa,Es,Ts,As,Ma,Cs,Rs,Ic,Nn,On,Is,Pc,Ds,Ls,Dc,Lc,pm,Ps,Jo,Fn,Mn,Zo,qe,yo,en,rn,hm,gm,Ie,vm,Ry,Nc,Oy,xm,wm,My,Em,Am,Uy,Qo,Gy,Rm=_(()=>{l();c();u();os();An();em();rm();nm();im();lm();mm();Cn();ts();as();qe=Symbol.for("object-observer-meta-key-0"),yo="insert",en="update",rn="delete",hm="reverse",gm="shuffle",Ie=(ws=new WeakMap,Fa=new WeakMap,Es=new WeakMap,Ts=new WeakMap,As=new WeakMap,Ma=new WeakMap,(function(){"use strict";function e(r,t,o,n,a){Ye(this,e),Ze(this,ws,{writable:!0,value:void 0}),Ze(this,Fa,{writable:!0,value:void 0}),Ze(this,Es,{writable:!0,value:void 0}),Ze(this,Ts,{writable:!0,value:void 0}),Ze(this,As,{writable:!0,value:void 0}),Ze(this,Ma,{writable:!0,value:void 0}),Qe(this,ws,r),Qe(this,Fa,t),Qe(this,Es,o),Qe(this,Ts,n),Qe(this,As,a)}return Ke(e,[{key:"type",get:function(){return Ae(this,ws)}},{key:"path",get:function(){return Ae(this,Fa)}},{key:"value",get:function(){return Ae(this,Es)}},{key:"oldValue",get:function(){return Ae(this,Ts)}},{key:"object",get:function(){return Ae(this,As)}},{key:"pathAsString",get:function(){return Ae(this,Ma)===void 0&&Qe(this,Ma,Ae(this,Fa).join(".")),Ae(this,Ma)}}]),e})()),vm=(Cs=new WeakMap,Rs=(function(){"use strict";function e(r,t){if(Ye(this,e),Ze(this,Cs,{writable:!0,value:void 0}),r!==vo(e,Rs,Ic))throw new Error("Validator class cannot be instantiated directly; use provided factory methods");Qe(this,Cs,t)}return Ke(e,[{key:"validate",get:function(){return Ae(this,Cs)}}],[{key:"custom",value:function(t){if(typeof t!="function")throw new Error("custom Validator requires a function as argument");return new e(vo(e,Rs,Ic),t)}}]),e})(),Ic={writable:!0,value:Symbol("ValidatorPrivateConstructorKey")},Rs);Ry={async:1,validators:1},Nc=(Nn=new WeakMap,On=new WeakMap,Is=new WeakMap,Pc=new WeakMap,Ds=new WeakMap,Ls=new WeakMap,Dc=new WeakMap,Lc=new WeakSet,pm=(function(){"use strict";function e(r){Ye(this,e),sm(this,Lc),Ze(this,Nn,{writable:!0,value:void 0}),yt(this,"ownKey",void 0),Ze(this,On,{writable:!0,value:void 0}),Ze(this,Is,{writable:!0,value:void 0}),Ze(this,Pc,{writable:!0,value:void 0}),Ze(this,Ds,{writable:!0,value:!1}),yt(this,"batches",new Map),yt(this,"set",void 0),yt(this,"deleteProperty",void 0),Ze(this,Ls,{writable:!0,value:[]}),Ze(this,Dc,{writable:!0,value:[]}),this.set=Cy,this.deleteProperty=Ay;var{target:t,parent:o,ownKey:n,options:a,visited:s=new Set}=r;o&&n!==void 0?(Qe(this,Nn,o),this.ownKey=n):(Qe(this,Nn,null),this.ownKey=null),s.add(t),Qe(this,On,this.observedGraphProcessor(t,this,s)),s.delete(t);var f=Proxy.revocable(Ae(this,On),this);Qe(this,Is,f.proxy),Qe(this,Pc,f.revoke),am(this,Lc,Hy).call(this,a)}return Ke(e,[{key:"detach",value:function(){return Qe(this,Nn,null),Ae(this,On)}},{key:"parent",get:function(){return Ae(this,Nn)}},{key:"target",get:function(){return Ae(this,On)}},{key:"proxy",get:function(){return Ae(this,Is)}},{key:"async",get:function(){return Ae(this,Ds)}},{key:"validators",get:function(){return Ae(this,Ls)}},{key:"observers",get:function(){return Ae(this,Dc)}}]),e})(),pm);Oy={copyWithin:ym,fill:_m,pop:Iy,push:Py,reverse:bm,shift:Dy,sort:Sm,splice:Ly,unshift:Ny},xm=(function(e){"use strict";io(r,e);function r(){return Ye(this,r),no(this,r,arguments)}return Ke(r,[{key:"get",value:function(o,n){return Oy[n]||o[n]}},{key:"observedGraphProcessor",value:function(o,n,a){for(var s=o.length,f=new Array(s),d=0;dn.filter(a=>o.has(a.pathAsString)))}},{key:"pathsStartWith",value:function(t){if(typeof t!="string"||t==="")throw new Error("pathsStartWith Filter requires a non-empty string as argument");return new e(vo(e,Jo,Fn),o=>o.filter(n=>n.pathAsString.startsWith(t)))}},{key:"directChildrenOf",value:function(t){if(typeof t!="string")throw new Error("directChildrenOf Filter requires a string as argument (MAY be empty)");var o=t.split(".").filter(Boolean),n=o.length,a=o.join(".");return new e(vo(e,Jo,Fn),s=>s.filter(f=>{var d=f.path,m=d.length;if(m===n+1){for(var p=0;p{if(!e||typeof e!="object")return null;var r={},t=[];for(var[o,n]of Object.entries(e))if(o==="filters"){if(!Array.isArray(n)||n.length===0)throw new Error('"filters" option, if/when provided, MUST be a non-empty array of Filter instances');for(var a=new Array(n.length),s=0;s!!(e&&e[qe]),observe:(e,r,t)=>{if(!Qo.isObservable(e))throw new Error("invalid observable parameter");if(typeof r!="function")throw new Error(`observer MUST be a function, got '${r}'`);var o=e[qe].observers;o.some(n=>n[0]===r)?console.warn("observer may be bound to an observable only once; will NOT rebind"):o.push([r,Uy(t)])},unobserve:(e,...r)=>{if(!Qo.isObservable(e))throw new Error("invalid observable parameter");var t=e[qe].observers,o=t.length;if(o){if(!r.length){t.splice(0);return}for(;o;)r.indexOf(t[--o][0])>=0&&t.splice(o,1)}}}),Gy=(Mn=new WeakMap,Zo=new WeakMap,(function(){"use strict";function e(r){Ye(this,e),Ze(this,Mn,{writable:!0,value:void 0}),Ze(this,Zo,{writable:!0,value:void 0}),Qe(this,Mn,r),Qe(this,Zo,new Set),Object.freeze(this)}return Ke(e,[{key:"observe",value:function(t,o){var n=Qo.from(t);return Qo.observe(n,Ae(this,Mn),o),Ae(this,Zo).add(n),n}},{key:"unobserve",value:function(t){Qo.unobserve(t,Ae(this,Mn)),Ae(this,Zo).delete(t)}},{key:"disconnect",value:function(){for(var t of Ae(this,Zo))Qo.unobserve(t,Ae(this,Mn));Ae(this,Zo).clear()}}]),e})())});var Bc={};k(Bc,{awaitStorage:()=>on,createStorage:()=>bo,createStorageAndCallback:()=>Mc,createStorageAsync:()=>Vy,getPreloadedStorage:()=>Os,preloadStorageIfExists:()=>ka,purgeStorage:()=>kn,updateStorage:()=>Fc,useObservable:()=>Ht});function Bn(){if(Ns)return Ns;var e=(Rm(),Ne(Cm));return Ns=e.Observable??e,Ns}function Oc(e){var r=Ia(t=>{lt(e,JSON.stringify(t))},500);return{get:()=>x(function*(){try{return JSON.parse(yield Wo(e))}catch(t){throw new Error(`Failed to parse storage from '${e}'`,{cause:t})}})(),set:t=>x(function*(){if(!t||typeof t!="object")throw new Error("data needs to be an object");r(t)})(),exists:()=>x(function*(){return yield Ot(e)})()}}function Ht(e,r){if(e.some(o=>o?.[Im]))throw new Error("An error occured while initializing the storage");if(e.some(o=>!Bn().isObservable(o)))throw new Error("Argument passed isn't an Observable");var[,t]=React.useReducer(o=>~o,0);React.useEffect(()=>{var o=()=>t();return e.forEach(n=>Bn().observe(n,o,r)),()=>{e.forEach(n=>Bn().unobserve(n,o))}},[])}function Fc(e,r){return x(function*(){St[e]=r,Oc(e).set(r)})()}function Mc(e,r,{dflt:t={},nullIfEmpty:o=!1}={}){var n,a=f=>{var d=new Proxy(Bn().from(f),{get(p,T,I){return T===Symbol.for("vendetta.storage.emitter")?n||(n=new cs,Bn().observe(p,P=>{for(var C of P)n.emit(C.type!=="delete"?"SET":"DEL",{path:C.path,value:C.value})}),n):Reflect.get(p,T,I)}}),m=()=>s.set(d);Bn().observe(d,m),r(d)},s=Oc(e);St[e]?a(St[e]):s.exists().then(f=>x(function*(){f?a(St[e]=yield s.get()):o?a(St[e]=null):(St[e]=t,yield s.set(t),a(t))})())}function Vy(e){return x(function*(r,t={}){return new Promise(o=>Mc(r,o,t))}).apply(this,arguments)}function ka(e){return x(function*(){if(St[e])return!0;var r=Oc(e);return(yield r.exists())?(St[e]=yield r.get(),!0):!1})()}function kn(e){return x(function*(){yield zo(e),delete St[e]})()}function on(...e){return Promise.all(e.map(r=>r[Pm]))}function Os(e){return St[e]}var Ns,Im,Pm,St,bo,ut=_(()=>{"use strict";l();c();u();be();ic();Ft();Rn();Ns=null;Im=Symbol.for("bunny.storage.initError"),Pm=Symbol.for("bunny.storage.promise"),St={};bo=(e,r={})=>{var t=new Promise(d=>s=d),o,n,a,s;Mc(e,d=>{o=d,n=!0,s()},r);var f=()=>{if(n)return!0;throw new Error(`Attempted to access storage without initializing: ${e}`)};return new Proxy({},{...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(d=>[d,(m,...p)=>f()&&Reflect[d](o,...p)])),get(d,m,p){return m===Im?a:m===Pm?t:f()&&Reflect.get(o??d,m,p)}})}});var zc={};k(zc,{DISCORD_SERVER:()=>kc,GITHUB:()=>jc,HTTP_REGEX:()=>$y,HTTP_REGEX_MULTI:()=>Uc,KETTU_DISCORD_SERVER_ID:()=>Vc,KETTU_PLUGINS_CHANNEL_ID:()=>$c,KETTU_THEMES_CHANNEL_ID:()=>Ga,NEXPID_PLUGINS_REPO_URL:()=>zy,OFFICIAL_PLUGINS_REPO_URL:()=>nn,VD_DISCORD_SERVER_ID:()=>Gc,VD_PLUGINS_CHANNEL_ID:()=>Hc,VD_PROXY_PREFIX:()=>ja,VD_THEMES_CHANNEL_ID:()=>Ua});var kc,jc,$y,Uc,zy,nn,ja,Gc,Hc,Ua,Vc,$c,Ga,jn=_(()=>{"use strict";l();c();u();kc="https://discord.gg/nQykFF9Ud6",jc="https://github.com/kmmiio99o/ShiggyCord",$y=/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/,Uc=/https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&\/=]*)/g,zy="https://revenge.nexpid.xyz",nn="https://raw.githubusercontent.com/Purple-EyeZ/Plugins-List/refs/heads/main/src/plugins-data.json",ja="https://vd-plugins.github.io/proxy",Gc="1427396621905432699",Hc="1432796541210333284",Ua="1408405946434195540",Vc="1368145952266911755",$c="1432796541210333284",Ga="1408405946434195540"});function Fs(e,r=0){for(var t=3735928559^r,o=1103547991^r,n=0,a;n>>16,2246822507),t^=Math.imul(o^o>>>13,3266489909),o=Math.imul(o^o>>>16,2246822507),o^=Math.imul(t^t>>>13,3266489909),[o>>>0,t>>>0]}function Dm(e,r=0){var[t,o]=Fs(e,r);return t.toString(36).padStart(7,"0")+o.toString(36).padStart(7,"0")}var Wc=_(()=>{"use strict";l();c();u()});function Vt(e,r){return $t(e,r,{walkable:["props","children","child","sibling"]})}var Lm=_(()=>{"use strict";l();c();u();Jr()});function Yc(e,r,t,o,n,a){if(!(a>n)&&e){try{if(r(e))return e}catch{}if(Array.isArray(e)){for(var s of e)if(!(typeof s!="object"||s===null))try{var f=Yc(s,r,t,o,n,a+1);if(f)return f}catch{}}else if(typeof e=="object"){for(var d in e)if(Object.prototype.hasOwnProperty.call(e,d)!==!1&&!(typeof e[d]!="object"||e[d]===null)&&!(t.size&&!t.has(d))&&!(o.size&&o.has(d)))try{var m=Yc(e[d],r,t,o,n,a+1);if(m)return m}catch{}}}}function $t(e,r,{walkable:t=[],ignore:o=[],maxDepth:n=100}={}){return Yc(e,r,new Set(t),new Set(o),n,0)}var Nm=_(()=>{"use strict";l();c();u()});function Kc(e,r,t){var o=e;if(r in e)return void t(o[r]);var n;return Object.defineProperty(o,r,{get:()=>n,set(a){n=t(a)??a},configurable:!0,enumerable:!1}),()=>{delete o[r],o[r]=n}}var Om=_(()=>{"use strict";l();c();u()});function qc(e,r){if(!e){var t=typeof r=="function"?r():r,o="[Invariant Violation]",n=t?`${o}: ${t}`:o;throw new Error(n)}}var Fm=_(()=>{"use strict";l();c();u()});var Xc={};k(Xc,{LoggerClass:()=>Ka,connectToDebugger:()=>Ky,disconnectFromDebugger:()=>qy,isConnectedToDebugger:()=>Xy,logger:()=>A});function Mm(e){return JSON.stringify(e)}function Un(e,...r){if(Sr?.readyState===WebSocket.OPEN){var t={type:"log",data:{level:e,message:r}};Sr.send(Mm(t))}}function Yy(){Ha=console.log,console.log=function(...e){Ha.apply(console,e),Un("default",...e)},Va=console.error,console.error=function(...e){Va.apply(console,e),Un("error",...e)},$a=console.warn,console.warn=function(...e){$a.apply(console,e),Un("warn",...e)},A&&(za=A.log,A.log=function(...e){za.apply(A,e),Un("default",...e)},Wa=A.error,A.error=function(...e){Wa.apply(A,e),Un("error",...e)},Ya=A.warn,A.warn=function(...e){Ya.apply(A,e),Un("warn",...e)})}function Ms(){Ha&&(console.log=Ha,Ha=void 0),Va&&(console.error=Va,Va=void 0),$a&&(console.warn=$a,$a=void 0),A&&(za&&(A.log=za,za=void 0),Wa&&(A.error=Wa,Wa=void 0),Ya&&(A.warn=Ya,Ya=void 0))}function Ky(e){if(Sr!==void 0&&Sr.readyState!==WebSocket.CLOSED&&(Ms(),Sr.close()),!e){console.error("Invalid debugger URL!");return}try{Sr=new WebSocket(`ws://${e}`),Sr.addEventListener("open",()=>{console.log("Connected to debugger.");var r={type:"hello",data:{version:Wy}};Sr?.send(Mm(r)),Yy()}),Sr.addEventListener("message",r=>{try{var t=JSON.parse(r.data);if(t.type==="run"&&t.data?.code)try{(0,eval)(t.data.code)}catch(o){console.error("Error executing remote code:",o)}}catch(o){console.error("Error processing message:",o)}}),Sr.addEventListener("close",()=>{console.log("Disconnected from debugger."),Ms()}),Sr.addEventListener("error",r=>{console.error(`Debugger error: ${r.message}`),Ms()})}catch(r){console.error("Failed to connect to debugger:",r)}}function qy(){Sr&&(Ms(),Sr.close(),Sr=void 0)}function Xy(){return Sr?.readyState===WebSocket.OPEN}var Ka,A,Sr,Ha,Va,$a,za,Wa,Ya,Wy,vr=_(()=>{"use strict";l();c();u();Le();Ka=br("Logger"),A=new Ka("ShiggyCord"),Wy=1});function ze(e,r,t=1e4){return x(function*(){var o=yield fetch(e,{signal:Jy(t),...r});if(!o.ok)throw new Error(`Request returned non-ok: ${o.status} ${o.statusText}`);return o})()}function Jy(e){var r=new AbortController;return setTimeout(()=>r.abort(`Timed out after ${e}ms`),e),r.signal}var Bs=_(()=>{"use strict";l();c();u();be()});var ks={};k(ks,{constants:()=>zc,cyrb64:()=>Fs,findInReactTree:()=>Vt,findInTree:()=>$t,hookDefineProperty:()=>Kc,invariant:()=>qc,lazy:()=>dc,logger:()=>Xc,safeFetch:()=>ze});var Jr=_(()=>{"use strict";l();c();u();jn();Wc();Lm();Nm();Om();Fm();Oe();vr();Bs()});var Jc={};k(Jc,{Fragment:()=>Gn,jsx:()=>i,jsxs:()=>b});function km(e){if(!e[0])throw new Error("The first argument (Component) is falsy. Ensure that you are passing a valid component.");var r=fc(e[0]);return r&&(e[0]=r()),e}var Bm,Gn,i,b,ae=_(()=>{"use strict";l();c();u();Oe();Le();Bm=U("jsx","jsxs","Fragment");Gn=Symbol.for("react.fragment"),i=(...e)=>Bm.jsx(...km(e)),b=(...e)=>Bm.jsxs(...km(e))});var Ge,qa=_(()=>{"use strict";l();c();u();ut();Ge=bo("themes/colors/preferences.json",{dflt:{selected:null,customBackground:null}})});var Gs={};k(Gs,{ActionSheet:()=>er,ActionSheetRow:()=>Qy,AlertActionButton:()=>Vn,AlertActions:()=>iu,AlertModal:()=>Qa,Avatar:()=>lu,AvatarPile:()=>su,BottomSheetTitleHeader:()=>Qr,Button:()=>Z,Card:()=>de,CompatButton:()=>Zc,CompatSegmentedControl:()=>m_,ContextMenu:()=>l_,FlashList:()=>fu,FloatingActionButton:()=>cu,FormCheckbox:()=>i_,FormRadio:()=>au,FormSwitch:()=>nu,Forms:()=>js,HelpMessage:()=>Ja,IconButton:()=>we,LegacyAlert:()=>Xa,LegacyForm:()=>h_,LegacyFormArrow:()=>g_,LegacyFormCTA:()=>v_,LegacyFormCTAButton:()=>y_,LegacyFormCardSection:()=>__,LegacyFormCheckbox:()=>b_,LegacyFormCheckboxRow:()=>S_,LegacyFormCheckmark:()=>x_,LegacyFormDivider:()=>w_,LegacyFormHint:()=>E_,LegacyFormIcon:()=>T_,LegacyFormInput:()=>uu,LegacyFormLabel:()=>A_,LegacyFormRadio:()=>C_,LegacyFormRadioGroup:()=>R_,LegacyFormRadioRow:()=>I_,LegacyFormRow:()=>ei,LegacyFormSection:()=>P_,LegacyFormSelect:()=>D_,LegacyFormSliderRow:()=>L_,LegacyFormSubLabel:()=>N_,LegacyFormSwitch:()=>O_,LegacyFormSwitchRow:()=>F_,LegacyFormTernaryCheckBox:()=>M_,LegacyFormText:()=>Us,LegacyFormTitle:()=>B_,PressableScale:()=>r_,RedesignCompat:()=>s_,RowButton:()=>e_,SafeAreaProvider:()=>Qc,SafeAreaView:()=>Za,SegmentedControl:()=>u_,SegmentedControlPages:()=>f_,Stack:()=>oe,TableCheckbox:()=>a_,TableCheckboxRow:()=>zt,TableRadio:()=>n_,TableRadioGroup:()=>t_,TableRadioRow:()=>o_,TableRow:()=>B,TableRowGroup:()=>pe,TableRowIcon:()=>Hn,TableRowTrailingText:()=>tu,TableSwitch:()=>ou,TableSwitchRow:()=>ft,Text:()=>D,TextArea:()=>c_,TextInput:()=>cr,TwinButtons:()=>ru,useSafeAreaInsets:()=>eu,useSegmentedControlState:()=>d_});var Zy,Zr,Pe,Xa,Zc,Ja,Za,Qc,eu,Qy,Z,ru,we,e_,r_,B,Hn,tu,pe,t_,o_,ft,zt,ou,n_,a_,nu,au,i_,de,s_,Qa,Vn,iu,su,l_,oe,lu,cr,c_,u_,f_,d_,m_,cu,er,Qr,p_,D,js,h_,g_,v_,y_,__,b_,S_,x_,w_,E_,T_,uu,A_,C_,R_,I_,ei,P_,D_,L_,N_,O_,F_,M_,Us,B_,fu,ce=_(()=>{"use strict";l();c();u();Oe();us();Pn();Le();Zy=Kr(([e],r)=>r[e]&&Object.keys(r).length===1,e=>`bunny.metro.common.components.bySingularProp(${e})`),Zr=e=>Ve(()=>lr(Zy(e))?.[e]),Pe=(...e)=>Ve(()=>L(...e)[e[0]]),Xa=yc("FluxContainer(Alert)"),Zc=U("Looks","Colors","Sizes"),Ja=br("HelpMessage"),{SafeAreaView:Za,SafeAreaProvider:Qc,useSafeAreaInsets:eu}=K(()=>L("useSafeAreaInsets")),Qy=Pe("ActionSheetRow"),Z=Zr("Button"),ru=Pe("TwinButtons"),we=Zr("IconButton"),e_=Pe("RowButton"),r_=Pe("PressableScale"),B=Pe("TableRow"),Hn=Pe("TableRowIcon"),tu=Pe("TableRowTrailingText"),pe=Pe("TableRowGroup"),t_=Pe("TableRadioGroup"),o_=Pe("TableRadioRow"),ft=Pe("TableSwitchRow"),zt=Pe("TableCheckboxRow"),ou=Zr("FormSwitch"),n_=Zr("FormRadio"),a_=Zr("FormCheckbox"),nu=Zr("FormSwitch"),au=Zr("FormRadio"),i_=Zr("FormCheckbox"),de=Pe("Card"),s_=Ve(()=>L("RedesignCompat").RedesignCompat),Qa=Pe("AlertModal"),Vn=Pe("AlertActionButton"),iu=Pe("AlertActions"),su=Zr("AvatarPile"),l_=Pe("ContextMenu"),oe=Pe("Stack"),lu=Pe("default","AvatarSizes","getStatusSize"),cr=Zr("TextInput"),c_=Zr("TextArea"),u_=Pe("SegmentedControl"),f_=Pe("SegmentedControlPages"),d_=Zr("useSegmentedControlState"),m_=Pe("CompatSegmentedControl"),cu=Pe("FloatingActionButton"),er=Pe("ActionSheet"),Qr=Pe("BottomSheetTitleHeader"),p_=U("Text","LegacyText"),D=Ve(()=>p_.Text),js=U("Form","FormSection"),{Form:h_,FormArrow:g_,FormCTA:v_,FormCTAButton:y_,FormCardSection:__,FormCheckbox:b_,FormCheckboxRow:S_,FormCheckmark:x_,FormDivider:w_,FormHint:E_,FormIcon:T_,FormInput:uu,FormLabel:A_,FormRadio:C_,FormRadioGroup:R_,FormRadioRow:I_,FormRow:ei,FormSection:P_,FormSelect:D_,FormSliderRow:L_,FormSubLabel:N_,FormSwitch:O_,FormSwitchRow:F_,FormTernaryCheckBox:M_,FormText:Us,FormTitle:B_}=K(()=>js),fu=Pe("FlashList")});var Vs={};k(Vs,{Flux:()=>_u,FluxDispatcher:()=>xr,FluxUtils:()=>bu,NavigationNative:()=>Ee,React:()=>W,ReactNative:()=>Hs,assets:()=>pu,channels:()=>ri,clipboard:()=>Be,commands:()=>an,components:()=>Gs,constants:()=>dt,i18n:()=>mu,invites:()=>hu,messageUtil:()=>et,navigation:()=>gu,navigationStack:()=>vu,semver:()=>$n,toasts:()=>ti,tokens:()=>xt,url:()=>yu,useToken:()=>k_});var jm,dt,ri,mu,Be,pu,hu,an,gu,ti,et,vu,Ee,$n,xt,k_,du,yu,_u,xr,bu,W,Hs,Q=_(()=>{"use strict";l();c();u();Oe();Le();jm=H(re());ce();dt=U("Fonts","Permissions"),ri=U("getVoiceChannelId"),mu=U("Messages"),Be=U("setString","getString","hasString"),pu=U("registerAsset"),hu=U("acceptInviteAndTransitionToInviteChannel"),an=U("getBuiltInCommands"),gu=U("pushLazy"),ti=Ln("modules/toast/native/ToastActionCreators.tsx",!0),et=U("sendBotMessage"),vu=U("createStackNavigator"),Ee=U("NavigationContainer"),$n=U("parse","clean"),xt=U("unsafe_rawColors","colors"),{useToken:k_}=K(()=>L("useToken")),du=e=>jm.Linking.openURL(e),yu=nativeModuleProxy.NativeLinkingModule||nativeModuleProxy.DCDLinkingManager?{openURL:du,openDeeplink:du,handleSupportedURL:du,isDiscordConnectOauth2Deeplink:()=>(console.warn("url.isDiscordConnectOauth2Deeplink is not implemented and will always return false"),!1),showLongPressUrlActionSheet:()=>console.warn("url.showLongPressUrlActionSheet is not implemented"),handleMessageLinking:Ln("modules/links/native/handleContentLinking.tsx",!0)}:U("openURL","openDeeplink"),_u=U("connectStores"),xr=L("_interceptors"),bu=L("useStateFromStores"),W=globalThis.React=U("createElement"),Hs=globalThis.ReactNative=U("AppRegistry")});var $s={};k($s,{common:()=>Vs,factories:()=>Na,filters:()=>lc,findAllExports:()=>po,findAllModule:()=>uc,findAllModuleId:()=>_y,findByDisplayName:()=>vc,findByDisplayNameAll:()=>_c,findByDisplayNameLazy:()=>yc,findByFilePath:()=>xc,findByFilePathLazy:()=>Ln,findByName:()=>ys,findByNameAll:()=>gc,findByNameLazy:()=>br,findByProps:()=>L,findByPropsAll:()=>hc,findByPropsLazy:()=>U,findByStoreName:()=>qo,findByStoreNameLazy:()=>kt,findByTypeName:()=>bc,findByTypeNameAll:()=>Sc,findByTypeNameLazy:()=>Ey,findExports:()=>lr,findModule:()=>cc,findModuleId:()=>yy,lazy:()=>mc});var Fe=_(()=>{"use strict";l();c();u();Q();us();ms();Pn();vs();Le()});var zn=Nt(($R,Um)=>{l();c();u();Um.exports=go()["chroma-js"]});function Hm(e){var r=(it="dark")=>(Ge.type??it)==="dark"?"darker":"light";if(e.spec===3){var t={};for(var[o,n]of Object.entries(e.main.semantic??{}))if(typeof n=="object"){var{type:a,value:s,opacity:f}=n;if(a==="raw")t[o]={value:s,opacity:f??1};else{var d=Gm.RawColor[s];t[o]={value:d,opacity:f??1}}}else if(typeof n=="string")n.startsWith("#")?t[o]={value:oi()(n).hex(),opacity:1}:t[o]={value:Gm.RawColor[n],opacity:1};else throw new Error(`Invalid semantic definitions: ${n}`);return Wn.Platform.OS==="android"&&ni(e.main.raw),{spec:3,reference:r(e.type),semantic:t,raw:e.main.raw??{},background:e.main.background}}if(e.spec===2){var m={},p=e.background?{...Pa(e.background,["alpha"]),opacity:e.background.alpha}:void 0;if(e.semanticColors)for(var T in e.semanticColors){var I=e.semanticColors[T].map(it=>it||void 0).slice(0,2);I[0]&&(m[T]={value:So(I[r()==="light"?1:0]),opacity:1})}if(e.rawColors){var P={};for(var C in e.rawColors){var F=e.rawColors[C];F&&(P[C]=So(F))}Wn.Platform.OS==="android"&&ni(P),e.rawColors=P}return{spec:2,reference:r(),semantic:m,raw:e.rawColors??{},background:p}}if(e.spec===1||e.theme_color_map&&!e.spec){var te={},Ce={},me=r()==="light"?1:0;if(e.theme_color_map)for(var[ee,ar]of Object.entries(e.theme_color_map)){if(!Array.isArray(ar)||ar.length<2){console.warn(`[Parser] Invalid color array for ${ee}:`,ar);continue}var Bo=ar[me];if(!Bo){console.warn(`[Parser] Missing color value for ${ee} at index ${me}`);continue}var at=So(Bo);at&&(te[ee]={value:at,opacity:1})}var mr=e.colours||e.colors;if(mr){for(var[Vr,Ue]of Object.entries(mr))if(typeof Ue=="string"){var pr=So(Ue);if(pr){var $r=j_(Vr);Ce[$r]=pr,$r!==Vr&&(Ce[Vr]=pr)}}}if(e.unsafe_colors){for(var[z,ir]of Object.entries(e.unsafe_colors))if(typeof ir=="string"){var ko=So(ir);ko&&(Ce[z]=ko)}}return Wn.Platform.OS==="android"&&ni(Ce),{spec:2,reference:r(),semantic:te,raw:Ce,background:e.background}}throw new Error("Invalid theme spec")}function j_(e){var r={PRIMARY_DARK:"PRIMARY_100",PRIMARY_DARK_100:"PRIMARY_100",PRIMARY_DARK_200:"PRIMARY_200",PRIMARY_DARK_300:"PRIMARY_300",PRIMARY_DARK_360:"PRIMARY_360",PRIMARY_DARK_400:"PRIMARY_400",PRIMARY_DARK_500:"PRIMARY_500",PRIMARY_DARK_600:"PRIMARY_600",PRIMARY_DARK_630:"PRIMARY_630",PRIMARY_DARK_700:"PRIMARY_700",PRIMARY_DARK_800:"PRIMARY_800",PRIMARY_DARK_900:"PRIMARY_900"};return r[e]||e}function ni(e){if(e){var r={BLACK_ALPHA_60:["BLACK",.6],BRAND_NEW_360_ALPHA_20:["BRAND_360",.2],BRAND_NEW_360_ALPHA_25:["BRAND_360",.25],BRAND_NEW_500_ALPHA_20:["BRAND_500",.2],PRIMARY_DARK_500_ALPHA_20:["PRIMARY_500",.2],PRIMARY_DARK_700_ALPHA_60:["PRIMARY_700",.6],STATUS_GREEN_500_ALPHA_20:["GREEN_500",.2],STATUS_RED_500_ALPHA_20:["RED_500",.2]};for(var t in r){var[o,n]=r[t];e[o]&&(e[t]=oi()(e[o]).alpha(n).hex())}return e}}function So(e){if(e!==void 0){if(e.toLowerCase()==="transparent")return"#00000000";if(oi().valid(e))return oi()(e).hex();var r=Number((0,Wn.processColor)(e));return oi().rgb(r>>16&255,r>>8&255,r&255,r>>24&255).hex()}}var Wn,oi,Gm,Su=_(()=>{"use strict";l();c();u();Fe();Rn();Wn=H(re());qa();oi=()=>zn(),Gm=L("SemanticColor")});function Et(e,{update:r=!0}){if(!N.safeMode?.enabled){var t=e?Hm(e):null,o=Object.assign(he,{current:t,key:`bn-theme-${++$m}`,lastSetDiscordTheme:Vm.theme.startsWith("bn-theme-")?he.lastSetDiscordTheme:Vm.theme});if(t!=null)try{if(wt.Theme[o.key.toUpperCase()]=o.key,!wu.DIVIDER_COLORS[o.current.reference])throw new Error(`Missing divider color reference: ${o.current.reference}`);wu.DIVIDER_COLORS[o.key]=wu.DIVIDER_COLORS[o.current.reference],Object.keys(wt.Shadow).forEach(a=>{if(!(o.current.reference in wt.Shadow[a]))throw new Error(`Missing shadow reference: ${o.current.reference}`);wt.Shadow[a][o.key]=wt.Shadow[a][o.current.reference]}),Object.keys(wt.SemanticColor).forEach(a=>{if(!(o.current.reference in wt.SemanticColor[a]))throw new Error(`Missing semantic color reference: ${o.current.reference}`);wt.SemanticColor[a][o.key]={...wt.SemanticColor[a][o.current.reference]}})}catch(a){console.error("Failed to register custom theme key, falling back",a),o.current=null}if(r){xu.setShouldSyncAppearanceSettings(!1);var n=o.current!=null?o.key:o.lastSetDiscordTheme;try{xu.updateTheme(n)}catch(a){console.error(`Native rejected theme "${n}", reverting to "${o.lastSetDiscordTheme}"`,a);try{xu.updateTheme(o.lastSetDiscordTheme)}catch(s){console.error("Fallback theme also failed to apply",s)}}}}}var wt,U_,xu,Vm,wu,$m,he,xo=_(()=>{"use strict";l();c();u();ke();Fe();Su();wt=L("SemanticColor"),U_={...wt.RawColor},xu=U("updateTheme"),Vm=kt("ThemeStore"),wu=U("DIVIDER_COLORS"),$m=1,he={current:null,key:`bn-theme-${$m}`,origRaw:U_,lastSetDiscordTheme:"darker"}});function H_({children:e}){Ht([Ge]);var r=he.current?.background,t=r?.url,o=r?.blur;return!he.current||Ge.customBackground==="hidden"||!t||o!==void 0&&typeof o!="number"?e:i(ai.ImageBackground,{style:{flex:1,height:"100%"},source:{uri:t},blurRadius:typeof o=="number"?o:0,children:e})}function Eu(){try{if(!zm)return;var e=[xe("render",zm,(r,t)=>{if(!t)return t;try{if(!he.current||!he.current.background?.url)return t;var o=Vt(t,s=>s&&"HACK_fixModalInteraction"in(s.props??{})&&s?.props?.style);if(o)try{var n=ai.StyleSheet.flatten(o.props.style),a=G_()(n.backgroundColor||"black").alpha(1-(he.current.background?.opacity??1)).hex();o.props.style=ai.StyleSheet.flatten([o.props.style,{backgroundColor:a}])}catch(s){A.warn("Background patch: failed to modify style",s)}}catch(s){return A.warn("Background patch: render error",s),t}return i(H_,{children:t})})];return()=>e.forEach(r=>r?.())}catch(r){A.error("Background patch: failed to initialize",r)}}var ai,G_,zm,Wm=_(()=>{"use strict";l();c();u();ae();qa();xo();He();ut();Jr();Fe();ai=H(re());vr();G_=()=>zn(),zm=Ln("modules/messages/native/Messages.tsx",!0)});function Au(){var e=([t])=>t===he.key?[he.current.reference]:void 0;Object.defineProperty(Yn,"DARKER",{configurable:!0,enumerable:!0,get:()=>he.current?.reference==="darker"?he.key:Km}),Object.defineProperty(Yn,"LIGHT",{configurable:!0,enumerable:!0,get:()=>he.current?.reference==="light"?he.key:qm}),Object.keys(sn.RawColor).forEach(t=>{Object.defineProperty(sn.RawColor,t,{configurable:!0,enumerable:!0,get:()=>{var o=he.current?.raw[t];return o||Ym[t]}})});var r=[_t("updateTheme",Jl,e),ct("resolveSemanticColor",sn.default.meta??sn.default.internal,(t,o)=>{if(!he.current)return o(...t);if(t[0]!==he.key)return o(...t);t[0]=he.current.reference;var[n,a]=Jm(he.current.reference,t[1]),s=he.current.semantic[n];if(!s&&he.current.spec===2&&n in Xm&&(s=he.current.semantic[Xm[n]]),s?.value)return s.opacity===1?s.value:(0,Tu.default)(s.value).alpha(s.opacity).hex();var f=he.current.raw[a.raw];return f?a.opacity===1?f:(0,Tu.default)(f).alpha(a.opacity).hex():o(...t)}),()=>{Object.defineProperty(Yn,"DARKER",{configurable:!0,writable:!0,value:Km}),Object.defineProperty(Yn,"LIGHT",{configurable:!0,writable:!0,value:qm}),Object.defineProperty(sn,"RawColor",{configurable:!0,writable:!0,value:Ym})}];return()=>r.forEach(t=>t())}function Jm(e,r){var t=r[Jm._sym??=Object.getOwnPropertySymbols(r)[0]],o=sn.SemanticColor[t];return[t,o[e]]}var Tu,sn,Yn,Ym,Km,qm,Xm,Zm=_(()=>{"use strict";l();c();u();xo();Yr();He();Fe();Tu=H(zn()),sn=L("SemanticColor"),Yn=L("ThemeTypes")?.ThemeTypes,Ym={...sn.RawColor},Km=Yn.DARKER,qm=Yn.LIGHT,Xm={BG_BACKDROP:"BACKGROUND_FLOATING",BG_BASE_PRIMARY:"BACKGROUND_PRIMARY",BG_BASE_SECONDARY:"BACKGROUND_SECONDARY",BG_BASE_TERTIARY:"BACKGROUND_SECONDARY_ALT",BG_MOD_FAINT:"BACKGROUND_MODIFIER_ACCENT",BG_MOD_STRONG:"BACKGROUND_MODIFIER_ACCENT",BG_MOD_SUBTLE:"BACKGROUND_MODIFIER_ACCENT",BG_SURFACE_OVERLAY:"BACKGROUND_FLOATING",BG_SURFACE_OVERLAY_TMP:"BACKGROUND_FLOATING",BG_SURFACE_RAISED:"BACKGROUND_MOBILE_PRIMARY"}});function Cu(){var e=new Set(["ThemeStore","SelectivelySyncedUserSettingsStore"]),r=[xe("get",Qm,([t],o)=>{if(!(!he.current||!e.has(t))){var n=$t(o._state,a=>typeof a.theme=="string");n&&(n.theme=he.key)}}),_t("set",Qm,([t,o])=>{if(e.has(t)){var n=JSON.stringify(o),a=he.lastSetDiscordTheme??"darker",s=n.replace(/"theme":"bn-theme-\d+"/,`"theme":${JSON.stringify(a)}`);return[t,JSON.parse(s)]}})];return()=>r.forEach(t=>t())}var Qm,ep=_(()=>{"use strict";l();c();u();xo();He();Jr();Oe();Fe();Qm=Ve(()=>{var e=L("impl");return typeof e?.impl=="object"?e.impl:L("storage")})});function rp(){var e=he.current;if(e?.reference)return e.reference==="light"?"dark-content":"light-content";var r=tp?.theme;if(typeof r=="string"){var t=r.toLowerCase();return t.includes("dark")||t.includes("midnight")?"light-content":"dark-content"}return"light-content"}function Ru(){function e(){var a=rp();Wt.StatusBar.setBarStyle(a,!0),Wt.Platform.OS==="android"&&(Wt.StatusBar.setTranslucent?.(!0),Wt.StatusBar.setBackgroundColor?.("#00000000",!0))}if(Wt.Platform.OS==="android"){var r=Wt.StatusBar.setBarStyle;Wt.StatusBar.setBarStyle=function(a,...s){return r.call(this,rp(),...s)}}var t=tp?.addChangeListener?.(e);e();for(var o=200,n=0;n<5;n++,o*=2)setTimeout(e,o);return t}var Wt,tp,op=_(()=>{"use strict";l();c();u();Wt=H(re());Le();xo();tp=kt("ThemeStore")});function Iu(e){e&&Et(e,{update:!1});var r=[Cu(),Au(),Eu(),Ru()];return()=>r.forEach(t=>t&&(typeof t=="function"?t():null))}var np=_(()=>{"use strict";l();c();u();Wm();Zm();ep();xo();op()});var cn={};k(cn,{fetchTheme:()=>ln,getCurrentTheme:()=>Rr,getThemeFromLoader:()=>wo,initThemes:()=>Pu,installTheme:()=>Tt,removeTheme:()=>Yt,selectTheme:()=>rt,themes:()=>ge,updateThemes:()=>zs,writeThemeToNative:()=>Kn});function Kn(e){return x(function*(){if(typeof e!="object")throw new Error("Theme must be an object");yield Xo(ip()||"theme.json").set(e)})()}function V_(e){if(e.semanticColors){var{semanticColors:r}=e;for(var t in r)for(var o in r[t])r[t][o]&&=So(r[t][o])||!1}if(e.rawColors){var{rawColors:n}=e;for(var a in n){var s=So(n[a]);s&&(e.rawColors[a]=s)}ap.Platform.OS==="android"&&ni(n)}return e.spec===void 0&&("theme_color_map"in e||(e.spec=2)),e}function $_(e){return typeof e!="object"||e===null||e.spec===3&&!e.main?!1:e.spec===2||e.theme_color_map?!0:e.spec===2||e.spec===3}function ln(e,r=!1){return x(function*(){var t;try{t=yield(yield ze(e,{cache:"no-store"})).json()}catch{throw new Error(`Failed to fetch theme at ${e}`)}if(!$_(t))throw new Error(`Invalid theme at ${e}`);ge[e]={id:e,selected:r,data:V_(t)},r&&(Kn(ge[e]),Et(ge[e].data,{update:!0}))})()}function Tt(e){return x(function*(){if(typeof e!="string"||e in ge)throw new Error("Theme already installed");yield ln(e)})()}function rt(e,r=!0){if(e&&(e.selected=!0),Object.keys(ge).forEach(t=>ge[t].selected=ge[t].id===e?.id),e==null&&r)return Et(null,{update:!0}),Kn({});if(e)return Et(e.data,{update:!0}),Kn(e)}function Yt(e){return x(function*(){var r=ge[e];return r.selected&&(yield rt(null)),delete ge[e],r.selected})()}function zs(){return x(function*(){yield Ut(ge);var e=wo();yield h(Object.keys(ge).map(r=>ln(r,e?.id===r)))})()}function Rr(){return Object.values(ge).find(e=>e.selected)??null}function wo(){return Ws()??Rr()}function Pu(){return x(function*(){if(mt()&&!N.safeMode?.enabled)try{ur()&<("../vendetta_theme.json","null"),yield on(Ge),yield Ut(ge);var e=wo();Iu(e?.data??null),zs().catch(r=>console.error("Failed to update themes",r))}catch(r){console.error("Failed to initialize themes",r)}})()}var ap,ge,Ir=_(()=>{"use strict";l();c();u();be();$e();Ft();Kt();ut();Jr();ap=H(re());ke();np();Su();qa();xo();ge=qr(Cr(bt("VENDETTA_THEMES")))});function kr(){return qt!=null}function ur(){return Eo!=null}function un(){return Ys!=null}function Xn(){return qn!=null}function z_(){if(!ur()||kr()||!un())return null;var e;return un()==!0?e={name:Ys.loaderName,features:{}}:e={name:Eo.loaderName,features:{}},Ks()&&(e.features.loaderConfig=!0),up()&&(e.features.syscolors={prop:"__vendetta_syscolors"},Object.defineProperty(globalThis,"__vendetta_syscolors",{get:()=>W_(),configurable:!0})),mt()&&(e.features.themes={prop:"__vendetta_theme"},Object.defineProperty(globalThis,"__vendetta_theme",{get:()=>{var r=Ws()?.id;if(!r)return null;var{themes:t}=(Ir(),Ne(cn));return t[r]??Ws()??null},configurable:!0})),Object.defineProperty(globalThis,"__vendetta_loader",{get:()=>e,configurable:!0}),e}function Du(){return globalThis.__vendetta_loader?globalThis.__vendetta_loader:z_()}function Lu(){return ur()?Eo.loaderName:un()?Ys.loadername:kr()?qt.name:Xn()?qn.loaderName:"Unknown"}function sp(){return ur()?Eo.loaderVersion:un()?Ys.loaderVersion:Xn()?qn.loaderVersion:null}function Ks(){return ur()?!0:kr()?qt.features.loaderConfig:!!un()}function mt(){return ur()?Eo.hasThemeSupport:kr()?qt.features.themes!=null:un()?!1:Xn()?qn.hasThemeSupport:!1}function Ws(){if(ur())return Eo.storedTheme;if(kr()){var e=qt.features.themes?.prop;return e&&globalThis[e]||null}else if(Xn())return qn.storedTheme||null;return null}function ip(){return ur()?"pyoncord/current-theme.json":kr()?"vendetta_theme.json":Xn()?"ShiggyCord/current-theme.json":null}function Jn(){return ur()?!!globalThis.__REACT_DEVTOOLS__:kr()?qt.features.devtools!=null:!1}function lp(){return Jn()?ur()?(globalThis.__pyoncord_rdt=globalThis.__REACT_DEVTOOLS__.exports,"__pyoncord_rdt"):kr()?qt.features.devtools.prop:null:null}function cp(){return Jn()?ur()?globalThis.__REACT_DEVTOOLS__.version||null:kr()?qt.features.devtools.version:null:null}function up(){return!0}function W_(){return up()?ur()?Eo.sysColors:kr()?qt.features.syscolors.prop:null:null}function fp(){return ur()?"pyoncord/loader.json":kr()?"vendetta_loader.json":un()?"rain/loader.json":"loader.json"}function dp(){return ur()?Eo.fontPatch===2:Xn()?qn.fontPatch===2:!1}var Eo,Ys,qt,qn,Kt=_(()=>{"use strict";l();c();u();Ft();Eo=globalThis.__PYON_LOADER__,Ys=globalThis.__RAIN_LOADER__,qt=globalThis.__vendetta_loader,qn=globalThis.__SHIGGY_LOADER__;Du()});var qs={};k(qs,{loaderConfig:()=>Pr,settings:()=>N,updaterSettings:()=>Zn});var N,Pr,Zn,ke=_(()=>{"use strict";l();c();u();$e();Kt();N=qr(Cr(bt("VENDETTA_SETTINGS"))),Pr=qr(Cr(Xo(fp(),{customLoadUrl:{enabled:!1,url:"http://localhost:4040/kettu.js"}}))),Zn=qr(Cr(bt("VENDETTA_UPDATER_SETTINGS")))});var Fu={};k(Fu,{default:()=>K_});var Y_,hp,Nu,Ou,Qn,pp,To,mp,ii,K_,Mu=_(()=>{"use strict";l();c();u();co();Y_=new Set(["AlertActionButton","AlertModal","AlertModalContainer","AvatarDuoPile","AvatarPile","BACKDROP_OPAQUE_MAX_OPACITY","Backdrop","Button","Card","ContextMenu","ContextMenuContainer","FauxHeader","FloatingActionButton","GhostInput","GuildIconPile","HeaderActionButton","HeaderButton","HeaderSubmittingIndicator","IconButton","Input","InputButton","InputContainer","LayerContext","LayerScope","Modal","ModalActionButton","ModalContent","ModalDisclaimer","ModalFloatingAction","ModalFloatingActionSpacer","ModalFooter","ModalScreen","ModalStepIndicator","NAV_BAR_HEIGHT","NAV_BAR_HEIGHT_MULTILINE","Navigator","NavigatorHeader","NavigatorScreen","Pile","PileOverflow","RedesignCompat","RedesignCompatContext","RowButton","STATUS_BAR_HEIGHT","SceneLoadingIndicator","SearchField","SegmentedControl","SegmentedControlPages","Slider","Stack","StepModal","StickyContext","StickyHeader","StickyWrapper","TABLE_ROW_CONTENT_HEIGHT","TABLE_ROW_HEIGHT","TableCheckboxRow","TableRadioGroup","TableRadioRow","TableRow","TableRowGroup","TableRowGroupTitle","TableRowIcon","TableSwitchRow","Tabs","TextArea","TextField","TextInput","Toast","dismissAlerts","getHeaderBackButton","getHeaderCloseButton","getHeaderConditionalBackButton","getHeaderNoTitle","getHeaderTextButton","hideContextMenu","navigatorShouldCrossfade","openAlert","useAccessibilityNativeStackOptions","useAndroidNavScrim","useCoachmark","useFloatingActionButtonScroll","useFloatingActionButtonState","useNativeStackNavigation","useNavigation","useNavigationTheme","useNavigatorBackPressHandler","useNavigatorScreens","useNavigatorShouldCrossfade","useSegmentedControlState","useStackNavigation","useTabNavigation","useTooltip"]),hp={},Nu={},Ou=Bu("redesign_module");for([mp,ii]of Ou.getModules())for(To of Y_){if(Qn=void 0,ii[To])Qn=ii;else if(ii.default?.[To])Qn=ii.default;else continue;pp=Reflect.ownKeys(Qn).length,!(Nu[To]&&pp<=Nu[To])&&(hp[To]=Qn[To],Nu[To]=Reflect.ownKeys(Qn).length,Ou.cacheId(mp))}Ou.finish();K_=hp});var Sp={};k(Sp,{getCachedPolyfillModules:()=>eb,getImportingModuleId:()=>nc,getModules:()=>ps,metroModules:()=>gr,requireModule:()=>Ar,subscribeModule:()=>pc});function Js(e){Object.defineProperty(gr,e,{enumerable:!1}),bp.add(e),Gu(Number(e))}function si(e){return!e||e===globalThis||e[``]===null||e.__proto__===Object.prototype&&Reflect.ownKeys(e).length===0||e.default?.[Symbol.toStringTag]==="IntlMessagesProxy"}function Q_(e,r){if(Uu(r,e),e.initSentry&&=()=>{},e.default?.track&&e.default.trackMaker&&(e.default.track=()=>Promise.resolve()),e.registerAsset&&(oc(),Ne(Gd)).patchAssets(e),!yp&&["customBubblingEventTypes","customDirectEventTypes","register","get"].every(s=>e[s])&&(ju("register",e,([s,f],d)=>{try{return d(s,f)}catch{return s}}),yp=!0),e?.default?.constructor?.displayName==="DeveloperExperimentStore"&&(e.default=new Proxy(e.default,{get(s,f,d){if(f==="isDeveloper"){var{settings:m}=(ke(),Ne(qs));return m.enableDiscordDeveloperSettings??!1}return Reflect.get(s,f,d)}})),!vp&&e.fileFinishedImporting&&(X_("fileFinishedImporting",e,([s])=>{ea===-1||!s||(gr[ea].__filePath=s)}),vp=!0),!gp&&globalThis["__core-js_shared__"]){var t=s=>typeof s=="function"&&Z_.apply(s,[]);globalThis["__core-js_shared__"].inspectSource=t,gp=!0}if(e.findHostInstance_DEPRECATED){var o=gr[r-1]?.publicModule.exports,n=o.default?.reactProfilingEnabled?1:-1;gr[r+n]?.isInitialized||Js(r+n)}e.isMoment&&ju("defineLocale",e,(s,f)=>{var d=e.locale();f(...s),e.locale(d)});var a=Xs.get(Number(r));a&&(a.forEach(s=>s()),Xs.delete(Number(r)))}function nc(){return ea}function pc(e,r){var t=Xs.get(e)??new Set;return t.add(r),Xs.set(e,t),()=>t.delete(r)}function Ar(e){if(gr[0]?.isInitialized||ku(0),!bp.has(e)){if(Number(e)===-1)return Mu(),Ne(Fu);if(gr[e]?.isInitialized&&!gr[e]?.hasError)return ku(e);var r=ErrorUtils.getGlobalHandler();ErrorUtils.setGlobalHandler(J_);var t;try{t=ku(e)}catch{Js(e),t=void 0}return ErrorUtils.setGlobalHandler(r),t}}function*ps(e,r=!1){yield[-1,(Mu(),Ne(Fu))];var t=Bt().findIndex[e];if(r&&!t?.[`_${so.FULL_LOOKUP}`]&&(t=void 0),!t?.[`_${so.NOT_FOUND}`]){for(var o in t)if(o[0]!=="_"){var n=Ar(Number(o));si(n)||(yield[o,n])}for(var a in gr){var s=Ar(Number(a));si(s)||(yield[a,s])}}}function*eb(e){var r=Bt().polyfillIndex[e];for(var t in r){var o=Ar(Number(t));si(o)||(yield[t,o])}if(!r[`_${so.FULL_LOOKUP}`])for(var n in gr){var a=Ar(Number(n));si(a)||(yield[n,a])}}var q_,X_,ju,gr,ku,Xs,bp,J_,Z_,gp,vp,yp,ea,_p,lo=_(()=>{"use strict";l();c();u();co();ls();q_=function(e){var r=Number(e),t=gr[r],o=Bt().flagsIndex[r];if(o&Mt.BLACKLISTED)return Js(r),"continue";t.factory&&ju("factory",t,(n,a)=>{var s=ea;ea=r;var{1:f,4:d}=n;n[2]=m=>{var p=f(m);return p&&p.__esModule?p.default:p},n[3]=m=>{var p=f(m);if(p&&p.__esModule)return p;var T={};return p&&Object.assign(T,p),T.default=p,T},a(...n),si(d.exports)?Js(r):Q_(d.exports,r),ea=s})},{before:X_,instead:ju}=(rs(),Ne(es)),gr=globalThis.modules,ku=e=>globalThis.__r(+e),Xs=new Map,bp=new Set,J_=()=>{},Z_=Function.prototype.toString,gp=!1,vp=!1,yp=!1,ea=-1;for(_p in gr)q_(_p)});var Tp={};k(Tp,{getCacherForUniq:()=>hs,getMetroCache:()=>Bt,getPolyfillModuleCacher:()=>Bu,indexAssetModuleFlag:()=>ac,indexBlacklistFlag:()=>Gu,indexExportsFlags:()=>Uu,initMetroCache:()=>rb});function xp(){var e=Object.keys(globalThis.modules).length,r={_v:wp,_buildNumber:Vo.getConstants().Build,_modulesCount:e,flagsIndex:{},findIndex:{},polyfillIndex:{}};return wr=r,r}function rb(){return x(function*(){if(!(yield Ot(Hu)))return void xp();var e=yield Wo(Hu);try{if(wr=JSON.parse(e),wr._v!==wp)throw wr=null,"cache invalidated; cache version outdated";if(wr._buildNumber!==Vo.getConstants().Build)throw wr=null,"cache invalidated; version mismatch";var r=Object.keys(globalThis.modules).length;if(wr._modulesCount!==r)throw wr=null,"cache invalidated; modules count mismatch"}catch{xp()}})()}function Ep(e){if(e){var r=Mt.EXISTS;return r}}function Uu(e,r){var t=Ep(r);t&&t!==Mt.EXISTS&&(wr.flagsIndex[e]=t)}function Gu(e){wr.flagsIndex[e]|=Mt.BLACKLISTED}function ac(e){wr.flagsIndex[e]|=Mt.ASSET}function hs(e,r){var t=wr.findIndex[e]??={};return{cacheId(o,n){t[o]??=Ep(n),Zs()},finish(o){r&&(t[`_${so.FULL_LOOKUP}`]=1),o&&(t[`_${so.NOT_FOUND}`]=1),Zs()}}}function Bu(e){var r=wr.polyfillIndex[e]??={};return{getModules(){return(lo(),Ne(Sp)).getCachedPolyfillModules(e)},cacheId(t){r[t]=1,Zs()},finish(){r[`_${so.FULL_LOOKUP}`]=1,Zs()}}}var wp,Hu,wr,Bt,Zs,co=_(()=>{"use strict";l();c();u();be();Ft();Yr();Rn();ls();wp=102,Hu="caches/metro_modules.json",wr=null,Bt=()=>wr;Zs=Ia(()=>{lt(Hu,JSON.stringify(wr))},1e3)});var fr=Nt((j0,Ap)=>{l();c();u();Ap.exports=go().react});function Qs(e){return"componentStack"in e&&typeof e.componentStack=="string"}function el(e){return!!e.stack}var Vu=_(()=>{"use strict";l();c();u()});var tl={};k(tl,{filterAssets:()=>nb,findAsset:()=>ra,findAssetId:()=>S,invalidateAssetCache:()=>ob,iterateAssets:()=>Ao});function ob(){rl=null,$u=0;for(var e in li)delete li[e]}function*Ao(){var e=Date.now();if(rl&&e-$u{"use strict";l();c();u();co();ls();lo();oc();li={},rl=null,$u=0,tb=2500});var zu,Rp=_(()=>{zu={ABOUT:"About",ACTIONS:"Actions",ARE_YOU_SURE_TO_CLEAR_DATA:"Are you sure you wish to clear the data of {name}?",ARE_YOU_SURE_TO_DELETE_PLUGIN:"Are you sure you wish to delete {name}? This will clear all of the plugin's data.",ARE_YOU_SURE_TO_DELETE_THEME:"Are you sure you wish to delete {name}?",AUTO_DEBUGGER:"Automatically connect to Debugger",AUTO_DEVTOOLS:"Automatically connect to Devtools",ASSET_BROWSER:"Asset Browser",ASSET_TYPES:"Asset Types",IMAGE_FILES:"Image Files",TEXT_FILES:"Text Files",BRAND:"Brand",SHIGGYCORD:"GoonCord",SHIGGYCORD_URL:"GoonCord URL",BROWSER:"Browser",BYTECODE:"Bytecode",CANCEL:"Cancel",CLEAR:"Clear",CLEAR_BUNDLE:"Clear JS Bundle",CLEAR_BUNDLE_DESC:"Clear the cached bundle. This will force a re-download of the bundle next app launch.",CLEAR_DATA:"Clear data",CLEAR_DATA_FAILED:"Failed to clear data for {name}",CLEAR_DATA_SUCCESSFUL:"Cleared data for {name}",CODEBERG:"Codeberg",CODENAME:"Codename",COMMAND_DEBUG_DESC:"Send \u{1F4A6}GoonCord\u{1F4A6} debug info.",COMMAND_DEBUG_OPT_EPHEMERALLY:"Send debug info ephemerally.",COMMAND_EVAL_DESC:"Evaluate JavaScript code.",COMMAND_EVAL_OPT_ASYNC:"Whether to support 'await' in code. Must explicitly return for result (default: false)",COMMAND_EVAL_OPT_CODE:"The code to evaluate.",COMMAND_PLUGINS_DESC:"Send list of installed plugins.",COMMAND_PLUGINS_OPT_EPHEMERALLY:"Send plugins list ephemerally.",COMMAND_RELOAD_DESC:"Reload Discord.",COMPONENT:"Component",CONFIRMATION_LINK_IS_A_TYPE:"This link is a **{urlType, select, plugin {Plugin} theme {Theme} other {Add-on}}**, would you like to install it?",CONNECT_TO_DEBUG_WEBSOCKET:"Connect to debug WebSocket",CONNECT_TO_REACT_DEVTOOLS:"Connect to React DevTools",CONTINUE:"Continue",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_URL:"Copy URL",DEBUG:"Debug",DEBUGGER_URL:"Debugger URL",DELETE:"Delete",DEVTOOLS_URL:"DevTools URL",DESC_EXTRACT_FONTS_FROM_THEME:'Looks out for "fonts" field in your currently applied theme and install it.',DEVELOPER:"Developer",DEVELOPER_SETTINGS:"Developer Settings",DISABLE_THEME:"Disable Theme",DISABLE_UPDATES:"Disable Updates",DISCORD_SERVER:"Discord Server",DONE:"Done",ENABLE_EVAL_COMMAND:"Enable /eval command",ENABLE_EVAL_COMMAND_DESC:"Evaluate JavaScript directly from a command. Be cautious when using this command as it may pose a security risk. Make sure to know what you are doing.",ENABLE_UPDATES:"Enable Updates",ERROR_BOUNDARY_TOOLS_LABEL:"ErrorBoundary Tools",EXTRACT:"Extract",FONT_NAME:"Font Name",FONTS:"Fonts",GENERAL:"General",GITHUB:"GitHub",HOLD_UP:"Hold Up",INFO:"Info",INSTALL:"Install",INSTALL_ADDON:"Install an add-on",INSTALL_FONT:"Install a font",INSTALL_PLUGIN:"Install a plugin",INSTALL_REACT_DEVTOOLS:"Install React DevTools",INSTALL_THEME:"Install a theme",LABEL_EXTRACT_FONTS_FROM_THEME:"Extract font from theme",LINKS:"Links",LOAD_FROM_CUSTOM_URL:"Load from custom URL",LOAD_FROM_CUSTOM_URL_DEC:"Load GoonCord from a custom endpoint.",LOAD_REACT_DEVTOOLS:"Load React DevTools",SHIGGY_URL:"ShiggyCord URL",LOADER:"Loader",MACHINE_ID:"Machine ID",MANUFACTURER:"Manufacturer",MESSAGE:"Message",MISCELLANEOUS:"Miscellaneous",MODAL_RELOAD_REQUIRED:"Reload app?",MODAL_RELOAD_REQUIRED_DESC:"A reload is required to see the changes. Do you want to reload now?",MODAL_THEME_REFETCHED:"Theme refetched",MODAL_THEME_REFETCHED_DESC:"A reload is required to see the changes. Do you want to reload now?",MODAL_UNPROXIED_PLUGIN_DESC:"The plugin you are trying to install has not been proxied/verified by staff. Are you sure you want to continue?",MODAL_UNPROXIED_PLUGIN_HEADER:"Unproxied Plugin",MODEL:"Model",OPEN_IN_BROWSER:"Open in Browser",OPERATING_SYSTEM:"Operating System",OVERFLOW_PLUGIN_SETTINGS:"Plugin Settings",PLATFORM:"Platform",PLUGIN_REFETCH_FAILED:"Failed to refetch plugin",PLUGIN_REFETCH_SUCCESSFUL:"Successfully refetched plugin",PLUGINS:"Plugins",REFETCH:"Refetch",RELOAD:"Reload",RELOAD_DISCORD:"ReGoon your Discord",RELOAD_IN_NORMAL_MODE:"Reload in Normal Mode",RELOAD_IN_NORMAL_MODE_DESC:"Safe mode currently enabled, tap to reload in normal mode",RELOAD_IN_SAFE_MODE:"Reload in Safe Mode",RELOAD_IN_SAFE_MODE_DESC:"Tap to reload Discord without loading addons",REMOVE:"Remove",RESTART_REQUIRED_TO_TAKE_EFFECT:"Restart is required to take effect",RETRY:"Retry",RETRY_RENDER:"Retry Render",SAFE_MODE:"Safe Mode",SAFE_MODE_NOTICE_FONTS:"You are in safe mode, meaning fonts have been temporarily disabled. {enabled, select, true {If a font appears to be causing the issue, you can press below to disable it persistently.} other {}}",SAFE_MODE_NOTICE_PLUGINS:"You are in safe mode, so plugins cannot be loaded. Disable any misbehaving plugins, then return to Normal Mode from the General settings page.",SAFE_MODE_NOTICE_THEMES:"You are in safe mode, meaning themes have been temporarily disabled. {enabled, select, true {If a theme appears to be causing the issue, you can press below to disable it persistently.} other {}}",SEARCH:"Search",SEPARATOR:", ",SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS:"Activate Discord Experiments",SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS_DESC:"Warning: Messing with this feature may lead to account termination. I heavily discourage using this and am not responsible for anything that happens if you use it",STACK_TRACE:"Stack Trace",SUCCESSFULLY_INSTALLED:"Successfully installed",THEME_EXTRACTOR_DESC:"This pack overrides the following: {fonts}",THEME_REFETCH_FAILED:"Failed to refetch theme",THEME_REFETCH_SUCCESSFUL:"Successfully refetched theme",THEMES:"Themes",THEMES_RELOAD_FOR_CHANGES:"Reload the app to fully apply changes",TOASTS_INSTALLED_PLUGIN:"Installed plugin",TOASTS_PLUGIN_UPDATE:"{update, select, true {Enabled} other {Disabled}} updates for {name}",UH_OH:"Uh Oh",UNINSTALL:"Uninstall",UNINSTALL_TITLE:"Uninstall {title}",URL_PLACEHOLDER:"https://github.com/OTKUSteyler/GoonCord",VERSION:"Version",VERSIONS:"Versions"}});function Pp(e){var r=sb=lb[e]??e;A.log("[i18n] fetchLocale called:",e,"->",r),Ip.has(r)?ta=r:(Ip.add(r),r.toLowerCase().startsWith("en")?(A.log("[i18n] Using local default.json for English locale"),ol[r]=zu,ta=r):fetch(`https://codeberg.org/cocobo1/kettu-i18n/raw/branch/main/base/${r}.json`).then(t=>t.json()).then(t=>{A.log("[i18n] Loaded strings for:",r),ol[r]=t,ta=r}).catch(t=>A.error(`[i18n] Error fetching strings for ${r}: ${t}`)))}function Dp(){var e=0,r=()=>{e++;try{var n=qo("LocaleStore");if(A.log("[i18n] Attempt",e,"- LocaleStore:",!!n),!n)return A.log("[i18n] LocaleStore not found yet"),!1;if(n?._isInitialized!==!0)return A.log("[i18n] LocaleStore not initialized yet"),!1;var a=n.locale;if(a)return A.log("[i18n] Using LocaleStore:",a),Pp(a),!0}catch(s){A.log("[i18n] Error:",s)}return!1},t=()=>{r()||e<15&&setTimeout(t,500)};t();var o=n=>{if(n?.settings?.changes?.loading){A.log("[i18n] Settings loading, skipping...");return}var a=n?.settings?.changes?.protoToSave?.localization?.locale?.value;A.log("[i18n] Locale changed:",a),a&&(A.log("[i18n] Found locale in event:",a),Pp(a))};return xr.subscribe("USER_SETTINGS_PROTO_UPDATE_EDIT_INFO",o),()=>{xr.unsubscribe("USER_SETTINGS_PROTO_UPDATE_EDIT_INFO",o)}}function Co(e,r){var t=E[e];if(!t)return t;try{return new ib(t).format(r)}catch(o){return o?.name==="SyntaxError"?(A.warn(`[i18n] Failed to parse message for key "${String(e)}":`,o.message),t):(A.warn(`[i18n] Failed to format message for key "${String(e)}":`,o?.message??o),t)}}var ib,ta,sb,Ip,ol,E,lb,je=_(()=>{"use strict";l();c();u();vr();Q();Le();Rp();ib=br("MessageFormat"),ta=null,sb=null,Ip=new Set,ol={},E=new Proxy({},{get:(e,r)=>ta&&ol[ta]?.[r]?ol[ta]?.[r]:zu[r]}),lb={"ar-SA":"ar","bn-BD":"bn","ca-ES":"ca","de-DE":"de","es-ES":"es","es-419":"es","fa-IR":"fa","fi-FI":"fi","fr-FR":"fr","hi-IN":"hi","hr-HR":"hr","hu-HU":"hu","id-ID":"id","it-IT":"it","ja-JP":"ja","pl-PL":"pl","pt-BR":"pt_BR","ru-RU":"ru","sk-SK":"sk","sv-SE":"sv","tr-TR":"tr","vi-VN":"vi"}});var nl={};k(nl,{showToast:()=>q});var cb,q,pt=_(()=>{"use strict";l();c();u();je();Te();Oe();Q();Le();({uuid4:cb}=K(()=>L("uuid4"))),q=(e,r)=>ti.open({key:`vd-toast-${cb()}`,content:e,source:r,icon:r});q.showCopyToClipboard=(e=E.COPIED_TO_CLIPBOARD)=>{q(e,S("toast_copy_link"))}});var sl={};k(sl,{connectRdt:()=>il,connectToDebugger:()=>na,disconnectFromDebugger:()=>Ku,disconnectRdt:()=>qu,getDebugInfo:()=>ht,initDebugger:()=>Zu,isConnectedToDebugger:()=>vi,patchLogHook:()=>Ju,rdtClient:()=>hi,rdtConnected:()=>yi,toggleSafeMode:()=>Yu,useIsRdtConnected:()=>Xu,versionHash:()=>gi});function Yu(){return x(function*(){N.safeMode={...N.safeMode,enabled:!N.safeMode?.enabled},mt()&&(wo()?.id&&(N.safeMode.currentThemeId=wo().id),N.safeMode?.enabled?yield rt(null):N.safeMode?.currentThemeId&&(yield rt(ge[N.safeMode?.currentThemeId]))),setTimeout(Tr.reload,400)})()}function Np(e){return JSON.stringify(e)}function fn(e,...r){if(rr?.readyState===WebSocket.OPEN){var t={type:"log",data:{level:e,message:r}};rr.send(Np(t))}}function fb(){ci=console.log,console.log=function(...e){ci.apply(console,e),fn("default",...e)},ui=console.error,console.error=function(...e){ui.apply(console,e),fn("error",...e)},fi=console.warn,console.warn=function(...e){fi.apply(console,e),fn("warn",...e)},A&&(di=A.log,A.log=function(...e){di.apply(A,e),fn("default",...e)},mi=A.error,A.error=function(...e){mi.apply(A,e),fn("error",...e)},pi=A.warn,A.warn=function(...e){pi.apply(A,e),fn("warn",...e)})}function al(){ci&&(console.log=ci,ci=void 0),ui&&(console.error=ui,ui=void 0),fi&&(console.warn=fi,fi=void 0),A&&(di&&(A.log=di,di=void 0),mi&&(A.error=mi,mi=void 0),pi&&(A.warn=pi,pi=void 0))}function na(e){if(rr!==void 0&&rr.readyState!==WebSocket.CLOSED&&(al(),rr.close()),!e){q("Invalid debugger URL!",S("Small"));return}try{rr=new WebSocket(`ws://${e}`),rr.addEventListener("open",()=>{q("Connected to debugger.",S("Check"));var r={type:"hello",data:{version:ub}};rr?.send(Np(r)),fb()}),rr.addEventListener("message",r=>{try{var t=JSON.parse(r.data);if(t.type==="run"&&t.data?.code)try{(0,eval)(t.data.code)}catch(o){console.error("Error executing remote code:",o)}}catch{try{(0,eval)(r.data)}catch(n){console.error(n)}}}),rr.addEventListener("close",r=>{A.error(`Debugger disconnected. (${r?.code}, ${r?.reason||"no reason specified"})`),al()}),rr.addEventListener("error",r=>{var t=r?.message||r?.error?.message||"WebSocket Connection Errored";A.error("Debugger error:",t),q("An error occurred with the debugger connection!",S("Small")),al()})}catch(r){A.error("Failed to connect to debugger:",r),q("Failed to connect to debugger!",S("Small"))}}function Ku(){rr&&(al(),rr.close(),rr=void 0,q("Disconnected from debugger.",S("Check")))}function vi(){return rr?.readyState===WebSocket.OPEN}function Op(){for(var e of Wu)e(yi)}function Lp(){hi=null,yi=!1,Op()}function il(e,r){if(!(!Jn()||hi)){var t=e.split(":").slice(0,-1).join(":"),o=hi=new WebSocket(`ws://${t}:${db}`);o.addEventListener("open",()=>{r||q("Connected to React DevTools",S("CheckmarkSmallIcon")),yi=!0,Op()}),o.addEventListener("close",a=>{A.error(`React DevTools disconnected. (${a?.code}, ${a?.reason||"no reason specified"})`),Lp()}),o.addEventListener("error",a=>{Lp();var s=a?.message||a?.error?.message||"WebSocket Connection Errored";A.error("React DevTools error:",s),r||q(s,S("CircleXIcon-primary"))});var n=globalThis[lp()||"__vendetta_rdc"];n?.connectToDevTools&&n.connectToDevTools({websocket:o,resolveRNStyle:oa.StyleSheet.flatten})}}function qu(){hi?.close()}function Xu(){var[e,r]=React.useState(yi);return React.useEffect(()=>(Wu.add(r),()=>{Wu.delete(r)}),[]),e}function Ju(){var e=xe("nativeLoggingHook",globalThis,r=>{rr?.readyState===WebSocket.OPEN&&fn(r[1]==="error"?"error":r[1]==="warn"?"warn":"default",r[0]),A.log(r[0])});return()=>{rr&&rr.close(),e()}}function ht(){var e=globalThis.HermesInternal.getRuntimeProperties(),r=e["OSS Release Version"],t="for RN ",o=oa.Platform.constants,n=o.reactNativeVersion;return{vendetta:{version:gi.split("-")[0],loader:Lu()},bunny:{version:gi,loader:{name:Lu(),version:sp()}},discord:{version:Vo.getConstants().Version,build:Vo.getConstants().Build},react:{version:React.version,nativeVersion:r.startsWith(t)?r.substring(t.length):`${n.major}.${n.minor}.${n.patch}`},hermes:{version:r,buildType:e.Build,bytecodeVersion:e["Bytecode Version"]},...oa.Platform.select({android:{os:{name:"Android",version:o.Release,sdk:o.Version}},ios:{os:{name:o.systemName,version:o.osVersion}}}),...oa.Platform.select({android:{device:{manufacturer:o.Manufacturer,brand:o.Brand,model:o.Model,codename:$o.device}},ios:{device:{manufacturer:$o.deviceManufacturer,brand:$o.deviceBrand,model:$o.deviceModel,codename:$o.device}}})}}function Zu(){if(N.autoDebugger)try{na(N.debuggerUrl)}catch(e){A.error("Failed to connect to Debugger during startup:",e)}if(N.autoDevTools)try{N.devToolsUrl&&il(N.devToolsUrl,!0)}catch(e){A.error("Failed to connect to ReactDevTools during startup:",e)}}var oa,rr,ci,ui,fi,di,mi,pi,ub,db,hi,yi,Wu,gi,At=_(()=>{"use strict";l();c();u();be();Ir();Te();Kt();Yr();He();ke();vr();pt();oa=H(re());ub=1;db=8097,hi=null,yi=!1,Wu=new Set;gi="1.4.1.8"});function Bp(e){return Mp.isSemanticColor(e)}function kp(e,r=mb.theme){return Mp.resolveSemanticColor(r,e)}var ll,tr,Fp,mb,Mp,Ro=_(()=>{"use strict";l();c();u();Q();Le();ll=L("SemanticColor"),tr=ll?.default?.colors??dt?.ThemeColorMap,Fp=ll?.default?.unsafe_rawColors??dt?.Colors,mb=kt("ThemeStore"),Mp=ll.default.meta??=ll.default.internal});var rf={};k(rf,{TextStyleSheet:()=>Ct,ThemeContext:()=>Qu,createLegacyClassComponentStyles:()=>hb,createStyles:()=>jr,createThemedStyleSheet:()=>ef});function jr(e){return Ve(()=>Up.createStyles(e))}function hb(e){return Ve(()=>Up.createLegacyClassComponentStyles(e))}function ef(e){for(var r in e)e[r]=new Proxy(jp.StyleSheet.flatten(e[r]),{get(t,o,n){var a=Reflect.get(t,o,n);return Bp(a)?kp(a):a}});return e}var jp,Up,Qu,Ct,Rt=_(()=>{"use strict";l();c();u();Oe();Le();Ro();jp=H(re()),Up=U("createStyles"),{ThemeContext:Qu}=K(()=>L("ThemeContext"),{hint:"object"}),{TextStyleSheet:Ct}=K(()=>L("TextStyleSheet"))});function Gp(e){return e.split(/[\s|\n]+?in /).filter(Boolean)}var Hp=_(()=>{"use strict";l();c();u()});function _i(e){var[r,t]=(0,Vp.useState)(!0),o;try{o=Gp(e.componentStack),o=r?o.slice(0,4):o}catch{return}return i(de,{children:b(dn.View,{style:{gap:8},children:[i(D,{variant:"heading-lg/bold",children:"Component Stack"}),i(dn.View,{style:{gap:4},children:o.map(n=>b(dn.View,{style:{flexDirection:"row"},children:[i(D,{variant:"text-md/bold",color:"text-muted",children:"<"}),i(D,{variant:"text-md/bold",children:n}),i(D,{variant:"text-md/bold",color:"text-muted",children:"/>"})]}))}),r&&i(D,{children:"..."}),b(dn.View,{style:{gap:8,flexDirection:"row",justifyContent:"center",alignItems:"center"},children:[i(Z,{variant:"secondary",text:`Show ${r?"more":"less"}`,icon:r?S("down_arrow"):i(dn.Image,{style:{transform:[{rotate:`${r?0:180}deg`}]},source:S("down_arrow")}),onPress:()=>t(n=>!n)}),i(Z,{variant:"secondary",text:"Copy",icon:S("CopyIcon"),onPress:()=>Be.setString(e.componentStack)})]})]})})}var Vp,dn,tf=_(()=>{"use strict";l();c();u();ae();Hp();Te();Q();ce();Vp=H(fr()),dn=H(re())});function _b(e){return e==="InternalBytecode.js"}function bb(e){var r=e.match(gb);if(r)return{type:"FRAME",functionName:r[1],location:r[2]==="native"?{type:"NATIVE"}:r[3]==="address at "?_b(r[4])?{type:"INTERNAL_BYTECODE",sourceUrl:r[4],line1Based:Number.parseInt(r[5],10),virtualOffset0Based:Number.parseInt(r[6],10)}:{type:"BYTECODE",sourceUrl:r[4],line1Based:Number.parseInt(r[5],10),virtualOffset0Based:Number.parseInt(r[6],10)}:{type:"SOURCE",sourceUrl:r[4],line1Based:Number.parseInt(r[5],10),column1Based:Number.parseInt(r[6],10)}};var t=e.match(vb);if(t)return{type:"SKIPPED",count:Number.parseInt(t[1],10)}}function Sb(e){for(var r=e.split(/\n/),t=[],o=-1,n=0;n{"use strict";l();c();u();gb=/^ {4}at (.+?)(?: \((native)\)?| \((address at )?(.*?):(\d+):(\d+)\))$/,vb=/^ {4}... skipping (\d+) frames$/,yb=/^ {4}at .*$/});var nf={};k(nf,{hideSheet:()=>Xt,showSheet:()=>or});function or(e,r,t){"then"in r||(r=Promise.resolve({default:r})),zp.openLazy(r,e,t??{})}function Xt(e){zp.hideActionSheet(e)}var zp,gt=_(()=>{"use strict";l();c();u();Le();zp=U("openLazy","hideActionSheet")});function sf(e){var r=xc("modules/forwarding/native/ForwardFailedAlertModal.tsx");return!r&&"extraContent"in e&&(e.content=b(af.View,{style:{gap:16},children:[i(D,{variant:"text-md/medium",color:"text-muted",children:e.content}),i(af.View,{children:e.extraContent})]}),delete e.extraContent),i(wb,{...e})}var af,wb,Eb,Wp,Yp=_(()=>{"use strict";l();c();u();ae();Oe();Fe();ce();af=H(re()),{AlertModal:wb,AlertActionButton:Eb}=K(()=>L("AlertModal","AlertActions")),Wp=Eb});var lf={};k(lf,{AlertActionButton:()=>Wp,AlertModal:()=>sf});var Kp=_(()=>{"use strict";l();c();u();Yp()});function mn({selectable:e,style:r,children:t}){return e?aa.Platform.select({ios:i(Tb,{style:r,children:t}),default:i(qp,{style:r,children:t,selectable:!0})}):i(qp,{style:r,children:t})}var aa,Xp,Tb,qp,Jp=_(()=>{"use strict";l();c();u();ae();Q();Ro();Rt();aa=H(re()),Xp=jr({codeBlock:{fontFamily:dt.Fonts.CODE_NORMAL,fontSize:12,textAlignVertical:"center",backgroundColor:tr.CARD_BACKGROUND_DEFAULT,color:tr.TEXT_DEFAULT,borderWidth:1,borderRadius:12,borderColor:tr.BORDER_SUBTLE,padding:10}}),Tb=({style:e,children:r})=>i(aa.TextInput,{editable:!1,multiline:!0,style:[Xp().codeBlock,e&&e],value:r}),qp=({selectable:e,style:r,children:t})=>i(aa.Text,{selectable:e,style:[Xp().codeBlock,r&&r],children:t})});var Ab,We,cf=_(()=>{"use strict";l();c();u();os();An();Cn();ts();as();ae();ff();Q();Rt();We=(function(e){"use strict";io(r,e);function r(t){Ye(this,r);var o;return o=no(this,r,[t]),o.state={hasErr:!1},o}return Ke(r,[{key:"render",value:function(){return this.state.hasErr?i(uf,{error:this.state.error,onRetryRender:()=>this.setState({hasErr:!1})}):this.props.children}}]),r})(Ab=W.Component);yt(We,"contextType",Qu);yt(We,"getDerivedStateFromError",e=>({hasErr:!0,error:e}))});function Cb(){return i(cl.Image,{style:{width:16,height:16},source:S("icon-search")})}var cl,Io,Zp=_(()=>{"use strict";l();c();u();ae();Q();je();Te();ce();cf();cl=H(re());Io=(({onChangeText:e,placeholder:r,style:t,isRound:o})=>{var[n,a]=W.useState(""),s=d=>{a(d),e?.(d)},f=o?{borderRadius:9999,overflow:"hidden"}:void 0;return i(We,{children:i(cl.View,{style:t,children:i(cr,{grow:!0,isClearable:!0,leadingIcon:Cb,placeholder:r??E.SEARCH,onChange:s,returnKeyType:"search",size:"md",autoCapitalize:"none",autoCorrect:!1,isRound:o,style:f,value:n})})})})});function Si({label:e,icon:r,noPadding:t=!1,noAnimation:o=!1,children:n}){var[a,s]=React.useState(!0);return b(Gn,{children:[i(B,{label:e,icon:r&&i(B.Icon,{source:S(r)}),trailing:i(ei.Arrow,{style:{transform:[{rotate:`${a?180:90}deg`}]}}),onPress:()=>{s(!a),o||bi.LayoutAnimation.configureNext(bi.LayoutAnimation.Presets.easeInEaseOut)}}),!a&&i(Gn,{children:i(bi.View,{style:!t&&{paddingHorizontal:15},children:n})})]})}var bi,Qp=_(()=>{"use strict";l();c();u();ae();Te();ce();bi=H(re())});var ul={};k(ul,{Codeblock:()=>mn,ErrorBoundary:()=>We,Search:()=>Io,Summary:()=>Si,wrappers:()=>lf});var It=_(()=>{"use strict";l();c();u();Kp();Jp();cf();Zp();Qp()});function df(e){return i(er,{children:b(eh.View,{style:{gap:12,paddingVertical:12},children:[i(D,{variant:"heading-lg/extrabold",children:"Error"}),i(mn,{selectable:!0,children:e.error.message}),el(e.error)&&i(xi,{error:e.error}),Qs(e.error)?i(_i,{componentStack:e.error.componentStack}):null]})})}var eh,rh=_(()=>{"use strict";l();c();u();ae();Vu();It();ce();eh=H(re());tf();mf()});function uf(e){return i(de,{children:b(oe,{children:[e.header&&typeof e.header!="string"?e.header:i(D,{variant:"heading-lg/bold",children:e.header??E.UH_OH}),i(th.View,{style:{backgroundColor:tr.BACKGROUND_SECONDARY,borderRadius:8,borderWidth:1,borderColor:tr.BACKGROUND_TERTIARY,padding:12},children:i(D,{style:{color:tr.TEXT_MUTED},children:String(e.error)})}),b(ru,{children:[e.onRetryRender&&i(Z,{variant:"destructive",text:E.RETRY_RENDER,onPress:e.onRetryRender}),e.error instanceof Error?i(Z,{text:"Details",onPress:()=>or("BunnyErrorDetailsActionSheet",df,{error:e.error})}):null]})]})})}var th,oh,ff=_(()=>{"use strict";l();c();u();ae();je();gt();ce();Ro();th=H(re());rh();oh=globalThis.HermesInternal.getFunctionLocation(globalThis.__r).fileName});function xi(e){var[r,t]=(0,pf.useState)(!0),o;try{var n=of(e.error.stack);o=r?n.slice(0,4):n}catch{return null}return i(de,{children:b(Po.View,{style:{gap:12},children:[i(D,{variant:"heading-lg/bold",children:"Call Stack"}),i(Po.View,{style:{gap:4},children:o.map((a,s)=>i(Rb,{id:s,frame:a}))}),r&&i(D,{children:"..."}),b(Po.View,{style:{gap:8,flexDirection:"row",justifyContent:"center",alignItems:"center"},children:[i(Z,{variant:"secondary",text:`Show ${r?"more":"less"}`,icon:r?S("down_arrow"):i(Po.Image,{style:{transform:[{rotate:`${r?0:180}deg`}]},source:S("down_arrow")}),onPress:()=>t(a=>!a)}),i(Z,{variant:"secondary",text:"Copy",icon:S("CopyIcon"),onPress:()=>Be.setString(e.error.stack)})]})]})})}function Rb(e){var[r,t]=(0,pf.useState)(!0);return b(Po.Pressable,{onPress:()=>t(o=>!o),children:[i(D,{style:{fontFamily:dt.Fonts.CODE_BOLD},children:e.frame.methodName}),i(D,{style:{fontFamily:dt.Fonts.CODE_NORMAL},ellipsizeMode:"middle",numberOfLines:r?1:void 0,children:b(D,{color:"text-muted",children:[e.frame.file===oh?"jsbundle":e.frame.file,":",e.frame.lineNumber,":",e.frame.column]})})]},e.id)}var pf,Po,mf=_(()=>{"use strict";l();c();u();ae();$p();Te();Q();ce();pf=H(fr()),Po=H(re());ff()});function wi(e){var r=Ib(),t=ht(),o=Ee.useNavigation(),[n,a]=fl.default.useState(null),[s,f]=fl.default.useState(0),[d,m]=fl.default.useState(!1),p=n??[],T=p[s]??[];return i(Qc,{children:b(Za,{style:r.container,children:[b(dl.View,{style:{gap:4},children:[i(D,{variant:"display-lg",children:"Uh oh."}),i(D,{variant:"text-md/normal",children:"A crash occurred while rendering a component. This could be caused by a plugin, ShiggyCord, or Discord itself."}),b(D,{variant:"text-sm/normal",color:"text-muted",children:[t.os.name,"; ",t.discord.build," (",t.discord.version,"); ",t.bunny.version]})]}),b(dl.ScrollView,{fadingEdgeLength:64,contentContainerStyle:{gap:12},children:[i(D,{variant:"heading-md/extrabold",color:"text-default",style:{marginBottom:8,textAlign:"center"},selectable:!0,children:e.error.message||"Unknown error occurred"}),el(e.error)&&i(xi,{error:e.error}),Qs(e.error)?i(_i,{componentStack:e.error.componentStack}):null]}),b(de,{style:{gap:12,paddingVertical:16,alignItems:"center"},children:[b(oe,{direction:"horizontal",spacing:12,style:{justifyContent:"center",width:"100%"},children:[i(Z,{text:"Reload Discord",onPress:()=>Tr.reload(),style:{flex:1}}),!N.safeMode?.enabled&&i(Z,{text:"Safe Mode",onPress:()=>Yu(),style:{flex:1}})]}),i(Z,{variant:"destructive",text:"Retry Render",onPress:()=>{try{console.log("[ShiggyCord][ErrorBoundaryScreen] Retry Render clicked")}catch{}e.rerender()},style:{width:"100%"}})]})]})})}var fl,dl,Ib,hf=_(()=>{"use strict";l();c();u();ae();fl=H(fr());Vu();At();Yr();ke();Rt();Q();ce();dl=H(re());tf();mf();Q();Ib=jr({container:{flex:1,backgroundColor:xt.colors.BG_BASE_SECONDARY,paddingHorizontal:16,height:"100%",gap:12}})});function Pb(){try{var e=br("ErrorBoundary")[gs];if(e)return new Promise(r=>e.getExports(t=>r(t.prototype)))}catch{}return Promise.reject(new Error("ErrorBoundary context not found"))}function vf(){try{console.log("[ShiggyCord] patchErrorBoundary: registering")}catch{}var e=Pb().catch(a=>{try{console.warn("[ShiggyCord] patchErrorBoundary: context lookup failed",a)}catch{}return null}),r=xe.await("render",e,function(){try{if(!this||!this.state||!this.state.error)return;try{console.log("[ShiggyCord] patchErrorBoundary: rendering custom error screen",this.state.error)}catch{}return gf.default.createElement(Db,{error:this.state.error,rerender:()=>{try{try{this.setState?.({info:null,error:null,hasErr:!1})}catch{try{this.setState?.({error:null})}catch{}}}catch{}}})}catch(a){try{console.error("[ShiggyCord] patchErrorBoundary: error while rendering custom screen",a)}catch{}return}});try{var t=global;if(t){try{var o=t.ErrorUtils;if(o&&typeof o.setGlobalHandler=="function"){var n=o.getGlobalHandler?.()??o._globalHandler??null;o.setGlobalHandler((a,s)=>{try{console.error("[ShiggyCord] global uncaught error:",a,{isFatal:s}),globalThis.__SHIGGY_LAST_UNCAUGHT_ERROR=a}catch{}try{typeof n=="function"&&n(a,s)}catch{}})}}catch{}try{typeof t.addEventListener=="function"&&t.addEventListener("unhandledrejection",a=>{try{console.error("[ShiggyCord] unhandledrejection:",a?.reason??a),globalThis.__SHIGGY_LAST_UNCAUGHT_ERROR=a?.reason??a}catch{}})}catch{}}}catch{}return r}var gf,Db,nh=_(()=>{"use strict";l();c();u();gf=H(fr());hf();He();vs();Le();Db=({error:e,rerender:r})=>gf.default.createElement(wi,{error:e,rerender:r})});var yf=Nt((cN,ah)=>{l();c();u();ah.exports=go().moment});function ih({locale:e}){try{var r=yf();r.locale(e.toLowerCase())}catch(t){A.error("Failed to fix timestamps (lazy moment)...",t)}xr.unsubscribe("I18N_LOAD_SUCCESS",ih)}var sh,lh=_(()=>{"use strict";l();c();u();vr();Q();sh=(()=>{xr.subscribe("I18N_LOAD_SUCCESS",ih)})});var ia,ch=_(()=>{ia="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAMAAABiM0N1AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAuVQTFRFAAAA5uz74+375Or79vr99/r83+f35PD68/f9/v7//v799fr90+Lw8Pf7/P39/////f7+7fX63ur66fH7+/z9///+/v//+/z97/b71t745e/59vr+9/v97fP7ydb08vf8/v7+//7+/f7+9vn85+/67fT7/Pz9/f///P398vf93ev35fD6+fz9/v/9+vz+7vX83uX39fn8///99vr96PD78vb8/f39/f7+8/f83Oj17PL8/Pv9+/z97/X8t73y+Pr89/j+5On48PT7/f7+/f3+9Pb8xM/o5Oj5+/z9//7/+fv88PP89Pn9/v789vr94+v76fL8/f/8/v/+/f397/P8vsnw+fv9+/z+7PH68Pf89Pj8xsvw1+L5+v38/Pz96/D74+z99fn+/f/99/n92eL48fb9+/z+/P387fL74uv49/v99vr91Nr07/b9+/3+/P3+6/L83+f59/r99Pn9ytfx7/X8+vz+/Pz96/H7pa7d9fj98/b85uv7+Pr++vv+4+n78fb8/P3+/f7+7fT89fn88vX80t3x9/v99fn9v83t5ez6+Pv9+v3+3eb45+77+fr9/f797vX95+38+Pr9/P796vL/5u/7+fv++/7+3ur62eT1+Pv9+Pr+0N/xytfx9/n+9Pf99Pf98/b88Pb8+v39/f797vX84ez39/v9+fz+4Ov7vcrx9fn8/v7+/v397PL8+fv8+vz85/D6zdny8/f9/P79/v798fb9yNH05u/7+Pn9+fr96O767/P6+vv++v378PT94uT47fD8+v39/P398vf919/28fX8+/38+/399Pj84ev+7/T7+/3/+fz98Pb93en46/P89/r7/f39//79+Pv87/T70t3xzdj78/f8+fr9/f7++Pv98ff94er61tz08Pf8+fv++Pv9/P3+/P3+/v7//f3+/P39+fz99/v+8ff94Oj70t3z7vb98fX88vf+9vz99/v+8/j88ff87/X92eT1t8LoI12d5wAAAPd0Uk5TAB0hC8XHCwOP//+ZAlv8//tiBS7y///xSwEMusQhA4D///6UDVn5//ZhBCbn/981CLv/sBVy/vx1BTHs5kABuasOZ//9aAEa7f/kL6//oQtH///7ZAbd5h18lgIV8vMxC6D/uAc+9fQ1CaK2BT709DcGma4DL+ntJQF7hBTA1A0/+fg2cnsFnLMCEr3TCRrN4BQbzuAUFcPXCwmrxQQCj6JscTfz9C4Qt80KAW7+/iLW4BoCb/z8dwEWu8gPOuTqNAI98fRWAWXw83oGVuDcaQYytff/szUBCWbF88RmDgxWpMvm9/746M+jVxALNFl1g4R0WTkQAc0H/SkAAAKZSURBVHic7ddfSFNRHMDx+yW6g8oHFxH14IMjYkRgDxYZRH/RhwitjIqSUYRESQwpixYoNKtRFpKmIwSLMCmKiOgPjBFFC9uLL2EQRPaQQWjEBrWgundJue3ce87dfBH2e7m7Z+d+OOfce875HbRpCopQEZppEPyaFmgWkJoGyIUZicKhEjA6x3ih0HyzX2arPhUGLU53Sk+6+VgQVAYT5tVtNOldIdASGDOvutnFN/lDywxn8s3rixjOG6rga/L3JOQZ8RLPF6rk7f8bvRxi+UFVfBudcqsv5Xle0Fo+JDOmxs+VRPOBNmSPicf4CJ46h6rhZVaR28tD59AWXuXMefdy7juFahMl37NbpG2EOw6heqKiNci1nlvOoN2xCWF5qo6bTqC9PBYviq4a+h1APqLiBmnadrimDh1k0MLRtW30KEOHGItYQEbn6rmiCjUxYLNt+LisCPnpWWiz1usNXFCDjtFrzRhTbjPnlKCTdNk5xk7gDypBATptIc94A20qUCtdP2wlrZnTKtCZwdHcwowo23VKAWrnkqRBmruRFjkUIiTLPfQWmuVQB+3SJKaNo3Kok4DM0YIclkPdnJBC52mUQ2EeWc/Yv1Ea4IAc6uO4bIxcIV9OmeA76m+VZWep3gYV6EbuSGZFN3tUoIHckcyKMDtVoNuw344p7Tj7OrdUtB7dw5+wG+/rbFWDHsARy/HWtX6oUYO0J9TOtoTmhdkkKBdvRxHqLJ0+1on+EEPPYJ9oh9TNAaRKHdK0GNWCUvfnKFQKH7BMa+LsWBHRM1+ePvcuVIjrWydaw7BqaE0GE6wAr0V1mxxyBC5OTYbixjGi3LK2bZ79Pn1Uo+nF1dXpHwts6spOR1/4F3NsK87MU3YRKkKy+AMzsY5JpiynWAAAAABJRU5ErkJggg=="});function uh(e,r,t,o,n){return()=>x(function*(){if(e)return void e();var a=yield t().then(s=>s.default);typeof o=="string"&&(o={title:o}),r??=Nb.getRootNavigationRef(),r.navigate("SHIGGYCORD_CUSTOM_PAGE",{...o,render:()=>i(a,{...n})})})()}var Nb,ml,fh=_(()=>{"use strict";l();c();u();be();ae();Q();Le();It();Nb=U("getRootNavigationRef"),ml=React.memo(()=>{var e=Ee.useNavigation(),r=Ee.useRoute(),{render:t,...o}=r.params;return React.useEffect(()=>{e.setOptions({...o})},[]),i(We,{children:i(t,{})})})});function Mb(){var e=!1;return React.useEffect(()=>{e=!0},[]),e}function dh(e){var r=()=>Object.values(Jt).flatMap(n=>n.map(a=>({[a.key]:{type:"pressable",title:a.title,icon:a.icon,IconComponent:()=>i(B.Icon,{source:a.icon}),usePredicate:a.usePredicate,useTrailing:a.useTrailing,useTitle:a.title,onPress:uh(a.onPress,null,a.render,a.title()),withArrow:!0}}))).reduce((n,a)=>Object.assign(n,a)),t=pl.SETTING_RENDERER_CONFIG,o=pl.SETTING_RENDERER_CONFIG;Object.defineProperty(pl,"SETTING_RENDERER_CONFIG",{enumerable:!0,configurable:!0,get:()=>({...o,VendettaCustomPage:{type:"route",title:()=>"ShiggyCord",useTitle:()=>"ShiggyCord",screen:{route:"VendettaCustomPage",getComponent:()=>ml}},SHIGGYCORD_CUSTOM_PAGE:{type:"route",title:()=>"ShiggyCord",useTitle:()=>"ShiggyCord",screen:{route:"SHIGGYCORD_CUSTOM_PAGE",getComponent:()=>ml}},BUNNY_CUSTOM_PAGE:{type:"route",title:()=>"ShiggyCord",useTitle:()=>"ShiggyCord",screen:{route:"BUNNY_CUSTOM_PAGE",getComponent:()=>ml}},...r()}),set:n=>o=n}),e.push(()=>{Object.defineProperty(pl,"SETTING_RENDERER_CONFIG",{value:t,writable:!0,get:void 0,set:void 0})});try{e.push(xe("createList",Ob,function(n,a){var[s]=n;if(s?.sections&&Array.isArray(s.sections)){var f=s.sections,d=f.findIndex(p=>p.settings?.includes("ACCOUNT"));if(d!==-1){var m=d+1;Object.keys(Jt).forEach(p=>{var T=f.some(I=>I.label===p);T||f.splice(m++,0,{label:p,title:p,settings:Jt[p].map(I=>I.key)})})}}return a}))}catch{e.push(xe("default",Fb,(a,s)=>{if(!Mb()){var{sections:f}=Vt(s,m=>m.props?.sections).props,d=-~f.findIndex(m=>m.settings.includes("ACCOUNT"))||1;Object.keys(Jt).forEach(m=>{f.splice(d++,0,{label:m,title:m,settings:Jt[m].map(p=>p.key)})})}}))}}var pl,Ob,Fb,mh=_(()=>{"use strict";l();c();u();ae();He();ce();Le();Ei();fh();Jr();pl=U("SETTING_RENDERER_CONFIG"),Ob=U("createList"),Fb=br("SettingsOverviewScreen",!1)});var bf={};k(bf,{patchSettings:()=>_f,registerSection:()=>sa,registeredSections:()=>Jt});function sa(e){return Jt[e.name]=e.items,()=>delete Jt[e.name]}function _f(){var e=new Array;return dh(e),()=>e.forEach(r=>r())}var Jt,Ei=_(()=>{"use strict";l();c();u();mh();Jt={}});function Sf(){return N.safeMode?.enabled===!0}function ph(){return x(function*({to:e=!Sf(),reload:r=!0}={}){var t=(N.safeMode??={enabled:e}).enabled=e,o=Rr();yield Kn(t?{}:o?.data??{}),r&&setTimeout(()=>Tr.reload(),500)}).apply(this,arguments)}var hh=_(()=>{"use strict";l();c();u();be();Ir();Yr();ke()});function Ti({label:e,version:r,icon:t}){return i(B,{label:e,trailing:i(tu,{text:r}),icon:i(B.Icon,{source:typeof t=="string"?S(t):t}),onPress:()=>{Be.setString(`${e} - ${r}`),q.showCopyToClipboard()}})}var gh=_(()=>{"use strict";l();c();u();ae();Te();Q();ce();pt()});function xf(){var e=ht();ie(N),ie(Pr);var r=[{label:E.SHIGGYCORD,version:e.bunny.version,icon:{uri:ia}},{label:"Discord",version:`${e.discord.version} (${e.discord.build})`,icon:"Discord"},{label:E.LOADER,version:`${e.bunny.loader.name} ${e.bunny.loader.version}`,icon:"DownloadIcon"}],t=[{label:"React",version:e.react.version,icon:"ScienceIcon"},{label:"React Native",version:e.react.nativeVersion,icon:"MobilePhoneIcon"},{label:E.BYTECODE,version:e.hermes.bytecodeVersion,icon:"TopicsIcon"}],o=[{label:E.OPERATING_SYSTEM,version:`${e.os.name} ${e.os.version}`,icon:"ScreenIcon"},...e.os.sdk?[{label:"SDK Version",version:e.os.sdk,icon:"StaffBadgeIcon"}]:[],...pn.Platform.OS!=="ios"?[{label:"Device",version:`${e.device.brand} ${e.device.model}`,icon:"MobilePhoneIcon"},{label:E.MANUFACTURER,version:e.device.manufacturer,icon:"WrenchIcon"}]:[]];return i(pn.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:b(oe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:24,children:[b(pn.View,{style:{alignItems:"center",paddingVertical:16},children:[i(D,{variant:"heading-xl/bold",style:{textAlign:"center"},children:E.SHIGGYCORD}),i(D,{variant:"text-md/medium",style:{textAlign:"center",marginTop:4},children:"\u{1F4A6}Goon\u{1F4A6} your discord client!"})]}),i(pe,{title:"Core Components",children:r.map((n,a)=>i(Ti,{label:n.label,version:n.version,icon:n.icon},a))}),i(pe,{title:"Runtime Environment",children:t.map((n,a)=>i(Ti,{label:n.label,version:n.version,icon:n.icon},a))}),i(pe,{title:"Device Information",children:o.map((n,a)=>i(Ti,{label:n.label,version:n.version,icon:n.icon},a))}),i(pe,{title:"Additional Details",children:i(B,{label:"Architecture",trailing:i(B.TrailingText,{text:pn.Platform.OS==="android"?"Android ARM64":"iOS ARM64"}),icon:i(B.Icon,{source:S("ScreenIcon")})})})]})})}var pn,vh=_(()=>{"use strict";l();c();u();ae();je();hl();gh();$e();At();ke();ce();pn=H(re());Te()});var Ef={};k(Ef,{dismissAlert:()=>wf,openAlert:()=>Ai});var Ai,wf,gl=_(()=>{"use strict";l();c();u();Oe();Fe();({openAlert:Ai,dismissAlert:wf}=K(()=>L("openAlert","dismissAlert")))});var _h={};k(_h,{default:()=>yh});function yh(){ie(N);var e=ht(),r=Ee.useNavigation(),t=({icon:o,label:n,subLabel:a,color:s,onPress:f})=>i(tt.TouchableOpacity,{style:{flex:1},onPress:f,activeOpacity:.7,children:i(de,{style:{backgroundColor:s,borderRadius:16,padding:16,height:100,justifyContent:"center"},children:b(tt.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:12},children:[i(tt.View,{style:{width:32,height:32,justifyContent:"center",alignItems:"center"},children:i(B.Icon,{source:o,style:{tintColor:"#FFFFFF",width:24,height:24}})}),b(tt.View,{style:{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",flex:1},children:[i(D,{variant:"text-md/semibold",style:{color:"text-default",textAlign:"left"},children:n}),a&&i(D,{variant:"text-sm/medium",style:{color:"#FFFFFFCC",textAlign:"left"},children:a})]})]})})});return i(tt.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:b(oe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:24,children:[b(pe,{title:"App Information",children:[i(B,{label:"GoonCord",icon:i(B.Icon,{source:{uri:ia??""}}),trailing:i(B.TrailingText,{text:e.bunny.version})}),i(B,{label:"Discord",subLabel:`Version ${e.discord.version}`,icon:i(B.Icon,{source:S("Discord")}),trailing:i(B.TrailingText,{text:`Build ${e.discord.build}`})}),i(B,{label:"Loader",subLabel:`${e.bunny.loader.name} loader`,icon:i(B.Icon,{source:S("DownloadIcon")}),trailing:i(B.TrailingText,{text:e.bunny.loader.version??""})})]}),b(pe,{title:"Quick Actions",children:[i(B,{label:E.RELOAD_DISCORD,subLabel:"Restart the application",icon:i(B.Icon,{source:S("RetryIcon")}),onPress:()=>Tr.reload()}),i(ft,{label:"Safe Mode",subLabel:"Temporarily disable all add-ons",icon:i(B.Icon,{source:S("ShieldIcon")}),value:Sf(),onValueChange:o=>{ph({to:o,reload:!1}),Ai("bunny-reload-safe-mode",i(Qa,{title:"Reload now?",content:o?"All add-ons will be temporarily disabled upon reload.":"All add-ons will load normally.",actions:b(iu,{children:[i(Vn,{text:"Reload Now",variant:"destructive",onPress:()=>Tr.reload()}),i(Vn,{text:"Later",variant:"secondary"})]})}))}})]}),b(pe,{title:"Developer",children:[i(ft,{label:E.DEVELOPER_SETTINGS,subLabel:"Enable developer tools and settings",icon:i(B.Icon,{source:S("WrenchIcon")}),value:N.developerSettings,onValueChange:o=>{N.developerSettings=o}}),i(ft,{label:E.SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS,subLabel:E.SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS_DESC,icon:i(B.Icon,{source:S("StaffBadgeIcon")}),value:N.enableDiscordDeveloperSettings,onValueChange:o=>{N.enableDiscordDeveloperSettings=o}})]}),i(pe,{title:"Community & Support",children:b(tt.View,{style:{flexDirection:"row",gap:12},children:[i(t,{icon:S("Discord"),label:"Discord",subLabel:"Join our support server",color:"#5865F2",onPress:()=>tt.Linking.openURL(kc)}),i(t,{icon:S("img_account_sync_github_white"),label:"GitHub",subLabel:"View the source code",color:"#24292E",onPress:()=>tt.Linking.openURL(jc)})]})}),i(pe,{title:"System Information",children:i(B,{arrow:!0,label:E.ABOUT,subLabel:"Detailed technical information",icon:i(B.Icon,{source:S("CircleInformationIcon-primary")}),onPress:()=>r.push("SHIGGYCORD_CUSTOM_PAGE",{title:E.ABOUT,render:()=>i(xf,{})})})})]})})}var tt,jO,bh=_(()=>{"use strict";l();c();u();ae();hh();je();hl();vh();$e();Te();At();Yr();ke();gl();jn();Q();ce();tt=H(re()),jO=H(fr())});function vl(e){var r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}var Sh=_(()=>{"use strict";l();c();u()});var wh=Nt((xh,yl)=>{l();c();u();os();An();Cn();as();Bd();((e,r)=>{typeof define=="function"&&define.amd?define([],r):typeof yl=="object"&&yl.exports?yl.exports=r():e.fuzzysort=r()})(xh,e=>{"use strict";var r=(R,w)=>{if(!R||!w)return Je;var O=P(R);it(w)||(w=I(w));var j=O.bitflags;return(j&w._bitflags)!==j?Je:F(O,w)},t=(R,w,O)=>{if(!R)return O?.all?C(w,O):Kl;var j=P(R),V=j.bitflags,G=j.containsSpace,M=p(O?.threshold||0),J=O?.limit||Yl,$=0,ue=0,le=w.length;function Er(Go){$Zi.peek()._score&&Zi.replaceTop(Go))}if(O?.key)for(var hr=O.key,fe=0;fe-1e3&&pr[Y]>Nr){var Fr=(pr[Y]+$r[Y])/4;Fr>pr[Y]&&(pr[Y]=Fr)}$r[Y]>pr[Y]&&(pr[Y]=$r[Y])}}if(G){for(var zr=0;zr-1e3&&Re>Nr){var Fr=(Re+Se._score)/4;Fr>Re&&(Re=Fr)}Se._score>Re&&(Re=Se._score)}if(Wr.obj=_r,Wr._score=Re,O?.scoreFn){if(Re=O.scoreFn(Wr),!Re)continue;Re=p(Re),Wr._score=Re}Re=0;--fe)Ea[fe]=Zi.poll();return Ea.total=$+ue,Ea},o=(R,w="",O="")=>{for(var j=typeof w=="function"?w:void 0,V=R.target,G=V.length,M=R.indexes,J="",$=0,ue=0,le=!1,Er=[],hr=0;hr{typeof R=="number"?R=""+R:typeof R!="string"&&(R="");var w=me(R);return d(R,{_targetLower:w._lower,_targetLowerCodes:w.lowerCodes,_bitflags:w.bitflags})},a=()=>{Bo.clear(),at.clear()},s=(function(){function R(){Ye(this,R)}return Ke(R,[{key:"indexes",get:function(){return this._indexes.slice(0,this._indexes.len).sort((O,j)=>O-j)}},{key:"indexes",set:function(O){return this._indexes=O}},{key:"highlight",value:function(O,j){return o(this,O,j)}},{key:"score",get:function(){return m(this._score)}},{key:"score",set:function(O){this._score=p(O)}}]),R})(),f=(function(R){io(w,R);function w(){return Ye(this,w),no(this,w,arguments)}return Ke(w,[{key:"score",get:function(){return m(this._score)}},{key:"score",set:function(j){this._score=p(j)}}]),w})(is(Array)),d=(R,w)=>{var O=new s;return O.target=R,O.obj=w.obj??Je,O._score=w._score??Nr,O._indexes=w._indexes??[],O._targetLower=w._targetLower??"",O._targetLowerCodes=w._targetLowerCodes??Je,O._nextBeginningIndexes=w._nextBeginningIndexes??Je,O._bitflags=w._bitflags??0,O},m=R=>R===Nr?0:R>1?R:Math.E**(((-R+1)**.04307-1)*-2),p=R=>R===0?Nr:R>1?R:1-Math.pow(Math.log(R)/-2+1,1/.04307),T=R=>{typeof R=="number"?R=""+R:typeof R!="string"&&(R=""),R=R.trim();var w=me(R),O=[];if(w.containsSpace){var j=R.split(/\s+/);j=[...new Set(j)];for(var V=0;V{if(R.length>999)return n(R);var w=Bo.get(R);return w!==void 0||(w=n(R),Bo.set(R,w)),w},P=R=>{if(R.length>999)return T(R);var w=at.get(R);return w!==void 0||(w=T(R),at.set(R,w)),w},C=(R,w)=>{var O=[];O.total=R.length;var j=w?.limit||Yl;if(w?.key)for(var V=0;V=j)return O}}else if(w?.keys)for(var V=0;V=0;--ue){var M=ko(G,w.keys[ue]);if(!M){$[ue]=wa;continue}it(M)||(M=I(M)),M._score=Nr,M._indexes.len=0,$[ue]=M}if($.obj=G,$._score=Nr,O.push($),O.length>=j)return O}else for(var V=0;V=j))return O}return O},F=(R,w,O=!1,j=!1)=>{if(O===!1&&R.containsSpace)return te(R,w,j);for(var V=R._lower,G=R.lowerCodes,M=G[0],J=w._targetLowerCodes,$=G.length,ue=J.length,fe=0,le=0,Er=0;;){var hr=M===J[le];if(hr){if(mr[Er++]=le,++fe,fe===$)break;M=G[fe]}if(++le,le>=ue)return Je}var fe=0,_r=!1,_e=0,Se=w._nextBeginningIndexes;Se===Je&&(Se=w._nextBeginningIndexes=ar(w.target)),le=mr[0]===0?0:Se[mr[0]-1];var Lt=0;if(le!==ue)for(;;)if(le>=ue){if(fe<=0||(++Lt,Lt>200))break;--fe;var st=Vr[--_e];le=Se[st]}else{var hr=G[fe]===J[le];if(hr){if(Vr[_e++]=le,++fe,fe===$){_r=!0;break}++le}else le=Se[le]}var sr=$<=1?-1:w._targetLower.indexOf(V,mr[0]),Me=!!~sr,Or=Me?sr===0||w._nextBeginningIndexes[sr-1]===sr:!1;if(Me&&!Or){for(var Y=0;Y{for(var Re=0,Tn=0,Br=1;Br<$;++Br)Mr[Br]-Mr[Br-1]!==1&&(Re-=Mr[Br],++Tn);var Ea=Mr[$-1]-Mr[0]-($-1);if(Re-=(12+Ea)*Tn,Mr[0]!==0&&(Re-=Mr[0]*Mr[0]*.2),!_r)Re*=1e3;else{for(var Go=1,Br=Se[0];Br24&&(Re*=(Go-24)*10)}return Re-=(ue-$)/2,Me&&(Re/=1+$*$*1),Or&&(Re/=1+$*$*1),Re-=(ue-$)/2,Re};if(_r)if(Or){for(var Y=0;Y<$;++Y)mr[Y]=sr+Y;var jo=mr,Uo=zr(mr)}else var jo=Vr,Uo=zr(Vr);else{if(Me)for(var Y=0;Y<$;++Y)mr[Y]=sr+Y;var jo=mr,Uo=zr(jo)}w._score=Uo;for(var Y=0;Y<$;++Y)w._indexes[Y]=jo[Y];w._indexes.len=$;var Wr=new s;return Wr.target=w.target,Wr._score=w._score,Wr._indexes=w._indexes,Wr},te=(R,w,O)=>{for(var j=new Set,V=0,G=Je,M=0,J=R.spaceSearches,$=J.length,ue=0,le=()=>{for(var zr=ue-1;zr>=0;zr--)w._nextBeginningIndexes[Ue[zr*2+0]]=Ue[zr*2+1]},Er=!1,Y=0;Y<$;++Y){$r[Y]=Nr;var hr=J[Y];if(G=F(hr,w),O){if(G===Je)continue;Er=!0}else if(G===Je)return le(),Je;var fe=Y===$-1;if(!fe){for(var _r=G._indexes,_e=!0,Se=0;Se<_r.len-1;Se++)if(_r[Se+1]-_r[Se]!==1){_e=!1;break}if(_e)for(var Lt=_r[_r.len-1]+1,st=w._nextBeginningIndexes[Lt-1],sr=Lt-1;sr>=0&&st===w._nextBeginningIndexes[sr];sr--)w._nextBeginningIndexes[sr]=Lt,Ue[ue*2+0]=sr,Ue[ue*2+1]=st,ue++}V+=G._score/$,$r[Y]=G._score/$,G._indexes[0]V){if(O)for(var Y=0;Y<$;++Y)$r[Y]=Or._score/$;return Or}O&&(G=w),G._score=V;var Y=0;for(var Fr of j)G._indexes[Y++]=Fr;return G._indexes.len=Y,G},Ce=R=>R.replace(RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02B8\\u02E0-\\u02E4\\u1D00-\\u1D25\\u1D2C-\\u1D5C\\u1D62-\\u1D65\\u1D6B-\\u1D77\\u1D79-\\u1DBE\\u1E00-\\u1EFF\\u2071\\u207F\\u2090-\\u209C\\u212A-\\u212B\\u2132\\u214E\\u2160-\\u2188\\u2C60-\\u2C7F\\uA722-\\uA787\\uA78B-\\uA7DC\\uA7F1-\\uA7FF\\uAB30-\\uAB5A\\uAB5C-\\uAB64\\uAB66-\\uAB69\\uFB00-\\uFB06\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{1DF00}-\\u{1DF1E}\\u{1DF25}-\\u{1DF2A}]+","gu"),w=>w.normalize("NFD")).replace(/[\u0300-\u036f]/g,""),me=R=>{R=Ce(R);for(var w=R.length,O=R.toLowerCase(),j=[],V=0,G=!1,M=0;M=97&&J<=122?J-97:J>=48&&J<=57?26:J<=127?30:31;V|=1<<$}return{lowerCodes:j,bitflags:V,containsSpace:G,_lower:O}},ee=R=>{for(var w=R.length,O=[],j=0,V=!1,G=!1,M=0;M=65&&J<=90,ue=$||J>=97&&J<=122||J>=48&&J<=57,le=$&&!V||!G||!ue;V=$,G=ue,le&&(O[j++]=M)}return O},ar=R=>{R=Ce(R);for(var w=R.length,O=ee(R),j=[],V=O[0],G=0,M=0;MM?j[M]=V:(V=O[++G],j[M]=V===void 0?w:V);return j},Bo=new Map,at=new Map,mr=[],Vr=[],Ue=[],pr=[],$r=[],z=[],ir=[],ko=(R,w)=>{var O=R[w];if(O!==void 0)return O;if(typeof w=="function")return w(R);var j=w;Array.isArray(w)||(j=w.split("."));for(var V=j.length,G=-1;R&&++Gtypeof R=="object"&&typeof R._bitflags=="number",Yl=1/0,Nr=-Yl,Kl=[];Kl.total=0;var Je=null,wa=n(""),Wv=R=>{var w=[],O=0,j={},V=G=>{for(var M=0,J=w[M],$=1;$>1]=w[M],$=1+(M<<1)}for(var le=M-1>>1;M>0&&J._score>1)w[M]=w[le];w[M]=J};return j.add=G=>{var M=O;w[O++]=G;for(var J=M-1>>1;M>0&&G._score>1)w[M]=w[J];w[M]=G},j.poll=G=>{if(O!==0){var M=w[0];return w[0]=w[--O],V(),M}},j.peek=G=>{if(O!==0)return w[0]},j.replaceTop=G=>{w[0]=G,V()},j},Zi=Wv();return{single:r,go:t,prepare:n,cleanup:a}})});function kb(e){var[r,t]=React.useState(""),[o,n]=React.useState(""),[a,s]=React.useState(!1),[f,d]=React.useState(!1);React.useEffect(()=>{d(vl(r))},[r]);function m(){!r||!vl(r)||(s(!0),e.fetchFn(r).then(()=>wf("AddonInputAlert")).catch(p=>p instanceof Error?n(p.message):String(p)).finally(()=>s(!1)))}return i(Qa,{title:e.label,content:"Type in the source URL you want to install from:",extraContent:b(oe,{style:{marginTop:-8,gap:12},children:[i(Dr.View,{style:{backgroundColor:"rgba(0,0,0,0.05)",borderRadius:8,padding:4,paddingHorizontal:8},children:i(cr,{autoFocus:!0,isClearable:!0,value:r,onChange:p=>{t(p),o&&n("")},returnKeyType:"done",onSubmitEditing:m,state:o?"error":void 0,errorMessage:o||void 0,style:{fontSize:16}})}),i(Dr.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:i(Z,{size:"sm",variant:"tertiary",text:"Import from clipboard",icon:S("ClipboardListIcon"),onPress:()=>Be.getString().then(p=>t(p.trim()))})})]}),actions:b(Dr.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:8},children:[i(Vn,{disabled:a,text:"Cancel",variant:"secondary",style:{flex:1}}),i(Z,{loading:a,text:a?"Installing...":"Install",variant:"primary",onPress:m,icon:a?void 0:S("DownloadIcon"),style:{flex:1}})]})})}function Zt({CardComponent:e,...r}){var[t,o]=React.useState(""),[n,a]=React.useState(()=>null),{bottom:s}=eu(),f=Ee.useNavigation(),d=React.useRef(null),[m,p]=React.useState(!1);React.useEffect(()=>{var C=!0;return Promise.resolve().then(()=>H(wh())).then(F=>{var te=F.default??F;C&&(d.current=te,p(!0))}).catch(()=>{}),()=>{C=!1}},[]),(0,la.useEffect)(()=>{r.OptionsActionSheetComponent&&f.setOptions({headerRight:()=>i(we,{size:"sm",variant:"secondary",icon:S("MoreHorizontalIcon"),onPress:()=>or("AddonMoreSheet",r.OptionsActionSheetComponent)})})},[f]);var T=(0,la.useMemo)(()=>{var C=r.items;r.resolveItem&&(C=C.map(r.resolveItem).filter(ss));var F=C.filter(te=>ss(te)&&typeof te=="object");return!t&&n&&F.sort(n),!m||!d.current?[]:d.current.go(t,F,{keys:r.searchKeywords,all:!0})},[r.items,n,t,m]),I=(0,la.useCallback)(()=>{if(!r.installAction)return()=>{};var{label:C,onPress:F,fetchFn:te}=r.installAction;te?Ai("AddonInputAlert",i(kb,{label:C??"Install",fetchFn:te})):F?.()},[]);if(T.length===0&&!t)return b(Dr.View,{style:{gap:32,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[b(Dr.View,{style:{gap:8,alignItems:"center"},children:[i(Dr.Image,{source:S("empty_quick_switcher")}),i(D,{variant:"text-lg/semibold",color:"text-default",children:"Oops! Nothing to see here\u2026 yet!"})]}),i(Z,{size:"lg",icon:S("DownloadIcon"),text:r.installAction?.label??"Install",onPress:I})]});var P=b(Dr.View,{style:{paddingBottom:8},children:[N.safeMode?.enabled&&b(Dr.View,{style:{marginBottom:10},children:[i(Ja,{messageType:0,children:r.safeModeHint?.message}),r.safeModeHint?.footer]}),b(Dr.View,{style:{flexDirection:"row",gap:8},children:[i(Io,{style:{flexGrow:1},isRound:!!r.sortOptions,onChangeText:C=>o(C)}),r.sortOptions&&i(we,{icon:S("MoreVerticalIcon"),variant:"tertiary",disabled:!!t,onPress:()=>Bb({key:"AddonListSortOptions",header:{title:"Sort Options"},options:Object.entries(r.sortOptions).map(([C,F])=>({label:C,onPress:()=>a(()=>F)}))})})]}),r.ListHeaderComponent&&i(r.ListHeaderComponent,{})]});return b(We,{children:[i(fu,{data:T,extraData:t,estimatedItemSize:136,ListHeaderComponent:P,ListEmptyComponent:()=>b(Dr.View,{style:{gap:12,padding:12,alignItems:"center"},children:[i(Dr.Image,{source:S("devices_not_found")}),i(D,{variant:"text-lg/semibold",color:"text-default",children:"Hmmm... could not find that!"})]}),contentContainerStyle:{padding:8,paddingHorizontal:12,paddingBottom:90},ItemSeparatorComponent:()=>i(Dr.View,{style:{height:8}}),ListFooterComponent:r.ListFooterComponent,renderItem:({item:C})=>i(e,{item:C.obj,result:C})}),r.installAction&&i(cu,{positionBottom:s+8,icon:S("PlusLargeIcon"),onPress:I})]})}var la,Dr,Bb,pF,_l=_(()=>{"use strict";l();c();u();ae();Te();ke();gl();gt();Sh();Oe();Fe();Q();ce();It();Rn();la=H(fr()),Dr=H(re()),{showSimpleActionSheet:Bb,hideActionSheet:pF}=K(()=>L("showSimpleActionSheet"))});var Tf,Eh=_(()=>{"use strict";l();c();u();Q();Rt();Tf=jr({smallIcon:{tintColor:xt.colors.LOGO_PRIMARY,height:18,width:18},badgeIcon:{tintColor:xt.colors.LOGO_PRIMARY,height:12,width:12},badgesContainer:{flexWrap:"wrap",flexDirection:"row",gap:6,borderRadius:6,padding:4}})});function Af(){return jb()(xt.unsafe_rawColors.YELLOW_300).alpha(.3).hex()}function Ub(){var e=Tf(),{plugin:r,result:t}=bl(),o=t[0].highlight((s,f)=>i(D,{style:{backgroundColor:Af()},children:s},f)),n=r.icon&&S(r.icon),a=i(D,{numberOfLines:1,variant:"heading-lg/semibold",children:o.length?o:r.name});return b(ot.View,{style:{flexDirection:"row",alignItems:"center",gap:6},children:[n&&i(ot.Image,{style:e.smallIcon,source:n}),a]})}function Gb(){var{plugin:e,result:r}=bl(),t=Tf();if(!e.authors)return null;var o=r[2].highlight((s,f)=>i(D,{style:{backgroundColor:Af()},children:s},f)),n=e.getBadges(),a=o.length>0?o:e.authors.map(s=>s.name).join(", ");return b(ot.View,{style:{flexDirection:"row",flexWrap:"wrap",flexShrink:1,gap:4},children:[b(D,{variant:"text-sm/semibold",color:"text-muted",children:["by ",a]}),n.length>0&&i(ot.View,{style:t.badgesContainer,children:n.map((s,f)=>i(ot.Image,{source:s.source,style:t.badgeIcon},f))})]})}function Hb(){var{plugin:e,result:r}=bl(),t=r[1].highlight((o,n)=>i(D,{style:{backgroundColor:Af()},children:o},n));return i(D,{variant:"text-md/medium",children:t.length?t:e.description})}function Cf({result:e,item:r}){r.usePluginState();var[,t]=W.useReducer(()=>({}),0),o=(0,ca.useMemo)(()=>({plugin:r,result:e}),[r,e]),n=(r.id||"").toLowerCase(),a=n.includes("quickinstall");return i(Th.Provider,{value:o,children:i(de,{children:b(oe,{spacing:16,children:[b(ot.View,{style:{flexDirection:"row",justifyContent:"space-between"},children:[b(ot.View,{style:{flexShrink:1},children:[i(Ub,{}),i(Gb,{})]}),i(ot.View,{children:b(oe,{spacing:12,direction:"horizontal",children:[i(Vb,{}),i(ot.View,{style:{opacity:a?.45:1},children:i(ou,{value:r.isEnabled(),disabled:a,onValueChange:s=>{a||(r.toggle(s),t())}})})]})})]}),i(Hb,{})]})})})}var ca,ot,jb,Th,bl,Vb,Ah=_(()=>{"use strict";l();c();u();ae();Q();Eh();Te();ce();gt();ca=H(fr()),ot=H(re()),jb=()=>zn(),Th=(0,ca.createContext)(null),bl=()=>(0,ca.useContext)(Th);Vb=()=>{var{plugin:e}=bl(),r=Ee.useNavigation();return b(ot.View,{style:{flexDirection:"row",gap:6},children:[i(we,{size:"sm",variant:"secondary",icon:S("SettingsIcon"),disabled:!e.getPluginSettingsComponent(),onPress:()=>r.push("SHIGGYCORD_CUSTOM_PAGE",{title:e.name,render:e.getPluginSettingsComponent()})}),i(we,{size:"sm",variant:"secondary",icon:S("CircleInformationIcon-primary"),onPress:()=>{or("PluginInfoActionSheet",e.resolveSheetComponent(),{plugin:e,navigation:r})}})]})}});var Ch={};k(Ch,{VdPluginManager:()=>X});var Ur,hn,X,Qt=_(()=>{"use strict";l();c();u();be();$e();ke();Jr();vr();Ur=qr(Cr(bt("VENDETTA_PLUGINS"))),hn={},X={plugins:Ur,pluginFetch(e){return x(function*(){return yield ze(e,{cache:"no-store"})})()},fetchPlugin(e){return x(function*(){e.endsWith("/")||(e+="/");var r=Ur[e],t;try{t=yield(yield this.pluginFetch(e+"manifest.json")).json()}catch{throw new Error(`Failed to fetch manifest for ${e}`)}var o;if(r?.manifest.hash!==t.hash)try{o=yield(yield this.pluginFetch(e+(t.main||"index.js"))).text()}catch{}if(!o&&!r)throw new Error(`Failed to fetch JS for ${e}`);Ur[e]={id:e,manifest:t,enabled:r?.enabled??!1,update:r?.update??!0,js:o??r.js}}).call(this)},installPlugin(e,r=!0){return x(function*(){if(e.endsWith("/")||(e+="/"),typeof e!="string"||e in Ur)throw new Error("Plugin already installed");yield this.fetchPlugin(e),r&&(yield this.startPlugin(e))}).call(this)},evalPlugin(e){return x(function*(){var r={...globalThis.vendetta,plugin:{id:e.id,manifest:e.manifest,storage:yield Cr(bt(e.id))},logger:new Ka(`ShiggyCord \xBB ${e.manifest.name}`)},t=`vendetta=>{return ${e.js}} -//# sourceURL=${e.id}`,o=(0,eval)(t)(r),n=typeof o=="function"?o():o;return n?.default??n??{}})()},startPlugin(e){return x(function*(){e.endsWith("/")||(e+="/");var r=Ur[e];if(!r)throw new Error("Attempted to start non-existent plugin");try{if(!N.safeMode?.enabled){var t=yield this.evalPlugin(r);hn[e]=t,t.onLoad?.()}r.enabled=!0}catch(o){A.error(`Plugin ${r.id} errored whilst loading, and will be unloaded`,o);try{hn[r.id]?.onUnload?.()}catch(n){A.error(`Plugin ${r.id} errored whilst unloading`,n)}delete hn[e],r.enabled=!1}}).call(this)},stopPlugin(e,r=!0){e.endsWith("/")||(e+="/");var t=Ur[e],o=hn[e];if(!t)throw new Error("Attempted to stop non-existent plugin");if(!N.safeMode?.enabled){try{o?.onUnload?.()}catch(n){A.error(`Plugin ${t.id} errored whilst unloading`,n)}delete hn[e]}r&&(t.enabled=!1)},removePlugin(e){return x(function*(){e.endsWith("/")||(e+="/");var r=Ur[e];r.enabled&&this.stopPlugin(e),delete Ur[e],yield _s(e)}).call(this)},initPlugins(){return x(function*(){yield Ut(N,Ur);var e=Object.keys(Ur);if(!N.safeMode?.enabled){var r=e.filter(f=>Ur[f].enabled),t=2,o=500;if(r.length>0)for(var n=f=>new Promise(d=>setTimeout(d,f)),a=0;ax(function*(){try{if(!Ur[f])return;yield this.startPlugin(f).catch(d=>A.error(`Vendetta plugin ${f} failed to start:`,d))}catch(d){A.error(`Unexpected error while starting vendetta plugin ${f}:`,d)}}).call(this))),a+tUr[m]?.update);for(var d of f){try{yield this.fetchPlugin(d).catch(m=>{A.error(m.message)})}catch(m){A.error(`Failed background fetch for vendetta plugin ${d}:`,m)}yield new Promise(m=>setTimeout(m,200))}}).call(this)}return()=>this.stopAllPlugins()}).call(this)},stopAllPlugins(){return Object.keys(hn).forEach(e=>this.stopPlugin(e,!1))},getSettings:e=>hn[e]?.settings}});function Wb(e,r=null,t=!1){if(!(e.guild_id!==Vc&&e.guild_id!==Gc)){var o;if(e.parent_id===$c||e.parent_id===Hc)o="Plugin";else if((e.parent_id===Ga||e.parent_id===Ua)&&mt())o="Theme";else return;var{firstMessage:n}=t?$b(e):{firstMessage:r},a=n?.content?.match(Uc)?.filter(Ci[o].urlsFilter);if(!(!a||!a[0]))return o==="Plugin"&&!a[0].endsWith("/")&&(a[0]+="/"),[o,a[0]]}}function Yb(e,r=null,t=!1){var[o,n]=Wb(e,r,t)??[];ie(X.plugins),ie(ge);var[a,s]=React.useState(!1);if(!o||!n)return[!0];var f=!!Ci[o].storage[n],d=()=>x(function*(){s(!0);try{yield Ci[o].installOrRemove(n)}catch(m){q(m.message,S("Small"))}finally{s(!1)}})();return[!1,o,f,a,d]}var $b,zb,Ci,Kb,Rh,Ih=_(()=>{"use strict";l();c();u();be();ae();je();Qt();$e();Ir();Te();Kt();He();jn();Oe();ce();Le();It();pt();({useFirstForumPostMessage:$b}=K(()=>L("useFirstForumPostMessage"))),zb=U("MostCommonForumPostReaction"),Ci={Plugin:{storage:X.plugins,urlsFilter:e=>e.startsWith(ja),installOrRemove:e=>{var r=Ci.Plugin.storage[e];return r?X.removePlugin(e):X.installPlugin(e)}},Theme:{storage:ge,urlsFilter:e=>e.endsWith(".json"),installOrRemove:e=>{var r=Ci.Theme.storage[e];return r?Yt(e):Tt(e)}}};Kb=()=>xe("MostCommonForumPostReaction",zb,([{thread:e,firstMessage:r}],t)=>{var[o,n,a,s,f]=Yb(e,r,!0);if(!o)return b(Gn,{children:[t,i(We,{children:i(Z,{size:"sm",loading:s,disabled:s,variant:a?"secondary":"primary",text:a?E.UNINSTALL:E.INSTALL,onPress:f,icon:S(a?"ic_message_delete":"DownloadIcon"),style:{marginLeft:8}})})]})}),Rh=(()=>{var e=[Kb()];return()=>e.map(r=>r())})});function Rf({title:e,confirmText:r,confirmColor:t,onConfirm:o,cancelText:n,placeholder:a,initialValue:s="",secureTextEntry:f}){var[d,m]=React.useState(s),[p,T]=React.useState("");function I(){var P=Promise.resolve(o(d));P.then(()=>{Ph.close()}).catch(C=>{T(C.message)})}return i(Xa,{title:e,confirmText:r,confirmColor:t,isConfirmButtonDisabled:p.length!==0,onConfirm:I,cancelText:n,onCancel:()=>Ph.close(),children:i(uu,{placeholder:a,value:d,onChange:P=>{m(typeof P=="string"?P:P.text),p&&T("")},returnKeyType:"done",onSubmitEditing:I,error:p||void 0,secureTextEntry:f,autoFocus:!0,showBorder:!0,style:{alignSelf:"stretch"}})})}var Ph,Dh=_(()=>{"use strict";l();c();u();ae();ce();Le();Ph=U("openLazy","close")});function vt(e){var r=e;return r.body=e.content,delete r.content,r.isDismissable??=!0,Lh.show(r)}var Lh,If,Nh,ua=_(()=>{"use strict";l();c();u();be();Le();Dh();Lh=U("openLazy","close");If=(e,r)=>Lh.openLazy({importer:()=>x(function*(){return()=>React.createElement(e,r)})()}),Nh=e=>If(Rf,e)});function Mh(e){if(e.startsWith(ja))return"plugin";if(e.endsWith(".json")&&mt())return"theme"}function Bh(e,r){(e==="plugin"?X.installPlugin.bind(X):Tt)(r).then(()=>{q(E.SUCCESSFULLY_INSTALLED,S("Check"))}).catch(t=>{q(t.message,S("Small"))})}var kh,Xb,Jb,Oh,Fh,jh,Uh=_(()=>{"use strict";l();c();u();be();je();ua();Qt();Ir();Te();Kt();He();jn();Oe();Q();ms();Pn();Le();pt();kh=H(re()),Xb=lr(sc("showSimpleActionSheet")),Jb=U("handleClick"),{getChannelId:Oh}=K(()=>ri),{getChannel:Fh}=K(()=>L("getChannel"));jh=(()=>{var e=new Array;return e.push(xe("showSimpleActionSheet",Xb,r=>{if(r[0].key==="LongPressUrl"){var{header:{title:t},options:o}=r[0],n=Mh(t);n&&o.push({label:E.INSTALL_ADDON,onPress:()=>Bh(n,t)})}})),e.push(ct("handleClick",Jb,function(r,t){return x(function*(){var{href:o}=r[0],n=Mh(o);if(!n)return t.apply(this,r);if(n==="theme"&&Fh(Oh())?.parent_id!==Ua&&Fh(Oh())?.parent_id!==Ga)return t.apply(this,r);vt({title:E.HOLD_UP,content:Co("CONFIRMATION_LINK_IS_A_TYPE",{urlType:n}),onConfirm:()=>Bh(n,o),confirmText:E.INSTALL,cancelText:E.CANCEL,secondaryConfirmText:E.OPEN_IN_BROWSER,onConfirmSecondary:()=>kh.Linking.openURL(o)})}).call(this)})),()=>e.forEach(r=>r())})});var Hh={};k(Hh,{default:()=>Zb});var Gh,Zb,Vh=_(()=>{"use strict";l();c();u();eo();Ih();Uh();Gh=[],Zb=Lr({manifest:{id:"bunny.quickinstall",version:"1.0.0",type:"plugin",spec:3,main:"",display:{name:"QuickInstall",description:"Quickly install Vendetta plugins and themes",authors:[{name:"Vendetta Team"}]}},start(){Gh=[Rh(),jh()]},stop(){Gh.forEach(e=>e())}})});var Df={};k(Df,{deleteJsxCreate:()=>Qb,onJsxCreate:()=>Sl,patchJsx:()=>Pf});function Sl(e,r){Do.has(e)||Do.set(e,[]),Do.get(e).push(r)}function Qb(e,r){if(Do.has(e)){var t=Do.get(e);t.splice(t.indexOf(r),1),t.length===0&&Do.delete(e)}}function Pf(){var e=([t],o)=>{if(typeof o.type>"u")return o.type="RCTView",o;if(typeof t=="function"&&Do.has(t.name)){var n=Do.get(t.name);for(var a of n){var s=a(t,o);s!==void 0&&(o=s)}return o}},r=[xe("jsx",$h,e),xe("jsxs",$h,e)];return()=>r.forEach(t=>t())}var Do,$h,xl=_(()=>{"use strict";l();c();u();He();Fe();Do=new Map,$h=U("jsx","jsxs")});var Wh={};k(Wh,{default:()=>rS});var eS,zh,Lf,wl,rS,Yh=_(()=>{"use strict";l();c();u();be();He();xl();Fe();eo();Q();eS=br("useBadges",!1),zh=new Map,Lf=new Map,wl=new Set,rS=Lr({manifest:{id:"bunny.badges",version:"1.2.0",type:"plugin",spec:3,main:"",display:{name:"Badges",description:"Adds badges to user's profile",authors:[{name:"cocobo1"},{name:"pylixonly"}]}},start(){Sl("ProfileBadge",(t,o)=>{if(o.props.id?.startsWith("rain-")){var n=Lf.get(o.props.id);n&&(o.props.source=n.source,o.props.label=n.label,o.props.id=n.id)}}),Sl("RenderedBadge",(t,o)=>{if(o.props.id?.startsWith("rain-")){var n=Lf.get(o.props.id);n&&Object.assign(o.props,n)}});var e=(t,o)=>x(function*(){try{var n=yield fetch(t);return n.ok?yield n.json():o}catch{return o}})(),r=t=>x(function*(){if(!wl.has(t)){wl.add(t);try{var[o,n,a,s,f]=yield Promise.all([e("https://codeberg.org/chocomint-chan/GoonCord_Badges/raw/branch/main/badges.json",{}),e("https://codeberg.org/chocomint-chan/GoonCord_Badges/raw/branch/main/assets/roles/roles.json",{}),e("https://codeberg.org/raincord/badges/raw/branch/main/badges.json",{}),e("https://codeberg.org/raincord/badges/raw/branch/main/assets/roles/roles.json",{}),e("https://badge.equicord.org/badges.json",{})]),d=[],m=[{badges:o,roles:n},{badges:a,roles:s}];m.forEach(({badges:T,roles:I})=>{var P=T[t];P&&(P.roles?.forEach(C=>{var F=I[C];F&&d.push({label:F.label,url:F.url})}),P.custom&&d.push(...P.custom))});var p=f[t]??[];p.forEach(T=>{d.push({label:T.tooltip,url:T.badge})}),zh.set(t,d),d.forEach((T,I)=>{var P=`rain-${t}-${I}`;Lf.set(P,{id:P,source:{uri:T.url},label:T.label,userId:t})}),xr.dispatch({type:"USER_UPDATE",user:{id:t}})}catch(T){console.error("[bunny.badges] Failed to fetch/process badges:",T)}finally{wl.delete(t)}}})();return xe("default",eS,([t],o)=>{if(t){var n=t.userId,a=zh.get(n);if(!a){wl.has(n)||r(n);return}a.forEach((s,f)=>{var d=`rain-${n}-${f}`;o.unshift({id:d,description:s.label,icon:" _"})})}})}})});var Qh={};k(Qh,{default:()=>lS});function nS(){var e=/client-analytics\.braintreegateway\.com|discord\.com\/api\/v9\/(science|track)|app\.adjust\..*|.*\.ingest\.sentry\.io/;try{var r=ct("send",XMLHttpRequest.prototype,function(t,o){if(!(this.__sentry_xhr__?.url&&e.test(this.__sentry_xhr__.url)))return o.apply(this,t)});return r}catch{return()=>!1}}function aS(){var e={};try{Object.keys(console).forEach(r=>{var t=console[r];if(t){e[r]=t;var o=t.__sentry_original__;console[r]=o??t}})}catch(r){A.log("Failed to de-sentrify console functions!",r)}return()=>{Object.keys(e).forEach(r=>{e[r]&&(console[r]=e[r])})}}function iS(){var e=[El?.AnalyticsActionHandlers&&Lo("handleTrack",El.AnalyticsActionHandlers),El?.AnalyticsActionHandlers&&Lo("handleFingerprint",El.AnalyticsActionHandlers),Kh&&Lo("track",Kh),qh&&Lo("trackWithMetadata",qh),Xh&&Lo("submitLiveCrashReport",Xh),Jh?._metrics&&Lo("push",Jh._metrics)].filter(Boolean);return()=>e.forEach(r=>r())}function sS(){var e=[];if(yr.initializer&&e.push(Lo("initSentry",yr.initializer)),yr.main&&yr.main.addBreadcrumb&&e.push(Lo("addBreadcrumb",yr.main)),yr.client)try{yr.client.getOptions().enabled=!1,yr.client.close(),yr.main&&(yr.main.getStackTop&&yr.main.getStackTop().scope.clear(),yr.main.getScope&&yr.main.getScope().clear())}catch{}return()=>{try{e.forEach(r=>r()),yr.client&&(yr.client.getOptions().enabled=!0,yr.client.open())}catch{}}}var Nf,El,Kh,qh,Xh,Jh,tS,Zh,oS,yr,Lo,lS,eg=_(()=>{"use strict";l();c();u();eo();Fe();He();vr();Nf=[],El=L("AnalyticsActionHandlers"),Kh=L("encodeProperties","track"),qh=L("getVoiceStateMetadata"),Xh=L("submitLiveCrashReport"),Jh=L("_metrics"),tS=globalThis.__SENTRY__,Zh=tS?.hub,oS=Zh?.getClient(),yr={initializer:L("initSentry"),main:Zh,client:oS},Lo=(e,r)=>{try{return ct(e,r,()=>{})}catch{return()=>!1}};lS=Lr({manifest:{id:"bunny.notrack",version:"1.1.0",type:"plugin",spec:3,main:"",display:{name:"NoTrack",description:"Disables Discord's telemetry",authors:[{name:"maisymoe"}]}},start(){Nf=[nS(),aS(),iS(),sS()].filter(Boolean),A.log("NoTrack: Enabled - all telemetry tracking disabled")},stop(){Nf.forEach(e=>e?.()),Nf=[],A.log("NoTrack: Disabled - telemetry tracking restored")}})});var tg={};k(tg,{default:()=>dS});function fS(e,r){var t=e;return r.twitter&&(t=t.replace(/https?:\/\/(?:www\.)?(twitter\.com|x\.com)(\/[^\s]+)/gi,"https://fxtwitter.com$2")),r.instagram&&(t=t.replace(/https?:\/\/(?:www\.)?instagram\.com(\/[^\s]+)/gi,"https://kkinstagram.com$1")),r.tiktok&&(t=t.replace(/https?:\/\/(?:www\.)?tiktok\.com(\/[^\s]+)/gi,"https://tiktokez.com$1"),t=t.replace(/https?:\/\/vm\.tiktok\.com\/([A-Za-z0-9]+)\/?/gi,"https://vm.tiktokez.com/$1")),r.reddit&&(t=t.replace(/https?:\/\/(?:www\.)?reddit\.com(\/[^\s]+)/gi,"https://rxddit.com$1")),t}var _B,bB,SB,xB,rg,cS,uS,Ri,dS,og=_(()=>{"use strict";l();c();u();eo();Fe();He();vr();ke();Q();({TableRowGroup:_B,TableRow:bB,TableSwitchRow:SB,Stack:xB}=L("TableRowGroup","TableRow","TableSwitchRow","Stack")),{ScrollView:rg,Text:cS}=re(),uS=L("sendMessage"),Ri=null;dS=Lr({manifest:{id:"bunny.fixembed",version:"1.0.0",type:"plugin",spec:3,main:"",display:{name:"FixEmbed",description:"Improves social media embeds by using privacy-friendly alternative frontends.",authors:[{name:"ShiggyCord Team"}]}},SettingsComponent(){var{useState:e,useEffect:r}=W,[t,o]=e({twitter:N.fixembed?.twitter??!0,instagram:N.fixembed?.instagram??!0,tiktok:N.fixembed?.tiktok??!0,reddit:N.fixembed?.reddit??!0});r(()=>{N.fixembed=t},[t]);var n=(P,C)=>{o(F=>({...F,[P]:C}))},{TableRowGroup:a,TableRow:s,TableSwitchRow:f,Stack:d}=L("TableRowGroup","TableRow","TableSwitchRow","Stack");if(!a||!f||!s||!d)return W.createElement(rg,{style:{flex:1,padding:12}},W.createElement(cS,null,"FixEmbed UI unavailable (missing TableRow components)."));var m=a,p=s,T=f,I=d;return W.createElement(rg,{style:{flex:1}},[W.createElement(I,{spacing:8,style:{padding:10}},W.createElement(m,{title:"Platforms"},W.createElement(T,{label:"Twitter/X",value:t.twitter,onValueChange:P=>n("twitter",P)}),W.createElement(T,{label:"Instagram",value:t.instagram,onValueChange:P=>n("instagram",P)}),W.createElement(T,{label:"TikTok",value:t.tiktok,onValueChange:P=>n("tiktok",P)}),W.createElement(T,{label:"Reddit",value:t.reddit,onValueChange:P=>n("reddit",P)})),W.createElement(m,{title:"About"},W.createElement(p,{label:"Description",subLabel:"This plugin automatically converts social media links to privacy-friendly alternative frontends for better embeds.",disabled:!0})))])},start(){A.log("FixEmbed: Starting plugin"),N.fixembed=N.fixembed||{twitter:!0,instagram:!0,tiktok:!0,reddit:!0},Ri||(Ri=xe("sendMessage",uS,e=>{var r=N.fixembed;e[1]?.content&&(e[1].content=fS(e[1].content,r),e[1].nonce=e[1].nonce||Math.random().toString(36).slice(2))})),A.log("FixEmbed: Patched outgoing messages")},stop(){A.log("FixEmbed: Stopping plugin"),Ri&&(Ri(),Ri=null),A.log("FixEmbed: Unpatched outgoing messages")}})});var ig={};k(ig,{default:()=>_S});function Cl(e){if(!e)return!1;var r=e.split("?")[0].toLowerCase();return mS.some(t=>r.endsWith(t))}function pS(e){if(!e)return e;var r=e.replace("cdn.discordapp.com","media.discordapp.net");return r.includes("media.discordapp.net")||r.includes("images-ext")?r+(r.includes("?")?"&":"?")+"format=jpeg":e}function hS(){var e=globalThis.__bunny?.metro?.modules??globalThis.modules;if(!e)return null;for(var r in e)try{var t=e[r]?.publicModule?.exports;if(!t)continue;var o=t.default;if(o?.$$typeof?.toString().includes("memo")&&o.type&&(o.type.displayName==="GIFFavButton"||o.type.name==="GIFFavButton"))return o;if(typeof t=="function"&&(t.displayName==="GIFFavButton"||t.name==="GIFFavButton"))return t}catch{}return null}function gS(e){return e.isGIFV?e:{...e,isGIFV:!0,embedURI:e.embedURI||e.sourceURI||e.uri,videoURI:e.videoURI||e.uri,embedProviderName:e.embedProviderName||""}}function ag(){return No=hS(),No?(Ii=No.type,No.type=function(r){var t={...r};return t.source&&!t.source.isGIFV&&(t.source=gS(t.source)),Ii(t)},No.type.displayName="GIFFavButton",!0):!1}function vS(){var e=L("addFavoriteGIF");e&&(Tl=_t("addFavoriteGIF",e,r=>{var t=r[0];if(!(!t||typeof t!="object")){var o=t.url||"",n=t.src||"";Cl(o)||Cl(n)?t.format=2:t.format===2&&(t.format=1)}}))}function yS(){var e=L("useFavoriteGIFsMobile");if(e){Al=e,Pi=e.useFavoriteGIFsMobile;var r=null;e.useFavoriteGIFsMobile=function(...t){var o=Pi.apply(this,t);if(o?.favorites&&Array.isArray(o.favorites)&&o.favorites!==r){r=o.favorites;for(var n of o.favorites)!n||ng.has(n)||(ng.add(n),(Cl(n.url)||Cl(n.src))&&(n.src=pS(n.src||n.url)))}return o}}}var Ii,No,fa,Tl,Pi,Al,mS,ng,_S,sg=_(()=>{"use strict";l();c();u();eo();Fe();He();vr();Ii=null,No=null,fa=null,Tl=null,Pi=null,Al=null,mS=[".mp4",".webm",".mov",".avi",".mkv",".flv",".wmv",".m4v",".gifv"],ng=new WeakSet;_S=Lr({manifest:{id:"bunny.favouriteanything",version:"1.0.0",type:"plugin",spec:3,main:"",display:{name:"FavouriteAnything",description:"Adds the favourite button to ALL media, not just GIFs",authors:[{name:"TheUnrealZaka"}]}},start(){if(ag())A.log("[FavouriteAnything] Patched GIFFavButton.");else{var e=0,r=()=>{ag()?(A.log("[FavouriteAnything] Patched GIFFavButton (after retry)."),fa=null):e++<50?fa=setTimeout(r,300):A.error("[FavouriteAnything] GIFFavButton not found after retries.")};fa=setTimeout(r,300)}vS(),yS()},stop(){fa&&(clearTimeout(fa),fa=null),No&&Ii&&(No.type=Ii,Ii=null,No=null),Tl&&(Tl(),Tl=null),Al&&Pi&&(Al.useFavoriteGIFsMobile=Pi,Pi=null,Al=null)}})});var lg={};k(lg,{default:()=>SS});function bS(){return _t("dispatch",xr,e=>{try{Ff||(Ff=qo("MessageStore"));var r=e[0];if(!r||r?.type!=="MESSAGE_DELETE"||!r?.id||!r?.channelId)return;if(Di.includes(r.id)){Di.splice(Di.indexOf(r.id),1);return}Di.push(r.id),e[0]={type:"MESSAGE_EDIT_FAILED_AUTOMOD",messageData:{type:1,message:{channelId:r.channelId,messageId:r.id}},errorResponseBody:{code:2e5,message:"[deleted]"}}}catch(t){A.error("NoDelete: dispatcher patch failed",t)}})}var Of,Ff,Di,SS,cg=_(()=>{"use strict";l();c();u();eo();Fe();He();vr();Q();Of=[],Ff=null,Di=[];SS=Lr({manifest:{id:"bunny.nodelete",version:"1.0.0",type:"plugin",spec:3,main:"",display:{name:"NoDelete",description:"Prevents messages from being deleted from your view",authors:[{name:"meqativ"}]}},start(){Of=[bS()].filter(Boolean),A.log("NoDelete: Enabled")},stop(){Of.forEach(e=>e?.()),Of=[],Di=[],Ff=null,A.log("NoDelete: Disabled")}})});var dg={};k(dg,{default:()=>RS});function AS(){return Math.random(){if(Mf)return e(Oi);if(Rl)return e(-1);Rl=!0,gn.prepare(wS,"music",Il,(r,t)=>{if(Rl=!1,r)return A.error("[MaxVerstappen] Failed to prepare:",r),e(-1);Mf=!0,Oi=t?.duration||3e4,e(Oi)})})}function fg(){return x(function*(){if(gn&&!da){var e=yield CS();if(e!==-1){da=!0;try{yield gn.play(Il),Fi=setTimeout(()=>{gn.stop(Il),da=!1,Fi=null},Oi)}catch(r){A.error("[MaxVerstappen] Playback error:",r),da=!1}}}})()}var xS,gn,wS,Il,ES,TS,da,Mf,Rl,Oi,Fi,Li,Ni,RS,mg=_(()=>{"use strict";l();c();u();be();eo();Fe();vr();({ReactNative:xS}=globalThis),{DCDSoundManager:gn}=xS?.NativeModules||{},wS="https://github.com/OTKUSteyler/GoonCord/raw/refs/heads/main/src/core/plugins/maxverstappen/Max%20Verstappen.mp3",Il=6972,ES=.33,TS=/\bmax\s*verst[ae]pp?en\b/i,da=!1,Mf=!1,Rl=!1,Oi=3e4,Fi=null,Li=null,Ni=null;RS=Lr({manifest:{id:"bunny.maxverstappen",version:"1.0.0",type:"plugin",spec:3,main:"",display:{name:"Max Verstappen",description:"Plays audio when Max Verstappen is mentioned (33% chance)",authors:[{name:"GoonCord Team"}]}},start(){if(!gn){A.error("[MaxVerstappen] DCDSoundManager not found");return}var e=L("dispatch","subscribe");if(!e){A.error("[MaxVerstappen] FluxDispatcher not found");return}Li=({message:r})=>{try{if(!r?.content)return;ug(r.content)&&fg()}catch(t){A.error("[MaxVerstappen] MESSAGE_CREATE error:",t)}},Ni=({message:r})=>{try{if(!r?.content)return;ug(r.content)&&fg()}catch(t){A.error("[MaxVerstappen] MESSAGE_SEND error:",t)}},e.subscribe("MESSAGE_CREATE",Li),e.subscribe("MESSAGE_SEND",Ni),A.log("[MaxVerstappen] Enabled")},stop(){gn&&da&&(gn.stop(Il),da=!1),Fi&&(clearTimeout(Fi),Fi=null);var e=L("dispatch","subscribe");e&&(Li&&e.unsubscribe("MESSAGE_CREATE",Li),Ni&&e.unsubscribe("MESSAGE_SEND",Ni)),Li=null,Ni=null,Mf=!1,Rl=!1,Oi=3e4,A.log("[MaxVerstappen] Disabled")}})});function vn(e,r=!0){var t={loader:()=>{var o=e(),n=o&&(o.default??o);return n},preenabled:r,get default(){var o=t.loader();return Object.defineProperty(t,"default",{value:o,writable:!1,enumerable:!0}),o}};return t}function Lr(e){return e[Symbol.for("bunny.core.plugin")]=!0,e}var Bf,eo=_(()=>{"use strict";l();c();u();Bf=()=>({"bunny.quickinstall":vn(()=>(Vh(),Ne(Hh)),!0),"bunny.badges":vn(()=>(Yh(),Ne(Wh))),"bunny.notrack":vn(()=>(eg(),Ne(Qh))),"bunny.fixembed":vn(()=>(og(),Ne(tg))),"bunny.favouriteanything":vn(()=>(sg(),Ne(ig))),"bunny.nodelete":vn(()=>(cg(),Ne(lg))),"bunny.maxverstappen":vn(()=>(mg(),Ne(dg)))})});var pg,yn,Pl,Mi=_(()=>{"use strict";l();c();u();pg=(function(e){return e[e.BUILT_IN=0]="BUILT_IN",e[e.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",e[e.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",e[e.BOT=3]="BOT",e[e.PLACEHOLDER=4]="PLACEHOLDER",e})({}),yn=(function(e){return e[e.SUB_COMMAND=1]="SUB_COMMAND",e[e.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",e[e.STRING=3]="STRING",e[e.INTEGER=4]="INTEGER",e[e.BOOLEAN=5]="BOOLEAN",e[e.USER=6]="USER",e[e.CHANNEL=7]="CHANNEL",e[e.ROLE=8]="ROLE",e[e.MENTIONABLE=9]="MENTIONABLE",e[e.NUMBER=10]="NUMBER",e[e.ATTACHMENT=11]="ATTACHMENT",e})({}),Pl=(function(e){return e[e.CHAT=1]="CHAT",e[e.USER=2]="USER",e[e.MESSAGE=3]="MESSAGE",e})({})});var gg={};k(gg,{default:()=>LS});function hg(e){return"```js\n"+e.replaceAll("`","`"+DS)+"\n```"}var IS,PS,DS,LS,vg=_(()=>{"use strict";l();c();u();be();je();Mi();ke();Q();Le();IS=U("inspect"),PS=(()=>x(function*(){})()).constructor,DS="\u200B";LS=(()=>({name:"eval",description:E.COMMAND_EVAL_DESC,shouldHide:()=>N.enableEvalCommand===!0,options:[{name:"code",type:yn.STRING,description:E.COMMAND_EVAL_OPT_CODE,required:!0},{name:"async",type:yn.BOOLEAN,description:E.COMMAND_EVAL_OPT_ASYNC}],execute(e,r){return x(function*([t,o],n){try{var a=IS.inspect(o?.value?yield PS(t.value)():eval?.(t.value)),s=a.length>2e3?a.slice(0,2e3)+"...":a;et.sendBotMessage(n.channel.id,hg(s))}catch(f){et.sendBotMessage(n.channel.id,hg(f?.stack??f))}}).apply(this,arguments)}}))});var yg={};k(yg,{default:()=>NS});var NS,_g=_(()=>{"use strict";l();c();u();je();Mi();At();Q();NS=(()=>({name:"Goon",description:E.COMMAND_DEBUG_DESC,options:[{name:"ephemeral",type:yn.BOOLEAN,description:E.COMMAND_DEBUG_OPT_EPHEMERALLY}],execute([e],r){var t=ht();t.device.codename===void 0?t.device.codename="":t.device.codename="("+t.device.codename+")";var o=["**\u{1F4A6}GoonCord\u{1F4A6} Debug Info**",`> GoonCord: ${t.bunny.version} (${t.bunny.loader.name} ${t.bunny.loader.version})`,`> Discord: ${t.discord.version} (${t.discord.build})`,`> React: ${t.react.version} (RN ${t.react.nativeVersion})`,`> Hermes: ${t.hermes.version} (bcv${t.hermes.bytecodeVersion})`,`> System: ${t.os.name} ${t.os.version} ${t.os.sdk?`(SDK ${t.os.sdk})`:""}`.trimEnd(),`> Device: ${t.device.model} ${t.device.codename}`].join(` -`);if(e?.value)et.sendBotMessage(r.channel.id,o);else{var n=(BigInt(Date.now()-14200704e5)<<22n).toString();et.sendMessage(r.channel.id,{content:o},void 0,{nonce:n})}}}))});var bg={};k(bg,{default:()=>OS});var OS,Sg=_(()=>{"use strict";l();c();u();je();Mi();Q();Qt();ro();OS=(()=>({name:"plugins",description:E.COMMAND_PLUGINS_DESC,options:[{name:"ephemeral",displayName:"ephemeral",type:yn.BOOLEAN,description:E.COMMAND_DEBUG_OPT_EPHEMERALLY}],execute([e],r){var t=[...Pt.keys()],o=t.map(z=>ve.get(z)).filter(Boolean),n=o.filter(z=>!!se[z.id]?.enabled).map(z=>z.display?.name??z.name??z.id).sort((z,ir)=>z.localeCompare(ir)),a=o.filter(z=>!se[z.id]?.enabled).map(z=>z.display?.name??z.name??z.id).sort((z,ir)=>z.localeCompare(ir)),s=new Map;try{var f=X&&X.plugins||{},d=Object.values(f).filter(Boolean);for(var m of d){var p=m.manifest?.id??m.id??String(m.manifest?.name??Math.random()),T=m.manifest?.name??p,I=!!m.enabled,P=s.get(p);P?(P.sources.add("vendetta"),P.enabled=P.enabled||I):s.set(p,{id:p,name:T,sources:new Set(["vendetta"]),enabled:I})}}catch{}for(var[C,F]of ve)if(F){var te=F.parentRepository!=null;if(te&&!Pt.has(C)){var Ce=F.display?.name??F.name??C,me=se[C]!=null,ee=!!se[C]?.enabled,ar=s.get(C);ar?(ar.sources.add("bunny"),ar.enabled=ar.enabled||ee):me&&s.set(C,{id:C,name:Ce,sources:new Set(["bunny"]),enabled:ee})}}var Bo=[...ve.values()].filter(z=>!!z&&z.parentRepository&&!Pt.has(z.id)).map(z=>({id:z.id,name:z.display?.name??z.name??z.id,installed:se[z.id]!=null})).filter(z=>!z.installed).sort((z,ir)=>z.name.localeCompare(ir.name)).map(z=>z.name),at=Array.from(s.values()).sort((z,ir)=>z.name.localeCompare(ir.name)),mr=at.filter(z=>z.enabled).map(z=>z.name),Vr=at.filter(z=>!z.enabled).map(z=>z.name),Ue=[];Ue.push(`**Plugins (${o.length}):**`),n.length>0&&(Ue.push(`Enabled (${n.length}):`),Ue.push("> "+n.join(", "))),a.length>0&&(Ue.push(`Disabled (${a.length}):`),Ue.push("> "+a.join(", "))),o.length===0&&Ue.push("_No core plugins registered._"),Ue.push(`**External Plugins (${at.length}):**`),mr.length>0&&(Ue.push(`Installed & Enabled (${mr.length}):`),Ue.push("> "+mr.join(", "))),Vr.length>0&&(Ue.push(`Installed & Disabled (${Vr.length}):`),Ue.push("> "+Vr.join(", "))),at.length===0&&Ue.push("_No external plugins found._");var pr=Ue.join(` -`);if(e?.value)et.sendBotMessage(r.channel.id,pr);else{var $r=(BigInt(Date.now()-14200704e5)<<22n).toString();et.sendMessage(r.channel.id,{content:pr},void 0,{nonce:$r})}}}))});var xg={};k(xg,{default:()=>FS});var FS,wg=_(()=>{"use strict";l();c();u();je();Yr();FS=(()=>({name:"ReGoon",description:E.COMMAND_RELOAD_DESC,options:[],execute(){Tr.reload()}}))});var Dl={};k(Dl,{patchCommands:()=>kf,registerCommand:()=>ma});function kf(){var e=xe("getBuiltInCommands",an,([r],t)=>[...t,...Bi.filter(o=>(r instanceof Array?r.includes(o.type):r===o.type)&&o.__bunny?.shouldHide?.()!==!1)]);return[(vg(),Ne(gg)),(_g(),Ne(yg)),(Sg(),Ne(bg)),(wg(),Ne(xg))].forEach(r=>ma(r.default())),()=>{Bi=[],e()}}function ma(e){var r;try{r=an.getBuiltInCommands(Pl.CHAT,!0,!1)}catch{r=an.getBuiltInCommands(Object.values(Pl),!0,!1)}r.sort((n,a)=>parseInt(a.id)-parseInt(n.id));var t=r[r.length-1];if(e.id=(parseInt(t.id,10)-1).toString(),e.__bunny={shouldHide:e.shouldHide},e.applicationId??="-1",e.type??=Pl.CHAT,e.inputType=pg.BUILT_IN,e.displayName??=e.name,e.untranslatedName??=e.name,e.displayDescription??=e.description,e.untranslatedDescription??=e.description,e.options)for(var o of e.options)o.displayName??=o.name,o.displayDescription??=o.description;return ct("execute",e,(n,a)=>{Promise.resolve(a.apply(e,n)).then(s=>{s&&typeof s=="object"&&et.sendMessage(n[1].channel.id,s)}).catch(s=>{A.error("Failed to execute command",s)})}),Bi.push(e),()=>Bi=Bi.filter(({id:n})=>n!==e.id)}var Bi,ki=_(()=>{"use strict";l();c();u();Mi();He();vr();Q();Bi=[]});var Uf={};k(Uf,{dispatcher:()=>Tg,injectFluxInterceptor:()=>jf,intercept:()=>kS});function jf(){var e=r=>{for(var t of pa){var o=t(r);o!=null&&(o?typeof o=="object"&&(Object.assign(r,o),r[MS]=!0):r[Eg]=!0)}return Eg in r};return(Tg._interceptors??=[]).unshift(e),()=>{var r=_n.get(e);r!==void 0&&(pa.splice(r,1),_n.delete(e),pa.forEach((t,o)=>_n.set(t,o)))}}function kS(e){var r=BS++;return _n.set(e,r),pa.push(e),()=>{var t=_n.get(e);t!==void 0&&(pa.splice(t,1),_n.delete(e),pa.forEach((o,n)=>_n.set(o,n)))}}var Eg,MS,Tg,pa,_n,BS,Gf=_(()=>{"use strict";l();c();u();Q();Eg=Symbol.for("bunny.flux.blocked"),MS=Symbol.for("bunny.flux.modified"),Tg=xr,pa=[],_n=new Map,BS=0});var Hf={};k(Hf,{fs:()=>Aa});var Ag=_(()=>{"use strict";l();c();u();Ft()});var Vf={};k(Vf,{jsx:()=>Df});var Cg=_(()=>{"use strict";l();c();u();xl()});var $f={};k($f,{assets:()=>tl,commands:()=>Dl,debug:()=>sl,flux:()=>Uf,native:()=>Hf,patcher:()=>Ko,react:()=>Vf,settings:()=>qs,storage:()=>Bc});var zf=_(()=>{"use strict";l();c();u();Te();ki();At();Gf();Ag();He();Cg();ke();ut()});function ha(e,r){var t=(...n)=>{var a=r(...n);return e.push(a),a};for(var o in r)typeof r[o]=="function"&&(t[o]=ha(e,r[o]));return t}function Rg(e){var r=new Array,t={...globalThis.bunny,api:{...globalThis.bunny.api,patcher:{before:ha(r,Ko.before),after:ha(r,Ko.after),instead:ha(r,Ko.instead)},commands:{...globalThis.bunny.api.commands,registerCommand:ha(r,ma)},flux:{...globalThis.bunny.api.flux,intercept:ha(r,globalThis.bunny.api.flux.intercept)}},plugin:{createStorage:()=>bo(`plugins/storage/${e}.json`),manifest:ve.get(e),logger:A}};return{object:t,disposers:r}}var Ig=_(()=>{"use strict";l();c();u();zf();ki();ut();vr();ro()});var ya={};k(ya,{apiObjects:()=>Kf,corePluginInstances:()=>Pt,deleteRepository:()=>US,disablePlugin:()=>Ll,enablePlugin:()=>Jf,getBisectBatches:()=>HS,getPluginSettingsComponent:()=>qf,initPlugins:()=>$S,installPlugin:()=>GS,isCorePlugin:()=>Lg,isGreaterVersion:()=>Yf,isPluginEnabled:()=>ga,isPluginInstalled:()=>bn,pluginInstances:()=>nt,pluginRepositories:()=>Gr,pluginSettings:()=>se,refreshPlugin:()=>Xf,registerCorePlugins:()=>Pg,registerInstalledPlugins:()=>Ng,registeredPlugins:()=>ve,startPlugin:()=>va,stopPlugin:()=>Ol,uninstallPlugin:()=>Nl,updateAllRepository:()=>Zf,updateAndWritePlugin:()=>ji,updatePlugins:()=>VS,updateRepository:()=>Ui});function Pg(){try{var e=Bf();for(var r in e)try{var{default:t,preenabled:o}=e[r];ve.set(r,t.manifest),Pt.set(r,t);try{se[r]==null&&(se[r]={enabled:o??!0})}catch(n){console.error("Failed to set default pluginSettings for core plugin",r,n)}}catch(n){console.error("Failed to register core plugin",r,n)}}catch(n){console.error("registerCorePlugins: unexpected error",n)}}function nr(e,r,t){if(!e)throw new Error(`[${r}] Attempted to ${t}`)}function Yf(e,r){if($n.gt(e,r))return!0;var t=$n.coerce(e);return t==null?!1:$n.prerelease(e)?.includes("dev")&&$n.eq(t,r)}function Gi(e){return"parentRepository"in e}function Lg(e){return Pt.has(e)}function qf(e){var r=nt.get(e);return r&&r.SettingsComponent?r.SettingsComponent:null}function bn(e){return se[e]!=null}function ga(e){return!!se[e]?.enabled}function ji(e,r,t){return x(function*(){var o=[`builds/${r}/manifest.json`,`${r}/manifest.json`],n,a=null;for(var s of o){var f=new URL(s,e).toString();try{n=yield Wf(e,s);break}catch(C){a=C}}if(!n)throw a??new Error(`Failed to fetch manifest for ${r}`);if(n.parentRepository=e,t){n.jsPath=`plugins/scripts/${r}.js`;var d=[`builds/${r}/index.js`,`${r}/index.js`],m,p=null;for(var T of d){var I=new URL(T,e).toString();try{m=yield jS(e,T);break}catch(C){p=C}}if(!m)throw p??new Error(`Failed to fetch script for ${r}`);try{yield lt(n.jsPath,m)}catch(C){throw C}}try{yield Fc(`plugins/manifests/${r}.json`,n)}catch(C){throw C}if(ve.has(r)){var P=ve.get(r);return Object.assign(P,n)}return n})()}function Xf(e,r){return x(function*(){var t=ve.get(e);nr(t,e,"refresh a non-registered plugin"),nr(nt.get(e),e,"refresh a non-started plugin"),Ol(e),Gi(t)&&(t=yield ji(r??t.parentRepository,e,!0)),ve.delete(e),ve.set(e,t),yield va(e)})()}function Ui(e){return x(function*(){var r,t=Gr[e],o=!1;try{r=yield Wf(e,"repo.json")}catch(I){try{var n=yield Wf(e,"manifest.json"),a=n?.id??n?.name??(()=>{try{var P=new URL(e),C=P.pathname.replace(/^\/|\/$/g,"");return C||P.hostname}catch{return"local-plugin"}})();r={[a]:n,$meta:{source:e}},Gr[e]=r,t=Gr[e],o=!0}catch{throw I}}if(t)for(var f in t)r[f]||delete t[f];else{for(var s in r)if(Pt.has(s))throw new Error(`Plugins can't have the same ID as any of Bunny core plugin '${s}'`);o=!0,Gr[e]=r}var d=Object.keys(r).filter(I=>!I.startsWith("$"));yield Promise.all(d.map(I=>x(function*(){if(!t||!t[I]||r[I].alwaysFetch||Yf(r[I].version,t[I].version))o=!0,Gr[e][I]=r[I],yield ji(e,I,!!(t&&se[I]));else{var P=yield ka(`plugins/manifests/${I}.json`);P||(yield ji(e,I,!!(t&&se[I])))}})()));for(var m of d){var p=Os(`plugins/manifests/${m}.json`);if(p!==void 0){var T=ve.get(m);T&&!Yf(p.version,T.version)||ve.set(m,p)}}return o})()}function US(e){return x(function*(){nr(e!==nn,e,"delete the official repository"),nr(Gr[e],e,"delete a non-registered repository");var r=[];for(var[t,o]of ve)!Gi(o)||o.parentRepository!==e||(bn(t)&&r.push(Nl(t)),r.push(kn(`plugins/manifests/${t}.json`)),ve.delete(t));delete Gr[e],yield Promise.all(r),Zf()})()}function Jf(e,r){return x(function*(){nr(bn(e),e,"enable a non-installed plugin"),r&&(yield va(e)),se[e].enabled=!0})()}function Ll(e){nr(bn(e),e,"disable a non-installed plugin"),nt.has(e)&&Ol(e),se[e].enabled=!1}function GS(e,r){return x(function*(){var t=ve.get(e);nr(t,e,"install an non-registered plugin"),nr(!bn(e),e,"install an already installed plugin"),nr(Gi(t),e,"install a core plugin"),yield ji(t.parentRepository,e,!0),se[e]={enabled:!0},r&&va(e)})()}function Nl(e){return x(function*(){var r=ve.get(e);nr(r,e,"uninstall an unregistered plugin"),nr(bn(e),e,"uninstall a non-installed plugin"),nr(Gi(r),e,"uninstall a core plugin"),nt.has(e)&&Ol(e),delete se[e],yield kn(`plugins/storage/${e}.json`),yield zo(`plugins/scripts/${e}.js`)})()}function va(e){return x(function*(r,{throwIfDisabled:t=!1,disableWhenThrown:o=!0}={}){var n=ve.get(r);nr(n,r,"start a non-registered plugin"),nr(bn(r),r,"start a non-installed plugin"),nr(!t||se[r]?.enabled,r,"start a disabled plugin"),nr(!nt.has(r),r,"start an already started plugin"),yield ka(`plugins/storage/${r}.json`);var a;if(Gi(n)){try{var s=yield Wo(n.jsPath);try{globalThis.__SHIGGY_CURRENT_PLUGIN=r}catch{}var f=globalEvalWithSourceUrl(`(bunny,definePlugin)=>{${s};return plugin?.default ?? plugin;}`,`bunny-plugin/${r}-${n.version}`)}catch(I){var d=new Error("An error occured while parsing plugin's code, possibly a syntax error?",{cause:I});throw d.pluginId=r,d}finally{try{globalThis.__SHIGGY_CURRENT_PLUGIN=null}catch{}}try{try{globalThis.__SHIGGY_CURRENT_PLUGIN=r}catch{}var m=Rg(r);try{a=f(m.object,I=>Object.assign(I,{manifest:n}))}catch(I){var p=new Error("An error occured while instantiating plugin's code");throw p.cause=I,p.pluginId=r,p}if(!a){var T=new Error(`Plugin '${r}' does not export a valid plugin instance`);throw T.pluginId=r,T}Kf.set(r,m),nt.set(r,a)}catch(I){throw I.pluginId||(I.pluginId=r),I}finally{try{globalThis.__SHIGGY_CURRENT_PLUGIN=null}catch{}}}else a=Pt.get(r),nr(a,r,"start a non-existent core plugin"),nt.set(r,a);try{a.start?.(),se[r].enabled=!0}catch(I){throw o&&Ll(r),new Error("An error occured while starting the plugin",{cause:I})}}).apply(this,arguments)}function Ol(e){var r=nt.get(e);nr(r,e,"stop a non-started plugin"),r.stop?.();var t=Kf.get(e);t?.disposers.forEach(o=>o()),nt.delete(e)}function HS(e=50){var r=[];for(var[t,o]of ve)try{var n=o.parentRepository!=null,a=!!se[t]?.enabled;if(!n||!a)continue;r.push(t)}catch{}var s=r.slice(0,e);if(s.length<=1)return s.length===1?[[s[0]]]:[];for(var f=[],d=s.slice();d.length>1;){var m=Math.ceil(d.length/2),p=d.slice(0,m);if(f.push(p),d=d.slice(m),d.length===1){f.push([d[0]]);break}}return f}function Zf(){return x(function*(){try{yield Ui(nn)}catch(o){console.error("Failed to update official plugins repository",o)}var e=!!(Zn.fetchPluginsOnStart??!0),r=Zn.repoAutoFetchOverrides??{},t=Object.keys(Gr);yield h(t.map(o=>x(function*(){if(o!==nn){var n=r[o];if(!(!e&&n!==!0))try{yield Ui(o)}catch(a){console.error(`Failed to update repository ${o}`,a)}}})()))})()}function VS(){return x(function*(){yield on(Gr,se);var e=Bf();for(var r in e){var{default:t,preenabled:o}=e[r];se[r]??={enabled:o??!0},ve.set(r,t.manifest),Pt.set(r,t)}try{yield Ui(nn)}catch(d){console.error("Failed to update official plugins repository",d)}var n=!!(Zn.fetchPluginsOnStart??!0),a=Zn.repoAutoFetchOverrides??{};if(n)yield Zf();else{var s=Object.keys(Gr).filter(d=>d!==nn&&a[d]===!0);yield h(s.map(d=>x(function*(){try{yield Ui(d)}catch(m){console.error(`Failed to update repository ${d}`,m)}})()))}var f=[...ve.keys()].filter(d=>ga(d)&&!nt.has(d));yield h(f.map(d=>x(function*(){try{yield va(d).catch(m=>{console.error(`Failed to start plugin ${d}:`,m)})}catch(m){console.error(`Unexpected error while starting plugin ${d}:`,m)}})()))})()}function Ng(){return x(function*(){yield on(Gr,se);var e=Object.keys(se??{});if(e.length!==0)var r=yield h(e.map(t=>x(function*(){if(!(ve.has(t)||Lg(t))){var o=yield ka(`plugins/manifests/${t}.json`);if(o){var n=Os(`plugins/manifests/${t}.json`);n&&ve.set(t,n)}}})()))})()}function $S(){return x(function*(){try{Pg()}catch{}yield on(Gr,se),yield Ng();var e=[...ve.keys()].filter(r=>ga(r));e.length!==0&&(yield h(e.map(r=>x(function*(){try{if(!ga(r)||nt.has(r))return;yield va(r).catch(t=>{console.error(`Failed to start plugin ${r}:`,t)})}catch(t){console.error(`Unexpected error while starting plugin ${r}:`,t)}})())))})()}var Pt,ve,nt,Kf,Gr,se,Dg,jS,Wf,ro=_(()=>{"use strict";l();c();u();be();eo();Ft();ut();Jr();jn();Q();ke();Ig();Pt=new Map,ve=new Map,nt=new Map,Kf=new Map;Gr=bo("plugins/repositories.json"),se=bo("plugins/settings.json"),Dg=(e,r)=>{try{var t=new URL(r,e);return t.searchParams.set("_",String(Date.now())),ze(t,{cache:"no-store"})}catch{return ze(new URL(r,e),{cache:"no-store"})}},jS=(e,r)=>Dg(e,r).then(t=>t.text()),Wf=(e,r)=>Dg(e,r).then(t=>t.json())});var Qf,Og=_(()=>{"use strict";l();c();u();Le();Qf=kt("UserStore")});function ed({plugin:e}){var r=bu.useStateFromStoresArray([Qf],()=>(e.authors?.forEach(n=>n.id&&WS(n.id)),e.authors?.map(n=>Qf.getUser(n.id)))),{authors:t}=e,o=i(D,{variant:"text-md/medium",style:{flexWrap:"wrap"},children:(t??[]).map((n,a)=>b(Fg.default.Fragment,{children:[i(D,{variant:"text-md/medium",onPress:n.id?()=>zS({userId:n.id}):void 0,children:n.name}),a<(t?.length??0)-1?", ":""]},n.id??n.name))});return b(_a.View,{style:{gap:4},children:[i(_a.View,{children:i(D,{variant:"heading-xl/semibold",children:e.name})}),i(_a.View,{style:{flexDirection:"row",flexShrink:1},children:t?.length&&b(_a.View,{style:{flexDirection:"row",gap:8,alignItems:"center",paddingVertical:4,paddingHorizontal:8,backgroundColor:"#00000016",borderRadius:32},children:[r.length&&i(su,{size:"xxsmall",names:e.authors?.map(n=>n.name),totalCount:e.authors?.length,children:r.map(n=>i(lu,{size:"xxsmall",user:n}))}),i(_a.View,{style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap"},children:o})]})})]})}var Fg,_a,zS,WS,Mg=_(()=>{"use strict";l();c();u();ae();Fg=H(fr());Oe();Fe();Q();ce();Og();_a=H(re()),zS=br("showUserProfileActionSheet"),{getUser:WS}=K(()=>L("getUser","fetchProfile"))});var rd={};k(rd,{default:()=>kg});function Hi(e){var{onPress:r}=e;return e.onPress&&=()=>{Xt("PluginInfoActionSheet"),r?.()},i(we,{...e})}function kg({plugin:e,navigation:r}){e.usePluginState();var[t,o]=(0,Bg.useState)(!1),n=e.id.includes("/"),a=e.id.startsWith("bunny.")||e.id.startsWith("vendetta."),s=()=>{var p=e.id;if(n)p=e.id;else try{var T=e,I=T._manifest?.parentRepository||T.manifest?.parentRepository;p=I?`${I}/builds/${e.id}`:e.id}catch{p=e.id}Be.setString(p),typeof q?.showCopyToClipboard=="function"?q.showCopyToClipboard():q("Copied to clipboard")},f=()=>x(function*(){o(!0);try{if(n){var p=X.plugins[e.id];p.enabled&&X.stopPlugin(e.id,!1),yield X.fetchPlugin(e.id),p.enabled&&(yield X.startPlugin(e.id)),q("Plugin refreshed successfully")}else Xf(e.id),q("Plugin refreshed successfully")}catch(T){console.error("Failed to refresh plugin:",T),q("Failed to refresh plugin")}finally{o(!1)}})(),d=()=>{vt({title:"Clear Data",content:"Are you sure you want to clear all data for this plugin? This action cannot be undone.",confirmText:"Clear",confirmColor:"red",cancelText:"Cancel",onConfirm:()=>x(function*(){Xt("PluginInfoActionSheet");try{if(n){var p=X.plugins[e.id];p.enabled&&X.stopPlugin(e.id,!1),yield _s(e.id),p.enabled&&(yield X.startPlugin(e.id))}else yield kn(`plugins/storage/${e.id}.json`);q("Plugin data cleared successfully")}catch(T){console.error("Failed to clear plugin data:",T),q("Failed to clear plugin data")}})()})},m=()=>{if(a){q("Core plugins cannot be uninstalled");return}vt({title:"Uninstall Plugin",content:"Are you sure you want to uninstall this plugin? This action cannot be undone.",confirmText:"Uninstall",confirmColor:"red",cancelText:"Cancel",onConfirm:()=>x(function*(){Xt("PluginInfoActionSheet");try{n?yield X.removePlugin(e.id):yield Nl(e.id),q("Plugin uninstalled successfully")}catch(p){console.error("Failed to uninstall plugin:",p),q(`Failed to uninstall plugin: ${p instanceof Error?p.message:String(p)}`)}})()})};return i(er,{children:b(Vi.ScrollView,{contentContainerStyle:{gap:12,marginBottom:12},children:[i(Vi.View,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:24,justifyContent:"space-between",width:"100%"},children:i(ed,{plugin:e})}),b(Vi.View,{style:{flexDirection:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap",gap:12,paddingHorizontal:4},children:[i(Hi,{label:"Configure",variant:"secondary",disabled:!e.getPluginSettingsComponent(),icon:S("SettingsIcon"),onPress:()=>{r.push("SHIGGYCORD_CUSTOM_PAGE",{title:e.name,render:e.getPluginSettingsComponent()})}}),i(Hi,{label:"Refetch",variant:"secondary",icon:S("RetryIcon"),onPress:f,disabled:t}),i(Hi,{label:"Copy URL",variant:"secondary",icon:S("LinkIcon"),onPress:s}),i(Hi,{label:"Clear Data",variant:"secondary",icon:S("FileIcon"),onPress:d}),!a&&i(Hi,{label:"Uninstall",variant:"secondary",icon:S("TrashIcon"),onPress:m})]}),b(de,{children:[i(D,{variant:"text-md/semibold",style:{marginBottom:4,color:"text-strong"},children:"Description"}),i(D,{variant:"text-md/medium",children:e.description})]})]})})}var Bg,Vi,td=_(()=>{"use strict";l();c();u();be();ae();ro();Te();ut();gt();ce();Q();Bg=H(fr()),Vi=H(re());pt();ua();Qt();$e();Mg()});function od(e){return{id:e.id,name:e.display.name,description:e.display.description,authors:e.display.authors,getBadges(){return[]},isEnabled:()=>ga(e.id),isInstalled:()=>e.id in se,usePluginState(){Ht([se])},toggle(r){try{r?Jf(e.id,!0):Ll(e.id)}catch(t){console.error(t)}},resolveSheetComponent(){return Promise.resolve().then(()=>(td(),rd))},getPluginSettingsComponent(){return qf(e.id)}}}var jg=_(()=>{"use strict";l();c();u();ro();ut()});function nd(e){return{id:e.id,name:e.manifest.name,description:e.manifest.description,authors:e.manifest.authors,icon:e.manifest.vendetta?.icon,getBadges(){return[]},isEnabled:()=>e.enabled,isInstalled:()=>!!(e&&X.plugins[e.id]),usePluginState(){var r=jt({}).proxy;ie(X.plugins[e.id]??r)},toggle(r){r?X.startPlugin(e.id):X.stopPlugin(e.id)},resolveSheetComponent(){return Promise.resolve().then(()=>(td(),rd))},getPluginSettingsComponent(){return X.getSettings(e.id)}}}var Ug=_(()=>{"use strict";l();c();u();Qt();$e()});var $g={};k($g,{default:()=>Vg});function $i(e){return e.endsWith("/")?e:e+"/"}function QS({addon:e,installing:r,setInstalling:t,setRefreshTick:o}){var n=$i(e.installUrl),a=X.plugins[n],s=!!a,f=r.has(n),d=n.toLowerCase().includes("quickinstall"),[,m]=YS(me=>me+1,0),[p,T]=W.useState(0),[I,P]=W.useState(1),C=()=>{te()},F=()=>x(function*(){if(!f){if(e.status==="broken"||e.status==="warning"){var me=e.status==="broken";Gg("bunny-plugin-status-warning",i(Hg,{title:me?"Plugin is Broken":"Plugin Warning",content:me?"This plugin is marked as broken and may not work properly or could cause issues. Do you still want to install it?":"This plugin has warnings and might have issues. Do you want to continue with the installation?",extraContent:e.warningMessage?i(de,{children:i(D,{variant:"text-md/normal",children:e.warningMessage})}):null,actions:b(KS,{children:[i(Fl,{text:"Install Anyway",variant:me?"destructive":"primary",onPress:C}),i(Fl,{text:"Cancel",variant:"secondary"})]})}));return}C()}})(),te=()=>x(function*(){t(ee=>new Set([...ee,n]));var me=setInterval(()=>{T(ee=>(ee+15)%360),P(ee=>.8+.2*Math.sin(Date.now()/200)),m()},100);try{yield X.installPlugin(e.installUrl),o(ee=>ee+1),or("PluginInstalledSheet",()=>b(er,{children:[i(Qr,{title:"Plugin Installed"}),b(dr.View,{style:{padding:16,alignItems:"center",gap:12},children:[i(dr.View,{style:{backgroundColor:"rgba(67, 181, 129, 0.1)",borderRadius:50,padding:16},children:i(dr.Image,{source:S("CheckmarkCircle"),style:{width:32,height:32,tintColor:"#43b581"}})}),b(D,{variant:"heading-md/bold",children:[e.name," installed successfully!"]}),i(D,{variant:"text-md/medium",color:"text-muted",style:{textAlign:"center"},children:"The plugin has been added to your plugins list."}),i(Z,{size:"lg",text:"Close",variant:"primary",style:{width:"100%"},onPress:()=>qS()})]})]}))}catch(ee){Gg("bunny-plugin-install-failed",i(Hg,{title:"Installation Failed",content:"Failed to install plugin",extraContent:b(oe,{spacing:16,style:{width:"100%"},children:[i(dr.View,{style:{alignItems:"center",marginTop:8},children:i(dr.View,{style:{backgroundColor:"rgba(240, 71, 71, 0.1)",borderRadius:50,padding:16,marginBottom:12},children:i(dr.Image,{source:S("ErrorCircle"),style:{width:32,height:32,tintColor:"#f04747"}})})}),i(de,{style:{backgroundColor:"rgba(0,0,0,0.05)",padding:12,borderRadius:8},children:i(D,{variant:"text-md/semibold",color:"text-danger",children:ee instanceof Error?ee.message:String(ee)})})]}),actions:b(dr.View,{style:{flexDirection:"row",justifyContent:"space-between",gap:8},children:[i(Fl,{text:"Cancel",variant:"secondary",style:{flex:1}}),i(Fl,{text:"Try Again",icon:S("RetryIcon"),variant:"primary",style:{flex:1},onPress:()=>{JS("bunny-plugin-install-failed"),setTimeout(te,500)}})]})}))}finally{clearInterval(me),T(0),P(1),t(ee=>{var ar=new Set(ee);return ar.delete(n),ar})}})(),Ce=()=>{X.removePlugin(n),o(me=>me+1)};return s?i(Z,{size:"sm",text:"Uninstall",variant:"destructive",icon:S("TrashIcon"),onPress:Ce,disabled:d,style:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:2,elevation:1}}):i(dr.View,{style:{opacity:I},children:i(Z,{size:"sm",text:f?"Installing...":"Install",variant:"primary",disabled:f,loading:f,style:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:2,elevation:1},icon:f?i(dr.View,{style:{transform:[{rotate:`${p}deg`}]},children:i(dr.Image,{source:S("RetryIcon"),style:{width:16,height:16}})}):S("DownloadIcon"),onPress:F})})}function ex({addon:e,installing:r,setInstalling:t,setRefreshTick:o}){return b(dr.View,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[i(we,{size:"sm",variant:"secondary",icon:S("MoreHorizontalIcon"),onPress:()=>{XS({key:"AddonShareSheet",header:{title:"Share Plugin"},options:[{label:"Copy Install URL",onPress:()=>{Be.setString(e.installUrl)}},{label:"Copy Source URL",onPress:()=>{e.sourceUrl&&Be.setString(e.sourceUrl)}}]})}}),i(QS,{addon:e,installing:r,setInstalling:t,setRefreshTick:o})]})}function rx({addon:e,installing:r,setInstalling:t,setRefreshTick:o}){var{name:n,description:a,authors:s,status:f,warningMessage:d}=e,m="text-normal";return f==="working"&&(m="#4ADE80"),f==="broken"&&(m="#EF4444"),f==="warning"&&(m="#F59E0B"),i(de,{children:b(oe,{spacing:16,children:[b(dr.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[b(dr.View,{style:{flexShrink:1},children:[i(D,{numberOfLines:1,variant:"heading-lg/semibold",children:n}),b(D,{variant:"text-md/semibold",color:"text-muted",children:["by ",s?.join(", ")||"Unknown"]}),b(D,{variant:"text-md/semibold",style:{color:m},children:["Status: ",f]})]}),i(dr.View,{children:i(ex,{addon:e,installing:r,setInstalling:t,setRefreshTick:o})})]}),i(D,{variant:"text-md/medium",children:a}),d&&b(D,{variant:"text-sm/medium",color:"text-muted",children:["Warning: ",d]})]})})}function tx(e){var r=e.useItems();return i(Zt,{CardComponent:Cf,title:E.PLUGINS,searchKeywords:["name","description",t=>t.authors?.map(o=>typeof o=="string"?o:o.name).join()||""],sortOptions:{"Enabled First":(t,o)=>Number(o.isEnabled())-Number(t.isEnabled()),"Disabled First":(t,o)=>Number(t.isEnabled())-Number(o.isEnabled()),"Date (Newest)":(t,o)=>{var n=Object.keys(X.plugins||{}),a=Object.keys(se||{}),s=f=>{var d=n.indexOf(f),m=a.indexOf(f);return Math.max(d,m)};return s(o.id)-s(t.id)},"Date (Oldest)":(t,o)=>{var n=Object.keys(X.plugins||{}),a=Object.keys(se||{}),s=f=>{var d=n.indexOf(f),m=a.indexOf(f);return Math.max(d,m)};return s(t.id)-s(o.id)},"Name (A-Z)":(t,o)=>t.name.localeCompare(o.name),"Name (Z-A)":(t,o)=>o.name.localeCompare(t.name)},safeModeHint:{message:E.SAFE_MODE_NOTICE_PLUGINS},items:r,...e})}function ox(e){var r=new Map;(e.plugins||[]).forEach((s,f)=>r.set($i(s.installUrl),f));var t=s=>{for(var[f,d]of ve)if(d){var m=d.display?.name??f;if(m===s.name)return f}return null},o=s=>{var f=$i(s.installUrl),d=X.plugins[f];if(d)return!!(d.enabled??!0);var m=t(s);return m?!!se[m]?.enabled:!1},n=s=>{var f=$i(s.installUrl);if(X.plugins[f])return!0;var d=t(s);return d?se[d]!=null:!1},a=s=>r.get($i(s.installUrl))??0;return i(Zt,{CardComponent:({item:s})=>i(rx,{addon:s,installing:e.installing,setInstalling:e.setInstalling,setRefreshTick:e.setRefreshTick}),title:E.PLUGINS,searchKeywords:["name","description",s=>(s.authors||[]).join(", ")],sortOptions:{"Date (Newest)":(s,f)=>a(f)-a(s),"Date (Oldest)":(s,f)=>a(s)-a(f),"Broken First":(s,f)=>{var d=m=>m.status==="broken"?3:m.status==="warning"?2:m.status==="working"?1:0;return d(f)-d(s)},"Warning First":(s,f)=>{var d=m=>m.status==="warning"?3:m.status==="broken"?2:m.status==="working"?1:0;return d(f)-d(s)},"Working First":(s,f)=>{var d=m=>m.status==="working"?3:m.status==="warning"?2:m.status==="broken"?1:0;return d(f)-d(s)},"Name (A-Z)":(s,f)=>s.name.localeCompare(f.name),"Name (Z-A)":(s,f)=>f.name.localeCompare(s.name)},items:e.plugins})}function Vg(){ie(N);var e=Ee.useNavigation(),[r,t]=W.useState("installed"),[o,n]=W.useState([]),[a,s]=W.useState(!1),[f,d]=W.useState(null),[m,p]=W.useState(new Set),[T,I]=W.useState(0);W.useEffect(()=>{e.setOptions({headerRight:()=>i(Z,{size:"sm",variant:"secondary",text:r==="installed"?"Browse":"Installed",icon:S(r==="installed"?"LinkIcon":"DownloadIcon"),onPress:()=>t(r==="installed"?"browse":"installed")})})},[e,r]);var P=W.useCallback(()=>x(function*(){s(!0),d(null);try{var C=yield ze(ZS);if(!C.ok)throw new Error(`HTTP ${C.status}: ${C.statusText}`);var F=yield C.json(),te=[];Array.isArray(F)?te=F:F.OFFICIAL_PLUGINS&&(te=F.OFFICIAL_PLUGINS),n(te)}catch(Ce){d(Ce instanceof Error?Ce.message:String(Ce)),n([])}finally{s(!1)}})(),[]);return W.useEffect(()=>{r==="browse"&&P()},[r,P,T]),r==="installed"?i(tx,{useItems:()=>{ie(X.plugins),Ht([se]);var C=Object.keys(X.plugins||{}),F=C.slice().reverse().map(ee=>nd(X.plugins[ee])),te=Object.keys(se||{}).filter(ee=>ve.has(ee)).slice().reverse(),Ce=te.map(ee=>ve.get(ee)).map(od),me=[...F,...Ce];return me},ListHeaderComponent:()=>null,installAction:{label:"Install a plugin",fetchFn:C=>x(function*(){return yield X.installPlugin(C)})()}}):f?i(dr.View,{style:{flex:1,paddingHorizontal:8,justifyContent:"center",alignItems:"center"},children:b(de,{style:{gap:8},children:[i(D,{style:{textAlign:"center"},variant:"heading-lg/bold",children:"An error occurred while fetching the repository"}),i(D,{style:{textAlign:"center"},variant:"text-sm/medium",color:"text-muted",children:f}),i(Z,{size:"lg",text:"Refetch",onPress:P,icon:S("RetryIcon")})]})}):i(ox,{plugins:o,installing:m,setInstalling:p,setRefreshTick:I})}var dr,YS,Gg,Hg,KS,Fl,qS,XS,JS,ZS,zg=_(()=>{"use strict";l();c();u();be();ae();Q();dr=H(re());ce();je();_l();Ah();Qt();$e();ro();Te();ke();ut();Oe();Fe();Bs();Q();ce();gt();Oe();jg();Ug();({useReducer:YS}=W),{openAlert:Gg}=K(()=>L("openAlert","dismissAlert")),{AlertModal:Hg,AlertActions:KS,AlertActionButton:Fl}=K(()=>L("AlertModal","AlertActions")),{hideActionSheet:qS}=K(()=>L("openLazy","hideActionSheet")),{showSimpleActionSheet:XS}=K(()=>L("showSimpleActionSheet")),JS=Ve(()=>L("close","openLazy").close),ZS="https://raw.githubusercontent.com/Purple-EyeZ/Plugins-List/refs/heads/main/src/plugins-data.json"});function ad(e){var r=ax();return i(de,{children:b(oe,{spacing:16,children:[b(Sn.View,{style:{flexDirection:"row",alignItems:"center"},children:[b(Sn.View,{style:r.headerLeading,children:[i(D,{numberOfLines:1,ellipsizeMode:"tail",style:r.headerLabel,children:e.headerLabel}),e.headerSublabel&&i(D,{numberOfLines:1,ellipsizeMode:"tail",style:r.headerSubtitle,children:e.headerSublabel})]}),b(Sn.View,{style:[r.headerTrailing,{marginLeft:"auto"}],children:[b(Sn.View,{style:r.actions,children:[e.overflowActions&&i(we,{onPress:()=>nx({key:"CardOverflow",header:{title:e.overflowTitle,icon:e.headerIcon&&i(ei.Icon,{style:{marginRight:8},source:S(e.headerIcon)})},options:e.overflowActions?.map(t=>({...t,icon:S(t.icon)}))}),size:"sm",variant:"secondary",icon:S("CircleInformationIcon-primary")}),e.actions?.map(({icon:t,onPress:o,disabled:n})=>i(we,{onPress:o,disabled:n,size:"sm",variant:"secondary",icon:S(t)}))]}),e.toggleType&&(e.toggleType==="switch"?i(nu,{value:e.toggleValue(),onValueChange:e.onToggleChange}):i(Sn.TouchableOpacity,{onPress:()=>{e.onToggleChange?.(!e.toggleValue())},children:i(au,{selected:e.toggleValue()})}))]})]}),e.descriptionLabel&&i(D,{variant:"text-md/medium",children:e.descriptionLabel})]})})}var Sn,jj,nx,ax,Wg=_(()=>{"use strict";l();c();u();ae();Te();Oe();ce();Le();Ro();Rt();Sn=H(re()),{hideActionSheet:jj}=K(()=>L("openLazy","hideActionSheet")),{showSimpleActionSheet:nx}=K(()=>L("showSimpleActionSheet")),ax=jr({card:{backgroundColor:tr?.CARD_SECONDARY_BG,borderRadius:12,overflow:"hidden"},header:{padding:0},headerLeading:{flex:1,flexDirection:"column",justifyContent:"center",scale:1.2},headerTrailing:{display:"flex",flexDirection:"row",gap:15,alignItems:"center"},headerLabel:{...Ct["heading-lg/semibold"]},headerLabelCompact:{...Ct["text-md/semibold"]},headerSubtitle:{...Ct["text-sm/semibold"],color:tr.TEXT_MUTED},descriptionLabel:{...Ct["text-md/semibold"],color:"text-strong"},actions:{flexDirection:"row-reverse",alignItems:"center",gap:5},iconStyle:{tintColor:tr.LOGO_PRIMARY,opacity:.2,height:64,width:64,left:void 0,right:"30%",top:"-10%"}})});var Kg={};k(Kg,{default:()=>Yg});function id(e){var{onPress:r}=e;return e.onPress&&=()=>{Xt("ThemeInfoActionSheet"),r?.()},i(we,{...e,label:e.label})}function ix({theme:e}){var{authors:r}=e.data;return b(Dt.View,{style:{gap:4},children:[i(Dt.View,{children:i(D,{variant:"heading-xl/semibold",children:e.data.name})}),i(Dt.View,{style:{flexDirection:"row",flexShrink:1},children:r&&r.length>0&&i(Dt.TouchableOpacity,{style:{flexDirection:"row",gap:8,alignItems:"center",paddingVertical:4,paddingHorizontal:8,backgroundColor:"#00000016",borderRadius:32},disabled:!r.some(t=>t.id),children:b(D,{variant:"text-md/medium",children:["by ",r.map(t=>t.name).join(", ")]})})})]})}function Yg({theme:e,navigation:r}){var[t,o]=(0,zi.useState)({...e}),[n,a]=(0,zi.useState)(!1);(0,zi.useEffect)(()=>{var p=setInterval(()=>{o({...e})},500);return()=>clearInterval(p)},[e]);var s=()=>{Be.setString(t.id),typeof q?.showCopyToClipboard=="function"?q.showCopyToClipboard():q("Copied to clipboard")},f=()=>x(function*(){a(!0);try{yield ln(t.id,t.selected),q("Theme refreshed successfully")}catch(p){console.error("Failed to refresh theme:",p),q("Failed to refresh theme")}finally{a(!1)}})(),d=()=>{vt({title:E.HOLD_UP,content:Co("ARE_YOU_SURE_TO_DELETE_THEME",{name:t.data.name}),confirmText:E.DELETE,cancelText:E.CANCEL,confirmColor:"red",onConfirm:()=>x(function*(){Xt("ThemeInfoActionSheet");try{var p=yield Yt(t.id);p&&rt(null),q("Theme removed successfully")}catch(T){console.error("Failed to remove theme:",T),q("Failed to remove theme")}})()})},m=()=>{try{rt(t),Xt("ThemeInfoActionSheet"),q(`Applied theme: ${t.data.name}`)}catch(p){console.error("Failed to apply theme:",p),q("Failed to apply theme")}};return i(er,{children:b(Dt.ScrollView,{contentContainerStyle:{gap:12,marginBottom:12},children:[i(Dt.View,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:24,justifyContent:"space-between",width:"100%"},children:i(ix,{theme:t})}),b(Dt.View,{style:{flexDirection:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap",gap:65,paddingHorizontal:8},children:[i(id,{label:E.REFETCH,variant:"secondary",icon:S("RetryIcon"),onPress:f,disabled:n}),i(id,{label:E.COPY_URL,variant:"secondary",icon:S("LinkIcon"),onPress:s}),i(id,{label:E.UNINSTALL,variant:"secondary",icon:S("TrashIcon"),onPress:d})]}),b(de,{children:[i(D,{variant:"text-md/semibold",style:{marginBottom:4,color:tr.MOBILE_TEXT_HEADING_PRIMARY},children:"Description"}),i(D,{variant:"text-md/medium",children:t.data.description||"No description provided."})]})]})})}var zi,Dt,qg=_(()=>{"use strict";l();c();u();be();ae();Te();gt();ce();Q();zi=H(fr()),Dt=H(re());pt();ua();Ir();je();Ro()});function sd({item:e}){var r=Ee.useNavigation(),[t,o]=W.useState(!1);if(t)return null;var{authors:n}=e.data;return i(ad,{headerLabel:e.data.name,headerSublabel:n?`by ${n.map(a=>a.name).join(", ")}`:"",descriptionLabel:e.data.description??"No description.",toggleType:N.safeMode?.enabled?void 0:"radio",toggleValue:()=>ge[e.id].selected,onToggleChange:a=>{try{rt(a?e:null)}catch(s){console.error("Error while selecting theme:",s)}},overflowTitle:e.data.name,actions:[{icon:"CircleInformationIcon-primary",onPress:()=>{var a=Promise.resolve().then(()=>(qg(),Kg));or("ThemeInfoActionSheet",a,{theme:e,navigation:r})}}]})}var Xg=_(()=>{"use strict";l();c();u();ae();Wg();Ir();ke();gt();Q()});var Zg={};k(Zg,{default:()=>Jg});function ux({theme:e,installing:r,setInstalling:t,setRefreshTick:o}){var{name:n,description:a,authors:s,installUrl:f}=e;ie(ge);var d=f,m=r.has(d),p=ge[d],[,T]=sx(me=>me+1,0),[I,P]=W.useState(0),[C,F]=W.useState(1),te=()=>x(function*(){if(!m){t(ee=>new Set([...ee,d]));var me=setInterval(()=>{P(ee=>(ee+15)%360),F(ee=>.8+.2*Math.sin(Date.now()/200)),T()},100);try{yield Tt(d),o(ee=>ee+1),T(),or("ThemeInstalledSheet",()=>b(er,{children:[i(Qr,{title:"Theme Installed"}),b(De.View,{style:{padding:16,alignItems:"center",gap:12},children:[i(De.View,{style:{backgroundColor:"rgba(67, 181, 129, 0.1)",borderRadius:50,padding:16},children:i(De.Image,{source:S("CheckmarkCircle"),style:{width:32,height:32,tintColor:"#43b581"}})}),b(D,{variant:"heading-md/bold",children:[n," installed successfully!"]}),i(D,{variant:"text-md/medium",color:"text-muted",style:{textAlign:"center"},children:"The theme has been added to your themes list."}),i(De.View,{style:{flexDirection:"row",gap:8,width:"100%",justifyContent:"space-between"},children:i(Z,{size:"lg",text:"Close",variant:"primary",style:{flex:1},onPress:()=>Ml()})})]})]}))}catch(ee){console.error("Failed to install theme:",ee),or("ThemeInstallFailedSheet",()=>b(er,{children:[i(Qr,{title:"Installation Failed"}),b(De.View,{style:{padding:16,alignItems:"center",gap:12},children:[i(De.View,{style:{backgroundColor:"rgba(240, 71, 71, 0.1)",borderRadius:50,padding:16},children:i(De.Image,{source:S("ErrorCircle"),style:{width:32,height:32,tintColor:"#f04747"}})}),i(D,{variant:"heading-md/bold",children:"Failed to install theme"}),i(de,{style:{width:"100%"},children:i(D,{variant:"text-md/medium",children:ee instanceof Error?ee.message:String(ee)})}),b(De.View,{style:{flexDirection:"row",gap:8,width:"100%",justifyContent:"space-between"},children:[i(Z,{size:"md",text:"Cancel",variant:"secondary",style:{flex:1},onPress:()=>Ml()}),i(Z,{size:"md",text:"Try Again",variant:"primary",icon:S("RetryIcon"),style:{flex:1},onPress:()=>{Ml(),setTimeout(te,500)}})]})]})]}))}finally{clearInterval(me),P(0),F(1),t(ee=>{var ar=new Set(ee);return ar.delete(d),ar})}}})(),Ce=()=>x(function*(){try{yield Yt(d),o(me=>me+1),T()}catch(me){console.error("Failed to uninstall theme:",me)}})();return i(de,{children:b(oe,{spacing:16,children:[b(De.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[b(De.View,{style:{flexShrink:1},children:[i(D,{numberOfLines:1,variant:"heading-lg/semibold",children:n}),b(D,{variant:"text-md/semibold",color:"text-muted",children:["by ",s?.join(", ")||"Unknown"]})]}),b(De.View,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[i(we,{size:"sm",variant:"secondary",icon:S("MoreHorizontalIcon"),onPress:()=>{lx({key:"ThemeShareSheet",header:{title:"Share Theme"},options:[{label:"Copy Install URL",onPress:()=>{Be.setString(d)}}]})}}),p?i(Z,{size:"sm",text:"Uninstall",variant:"destructive",icon:S("TrashIcon"),onPress:Ce}):i(De.View,{style:{opacity:C},children:i(Z,{size:"sm",text:m?"Installing...":"Install",variant:"primary",disabled:m,loading:m,icon:m?i(De.View,{style:{transform:[{rotate:`${I}deg`}]},children:i(De.Image,{source:S("RetryIcon"),style:{width:16,height:16}})}):S("DownloadIcon"),onPress:te})})]})]}),i(D,{variant:"text-md/medium",children:a})]})})}function fx(e){return ie(ge),i(Zt,{CardComponent:({item:r})=>i(ux,{theme:r,installing:e.installing,setInstalling:e.setInstalling,setRefreshTick:e.setRefreshTick}),title:E.THEMES,searchKeywords:["name","description",r=>(r.authors||[]).join(", ")],sortOptions:{"Date (Newest)":(r,t)=>0,"Date (Oldest)":(r,t)=>0,"Name (A-Z)":(r,t)=>r.name.localeCompare(t.name),"Name (Z-A)":(r,t)=>t.name.localeCompare(r.name)},items:e.themes})}function Jg(){ie(N),ie(ge);var e=Ee.useNavigation(),[r,t]=W.useState("installed"),[o,n]=W.useState([]),[a,s]=W.useState(!1),[f,d]=W.useState(null),[m,p]=W.useState(new Set),[T,I]=W.useState(0);W.useEffect(()=>{var C=[];C.push(i(Z,{size:"sm",variant:"secondary",text:r==="installed"?"Browse":"Installed",icon:S(r==="installed"?"LinkIcon":"DownloadIcon"),style:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:4,elevation:2},onPress:()=>t(r==="installed"?"browse":"installed")},"mode-toggle")),C.push(i(we,{size:"sm",variant:"secondary",icon:S("MoreHorizontalIcon"),onPress:()=>or("ThemeOptionsSheet",()=>(Ht([Ge]),b(er,{children:[i(Qr,{title:"Options"}),b(De.View,{style:{paddingVertical:20,gap:12},children:[b(pe,{title:"Override Theme Type",children:[i(zt,{label:"Auto",icon:i(Hn,{source:S("RobotIcon")}),checked:!Ge.type,onPress:()=>{Ge.type||(Ge.type="dark"),Rr()?.data&&Et(Rr().data,{update:!0})}}),i(zt,{label:"Dark",icon:i(Hn,{source:S("ThemeDarkIcon")}),checked:Ge.type==="dark",onPress:()=>{Ge.type=Ge.type==="dark"?void 0:"dark",Rr()?.data&&Et(Rr().data,{update:!0})}}),i(zt,{label:"Light",icon:i(Hn,{source:S("ThemeLightIcon")}),checked:Ge.type==="light",onPress:()=>{Ge.type=Ge.type==="light"?void 0:"light",Rr()?.data&&Et(Rr().data,{update:!0})}})]}),i(pe,{title:"Chat Background",children:i(zt,{label:"Show Background",subLabel:"Enable or disable themes background on chat",icon:i(Hn,{source:S("ImageIcon")}),checked:!Ge.customBackground,onPress:()=>{Ge.customBackground=Ge.customBackground?null:"hidden"}})})]})]})))},"options")),e.setOptions({headerRight:()=>i(De.View,{style:{flexDirection:"row",gap:8},children:C})})},[e,r]);var P=W.useCallback(()=>x(function*(){s(!0),d(null);try{var C=yield ze(cx);if(!C.ok)throw new Error(`HTTP ${C.status}: ${C.statusText}`);var F=yield C.json(),te=[];Array.isArray(F)?te=F:F.OFFICIAL_THEMES?te=F.OFFICIAL_THEMES:F.themes?te=F.themes:F.THEMES?te=F.THEMES:F.items&&(te=F.items),n(te)}catch(Ce){d(Ce instanceof Error?Ce.message:String(Ce)),n([])}finally{s(!1)}})(),[]);return W.useEffect(()=>{r==="browse"&&P()},[r,P,T]),r==="installed"?i(Zt,{title:E.THEMES,searchKeywords:["data.name","data.description",C=>C.data.authors?.map(F=>F.name).join(", ")??""],sortOptions:{"Name (A-Z)":(C,F)=>C.data.name.localeCompare(F.data.name),"Name (Z-A)":(C,F)=>F.data.name.localeCompare(C.data.name)},installAction:{label:"Install a theme",fetchFn:C=>x(function*(){try{yield Tt(C),or("ThemeInstalledSheet",()=>b(er,{children:[i(Qr,{title:"Theme Installed"}),b(De.View,{style:{padding:16,alignItems:"center",gap:12},children:[i(De.View,{style:{backgroundColor:"rgba(67, 181, 129, 0.1)",borderRadius:50,padding:16},children:i(De.Image,{source:S("CheckmarkCircle"),style:{width:32,height:32,tintColor:"#43b581"}})}),i(D,{variant:"heading-md/bold",children:"Theme installed successfully!"}),i(D,{variant:"text-md/medium",color:"text-muted",style:{textAlign:"center"},children:"The theme has been added to your themes list."}),i(De.View,{style:{flexDirection:"row",gap:8,width:"100%",justifyContent:"space-between"},children:i(Z,{size:"md",text:"Cancel",variant:"secondary",style:{flex:1},onPress:()=>Ml()})})]})]}))}catch(F){throw F}})()},items:Object.values(ge),safeModeHint:{message:Co("SAFE_MODE_NOTICE_THEMES",{enabled:!!N.safeMode?.currentThemeId}),footer:N.safeMode?.currentThemeId&&i(Z,{size:"small",text:E.DISABLE_THEME,onPress:()=>delete N.safeMode?.currentThemeId,style:{marginTop:8}})},CardComponent:sd}):f?i(De.View,{style:{flex:1,paddingHorizontal:16,justifyContent:"center",alignItems:"center"},children:b(de,{style:{gap:16,padding:20,width:"100%",maxWidth:400},children:[b(De.View,{style:{alignItems:"center"},children:[i(De.View,{style:{backgroundColor:"rgba(240, 71, 71, 0.1)",borderRadius:50,padding:16,marginBottom:12},children:i(De.Image,{source:S("ErrorCircle"),style:{width:32,height:32,tintColor:"#f04747"}})}),i(D,{style:{textAlign:"center"},variant:"heading-lg/bold",children:"Connection Error"}),i(D,{style:{textAlign:"center",marginTop:8,marginBottom:8},variant:"text-md/medium",color:"text-muted",children:"An error occurred while fetching the theme repository:"})]}),i(de,{style:{backgroundColor:"rgba(0,0,0,0.05)",padding:12,borderRadius:8},children:i(D,{variant:"text-md/semibold",color:"text-danger",children:f})}),i(Z,{size:"lg",text:"Try Again",onPress:P,icon:S("RetryIcon"),style:{marginTop:8}})]})}):i(fx,{themes:o,installing:m,setInstalling:p,setRefreshTick:I})}var De,sx,Ml,lx,cx,Qg=_(()=>{"use strict";l();c();u();be();ae();je();_l();Xg();$e();Ir();qa();xo();Te();ke();ut();Oe();Bs();Fe();Q();gt();ce();De=H(re()),{useReducer:sx}=W,{hideActionSheet:Ml}=K(()=>L("openLazy","hideActionSheet")),{showSimpleActionSheet:lx}=K(()=>L("showSimpleActionSheet")),cx="https://raw.githubusercontent.com/kmmiio99o/theme-marketplace/refs/heads/main/themes.json"});var Ki={};k(Ki,{fonts:()=>ye,installFont:()=>dx,removeFont:()=>kl,saveFont:()=>ba,selectFont:()=>Yi,updateFont:()=>Bl,updateFonts:()=>ld,validateFont:()=>Wi});function ev(e){return x(function*(){if(!e&&e!==null)throw new Error("Arg font must be a valid object or null");e?yield lt("fonts.json",JSON.stringify(e)):yield zo("fonts.json")})()}function Wi(e){if(!e||typeof e!="object")throw new Error("URL returned a null/non-object JSON");if(typeof e.spec!="number")throw new Error("Invalid font 'spec' number");if(e.spec!==1)throw new Error("Only fonts which follows spec:1 are supported");var r=["name","main"];if(r.some(t=>!e[t]))throw new Error(`Font is missing one of the fields: ${r}`);if(e.name.startsWith("__"))throw new Error("Font names cannot start with __");if(e.name in ye)throw new Error(`There is already a font named '${e.name}' installed`)}function ba(e,r=!1){return x(function*(){var t;if(typeof e=="string")try{t=yield(yield ze(e)).json()}catch(n){throw new Error(`Failed to fetch fonts at ${e}`,{cause:n})}else t=e;Wi(t);var o=yield h(Object.entries(t.main).map(([n,a])=>x(function*(){var s=a.split(".").pop();s!=="ttf"&&s!=="otf"&&(s="ttf");var f=`downloads/fonts/${t.name}/${n}.${s}`;(yield Ot(f))||(yield Ql(a,f))})())).then(n=>n.map(a=>a.status==="fulfilled"?void 0:a.reason));if(o.some(n=>n))throw o;return ye[t.name]=t,r&&ev(ye[t.name]),t})()}function Bl(e){return x(function*(){var r={...e};r.source&&(r={...yield fetch(r.source).then(o=>o.json()),name:e.name,source:e.source});var t=ye.__selected===e.name;yield kl(e.name),yield ba(r,t)})()}function dx(e,r=!1){return x(function*(){var t=yield ba(e);r&&(yield Yi(t.name))})()}function Yi(e){return x(function*(){if(e&&!(e in ye))throw new Error("Selected font does not exist!");e?ye.__selected=e:delete ye.__selected,yield ev(e==null?null:ye[e])})()}function kl(e){return x(function*(){var r=ye.__selected===e;r&&(yield Yi(null)),delete ye[e];try{yield Zl(`downloads/fonts/${e}`)}catch{}})()}function ld(){return x(function*(){yield Ut(ye),h(Object.keys(ye).map(e=>ba(ye[e],ye.__selected===e)))})()}var ye,xn=_(()=>{"use strict";l();c();u();be();$e();Ft();Jr();ye=qr(Cr(Qd("BUNNY_FONTS",{})))});function ud(e,r){e&&ye[e].source?mx("revenge-fonts-detach-source-confirmation",i(px,{title:"Detach font pack URL?",content:"You need to detach the font pack URL from this font pack before you can manually edit its font entries. Do you want to detach the font pack URL?",actions:b(oe,{children:[i(rv,{text:"Detach",variant:"destructive",onPress:()=>{delete ye[e].source,r()}}),i(rv,{text:E.CANCEL,variant:"secondary"})]})})):r()}function hx(e){var r=e.map(o=>{var{pathname:n}=new URL(o),a=n.replace(/\.[^/.]+$/,"");return a.split("/").pop()}).filter(Boolean),t=r.reduce((o,n)=>n.length{if(n)try{Wi({spec:1,name:n,main:o}),r(n),Object.assign(e,o),jl.hideActionSheet()}catch(d){f(String(d))}}})]})}function vx({fonts:e,setName:r,setSource:t}){var[o,n]=(0,Xe.useState)(""),[a,s]=(0,Xe.useState)(!1),[f,d]=(0,Xe.useState)(void 0);return b(to.View,{style:{padding:8,paddingBottom:16,gap:12},children:[i(cr,{autoFocus:!0,size:"md",label:"Font Link",value:o,placeholder:"https://link.to/font/pack.json",onChange:n,errorMessage:f,state:f?"error":void 0}),i(Z,{size:"md",variant:"primary",text:"Import",disabled:!o||a,loading:a,onPress:()=>{s(!0),x(function*(){var m=yield ze(o,{cache:"no-store"}),p=yield m.json();Wi(p),r(p.name),t(o),Object.assign(e,p.main)})().then(()=>jl.hideActionSheet()).catch(m=>d(String(m))).finally(()=>s(!1))}})]})}function yx(e){var[r,t]=(0,Xe.useState)(e.name),[o,n]=(0,Xe.useState)(e.fontEntries[e.name]);return b(to.View,{style:{padding:8,paddingBottom:16,gap:12},children:[i(cr,{autoFocus:!0,size:"md",label:"Family Name (to override)",value:r,placeholder:"ggsans-Bold",onChange:t}),i(cr,{size:"md",label:"Font URL",value:o,placeholder:"https://link.to/the/font.ttf",onChange:n}),i(Z,{size:"md",variant:"primary",text:"Apply",onPress:()=>{delete e.fontEntries[e.name],e.fontEntries[r]=o,e.onChange(),jl.hideActionSheet()}})]})}function cd(e,r,t){jl.openLazy(Promise.resolve({default:()=>i(We,{children:b(er,{children:[i(Qr,{title:"Import Font"}),i(e,{fonts:r,...t})]})})}),"FontEditorActionSheet")}function _x({fontName:e,fontEntry:r}){var t=(0,Xe.useRef)(),o=(0,Xe.useRef)(),[n,a]=(0,Xe.useState)(!1),[s,f]=(0,Xe.useState)();return b(to.View,{style:{flexDirection:"row",gap:8,justifyContent:"flex-start"},children:[i(to.View,{style:{flex:1},children:i(cr,{isRound:!0,size:"md",label:n?t.current:void 0,placeholder:n?"https://path.to/the/file.ttf":"PostScript name (e.g. ggsans-Bold)",leadingIcon:()=>n?null:i(B.Icon,{source:S("PlusSmallIcon")}),leadingText:n?t.current:"",onChange:d=>(n?o:t).current=d,errorMessage:s,state:s?"error":void 0})}),n&&i(we,{size:"md",variant:"secondary",onPress:()=>{t.current="",a(!1)},icon:S("TrashIcon")}),i(we,{size:"md",variant:"primary",onPress:()=>ud(e,()=>{if(!n&&t.current)a(!0);else if(n&&t.current&&o.current)try{var d=new URL(o.current);if(!d.protocol||!d.host)throw"Invalid URL";r[t.current]=o.current,t.current=void 0,o.current=void 0,a(!1)}catch(m){f(String(m))}}),icon:S(n?"PlusSmallIcon":"ArrowLargeRightIcon")})]})}function qi(e){var[r,t]=(0,Xe.useState)(e.name),[o,n]=(0,Xe.useState)(e.name&&ye[e.name].source),[a,s]=(0,Xe.useState)(!1),[f,d]=(0,Xe.useState)(),m=(0,Xe.useMemo)(()=>jt(e.name?{...ye[e.name].main}:{}).proxy,[e.name]),p=ie(m),T=Ee.useNavigation(),[,I]=React.useReducer(()=>({}),0);return i(to.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:b(oe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:12,children:[e.name?b(pe,{title:"Actions",children:[i(B,{label:"Refetch fonts from source",icon:i(B.Icon,{source:S("RetryIcon")}),onPress:()=>x(function*(){yield Bl(ye[e.name]),T.goBack()})()}),i(B,{variant:"danger",label:"Delete font pack",icon:i(B.Icon,{variant:"danger",source:S("TrashIcon")}),onPress:()=>kl(e.name).then(()=>T.goBack())})]}):b(pe,{title:"Import",children:[Rr()?.data?.fonts&&i(B,{label:E.LABEL_EXTRACT_FONTS_FROM_THEME,subLabel:E.DESC_EXTRACT_FONTS_FROM_THEME,icon:i(B.Icon,{source:S("HammerIcon")}),onPress:()=>cd(gx,p,{setName:t})}),i(B,{label:"Import font entries from a link",subLabel:"Directly import from a link with a pre-configured JSON file",icon:i(B.Icon,{source:S("LinkIcon")}),onPress:()=>cd(vx,p,{setName:t,setSource:n})})]}),i(cr,{size:"lg",value:r,label:E.FONT_NAME,placeholder:"Whitney",onChange:t}),e.name&&ye[e.name].source&&i(cr,{size:"lg",value:o,label:"Font Pack URL",onChange:n}),b(pe,{title:"Font Entries",children:[Object.entries(p).map(([P,C],F)=>{var te=f?.[F];return i(B,{label:P,subLabel:te?i(D,{variant:"text-xs/medium",color:"text-feedback-critical",children:te.message}):C,trailing:b(oe,{spacing:8,direction:"horizontal",children:[i(we,{size:"sm",variant:"secondary",icon:S("PencilIcon"),onPress:()=>ud(e.name,()=>cd(yx,p,{name:P,fontEntries:p,onChange:()=>{d(void 0),I()}}))}),i(we,{size:"sm",variant:"secondary",icon:S("TrashIcon"),onPress:()=>ud(e.name,()=>{delete p[P],d(void 0)})})]})})}),i(B,{label:i(_x,{fontName:e.name,fontEntry:p})})]}),f&&i(D,{variant:"text-sm/medium",color:"text-feedback-critical",children:"Some font entries cannot be imported. Please modify the entries and try again."}),i(to.View,{style:{flexDirection:"row",justifyContent:"flex-end",bottom:0,left:0},children:i(Z,{size:"lg",loading:a,disabled:a||!r||Object.keys(p).length===0,variant:"primary",text:e.name?"Save":"Import",onPress:()=>x(function*(){r&&(d(void 0),s(!0),e.name?(Object.assign(ye[e.name],{name:r,main:p}),Bl(ye[e.name]).then(()=>T.goBack()).catch(P=>d(P)).finally(()=>s(!1))):ba({spec:1,name:r,main:p,source:o}).then(()=>T.goBack()).catch(P=>d(P)).finally(()=>s(!1)))})(),icon:S(e.name?"toast_image_saved":"DownloadIcon"),style:{marginLeft:8}})})]})})}var Xe,to,jl,mx,px,rv,fd=_(()=>{"use strict";l();c();u();be();ae();je();$e();xn();Ir();Te();Jr();Oe();Q();ce();Le();It();Xe=H(fr()),to=H(re()),jl=U("hideActionSheet"),{openAlert:mx}=K(()=>L("openAlert","dismissAlert")),{AlertModal:px,AlertActionButton:rv}=K(()=>L("AlertModal","AlertActions"))});var ov=Nt((iG,tv)=>{l();c();u();tv.exports=go()["react-native-webview"]});var av,nv=_(()=>{av=` - - - -