-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbunny.min.js
8 lines (8 loc) · 155 KB
/
bunny.min.js
1
2
3
4
5
6
7
8
"use strict";(()=>{var ih=Object.create;var Na=Object.defineProperty;var sh=Object.getOwnPropertyDescriptor;var lh=Object.getOwnPropertyNames;var uh=Object.getPrototypeOf,fh=Object.prototype.hasOwnProperty;var p=(e,r)=>()=>(e&&(r=e(e=0)),r);var $r=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),M=(e,r)=>{for(var t in r)Na(e,t,{get:r[t],enumerable:!0})},Hf=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(var n=lh(r),i=0,u=n.length,f;i<u;i++)f=n[i],!fh.call(e,f)&&f!==t&&Na(e,f,{get:(c=>r[c]).bind(null,f),enumerable:!(o=sh(r,f))||o.enumerable});return e};var U=(e,r,t)=>(t=e!=null?ih(uh(e)):{},Hf(r||!e||!e.__esModule?Na(t,"default",{value:e,enumerable:!0}):t,e)),ze=e=>Hf(Na({},"__esModule",{value:!0}),e);var d,s=p(()=>{"use strict";d=Symbol("Symbol.asyncIterator")});var ch,mh,dh,m,l=p(()=>{"use strict";ch=e=>({status:"fulfilled",value:e}),mh=e=>({status:"rejected",reason:e}),dh=e=>Promise.resolve(e).then(ch,mh),m=Promise.allSettled??=e=>Promise.all(Array.from(e).map(dh))});function Vf(e,r,t,o,n,i,u){try{var f=e[i](u),c=f.value}catch(S){t(S);return}f.done?r(c):Promise.resolve(c).then(o,n)}function x(e){return function(){var r=this,t=arguments;return new Promise(function(o,n){var i=e.apply(r,t);function u(c){Vf(i,o,n,u,f,"next",c)}function f(c){Vf(i,o,n,u,f,"throw",c)}u(void 0)})}}var me=p(()=>{s();l()});var La=$r((By,Yf)=>{s();l();var Zi=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,hh=Object.getOwnPropertyNames,gh=Object.prototype.hasOwnProperty,vh=(e,r)=>{for(var t in r)Zi(e,t,{get:r[t],enumerable:!0})},yh=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function"){var n=function(u){!gh.call(e,u)&&u!==t&&Zi(e,u,{get:()=>r[u],enumerable:!(o=ph(r,u))||o.enumerable})};for(var i of hh(r))n(i)}return e},_h=e=>yh(Zi({},"__esModule",{value:!0}),e),Gf={};vh(Gf,{after:()=>Th,before:()=>bh,instead:()=>Eh,unpatchAll:()=>Sh});Yf.exports=_h(Gf);var zf=["a","b","i"],so=new Map;function xh(e,r,t,o,n){var i=so.get(r)?.[e];if(!i)return n?Reflect.construct(r[e],t,o):r[e].apply(o,t);for(var u of i.b.values()){var f=u.call(o,t);Array.isArray(f)&&(t=f)}var c=[...i.i.values()].reduce((h,E)=>(...A)=>E.call(o,A,h),(...h)=>n?Reflect.construct(i.o,h,o):i.o.apply(o,h))(...t);for(var S of i.a.values())c=S.call(o,t,c)??c;return c}function $f(e,r,t,o){var n=so.get(e),i=n?.[r];if(!i?.[o].has(t))return!1;if(i[o].delete(t),zf.every(f=>i[f].size===0)){var u=Reflect.defineProperty(e,r,{value:i.o,writable:!0,configurable:!0});u||(e[r]=i.o),delete n[r]}return Object.keys(n).length==0&&so.delete(e),!0}function Sh(){for(var[e,r]of so.entries())for(var t in r)for(var o of zf)for(var n of r[t]?.[o].keys()??[])$f(e,t,n,o)}var Qi=e=>(r,t,o,n=!1)=>{if(typeof t[r]!="function")throw new Error(`${r} is not a function in ${t.constructor.name}`);so.has(t)||so.set(t,Object.create(null));var i=so.get(t);if(!i[r]){var u=t[r];i[r]={o:u,b:new Map,i:new Map,a:new Map};var f=(A,O,re)=>{var he=xh(r,t,O,A,re);return n&&E(),he},c=new Proxy(u,{apply:(A,O,re)=>f(O,re,!1),construct:(A,O)=>f(u,O,!0),get:(A,O,re)=>O=="toString"?u.toString.bind(u):Reflect.get(A,O,re)}),S=Reflect.defineProperty(t,r,{value:c,configurable:!0,writable:!0});S||(t[r]=c)}var h=Symbol(),E=()=>$f(t,r,h,e);return i[r][e].set(h,o),E},bh=Qi("b"),Eh=Qi("i"),Th=Qi("a")});var Wf={};M(Wf,{BundleUpdaterManager:()=>dr,NativeCacheModule:()=>lo,NativeClientInfoModule:()=>uo,NativeDeviceModule:()=>fo,NativeFileModule:()=>oe,NativeThemeModule:()=>es});var $e,lo,oe,uo,fo,es,dr,Tr=p(()=>{"use strict";s();l();$e=window.nativeModuleProxy,lo=$e.NativeCacheModule??$e.MMKVManager,oe=$e.NativeFileModule??$e.RTNFileManager??$e.DCDFileManager,uo=$e.NativeClientInfoModule??$e.RTNClientInfoManager??$e.InfoDictionaryManager,fo=$e.NativeDeviceModule??$e.RTNDeviceManager??$e.DCDDeviceManager,es=$e.NativeThemeModule??$e.RTNThemeManager??$e.DCDTheme,{BundleUpdaterManager:dr}=$e});var vn={};M(vn,{clearFolder:()=>ss,downloadFile:()=>ls,fileExists:()=>it,readFile:()=>mo,removeFile:()=>co,writeFile:()=>wr});function ss(e){return rs.apply(this,arguments)}function rs(){return rs=x(function*(e,{prefix:r="pyoncord/"}={}){if(typeof oe.clearFolder!="function")throw new Error("'fs.clearFolder' is not supported");return void(yield oe.clearFolder("documents",`${r}${e}`))}),rs.apply(this,arguments)}function co(e){return ts.apply(this,arguments)}function ts(){return ts=x(function*(e,{prefix:r="pyoncord/"}={}){if(typeof oe.removeFile!="function")throw new Error("'fs.removeFile' is not supported");return void(yield oe.removeFile("documents",`${r}${e}`))}),ts.apply(this,arguments)}function it(e){return os.apply(this,arguments)}function os(){return os=x(function*(e,{prefix:r="pyoncord/"}={}){return yield oe.fileExists(`${oe.getConstants().DocumentsDirPath}/${r}${e}`)}),os.apply(this,arguments)}function wr(e,r){return ns.apply(this,arguments)}function ns(){return ns=x(function*(e,r,{prefix:t="pyoncord/"}={}){if(typeof r!="string")throw new Error("Argument 'data' must be a string");return void(yield oe.writeFile("documents",`${t}${e}`,r,"utf8"))}),ns.apply(this,arguments)}function mo(e){return as.apply(this,arguments)}function as(){return as=x(function*(e,{prefix:r="pyoncord/"}={}){try{return yield oe.readFile(`${oe.getConstants().DocumentsDirPath}/${r}${e}`,"utf8")}catch(t){throw new Error(`An error occured while writing to '${e}'`,{cause:t})}}),as.apply(this,arguments)}function ls(e,r){return is.apply(this,arguments)}function is(){return is=x(function*(e,r,{prefix:t="pyoncord/"}={}){var o=yield fetch(e);if(!o.ok)throw new Error(`Failed to download file from ${e}: ${o.statusText}`);var n=yield o.arrayBuffer(),i=Buffer.from(n).toString("base64");yield oe.writeFile("documents",`${t}${r}`,i,"base64")}),is.apply(this,arguments)}var Ct=p(()=>{"use strict";s();l();me();Tr()});function po(e){return po=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},po(e)}var us=p(()=>{s();l()});function yn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yn=function(){return!!e})()}var fs=p(()=>{s();l()});function Kf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var qf=p(()=>{s();l()});function Xf(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}var Jf=p(()=>{s();l()});function Zf(e,r){return r&&(Xf(r)==="object"||typeof r=="function")?r:Kf(e)}var Qf=p(()=>{s();l();qf();Jf()});function It(e,r,t){return r=po(r),Zf(e,yn()?Reflect.construct(r,t||[],po(e).constructor):r.apply(e,t))}var Oa=p(()=>{s();l();us();fs();Qf()});function nr(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var _n=p(()=>{s();l()});function Rt(e,r){return Rt=Object.setPrototypeOf||function(o,n){return o.__proto__=n,o},Rt(e,r)}var Da=p(()=>{s();l()});function Pt(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&&Rt(e,r)}var Ba=p(()=>{s();l();Da()});function xn(e,r,t){return yn()?xn=Reflect.construct:xn=function(n,i,u){var f=[null];f.push.apply(f,i);var c=Function.bind.apply(n,f),S=new c;return u&&Rt(S,u.prototype),S},xn.apply(null,arguments)}var ec=p(()=>{s();l();fs();Da()});function rc(e){return Function.toString.call(e).indexOf("[native code]")!==-1}var tc=p(()=>{s();l()});function Ma(e){var r=typeof Map=="function"?new Map:void 0;return Ma=function(o){if(o===null||!rc(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 xn(o,arguments,po(this).constructor)}return n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Rt(n,o)},Ma(e)}var oc=p(()=>{s();l();ec();us();tc();Da()});function Sn(e,r,{signal:t,edges:o}={}){var n=void 0,i=null,u=o!=null&&o.includes("leading"),f=o==null||o.includes("trailing"),c=()=>{i!==null&&(e.apply(n,i),n=void 0,i=null)},S=()=>{f&&c(),O()},h=null,E=()=>{h!=null&&clearTimeout(h),h=setTimeout(()=>{h=null,S()},r)},A=()=>{h!==null&&(clearTimeout(h),h=null)},O=()=>{A(),n=void 0,i=null},re=()=>{A(),c()},he=function(...zr){if(!t?.aborted){n=this,i=zr;var At=h==null;E(),u&&At&&c()}};return he.schedule=E,he.cancel=O,he.flush=re,t?.addEventListener("abort",O,{once:!0}),he}var nc=p(()=>{s();l()});function bn(e,r){for(var t={...e},o=0;o<r.length;o++){var n=r[o];delete t[n]}return t}var ac=p(()=>{s();l()});function Fa(e){return e!=null}var ic=p(()=>{s();l()});var Mo=p(()=>{s();l();nc();ac();ic()});var Ar,Yr,ja=p(()=>{"use strict";s();l();(function(e){e[e.EXISTS=1]="EXISTS",e[e.BLACKLISTED=2]="BLACKLISTED",e[e.ASSET=4]="ASSET"})(Ar||(Ar={}));(function(e){e[e.FULL_LOOKUP=0]="FULL_LOOKUP",e[e.NOT_FOUND=1]="NOT_FOUND"})(Yr||(Yr={}))});var ho={};M(ho,{_patcherDelaySymbol:()=>En,after:()=>Q,before:()=>Nt,default:()=>Tn,instead:()=>Lt});function cs(e){function r(...o){if(En in o[1]){var n=o[1][En],i=!1,u=()=>i=!0;return n(f=>{i||(o[1]=f,u=e.apply(this,o))}),()=>u()}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 i=!1,u=()=>i=!0;return n.then(f=>{i||(o[1]=f,u=r.apply(this,o))}),()=>u()}return Object.assign(r,{await:t})}var wh,Ah,Ch,En,Q,Nt,Lt,Tn,Le=p(()=>{"use strict";s();l();({after:wh,before:Ah,instead:Ch}=La()),En=Symbol.for("bunny.api.patcher.delay");Q=cs(wh),Nt=cs(Ah),Lt=cs(Ch),Tn={after:Q,before:Nt,instead:Lt}});var sc={};M(sc,{assetsModule:()=>Fo,patchAssets:()=>Ih});function Ih(e){if(!Fo){Fo=e;var r=Q("registerAsset",Fo,()=>{var t=ds();t!==-1&&ps(t)});return r}}var Fo,ms=p(()=>{"use strict";s();l();Le();Dt();Ot()});function lc(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Cr(e,r,t){return r&&lc(e.prototype,r),t&&lc(e,t),e}var wn=p(()=>{s();l()});function An(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var hs=p(()=>{s();l()});var gs,Ua,vs=p(()=>{"use strict";s();l();_n();wn();hs();(function(e){e.GET="GET",e.SET="SET",e.DEL="DEL"})(gs||(gs={}));Ua=function(){"use strict";function e(){nr(this,e),An(this,"listeners",Object.values(gs).reduce((r,t)=>(r[t]=new Set,r),{}))}return Cr(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=(i,u)=>{this.off(i,n),o(i,u)};this.on(t,n)}},{key:"emit",value:function(t,o){for(var n of this.listeners[t])n(t,o)}}]),e}()});var Cn={};M(Cn,{createFilterDefinition:()=>pr,createSimpleFilter:()=>Rh});function pr(e,r){function t(n,i,u){return Object.assign(n,{filter:e,raw:u,uniq:[u&&"raw::",r(i)].filter(Boolean).join("")})}var o=n=>(...i)=>t((u,f,c)=>e(i,u,f,c),i,n);return Object.assign(o(!1),{byRaw:o(!0),uniqMaker:r})}function Rh(e,r){return pr((t,o)=>e(o),()=>`dynamic::${r}`)()}var ka=p(()=>{"use strict";s();l()});var ys={};M(ys,{byDisplayName:()=>Mt,byFilePath:()=>Va,byMutableProp:()=>Rn,byName:()=>Bt,byProps:()=>In,byStoreName:()=>Ha,byTypeName:()=>Ft});var In,Bt,Mt,Ft,Ha,Va,Rn,Pn=p(()=>{"use strict";s();l();ka();Ot();In=pr((e,r)=>e.length===0?r[e[0]]:e.every(t=>r[t]),e=>`bunny.metro.byProps(${e.join(",")})`),Bt=pr(([e],r)=>r.name===e,e=>`bunny.metro.byName(${e})`),Mt=pr(([e],r)=>r.displayName===e,e=>`bunny.metro.byDisplayName(${e})`),Ft=pr(([e],r)=>r.type?.name===e,e=>`bunny.metro.byTypeName(${e})`),Ha=pr(([e],r)=>r.getName?.length===0&&r.getName()===e,e=>`bunny.metro.byStoreName(${e})`),Va=pr(([e,r],t,o,n)=>r===n&&je[o]?.__filePath===e,([e,r])=>`bunny.metro.byFilePath(${e},${r})`),Rn=pr(([e],r)=>r?.[e]&&!Object.getOwnPropertyDescriptor(r,e)?.get,e=>`bunny.metro.byMutableProp(${e})`)});function uc(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 _s(e){var{cacheId:r,finish:t}=za(e.uniq,!1);for(var[o,n]of Ga(e.uniq,!1)){var{exports:i,defaultExport:u}=uc(n,o,e);if(i!==void 0)return r(o,i),{id:o,defaultExport:u}}return t(!0),{}}function Ph(e){return _s(e)?.id}function Oe(e){var{id:r,defaultExport:t}=_s(e);if(r!=null)return t?hr(r).default:hr(r)}function xs(e){var{cacheId:r,finish:t}=za(e.uniq,!0),o=[];for(var[n,i]of Ga(e.uniq,!0)){var{exports:u,defaultExport:f}=uc(i,n,e);u!==void 0&&typeof f=="boolean"&&(o.push({id:n,defaultExport:f}),r(n,u))}return t(o.length===0),o}function Nh(e){return xs(e).map(r=>r.id)}function jt(e){return xs(e).map(r=>{if(r.id){var{id:t,defaultExport:o}=r;return o?hr(t).default:hr(t)}})}var jo=p(()=>{"use strict";s();l();Dt();Ot()});var bs={};M(bs,{getProxyFactory:()=>Ss,lazyDestructure:()=>G,proxyLazy:()=>Ce});function Ce(e,r={}){var t,o=r.hint!=="object"?function(){}:{},n=()=>t??=e(),i=new Proxy(o,Oh);return cc.set(i,n),Uo.set(o,{factory:e,options:r}),i}function G(e,r={}){var t=Ce(e);return new Proxy({},{get(o,n){return n===Symbol.iterator?function*(){throw yield t,yield new Proxy({},{get:(i,u)=>Ce(()=>t[u],r)}),new Error("This is not a real iterator, this is likely used incorrectly")}:Ce(()=>t[n],r)}})}function Ss(e){return cc.get(e)}var fc,Lh,cc,Uo,Oh,Se=p(()=>{"use strict";s();l();fc=new Set(["arguments","caller","prototype"]),Lh=e=>typeof e=="string"&&fc.has(e),cc=new WeakMap,Uo=new WeakMap,Oh={...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(e=>[e,(r,...t)=>{var o=Uo.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=Uo.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){var o=Uo.get(e);if(o?.options){var{exemptedEntries:n}=o.options;if(n?.[r])return n[r]}var i=o?.factory();if(!i)throw new Error(`Trying to Reflect.get of ${typeof i}`);return Reflect.get(i,r,t)},ownKeys:e=>{var r=Uo.get(e),t=r?.factory();if(!t)throw new Error(`Trying to Reflect.ownKeys of ${typeof t}`);var o=Reflect.ownKeys(t);return fc.forEach(n=>!o.includes(n)&&o.push(n)),o},getOwnPropertyDescriptor:(e,r)=>{if(Lh(r))return Reflect.getOwnPropertyDescriptor(e,r);var t=Uo.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 Es={};M(Es,{_lazyContextSymbol:()=>$a,createLazyModule:()=>Wr,getLazyContext:()=>dc});function Dh(e){var r=st().findIndex[e.uniq];if(r){for(var t in r)if(t[0]!=="_")return Number(t)}}function Bh(e,r){var t=dc(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 Ts(t.moduleId,()=>{r(Oe(t.filter))})}function dc(e){return mc.get(e)}function Wr(e){var r=void 0,t=Dh(e),o={filter:e,indexed:!!t,moduleId:t,getExports(i){return!t||je[t]?.isInitialized?(i(this.forceLoad()),()=>{}):this.subscribe(i)},subscribe(i){return Bh(n,i)},get cache(){return r},forceLoad(){if(r??=Oe(e),!r)throw new Error(`${e.uniq} is ${typeof r}! (id ${o.moduleId??"unknown"})`);return r}},n=Ce(()=>o.forceLoad(),{exemptedEntries:{[$a]:o,[En]:i=>o.getExports(i)}});return mc.set(n,o),n}var $a,mc,Nn=p(()=>{"use strict";s();l();Le();Se();jo();Dt();Ot();$a=Symbol.for("bunny.metro.lazyContext"),mc=new WeakMap});var F,P,ws,ko,Ue,As,Cs,Is,Rs,Ps,Mh,Ns,Ls,go,Os,Ln,fe=p(()=>{"use strict";s();l();Pn();jo();Nn();F=(...e)=>Oe(In(...e)),P=(...e)=>Wr(In(...e)),ws=(...e)=>jt(In(...e)),ko=(e,r=!0)=>Oe(r?Bt(e):Bt.byRaw(e)),Ue=(e,r=!0)=>Wr(r?Bt(e):Bt.byRaw(e)),As=(e,r=!0)=>jt(r?Bt(e):Bt.byRaw(e)),Cs=(e,r=!0)=>Oe(r?Mt(e):Mt.byRaw(e)),Is=(e,r=!0)=>Wr(r?Mt(e):Mt.byRaw(e)),Rs=(e,r=!0)=>jt(r?Mt(e):Mt.byRaw(e)),Ps=(e,r=!0)=>Oe(r?Ft(e):Ft.byRaw(e)),Mh=(e,r=!0)=>Wr(r?Ft(e):Ft.byRaw(e)),Ns=(e,r=!0)=>jt(r?Ft(e):Ft.byRaw(e)),Ls=e=>Oe(Ha(e)),go=e=>Wr(Ha(e)),Os=(e,r=!1)=>Oe(Va(e,r)),Ln=(e,r=!1)=>Wr(Va(e,r))});var Ut=$r((Kx,pc)=>{"use strict";s();l();fe();pc.exports={react:P("createElement"),"react-native":P("AppRegistry"),util:P("inspect","isNullOrUndefined"),moment:P("isMoment"),"chroma-js":P("brewer"),lodash:P("forEachRight"),"@shopify/react-native-skia":P("useFont")}});var J=$r((Jx,hc)=>{s();l();hc.exports=Ut()["react-native"]});function On(e={}){var r=new Ua,t=new WeakMap,o=new WeakSet;function n(i,u){return new Proxy(i,{get(f,c){if(c===yc)return r;var S=[...u,c],h=f[c];if(h!=null){if(r.emit("GET",{path:S,value:h}),typeof h=="object"){if(o.has(h))return h;if(t.has(h))return t.get(h);var E=n(h,S);return t.set(h,E),E}return h}return h},set(f,c,S){if(typeof S=="object")if(t.has(S))f[c]=t.get(S);else{var h=n(S,[...u,c]);t.set(S,h),o.add(S),f[c]=h}else f[c]=S;return r.emit("SET",{path:[...u,c],value:f[c]}),!0},deleteProperty(f,c){var S=typeof f[c]=="object"?t.get(f[c]):f[c],h=delete f[c];return h&&r.emit("DEL",{value:S,path:[...u,c]}),h}})}return{proxy:n(e,[]),emitter:r}}function Z(e){var r=e?.[yc];if(!r)throw new Error("storage?.[emitterSymbol] is undefined");var[,t]=React.useReducer(o=>~o,0);return React.useEffect(()=>{var o=(n,i)=>{n==="DEL"&&i.value===e||t()};return r.on("SET",o),r.on("DEL",o),()=>{r.off("SET",o),r.off("DEL",o)}},[]),e}function ar(e){return Ds.apply(this,arguments)}function Ds(){return Ds=x(function*(e){var r=yield e.get(),{proxy:t,emitter:o}=On(r),n=()=>e.set(t);return o.on("SET",n),o.on("DEL",n),t}),Ds.apply(this,arguments)}function Ir(e){var r=void 0,t=[],o=n=>r?n():t.push(n);return e.then(n=>{r=n,t.forEach(i=>i())}),new Proxy({},{...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(n=>[n,(i,...u)=>Reflect[n](r??i,...u)])),get(n,i,u){return i===_c?o:Reflect.get(r??n,i,u)}})}function kt(...e){return Promise.all(e.map(r=>new Promise(t=>r[_c](t))))}var vc,yc,_c,gc,Bs,xc,Ya,Rr,vo,be=p(()=>{"use strict";s();l();me();vs();Tr();vc=U(J()),yc=Symbol.for("vendetta.storage.emitter"),_c=Symbol.for("vendetta.storage.accessor");gc=/[<>:"/\\|?*]/g,Bs=e=>vc.Platform.select({default:e,ios:oe.saveFileToGallery?e:`Documents/${e}`}),xc=e=>(gc.test(e)&&(e=e.replace(gc,"-").replace(/-+/g,"-")),`vd_mmkv/${e}`),Ya=function(){var e=x(function*(r){(yield lo.getItem(r))&&lo.removeItem(r);var t=xc(r);(yield oe.fileExists(`${oe.getConstants().DocumentsDirPath}/${t}`))&&(yield oe.removeFile?.("documents",t))});return function(t){return e.apply(this,arguments)}}(),Rr=(e,r={})=>{var t=xc(e),o=JSON.stringify(r);return vo(t,r,x(function*(){var n=`${oe.getConstants().DocumentsDirPath}/${t}`;if(!(yield oe.fileExists(n))){var i=(yield lo.getItem(e))??o;if(i==="!!LARGE_VALUE!!"){var u=`${oe.getConstants().CacheDirPath}/mmkv/${e}`;(yield oe.fileExists(u))?i=yield oe.readFile(u,"utf8"):(console.log(`${e}: Experienced data loss :(`),i=o)}try{JSON.parse(i)}catch{console.error(`${e} had an unparseable data while migrating`),i=o}yield oe.writeFile("documents",Bs(t),i,"utf8"),(yield lo.getItem(e))!==null&&(lo.removeItem(e),console.log(`Successfully migrated ${e} store from MMKV storage to fs`))}})())},vo=(e,r={},t)=>({get:x(function*(){yield t;var o=`${oe.getConstants().DocumentsDirPath}/${e}`;if(yield oe.fileExists(o)){var n=yield oe.readFile(o,"utf8");try{return JSON.parse(n)}catch{}}return yield oe.writeFile("documents",Bs(e),JSON.stringify(r),"utf8"),JSON.parse(yield oe.readFile(o,"utf8"))}),set:function(){var o=x(function*(n){yield t,yield oe.writeFile("documents",Bs(e),JSON.stringify(n),"utf8")});return function(n){return o.apply(this,arguments)}}()})});var Dn,Bn,Wa,Sc,bc,ne,jh,Uh,kh,Hh,Vh,Gh,Ec,zh,gr,Ht,$h,Yh,Wh,Kh,Tc,wc,Ac,Cc,qh,Xh,Jh,Zh,De,Ms,Ic,Rc,Pc,lt,Nc=p(()=>{s();l();Oa();_n();wn();Ba();Dn="insert",Bn="update",Wa="delete",Sc="reverse",bc="shuffle",ne=Symbol.for("object-observer-meta-key-0"),jh={async:1},Uh=e=>{if(!e||typeof e!="object")return null;var r={},t=[];for(var[o,n]of Object.entries(e))if(o==="path"){if(typeof n!="string"||n==="")throw new Error('"path" option, if/when provided, MUST be a non-empty string');r[o]=n}else if(o==="pathsOf"){if(e.path)throw new Error('"pathsOf" option MAY NOT be specified together with "path" option');if(typeof n!="string")throw new Error('"pathsOf" option, if/when provided, MUST be a string (MAY be empty)');r[o]=e.pathsOf.split(".").filter(Boolean)}else if(o==="pathsFrom"){if(e.path||e.pathsOf)throw new Error('"pathsFrom" option MAY NOT be specified together with "path"/"pathsOf" option/s');if(typeof n!="string"||n==="")throw new Error('"pathsFrom" option, if/when provided, MUST be a non-empty string');r[o]=n}else t.push(o);if(t.length)throw new Error(`'${t.join(", ")}' is/are not a valid observer option/s`);return r},kh=(e,r,t)=>{var o={};o[ne]=r;for(var n in e)o[n]=Ht(e[n],n,r,t);return o},Hh=(e,r,t)=>{var o=e.length,n=new Array(o);n[ne]=r;for(var i=0;i<o;i++)n[i]=Ht(e[i],i,r,t);return n},Vh=(e,r)=>(e[ne]=r,e),Gh=(e,r)=>{if(e===null)return r;var t=r;if(e.path){var o=e.path;t=r.filter(f=>f.path.join(".")===o)}else if(e.pathsOf){var n=e.pathsOf,i=n.join(".");t=r.filter(f=>(f.path.length===n.length+1||f.path.length===n.length&&(f.type===Sc||f.type===bc))&&f.path.join(".").startsWith(i))}else if(e.pathsFrom){var u=e.pathsFrom;t=r.filter(f=>f.path.join(".").startsWith(u))}return t},Ec=(e,r)=>{try{e(r)}catch(t){console.error(`failed to notify listener ${e} with ${r}`,t)}},zh=function(){var r=this.batches;this.batches=[];for(var[t,o]of r)Ec(t,o)},gr=(e,r)=>{var t=e,o,n,i,u,f,c,S=r.length;do{for(o=t.options.async,n=t.observers,c=n.length;c--;)if([i,u]=n[c],f=Gh(u,r),f.length)if(o){t.batches.length===0&&queueMicrotask(zh.bind(t));var h=void 0;for(var E of t.batches)if(E[0]===i){h=E;break}h||(h=[i,[]],t.batches.push(h)),Array.prototype.push.apply(h[1],f)}else Ec(i,f);var A=t.parent;if(A){for(var O=0;O<S;O++){var re=r[O];r[O]=new De(re.type,[t.ownKey,...re.path],re.value,re.oldValue,re.object)}t=A}else t=null}while(t)},Ht=(e,r,t,o)=>o!==void 0&&o.has(e)?null:typeof e!="object"||e===null?e:Array.isArray(e)?new Rc({target:e,ownKey:r,parent:t,visited:o}).proxy:ArrayBuffer.isView(e)?new Pc({target:e,ownKey:r,parent:t}).proxy:e instanceof Date?e:new Ic({target:e,ownKey:r,parent:t,visited:o}).proxy,$h=function(){var r=this[ne],t=r.target,o=t.length-1,n=t.pop();if(n&&typeof n=="object"){var i=n[ne];i&&(n=i.detach())}var u=[new De(Wa,[o],void 0,n,this)];return gr(r,u),n},Yh=function(){for(var r=this[ne],t=r.target,o=arguments.length,n=new Array(o),i=t.length,u=0;u<o;u++)n[u]=Ht(arguments[u],i+u,r);for(var f=Reflect.apply(t.push,t,n),c=[],S=i,h=t.length;S<h;S++)c[S-i]=new De(Dn,[S],t[S],void 0,this);return gr(r,c),f},Wh=function(){var r=this[ne],t=r.target,o,n,i,u,f;for(o=t.shift(),o&&typeof o=="object"&&(f=o[ne],f&&(o=f.detach())),n=0,i=t.length;n<i;n++)u=t[n],u&&typeof u=="object"&&(f=u[ne],f&&(f.ownKey=n));var c=[new De(Wa,[0],void 0,o,this)];return gr(r,c),o},Kh=function(){for(var r=this[ne],t=r.target,o=arguments.length,n=new Array(o),i=0;i<o;i++)n[i]=Ht(arguments[i],i,r);for(var u=Reflect.apply(t.unshift,t,n),f=0,c=t.length,S;f<c;f++)if(S=t[f],S&&typeof S=="object"){var h=S[ne];h&&(h.ownKey=f)}for(var E=n.length,A=new Array(E),O=0;O<E;O++)A[O]=new De(Dn,[O],t[O],void 0,this);return gr(r,A),u},Tc=function(){var r=this[ne],t=r.target,o,n,i;for(t.reverse(),o=0,n=t.length;o<n;o++)if(i=t[o],i&&typeof i=="object"){var u=i[ne];u&&(u.ownKey=o)}var f=[new De(Sc,[],void 0,void 0,this)];return gr(r,f),this},wc=function(r){var t=this[ne],o=t.target,n,i,u;for(o.sort(r),n=0,i=o.length;n<i;n++)if(u=o[n],u&&typeof u=="object"){var f=u[ne];f&&(f.ownKey=n)}var c=[new De(bc,[],void 0,void 0,this)];return gr(t,c),this},Ac=function(r,t,o){var n=this[ne],i=n.target,u=[],f=i.length,c=i.slice(0);if(t=t===void 0?0:t<0?Math.max(f+t,0):Math.min(t,f),o=o===void 0?f:o<0?Math.max(f+o,0):Math.min(o,f),t<f&&o>t){i.fill(r,t,o);for(var S,h=t,E,A;h<o;h++)E=i[h],i[h]=Ht(E,h,n),h in c?(A=c[h],A&&typeof A=="object"&&(S=A[ne],S&&(A=S.detach())),u.push(new De(Bn,[h],i[h],A,this))):u.push(new De(Dn,[h],i[h],void 0,this));gr(n,u)}return this},Cc=function(r,t,o){var n=this[ne],i=n.target,u=i.length;r=r<0?Math.max(u+r,0):r,t=t===void 0?0:t<0?Math.max(u+t,0):Math.min(t,u),o=o===void 0?u:o<0?Math.max(u+o,0):Math.min(o,u);var f=Math.min(o-t,u-r);if(r<u&&r!==t&&f>0){var c=i.slice(0),S=[];i.copyWithin(r,t,o);for(var h=r,E,A,O;h<r+f;h++)E=i[h],E&&typeof E=="object"&&(E=Ht(E,h,n),i[h]=E),A=c[h],A&&typeof A=="object"&&(O=A[ne],O&&(A=O.detach())),!(typeof E!="object"&&E===A)&&S.push(new De(Bn,[h],E,A,this));gr(n,S)}return this},qh=function(){for(var r=this[ne],t=r.target,o=arguments.length,n=new Array(o),i=t.length,u=0;u<o;u++)n[u]=Ht(arguments[u],u,r);for(var f=o===0?0:n[0]<0?i+n[0]:n[0],c=o<2?i-f:n[1],S=Math.max(o-2,0),h=Reflect.apply(t.splice,t,n),E=t.length,A,O=0,re;O<E;O++)re=t[O],re&&typeof re=="object"&&(A=re[ne],A&&(A.ownKey=O));var he,tt,zr;for(he=0,tt=h.length;he<tt;he++)zr=h[he],zr&&typeof zr=="object"&&(A=zr[ne],A&&(h[he]=A.detach()));var At=[],Ve;for(Ve=0;Ve<c;Ve++)Ve<S?At.push(new De(Bn,[f+Ve],t[f+Ve],h[Ve],this)):At.push(new De(Wa,[f+Ve],void 0,h[Ve],this));for(;Ve<S;Ve++)At.push(new De(Dn,[f+Ve],t[f+Ve],void 0,this));return gr(r,At),h},Xh=function(r,t){var o=this[ne],n=o.target,i=r.length,u=n.slice(0);t=t||0,n.set(r,t);for(var f=new Array(i),c=t;c<i+t;c++)f[c-t]=new De(Bn,[c],n[c],u[c],this);gr(o,f)},Jh={pop:$h,push:Yh,shift:Wh,unshift:Kh,reverse:Tc,sort:wc,fill:Ac,copyWithin:Cc,splice:qh},Zh={reverse:Tc,sort:wc,fill:Ac,copyWithin:Cc,set:Xh},De=function e(r,t,o,n,i){"use strict";nr(this,e),this.type=r,this.path=t,this.value=o,this.oldValue=n,this.object=i},Ms=function(){"use strict";function e(r,t){nr(this,e);var{target:o,parent:n,ownKey:i,visited:u=new Set}=r;n&&i!==void 0?(this.parent=n,this.ownKey=i):(this.parent=null,this.ownKey=null),u.add(o);var f=t(o,this,u);u.delete(o),this.observers=[],this.revocable=Proxy.revocable(f,this),this.proxy=this.revocable.proxy,this.target=f,this.options=this.processOptions(r.options),this.options.async&&(this.batches=[])}return Cr(e,[{key:"processOptions",value:function(t){if(t){if(typeof t!="object")throw new Error(`Observable options if/when provided, MAY only be an object, got '${t}'`);var o=Object.keys(t).filter(n=>!(n in jh));if(o.length)throw new Error(`'${o.join(", ")}' is/are not a valid Observable option/s`);return Object.assign({},t)}else return{}}},{key:"detach",value:function(){return this.parent=null,this.target}},{key:"set",value:function(t,o,n){var i=t[o];if(n!==i){var u=Ht(n,o,this);if(t[o]=u,i&&typeof i=="object"){var f=i[ne];f&&(i=f.detach())}var c=i===void 0?[new De(Dn,[o],u,void 0,this.proxy)]:[new De(Bn,[o],u,i,this.proxy)];gr(this,c)}return!0}},{key:"deleteProperty",value:function(t,o){var n=t[o];if(delete t[o],n&&typeof n=="object"){var i=n[ne];i&&(n=i.detach())}var u=[new De(Wa,[o],void 0,n,this.proxy)];return gr(this,u),!0}}]),e}(),Ic=function(e){"use strict";Pt(r,e);function r(t){return nr(this,r),It(this,r,[t,kh])}return r}(Ms),Rc=function(e){"use strict";Pt(r,e);function r(t){return nr(this,r),It(this,r,[t,Hh])}return Cr(r,[{key:"get",value:function(o,n){return Jh[n]||o[n]}}]),r}(Ms),Pc=function(e){"use strict";Pt(r,e);function r(t){return nr(this,r),It(this,r,[t,Vh])}return Cr(r,[{key:"get",value:function(o,n){return Zh[n]||o[n]}}]),r}(Ms),lt=Object.freeze({from:(e,r)=>{if(!e||typeof e!="object")throw new Error("observable MAY ONLY be created from a non-null object");if(e[ne])return e;if(Array.isArray(e))return new Rc({target:e,ownKey:null,parent:null,options:r}).proxy;if(ArrayBuffer.isView(e))return new Pc({target:e,ownKey:null,parent:null,options:r}).proxy;if(e instanceof Date)throw new Error(`${e} found to be one of a non-observable types`);return new Ic({target:e,ownKey:null,parent:null,options:r}).proxy},isObservable:e=>!!(e&&e[ne]),observe:(e,r,t)=>{if(!lt.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[ne].observers;o.some(n=>n[0]===r)?console.warn("observer may be bound to an observable only once; will NOT rebind"):o.push([r,Uh(t)])},unobserve:(e,...r)=>{if(!lt.isObservable(e))throw new Error("invalid observable parameter");var t=e[ne].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)}}})});var $s={};M($s,{awaitStorage:()=>Ho,createStorage:()=>Vt,createStorageAndCallback:()=>Gs,createStorageAsync:()=>Qh,getPreloadedStorage:()=>zs,preloadStorageIfExists:()=>Ka,purgeStorage:()=>qa,updateStorage:()=>Vs,useObservable:()=>ut});function Hs(e){var r=Sn(t=>{wr(e,JSON.stringify(t))},500);return{get:x(function*(){try{return JSON.parse(yield mo(e))}catch(t){throw new Error(`Failed to parse storage from '${e}'`,{cause:t})}}),set:function(){var t=x(function*(o){if(!o||typeof o!="object")throw new Error("data needs to be an object");r(o)});return function(o){return t.apply(this,arguments)}}(),exists:x(function*(){return yield it(e)})}}function ut(e,r){if(e.some(o=>o?.[Lc]))throw new Error("An error occured while initializing the storage");if(e.some(o=>!lt.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=>lt.observe(n,o,r)),()=>{e.forEach(n=>lt.unobserve(n,o))}},[])}function Vs(e,r){return Fs.apply(this,arguments)}function Fs(){return Fs=x(function*(e,r){Kr[e]=r,Hs(e).set(r)}),Fs.apply(this,arguments)}function Gs(e,r,{dflt:t={},nullIfEmpty:o=!1}={}){var n,i=f=>{var c=new Proxy(lt.from(f),{get(h,E,A){return E===Symbol.for("vendetta.storage.emitter")?n||(n=new Ua,lt.observe(h,O=>{for(var re of O)n.emit(re.type!=="delete"?"SET":"DEL",{path:re.path,value:re.value})}),n):Reflect.get(h,E,A)}}),S=()=>u.set(c);lt.observe(c,S),r(c)},u=Hs(e);Kr[e]?i(Kr[e]):u.exists().then(function(){var f=x(function*(c){c?i(Kr[e]=yield u.get()):o?i(Kr[e]=null):(Kr[e]=t,yield u.set(t),i(t))});return function(c){return f.apply(this,arguments)}}())}function Qh(e){return js.apply(this,arguments)}function js(){return js=x(function*(e,r={}){return new Promise(t=>Gs(e,t,r))}),js.apply(this,arguments)}function Ka(e){return Us.apply(this,arguments)}function Us(){return Us=x(function*(e){if(Kr[e])return!0;var r=Hs(e);return(yield r.exists())?(Kr[e]=yield r.get(),!0):!1}),Us.apply(this,arguments)}function qa(e){return ks.apply(this,arguments)}function ks(){return ks=x(function*(e){yield co(e),delete Kr[e]}),ks.apply(this,arguments)}function Ho(...e){return Promise.all(e.map(r=>r[Oc]))}function zs(e){return Kr[e]}var Lc,Oc,Kr,Vt,qr=p(()=>{"use strict";s();l();me();vs();Nc();Ct();Mo();Lc=Symbol.for("bunny.storage.initError"),Oc=Symbol.for("bunny.storage.promise"),Kr={};Vt=(e,r={})=>{var t=new Promise(c=>u=c),o,n,i,u;Gs(e,c=>{o=c,n=!0,u()},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(c=>[c,(S,...h)=>f()&&Reflect[c](o,...h)])),get(c,S,h){return S===Lc?i:S===Oc?t:f()&&Reflect.get(o??c,S,h)}})}});var Js={};M(Js,{BUNNY_PROXY_PREFIX:()=>yo,DISCORD_SERVER:()=>Ys,GITHUB:()=>Ws,HTTP_REGEX:()=>eg,HTTP_REGEX_MULTI:()=>Ks,OFFICIAL_PLUGINS_REPO_URL:()=>Mn,VD_DISCORD_SERVER_ID:()=>qs,VD_PLUGINS_CHANNEL_ID:()=>Xs,VD_PROXY_PREFIX:()=>Pr,VD_THEMES_CHANNEL_ID:()=>Fn});var Ys,Ws,eg,Ks,yo,Mn,Pr,qs,Xs,Fn,Gt=p(()=>{"use strict";s();l();Ys="https://discord.gg/XjYgWXHb9Q",Ws="https://github.com/bunny-mod",eg=/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/,Ks=/https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*)/g,yo="https://bn-plugins.github.io/vd-proxy",Mn="https://bn-plugins.github.io/dist/repo.json",Pr="https://vd-plugins.github.io/proxy",qs="1015931589865246730",Xs="1091880384561684561",Fn="1091880434939482202"});function Xa(e,r=0){for(var t=3735928559^r,o=1103547991^r,n=0,i;n<e.length;n++)i=e.charCodeAt(n),t=Math.imul(t^i,2654435761),o=Math.imul(o^i,1597334677);return t=Math.imul(t^t>>>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 Dc(e,r=0){var[t,o]=Xa(e,r);return t.toString(36).padStart(7,"0")+o.toString(36).padStart(7,"0")}var Zs=p(()=>{"use strict";s();l()});function vr(e,r){return ft(e,r,{walkable:["props","children","child","sibling"]})}var Bc=p(()=>{"use strict";s();l();ir()});function Qs(e,r,t,o){if(!(o>t.maxDepth)&&e){try{if(r(e))return e}catch{}if(Array.isArray(e)){for(var n of e)if(!(typeof n!="object"||n===null))try{var i=Qs(n,r,t,o+1);if(i)return i}catch{}}else if(typeof e=="object"){for(var u of Object.keys(e))if(!(typeof e[u]!="object"||e[u]===null)&&!(t.walkable.length&&!t.walkable.includes(u))&&!t.ignore.includes(u))try{var f=Qs(e[u],r,t,o+1);if(f)return f}catch{}}}}function ft(e,r,{walkable:t=[],ignore:o=[],maxDepth:n=100}={}){return Qs(e,r,{walkable:t,ignore:o,maxDepth:n},0)}var Mc=p(()=>{"use strict";s();l()});function el(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(i){n=t(i)??i},configurable:!0,enumerable:!1}),()=>{delete o[r],o[r]=n}}var Fc=p(()=>{"use strict";s();l()});function rl(e,r){if(!e){var t=typeof r=="function"?r():r,o="[Invariant Violation]",n=t?`${o}: ${t}`:o;throw new Error(n)}}var jc=p(()=>{"use strict";s();l()});var tl={};M(tl,{LoggerClass:()=>jn,logger:()=>ke});var jn,ke,ct=p(()=>{"use strict";s();l();fe();jn=Ue("Logger"),ke=new jn("Bunny")});function Ye(e,r){return ol.apply(this,arguments)}function ol(){return ol=x(function*(e,r,t=1e4){var o=yield fetch(e,{signal:rg(t),...r});if(!o.ok)throw new Error(`Request returned non-ok: ${o.status} ${o.statusText}`);return o}),ol.apply(this,arguments)}function rg(e){var r=new AbortController;return setTimeout(()=>r.abort(`Timed out after ${e}ms`),e),r.signal}var Uc=p(()=>{"use strict";s();l();me()});var Ja={};M(Ja,{constants:()=>Js,cyrb64:()=>Xa,findInReactTree:()=>vr,findInTree:()=>ft,hookDefineProperty:()=>el,invariant:()=>rl,lazy:()=>bs,logger:()=>tl,safeFetch:()=>Ye});var ir=p(()=>{"use strict";s();l();Gt();Zs();Bc();Mc();Fc();jc();Se();ct();Uc()});var nl={};M(nl,{Fragment:()=>yr,jsx:()=>a,jsxs:()=>_});function Hc(e){if(!e[0])throw new Error("The first argument (Component) is falsy. Ensure that you are passing a valid component.");var r=Ss(e[0]);return r&&(e[0]=r()),e}var kc,yr,a,_,V=p(()=>{"use strict";s();l();Se();fe();kc=P("jsx","jsxs","Fragment");yr=Symbol.for("react.fragment"),a=(...e)=>kc.jsx(...Hc(e)),_=(...e)=>kc.jsxs(...Hc(e))});var sr,Un=p(()=>{"use strict";s();l();qr();sr=Vt("themes/colors/preferences.json",{dflt:{selected:null,customBackground:null}})});var ri={};M(ri,{ActionSheet:()=>Nr,ActionSheetRow:()=>zt,AlertActionButton:()=>Vo,AlertActions:()=>ml,AlertModal:()=>Gn,Avatar:()=>hl,AvatarPile:()=>dl,BottomSheetTitleHeader:()=>zn,Button:()=>Y,Card:()=>ye,CompatButton:()=>al,CompatSegmentedControl:()=>hg,ContextMenu:()=>pl,FlashList:()=>Wn,FloatingActionButton:()=>gl,FormCheckbox:()=>ug,FormRadio:()=>cl,FormSwitch:()=>fl,Forms:()=>Qa,HelpMessage:()=>Hn,IconButton:()=>ve,LegacyAlert:()=>kn,LegacyForm:()=>vg,LegacyFormArrow:()=>yg,LegacyFormCTA:()=>_g,LegacyFormCTAButton:()=>xg,LegacyFormCardSection:()=>Sg,LegacyFormCheckbox:()=>bg,LegacyFormCheckboxRow:()=>Eg,LegacyFormCheckmark:()=>Tg,LegacyFormDivider:()=>$n,LegacyFormHint:()=>wg,LegacyFormIcon:()=>vl,LegacyFormInput:()=>yl,LegacyFormLabel:()=>Ag,LegacyFormRadio:()=>Cg,LegacyFormRadioGroup:()=>Ig,LegacyFormRadioRow:()=>Rg,LegacyFormRow:()=>Xr,LegacyFormSection:()=>ei,LegacyFormSelect:()=>Pg,LegacyFormSliderRow:()=>Ng,LegacyFormSubLabel:()=>Lg,LegacyFormSwitch:()=>Og,LegacyFormSwitchRow:()=>Dg,LegacyFormTernaryCheckBox:()=>Bg,LegacyFormText:()=>Yn,LegacyFormTitle:()=>Mg,PressableScale:()=>ng,RedesignCompat:()=>fg,RowButton:()=>og,SafeAreaProvider:()=>il,SafeAreaView:()=>Vn,SegmentedControl:()=>mg,SegmentedControlPages:()=>dg,Stack:()=>pe,TableCheckbox:()=>lg,TableCheckboxRow:()=>ig,TableRadio:()=>sg,TableRadioGroup:()=>Za,TableRadioRow:()=>xo,TableRow:()=>C,TableRowGroup:()=>Be,TableRowIcon:()=>_o,TableRowTrailingText:()=>ag,TableSwitch:()=>ul,TableSwitchRow:()=>mt,Text:()=>N,TextArea:()=>cg,TextInput:()=>We,TwinButtons:()=>ll,useSafeAreaInsets:()=>sl,useSegmentedControlState:()=>pg});var tg,_r,se,kn,al,Hn,Vn,il,sl,zt,Y,ll,ve,og,ng,C,_o,ag,Be,Za,xo,mt,ig,ul,sg,lg,fl,cl,ug,ye,fg,Gn,Vo,ml,dl,pl,pe,hl,We,cg,mg,dg,pg,hg,gl,Nr,zn,gg,N,Qa,vg,yg,_g,xg,Sg,bg,Eg,Tg,$n,wg,vl,yl,Ag,Cg,Ig,Rg,Xr,ei,Pg,Ng,Lg,Og,Dg,Bg,Yn,Mg,Wn,K=p(()=>{"use strict";s();l();Se();ka();jo();fe();tg=pr(([e],r)=>r[e]&&Object.keys(r).length===1,e=>`bunny.metro.common.components.bySingularProp(${e})`),_r=e=>Ce(()=>Oe(tg(e))?.[e]),se=(...e)=>Ce(()=>F(...e)[e[0]]),kn=Is("FluxContainer(Alert)"),al=P("Looks","Colors","Sizes"),Hn=Ue("HelpMessage"),{SafeAreaView:Vn,SafeAreaProvider:il,useSafeAreaInsets:sl}=G(()=>F("useSafeAreaInsets")),zt=se("ActionSheetRow"),Y=_r("Button"),ll=se("TwinButtons"),ve=_r("IconButton"),og=se("RowButton"),ng=se("PressableScale"),C=se("TableRow"),_o=se("TableRowIcon"),ag=se("TableRowTrailingText"),Be=se("TableRowGroup"),Za=se("TableRadioGroup"),xo=se("TableRadioRow"),mt=se("TableSwitchRow"),ig=se("TableCheckboxRow"),ul=_r("FormSwitch"),sg=_r("FormRadio"),lg=_r("FormCheckbox"),fl=_r("FormSwitch"),cl=_r("FormRadio"),ug=_r("FormCheckbox"),ye=se("Card"),fg=Ce(()=>F("RedesignCompat").RedesignCompat),Gn=se("AlertModal"),Vo=se("AlertActionButton"),ml=se("AlertActions"),dl=_r("AvatarPile"),pl=se("ContextMenu"),pe=se("Stack"),hl=se("default","AvatarSizes","getStatusSize"),We=_r("TextInput"),cg=_r("TextArea"),mg=se("SegmentedControl"),dg=se("SegmentedControlPages"),pg=_r("useSegmentedControlState"),hg=se("CompatSegmentedControl"),gl=se("FloatingActionButton"),Nr=se("ActionSheet"),zn=se("BottomSheetTitleHeader"),gg=P("Text","LegacyText"),N=Ce(()=>gg.Text),Qa=P("Form","FormSection"),{Form:vg,FormArrow:yg,FormCTA:_g,FormCTAButton:xg,FormCardSection:Sg,FormCheckbox:bg,FormCheckboxRow:Eg,FormCheckmark:Tg,FormDivider:$n,FormHint:wg,FormIcon:vl,FormInput:yl,FormLabel:Ag,FormRadio:Cg,FormRadioGroup:Ig,FormRadioRow:Rg,FormRow:Xr,FormSection:ei,FormSelect:Pg,FormSliderRow:Ng,FormSubLabel:Lg,FormSwitch:Og,FormSwitchRow:Dg,FormTernaryCheckBox:Bg,FormText:Yn,FormTitle:Mg}=G(()=>Qa),Wn=se("FlashList")});var oi={};M(oi,{Flux:()=>El,FluxDispatcher:()=>Or,FluxUtils:()=>Tl,NavigationNative:()=>de,React:()=>Xn,ReactNative:()=>ti,assets:()=>_l,channels:()=>Kn,clipboard:()=>Me,commands:()=>So,components:()=>ri,constants:()=>Lr,i18n:()=>Go,invites:()=>xl,messageUtil:()=>xr,navigation:()=>Sl,navigationStack:()=>bl,semver:()=>zo,toasts:()=>qn,tokens:()=>Jr,url:()=>$t,useToken:()=>Fg});var Lr,Kn,Go,$t,Me,_l,xl,So,Sl,qn,xr,bl,de,zo,Jr,Fg,El,Or,Tl,Xn,ti,z=p(()=>{"use strict";s();l();Se();fe();K();Lr=P("Fonts","Permissions"),Kn=P("getVoiceChannelId"),Go=P("Messages"),$t=P("openURL","openDeeplink"),Me=P("setString","getString","hasString"),_l=P("registerAsset"),xl=P("acceptInviteAndTransitionToInviteChannel"),So=P("getBuiltInCommands"),Sl=P("pushLazy"),qn=Ln("modules/toast/native/ToastActionCreators.tsx",!0),xr=P("sendBotMessage"),bl=P("createStackNavigator"),de=P("NavigationContainer"),zo=P("parse","clean"),Jr=P("unsafe_rawColors","colors"),{useToken:Fg}=G(()=>F("useToken")),El=P("connectStores"),Or=F("_interceptors"),Tl=F("useStateFromStores"),Xn=window.React=P("createElement"),ti=window.ReactNative=P("AppRegistry")});var ni={};M(ni,{common:()=>oi,factories:()=>Cn,filters:()=>ys,findAllExports:()=>jt,findAllModule:()=>xs,findAllModuleId:()=>Nh,findByDisplayName:()=>Cs,findByDisplayNameAll:()=>Rs,findByDisplayNameLazy:()=>Is,findByFilePath:()=>Os,findByFilePathLazy:()=>Ln,findByName:()=>ko,findByNameAll:()=>As,findByNameLazy:()=>Ue,findByProps:()=>F,findByPropsAll:()=>ws,findByPropsLazy:()=>P,findByStoreName:()=>Ls,findByStoreNameLazy:()=>go,findByTypeName:()=>Ps,findByTypeNameAll:()=>Ns,findByTypeNameLazy:()=>Mh,findExports:()=>Oe,findModule:()=>_s,findModuleId:()=>Ph,lazy:()=>Es});var He=p(()=>{"use strict";s();l();z();ka();Pn();jo();Nn();fe()});var $o=$r((xb,Vc)=>{s();l();Vc.exports=Ut()["chroma-js"]});function zc(e){var r=(tt="dark")=>(sr.type??tt)==="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:i,value:u,opacity:f}=n;if(i==="raw")t[o]={value:u,opacity:f??1};else{var c=Gc.RawColor[u];t[o]={value:c,opacity:f??1}}}else if(typeof n=="string")n.startsWith("#")?t[o]={value:Yo.default.hex(n).hex(),opacity:1}:t[o]={value:Gc.RawColor[n],opacity:1};else throw new Error(`Invalid semantic definitions: ${n}`);return Jn.Platform.OS==="android"&&ai(e.main.raw),{spec:3,reference:r(e.type),semantic:t,raw:e.main.raw??{},background:e.main.background}}if(e.spec===2){var S={},h=e.background?{...bn(e.background,["alpha"]),opacity:e.background.alpha}:void 0;if(e.semanticColors)for(var E in e.semanticColors){var A=e.semanticColors[E].map(tt=>tt||void 0).slice(0,2);A[0]&&(S[E]={value:Zn(A[r()==="light"?1:0]),opacity:1})}if(e.rawColors){var O={};for(var re in e.rawColors){var he=e.rawColors[re];he&&(O[re]=Zn(he))}Jn.Platform.OS==="android"&&ai(O),e.rawColors=O}return{spec:2,reference:r(),semantic:S,raw:e.rawColors??{},background:h}}throw new Error("Invalid theme spec")}function ai(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]=(0,Yo.default)(e[o]).alpha(n).hex())}return e}}function Zn(e){if(e!==void 0){if(Yo.default.valid(e))return(0,Yo.default)(e).hex();var r=Number((0,Jn.processColor)(e));return Yo.default.rgb(r>>16&255,r>>8&255,r&255,r>>24&255).hex()}}var Yo,Jn,Gc,wl=p(()=>{"use strict";s();l();He();Yo=U($o());Mo();Jn=U(J());Un();Gc=F("SemanticColor")});function Wt(e,{update:r=!0}){if(!L.safeMode?.enabled){var t=e?zc(e):null,o=Object.assign(ee,{current:t,key:`bn-theme-${++Kc}`,lastSetDiscordTheme:Yc.theme.startsWith("bn-theme-")?ee.lastSetDiscordTheme:Yc.theme});t!=null&&(Yt.Theme[o.key.toUpperCase()]=o.key,Wc.DIVIDER_COLORS[o.key]=Wc.DIVIDER_COLORS[o.current.reference],Object.keys(Yt.Shadow).forEach(n=>Yt.Shadow[n][o.key]=Yt.Shadow[n][o.current.reference]),Object.keys(Yt.SemanticColor).forEach(n=>{Yt.SemanticColor[n][o.key]={...Yt.SemanticColor[n][o.current.reference]}})),r&&($c.setShouldSyncAppearanceSettings(!1),$c.updateTheme(t!=null?o.key:o.lastSetDiscordTheme))}}var Yt,jg,$c,Yc,Wc,Kc,ee,bo=p(()=>{"use strict";s();l();Ee();He();wl();Yt=F("SemanticColor"),jg={...Yt.RawColor},$c=P("updateTheme"),Yc=go("ThemeStore"),Wc=P("DIVIDER_COLORS"),Kc=1,ee={current:null,key:`bn-theme-${Kc}`,origRaw:jg,lastSetDiscordTheme:"darker"}});function kg({children:e}){return ut([sr]),!ee.current||sr.customBackground==="hidden"||!ee.current.background?.url||ee.current.background?.blur&&typeof ee.current.background?.blur!="number"?e:a(Qn.ImageBackground,{style:{flex:1,height:"100%"},source:{uri:ee.current.background?.url},blurRadius:ee.current.background?.blur,children:e})}function Al(){var e=[Q("render",Ug,(r,t)=>{if(!(!ee.current||!ee.current.background?.url)){var o=vr(t,u=>u&&"HACK_fixModalInteraction"in u.props&&u?.props?.style);if(o){var n=Qn.StyleSheet.flatten(o.props.style),i=(0,qc.default)(n.backgroundColor||"black").alpha(1-(ee.current.background?.opacity??1)).hex();o.props.style=Qn.StyleSheet.flatten([o.props.style,{backgroundColor:i}])}return a(kg,{children:t})}})];return()=>e.forEach(r=>r())}var qc,Qn,Ug,Xc=p(()=>{"use strict";s();l();V();Un();bo();Le();qr();ir();He();qc=U($o()),Qn=U(J()),Ug=Ln("components_native/chat/Messages.tsx",!0)});function Il(){var e=([t])=>t===ee.key?[ee.current.reference]:void 0;Object.keys(Wo.RawColor).forEach(t=>{Object.defineProperty(Wo.RawColor,t,{configurable:!0,enumerable:!0,get:()=>{var o=ee.current?.raw[t];return o||ee.origRaw[t]}})});var r=[Nt("isThemeDark",Jc,e),Nt("isThemeLight",Jc,e),Nt("updateTheme",es,e),Lt("resolveSemanticColor",Wo.default.meta??Wo.default.internal,(t,o)=>{if(!ee.current)return o(...t);if(t[0]!==ee.key)return o(...t);t[0]=ee.current.reference;var[n,i]=Qc(ee.current.reference,t[1]),u=ee.current.semantic[n];if(!u&&ee.current.spec===2&&n in Zc&&(u=ee.current.semantic[Zc[n]]),u?.value)return u.opacity===1?u.value:(0,Cl.default)(u.value).alpha(u.opacity).hex();var f=ee.current.raw[i.raw];return f?i.opacity===1?f:(0,Cl.default)(f).alpha(i.opacity).hex():o(...t)}),()=>{Object.defineProperty(Wo,"RawColor",{configurable:!0,writable:!0,value:ee.origRaw})}];return()=>r.forEach(t=>t())}function Qc(e,r){var t=r[Qc._sym??=Object.getOwnPropertySymbols(r)[0]],o=Wo.SemanticColor[t];return[t,o[e]]}var Cl,Wo,Jc,Zc,em=p(()=>{"use strict";s();l();bo();Tr();Le();He();Pn();Nn();Cl=U($o()),Wo=F("SemanticColor"),Jc=Wr(Rn("isThemeDark")),Zc={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 Rl(){var e=new Set(["ThemeStore","SelectivelySyncedUserSettingsStore"]),r=[Q("get",rm,([t],o)=>{if(!(!ee.current||!e.has(t))){var n=ft(o._state,i=>typeof i.theme=="string");n&&(n.theme=ee.key)}}),Nt("set",rm,([t,o])=>{if(e.has(t)){var n=JSON.stringify(o),i=ee.lastSetDiscordTheme??"darker",u=n.replace(/"theme":"bn-theme-\d+"/,`"theme":${JSON.stringify(i)}`);return[t,JSON.parse(u)]}})];return()=>r.forEach(t=>t())}var rm,tm=p(()=>{"use strict";s();l();bo();Le();ir();Se();He();rm=Ce(()=>{var e=F("impl");return typeof e?.impl=="object"?e.impl:F("storage")})});function Pl(e){var r=[Rl(),Il(),Al()];return e&&Wt(e,{update:!1}),()=>r.forEach(t=>t())}var om=p(()=>{"use strict";s();l();Xc();em();tm();bo()});var wo={};M(wo,{fetchTheme:()=>Eo,getCurrentTheme:()=>ht,getThemeFromLoader:()=>Kt,initThemes:()=>Fl,installTheme:()=>dt,removeTheme:()=>To,selectTheme:()=>pt,themes:()=>le,updateThemes:()=>ii,writeThemeToNative:()=>Ko});function Ko(e){return Nl.apply(this,arguments)}function Nl(){return Nl=x(function*(e){if(typeof e!="object")throw new Error("Theme must be an object");yield vo(am()||"theme.json").set(e)}),Nl.apply(this,arguments)}function Hg(e){if(e.semanticColors){var{semanticColors:r}=e;for(var t in r)for(var o in r[t])r[t][o]&&=Zn(r[t][o])||!1}if(e.rawColors){var{rawColors:n}=e;for(var i in n){var u=Zn(n[i]);u&&(e.rawColors[i]=u)}nm.Platform.OS==="android"&&ai(n)}return e.spec??=2,e}function Vg(e){return!(typeof e!="object"||e===null||e.spec!==2&&e.spec!==3||e.spec===3&&!e.main)}function Eo(e){return Ll.apply(this,arguments)}function Ll(){return Ll=x(function*(e,r=!1){var t;try{t=yield(yield Ye(e,{cache:"no-store"})).json()}catch{throw new Error(`Failed to fetch theme at ${e}`)}if(!Vg(t))throw new Error(`Invalid theme at ${e}`);le[e]={id:e,selected:r,data:Hg(t)},r&&(Ko(le[e]),Wt(le[e].data,{update:!0}))}),Ll.apply(this,arguments)}function dt(e){return Ol.apply(this,arguments)}function Ol(){return Ol=x(function*(e){if(typeof e!="string"||e in le)throw new Error("Theme already installed");yield Eo(e)}),Ol.apply(this,arguments)}function pt(e,r=!0){if(e&&(e.selected=!0),Object.keys(le).forEach(t=>le[t].selected=le[t].id===e?.id),e==null&&r)return Wt(null,{update:!0}),Ko({});if(e)return Wt(e.data,{update:!0}),Ko(e)}function To(e){return Dl.apply(this,arguments)}function Dl(){return Dl=x(function*(e){var r=le[e];return r.selected&&(yield pt(null)),delete le[e],r.selected}),Dl.apply(this,arguments)}function ii(){return Bl.apply(this,arguments)}function Bl(){return Bl=x(function*(){yield kt(le);var e=Kt();yield m(Object.keys(le).map(r=>Eo(r,e?.id===r)))}),Bl.apply(this,arguments)}function ht(){return Object.values(le).find(e=>e.selected)??null}function Kt(){return si()}function Fl(){return Ml.apply(this,arguments)}function Ml(){return Ml=x(function*(){if(Dr())try{Ie()&&wr("../vendetta_theme.json","null"),yield Ho(sr);var e=Kt();Pl(e?.data??null),ii().catch(r=>console.error("Failed to update themes",r))}catch(r){console.error("Failed to initialize themes",r)}}),Ml.apply(this,arguments)}var nm,le,lr=p(()=>{"use strict";s();l();me();be();Ct();gt();qr();ir();nm=U(J());om();wl();Un();bo();le=Ir(ar(Rr("VENDETTA_THEMES")))});function Xe(){return Zr!=null}function Ie(){return vt!=null}function Gg(){if(!Ie()||Xe())return null;var e={name:vt.loaderName,features:{}};return kl()&&(e.features.loaderConfig=!0),um()&&(e.features.syscolors={prop:"__vendetta_syscolors"},Object.defineProperty(globalThis,"__vendetta_syscolors",{get:()=>zg(),configurable:!0})),Dr()&&(e.features.themes={prop:"__vendetta_theme"},Object.defineProperty(globalThis,"__vendetta_theme",{get:()=>{var r=si()?.id;if(!r)return null;var{themes:t}=(lr(),ze(wo));return t[r]??si()??null},configurable:!0})),Object.defineProperty(globalThis,"__vendetta_loader",{get:()=>e,configurable:!0}),e}function jl(){return globalThis.__vendetta_loader?globalThis.__vendetta_loader:Gg()}function Ul(){return Ie()?vt.loaderName:Xe()?Zr.name:"Unknown"}function im(){return Ie()?vt.loaderVersion:null}function kl(){return Ie()?!0:Xe()?Zr.features.loaderConfig:!1}function Dr(){return Ie()?vt.hasThemeSupport:Xe()?Zr.features.themes!=null:!1}function si(){if(Ie())return vt.storedTheme;if(Xe()){var e=Zr.features.themes?.prop;return e&&globalThis[e]||null}return null}function am(){return Ie()?"pyoncord/current-theme.json":Xe()?"vendetta_theme.json":null}function ea(){return Ie()?!!window.__reactDevTools:Xe()?Zr.features.devtools!=null:!1}function sm(){return ea()?Ie()?(window.__pyoncord_rdt=window.__reactDevTools.exports,"__pyoncord_rdt"):Xe()?Zr.features.devtools.prop:null:null}function lm(){return ea()?Ie()?window.__reactDevTools.version||null:Xe()?Zr.features.devtools.version:null:null}function um(){return Ie()?vt.isSysColorsSupported:Xe()?Zr.features.syscolors!=null:!1}function zg(){return um()?Ie()?vt.sysColors:Xe()?Zr.features.syscolors.prop:null:null}function fm(){return Ie()?"pyoncord/loader.json":Xe()?"vendetta_loader.json":"loader.json"}function cm(){return Ie()?vt.fontPatch===2:!1}var vt,Zr,gt=p(()=>{"use strict";s();l();vt=globalThis.__PYON_LOADER__,Zr=globalThis.__vendetta_loader;jl()});var li={};M(li,{loaderConfig:()=>Sr,settings:()=>L});var L,Sr,Ee=p(()=>{"use strict";s();l();be();gt();L=Ir(ar(Rr("VENDETTA_SETTINGS"))),Sr=Ir(ar(vo(fm(),{customLoadUrl:{enabled:!1,url:"http://localhost:4040/bunny.js"}})))});var zl={};M(zl,{default:()=>$g});var mm,pm,Hl,Gl,qo,Vl,yt,dm,ra,$g,$l=p(()=>{"use strict";s();l();Dt();mm=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"]),pm={},Hl={},Gl=Yl("redesign_module");for([dm,ra]of Gl.getModules())for(yt of mm){if(qo=void 0,ra[yt])qo=ra;else if(ra.default?.[yt])qo=ra.default;else continue;Vl=Reflect.ownKeys(qo).length,!(Hl[yt]&&Vl>=Hl[yt])&&(pm[yt]=qo[yt],Hl[yt]=Reflect.ownKeys(qo).length,Gl.cacheId(dm),Vl===1&&mm.delete(yt))}Gl.finish();$g=pm});var ql={};M(ql,{getCachedPolyfillModules:()=>Jg,getImportingModuleId:()=>ds,getModules:()=>Ga,metroModules:()=>je,requireModule:()=>hr,subscribeModule:()=>Ts});function fi(e){Object.defineProperty(je,e,{enumerable:!1}),_m.add(e),Jl(Number(e))}function ta(e){return!e||e===window||e["<!@ pylix was here :fuyusquish: !@>"]===null||e.__proto__===Object.prototype&&Reflect.ownKeys(e).length===0||e.default?.[Symbol.toStringTag]==="IntlMessagesProxy"}function Xg(e,r){if(Xl(r,e),e.initSentry&&=()=>{},e.default?.track&&e.default.trackMaker&&(e.default.track=()=>Promise.resolve()),e.registerAsset&&(ms(),ze(sc)).patchAssets(e),!vm&&["customBubblingEventTypes","customDirectEventTypes","register","get"].every(u=>e[u])&&(Kl("register",e,([u,f],c)=>{try{return c(u,f)}catch{return u}}),vm=!0),e?.default?.constructor?.displayName==="DeveloperExperimentStore"&&(e.default=new Proxy(e.default,{get(u,f,c){if(f==="isDeveloper"){var{settings:S}=(Ee(),ze(li));return S.enableDiscordDeveloperSettings??!1}return Reflect.get(u,f,c)}})),!gm&&e.fileFinishedImporting&&(Wg("fileFinishedImporting",e,([u])=>{Xo===-1||!u||(je[Xo].__filePath=u)}),gm=!0),!hm&&window["__core-js_shared__"]){var t=u=>typeof u=="function"&&qg.apply(u,[]);window["__core-js_shared__"].inspectSource=t,hm=!0}if(e.findHostInstance_DEPRECATED){var o=je[r-1]?.publicModule.exports,n=o.default?.reactProfilingEnabled?1:-1;je[r+n]?.isInitialized||fi(r+n)}e.isMoment&&Kl("defineLocale",e,(u,f)=>{var c=e.locale();f(...u),e.locale(c)});var i=ui.get(Number(r));i&&(i.forEach(u=>u()),ui.delete(Number(r)))}function ds(){return Xo}function Ts(e,r){var t=ui.get(e)??new Set;return t.add(r),ui.set(e,t),()=>t.delete(r)}function hr(e){if(je[0]?.isInitialized||Wl(0),!_m.has(e)){if(Number(e)===-1)return $l(),ze(zl);if(je[e]?.isInitialized&&!je[e]?.hasError)return Wl(e);var r=ErrorUtils.getGlobalHandler();ErrorUtils.setGlobalHandler(Kg);var t;try{t=Wl(e)}catch{fi(e),t=void 0}return ErrorUtils.setGlobalHandler(r),t}}function*Ga(e,r=!1){yield[-1,($l(),ze(zl))];var t=st().findIndex[e];if(r&&!t?.[`_${Yr.FULL_LOOKUP}`]&&(t=void 0),!t?.[`_${Yr.NOT_FOUND}`]){for(var o in t)if(o[0]!=="_"){var n=hr(Number(o));ta(n)||(yield[o,n])}for(var i in je){var u=hr(Number(i));ta(u)||(yield[i,u])}}}function*Jg(e){var r=st().polyfillIndex[e];for(var t in r){var o=hr(Number(t));ta(o)||(yield[t,o])}if(!r[`_${Yr.FULL_LOOKUP}`])for(var n in je){var i=hr(Number(n));ta(i)||(yield[n,i])}}var Yg,Wg,Kl,je,Wl,ui,_m,Kg,qg,hm,gm,vm,Xo,ym,Ot=p(()=>{"use strict";s();l();Dt();ja();Yg=function(e){var r=Number(e),t=je[r],o=st().flagsIndex[r];if(o&Ar.BLACKLISTED)return fi(r),"continue";t.factory&&Kl("factory",t,(n,i)=>{var u=Xo;Xo=r;var{1:f,4:c}=n;n[2]=S=>{var h=f(S);return h&&h.__esModule?h.default:h},n[3]=S=>{var h=f(S);if(h&&h.__esModule)return h;var E={};return h&&Object.assign(E,h),E.default=h,E},i(...n),ta(c.exports)?fi(r):Xg(c.exports,r),Xo=u})},{before:Wg,instead:Kl}=La(),je=window.modules,Wl=e=>window.__r(+e),ui=new Map,_m=new Set,Kg=()=>{},qg=Function.prototype.toString,hm=!1,gm=!1,vm=!1,Xo=-1;for(ym in je)Yg(ym)});var Em={};M(Em,{getCacherForUniq:()=>za,getMetroCache:()=>st,getPolyfillModuleCacher:()=>Yl,indexAssetModuleFlag:()=>ps,indexBlacklistFlag:()=>Jl,indexExportsFlags:()=>Xl,initMetroCache:()=>Zg});function xm(){var e={_v:Sm,_buildNumber:uo.Build,_modulesCount:Object.keys(window.modules).length,flagsIndex:{},findIndex:{},polyfillIndex:{}};return setTimeout(()=>{for(var r in window.modules)(Ot(),ze(ql)).requireModule(r)},100),Ke=e,e}function Zg(){return Ql.apply(this,arguments)}function Ql(){return Ql=x(function*(){if(!(yield it(Zl)))return void xm();var e=yield mo(Zl);try{if(Ke=JSON.parse(e),Ke._v!==Sm)throw Ke=null,"cache invalidated; cache version outdated";if(Ke._buildNumber!==uo.Build)throw Ke=null,"cache invalidated; version mismatch";if(Ke._modulesCount!==Object.keys(window.modules).length)throw Ke=null,"cache invalidated; modules count mismatch"}catch{xm()}}),Ql.apply(this,arguments)}function bm(e){if(e){var r=Ar.EXISTS;return r}}function Xl(e,r){var t=bm(r);t&&t!==Ar.EXISTS&&(Ke.flagsIndex[e]=t)}function Jl(e){Ke.flagsIndex[e]|=Ar.BLACKLISTED}function ps(e){Ke.flagsIndex[e]|=Ar.ASSET}function za(e,r){var t=Ke.findIndex[e]??={};return{cacheId(o,n){t[o]??=bm(n),ci()},finish(o){r&&(t[`_${Yr.FULL_LOOKUP}`]=1),o&&(t[`_${Yr.NOT_FOUND}`]=1),ci()}}}function Yl(e){var r=Ke.polyfillIndex[e]??={};return{getModules(){return(Ot(),ze(ql)).getCachedPolyfillModules(e)},cacheId(t){r[t]=1,ci()},finish(){r[`_${Yr.FULL_LOOKUP}`]=1,ci()}}}var Sm,Zl,Ke,st,ci,Dt=p(()=>{"use strict";s();l();me();Ct();Tr();Mo();ja();Sm=102,Zl="caches/metro_modules.json",Ke=null,st=()=>Ke;ci=Sn(()=>{wr(Zl,JSON.stringify(Ke))},1e3)});function mi(e){return"componentStack"in e&&typeof e.componentStack=="string"}function di(e){return!!e.stack}var eu=p(()=>{"use strict";s();l()});var pi={};M(pi,{filterAssets:()=>Qg,findAsset:()=>Jo,findAssetId:()=>y,iterateAssets:()=>qt});function*qt(){var{flagsIndex:e}=st(),r=new Set;for(var t in e)if(e[t]&Ar.ASSET){var o=hr(Number(t));if(typeof o!="number"||r.has(o))continue;yield Tm(o),r.add(o)}}function Tm(e){var r=Fo.getAssetByID(e);return r&&Object.assign(r,{id:e})}function Jo(e){if(typeof e=="number")return Tm(e);if(typeof e=="string"&&ru[e])return ru[e];for(var r of qt()){if(typeof e=="string"&&r.name===e)return ru[e]=r,r;if(typeof e=="function"&&e(r))return r}}function Qg(e){var r=[];for(var t of qt())(typeof e=="string"?t.name===e:e(t))&&r.push(t);return r}function y(e){return Jo(e)?.id}var ru,ue=p(()=>{"use strict";s();l();Dt();ja();Ot();ms();ru={}});var Am,wm=p(()=>{Am={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}?",ASSET_BROWSER:"Asset Browser",BRAND:"Brand",BUNNY:"Bunny",BUNNY_URL:"Bunny URL",BYTECODE:"Bytecode",CANCEL:"Cancel",CLEAR:"Clear",CLEAR_DATA:"Clear data",CLEAR_DATA_FAILED:"Failed to clear data for {name}!",CLEAR_DATA_SUCCESSFUL:"Cleared data for {name}.",CODENAME:"Codename",COMMAND_DEBUG_DESC:"Send Bunny 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.",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",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 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 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 Bunny from a custom endpoint.",LOAD_REACT_DEVTOOLS:"Load React DevTools",LOADER:"Loader",MACHINE_ID:"Machine ID",MANUFACTURER:"Manufacturer",MESSAGE:"Message",MISCELLANEOUS:"Miscellaneous",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 staffs. 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:"Reload Discord",RELOAD_IN_NORMAL_MODE:"Reload in Normal Mode",RELOAD_IN_NORMAL_MODE_DESC:"This will reload Discord normally",RELOAD_IN_SAFE_MODE:"Reload in Safe Mode",RELOAD_IN_SAFE_MODE_DESC:"This will 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. We are not responsible for what you do with this feature.",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://example.com",VERSION:"Version",VERSIONS:"Versions"}});function Rm(){var e=({locale:r})=>{var t={"es-ES":"es","es-419":"es_419","zh-TW":"zh-Hant","zh-CN":"zh-Hans","pt-PT":"pt","pt-BR":"pt_BR","sv-SE":"sv"},o=Cm=t[r]??r;if(o.startsWith("en-")){Zo=null;return}Im.has(o)?Zo=o:(Im.add(o),fetch(`https://raw.githubusercontent.com/pyoncord/i18n/main/resources/${o}/bunny.json`).then(n=>n.json()).then(n=>tu[o]=n).then(()=>o===Cm&&(Zo=o)).catch(n=>console.error(`An error occured while fetching strings for ${o}: ${n}`)))};return Or.subscribe("I18N_LOAD_SUCCESS",e),()=>Or.unsubscribe("I18N_LOAD_SUCCESS",e)}function ur(e,r){var t=g[e];return new rv(t).format(r)}var rv,Zo,Cm,Im,tu,g,xe=p(()=>{"use strict";s();l();z();fe();wm();rv=Ue("MessageFormat"),Zo=null,Cm=null,Im=new Set,tu={},g=new Proxy({},{get:(e,r)=>Zo&&tu[Zo]?.[r]?tu[Zo]?.[r]:Am[r]})});var hi={};M(hi,{showToast:()=>$});var tv,$,Br=p(()=>{"use strict";s();l();xe();ue();Se();z();fe();({uuid4:tv}=G(()=>F("uuid4"))),$=(e,r)=>qn.open({key:`vd-toast-${tv()}`,content:e,source:r,icon:r});$.showCopyToClipboard=(e=g.COPIED_TO_CLIPBOARD)=>{$(e,y("toast_copy_link"))}});var vi={};M(vi,{connectToDebugger:()=>na,getDebugInfo:()=>Fr,patchLogHook:()=>au,toggleSafeMode:()=>nu,versionHash:()=>oa});function nu(){return ou.apply(this,arguments)}function ou(){return ou=x(function*(){L.safeMode={...L.safeMode,enabled:!L.safeMode?.enabled},Dr()&&(Kt()?.id&&(L.safeMode.currentThemeId=Kt().id),L.safeMode?.enabled?yield pt(null):L.safeMode?.currentThemeId&&(yield pt(le[L.safeMode?.currentThemeId]))),setTimeout(dr.reload,400)}),ou.apply(this,arguments)}function na(e){if(Mr!==void 0&&Mr.readyState!==WebSocket.CLOSED&&Mr.close(),!e){$("Invalid debugger URL!",y("Small"));return}Mr=new WebSocket(`ws://${e}`),Mr.addEventListener("open",()=>$("Connected to debugger.",y("Check"))),Mr.addEventListener("message",r=>{try{(0,eval)(r.data)}catch(t){console.error(t)}}),Mr.addEventListener("error",r=>{console.log(`Debugger error: ${r.message}`),$("An error occurred with the debugger connection!",y("Small"))})}function au(){var e=Q("nativeLoggingHook",globalThis,r=>{Mr?.readyState===WebSocket.OPEN&&Mr.send(JSON.stringify({message:r[0],level:r[1]})),ke.log(r[0])});return()=>{Mr&&Mr.close(),e()}}function Fr(){var e=window.HermesInternal.getRuntimeProperties(),r=e["OSS Release Version"],t="for RN ",o=gi.Platform.constants,n=o.reactNativeVersion;return{vendetta:{version:oa.split("-")[0],loader:Ul()},bunny:{version:oa,loader:{name:Ul(),version:im()}},discord:{version:uo.Version,build:uo.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"]},...gi.Platform.select({android:{os:{name:"Android",version:o.Release,sdk:o.Version}},ios:{os:{name:o.systemName,version:o.osVersion}}}),...gi.Platform.select({android:{device:{manufacturer:o.Manufacturer,brand:o.Brand,model:o.Model,codename:fo.device}},ios:{device:{manufacturer:fo.deviceManufacturer,brand:fo.deviceBrand,model:fo.deviceModel,codename:fo.device}}})}}var gi,Mr,oa,_t=p(()=>{"use strict";s();l();me();lr();ue();gt();Tr();Le();Ee();ct();Br();gi=U(J());oa="e2a05a7-main"});function su(e){var r=Os("modules/forwarding/native/ForwardFailedAlertModal.tsx");return!r&&"extraContent"in e&&(e.content=_(iu.View,{style:{gap:16},children:[a(N,{variant:"text-md/medium",color:"text-muted",children:e.content}),a(iu.View,{children:e.extraContent})]}),delete e.extraContent),a(ov,{...e})}var iu,ov,nv,Pm,Nm=p(()=>{"use strict";s();l();V();Se();He();K();iu=U(J()),{AlertModal:ov,AlertActionButton:nv}=G(()=>F("AlertModal","AlertActions")),Pm=nv});var lu={};M(lu,{AlertActionButton:()=>Pm,AlertModal:()=>su});var Lm=p(()=>{"use strict";s();l();Nm()});function Bm(e){return Dm.isSemanticColor(e)}function Mm(e,r=av.theme){return Dm.resolveSemanticColor(r,e)}var yi,Je,Om,av,Dm,Qo=p(()=>{"use strict";s();l();z();fe();yi=F("SemanticColor"),Je=yi?.default?.colors??Lr?.ThemeColorMap,Om=yi?.default?.unsafe_rawColors??Lr?.Colors,av=go("ThemeStore"),Dm=yi.default.meta??=yi.default.internal});var cu={};M(cu,{TextStyleSheet:()=>xt,ThemeContext:()=>uu,createLegacyClassComponentStyles:()=>sv,createStyles:()=>jr,createThemedStyleSheet:()=>fu});function jr(e){return Ce(()=>jm.createStyles(e))}function sv(e){return Ce(()=>jm.createLegacyClassComponentStyles(e))}function fu(e){for(var r in e)e[r]=new Proxy(Fm.StyleSheet.flatten(e[r]),{get(t,o,n){var i=Reflect.get(t,o,n);return Bm(i)?Mm(i):i}});return e}var Fm,jm,uu,xt,Qr=p(()=>{"use strict";s();l();Se();fe();Qo();Fm=U(J()),jm=P("createStyles"),{ThemeContext:uu}=G(()=>F("ThemeContext"),{hint:"object"}),{TextStyleSheet:xt}=G(()=>F("TextStyleSheet"))});function Ur({selectable:e,style:r,children:t}){return e?en.Platform.select({ios:a(lv,{style:r,children:t}),default:a(Um,{style:r,children:t,selectable:!0})}):a(Um,{style:r,children:t})}var en,km,lv,Um,Hm=p(()=>{"use strict";s();l();V();z();Qo();Qr();en=U(J()),km=jr({codeBlock:{fontFamily:Lr.Fonts.CODE_NORMAL,fontSize:12,textAlignVertical:"center",backgroundColor:Je.BACKGROUND_SECONDARY,color:Je.TEXT_NORMAL,borderWidth:1,borderRadius:12,borderColor:Je.BACKGROUND_TERTIARY,padding:10}}),lv=({style:e,children:r})=>a(en.TextInput,{editable:!1,multiline:!0,style:[km().codeBlock,e&&e],value:r}),Um=({selectable:e,style:r,children:t})=>a(en.Text,{selectable:e,style:[km().codeBlock,r&&r],children:t})});var mu={};M(mu,{hideSheet:()=>Xt,showSheet:()=>Ao});function Ao(e,r,t){"then"in r||(r=Promise.resolve({default:r})),Vm.openLazy(r,e,t??{})}function Xt(e){Vm.hideActionSheet(e)}var Vm,Co=p(()=>{"use strict";s();l();fe();Vm=P("openLazy","hideActionSheet")});function Gm(e){return e.split(/[\s|\n]+?in /).filter(Boolean)}var zm=p(()=>{"use strict";s();l()});var kr=$r((iw,$m)=>{s();l();$m.exports=Ut().react});function aa(e){var[r,t]=(0,Ym.useState)(!0),o;try{o=Gm(e.componentStack),o=r?o.slice(0,4):o}catch{return}return a(ye,{children:_(Io.View,{style:{gap:8},children:[a(N,{variant:"heading-lg/bold",children:"Component Stack"}),a(Io.View,{style:{gap:4},children:o.map(n=>_(Io.View,{style:{flexDirection:"row"},children:[a(N,{variant:"text-md/bold",color:"text-muted",children:"<"}),a(N,{variant:"text-md/bold",children:n}),a(N,{variant:"text-md/bold",color:"text-muted",children:"/>"})]}))}),r&&a(N,{children:"..."}),_(Io.View,{style:{gap:8,flexDirection:"row",justifyContent:"center",alignItems:"center"},children:[a(Y,{variant:"secondary",text:`Show ${r?"more":"less"}`,icon:r?y("down_arrow"):a(Io.Image,{style:{transform:[{rotate:`${r?0:180}deg`}]},source:y("down_arrow")}),onPress:()=>t(n=>!n)}),a(Y,{variant:"secondary",text:"Copy",icon:y("CopyIcon"),onPress:()=>Me.setString(e.componentStack)})]})]})})}var Ym,Io,du=p(()=>{"use strict";s();l();V();zm();ue();z();K();Ym=U(kr()),Io=U(J())});function mv(e){return e==="InternalBytecode.js"}function dv(e){var r=e.match(uv);if(r)return{type:"FRAME",functionName:r[1],location:r[2]==="native"?{type:"NATIVE"}:r[3]==="address at "?mv(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(fv);if(t)return{type:"SKIPPED",count:Number.parseInt(t[1],10)}}function pv(e){for(var r=e.split(/\n/),t=[],o=-1,n=0;n<r.length;++n){var i=r[n];if(i){var u=dv(i);if(u){t.push(u);continue}cv.test(i)||(o=n,t=[])}}var f=r.slice(0,o+1).join(`
`);return{message:f,entries:t}}function hv(e){var r=[];for(var t of e.entries)if(t.type==="FRAME"){var{location:o,functionName:n}=t;o.type==="NATIVE"||o.type==="INTERNAL_BYTECODE"||r.push({methodName:n,file:o.sourceUrl,lineNumber:o.line1Based,column:o.type==="SOURCE"?o.column1Based-1:o.virtualOffset0Based})}return r}function pu(e){if(e==null)return[];var r=Array.isArray(e)?e:hv(pv(e));return r}var uv,fv,cv,Wm=p(()=>{"use strict";s();l();uv=/^ {4}at (.+?)(?: \((native)\)?| \((address at )?(.*?):(\d+):(\d+)\))$/,fv=/^ {4}... skipping (\d+) frames$/,cv=/^ {4}at .*$/});function ia(e){var[r,t]=(0,hu.useState)(!0),o;try{var n=pu(e.error.stack);o=r?n.slice(0,4):n}catch{return null}return a(ye,{children:_(Jt.View,{style:{gap:12},children:[a(N,{variant:"heading-lg/bold",children:"Call Stack"}),a(Jt.View,{style:{gap:4},children:o.map((i,u)=>a(gv,{id:u,frame:i}))}),r&&a(N,{children:"..."}),_(Jt.View,{style:{gap:8,flexDirection:"row",justifyContent:"center",alignItems:"center"},children:[a(Y,{variant:"secondary",text:`Show ${r?"more":"less"}`,icon:r?y("down_arrow"):a(Jt.Image,{style:{transform:[{rotate:`${r?0:180}deg`}]},source:y("down_arrow")}),onPress:()=>t(i=>!i)}),a(Y,{variant:"secondary",text:"Copy",icon:y("CopyIcon"),onPress:()=>Me.setString(e.error.stack)})]})]})})}function gv(e){var[r,t]=(0,hu.useState)(!0);return _(Jt.Pressable,{onPress:()=>t(o=>!o),children:[a(N,{style:{fontFamily:Lr.Fonts.CODE_BOLD},children:e.frame.methodName}),a(N,{style:{fontFamily:Lr.Fonts.CODE_NORMAL},ellipsizeMode:"middle",numberOfLines:r?1:void 0,children:_(N,{color:"text-muted",children:[e.frame.file===Km?"jsbundle":e.frame.file,":",e.frame.lineNumber,":",e.frame.column]})})]},e.id)}var hu,Jt,gu=p(()=>{"use strict";s();l();V();Wm();ue();z();K();hu=U(kr()),Jt=U(J());vu()});function yu(e){return a(Nr,{children:_(qm.View,{style:{gap:12,paddingVertical:12},children:[a(N,{variant:"heading-lg/extrabold",children:"Error"}),a(Ur,{selectable:!0,children:e.error.message}),di(e.error)&&a(ia,{error:e.error}),mi(e.error)?a(aa,{componentStack:e.error.componentStack}):null]})})}var qm,Xm=p(()=>{"use strict";s();l();V();eu();br();K();qm=U(J());du();gu()});function _u(e){return a(ye,{children:_(pe,{children:[e.header&&typeof e.header!="string"?e.header:a(N,{variant:"heading-lg/bold",children:e.header??g.UH_OH}),a(Ur,{selectable:!0,children:String(e.error)}),_(ll,{children:[e.onRetryRender&&a(Y,{variant:"destructive",text:g.RETRY_RENDER,onPress:e.onRetryRender}),e.error instanceof Error?a(Y,{text:"Details",onPress:()=>Ao("BunnyErrorDetailsActionSheet",yu,{error:e.error})}):null]})]})})}var Km,vu=p(()=>{"use strict";s();l();V();xe();br();Co();K();Xm();Km=window.HermesInternal.getFunctionLocation(window.__r).fileName});var vv,_e,xu=p(()=>{"use strict";s();l();Oa();_n();wn();hs();Ba();V();vu();z();Qr();_e=function(e){"use strict";Pt(r,e);function r(t){nr(this,r);var o;return o=It(this,r,[t]),o.state={hasErr:!1},o}return Cr(r,[{key:"render",value:function(){return this.state.hasErr?a(_u,{error:this.state.error,onRetryRender:()=>this.setState({hasErr:!1})}):this.props.children}}]),r}(vv=Xn.Component);An(_e,"contextType",uu);An(_e,"getDerivedStateFromError",e=>({hasErr:!0,error:e}))});function yv(){return a(_i.Image,{style:{width:16,height:16},source:y("search")})}var _i,Zt,Jm=p(()=>{"use strict";s();l();V();xe();ue();K();xu();_i=U(J());Zt=({onChangeText:e,placeholder:r,style:t,isRound:o})=>{var[n,i]=React.useState(""),u=f=>{i(f),e?.(f)};return a(_e,{children:a(_i.View,{style:t,children:a(We,{grow:!0,isClearable:!0,leadingIcon:yv,placeholder:r??g.SEARCH,onChange:u,returnKeyType:"search",size:"md",autoCapitalize:"none",autoCorrect:!1,isRound:o,value:n})})})}});function la({label:e,icon:r,noPadding:t=!1,noAnimation:o=!1,children:n}){var[i,u]=React.useState(!0);return _(yr,{children:[a(C,{label:e,icon:r&&a(C.Icon,{source:y(r)}),trailing:a(Xr.Arrow,{style:{transform:[{rotate:`${i?180:90}deg`}]}}),onPress:()=>{u(!i),o||sa.LayoutAnimation.configureNext(sa.LayoutAnimation.Presets.easeInEaseOut)}}),!i&&a(yr,{children:a(sa.View,{style:!t&&{paddingHorizontal:15},children:n})})]})}var sa,Zm=p(()=>{"use strict";s();l();V();ue();K();sa=U(J())});var xi={};M(xi,{Codeblock:()=>Ur,ErrorBoundary:()=>_e,Search:()=>Zt,Summary:()=>la,wrappers:()=>lu});var br=p(()=>{"use strict";s();l();Lm();Hm();xu();Jm();Zm()});function Su(e){var r=_v(),t=Fr();return a(_e,{children:a(il,{children:_(Vn,{style:r.container,children:[_(Si.View,{style:{gap:4},children:[a(N,{variant:"display-lg",children:"Uh oh."}),a(N,{variant:"text-md/normal",children:"A crash occurred while rendering a component. This could be caused by a plugin, Bunny or Discord itself."}),_(N,{variant:"text-sm/normal",color:"text-muted",children:[t.os.name,"; ",t.discord.build," (",t.discord.version,"); ",t.bunny.version]})]}),_(Si.ScrollView,{fadingEdgeLength:64,contentContainerStyle:{gap:12},children:[a(Ur,{selectable:!0,children:e.error.message}),di(e.error)&&a(ia,{error:e.error}),mi(e.error)?a(aa,{componentStack:e.error.componentStack}):null]}),_(ye,{style:{gap:6},children:[a(Y,{text:"Reload Discord",onPress:()=>dr.reload()}),!L.safeMode?.enabled&&a(Y,{text:"Reload in Safe Mode",onPress:()=>nu()}),a(Y,{variant:"destructive",text:"Retry Render",onPress:()=>e.rerender()})]})]})})})}var Si,_v,Qm=p(()=>{"use strict";s();l();V();eu();_t();Tr();Ee();br();Qr();z();K();Si=U(J());du();gu();_v=jr({container:{flex:1,backgroundColor:Jr.colors.BG_BASE_SECONDARY,paddingHorizontal:16,height:"100%",padding:8,gap:12}})});function xv(){var e=Ue("ErrorBoundary")[$a];return new Promise(r=>e.getExports(t=>r(t.prototype)))}function bu(){return Q.await("render",xv(),function(){if(this.state.error)return a(Su,{error:this.state.error,rerender:()=>this.setState({info:null,error:null})})})}var ed=p(()=>{"use strict";s();l();V();Qm();Le();Nn();fe()});var Eu=$r((WA,rd)=>{s();l();rd.exports=Ut().moment});function od({locale:e}){try{td.default.locale(e.toLowerCase())}catch(r){ke.error("Failed to fix timestamps...",r)}Or.unsubscribe("I18N_LOAD_SUCCESS",od)}var td,nd,ad=p(()=>{"use strict";s();l();ct();z();td=U(Eu());nd=()=>{Or.subscribe("I18N_LOAD_SUCCESS",od)}});var Qt,id=p(()=>{Qt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABoBJREFUeF7lW1nIVlUUXasom80kijJKaVQzGtTUjCJteNBmeqigssnIpDIqwmw0GqhQi4iw8SEaHtKgMpNKM7SiyUZpLppoTi0rd2f9nCu36/2+79zxv/5t8MV/n333WWefffb0EQ0iM+sH4AEAowG8CGAqycVVqsgqhWeVbWavAtg/tu4vABNIPphVVih/YwAws2EAlrRQfChJgVM6NQmARwGc0GKHX5PcofTdA2gSAJ8A2KXNJueQPLpsEJoEwI8A+rTZ4GrnIAeQ/KpMEJoEwCoAm3TY3DKSezcKADPbCMDWADYEIK/9B4CVJC2LomYWwv8PgC1JCqxSqJAFmNlOAF6PAfA3ACn3MYBLSD4bqmUgABI3l+T4ULmd+IoCcDeAs9p8RI5NPDNJrminTAYAZAVbkJSlFaaiALwJYEiAFh8CuJHk7Fa8ZqaNbRAgSyzjSc4N5G3LVhQAmfiYDIosBXAGyXeSa8xMJ9orUNb7AAZm9TNpsosCMNnd/9sDlY7Y/gRwAYDZJOUzusjMfvK+JFRcX5J6OgtRUQB2B/BBDg3k8ZeQHBED4AsASoZCaTTJRaHMrfiKAqD1jwM4NqcinwE4mOTnZiYgBWgozSN5RChzJQB40x0A4KMCivwO4GQAFwI4JIMcRYa9i74GhSwgZr5XuWs8LYPyaazPAMh6ojvLeop8tywA5L0V/FSSsbXZ4Eh3DV7udgD8VdgMwK8+JC6iU5a115GcmmVBkrcUC4hdhYPcPX6+RhAWkDysMQB4SzgXwB0Zoroi+q8iKcvLTaVaQMwSZgGYWBMIfUj+nBeBSgDwljADwHk1XIdCL0FlAMRAOL/i0tsgku82zgI8AMruLgNwfV4FA9btQ/KtAL5UlkotIOYTjgdwr6o5eRVts244SWWZuagWALw1DFUGCGBwLk1bLxpG8pW8MmsDwIPQ25W+7wNwTF6FU9bJ2U7L+xLUCkDsSij5keLblASEagmjSL6XVV63AOCtQSVw3d2yytxr3JN7LUklZsHUnQAMcnUE1RRVTi+TXgIwjqSsoiN1CwBmtqvzA28A2LyjhvkYlCKr9vhcp+W1A2BmewB4AcB2nZQr+Hc1aaaQlK9pSbUC4E9eLfCynF8IRoo/JpJUMXYdqgUAM9N3RgFYGKJxDh71FK5WAwbAvgAeShRnPgWwZxoIdQFwEwCV0DfOsbmQJWPi993MZGGqMsdT5e9VdE3GC5UCYGY69ehUQjaSh0dv/5B4j0FCXJ8hrWexHMAIkj9EH6oEADNTZUjNj+MqeOaSIM0nOTb5n2amStH8FEQVNh8eWcJaAHybe7gfU9kLgEzmbd/91VCCujArXdd3hdA2M73fKobKzDTYIK+uRsel7tT75jnKnGvUUtuWpMrra8nMNG12aguZatjKMa7pAsDMtnK9tkdylKVz6lz6snsATFKPwB+M+gtppx//sBoyCyMAkuNppWtYg0CVxeT4tvfPbKcI8zHXpD2RZnaOW3RXDQo27ROrSfYSAGowylv/30iR4qYCQBFSVe9zk0Fd5GKH0QJAPfpO96XJG8mjmyJHOcHFAuA1APvlkbIerzmN5P3SXwBc7IaOblmPN5NVdaXK/RUDRACoTqcOq4KfptA37l1XuKpma0QKrlQ/2LEEJY8i+XQXAD4Q6u+uwZwKKrbtdNWYjMboNDClf0qTl+ktb5W6RsLMbDc/naZK80Cvt/YQSvruYJIr46GwanQTAJzph5Y1/Vk2aVZQCck8xR4kpUgpZGYCQDHNOK9/p6bpRSRvS02GzEx1tZGlaAbopH8DcDnJO0uS2VaMmWnzk1xz9hrXldIob9o+ldf0W+cPZiafkLvbmtDsSY3MytQ7mXUVwJiZrFozTKoK6QcZSVrXAszsSABPFVRIs4MzyjTxgvoo4TsAwCm+Yy2rEC1PswC9CAfm+KBMSsWPW0l+l2N9LUt8UfYKf8Vn/gcAM9MT82VGTeTYngBwdqeB6Ixya2FPAnCSKx4+HPhlBRJ6vsaS/DZwTePYkgCozx7SqpJXl69YmqzFNW6HHRSKxwGhc79XApgV2npqOiBxAE73/ftWOquRqbJT7mGEJoIRhcIaZVGjMm14QT+BucHVDKa7oUSlkT2KIgAUT6/zIwbXYFTmpLxZU909kiIAprhM6+bEDqf7Hy93pY09lSIAFriO7aF+k7/4aYs0i+hxOEQAqIGgNrJ+iDS5p3j4kNP6F9f7+CyBdXonAAAAAElFTkSuQmCC"});function bi(e,r,t,o,n){return x(function*(){if(e)return void e();var i=yield t().then(u=>u.default);typeof o=="string"&&(o={title:o}),r??=bv.getRootNavigationRef(),r.navigate("BUNNY_CUSTOM_PAGE",{...o,render:()=>a(i,{...n})})})}var bv,rn,Tu=p(()=>{"use strict";s();l();me();V();z();fe();br();bv=P("getRootNavigationRef"),rn=React.memo(()=>{var e=de.useNavigation(),r=de.useRoute(),{render:t,...o}=r.params;return React.useEffect(()=>void e.setOptions({...o}),[]),a(_e,{children:a(t,{})})})});function Ev(){var e=de.useNavigation();return a(yr,{children:Object.keys(Hr).map(r=>Hr[r].length>0&&a(ei,{title:r,children:Hr[r].filter(t=>t.usePredicate?.()??!0).map((t,o,n)=>_(yr,{children:[a(Xr,{label:t.title(),leading:a(vl,{source:t.icon}),trailing:a(Xr.Arrow,{label:t.useTrailing?.()||void 0}),onPress:bi(t.onPress,e,t.render,t.title())}),o!==n.length-1&&a($n,{})]}))},r))})}function sd(e){try{e.push(Q("default",Ue("getScreens",!1),(t,o)=>({...o,VendettaCustomPage:{title:"Bunny",render:()=>a(rn,{})},BUNNY_CUSTOM_PAGE:{title:"Bunny",render:()=>a(rn,{})}})));var r=Q("default",Ue("UserSettingsOverviewWrapper",!1),(t,o)=>{var n=vr(o.props.children,i=>i.type?.name==="UserSettingsOverview");e.push(Q("renderSupportAndAcknowledgements",n.type.prototype,(i,{props:{children:u}})=>{var f=u.findIndex(c=>c?.type?.name==="UploadLogsButton");f!==-1&&u.splice(f,1)})),e.push(Q("render",n.type.prototype,(i,u)=>{var f=[Go.Messages.BILLING_SETTINGS,Go.Messages.PREMIUM_SETTINGS],c=vr(u.props.children,h=>h?.children?.[1]?.type===ei)?.children||u.props.children;if(c){var S=c.findIndex(h=>f.includes(h?.props.label));c.splice(-~S||4,0,a(Ev,{}))}}))},!0);e.push(r)}catch{}}var ld=p(()=>{"use strict";s();l();V();Le();ir();z();K();fe();tn();Tu()});function wv(){var e=!1;return React.useEffect(()=>void(e=!0),[]),e}function ud(e){var r=()=>Object.values(Hr).flatMap(n=>n.map(i=>({[i.key]:{type:"pressable",title:i.title,icon:i.icon,IconComponent:()=>a(C.Icon,{source:i.icon}),usePredicate:i.usePredicate,useTrailing:i.useTrailing,onPress:bi(i.onPress,null,i.render,i.title()),withArrow:!0,...i.rawTabsConfig}}))).reduce((n,i)=>Object.assign(n,i)),t=Ei.SETTING_RENDERER_CONFIG,o=Ei.SETTING_RENDERER_CONFIG;Object.defineProperty(Ei,"SETTING_RENDERER_CONFIG",{enumerable:!0,configurable:!0,get:()=>({...o,VendettaCustomPage:{type:"route",title:()=>"Bunny",screen:{route:"VendettaCustomPage",getComponent:()=>rn}},BUNNY_CUSTOM_PAGE:{type:"route",title:()=>"Bunny",screen:{route:"BUNNY_CUSTOM_PAGE",getComponent:()=>rn}},...r()}),set:n=>o=n}),e.push(()=>{Object.defineProperty(Ei,"SETTING_RENDERER_CONFIG",{value:t,writable:!0,get:void 0,set:void 0})}),e.push(Q("default",Tv,(n,i)=>{if(!wv()){var{sections:u}=vr(i,c=>c.props?.sections).props,f=-~u.findIndex(c=>c.settings.includes("ACCOUNT"))||1;Object.keys(Hr).forEach(c=>{u.splice(f++,0,{label:c,title:c,settings:Hr[c].map(S=>S.key)})})}}))}var Ei,Tv,fd=p(()=>{"use strict";s();l();V();Le();ir();K();fe();tn();Tu();Ei=P("SETTING_RENDERER_CONFIG"),Tv=Ue("SettingsOverviewScreen",!1)});var Au={};M(Au,{patchSettings:()=>wu,registerSection:()=>Ti,registeredSections:()=>Hr});function Ti(e){return Hr[e.name]=e.items,()=>delete Hr[e.name]}function wu(){var e=new Array;return sd(e),ud(e),()=>e.forEach(r=>r())}var Hr,tn=p(()=>{"use strict";s();l();ld();fd();Hr={}});function Iu(){return L.safeMode?.enabled===!0}function cd(){return Cu.apply(this,arguments)}function Cu(){return Cu=x(function*({to:e=!Iu(),reload:r=!0}={}){var t=(L.safeMode??={enabled:e}).enabled=e,o=ht();yield Ko(t?{}:o?.data??{}),r&&setTimeout(()=>dr.reload(),500)}),Cu.apply(this,arguments)}var md=p(()=>{"use strict";s();l();me();lr();Tr();Ee()});function wi({label:e,version:r,icon:t}){return a(C,{label:e,icon:a(C.Icon,{source:typeof t=="string"?y(t):t}),trailing:a(Yn,{children:r}),onPress:()=>{Me.setString(`${e} - ${r}`),$.showCopyToClipboard()}})}var dd=p(()=>{"use strict";s();l();V();ue();z();K();Br()});function Ru(){var e=Fr();Z(L);var r=[{label:g.BUNNY,version:e.bunny.version,icon:{uri:Qt}},{label:"Discord",version:`${e.discord.version} (${e.discord.build})`,icon:"Discord"},{label:"React",version:e.react.version,icon:"ScienceIcon"},{label:"React Native",version:e.react.nativeVersion,icon:"MobilePhoneIcon"},{label:g.BYTECODE,version:e.hermes.bytecodeVersion,icon:"TopicsIcon"}],t=[{label:g.LOADER,version:`${e.bunny.loader.name} (${e.bunny.loader.version})`,icon:"DownloadIcon"},{label:g.OPERATING_SYSTEM,version:`${e.os.name} ${e.os.version}`,icon:"ScreenIcon"},...e.os.sdk?[{label:"SDK",version:e.os.sdk,icon:"StaffBadgeIcon"}]:[],{label:g.MANUFACTURER,version:e.device.manufacturer,icon:"WrenchIcon"},{label:g.BRAND,version:e.device.brand,icon:"SparklesIcon"},{label:g.MODEL,version:e.device.model,icon:"MobilePhoneIcon"},{label:Ai.Platform.select({android:g.CODENAME,ios:g.MACHINE_ID}),version:e.device.codename,icon:"TagIcon"}];return a(Ai.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:_(pe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:24,children:[a(Be,{title:g.VERSIONS,children:r.map(o=>a(wi,{label:o.label,version:o.version,icon:o.icon}))}),a(Be,{title:g.PLATFORM,children:t.map(o=>a(wi,{label:o.label,version:o.version,icon:o.icon}))})]})})}var Ai,pd=p(()=>{"use strict";s();l();V();xe();ua();dd();be();_t();Ee();K();Ai=U(J())});var Nu={};M(Nu,{dismissAlert:()=>Pu,openAlert:()=>fa});var fa,Pu,Ci=p(()=>{"use strict";s();l();Se();He();({openAlert:fa,dismissAlert:Pu}=G(()=>F("openAlert","dismissAlert")))});var vd={};M(vd,{default:()=>gd});function gd(){Z(L);var e=Fr(),r=de.useNavigation();return a(hd.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:_(pe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:24,children:[_(Be,{title:g.INFO,children:[a(C,{label:g.BUNNY,icon:a(C.Icon,{source:{uri:Qt}}),trailing:a(C.TrailingText,{text:e.bunny.version})}),a(C,{label:"Discord",icon:a(C.Icon,{source:y("Discord")}),trailing:a(C.TrailingText,{text:`${e.discord.version} (${e.discord.build})`})}),a(C,{arrow:!0,label:g.ABOUT,icon:a(C.Icon,{source:y("CircleInformationIcon-primary")}),onPress:()=>r.push("BUNNY_CUSTOM_PAGE",{title:g.ABOUT,render:()=>a(Ru,{})})})]}),_(Be,{title:g.LINKS,children:[a(C,{arrow:!0,label:g.DISCORD_SERVER,icon:a(C.Icon,{source:y("Discord")}),onPress:()=>$t.openDeeplink(Ys)}),a(C,{arrow:!0,label:g.GITHUB,icon:a(C.Icon,{source:y("img_account_sync_github_white")}),onPress:()=>$t.openURL(Ws)})]}),_(Be,{title:g.ACTIONS,children:[a(C,{label:g.RELOAD_DISCORD,icon:a(C.Icon,{source:y("RetryIcon")}),onPress:()=>dr.reload()}),a(mt,{label:"Safe Mode",subLabel:"Load Bunny without loading add-ons",icon:a(C.Icon,{source:y("ShieldIcon")}),value:Iu(),onValueChange:t=>{cd({to:t,reload:!1}),fa("bunny-reload-safe-mode",a(Gn,{title:"Reload now?",content:t?"All add-ons will be temporarily disabled upon reload.":"All add-ons will load normally.",actions:_(ml,{children:[a(Vo,{text:"Reload Now",variant:"destructive",onPress:()=>dr.reload()}),a(Vo,{text:"Later",variant:"secondary"})]})}))}}),a(mt,{label:g.DEVELOPER_SETTINGS,icon:a(C.Icon,{source:y("WrenchIcon")}),value:L.developerSettings,onValueChange:t=>{L.developerSettings=t}})]}),a(Be,{title:g.MISCELLANEOUS,children:a(mt,{label:g.SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS,subLabel:g.SETTINGS_ACTIVATE_DISCORD_EXPERIMENTS_DESC,icon:a(C.Icon,{source:y("WrenchIcon")}),value:L.enableDiscordDeveloperSettings,onValueChange:t=>{L.enableDiscordDeveloperSettings=t}})})]})})}var hd,yd=p(()=>{"use strict";s();l();V();md();xe();ua();pd();be();ue();_t();Tr();Ee();Ci();Gt();z();K();hd=U(J())});function Lu(e){var r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}var _d=p(()=>{"use strict";s();l()});var Sd=$r((xd,Ii)=>{s();l();Oa();_n();wn();Ba();oc();((e,r)=>{typeof define=="function"&&define.amd?define([],r):typeof Ii=="object"&&Ii.exports?Ii.exports=r():e.fuzzysort=r()})(xd,e=>{"use strict";var r=(b,v)=>{if(!b||!v)return Ae;var T=O(b);oo(v)||(v=A(v));var I=T.bitflags;return(I&v._bitflags)!==I?Ae:he(T,v)},t=(b,v,T)=>{if(!b)return T?.all?re(v,T):Ji;var I=O(b),D=I.bitflags,R=I.containsSpace,w=h(T?.threshold||0),k=T?.limit||Xi,B=0,q=0,W=v.length;function qe(io){B<k?(Pa.add(io),++B):(++q,io._score>Pa.peek()._score&&Pa.replaceTop(io))}if(T?.key)for(var Fe=T.key,X=0;X<W;++X){var Ge=v[X],te=Ra(Ge,Fe);if(te&&(oo(te)||(te=A(te)),(D&te._bitflags)===D)){var ae=he(I,te);ae!==Ae&&(ae._score<w||(ae.obj=Ge,qe(ae)))}}else if(T?.keys){var at=T.keys,Er=at.length;e:for(var X=0;X<W;++X){var Ge=v[X];{for(var Ne=0,ge=0;ge<Er;++ge){var Fe=at[ge],te=Ra(Ge,Fe);if(!te){qi[ge]=hn;continue}oo(te)||(te=A(te)),qi[ge]=te,Ne|=te._bitflags}if((D&Ne)!==D)continue}if(R)for(var er=0;er<I.spaceSearches.length;er++)nt[er]=Qe;for(var ge=0;ge<Er;++ge){if(te=qi[ge],te===hn){Do[ge]=hn;continue}if(Do[ge]=he(I,te,!1,R),Do[ge]===Ae){Do[ge]=hn;continue}if(R)for(var j=0;j<I.spaceSearches.length;j++){if(to[j]>-1e3&&nt[j]>Qe){var rr=(nt[j]+to[j])/4;rr>nt[j]&&(nt[j]=rr)}to[j]>nt[j]&&(nt[j]=to[j])}}if(R){for(var cr=0;cr<I.spaceSearches.length;cr++)if(nt[cr]===Qe)continue e}else{for(var no=!1,ao=0;ao<Er;ao++)if(Do[ao]._score!==Qe){no=!0;break}if(!no)continue}for(var mr=new f(Er),tr=0;tr<Er;tr++)mr[tr]=Do[tr];if(R)for(var ie=0,Bo=0;Bo<I.spaceSearches.length;Bo++)ie+=nt[Bo];else for(var ie=Qe,or=0;or<Er;or++){var ae=mr[or];if(ae._score>-1e3&&ie>Qe){var rr=(ie+ae._score)/4;rr>ie&&(ie=rr)}ae._score>ie&&(ie=ae._score)}if(mr.obj=Ge,mr._score=ie,T?.scoreFn){if(ie=T.scoreFn(mr),!ie)continue;ie=h(ie),mr._score=ie}ie<w||qe(mr)}}else for(var X=0;X<W;++X){var te=v[X];if(te&&(oo(te)||(te=A(te)),(D&te._bitflags)===D)){var ae=he(I,te);ae!==Ae&&(ae._score<w||qe(ae))}}if(B===0)return Ji;for(var gn=new Array(B),X=B-1;X>=0;--X)gn[X]=Pa.poll();return gn.total=B+q,gn},o=(b,v="<b>",T="</b>")=>{for(var I=typeof v=="function"?v:void 0,D=b.target,R=D.length,w=b.indexes,k="",B=0,q=0,W=!1,qe=[],Fe=0;Fe<R;++Fe){var X=D[Fe];if(w[q]===Fe){if(++q,W||(W=!0,I?(qe.push(k),k=""):k+=v),q===w.length){I?(k+=X,qe.push(I(k,B++)),k="",qe.push(D.substr(Fe+1))):k+=X+T+D.substr(Fe+1);break}}else W&&(W=!1,I?(qe.push(I(k,B++)),k=""):k+=T);k+=X}return I?qe:k},n=b=>{typeof b=="number"?b=""+b:typeof b!="string"&&(b="");var v=zr(b);return c(b,{_targetLower:v._lower,_targetLowerCodes:v.lowerCodes,_bitflags:v.bitflags})},i=()=>{Wi.clear(),Ki.clear()},u=function(){function b(){nr(this,b)}return Cr(b,[{key:"indexes",get:function(){return this._indexes.slice(0,this._indexes.len).sort((T,I)=>T-I)}},{key:"indexes",set:function(T){return this._indexes=T}},{key:"highlight",value:function(T,I){return o(this,T,I)}},{key:"score",get:function(){return S(this._score)}},{key:"score",set:function(T){this._score=h(T)}}]),b}(),f=function(b){Pt(v,b);function v(){return nr(this,v),It(this,v,arguments)}return Cr(v,[{key:"score",get:function(){return S(this._score)}},{key:"score",set:function(I){this._score=h(I)}}]),v}(Ma(Array)),c=(b,v)=>{var T=new u;return T.target=b,T.obj=v.obj??Ae,T._score=v._score??Qe,T._indexes=v._indexes??[],T._targetLower=v._targetLower??"",T._targetLowerCodes=v._targetLowerCodes??Ae,T._nextBeginningIndexes=v._nextBeginningIndexes??Ae,T._bitflags=v._bitflags??0,T},S=b=>b===Qe?0:b>1?b:Math.E**(((-b+1)**.04307-1)*-2),h=b=>b===0?Qe:b>1?b:1-Math.pow(Math.log(b)/-2+1,1/.04307),E=b=>{typeof b=="number"?b=""+b:typeof b!="string"&&(b=""),b=b.trim();var v=zr(b),T=[];if(v.containsSpace){var I=b.split(/\s+/);I=[...new Set(I)];for(var D=0;D<I.length;D++)if(I[D]!==""){var R=zr(I[D]);T.push({lowerCodes:R.lowerCodes,_lower:I[D].toLowerCase(),containsSpace:!1})}}return{lowerCodes:v.lowerCodes,_lower:v._lower,containsSpace:v.containsSpace,bitflags:v.bitflags,spaceSearches:T}},A=b=>{if(b.length>999)return n(b);var v=Wi.get(b);return v!==void 0||(v=n(b),Wi.set(b,v)),v},O=b=>{if(b.length>999)return E(b);var v=Ki.get(b);return v!==void 0||(v=E(b),Ki.set(b,v)),v},re=(b,v)=>{var T=[];T.total=b.length;var I=v?.limit||Xi;if(v?.key)for(var D=0;D<b.length;D++){var R=b[D],w=Ra(R,v.key);if(w!=Ae){oo(w)||(w=A(w));var k=c(w.target,{_score:w._score,obj:R});if(T.push(k),T.length>=I)return T}}else if(v?.keys)for(var D=0;D<b.length;D++){for(var R=b[D],B=new f(v.keys.length),q=v.keys.length-1;q>=0;--q){var w=Ra(R,v.keys[q]);if(!w){B[q]=hn;continue}oo(w)||(w=A(w)),w._score=Qe,w._indexes.len=0,B[q]=w}if(B.obj=R,B._score=Qe,T.push(B),T.length>=I)return T}else for(var D=0;D<b.length;D++){var w=b[D];if(w!=Ae&&(oo(w)||(w=A(w)),w._score=Qe,w._indexes.len=0,T.push(w),T.length>=I))return T}return T},he=(b,v,T=!1,I=!1)=>{if(T===!1&&b.containsSpace)return tt(b,v,I);for(var D=b._lower,R=b.lowerCodes,w=R[0],k=v._targetLowerCodes,B=R.length,q=k.length,X=0,W=0,qe=0;;){var Fe=w===k[W];if(Fe){if(ot[qe++]=W,++X,X===B)break;w=R[X]}if(++W,W>=q)return Ae}var X=0,Ge=!1,te=0,ae=v._nextBeginningIndexes;ae===Ae&&(ae=v._nextBeginningIndexes=Ve(v.target)),W=ot[0]===0?0:ae[ot[0]-1];var at=0;if(W!==q)for(;;)if(W>=q){if(X<=0||(++at,at>200))break;--X;var Er=Ca[--te];W=ae[Er]}else{var Fe=R[X]===k[W];if(Fe){if(Ca[te++]=W,++X,X===B){Ge=!0;break}++W}else W=ae[W]}var Ne=B<=1?-1:v._targetLower.indexOf(D,ot[0]),ge=!!~Ne,er=ge?Ne===0||v._nextBeginningIndexes[Ne-1]===Ne:!1;if(ge&&!er){for(var j=0;j<ae.length;j=ae[j])if(!(j<=Ne)){for(var rr=0;rr<B&&R[rr]===v._targetLowerCodes[j+rr];rr++);if(rr===B){Ne=j,er=!0;break}}}var cr=tr=>{for(var ie=0,Bo=0,or=1;or<B;++or)tr[or]-tr[or-1]!==1&&(ie-=tr[or],++Bo);var gn=tr[B-1]-tr[0]-(B-1);if(ie-=(12+gn)*Bo,tr[0]!==0&&(ie-=tr[0]*tr[0]*.2),!Ge)ie*=1e3;else{for(var io=1,or=ae[0];or<q;or=ae[or])++io;io>24&&(ie*=(io-24)*10)}return ie-=(q-B)/2,ge&&(ie/=1+B*B*1),er&&(ie/=1+B*B*1),ie-=(q-B)/2,ie};if(Ge)if(er){for(var j=0;j<B;++j)ot[j]=Ne+j;var no=ot,ao=cr(ot)}else var no=Ca,ao=cr(Ca);else{if(ge)for(var j=0;j<B;++j)ot[j]=Ne+j;var no=ot,ao=cr(no)}v._score=ao;for(var j=0;j<B;++j)v._indexes[j]=no[j];v._indexes.len=B;var mr=new u;return mr.target=v.target,mr._score=v._score,mr._indexes=v._indexes,mr},tt=(b,v,T)=>{for(var I=new Set,D=0,R=Ae,w=0,k=b.spaceSearches,B=k.length,q=0,W=()=>{for(var cr=q-1;cr>=0;cr--)v._nextBeginningIndexes[Ia[cr*2+0]]=Ia[cr*2+1]},qe=!1,j=0;j<B;++j){to[j]=Qe;var Fe=k[j];if(R=he(Fe,v),T){if(R===Ae)continue;qe=!0}else if(R===Ae)return W(),Ae;var X=j===B-1;if(!X){for(var Ge=R._indexes,te=!0,ae=0;ae<Ge.len-1;ae++)if(Ge[ae+1]-Ge[ae]!==1){te=!1;break}if(te)for(var at=Ge[Ge.len-1]+1,Er=v._nextBeginningIndexes[at-1],Ne=at-1;Ne>=0&&Er===v._nextBeginningIndexes[Ne];Ne--)v._nextBeginningIndexes[Ne]=at,Ia[q*2+0]=Ne,Ia[q*2+1]=Er,q++}D+=R._score/B,to[j]=R._score/B,R._indexes[0]<w&&(D-=(w-R._indexes[0])*2),w=R._indexes[0];for(var ge=0;ge<R._indexes.len;++ge)I.add(R._indexes[ge])}if(T&&!qe)return Ae;W();var er=he(b,v,!0);if(er!==Ae&&er._score>D){if(T)for(var j=0;j<B;++j)to[j]=er._score/B;return er}T&&(R=v),R._score=D;var j=0;for(var rr of I)R._indexes[j++]=rr;return R._indexes.len=j,R},zr=b=>{for(var v=b.length,T=b.toLowerCase(),I=[],D=0,R=!1,w=0;w<v;++w){var k=I[w]=T.charCodeAt(w);if(k===32){R=!0;continue}var B=k>=97&&k<=122?k-97:k>=48&&k<=57?26:k<=127?30:31;D|=1<<B}return{lowerCodes:I,bitflags:D,containsSpace:R,_lower:T}},At=b=>{for(var v=b.length,T=[],I=0,D=!1,R=!1,w=0;w<v;++w){var k=b.charCodeAt(w),B=k>=65&&k<=90,q=B||k>=97&&k<=122||k>=48&&k<=57,W=B&&!D||!R||!q;D=B,R=q,W&&(T[I++]=w)}return T},Ve=b=>{for(var v=b.length,T=At(b),I=[],D=T[0],R=0,w=0;w<v;++w)D>w?I[w]=D:(D=T[++R],I[w]=D===void 0?v:D);return I},Wi=new Map,Ki=new Map,ot=[],Ca=[],Ia=[],nt=[],to=[],qi=[],Do=[],Ra=(b,v)=>{var T=b[v];if(T!==void 0)return T;if(typeof v=="function")return v(b);var I=v;Array.isArray(v)||(I=v.split("."));for(var D=I.length,R=-1;b&&++R<D;)b=b[I[R]];return b},oo=b=>typeof b=="object"&&typeof b._bitflags=="number",Xi=1/0,Qe=-Xi,Ji=[];Ji.total=0;var Ae=null,hn=n(""),ah=b=>{var v=[],T=0,I={},D=R=>{for(var w=0,k=v[w],B=1;B<T;){var q=B+1;w=B,q<T&&v[q]._score<v[B]._score&&(w=q),v[w-1>>1]=v[w],B=1+(w<<1)}for(var W=w-1>>1;w>0&&k._score<v[W]._score;W=(w=W)-1>>1)v[w]=v[W];v[w]=k};return I.add=R=>{var w=T;v[T++]=R;for(var k=w-1>>1;w>0&&R._score<v[k]._score;k=(w=k)-1>>1)v[w]=v[k];v[w]=R},I.poll=R=>{if(T!==0){var w=v[0];return v[0]=v[--T],D(),w}},I.peek=R=>{if(T!==0)return v[0]},I.replaceTop=R=>{v[0]=R,D()},I},Pa=ah();return{single:r,go:t,prepare:n,cleanup:i}})});function Iv(e){var[r,t]=React.useState(""),[o,n]=React.useState(""),[i,u]=React.useState(!1);function f(){u(!0),e.fetchFn(r).then(()=>Pu("AddonInputAlert")).catch(c=>c instanceof Error?n(c.message):String(c)).finally(()=>u(!1))}return a(Gn,{title:e.label,content:"Type in the source URL you want to install from:",extraContent:_(pe,{style:{marginTop:-12},children:[a(We,{autoFocus:!0,isClearable:!0,value:r,onChange:c=>{t(c),o&&n("")},returnKeyType:"done",onSubmitEditing:f,state:o?"error":void 0,errorMessage:o||void 0}),a(fr.ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,style:{gap:8},children:a(Y,{size:"sm",variant:"tertiary",text:"Import from clipboard",icon:y("ClipboardListIcon"),onPress:()=>Me.getString().then(c=>t(c))})})]}),actions:_(pe,{children:[a(Y,{loading:i,text:"Install",variant:"primary",disabled:!r||!Lu(r),onPress:f}),a(Vo,{disabled:i,text:"Cancel",variant:"secondary"})]})})}function Ro({CardComponent:e,...r}){var[t,o]=React.useState(""),[n,i]=React.useState(()=>null),{bottom:u}=sl(),f=de.useNavigation();(0,on.useEffect)(()=>{r.OptionsActionSheetComponent&&f.setOptions({headerRight:()=>a(ve,{size:"sm",variant:"secondary",icon:y("MoreHorizontalIcon"),onPress:()=>Ao("AddonMoreSheet",r.OptionsActionSheetComponent)})})},[f]);var c=(0,on.useMemo)(()=>{var E=r.items;r.resolveItem&&(E=E.map(r.resolveItem).filter(Fa));var A=E.filter(O=>Fa(O)&&typeof O=="object");return!t&&n&&A.sort(n),bd.default.go(t,A,{keys:r.searchKeywords,all:!0})},[r.items,n,t]),S=(0,on.useCallback)(()=>{if(!r.installAction)return()=>{};var{label:E,onPress:A,fetchFn:O}=r.installAction;O?fa("AddonInputAlert",a(Iv,{label:E??"Install",fetchFn:O})):A?.()},[]);if(c.length===0&&!t)return _(fr.View,{style:{gap:32,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[_(fr.View,{style:{gap:8,alignItems:"center"},children:[a(fr.Image,{source:y("empty_quick_switcher")}),a(N,{variant:"text-lg/semibold",color:"text-normal",children:"Oops! Nothing to see here\u2026 yet!"})]}),a(Y,{size:"lg",icon:y("DownloadIcon"),text:r.installAction?.label??"Install",onPress:S})]});var h=_(fr.View,{style:{paddingBottom:8},children:[L.safeMode?.enabled&&_(fr.View,{style:{marginBottom:10},children:[a(Hn,{messageType:0,children:r.safeModeHint?.message}),r.safeModeHint?.footer]}),_(fr.View,{style:{flexDirection:"row",gap:8},children:[a(Zt,{style:{flexGrow:1},isRound:!!r.sortOptions,onChangeText:E=>o(E)}),r.sortOptions&&a(ve,{icon:y("ic_forum_channel_sort_order_24px"),variant:"tertiary",disabled:!!t,onPress:()=>Av({key:"AddonListSortOptions",header:{title:"Sort Options",onClose:()=>Cv("AddonListSortOptions")},options:Object.entries(r.sortOptions).map(([E,A])=>({label:E,onPress:()=>i(()=>A)}))})})]}),r.ListHeaderComponent&&a(r.ListHeaderComponent,{})]});return _(_e,{children:[a(Wn,{data:c,extraData:t,estimatedItemSize:136,ListHeaderComponent:h,ListEmptyComponent:()=>_(fr.View,{style:{gap:12,padding:12,alignItems:"center"},children:[a(fr.Image,{source:y("devices_not_found")}),a(N,{variant:"text-lg/semibold",color:"text-normal",children:"Hmmm... could not find that!"})]}),contentContainerStyle:{padding:8,paddingHorizontal:12,paddingBottom:90},ItemSeparatorComponent:()=>a(fr.View,{style:{height:8}}),ListFooterComponent:r.ListFooterComponent,renderItem:({item:E})=>a(e,{item:E.obj,result:E})}),r.installAction&&a(gl,{positionBottom:u+8,icon:y("PlusLargeIcon"),onPress:S})]})}var bd,on,fr,Av,Cv,Ri=p(()=>{"use strict";s();l();V();ue();Ee();Ci();Co();_d();Se();He();z();K();br();Mo();bd=U(Sd()),on=U(kr()),fr=U(J()),{showSimpleActionSheet:Av,hideActionSheet:Cv}=G(()=>F("showSimpleActionSheet"))});var Ou,Ed=p(()=>{"use strict";s();l();z();Qr();Ou=jr({smallIcon:{tintColor:Jr.colors.LOGO_PRIMARY,height:18,width:18},badgeIcon:{tintColor:Jr.colors.LOGO_PRIMARY,height:12,width:12},badgesContainer:{flexWrap:"wrap",flexDirection:"row",gap:6,borderRadius:6,padding:4}})});function Du(){return(0,Td.default)(Jr.unsafe_rawColors.YELLOW_300).alpha(.3).hex()}function Rv(){var e=Ou(),{plugin:r,result:t}=Pi(),o=t[0].highlight((u,f)=>a(N,{style:{backgroundColor:Du()},children:u},f)),n=r.icon&&y(r.icon),i=a(N,{numberOfLines:1,variant:"heading-lg/semibold",children:o.length?o:r.name});return _(Vr.View,{style:{flexDirection:"row",alignItems:"center",gap:6},children:[n&&a(Vr.Image,{style:e.smallIcon,source:n}),i]})}function Pv(){var{plugin:e,result:r}=Pi(),t=Ou();if(!e.authors)return null;var o=r[2].highlight((u,f)=>a(N,{style:{backgroundColor:Du()},children:u},f)),n=e.getBadges(),i=o.length>0?o:e.authors.map(u=>u.name).join(", ");return _(Vr.View,{style:{flexDirection:"row",flexWrap:"wrap",flexShrink:1,gap:4},children:[_(N,{variant:"text-sm/semibold",color:"text-muted",children:["by ",i]}),n.length>0&&a(Vr.View,{style:t.badgesContainer,children:n.map((u,f)=>a(Vr.Image,{source:u.source,style:t.badgeIcon},f))})]})}function Nv(){var{plugin:e,result:r}=Pi(),t=r[1].highlight((o,n)=>a(N,{style:{backgroundColor:Du()},children:o},n));return a(N,{variant:"text-md/medium",children:t.length?t:e.description})}function Bu({result:e,item:r}){r.usePluginState();var[,t]=React.useReducer(()=>({}),0),o=(0,nn.useMemo)(()=>({plugin:r,result:e}),[r,e]);return a(wd.Provider,{value:o,children:a(ye,{children:_(pe,{spacing:16,children:[_(Vr.View,{style:{flexDirection:"row",justifyContent:"space-between"},children:[_(Vr.View,{style:{flexShrink:1},children:[a(Rv,{}),a(Pv,{})]}),a(Vr.View,{children:_(pe,{spacing:12,direction:"horizontal",children:[a(Lv,{}),a(ul,{value:r.isEnabled(),onValueChange:n=>{r.toggle(n),t()}})]})})]}),a(Nv,{})]})})})}var Td,nn,Vr,wd,Pi,Lv,Ad=p(()=>{"use strict";s();l();V();Ed();ue();z();K();Co();Td=U($o()),nn=U(kr()),Vr=U(J()),wd=(0,nn.createContext)(null),Pi=()=>(0,nn.useContext)(wd);Lv=()=>{var{plugin:e}=Pi(),r=de.useNavigation();return _(Vr.View,{style:{flexDirection:"row",gap:6},children:[a(ve,{size:"sm",variant:"secondary",icon:y("WrenchIcon"),disabled:!e.getPluginSettingsComponent(),onPress:()=>r.push("BUNNY_CUSTOM_PAGE",{title:e.name,render:e.getPluginSettingsComponent()})}),a(ve,{size:"sm",variant:"secondary",icon:y("CircleInformationIcon-primary"),onPress:()=>void Ao("PluginInfoActionSheet",e.resolveSheetComponent(),{plugin:e,navigation:r})})]})}});var Ze,Po,H,St=p(()=>{"use strict";s();l();me();be();Ee();ir();Gt();ct();Ze=Ir(ar(Rr("VENDETTA_PLUGINS"))),Po={},H={plugins:Ze,pluginFetch(e){return x(function*(){return e.startsWith(Pr)&&(e=e.replace("https://bunny-mod.github.io/plugins-proxy",yo).replace(Pr,yo)),yield Ye(e,{cache:"no-store"})})()},fetchPlugin(e){return x(function*(){e.endsWith("/")||(e+="/");var r=Ze[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}`);Ze[e]={id:e,manifest:t,enabled:r?.enabled??!1,update:r?.update??!0,js:o??r.js}}).apply(this)},installPlugin(e,r=!0){return x(function*(){if(e.endsWith("/")||(e+="/"),typeof e!="string"||e in Ze)throw new Error("Plugin already installed");yield this.fetchPlugin(e),r&&(yield this.startPlugin(e))}).apply(this)},evalPlugin(e){return x(function*(){var r={...window.vendetta,plugin:{id:e.id,manifest:e.manifest,storage:yield ar(Rr(e.id))},logger:new jn(`Bunny \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=Ze[e];if(!r)throw new Error("Attempted to start non-existent plugin");try{if(!L.safeMode?.enabled){var t=yield this.evalPlugin(r);Po[e]=t,t.onLoad?.()}r.enabled=!0}catch(o){ke.error(`Plugin ${r.id} errored whilst loading, and will be unloaded`,o);try{Po[r.id]?.onUnload?.()}catch(n){ke.error(`Plugin ${r.id} errored whilst unloading`,n)}delete Po[e],r.enabled=!1}}).apply(this)},stopPlugin(e,r=!0){e.endsWith("/")||(e+="/");var t=Ze[e],o=Po[e];if(!t)throw new Error("Attempted to stop non-existent plugin");if(!L.safeMode?.enabled){try{o?.onUnload?.()}catch(n){ke.error(`Plugin ${t.id} errored whilst unloading`,n)}delete Po[e]}r&&(t.enabled=!1)},removePlugin(e){return x(function*(){e.endsWith("/")||(e+="/");var r=Ze[e];r.enabled&&this.stopPlugin(e),delete Ze[e],yield Ya(e)}).apply(this)},initPlugins(){return x(function*(){yield kt(L,Ze);var e=Object.keys(Ze);if(!L.safeMode?.enabled){var r=this;yield m(e.filter(t=>Ze[t].enabled).map(function(){var t=x(function*(o){return Ze[o].update&&(yield r.fetchPlugin(o).catch(n=>ke.error(n.message))),yield r.startPlugin(o)});return function(o){return t.apply(this,arguments)}}())),e.filter(t=>!Ze[t].enabled&&Ze[t].update).forEach(t=>this.fetchPlugin(t))}return()=>this.stopAllPlugins()}).apply(this)},stopAllPlugins(){return Object.keys(Po).forEach(e=>this.stopPlugin(e,!1))},getSettings:e=>Po[e]?.settings}});function Bv(e,r=null,t=!1){if(e.guild_id===qs){var o;if(e.parent_id===Xs)o="Plugin";else if(e.parent_id===Fn&&Dr())o="Theme";else return;var{firstMessage:n}=t?Ov(e):{firstMessage:r},i=n?.content?.match(Ks)?.filter(ca[o].urlsFilter);if(!(!i||!i[0]))return o==="Plugin"&&!i[0].endsWith("/")&&(i[0]+="/"),[o,i[0]]}}function Mv(e,r=null,t=!1){var[o,n]=Bv(e,r,t)??[];Z(H.plugins),Z(le);var[i,u]=React.useState(!1);if(!o||!n)return[!0];var f=!!ca[o].storage[n],c=function(){var S=x(function*(){u(!0);try{yield ca[o].installOrRemove(n)}catch(h){$(h.message,y("Small"))}finally{u(!1)}});return function(){return S.apply(this,arguments)}}();return[!1,o,f,i,c]}var Ov,Dv,ca,Fv,Cd,Id=p(()=>{"use strict";s();l();me();V();xe();St();be();lr();ue();gt();Le();Gt();Se();K();fe();br();Br();({useFirstForumPostMessage:Ov}=G(()=>F("useFirstForumPostMessage"))),Dv=P("MostCommonForumPostReaction"),ca={Plugin:{storage:H.plugins,urlsFilter:e=>e.startsWith(Pr),installOrRemove:e=>{var r=ca.Plugin.storage[e];return r?H.removePlugin(e):H.installPlugin(e)}},Theme:{storage:le,urlsFilter:e=>e.endsWith(".json"),installOrRemove:e=>{var r=ca.Theme.storage[e];return r?To(e):dt(e)}}};Fv=()=>Q("MostCommonForumPostReaction",Dv,([{thread:e,firstMessage:r}],t)=>{var[o,n,i,u,f]=Mv(e,r,!0);if(!o)return _(yr,{children:[t,a(_e,{children:a(Y,{size:"sm",loading:u,disabled:u,variant:i?"secondary":"primary",text:i?g.UNINSTALL:g.INSTALL,onPress:f,icon:y(i?"ic_message_delete":"DownloadIcon"),style:{marginLeft:8}})})]})}),Cd=()=>{var e=[Fv()];return()=>e.map(r=>r())}});function Mu({title:e,confirmText:r,confirmColor:t,onConfirm:o,cancelText:n,placeholder:i,initialValue:u="",secureTextEntry:f}){var[c,S]=React.useState(u),[h,E]=React.useState("");function A(){var O=Promise.resolve(o(c));O.then(()=>{Rd.close()}).catch(re=>{E(re.message)})}return a(kn,{title:e,confirmText:r,confirmColor:t,isConfirmButtonDisabled:h.length!==0,onConfirm:A,cancelText:n,onCancel:()=>Rd.close(),children:a(yl,{placeholder:i,value:c,onChange:O=>{S(typeof O=="string"?O:O.text),h&&E("")},returnKeyType:"done",onSubmitEditing:A,error:h||void 0,secureTextEntry:f,autoFocus:!0,showBorder:!0,style:{alignSelf:"stretch"}})})}var Rd,Pd=p(()=>{"use strict";s();l();V();K();fe();Rd=P("openLazy","close")});function Gr(e){var r=e;return r.body=e.content,delete r.content,r.isDismissable??=!0,Nd.show(r)}var Nd,Fu,Ld,an=p(()=>{"use strict";s();l();me();fe();Pd();Nd=P("openLazy","close");Fu=(e,r)=>Nd.openLazy({importer:x(function*(){return()=>React.createElement(e,r)})}),Ld=e=>Fu(Mu,e)});function Od(e){if(e.startsWith(Pr))return"plugin";if(e.endsWith(".json")&&Dr())return"theme"}function Dd(e,r){(e==="plugin"?H.installPlugin.bind(H):dt)(r).then(()=>{$(g.SUCCESSFULLY_INSTALLED,y("Check"))}).catch(t=>{$(t.message,y("Small"))})}var Uv,kv,Hv,Vv,Gv,Bd,Md=p(()=>{"use strict";s();l();me();xe();an();St();lr();ue();gt();Le();Gt();Se();z();Pn();jo();fe();Br();Uv=Oe(Rn("showSimpleActionSheet")),kv=P("handleClick"),{openURL:Hv}=G(()=>$t),{getChannelId:Vv}=G(()=>Kn),{getChannel:Gv}=G(()=>F("getChannel"));Bd=()=>{var e=new Array;return e.push(Q("showSimpleActionSheet",Uv,r=>{if(r[0].key==="LongPressUrl"){var{header:{title:t},options:o}=r[0],n=Od(t);n&&o.push({label:g.INSTALL_ADDON,onPress:()=>Dd(n,t)})}})),e.push(Lt("handleClick",kv,function(){var r=x(function*(t,o){var{href:n}=t[0],i=Od(n);if(!i)return o.apply(this,t);if(i==="theme"&&Gv(Vv())?.parent_id!==Fn)return o.apply(this,t);Gr({title:g.HOLD_UP,content:ur("CONFIRMATION_LINK_IS_A_TYPE",{urlType:i}),onConfirm:()=>Dd(i,n),confirmText:g.INSTALL,cancelText:g.CANCEL,secondaryConfirmText:g.OPEN_IN_BROWSER,onConfirmSecondary:()=>Hv(n)})});return function(t,o){return r.apply(this,arguments)}}())),()=>e.forEach(r=>r())}});var jd={};M(jd,{default:()=>zv});var Fd,zv,Ud=p(()=>{"use strict";s();l();Li();Id();Md();Fd=[],zv=Ni({manifest:{id:"bunny.quickinstall",name:"QuickInstall",version:"1.0.0",description:"Quickly install Vendetta plugins and themes",authors:[{name:"Vendetta Team"}]},start(){Fd=[Cd(),Bd()]},stop(){Fd.forEach(e=>e())}})});var ku={};M(ku,{deleteJsxCreate:()=>$v,onJsxCreate:()=>ju,patchJsx:()=>Uu});function ju(e,r){eo.has(e)||eo.set(e,[]),eo.get(e).push(r)}function $v(e,r){if(eo.has(e)){var t=eo.get(e);t.splice(t.indexOf(r),1),t.length===0&&eo.delete(e)}}function Uu(){var e=([t],o)=>{if(typeof t=="function"&&eo.has(t.name)){var n=eo.get(t.name);for(var i of n){var u=i(t,o);u!==void 0&&(o=u)}return o}},r=[Q("jsx",kd,e),Q("jsxs",kd,e)];return()=>r.forEach(t=>t())}var eo,kd,Oi=p(()=>{"use strict";s();l();Le();He();eo=new Map,kd=P("jsx","jsxs")});var Hd={};M(Hd,{default:()=>Wv});var Di,Yv,Wv,Vd=p(()=>{"use strict";s();l();Le();Oi();He();Di=U(kr());Li();Yv=ko("useBadges",!1),Wv=Ni({manifest:{id:"bunny.badges",name:"Badges",version:"1.0.0",description:"Adds badges to user's profile",authors:[{name:"pylixonly"}]},start(){var e={},r={};ju("RenderedBadge",(t,o)=>{o.props.id.match(/bunny-\d+-\d+/)&&Object.assign(o.props,e[o.props.id])}),Q("default",Yv,([t],o)=>{var[n,i]=(0,Di.useState)(t?r[t.userId]??=[]:[]);(0,Di.useEffect)(()=>{t&&fetch(`https://raw.githubusercontent.com/pyoncord/badges/refs/heads/main/${t.userId}.json`).then(u=>u.json()).then(u=>i(r[t.userId]=u))},[t]),t&&n.forEach((u,f)=>{e[`bunny-${t.userId}-${f}`]={source:{uri:u.url},id:`bunny-${f}`,label:u.label},o.push({id:`bunny-${t.userId}-${f}`,description:u.label,icon:"_"})})})}})});function Ni(e){return e[Symbol.for("bunny.core.plugin")]=!0,e}var Gd,Li=p(()=>{"use strict";s();l();Gd=()=>({"bunny.quickinstall":(Ud(),ze(jd)),"bunny.badges":(Vd(),ze(Hd))})});var Bi,bt,sn,ma=p(()=>{"use strict";s();l();(function(e){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"})(Bi||(Bi={}));(function(e){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"})(bt||(bt={}));(function(e){e[e.CHAT=1]="CHAT",e[e.USER=2]="USER",e[e.MESSAGE=3]="MESSAGE"})(sn||(sn={}))});var $d={};M($d,{default:()=>Jv});function zd(e){return"```js\n"+e.replaceAll("`","`"+Xv)+"\n```"}var Kv,qv,Xv,Jv,Yd=p(()=>{"use strict";s();l();me();xe();ma();Ee();z();fe();Kv=P("inspect"),qv=x(function*(){}).constructor,Xv="\u200B";Jv=()=>({name:"eval",description:g.COMMAND_EVAL_DESC,shouldHide:()=>L.enableEvalCommand===!0,options:[{name:"code",type:bt.STRING,description:g.COMMAND_EVAL_OPT_CODE,required:!0},{name:"async",type:bt.BOOLEAN,description:g.COMMAND_EVAL_OPT_ASYNC}],execute([e,r],t){return x(function*(){try{var o=Kv.inspect(r?.value?yield qv(e.value)():eval?.(e.value)),n=o.length>2e3?o.slice(0,2e3)+"...":o;xr.sendBotMessage(t.channel.id,zd(n))}catch(i){xr.sendBotMessage(t.channel.id,zd(i?.stack??i))}})()}})});var Wd={};M(Wd,{default:()=>Zv});var Zv,Kd=p(()=>{"use strict";s();l();xe();ma();_t();z();Zv=()=>({name:"debug",description:g.COMMAND_DEBUG_DESC,options:[{name:"ephemeral",type:bt.BOOLEAN,description:g.COMMAND_DEBUG_OPT_EPHEMERALLY}],execute([e],r){var t=Fr(),o=["**Bunny Debug Info**",`> Bunny: ${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(`
`);e?.value?xr.sendBotMessage(r.channel.id,o):xr.sendMessage(r.channel.id,{content:o})}})});var qd={};M(qd,{default:()=>Qv});var Qv,Xd=p(()=>{"use strict";s();l();xe();St();ma();z();Qv=()=>({name:"plugins",description:g.COMMAND_PLUGINS_DESC,options:[{name:"ephemeral",displayName:"ephemeral",type:bt.BOOLEAN,description:g.COMMAND_DEBUG_OPT_EPHEMERALLY}],execute([e],r){var t=Object.values(H.plugins).filter(Boolean);t.sort((u,f)=>u.manifest.name.localeCompare(f.manifest.name));var o=t.filter(u=>u.enabled).map(u=>u.manifest.name),n=t.filter(u=>!u.enabled).map(u=>u.manifest.name),i=[`**Installed Plugins (${t.length}):**`,...o.length>0?[`Enabled (${o.length}):`,"> "+o.join(", ")]:[],...n.length>0?[`Disabled (${n.length}):`,"> "+n.join(", ")]:[]].join(`
`);e?.value?xr.sendBotMessage(r.channel.id,i):xr.sendMessage(r.channel.id,{content:i})}})});var Mi={};M(Mi,{patchCommands:()=>Hu,registerCommand:()=>ln});function Hu(){var e=Q("getBuiltInCommands",So,([r],t)=>[...t,...da.filter(o=>(r instanceof Array?r.includes(o.type):r===o.type)&&o.__bunny?.shouldHide?.()!==!1)]);return[(Yd(),ze($d)),(Kd(),ze(Wd)),(Xd(),ze(qd))].forEach(r=>ln(r.default())),()=>{da=[],e()}}function ln(e){var r;try{r=So.getBuiltInCommands(sn.CHAT,!0,!1)}catch{r=So.getBuiltInCommands(Object.values(sn),!0,!1)}r.sort((n,i)=>parseInt(i.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??=sn.CHAT,e.inputType=Bi.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 Lt("execute",e,(n,i)=>{Promise.resolve(i.apply(e,n)).then(u=>{u&&typeof u=="object"&&xr.sendMessage(n[1].channel.id,u)}).catch(u=>{ke.error("Failed to execute command",u)})}),da.push(e),()=>da=da.filter(({id:n})=>n!==e.id)}var da,pa=p(()=>{"use strict";s();l();ma();Le();ct();z();da=[]});var Gu={};M(Gu,{dispatcher:()=>Fi,injectFluxInterceptor:()=>Vu,intercept:()=>ry});function Vu(){var e=r=>{for(var t of ji){var o=t(r);o!=null&&(o?typeof o=="object"&&(Object.assign(r,o),r[ey]=!0):r[Jd]=!0)}return Jd in r};return(Fi._interceptors??=[]).unshift(e),()=>Fi._interceptors&&=Fi._interceptors.filter(r=>r!==e)}function ry(e){return ji.push(e),()=>{ji=ji.filter(r=>r!==e)}}var Jd,ey,Fi,ji,zu=p(()=>{"use strict";s();l();z();Jd=Symbol.for("bunny.flux.blocked"),ey=Symbol.for("bunny.flux.modified"),Fi=Or,ji=[]});var $u={};M($u,{fs:()=>vn});var Zd=p(()=>{"use strict";s();l();Ct()});var Yu={};M(Yu,{jsx:()=>ku});var Qd=p(()=>{"use strict";s();l();Oi()});var Wu={};M(Wu,{assets:()=>pi,commands:()=>Mi,debug:()=>vi,flux:()=>Gu,native:()=>$u,patcher:()=>ho,react:()=>Yu,settings:()=>li,storage:()=>$s});var Ku=p(()=>{"use strict";s();l();ue();pa();_t();zu();Zd();Le();Qd();Ee();qr()});function un(e,r){var t=(...n)=>{var i=r(...n);return e.push(i),i};for(var o in r)typeof r[o]=="function"&&(t[o]=un(e,r[o]));return t}function ep(e){var r=new Array,t={...window.bunny,api:{...window.bunny.api,patcher:{before:un(r,ho.before),after:un(r,ho.after),instead:un(r,ho.instead)},commands:{...window.bunny.api.commands,registerCommand:un(r,ln)},flux:{...window.bunny.api.flux,intercept:un(r,window.bunny.api.flux.intercept)}},plugin:{createStorage:()=>Vt(`plugins/storage/${e}.json`),manifest:Te.get(e),logger:ke}};return{object:t,disposers:r}}var rp=p(()=>{"use strict";s();l();Ku();pa();qr();ct();ro()});var ya={};M(ya,{apiObjects:()=>uf,corePluginInstances:()=>ga,deleteRepository:()=>ny,disablePlugin:()=>ki,enablePlugin:()=>mf,getPluginSettingsComponent:()=>cf,initPlugins:()=>hf,installPlugin:()=>ay,isCorePlugin:()=>ff,isGreaterVersion:()=>qu,isPluginEnabled:()=>Ui,isPluginInstalled:()=>Tt,pluginInstances:()=>et,pluginRepositories:()=>Et,pluginSettings:()=>we,refreshPlugin:()=>oy,registeredPlugins:()=>Te,startPlugin:()=>No,stopPlugin:()=>Hi,uninstallPlugin:()=>np,updateAllRepository:()=>df,updateAndWritePlugin:()=>ha,updatePlugins:()=>pf,updateRepository:()=>Zu});function Re(e,r,t){if(!e)throw new Error(`[${r}] Attempted to ${t}`)}function qu(e,r){if(zo.gt(e,r))return!0;var t=zo.coerce(e);return t==null?!1:zo.prerelease(e)?.includes("dev")&&zo.eq(t,r)}function va(e){return"parentRepository"in e}function ff(e){return ga.has(e)}function cf(e){var r=et.get(e);return r&&r.SettingsComponent?r.SettingsComponent:null}function Tt(e){return we[e]!=null}function Ui(e){return!!we[e]?.enabled}function ha(e,r,t){return Xu.apply(this,arguments)}function Xu(){return Xu=x(function*(e,r,t){var o=yield op(e,`builds/${r}/manifest.json`);if(o.parentRepository=e,t){o.jsPath=`plugins/scripts/${r}.js`;var n=yield ty(e,`builds/${r}/index.js`);yield wr(o.jsPath,n)}if(yield Vs(`plugins/manifests/${r}.json`,o),Te.has(r)){var i=Te.get(r);return Object.assign(i,o)}return o}),Xu.apply(this,arguments)}function oy(e,r){return Ju.apply(this,arguments)}function Ju(){return Ju=x(function*(e,r){var t=Te.get(e);Re(t,e,"refresh a non-registered plugin"),Re(et.get(e),e,"refresh a non-started plugin"),Hi(e),va(t)&&(t=yield ha(r??t.parentRepository,e,!0)),Te.delete(e),Te.set(e,t),yield No(e)}),Ju.apply(this,arguments)}function Zu(e){return Qu.apply(this,arguments)}function Qu(){return Qu=x(function*(e){var r=yield op(e,"repo.json"),t=Et[e],o=!1;if(t)for(var i in t)r[i]||delete t[i];else{for(var n in r)if(ga.has(n))throw new Error(`Plugins can't have the same ID as any of Bunny core plugin '${n}'`);o=!0,Et[e]=r}var u=Object.keys(r).filter(h=>!h.startsWith("$"));yield Promise.all(u.map(function(){var h=x(function*(E){if(!t||!t[E]||r[E].alwaysFetch||qu(r[E].version,t[E].version))o=!0,Et[e][E]=r[E],yield ha(e,E,!!(t&&we[E]));else{var A=yield Ka(`plugins/manifests/${E}.json`);A||(yield ha(e,E,!!(t&&we[E])))}});return function(E){return h.apply(this,arguments)}}()));for(var f of u){var c=zs(`plugins/manifests/${f}.json`);if(c!==void 0){var S=Te.get(f);S&&!qu(c.version,S.version)||Te.set(f,c)}}return o}),Qu.apply(this,arguments)}function ny(e){return ef.apply(this,arguments)}function ef(){return ef=x(function*(e){Re(e!==Mn,e,"delete the official repository"),Re(Et[e],e,"delete a non-registered repository");var r=[];for(var[t,o]of Te)!va(o)||o.parentRepository!==e||(Tt(t)&&r.push(np(t)),r.push(qa(`plugins/manifests/${t}.json`)),Te.delete(t));delete Et[e],yield Promise.all(r),df()}),ef.apply(this,arguments)}function mf(e,r){return rf.apply(this,arguments)}function rf(){return rf=x(function*(e,r){Re(Tt(e),e,"enable a non-installed plugin"),r&&(yield No(e)),we[e].enabled=!0}),rf.apply(this,arguments)}function ki(e){Re(Tt(e),e,"disable a non-installed plugin"),et.has(e)&&Hi(e),we[e].enabled=!1}function ay(e,r){return tf.apply(this,arguments)}function tf(){return tf=x(function*(e,r){var t=Te.get(e);Re(t,e,"install an non-registered plugin"),Re(!Tt(e),e,"install an already installed plugin"),Re(va(t),e,"install a core plugin"),yield ha(t.parentRepository,e,!0),we[e]={enabled:!0},r&&No(e)}),tf.apply(this,arguments)}function np(e){return of.apply(this,arguments)}function of(){return of=x(function*(e){var r=Te.get(e);Re(r,e,"uninstall an unregistered plugin"),Re(Tt(e),e,"uninstall a non-installed plugin"),Re(va(r),e,"uninstall a core plugin"),et.has(e)&&Hi(e),delete we[e],yield qa(`plugins/storage/${e}.json`),yield co(`plugins/scripts/${e}.js`)}),of.apply(this,arguments)}function No(e){return nf.apply(this,arguments)}function nf(){return nf=x(function*(e,{throwIfDisabled:r=!1,disableWhenThrown:t=!0}={}){var o=Te.get(e);Re(o,e,"start a non-registered plugin"),Re(Tt(e),e,"start a non-installed plugin"),Re(!r||we[e]?.enabled,e,"start a disabled plugin"),Re(!et.has(e),e,"start an already started plugin"),yield Ka(`plugins/storage/${e}.json`);var n;if(va(o)){try{var i=yield mo(o.jsPath),u=globalEvalWithSourceUrl(`(bunny,definePlugin)=>{${i};return plugin?.default ?? plugin;}`,`bunny-plugin/${e}-${o.version}`)}catch(c){throw new Error("An error occured while parsing plugin's code, possibly a syntax error?",{cause:c})}try{var f=ep(e);if(n=u(f.object,c=>Object.assign(c,{manifest:o})),!n)throw new Error(`Plugin '${e}' does not export a valid plugin instance`);uf.set(e,f),et.set(e,n)}catch(c){throw new Error("An error occured while instantiating plugin's code",{cause:c})}}else n=ga.get(e),Re(n,e,"start a non-existent core plugin"),et.set(e,n);try{n.start?.(),we[e].enabled=!0}catch(c){throw t&&ki(e),new Error("An error occured while starting the plugin",{cause:c})}}),nf.apply(this,arguments)}function Hi(e){var r=et.get(e);Re(r,e,"stop a non-started plugin"),r.stop?.();var t=uf.get(e);t?.disposers.forEach(o=>o()),et.delete(e)}function df(){return af.apply(this,arguments)}function af(){return af=x(function*(){try{yield Zu(Mn)}catch(e){console.error("Failed to update official plugins repository",e)}yield m(Object.keys(Et).map(function(){var e=x(function*(r){r!==Mn&&(yield Zu(r))});return function(r){return e.apply(this,arguments)}}()))}),af.apply(this,arguments)}function pf(){return sf.apply(this,arguments)}function sf(){return sf=x(function*(){yield Ho(Et,we);var e=Gd();for(var r in e){var{default:t,preenabled:o}=e[r];we[r]??={enabled:o??!0},Te.set(r,t.manifest),ga.set(r,t)}yield df()}),sf.apply(this,arguments)}function hf(){return lf.apply(this,arguments)}function lf(){return lf=x(function*(){yield Ho(Et,we),yield m([...Te.keys()].map(function(){var e=x(function*(r){Ui(r)&&(yield No(r))});return function(r){return e.apply(this,arguments)}}()))}),lf.apply(this,arguments)}var ga,Te,et,uf,Et,we,tp,ty,op,ro=p(()=>{"use strict";s();l();me();Li();Ct();qr();ir();Gt();z();rp();ga=new Map,Te=new Map,et=new Map,uf=new Map,Et=Vt("plugins/repositories.json"),we=Vt("plugins/settings.json"),tp=(e,r)=>Ye(new URL(r,e),{cache:"no-store"}),ty=(e,r)=>tp(e,r).then(t=>t.text()),op=(e,r)=>tp(e,r).then(t=>t.json())});var gf,ap=p(()=>{"use strict";s();l();fe();gf=go("UserStore")});function vf({plugin:e}){var r=Tl.useStateFromStoresArray([gf],()=>(e.authors?.forEach(u=>u.id&&sy(u.id)),e.authors?.map(u=>gf.getUser(u.id)))),{authors:t}=e,o=[];if(t){var n=function(u){o.push(a(N,{onPress:()=>iy({userId:u.id}),variant:"text-md/medium",children:u.name})),o.push(", ")};for(var i of t)n(i);o.pop()}return _(_a.View,{style:{gap:4},children:[a(_a.View,{children:a(N,{variant:"heading-xl/semibold",children:e.name})}),a(_a.View,{style:{flexDirection:"row",flexShrink:1},children:t?.length&&_(_a.View,{style:{flexDirection:"row",gap:8,alignItems:"center",paddingVertical:4,paddingHorizontal:8,backgroundColor:"#00000016",borderRadius:32},children:[r.length&&a(dl,{size:"xxsmall",names:e.authors?.map(u=>u.name),totalCount:e.authors?.length,children:r.map(u=>a(hl,{size:"xxsmall",user:u}))}),a(N,{variant:"text-md/medium",children:o})]})})]})}var _a,iy,sy,ip=p(()=>{"use strict";s();l();V();Se();He();z();K();ap();_a=U(J()),iy=Ue("showUserProfileActionSheet"),{getUser:sy}=G(()=>F("getUser","fetchProfile"))});var lp={};M(lp,{default:()=>sp});function yf(e){var{onPress:r}=e;return e.onPress&&=()=>{Xt("PluginInfoActionSheet"),r?.()},a(ve,{...e})}function sp({plugin:e,navigation:r}){return e.usePluginState(),a(Nr,{children:_(xa.ScrollView,{contentContainerStyle:{gap:12,marginBottom:12},children:[_(xa.View,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:24,justifyContent:"space-between",width:"100%"},children:[a(vf,{plugin:e}),a(pl,{items:[{label:"Details",iconSource:y("CircleInformationIcon-primary"),action:()=>{}},{label:"Clear Data",iconSource:y("FileIcon"),variant:"destructive",action:()=>{}},{label:"Uninstall",iconSource:y("TrashIcon"),variant:"destructive",action:()=>{}}],children:t=>a(ve,{...t,icon:y("MoreHorizontalIcon"),variant:"secondary",size:"sm"})})]}),_(xa.View,{style:{flexDirection:"row",justifyContent:"space-around",alignContent:"center"},children:[a(yf,{label:"Configure",variant:"secondary",disabled:!e.getPluginSettingsComponent(),icon:y("WrenchIcon"),onPress:()=>{r.push("BUNNY_CUSTOM_PAGE",{title:e.name,render:e.getPluginSettingsComponent()})}}),a(yf,{label:"Refetch",variant:"secondary",icon:y("RetryIcon"),onPress:()=>{No(e.id)}}),a(yf,{label:"Copy URL",variant:"secondary",icon:y("LinkIcon"),onPress:()=>{}})]}),_(ye,{children:[a(N,{variant:"text-md/semibold",color:"text-primary",style:{marginBottom:4},children:"Description"}),a(N,{variant:"text-md/medium",children:e.description})]})]})})}var xa,up=p(()=>{"use strict";s();l();V();ro();ue();Co();K();xa=U(J());ip()});function _f(e){return{id:e.id,name:e.display.name,description:e.display.description,authors:e.display.authors,getBadges(){return[{source:{uri:Qt}}]},isEnabled:()=>Ui(e.id),isInstalled:()=>e.id in we,usePluginState(){ut([we])},toggle(r){try{r?mf(e.id,!0):ki(e.id)}catch(t){console.error(t)}},resolveSheetComponent(){return Promise.resolve().then(()=>(up(),lp))},getPluginSettingsComponent(){return cf(e.id)}}}var fp=p(()=>{"use strict";s();l();ua();ro();qr()});var mp={};M(mp,{default:()=>cp});function cp({plugin:e,navigation:r}){e.usePluginState();var t=H.plugins[e.id],o=e.getPluginSettingsComponent();return a(Nr,{children:_(Sa.ScrollView,{children:[_(Sa.View,{style:{flexDirection:"row",alignItems:"center",paddingVertical:24},children:[a(N,{variant:"heading-xl/semibold",children:e.name}),a(Sa.View,{style:{marginLeft:"auto"},children:o&&a(Y,{size:"md",text:"Configure",variant:"secondary",icon:y("WrenchIcon"),onPress:()=>{Xt("PluginInfoActionSheet"),r.push("BUNNY_CUSTOM_PAGE",{title:e.name,render:o})}})})]}),_(zt.Group,{children:[a(zt,{label:g.REFETCH,icon:a(C.Icon,{source:y("RetryIcon")}),onPress:x(function*(){t.enabled&&H.stopPlugin(e.id,!1);try{yield H.fetchPlugin(e.id),$(g.PLUGIN_REFETCH_SUCCESSFUL,y("toast_image_saved"))}catch{$(g.PLUGIN_REFETCH_FAILED,y("Small"))}t.enabled&&(yield H.startPlugin(e.id)),Xt("PluginInfoActionSheet")})}),a(zt,{label:g.COPY_URL,icon:a(C.Icon,{source:y("LinkIcon")}),onPress:()=>{Me.setString(e.id),$.showCopyToClipboard()}}),a(zt,{label:t.update?g.DISABLE_UPDATES:g.ENABLE_UPDATES,icon:a(C.Icon,{source:y("DownloadIcon")}),onPress:()=>{t.update=!t.update,$(ur("TOASTS_PLUGIN_UPDATE",{update:t.update,name:e.name}),y("toast_image_saved"))}}),a(zt,{label:g.CLEAR_DATA,icon:a(C.Icon,{variant:"danger",source:y("CopyIcon")}),variant:"danger",onPress:()=>Gr({title:g.HOLD_UP,content:ur("ARE_YOU_SURE_TO_CLEAR_DATA",{name:e.name}),confirmText:g.CLEAR,cancelText:g.CANCEL,confirmColor:"red",onConfirm:x(function*(){t.enabled&&H.stopPlugin(e.id,!1);try{yield H.fetchPlugin(e.id),$(g.PLUGIN_REFETCH_SUCCESSFUL,y("toast_image_saved"))}catch{$(g.PLUGIN_REFETCH_FAILED,y("Small"))}var n;try{Ya(e.id),n=["CLEAR_DATA_SUCCESSFUL","trash"]}catch{n=["CLEAR_DATA_FAILED","Small"]}$(ur(n[0],{name:e.name}),y(n[1])),t.enabled&&(yield H.startPlugin(e.id)),Xt("PluginInfoActionSheet")})})}),a(zt,{label:g.DELETE,icon:a(C.Icon,{variant:"danger",source:y("TrashIcon")}),variant:"danger",onPress:()=>Gr({title:g.HOLD_UP,content:ur("ARE_YOU_SURE_TO_DELETE_PLUGIN",{name:e.name}),confirmText:g.DELETE,cancelText:g.CANCEL,confirmColor:"red",onConfirm:()=>{try{H.removePlugin(e.id)}catch(n){$(String(n),y("Small"))}Xt("PluginInfoActionSheet")}})})]})]})})}var Sa,dp=p(()=>{"use strict";s();l();me();V();xe();an();St();be();ue();z();K();Co();Br();Sa=U(J())});function xf(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&&H.plugins[e.id]),usePluginState(){Z(H.plugins[e.id])},toggle(r){r?H.startPlugin(e.id):H.stopPlugin(e.id)},resolveSheetComponent(){return Promise.resolve().then(()=>(dp(),mp))},getPluginSettingsComponent(){return H.getSettings(e.id)}}}var pp=p(()=>{"use strict";s();l();St();be()});var yp={};M(yp,{default:()=>vp});function uy(e){var r=e.useItems();return a(Ro,{CardComponent:Bu,title:g.PLUGINS,searchKeywords:["name","description",t=>t.authors?.map(o=>typeof o=="string"?o:o.name).join()||""],sortOptions:{"Name (A-Z)":(t,o)=>t.name.localeCompare(o.name),"Name (Z-A)":(t,o)=>o.name.localeCompare(t.name)},safeModeHint:{message:g.SAFE_MODE_NOTICE_PLUGINS},items:r,...e})}function vp(){Z(L);var e=de.useNavigation();return a(uy,{useItems:()=>{Z(H.plugins),ut([we]);var r=Object.values(H.plugins).map(xf),t=[...Te.values()].filter(o=>Tt(o.id)&&!ff(o.id)).map(_f);return[...r,...t]},ListHeaderComponent:()=>{var r=Object.values(H.plugins).filter(t=>!t.id.startsWith(Pr)&&!t.id.startsWith(yo));return r.length?a(fn.View,{style:{marginVertical:12,marginHorizontal:10},children:a(ye,{border:"strong",children:_(fn.View,{style:{flex:1,justifyContent:"center",alignItems:"center",flexDirection:"row"},children:[_(fn.View,{style:{gap:6,flexShrink:1},children:[a(N,{variant:"heading-md/bold",children:"Unproxied Plugins Found"}),a(N,{variant:"text-sm/medium",color:"text-muted",children:"Plugins installed from unproxied sources may run unverified code in this app without your awareness."})]}),a(fn.View,{style:{marginLeft:"auto"},children:a(ve,{size:"sm",variant:"secondary",icon:y("CircleInformationIcon-primary"),style:{marginLeft:8},onPress:()=>{e.push("BUNNY_CUSTOM_PAGE",{title:"Unproxied Plugins",render:()=>a(Wn,{data:r,contentContainerStyle:{padding:8},ItemSeparatorComponent:()=>a(fn.View,{style:{height:8}}),renderItem:({item:t})=>a(ye,{children:a(N,{variant:"heading-md/semibold",children:t.id})})})})}})})]})})}):null},ListFooterComponent:()=>!1,installAction:{label:"Install a plugin",fetchFn:function(){var r=x(function*(t){if(!t.startsWith(Pr)&&!t.startsWith(yo)&&!L.developerSettings)hp("bunny-plugin-unproxied-confirmation",a(gp,{title:"Hold On!",content:"You're trying to install a plugin from an unproxied external source. This means you're trusting the creator to run their code in this app without your knowledge. Are you sure you want to continue?",extraContent:a(ye,{children:a(N,{variant:"text-md/bold",children:t})}),actions:_(ly,{children:[a(Sf,{text:"Continue",variant:"primary",onPress:()=>{H.installPlugin(t).then(()=>$(g.TOASTS_INSTALLED_PLUGIN,y("Check"))).catch(o=>hp("bunny-plugin-install-failed",a(gp,{title:"Install Failed",content:`Unable to install plugin from '${t}':`,extraContent:a(ye,{children:a(N,{variant:"text-md/normal",children:o instanceof Error?o.message:String(o)})}),actions:a(Sf,{text:"Okay",variant:"primary"})})))}}),a(Sf,{text:"Cancel",variant:"secondary"})]})}));else return yield H.installPlugin(t)});return function(t){return r.apply(this,arguments)}}()}})}var fn,hp,gp,ly,Sf,_p=p(()=>{"use strict";s();l();me();V();xe();Ri();Ad();St();be();ro();ue();Ee();qr();Br();Gt();Se();He();z();K();fn=U(J());fp();pp();({openAlert:hp}=G(()=>F("openAlert","dismissAlert"))),{AlertModal:gp,AlertActions:ly,AlertActionButton:Sf}=G(()=>F("AlertModal","AlertActions"))});function bf(e){var r=my();return a(ye,{children:_(pe,{spacing:16,children:[_(Lo.View,{style:{flexDirection:"row",alignItems:"center"},children:[_(Lo.View,{style:r.headerLeading,children:[a(N,{style:r.headerLabel,children:e.headerLabel}),e.headerSublabel&&a(N,{style:r.headerSubtitle,children:e.headerSublabel})]}),_(Lo.View,{style:[r.headerTrailing,{marginLeft:"auto"}],children:[_(Lo.View,{style:r.actions,children:[e.overflowActions&&a(ve,{onPress:()=>cy({key:"CardOverflow",header:{title:e.overflowTitle,icon:e.headerIcon&&a(Xr.Icon,{style:{marginRight:8},source:y(e.headerIcon)}),onClose:()=>fy()},options:e.overflowActions?.map(t=>({...t,icon:y(t.icon)}))}),size:"sm",variant:"secondary",icon:y("CircleInformationIcon-primary")}),e.actions?.map(({icon:t,onPress:o,disabled:n})=>a(ve,{onPress:o,disabled:n,size:"sm",variant:"secondary",icon:y(t)}))]}),e.toggleType&&(e.toggleType==="switch"?a(fl,{value:e.toggleValue(),onValueChange:e.onToggleChange}):a(Lo.TouchableOpacity,{onPress:()=>{e.onToggleChange?.(!e.toggleValue())},children:a(cl,{selected:e.toggleValue()})}))]})]}),e.descriptionLabel&&a(N,{variant:"text-md/medium",children:e.descriptionLabel})]})})}var Lo,fy,cy,my,xp=p(()=>{"use strict";s();l();V();ue();Se();K();fe();Qo();Qr();Lo=U(J()),{hideActionSheet:fy}=G(()=>F("openLazy","hideActionSheet")),{showSimpleActionSheet:cy}=G(()=>F("showSimpleActionSheet")),my=jr({card:{backgroundColor:Je?.CARD_SECONDARY_BG,borderRadius:12,overflow:"hidden"},header:{padding:0},headerLeading:{flexDirection:"column",justifyContent:"center",scale:1.2},headerTrailing:{display:"flex",flexDirection:"row",gap:15,alignItems:"center"},headerLabel:{...xt["heading-md/semibold"],color:Je.TEXT_NORMAL},headerSubtitle:{...xt["text-md/semibold"],color:Je.TEXT_MUTED},descriptionLabel:{...xt["text-md/semibold"],color:Je.TEXT_NORMAL},actions:{flexDirection:"row-reverse",alignItems:"center",gap:5},iconStyle:{tintColor:Je.LOGO_PRIMARY,opacity:.2,height:64,width:64,left:void 0,right:"30%",top:"-10%"}})});function Sp(e,r){try{pt(e?r:null)}catch(t){console.error("Error while selectAndApply,",t)}}function Ef({item:e}){Z(e);var[r,t]=React.useState(!1);if(r)return null;var{authors:o}=e.data;return a(bf,{headerLabel:e.data.name,headerSublabel:o?`by ${o.map(n=>n.name).join(", ")}`:"",descriptionLabel:e.data.description??"No description.",toggleType:L.safeMode?.enabled?void 0:"radio",toggleValue:()=>le[e.id].selected,onToggleChange:n=>{Sp(n,e)},overflowTitle:e.data.name,overflowActions:[{icon:"ic_sync_24px",label:g.REFETCH,onPress:()=>{Eo(e.id,e.selected).then(()=>{$(g.THEME_REFETCH_SUCCESSFUL,y("toast_image_saved"))}).catch(()=>{$(g.THEME_REFETCH_FAILED,y("Small"))})}},{icon:"copy",label:g.COPY_URL,onPress:()=>{Me.setString(e.id),$.showCopyToClipboard()}},{icon:"ic_message_delete",label:g.DELETE,isDestructive:!0,onPress:()=>Gr({title:g.HOLD_UP,content:ur("ARE_YOU_SURE_TO_DELETE_THEME",{name:e.data.name}),confirmText:g.DELETE,cancelText:g.CANCEL,confirmColor:"red",onConfirm:()=>{To(e.id).then(n=>{t(!0),n&&Sp(!1,e)}).catch(n=>{$(n.message,y("Small"))})}})}]})}var bp=p(()=>{"use strict";s();l();V();xe();xp();an();be();lr();ue();Ee();z();Br()});var wp={};M(wp,{default:()=>Tp});function Tp(){return Z(L),Z(le),a(Ro,{title:g.THEMES,searchKeywords:["data.name","data.description",e=>e.data.authors?.map(r=>r.name).join(", ")??""],sortOptions:{"Name (A-Z)":(e,r)=>e.data.name.localeCompare(r.data.name),"Name (Z-A)":(e,r)=>r.data.name.localeCompare(e.data.name)},installAction:{label:"Install a theme",fetchFn:dt},items:Object.values(le),safeModeHint:{message:ur("SAFE_MODE_NOTICE_THEMES",{enabled:!!L.safeMode?.currentThemeId}),footer:L.safeMode?.currentThemeId&&a(Y,{size:"small",text:g.DISABLE_THEME,onPress:()=>delete L.safeMode?.currentThemeId,style:{marginTop:8}})},CardComponent:Ef,OptionsActionSheetComponent:()=>(ut([sr]),_(Nr,{children:[a(zn,{title:"Options"}),_(Ep.View,{style:{paddingVertical:20,gap:12},children:[_(Za,{title:"Override Theme Type",value:sr.type??"auto",hasIcons:!0,onChange:e=>{sr.type=e!=="auto"?e:void 0,ht()?.data&&Wt(ht().data,{update:!0})},children:[a(xo,{icon:a(_o,{source:y("RobotIcon")}),label:"Auto",value:"auto"}),a(xo,{icon:a(_o,{source:y("ThemeDarkIcon")}),label:"Dark",value:"dark"}),a(xo,{icon:a(_o,{source:y("ThemeLightIcon")}),label:"Light",value:"light"})]}),_(Za,{title:"Chat Background",value:sr.customBackground??"shown",hasIcons:!0,onChange:e=>{sr.customBackground=e!=="shown"?e:null},children:[a(xo,{icon:a(_o,{source:y("ImageIcon")}),label:"Show",value:"shown"}),a(xo,{icon:a(_o,{source:y("DenyIcon")}),label:"Hide",value:"hidden"})]})]})]}))})}var Ep,Ap=p(()=>{"use strict";s();l();V();xe();Ri();bp();be();lr();Un();bo();ue();Ee();qr();K();Ep=U(J())});var Ta={};M(Ta,{fonts:()=>ce,installFont:()=>dy,removeFont:()=>Vi,saveFont:()=>cn,selectFont:()=>Ea,updateFonts:()=>Pf,validateFont:()=>ba});function Cp(e){return Tf.apply(this,arguments)}function Tf(){return Tf=x(function*(e){if(!e&&e!==null)throw new Error("Arg font must be a valid object or null");e?yield wr("fonts.json",JSON.stringify(e)):yield co("fonts.json")}),Tf.apply(this,arguments)}function ba(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 ce)throw new Error(`There is already a font named '${e.name}' installed`)}function cn(e){return wf.apply(this,arguments)}function wf(){return wf=x(function*(e,r=!1){var t;if(typeof e=="object"&&e.__source&&(e=e.__source),typeof e=="string")try{t=yield(yield Ye(e)).json(),t.__source=e}catch(o){throw new Error(`Failed to fetch fonts at ${e}`,{cause:o})}else t=e;ba(t);try{yield Promise.all(Object.entries(t.main).map(function(){var o=x(function*([n,i]){var u=i.split(".").pop();u!=="ttf"&&u!=="otf"&&(u="ttf");var f=`downloads/fonts/${t.name}/${n}.${u}`;(yield it(f))||(yield ls(i,f))});return function(n){return o.apply(this,arguments)}}()))}catch(o){throw new Error("Failed to download font assets",{cause:o})}return ce[t.name]=t,r&&Cp(ce[t.name]),t}),wf.apply(this,arguments)}function dy(e){return Af.apply(this,arguments)}function Af(){return Af=x(function*(e,r=!1){if(typeof e!="string"||Object.values(ce).some(o=>typeof o=="object"&&o.__source===e))throw new Error("Invalid source or font was already installed");var t=yield cn(e);r&&(yield Ea(t.name))}),Af.apply(this,arguments)}function Ea(e){return Cf.apply(this,arguments)}function Cf(){return Cf=x(function*(e){if(e&&!(e in ce))throw new Error("Selected font does not exist!");e?ce.__selected=e:delete ce.__selected,yield Cp(e==null?null:ce[e])}),Cf.apply(this,arguments)}function Vi(e){return If.apply(this,arguments)}function If(){return If=x(function*(e){var r=ce.__selected===e;r&&(yield Ea(null)),delete ce[e];try{yield ss(`downloads/fonts/${e}`)}catch{}}),If.apply(this,arguments)}function Pf(){return Rf.apply(this,arguments)}function Rf(){return Rf=x(function*(){yield kt(ce),yield m(Object.keys(ce).map(e=>cn(ce[e],ce.__selected===e)))}),Rf.apply(this,arguments)}var ce,Oo=p(()=>{"use strict";s();l();me();be();Ct();ir();ce=Ir(ar(Rr("BUNNY_FONTS")))});function py(e){var r=e.map(o=>{var{pathname:n}=new URL(o),i=n.replace(/\.[^/.]+$/,"");return i.split("/").pop()}).filter(Boolean),t=r.reduce((o,n)=>n.length<o.length?n:o,r[0]||"");return t?.replace(/-[A-Za-z]*$/,"")||null}function hy({fonts:e,setName:r}){var t=ht().data,o=t.fonts,[n,i]=(0,Pe.useState)(py(Object.values(o))),[u,f]=(0,Pe.useState)(void 0);return _(wt.View,{style:{padding:8,paddingBottom:16,gap:12},children:[a(We,{autoFocus:!0,size:"md",label:g.FONT_NAME,value:n,placeholder:n||"Whitney",onChange:i,errorMessage:u,state:u?"error":void 0}),a(N,{variant:"text-xs/normal",color:"text-muted",children:ur("THEME_EXTRACTOR_DESC",{fonts:Object.keys(o).join(g.SEPARATOR)})}),a(Y,{size:"md",variant:"primary",text:g.EXTRACT,disabled:!n,onPress:()=>{if(n)try{ba({spec:1,name:n,main:o}),r(n),Object.assign(e,o),Lf.hideActionSheet()}catch(c){f(String(c))}}})]})}function gy({fonts:e,setName:r,setSource:t}){var[o,n]=(0,Pe.useState)(""),[i,u]=(0,Pe.useState)(!1),[f,c]=(0,Pe.useState)(void 0);return _(wt.View,{style:{padding:8,paddingBottom:16,gap:12},children:[a(We,{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}),a(Y,{size:"md",variant:"primary",text:"Import",disabled:!o||i,loading:i,onPress:()=>{u(!0),x(function*(){var S=yield Ye(o,{cache:"no-store"}),h=yield S.json();ba(h),r(h.name),t(o),Object.assign(e,h.main)})().then(()=>Lf.hideActionSheet()).catch(S=>c(String(S))).finally(()=>u(!1))}})]})}function vy(e){var[r,t]=(0,Pe.useState)(e.name),[o,n]=(0,Pe.useState)(e.fontEntries[e.name]);return _(wt.View,{style:{padding:8,paddingBottom:16,gap:12},children:[a(We,{autoFocus:!0,size:"md",label:"Family Name (to override)",value:r,placeholder:"ggsans-Bold",onChange:t}),a(We,{size:"md",label:"Font URL",value:o,placeholder:"https://link.to/the/font.ttf",onChange:n}),a(Y,{size:"md",variant:"primary",text:"Apply",onPress:()=>{delete e.fontEntries[e.name],e.fontEntries[r]=o}})]})}function Nf(e,r,t){Lf.openLazy(Promise.resolve({default:()=>a(_e,{children:_(Nr,{children:[a(zn,{title:"Import Font"}),a(e,{fonts:r,...t})]})})}),"FontEditorActionSheet")}function yy({fontEntry:e}){var r=(0,Pe.useRef)(),t=(0,Pe.useRef)(),[o,n]=(0,Pe.useState)(!1),[i,u]=(0,Pe.useState)();return _(wt.View,{style:{flexDirection:"row",gap:8,justifyContent:"flex-start"},children:[a(wt.View,{style:{flex:1},children:a(We,{isRound:!0,size:"md",label:o?r.current:void 0,placeholder:o?"https://path.to/the/file.ttf":"PostScript name (e.g. ggsans-Bold)",leadingIcon:()=>o?null:a(C.Icon,{source:y("PlusSmallIcon")}),leadingText:o?r.current:"",onChange:f=>(o?t:r).current=f,errorMessage:i,state:i?"error":void 0})}),o&&a(ve,{size:"md",variant:"secondary",onPress:()=>{r.current="",n(!1)},icon:y("TrashIcon")}),a(ve,{size:"md",variant:"primary",onPress:()=>{if(!o&&r.current)n(!0);else if(o&&r.current&&t.current)try{var f=new URL(t.current);if(!f.protocol||!f.host)throw"Invalid URL";e[r.current]=t.current,r.current=void 0,t.current=void 0,n(!1)}catch(c){u(String(c))}},icon:y(o?"PlusSmallIcon":"ArrowLargeRightIcon")})]})}function wa(e){var[r,t]=(0,Pe.useState)(e.name),[o,n]=(0,Pe.useState)(),[i,u]=(0,Pe.useState)(!1),f=(0,Pe.useMemo)(()=>On(e.name?{...ce[e.name].main}:{}).proxy,[e.name]),c=Z(f),S=de.useNavigation();return a(wt.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:_(pe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:12,children:[e.name?_(Be,{title:"Actions",children:[a(C,{label:"Refetch fonts from source",icon:a(C.Icon,{source:y("RetryIcon")}),onPress:x(function*(){var h={...ce[e.name]};yield Vi(e.name),yield cn(h),S.goBack()})}),a(C,{label:"Delete font pack",icon:a(C.Icon,{source:y("TrashIcon")}),onPress:()=>Vi(e.name).then(()=>S.goBack())})]}):_(Be,{title:"Import",children:[ht()?.data?.fonts&&a(C,{label:g.LABEL_EXTRACT_FONTS_FROM_THEME,subLabel:g.DESC_EXTRACT_FONTS_FROM_THEME,icon:a(C.Icon,{source:y("HammerIcon")}),onPress:()=>Nf(hy,c,{setName:t})}),a(C,{label:"Import font entries from a link",subLabel:"Directly import from a link with a pre-configured JSON file",icon:a(C.Icon,{source:y("LinkIcon")}),onPress:()=>Nf(gy,c,{setName:t,setSource:n})})]}),a(We,{size:"lg",value:r,label:g.FONT_NAME,placeholder:"Whitney",onChange:t}),_(Be,{title:"Font Entries",children:[Object.entries(c).map(([h,E])=>a(C,{label:h,subLabel:E,trailing:_(pe,{spacing:2,direction:"horizontal",children:[a(ve,{size:"sm",variant:"secondary",icon:y("PencilIcon"),onPress:()=>Nf(vy,c,{name:h,fontEntries:c})}),a(ve,{size:"sm",variant:"secondary",icon:y("TrashIcon"),onPress:()=>delete c[h]})]})})),a(C,{label:a(yy,{fontEntry:c})})]}),a(wt.View,{style:{flexDirection:"row",justifyContent:"flex-end",bottom:0,left:0},children:a(Y,{size:"lg",loading:i,disabled:i||!r||Object.keys(c).length===0,variant:"primary",text:e.name?"Save":"Import",onPress:x(function*(){r&&(u(!0),e.name?(Object.assign(ce[e.name],{name:r,main:c,__edited:!0}),u(!1),S.goBack()):cn({spec:1,name:r,main:c,__source:o}).then(()=>S.goBack()).finally(()=>u(!1)))}),icon:y(e.name?"toast_image_saved":"DownloadIcon"),style:{marginLeft:8}})})]})})}var Pe,wt,Lf,Of=p(()=>{"use strict";s();l();me();V();xe();be();Oo();lr();ue();ir();z();K();fe();br();Pe=U(kr()),wt=U(J()),Lf=P("hideActionSheet")});var Rp=$r((JO,Ip)=>{s();l();Ip.exports=Ut()["@shopify/react-native-skia"]});function xy({font:e}){var r=_y(Jr.colors.TEXT_NORMAL),{fontFamily:t,fontSize:o}=xt["text-md/medium"],n=t.split(/,/g)[0],i=dn.useFont(e.main[n])?.getTypeface(),u=(0,Pp.useMemo)(()=>{if(!i)return null;var f=SkiaApi.TypefaceFontProvider.Make();return f.registerFont(i,n),SkiaApi.ParagraphBuilder.Make({},f).pushStyle({color:SkiaApi.Color(r),fontFamilies:[n],fontSize:o}).addText("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.").pop().build()},[i]);return a(mn.View,{style:{height:64},children:i?a(dn.Canvas,{style:{height:64},children:a(dn.Paragraph,{paragraph:u,x:0,y:0,width:300})}):a(mn.View,{style:{justifyContent:"center",alignItems:"center"},children:a(N,{color:"text-muted",variant:"heading-lg/semibold",children:"Loading..."})})})}function Df({item:e}){Z(ce);var r=de.useNavigation(),t=ce.__selected===e.name;return a(ye,{children:_(pe,{spacing:16,children:[_(mn.View,{style:{flexDirection:"row",alignItems:"center"},children:[a(mn.View,{children:a(N,{variant:"heading-lg/semibold",children:e.name})}),a(mn.View,{style:{marginLeft:"auto"},children:_(pe,{spacing:12,direction:"horizontal",children:[a(ve,{onPress:()=>{r.push("BUNNY_CUSTOM_PAGE",{title:"Edit Font",render:()=>a(wa,{name:e.name})})},size:"sm",variant:"secondary",disabled:t,icon:y("PencilIcon")}),a(Y,{size:"sm",variant:t?"secondary":"primary",text:t?"Unapply":"Apply",onPress:x(function*(){yield Ea(t?null:e.name),Gr({title:g.HOLD_UP,content:"Reload Discord to apply changes?",confirmText:g.RELOAD,cancelText:g.CANCEL,confirmColor:"red",onConfirm:dr.reload})})})]})})]}),a(xy,{font:e})]})})}var dn,Pp,mn,_y,Np=p(()=>{"use strict";s();l();me();V();xe();an();be();Oo();ue();Tr();Se();He();z();K();dn=U(Rp());Qr();Pp=U(kr()),mn=U(J());Of();({useToken:_y}=G(()=>F("useToken")))});var Op={};M(Op,{default:()=>Lp});function Lp(){Z(L),Z(ce);var e=de.useNavigation();return a(Ro,{title:g.FONTS,searchKeywords:["name","description"],sortOptions:{"Name (A-Z)":(r,t)=>r.name.localeCompare(t.name),"Name (Z-A)":(r,t)=>t.name.localeCompare(r.name)},items:Object.values(ce),safeModeHint:{message:g.SAFE_MODE_NOTICE_FONTS},CardComponent:Df,installAction:{label:"Install a font",onPress:()=>{e.push("BUNNY_CUSTOM_PAGE",{title:"Import Font",render:()=>a(wa,{})})}}})}var Dp=p(()=>{"use strict";s();l();V();xe();Ri();Of();be();Oo();Ee();z();Np()});function Bp(e,r){var[t,o]=(0,pn.useState)(2),n=()=>it(e,{prefix:r}).then(u=>o(u?1:0)).catch(()=>o(3)),i=(0,pn.useMemo)(()=>new Proxy(vn,{get(u,f,c){var S=Reflect.get(u,f,c);if(typeof S=="function")return(...h)=>{var E=(n(),S(...h));return E?.constructor?.name==="Promise"&&(o(2),E.finally(n)),E}}}),[]);return(0,pn.useEffect)(()=>void n(),[]),[t,i]}var pn,rt,Mp=p(()=>{"use strict";s();l();Ct();pn=U(kr());(function(e){e[e.FALSE=0]="FALSE",e[e.TRUE=1]="TRUE",e[e.LOADING=2]="LOADING",e[e.ERROR=3]="ERROR"})(rt||(rt={}))});function Bf({asset:e}){return a(Xr,{label:`${e.name} - ${e.id}`,trailing:a(Fp.Image,{source:e.id,style:{width:32,height:32}}),onPress:()=>{Me.setString(e.name),$.showCopyToClipboard()}})}var Fp,jp=p(()=>{"use strict";s();l();V();z();K();Br();Fp=U(J())});function Mf(){var[e,r]=React.useState(""),t=(0,Up.useMemo)(()=>Array.from(qt()),[]);return a(_e,{children:_(Gi.View,{style:{flex:1},children:[a(Zt,{style:{margin:10},onChangeText:o=>r(o)}),a(Gi.FlatList,{data:t.filter(o=>o.name.includes(e)||o.id.toString()===e),renderItem:({item:o})=>a(Bf,{asset:o}),ItemSeparatorComponent:$n,keyExtractor:o=>o.name})]})})}var Up,Gi,kp=p(()=>{"use strict";s();l();V();jp();ue();K();br();Up=U(kr()),Gi=U(J())});var Vp={};M(Vp,{default:()=>Hp});function Hp(){var[e,r]=Bp("preloads/reactDevtools.js"),t=Ty(),o=de.useNavigation();return Z(L),Z(Sr),a(_e,{children:a(zi.ScrollView,{style:{flex:1},contentContainerStyle:{paddingBottom:38},children:_(pe,{style:{paddingVertical:24,paddingHorizontal:12},spacing:24,children:[a(We,{label:g.DEBUGGER_URL,placeholder:"127.0.0.1:9090",size:"md",leadingIcon:()=>a(Yn,{style:t.leadingText,children:"ws://"}),defaultValue:L.debuggerUrl,onChange:n=>L.debuggerUrl=n}),_(Be,{title:g.DEBUG,children:[a(C,{label:g.CONNECT_TO_DEBUG_WEBSOCKET,icon:a(C.Icon,{source:y("copy")}),onPress:()=>na(L.debuggerUrl)}),ea()&&a(yr,{children:a(C,{label:g.CONNECT_TO_REACT_DEVTOOLS,icon:a(C.Icon,{source:y("ic_badge_staff")}),onPress:()=>window[sm()||"__vendetta_rdc"]?.connectToDevTools({host:L.debuggerUrl.split(":")?.[0],resolveRNStyle:zi.StyleSheet.flatten})})})]}),kl()&&a(yr,{children:_(Be,{title:"Loader config",children:[a(mt,{label:g.LOAD_FROM_CUSTOM_URL,subLabel:g.LOAD_FROM_CUSTOM_URL_DEC,icon:a(C.Icon,{source:y("copy")}),value:Sr.customLoadUrl.enabled,onValueChange:n=>{Sr.customLoadUrl.enabled=n}}),Sr.customLoadUrl.enabled&&a(C,{label:a(We,{defaultValue:Sr.customLoadUrl.url,size:"md",onChange:n=>Sr.customLoadUrl.url=n,placeholder:"http://localhost:4040/vendetta.js",label:g.BUNNY_URL})}),ea()&&Xe()&&a(mt,{label:g.LOAD_REACT_DEVTOOLS,subLabel:`${g.VERSION}: ${lm()}`,icon:a(C.Icon,{source:y("ic_badge_staff")}),value:Sr.loadReactDevTools,onValueChange:n=>{Sr.loadReactDevTools=n}})]})}),_(Be,{title:"Other",children:[a(C,{arrow:!0,label:g.ASSET_BROWSER,icon:a(C.Icon,{source:y("ic_image")}),trailing:C.Arrow,onPress:()=>o.push("BUNNY_CUSTOM_PAGE",{title:g.ASSET_BROWSER,render:Mf})}),a(C,{arrow:!0,label:g.ERROR_BOUNDARY_TOOLS_LABEL,icon:a(C.Icon,{source:y("ic_warning_24px")}),onPress:()=>by({key:"ErrorBoundaryTools",header:{title:"Which ErrorBoundary do you want to trip?",icon:a(C.Icon,{style:{marginRight:8},source:y("ic_warning_24px")}),onClose:()=>Sy()},options:[{label:g.BUNNY,onPress:()=>o.push("BUNNY_CUSTOM_PAGE",{render:()=>a("undefined",{})})},{label:"Discord",isDestructive:!0,onPress:()=>o.push("BUNNY_CUSTOM_PAGE",{noErrorBoundary:!0})}]})}),a(C,{label:g.INSTALL_REACT_DEVTOOLS,subLabel:g.RESTART_REQUIRED_TO_TAKE_EFFECT,icon:a(C.Icon,{source:y("DownloadIcon")}),trailing:a(Y,{size:"sm",loading:e===rt.LOADING,disabled:e===rt.LOADING,variant:e===rt.TRUE?"secondary":"primary",text:e===rt.TRUE?g.UNINSTALL:g.INSTALL,onPress:x(function*(){e===rt.FALSE?r.downloadFile(Ey,"preloads/reactDevtools.js"):e===rt.TRUE&&r.removeFile("preloads/reactDevtools.js")}),icon:y(e===rt.TRUE?"ic_message_delete":"DownloadIcon"),style:{marginLeft:8}})}),a(mt,{label:g.ENABLE_EVAL_COMMAND,subLabel:g.ENABLE_EVAL_COMMAND_DESC,icon:a(C.Icon,{source:y("PencilIcon")}),value:L.enableEvalCommand,onValueChange:n=>{L.enableEvalCommand=n}})]})]})})})}var zi,Sy,by,Ey,Ty,Gp=p(()=>{"use strict";s();l();me();V();xe();Mp();kp();be();ue();_t();gt();Ee();Se();z();K();fe();Qo();br();Qr();zi=U(J()),{hideActionSheet:Sy}=G(()=>F("openLazy","hideActionSheet")),{showSimpleActionSheet:by}=G(()=>F("showSimpleActionSheet")),Ey="https://raw.githubusercontent.com/amsyarasyiq/rdt-embedder/main/dist.js",Ty=jr({leadingText:{...xt["heading-md/semibold"],color:Je.TEXT_MUTED,marginRight:-4}})});function Ff(){Ti({name:"Bunny",items:[{key:"BUNNY",title:()=>g.BUNNY,icon:{uri:Qt},render:()=>Promise.resolve().then(()=>(yd(),vd)),useTrailing:()=>"(e2a05a7-main)"},{key:"BUNNY_PLUGINS",title:()=>g.PLUGINS,icon:y("ActivitiesIcon"),render:()=>Promise.resolve().then(()=>(_p(),yp))},{key:"BUNNY_THEMES",title:()=>g.THEMES,icon:y("PaintPaletteIcon"),render:()=>Promise.resolve().then(()=>(Ap(),wp)),usePredicate:()=>Dr()},{key:"BUNNY_FONTS",title:()=>g.FONTS,icon:y("ic_add_text"),render:()=>Promise.resolve().then(()=>(Dp(),Op)),usePredicate:()=>cm()},{key:"BUNNY_DEVELOPER",title:()=>g.DEVELOPER,icon:y("WrenchIcon"),render:()=>Promise.resolve().then(()=>(Gp(),Vp)),usePredicate:()=>Z(L).developerSettings??!1}]}),Ti({name:"Vendetta",items:[]})}var ua=p(()=>{"use strict";s();l();id();xe();be();ue();gt();Ee();tn()});var $p=$r((SB,zp)=>{s();l();zp.exports=Ut().lodash});var Wp=$r((TB,Yp)=>{s();l();Yp.exports=Ut().util});var $i,Kp,qp,Xp=p(()=>{"use strict";s();l();V();an();be();be();lr();ue();pa();_t();gt();Le();Ee();ir();Zs();ct();He();z();K();K();Qo();br();Qr();Br();Mo();$i=U(kr()),Kp=U(J());St();qp=()=>{var e=t=>o=>t(Cn.createSimpleFilter(o,Dc(new Error().stack))),r=window.vendetta={patcher:{before:Tn.before,after:Tn.after,instead:Tn.instead},metro:{modules:window.modules,find:e(Oe),findAll:e(jt),findByProps:(...t)=>{t.length===1&&t[0]==="KeyboardAwareScrollView"&&t.push("listenToKeyboardEvents");var o=F(...t);if(o==null&&t.includes("ActionSheetTitleHeader")){var n=F("ActionSheetRow");return{...n,ActionSheetTitleHeader:n.BottomSheetTitleHeader,ActionSheetContentContainer:({children:i})=>((0,$i.useEffect)(()=>console.warn("Discord has removed 'ActionSheetContentContainer', please move into something else. This has been temporarily replaced with View"),[]),(0,$i.createElement)(Kp.View,null,i))}}return o},findByPropsAll:(...t)=>ws(...t),findByName:(t,o)=>t==="create"&&typeof o>"u"?ko("create",!1).default:ko(t,o??!0),findByNameAll:(t,o=!0)=>As(t,o),findByDisplayName:(t,o=!0)=>Cs(t,o),findByDisplayNameAll:(t,o=!0)=>Rs(t,o),findByTypeName:(t,o=!0)=>Ps(t,o),findByTypeNameAll:(t,o=!0)=>Ns(t,o),findByStoreName:t=>Ls(t),common:{constants:Lr,channels:Kn,i18n:Go,url:$t,toasts:qn,stylesheet:{createThemedStyleSheet:fu},clipboard:Me,assets:_l,invites:xl,commands:So,navigation:Sl,navigationStack:bl,NavigationNative:de,Flux:El,FluxDispatcher:Or,React:Xn,ReactNative:ti,moment:Eu(),chroma:$o(),lodash:$p(),util:Wp()}},constants:{DISCORD_SERVER:"https://discord.gg/n9QQ4XhhJP",GITHUB:"https://github.com/vendetta-mod",PROXY_PREFIX:"https://vd-plugins.github.io/proxy",HTTP_REGEX:/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/,HTTP_REGEX_MULTI:/https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*)/g,DISCORD_SERVER_ID:"1015931589865246730",PLUGINS_CHANNEL_ID:"1091880384561684561",THEMES_CHANNEL_ID:"1091880434939482202"},utils:{findInReactTree:(t,o)=>vr(t,o),findInTree:(t,o,n)=>ft(t,o,n),safeFetch:(t,o,n)=>Ye(t,o,n),unfreeze:t=>Object.isFrozen(t)?{...t}:t,without:(t,...o)=>bn(t,o)},debug:{connectToDebugger:t=>na(t),getDebugInfo:()=>Fr()},ui:{components:{Forms:Qa,General:ti,Alert:kn,Button:al,HelpMessage:(...t)=>a(Hn,{...t}),SafeAreaView:(...t)=>a(Vn,{...t}),Summary:la,ErrorBoundary:_e,Codeblock:Ur,Search:Zt},toasts:{showToast:(t,o)=>$(t,o)},alerts:{showConfirmationAlert:t=>Gr(t),showCustomAlert:(t,o)=>Fu(t,o),showInputAlert:t=>Ld(t)},assets:{all:new Proxy({},{get(t,o){if(typeof o=="string"){if(t[o])return t[o];for(var n of qt())if(n.name)return t[o]=n}},ownKeys(t){var o=new Set;for(var n of qt())t[n.name]=n,o.add(n.name);return[...o]}}),find:t=>Jo(t),getAssetByName:t=>Jo(t),getAssetByID:t=>Jo(t),getAssetIDByName:t=>y(t)},semanticColors:Je,rawColors:Om},plugins:{plugins:H.plugins,fetchPlugin:t=>H.fetchPlugin(t),installPlugin:(t,o=!0)=>H.installPlugin(t,o),startPlugin:t=>H.startPlugin(t),stopPlugin:(t,o=!0)=>H.stopPlugin(t,o),removePlugin:t=>H.removePlugin(t),getSettings:t=>H.getSettings(t)},themes:{themes:le,fetchTheme:(t,o)=>Eo(t,o),installTheme:t=>dt(t),selectTheme:t=>pt(t==="default"?null:le[t]),removeTheme:t=>To(t),getCurrentTheme:()=>Kt(),updateThemes:()=>ii()},commands:{registerCommand:ln},storage:{createProxy:t=>On(t),useProxy:t=>Z(t),createStorage:t=>ar(t),wrapSync:t=>Ir(t),awaitSyncWrapper:t=>kt(t),createMMKVBackend:t=>Rr(t),createFileBackend:t=>(Ie()&&t==="vendetta_theme.json"&&(t="pyoncord/current-theme.json"),vo(t))},settings:L,loader:{identity:jl()??void 0,config:Sr},logger:{log:(...t)=>console.log(...t),info:(...t)=>console.info(...t),warn:(...t)=>console.warn(...t),error:(...t)=>console.error(...t),time:(...t)=>console.time(...t),trace:(...t)=>console.trace(...t),verbose:(...t)=>console.log(...t)},version:oa,unload:()=>{delete window.vendetta}};return()=>r.unload()}});var Jp=p(()=>{"use strict";s();l()});var Zp=p(()=>{"use strict";s();l()});var jf={};M(jf,{alerts:()=>Nu,components:()=>xi,settings:()=>Au,sheets:()=>mu,styles:()=>cu,toasts:()=>hi});var Qp=p(()=>{"use strict";s();l();Ci();br();tn();Co();Qr();Br()});var Uf={};M(Uf,{_jsx:()=>nl,api:()=>Wu,fonts:()=>Ta,managers:()=>wy,metro:()=>ni,plugins:()=>ya,themes:()=>wo,ui:()=>jf,unload:()=>Aa,utils:()=>Ja});function Aa(){for(var e of eh)typeof e=="function"&&e();delete window.bunny}var wy,eh,rh=p(()=>{"use strict";s();l();Jp();Zp();Oo();ro();lr();Ku();Qp();ir();He();Oo();ro();lr();V();Se();wy=Ce(()=>(console.warn("bunny.managers.* is deprecated, and moved the top level (bunny.*). bunny.managers will be eventually removed soon"),{get fonts(){return Ta},get plugins(){return ya},get themes(){return wo}}),{hint:"object"}),eh=[];Aa.push=e=>{eh.push(e)}});var th={};M(th,{default:()=>Ay});var Ay,oh=p(()=>{"use strict";s();l();me();ed();ad();xe();ua();Xp();St();Oo();ro();lr();pa();_t();zu();Oi();ct();tn();rh();Ay=x(function*(){yield Promise.all([Fl(),Vu(),wu(),au(),Hu(),Uu(),qp(),Rm(),Ff(),nd(),bu(),pf()]).then(e=>e.forEach(r=>r&&Aa.push(r))),window.bunny=Uf,H.initPlugins().then(e=>Aa.push(e)).catch(()=>alert("Failed to initialize Vendetta plugins")),hf(),Pf(),ke.log("Bunny is ready!")})});s();l();me();var{instead:Cy}=La();globalThis.window=globalThis;function nh(){return kf.apply(this,arguments)}function kf(){return kf=x(function*(){try{Object.freeze=Object.seal=Object,yield(Dt(),ze(Em)).initMetroCache(),yield(oh(),ze(th)).default()}catch(t){var{ClientInfoManager:e}=(Tr(),ze(Wf)),r=t instanceof Error?t.stack:void 0;console.log(r??t?.toString?.()??t),alert([`Failed to load Bunny!
`,`Build Number: ${e.Build}`,"Bunny: e2a05a7-main",r||t?.toString?.()].join(`
`))}}),kf.apply(this,arguments)}if(typeof globalThis.__r<"u")nh();else{var e=function(r){var t=window.__fbBatchedBridge,o=new Array,n=Cy("callFunctionReturnFlushedQueue",t,(u,f)=>u[0]==="AppRegistry"||!t.getCallableModule(u[0])?(o.push(u),t.flushedQueue()):f.apply(t,u)),i=function(){var u=x(function*(){yield nh(),n(),r(0),o.forEach(f=>t.getCallableModule(f[0])&&t.__callFunction(...f))});return function(){return u.apply(this,arguments)}}();i()};Iy=e,Object.defineProperties(globalThis,{__r:{configurable:!0,get:()=>Yi,set(r){Yi=function(o){if(o===0)window.modules instanceof Map&&(window.modules=Object.fromEntries([...window.modules])),e(r),Yi=r;else return r(o)}}},__d:{configurable:!0,get(){return window.Object&&!window.modules&&(window.modules=window.__c?.()),this.value},set(r){this.value=r}}})}var Yi,Iy;})();
//# sourceURL=bunny