@tenno-companion/core 0.2.17 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.mjs CHANGED
@@ -1 +1 @@
1
- import{a as O,b as x,c as D,d as H,e as S,f as T,g as C,h as R,i as W,j as A}from"./chunk-AJJNLER4.mjs";import{e as f,h as w}from"./chunk-CVH7OE4T.mjs";import{b as g,d as h}from"./chunk-5D5L2KXD.mjs";import{a as u}from"./chunk-CAXAR7DE.mjs";var U=u({"../../data/stats/factions.json":()=>import("./factions-HCRW72KS.mjs"),"../../data/stats/missionTypes.json":()=>import("./missionTypes-UVZI4JJ4.mjs"),"../../data/stats/railjackIntrinsics.json":()=>import("./railjackIntrinsics-LQINTVAY.mjs"),"../../data/stats/regions.json":()=>import("./regions-DLIYJT7G.mjs"),"../../data/stats/sentinels.json":()=>import("./sentinels-J2NG46RT.mjs"),"../../data/stats/warframes.json":()=>import("./warframes-27RF4JFU.mjs"),"../../data/stats/weapons.json":()=>import("./weapons-HRZOBFKX.mjs")});var B=u({"../../data/dicts/de.json":()=>import("./de-IUQUDG3T.mjs"),"../../data/dicts/en.json":()=>import("./en-OPLP7CSM.mjs"),"../../data/dicts/es.json":()=>import("./es-5MSMP7IQ.mjs"),"../../data/dicts/fr.json":()=>import("./fr-534GQY2S.mjs"),"../../data/dicts/it.json":()=>import("./it-2ZP3IUA2.mjs"),"../../data/dicts/ja.json":()=>import("./ja-NMFQYCPY.mjs"),"../../data/dicts/ko.json":()=>import("./ko-DB57VL5K.mjs"),"../../data/dicts/pl.json":()=>import("./pl-CHIVZ5EE.mjs"),"../../data/dicts/pt.json":()=>import("./pt-XRQXDVLG.mjs"),"../../data/dicts/ru.json":()=>import("./ru-EHXHOKYA.mjs"),"../../data/dicts/tc.json":()=>import("./tc-BJ2ZHCL5.mjs"),"../../data/dicts/th.json":()=>import("./th-4HFANIHZ.mjs"),"../../data/dicts/tr.json":()=>import("./tr-M5D4S4CI.mjs"),"../../data/dicts/uk.json":()=>import("./uk-WDKWCBWP.mjs"),"../../data/dicts/zh.json":()=>import("./zh-OKO4CZWE.mjs")});var n=class{constructor(){}static async getHydratedData(e,{locale:t,productCategory:a,skipSorting:l}={}){let i=t&&Object.keys(h).includes(t)?t:"en",[y,p]=await Promise.all([U(`../../data/stats/${e}.json`).then(r=>r.default),B(`../../data/dicts/${i}.json`).then(r=>r.default)]),s=Object.entries(y).filter(([r,c])=>a?"productCategory"in c&&c.productCategory===a:!0).map(([r,c])=>({...this.translateRecursive(c,p),uniqueName:r})),m=l?s:g(s,{locale:t}),d={};for(let r of m)d[r.uniqueName]=r;return d}static translateRecursive(e,t){if(typeof e=="string"){let a=e.startsWith("/Lotus/Language")?t[e]??e:e;return a=a.replace("<ARCHWING>","").trim(),a}if(Array.isArray(e))return e.map(a=>this.translateRecursive(a,t));if(e!==null&&typeof e=="object"){let a={};for(let[l,i]of Object.entries(e))a[l]=this.translateRecursive(i,t);return a}return e}},k=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("factions",{locale:t});return new O(a,t)}},M=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("missionTypes",{locale:t});return new x(a,t)}},b=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("railjackIntrinsics",{locale:t,skipSorting:!0});return new D(a,t)}},I=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("regions",{locale:t});return new H(a,t)}},j=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("sentinels",{locale:t});return new S(a,t)}},N=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("warframes",{locale:t,productCategory:"Suits"});return new T(a,t)}},_=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("warframes",{locale:t,productCategory:"SpaceSuits"});return new C(a,t)}},E=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("warframes",{locale:t,productCategory:"MechSuits"});return new R(a,t)}},L=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("weapons",{locale:t});return new W(a,t)}},G=class extends n{static async create(e={}){let{locale:t="en"}=e,[a,l]=await Promise.all([this.getHydratedData("sentinels",{locale:t}),this.getHydratedData("weapons",{locale:t})]),i={};for(let[p,s]of Object.entries(a))i[p]=s;for(let[p,s]of Object.entries(l)){let{productCategory:m}=s,d=m==="SentinelWeapons",r="partType"in s&&w.includes(s.partType),c="partType"in s&&f.includes(s.partType);(d||r||c)&&(i[p]=s)}let y=g(i,{locale:t});return new A(y,t)}};export{_ as ArchwingProvider,n as BaseFactory,k as FactionProvider,M as MissionTypeProvider,E as NecramechProvider,G as PetProvider,b as RailjackIntrinsicProvider,I as RegionProvider,j as SentinelProvider,N as WarframeProvider,L as WeaponProvider};
1
+ import{a as O,b as x,c as D,d as H,e as S,f as T,g as C,h as R,i as W,j as A}from"./chunk-QRG4TXHZ.mjs";import{e as f,h as w}from"./chunk-CVH7OE4T.mjs";import{b as g,d as h}from"./chunk-3BQTZNCD.mjs";import{a as u}from"./chunk-CAXAR7DE.mjs";var U=u({"../../data/stats/factions.json":()=>import("./factions-HCRW72KS.mjs"),"../../data/stats/missionTypes.json":()=>import("./missionTypes-UVZI4JJ4.mjs"),"../../data/stats/railjackIntrinsics.json":()=>import("./railjackIntrinsics-LQINTVAY.mjs"),"../../data/stats/regions.json":()=>import("./regions-DLIYJT7G.mjs"),"../../data/stats/sentinels.json":()=>import("./sentinels-J2NG46RT.mjs"),"../../data/stats/warframes.json":()=>import("./warframes-27RF4JFU.mjs"),"../../data/stats/weapons.json":()=>import("./weapons-Y6ATIVB4.mjs")});var B=u({"../../data/dicts/de.json":()=>import("./de-JKDZHZNI.mjs"),"../../data/dicts/en.json":()=>import("./en-OPLP7CSM.mjs"),"../../data/dicts/es.json":()=>import("./es-5MSMP7IQ.mjs"),"../../data/dicts/fr.json":()=>import("./fr-534GQY2S.mjs"),"../../data/dicts/it.json":()=>import("./it-2ZP3IUA2.mjs"),"../../data/dicts/ja.json":()=>import("./ja-NMFQYCPY.mjs"),"../../data/dicts/ko.json":()=>import("./ko-DB57VL5K.mjs"),"../../data/dicts/pl.json":()=>import("./pl-CHIVZ5EE.mjs"),"../../data/dicts/pt.json":()=>import("./pt-XRQXDVLG.mjs"),"../../data/dicts/ru.json":()=>import("./ru-EHXHOKYA.mjs"),"../../data/dicts/tc.json":()=>import("./tc-BJ2ZHCL5.mjs"),"../../data/dicts/th.json":()=>import("./th-4HFANIHZ.mjs"),"../../data/dicts/tr.json":()=>import("./tr-M5D4S4CI.mjs"),"../../data/dicts/uk.json":()=>import("./uk-WDKWCBWP.mjs"),"../../data/dicts/zh.json":()=>import("./zh-OKO4CZWE.mjs")});var n=class{constructor(){}static async getHydratedData(e,{locale:t,productCategory:a,skipSorting:l}={}){let i=t&&Object.keys(h).includes(t)?t:"en",[y,p]=await Promise.all([U(`../../data/stats/${e}.json`).then(r=>r.default),B(`../../data/dicts/${i}.json`).then(r=>r.default)]),s=Object.entries(y).filter(([r,c])=>a?"productCategory"in c&&c.productCategory===a:!0).map(([r,c])=>({...this.translateRecursive(c,p),uniqueName:r})),m=l?s:g(s,{locale:t}),d={};for(let r of m)d[r.uniqueName]=r;return d}static translateRecursive(e,t){if(typeof e=="string"){let a=e.startsWith("/Lotus/Language")?t[e]??e:e;return a=a.replace("<ARCHWING>","").trim(),a}if(Array.isArray(e))return e.map(a=>this.translateRecursive(a,t));if(e!==null&&typeof e=="object"){let a={};for(let[l,i]of Object.entries(e))a[l]=this.translateRecursive(i,t);return a}return e}},k=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("factions",{locale:t});return new O(a,t)}},M=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("missionTypes",{locale:t});return new x(a,t)}},b=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("railjackIntrinsics",{locale:t,skipSorting:!0});return new D(a,t)}},I=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("regions",{locale:t});return new H(a,t)}},j=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("sentinels",{locale:t});return new S(a,t)}},N=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("warframes",{locale:t,productCategory:"Suits"});return new T(a,t)}},_=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("warframes",{locale:t,productCategory:"SpaceSuits"});return new C(a,t)}},E=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("warframes",{locale:t,productCategory:"MechSuits"});return new R(a,t)}},L=class extends n{static async create(e={}){let{locale:t="en"}=e,a=await this.getHydratedData("weapons",{locale:t});return new W(a,t)}},G=class extends n{static async create(e={}){let{locale:t="en"}=e,[a,l]=await Promise.all([this.getHydratedData("sentinels",{locale:t}),this.getHydratedData("weapons",{locale:t})]),i={};for(let[p,s]of Object.entries(a))i[p]=s;for(let[p,s]of Object.entries(l)){let{productCategory:m}=s,d=m==="SentinelWeapons",r="partType"in s&&w.includes(s.partType),c="partType"in s&&f.includes(s.partType);(d||r||c)&&(i[p]=s)}let y=g(i,{locale:t});return new A(y,t)}};export{_ as ArchwingProvider,n as BaseFactory,k as FactionProvider,M as MissionTypeProvider,E as NecramechProvider,G as PetProvider,b as RailjackIntrinsicProvider,I as RegionProvider,j as SentinelProvider,N as WarframeProvider,L as WeaponProvider};