bc-deeplib 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/deeplib.js CHANGED
@@ -1,4 +1,4 @@
1
- var de=Object.defineProperty;var s=(t,e)=>de(t,"name",{value:e,configurable:!0});var B=class{static{s(this,"BaseModule")}get settingsScreen(){return null}get settingsStorage(){return this.constructor.name}get settings(){return this.settingsStorage?(u.playerStorage?u.playerStorage[this.settingsStorage]||this.registerDefaultSettings(u.playerStorage):this.registerDefaultSettings(u.playerStorage),u.playerStorage[this.settingsStorage]):null}set settings(e){this.settingsStorage&&(u.playerStorage?u.playerStorage[this.settingsStorage]||this.registerDefaultSettings(u.playerStorage):this.registerDefaultSettings(u.playerStorage),u.playerStorage[this.settingsStorage]=e)}init(){}registerDefaultSettings(e){let i=this.settingsStorage,n=this.defaultSettings;!i||!n||Object.entries(this.defaultSettings).length!==0&&(e[i]=b(this.defaultSettings,e[i],{concatArrays:!1,matchingOnly:!0}))}get defaultSettings(){return null}load(){}run(){}unload(){}};async function T(t){if(!L.instance)throw new Error("Attempt to set subscreen before init");let e=typeof t=="string"?t:t?.options.name,i=`${m.id}_${e}`;await CommonSetScreen("DeepLibMod",`${i}`)}s(T,"setSubscreen");var m=class t{static{s(this,"BaseSubscreen")}static currentElements=[];static currentPage=1;options;module;static id=CommonGenerateUniqueID();static subscreenOptions={drawCharacter:!0,name:"UNKNOWN",icon:"",background:"Sheet",doShowExitButton:!0,doShowTitle:!0,settingsWidth:1e3,forceUpCharacter:!1};static menu=null;constructor(e){e&&(this.module=e);let i=this.constructor;this.options={...t.subscreenOptions,...i.subscreenOptions};let n=this.options.name,o=`${t.id}_${n}`;C(`${o}Load`,this.load.bind(this)),C(`${o}Run`,this.run.bind(this)),C(`${o}Click`,this.click.bind(this)),C(`${o}Exit`,this.exit.bind(this)),C(`${o}Unload`,this.unload.bind(this)),C(`${o}Resize`,this.resize.bind(this)),C(`${o}Background`,this.options.background),CommonCSVCache[ScreenFileGetTranslation("DeepLibMod",o)]=[]}async setSubscreen(e){return await T(e)}get settings(){return this.module.settings}set settings(e){this.module.settings=e}get pageStructure(){return[[]]}get currentPage(){return this.pageStructure[Math.min(t.currentPage-1,this.pageStructure.length-1)]}getPageLabel(){return CommonStringPartitionReplace(d("settings.page.label"),{$currentPage$:`${t.currentPage}`,$totalPages$:`${this.pageStructure.length}`}).join("")}changePage(e,i){let n=this.pageStructure.length;e>n&&(e=1),e<1&&(e=n),t.currentPage=e,this.managePageElementsVisibility(),i(this.getPageLabel())}managePageElementsVisibility(){this.pageStructure.forEach((e,i)=>{e.forEach(n=>{let o=ElementWrap(`${n.id}-container`)??ElementWrap(`${n.id}`);i!==t.currentPage-1?o&&G.hide(o):o&&G.unhide(o)})})}load(){for(let n of f())n.settingsScreen&&(!n.settings||!Object.keys(n.settings).length)&&n.registerDefaultSettings(u.playerStorage);t.currentPage=1,g.getSubscreen();let e=g.getSettingsDiv();if(g.appendToSubscreen(e),t.menu=ElementMenu.Create("deeplib-nav-menu",[]),g.appendToSubscreen(t.menu),this.pageStructure.length>1){let n=c.createBackNext({id:"deeplib-page-back-next",next:s(({setLabel:o})=>this.changePage(t.currentPage+1,o),"next"),initialNextTooltip:d("settings.button.next_button_hint"),back:s(({setLabel:o})=>this.changePage(t.currentPage-1,o),"back"),initialPrevTooltip:d("settings.button.prev_button_hint"),initialLabel:this.getPageLabel()});t.menu.prepend(n)}if(this.options.help){let n=this.options.help.onClick,o=s(()=>{},"action");typeof n=="string"||n instanceof URL?o=s(()=>window.open(n,"_blank"),"action"):typeof n=="function"?o=n:n instanceof t&&(o=s(async()=>await this.setSubscreen(n),"action")),this.options.help.tooltip??=d("settings.button.help_button_hint"),this.options.help.icon??=`${PUBLIC_URL}/dl_images/bookmark.svg`;let r=c.createButton({id:"deeplib-help",size:[90,90],onClick:o,options:{image:this.options.help.icon,tooltip:this.options.help.tooltip}});t.menu.append(r)}if(this.options.doShowTitle){let n=c.createLabel({id:"deeplib-subscreen-title",label:d(`${this.options.name}.title`).replace("$ModVersion",MOD_VERSION_CAPTION)});g.appendToSubscreen(n)}if(this.options.doShowExitButton){let n=c.createButton({id:"deeplib-exit",size:[90,90],onClick:s(()=>{this.exit()},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/exit.svg`,tooltip:d("settings.button.back_button_hint")}});t.menu.append(n)}let i=c.createTooltip();g.appendToSubscreen(i),this.pageStructure.forEach(n=>n.forEach(o=>{let r;switch(o.type){case"text":case"number":case"color":r=c.createInput(o);break;case"checkbox":r=c.createCheckbox(o);break;case"button":r=c.createButton(o);break;case"label":r=c.createLabel(o);break;case"custom":r=c.createCustom(o);break;case"dropdown":r=c.createDropdown(o);break}g.appendToSettingsDiv(r)})),this.managePageElementsVisibility(),this.options.drawCharacter&&this.options.forceUpCharacter?CharacterAppearanceForceUpCharacter=Player.MemberNumber:CharacterAppearanceForceUpCharacter=-1}run(){this.options.drawCharacter&&DrawCharacter(Player,50,50,.9,!1)}click(){}exit(){CharacterAppearanceForceUpCharacter=-1,CharacterLoadCanvas(Player);let e=typeof this.options.returnScreen=="function"?this.options.returnScreen():this.options.returnScreen;e instanceof t||!e?T(e??"mainmenu").then(()=>{u.save()}):Array.isArray(e)&&CommonSetScreen(...e).then(()=>{u.save()})}resize(e=!1){let i=this.options.drawCharacter?0:380,n=g.getSubscreen(),o=g.getSettingsDiv();ElementSetPosition(n,0,0),ElementSetSize(n,2e3,1e3),ElementSetFontSize(n,"auto"),ElementSetPosition(o,530-i,170),ElementSetSize(o,this.options.settingsWidth??1e3+i,660),this.options.doShowTitle&&(ElementSetPosition("deeplib-subscreen-title",530-i,75),ElementSetSize("deeplib-subscreen-title",800,90)),ElementSetPosition("deeplib-nav-menu",1905,75,"top-right"),ElementSetSize("deeplib-nav-menu",null,90),ElementSetSize(c.getTooltip()||"",1500),t.currentElements.forEach(r=>{let a=r[0],l=r[1];G.autoSetPosition(l.id??a.id,l.position),G.autoSetSize(l.id??a.id,l.size)}),o&&(G.hasOverflow(o)?.vertical?o.classList.add("deeplib-overflow-box"):o.classList.remove("deeplib-overflow-box"))}unload(){t.currentElements=[],g.removeSubscreen()}};var $=`.deeplib-subscreen,
1
+ var ye=Object.create;var J=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var Ge=Object.getOwnPropertyNames;var Ce=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var r=(t,e)=>J(t,"name",{value:e,configurable:!0});var we=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Te=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ge(e))!Be.call(t,o)&&o!==n&&J(t,o,{get:()=>e[o],enumerable:!(i=xe(e,o))||i.enumerable});return t};var oe=(t,e,n)=>(n=t!=null?ye(Ce(t)):{},Te(e||!t||!t.__esModule?J(n,"default",{value:t,enumerable:!0}):n,t));var $=we((ce,Q)=>{(function(t){"use strict";var e={};e.VERSION="1.6.1";var n,i={},o=r(function(a,h){return function(){return h.apply(a,arguments)}},"bind"),s=r(function(){var a=arguments,h=a[0],T,v;for(v=1;v<a.length;v++)for(T in a[v])!(T in h)&&a[v].hasOwnProperty(T)&&(h[T]=a[v][T]);return h},"merge"),l=r(function(a,h){return{value:a,name:h}},"defineLogLevel");e.TRACE=l(1,"TRACE"),e.DEBUG=l(2,"DEBUG"),e.INFO=l(3,"INFO"),e.TIME=l(4,"TIME"),e.WARN=l(5,"WARN"),e.ERROR=l(8,"ERROR"),e.OFF=l(99,"OFF");var c=r(function(a){this.context=a,this.setLevel(a.filterLevel),this.log=this.info},"ContextualLogger");c.prototype={setLevel:r(function(a){a&&"value"in a&&(this.context.filterLevel=a)},"setLevel"),getLevel:r(function(){return this.context.filterLevel},"getLevel"),enabledFor:r(function(a){var h=this.context.filterLevel;return a.value>=h.value},"enabledFor"),trace:r(function(){this.invoke(e.TRACE,arguments)},"trace"),debug:r(function(){this.invoke(e.DEBUG,arguments)},"debug"),info:r(function(){this.invoke(e.INFO,arguments)},"info"),warn:r(function(){this.invoke(e.WARN,arguments)},"warn"),error:r(function(){this.invoke(e.ERROR,arguments)},"error"),time:r(function(a){typeof a=="string"&&a.length>0&&this.invoke(e.TIME,[a,"start"])},"time"),timeEnd:r(function(a){typeof a=="string"&&a.length>0&&this.invoke(e.TIME,[a,"end"])},"timeEnd"),invoke:r(function(a,h){n&&this.enabledFor(a)&&n(h,s({level:a},this.context))},"invoke")};var d=new c({filterLevel:e.OFF});(function(){var a=e;a.enabledFor=o(d,d.enabledFor),a.trace=o(d,d.trace),a.debug=o(d,d.debug),a.time=o(d,d.time),a.timeEnd=o(d,d.timeEnd),a.info=o(d,d.info),a.warn=o(d,d.warn),a.error=o(d,d.error),a.log=a.info})(),e.setHandler=function(a){n=a},e.setLevel=function(a){d.setLevel(a);for(var h in i)i.hasOwnProperty(h)&&i[h].setLevel(a)},e.getLevel=function(){return d.getLevel()},e.get=function(a){return i[a]||(i[a]=new c(s({name:a},d.context)))},e.createDefaultHandler=function(a){a=a||{},a.formatter=a.formatter||r(function(y,B){B.name&&y.unshift("["+B.name+"]")},"defaultMessageFormatter");var h={},T=r(function(v,y){Function.prototype.apply.call(v,console,y)},"invokeConsoleMethod");return typeof console>"u"?function(){}:function(v,y){v=Array.prototype.slice.call(v);var B=console.log,F;y.level===e.TIME?(F=(y.name?"["+y.name+"] ":"")+v[0],v[1]==="start"?console.time?console.time(F):h[F]=new Date().getTime():console.timeEnd?console.timeEnd(F):T(B,[F+": "+(new Date().getTime()-h[F])+"ms"])):(y.level===e.WARN&&console.warn?B=console.warn:y.level===e.ERROR&&console.error?B=console.error:y.level===e.INFO&&console.info?B=console.info:y.level===e.DEBUG&&console.debug?B=console.debug:y.level===e.TRACE&&console.trace&&(B=console.trace),a.formatter(v,y),T(B,v))}},e.useDefaults=function(a){e.setLevel(a&&a.defaultLevel||e.DEBUG),e.setHandler(e.createDefaultHandler(a))},e.setDefaults=e.useDefaults,typeof define=="function"&&define.amd?define(e):typeof Q<"u"&&Q.exports?Q.exports=e:(e._prevLogger=t.Logger,e.noConflict=function(){return t.Logger=e._prevLogger,e},t.Logger=e)})(ce)});var L=class{static{r(this,"BaseModule")}get settingsScreen(){return null}get settingsStorage(){return this.constructor.name}get settings(){return this.settingsStorage?(p.playerStorage?p.playerStorage[this.settingsStorage]||this.registerDefaultSettings(p.playerStorage):this.registerDefaultSettings(p.playerStorage),p.playerStorage[this.settingsStorage]):null}set settings(e){this.settingsStorage&&(p.playerStorage?p.playerStorage[this.settingsStorage]||this.registerDefaultSettings(p.playerStorage):this.registerDefaultSettings(p.playerStorage),p.playerStorage[this.settingsStorage]=e)}init(){}registerDefaultSettings(e){let n=this.settingsStorage,i=this.defaultSettings;!n||!i||Object.entries(this.defaultSettings).length!==0&&(e[n]=f(this.defaultSettings,e[n],{concatArrays:!1,matchingOnly:!0}))}get defaultSettings(){return null}load(){}run(){}unload(){}};async function Z(t){if(!k.instance)throw new Error("Attempt to set subscreen before init");let e=typeof t=="string"?t:t?.options.name,n=`${MOD_INFO.name}_${e}`;await CommonSetScreen("DeepLibMod",`${n}`)}r(Z,"setSubscreen");var I=class t{static{r(this,"BaseSubscreen")}static currentElements=[];static currentPage=1;options;module;static id=CommonGenerateUniqueID();static subscreenOptions={drawCharacter:!0,name:"UNKNOWN",background:"Sheet",doShowExitButton:!0,doShowTitle:!0,settingsWidth:1e3,forceUpCharacter:!1};static menu=null;constructor(e){e&&(this.module=e);let n=this.constructor;this.options={...t.subscreenOptions,...n.subscreenOptions};let i=this.options.name,o=`${MOD_INFO.name}_${i}`;O(`${o}Load`,this.load.bind(this)),O(`${o}Run`,this.run.bind(this)),O(`${o}Click`,this.click.bind(this)),O(`${o}Exit`,this.exit.bind(this)),O(`${o}Unload`,this.unload.bind(this)),O(`${o}Resize`,this.resize.bind(this)),O(`${o}Background`,this.options.background),CommonCSVCache[ScreenFileGetTranslation("DeepLibMod",o)]=[]}async setSubscreen(e){return await Z(e)}get settings(){return this.module.settings}set settings(e){this.module.settings=e}get pageStructure(){return[[]]}get currentPage(){return this.pageStructure[Math.min(t.currentPage-1,this.pageStructure.length-1)]}getPageLabel(){return g("settings.page.label",{$currentPage$:t.currentPage,$totalPages$:this.pageStructure.length})}changePage(e,n){let i=this.pageStructure.length;e>i&&(e=1),e<1&&(e=i),t.currentPage=e,this.managePageElementsVisibility(),n(this.getPageLabel())}managePageElementsVisibility(){this.pageStructure.forEach((e,n)=>{e.forEach(i=>{let o=ElementWrap(`${i.id}-container`)??ElementWrap(`${i.id}`);n!==t.currentPage-1?o&&S.hide(o):o&&S.unhide(o)})})}load(){for(let i of x())i.settingsScreen&&(!i.settings||!Object.keys(i.settings).length)&&i.registerDefaultSettings(p.playerStorage);t.currentPage=1,b.getSubscreen();let e=b.getSettingsDiv();if(b.appendToSubscreen(e),t.menu=ElementMenu.Create("deeplib-nav-menu",[]),b.appendToSubscreen(t.menu),this.pageStructure.length>1){let i=u.createBackNext({id:"deeplib-page-back-next",next:r(({setLabel:o})=>this.changePage(t.currentPage+1,o),"next"),initialNextTooltip:g("settings.button.next_button_hint"),back:r(({setLabel:o})=>this.changePage(t.currentPage-1,o),"back"),initialPrevTooltip:g("settings.button.prev_button_hint"),initialLabel:this.getPageLabel()});t.menu.prepend(i)}if(this.options.help){let i=this.options.help.onClick,o=r(()=>{},"action");typeof i=="string"||i instanceof URL?o=r(()=>window.open(i,"_blank"),"action"):typeof i=="function"?o=i:i instanceof t&&(o=r(async()=>await this.setSubscreen(i),"action")),this.options.help.tooltip??=g("settings.button.help_button_hint"),this.options.help.icon??=`${PUBLIC_URL}/dl_images/bookmark.svg`;let s=u.createButton({id:"deeplib-help",size:[90,90],onClick:o,options:{image:this.options.help.icon,tooltip:this.options.help.tooltip}});t.menu.append(s)}if(this.options.doShowTitle){let i=u.createLabel({id:"deeplib-subscreen-title",label:g(`${this.options.name}.title`,{$ModVersion:MOD_VERSION_CAPTION})});b.appendToSubscreen(i)}if(this.options.doShowExitButton){let i=u.createButton({id:"deeplib-exit",size:[90,90],onClick:r(()=>{this.exit()},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/exit.svg`,tooltip:g("settings.button.back_button_hint")}});t.menu.append(i)}let n=u.createTooltip();b.appendToSubscreen(n),this.pageStructure.forEach(i=>i.forEach(o=>{let s;switch(o.type){case"text":case"number":case"color":s=u.createInput(o);break;case"checkbox":s=u.createCheckbox(o);break;case"button":s=u.createButton(o);break;case"label":s=u.createLabel(o);break;case"custom":s=u.createCustom(o);break;case"dropdown":s=u.createDropdown(o);break}s.parentElement&&s.parentElement!==e||b.appendToSettingsDiv(s)})),this.managePageElementsVisibility(),this.options.drawCharacter&&this.options.forceUpCharacter?CharacterAppearanceForceUpCharacter=Player.MemberNumber:CharacterAppearanceForceUpCharacter=-1}run(){this.options.drawCharacter&&DrawCharacter(Player,50,50,.9,!1)}click(){}exit(){CharacterAppearanceForceUpCharacter=-1,CharacterLoadCanvas(Player);let e=CommonUnwrapThunk(this.options.returnScreen);e instanceof t||!e?Z(e??"mainmenu").then(()=>{p.save()}):Array.isArray(e)&&CommonSetScreen(...e).then(()=>{p.save()})}resize(e=!1){let n=this.options.drawCharacter?0:380,i=b.getSubscreen(),o=b.getSettingsDiv();ElementSetPosition(i,0,0),ElementSetSize(i,2e3,1e3),ElementSetFontSize(i,"auto"),ElementSetPosition(o,530-n,170),ElementSetSize(o,this.options.settingsWidth??1e3+n,660),this.options.doShowTitle&&(ElementSetPosition("deeplib-subscreen-title",530-n,75),ElementSetSize("deeplib-subscreen-title",800,90)),ElementSetPosition("deeplib-nav-menu",1905,75,"top-right"),ElementSetSize("deeplib-nav-menu",null,90),ElementSetSize(u.getTooltip()||"",1500),t.currentElements.forEach(s=>{let l=s[0],c=s[1];S.autoSetPosition(c.id??l.id,c.position),S.autoSetSize(c.id??l.id,c.size)}),o&&(S.hasOverflow(o)?.vertical?o.classList.add("deeplib-overflow-box"):o.classList.remove("deeplib-overflow-box"))}unload(){t.currentElements=[],b.removeSubscreen()}};var re=`.deeplib-subscreen,
2
2
  .deeplib-modal {
3
3
  --deeplib-background-color: var(--tmd-main, white);
4
4
  --deeplib-element-color: var(--tmd-element, white);
@@ -48,11 +48,12 @@ var de=Object.defineProperty;var s=(t,e)=>de(t,"name",{value:e,configurable:!0})
48
48
  .deeplib-button .button-label {
49
49
  background-color: transparent !important;
50
50
  color: var(--deeplib-text-color);
51
- font-size: min(3.6dvh, 1.8dvw);
51
+ font-size: 0.9em;
52
52
  display: contents;
53
53
  }
54
54
  .deeplib-button .button-tooltip {
55
55
  border-radius: min(1dvh, 0.5dvw);
56
+ pointer-events: none;
56
57
  }
57
58
 
58
59
  #deeplib-page-label {
@@ -75,6 +76,12 @@ var de=Object.defineProperty;var s=(t,e)=>de(t,"name",{value:e,configurable:!0})
75
76
  color: var(--deeplib-text-color);
76
77
  }
77
78
 
79
+ .deeplib-label {
80
+ color: var(--deeplib-text-color);
81
+ user-select: none;
82
+ pointer-events: none;
83
+ }
84
+
78
85
  .deeplib-subscreen {
79
86
  padding: 0;
80
87
  margin: 0;
@@ -160,7 +167,9 @@ var de=Object.defineProperty;var s=(t,e)=>de(t,"name",{value:e,configurable:!0})
160
167
  z-index: 1;
161
168
  }
162
169
  #deeplib-nav-menu > .deeplib-button {
163
- flex: 1 0 auto;
170
+ flex: 1 1 auto;
171
+ height: 100%;
172
+ aspect-ratio: 1;
164
173
  }
165
174
 
166
175
  #deeplib-storage-meter {
@@ -219,10 +228,9 @@ var de=Object.defineProperty;var s=(t,e)=>de(t,"name",{value:e,configurable:!0})
219
228
  margin-top: min(1dvh, 0.5dvw);
220
229
  }
221
230
  .deeplib-input-container .deeplib-input {
222
- font-size: 0.6em;
231
+ font-size: 0.9em;
223
232
  padding: min(1vh, 0.5vw);
224
233
  padding: min(1dvh, 0.5dvw);
225
- background-color: transparent;
226
234
  outline: none;
227
235
  min-height: min(5vh, 2.5vw);
228
236
  min-height: min(5dvh, 2.5dvw);
@@ -261,6 +269,27 @@ var de=Object.defineProperty;var s=(t,e)=>de(t,"name",{value:e,configurable:!0})
261
269
  user-select: none;
262
270
  }
263
271
 
272
+ .deeplib-checkbox-container.row,
273
+ .deeplib-input-container.row,
274
+ .deeplib-dropdown-container.row {
275
+ flex-direction: row;
276
+ }
277
+ .deeplib-checkbox-container.column,
278
+ .deeplib-input-container.column,
279
+ .deeplib-dropdown-container.column {
280
+ flex-direction: column;
281
+ }
282
+ .deeplib-checkbox-container.rowReverse,
283
+ .deeplib-input-container.rowReverse,
284
+ .deeplib-dropdown-container.rowReverse {
285
+ flex-direction: row-reverse;
286
+ }
287
+ .deeplib-checkbox-container.columnReverse,
288
+ .deeplib-input-container.columnReverse,
289
+ .deeplib-dropdown-container.columnReverse {
290
+ flex-direction: column-reverse;
291
+ }
292
+
264
293
  .deeplib-highlight-text {
265
294
  font-weight: bold;
266
295
  color: rgb(203, 185, 23);
@@ -295,26 +324,27 @@ var de=Object.defineProperty;var s=(t,e)=>de(t,"name",{value:e,configurable:!0})
295
324
 
296
325
  .deeplib-modal {
297
326
  position: fixed;
298
- top: 10%;
327
+ top: 50%;
299
328
  left: 50%;
300
- transform: translateX(-50%);
329
+ transform: translate(-50%, -50%);
301
330
  z-index: 1001;
302
331
  display: flex;
303
332
  flex-direction: column;
304
333
  justify-content: center;
305
334
  align-items: center;
306
335
  gap: 0.5em;
307
- width: max(50dvw, 25dvh);
308
- font-size: min(4dvh, 2dvw);
336
+ min-width: max(50dvw, 25dvh);
337
+ font-size: 1em;
309
338
  padding: min(2dvh, 1dvw);
310
339
  background-color: var(--deeplib-element-color);
311
340
  border-radius: min(1.2dvh, 0.6dvw);
312
341
  border: min(0.2dvh, 0.1dvw) solid var(--deeplib-border-color);
313
342
  color: var(--deeplib-text-color);
343
+ max-width: max(90dvw, 45dvh);
314
344
  }
315
345
  .deeplib-modal .deeplib-modal-input {
316
346
  width: 100%;
317
- font-size: min(2.6dvh, 1.8dvw);
347
+ font-size: 1em;
318
348
  border-radius: min(1dvh, 0.5dvw);
319
349
  padding: min(1dvh, 0.5dvw);
320
350
  }
@@ -360,8 +390,17 @@ var de=Object.defineProperty;var s=(t,e)=>de(t,"name",{value:e,configurable:!0})
360
390
  flex-direction: column;
361
391
  gap: var(--half-gap);
362
392
  }
363
- /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL2hvbWUvZGVvL0NvZGUvYmMvQkMtRGVlcExpYi9zcmMvc3R5bGVzIiwic291cmNlcyI6WyJ2YXJzLnNjc3MiLCJidXR0b25zLnNjc3MiLCJlbGVtZW50cy5zY3NzIiwiaW5wdXRzLnNjc3MiLCJtZXNzYWdlcy5zY3NzIiwibW9kYWwuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0VBRUU7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7OztBQ2RGO0VBQ0U7RUFDQTtFQUNBOztBQUVBO0VBRUU7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBRUE7RUFDQTtFQUNBOztBQUdGO0VBQ0U7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTs7QUFHRjtFQUNFOzs7QUMzQ0o7RUFDRTtFQUNBO0VBQ0E7RUFDQTs7O0FBR0Y7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7OztBQUdGO0VBQ0U7OztBQUdGO0VBQ0U7RUFDQTtFQUNBOzs7QUFHRjtFQUNFO0VBQ0E7OztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7OztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7OztBQUdGO0VBQ0U7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E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iAgdG9wOiAwO1xuICBsZWZ0OiAwO1xuICB3aWR0aDogMTAwZHZ3O1xuICBoZWlnaHQ6IDEwMGR2aDtcbiAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgwLCAwLCAwLCAwLjUpO1xufVxuXG4jZGVlcGxpYi1tb2RhbC1pbXBvcnRfZXhwb3J0IHtcbiAgLmRlZXBsaWItbW9kYWwtY2hlY2tib3gtY29udGFpbmVyIHtcbiAgICBtYXJnaW4tdG9wOiAwLjVlbTtcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gICAgZ2FwOiB2YXIoLS1oYWxmLWdhcCk7XG4gIH1cbn0iXX0= */`;var F=class extends B{static{s(this,"DebugModule")}debugSettings={showRawTranslations:!1,showFileNames:!1,showIncomingServerTransactions:!1,incomingMessageFilterMode:"exclude",incomingMessageTypes:"",showOutcomingServerTransactions:!1,outcomingMessageFilterMode:"exclude",outcomingMessageTypes:"",showRawActivityNames:!1,showRawAssetNames:!1};load(){let e=u.getLocalStorage("debugOptions");e&&(this.debugSettings=Object.assign(this.debugSettings,e)),ue(),I.hookFunction("TextGet",S.ModifyBehavior,(i,n)=>{if(!this.debugSettings.showRawTranslations)return n(i);let[o]=i,r=TextScreenCache?.fileName()??"[unknown]";return this.debugSettings.showFileNames?`${r}::${o}`:o}),I.hookFunction("TextGetInScope",S.ModifyBehavior,(i,n)=>{if(!this.debugSettings.showRawTranslations)return n(i);let[o,r]=i,a=o.lastIndexOf("/");a===-1?a=0:a=a+1;let l=o.substring(a);return this.debugSettings.showFileNames?`${l}::${r}`:r}),I.hookFunction("InterfaceTextGet",S.ModifyBehavior,(i,n)=>{if(!this.debugSettings.showRawTranslations)return n(i);let[o]=i,r=InterfaceStringsPath.lastIndexOf("/");r===-1?r=0:r=r+1;let a=InterfaceStringsPath.substring(r);return this.debugSettings.showFileNames?`${a}::${o}`:o}),I.hookFunction("ActivityDictionaryText",S.ModifyBehavior,(i,n)=>{if(!this.debugSettings.showRawActivityNames)return n(i);let[o]=i;return o}),I.hookFunction("ElementButton.CreateForAsset",S.ModifyBehavior,(i,n)=>{if(!this.debugSettings.showRawAssetNames)return n(i);let[,o,,,r]=i;return o=("Asset"in o?o:{Asset:o}).Asset,r??={},r.label=o.Name,n(i)})}unload(){ge()}saveDebugSettings(){u.setLocalStorage("debugOptions",this.debugSettings)}},Z;function _(...t){let e=Array.isArray(t[0])&&typeof t[0][0]=="string"?t[0][0]:"[unknown]",i=Array.isArray(t[0])?t[0].slice(1):[],n=x("DebugModule");return n.debugSettings.showIncomingServerTransactions&&ee(e,n.debugSettings.incomingMessageTypes,n.debugSettings.incomingMessageFilterMode)&&p.debug("\u25BC Receive",e,...i),Z?.apply(this,t)}s(_,"processIncomingTransaction");var O;function q(...t){let e=typeof t[0]=="string"?t[0]:"[unknown]",i=Array.isArray(t[1])?t[1]:[t[1]],n=x("DebugModule");return n.debugSettings.showOutcomingServerTransactions&&ee(e,n.debugSettings.outcomingMessageTypes,n.debugSettings.outcomingMessageFilterMode)&&p.debug("\u25B2 Send",e,...i),O?.apply(this,t)}s(q,"processOutcomingTransaction");function ee(t,e,i){if(!e.trim())return!0;let o=e.split(",").map(r=>r.trim()).filter(r=>r.length>0).some(r=>t===r);return i==="include"?o:!o}s(ee,"shouldLogMessage");function ue(){Z===void 0&&typeof ServerSocket?.__proto__?.emitEvent=="function"&&(Z=ServerSocket.__proto__.emitEvent,ServerSocket.__proto__.emitEvent=_),O===void 0&&typeof ServerSocket?.__proto__?.emit=="function"&&(O=ServerSocket.__proto__.emit,ServerSocket.__proto__.emit=q)}s(ue,"loadServerTransactions");function ge(){Z&&ServerSocket.__proto__.emitEvent===_&&(ServerSocket.__proto__.emitEvent=Z,Z=void 0),O&&ServerSocket.__proto__.emit===q&&(ServerSocket.__proto__.emit=O,O=void 0)}s(ge,"unloadServerTransactions");var u,I,p,w;function st(t){import("https://cdn.jsdelivr.net/npm/bondage-club-mod-sdk@1.2.0/+esm").then(()=>{if(I=new E({name:t.modName,fullName:t.modName,version:MOD_VERSION,repository:t.modRepository}),w=t.modName,u=new X(t.modName),p=new V(w),N.injectInline("deeplib-style",$),p.debug("Init wait"),!CurrentScreen||CurrentScreen==="Login"){t.beforeLogin?.();let i=I.hookFunction("LoginResponse",0,(n,o)=>{p.debug("Init! LoginResponse caught: ",n),o(n);let r=n[0];if(r==="InvalidNamePassword")return o(n);r&&typeof r.Name=="string"&&typeof r.AccountName=="string"&&(te(t),i())})}else p.debug(`Already logged in, initing ${w}`),te(t)})}s(st,"initMod");async function te(t){if(window[t.modName+"Loaded"])return;u.load(),await M.init(t.translationOptions);let e=Object.entries(t.modules??{}),i=[];if(e.some(n=>n[1]instanceof R)||i.push(["VersionModule",new R]),IS_DEBUG&&!e.some(n=>n[1]instanceof F)&&i.push(["DebugModule",new F]),i.push(...e),!pe(i)){be();return}await t.initFunction?.(),t.mainMenuOptions&&x("GUI")&&k.setOptions({...t.mainMenuOptions,repoLink:t.modRepository}),window[t.modName+"Loaded"]=!0,p.log(`Loaded! Version: ${MOD_VERSION_CAPTION}`)}s(te,"init");function pe(t){for(let[e,i]of t)ie(e,i);for(let e of f()){let i=A(()=>e.init(),n=>n);i.ok||p.error(i.error)}for(let e of f()){let i=A(()=>e.load(),n=>n);i.ok||p.error(i.error)}for(let e of f()){let i=A(()=>e.run(),n=>n);i.ok||p.error(i.error)}for(let e of f())e.registerDefaultSettings(u.playerStorage);return p.debug("Modules Loaded."),!0}s(pe,"initModules");function be(){return me(),I.unload(),delete window[w+"Loaded"],p.debug("Unloaded."),!0}s(be,"unloadMod");function me(){for(let t of f())t.unload()}s(me,"unloadModules");var H=new Map;function f(){return[...H.values()]}s(f,"modules");function ie(t,e){return H.set(t,e),e}s(ie,"registerModule");function x(t){return H.get(t)}s(x,"getModule");var ne=class{static{s(this,"BaseMigrator")}};var L=class t extends B{static{s(this,"GUI")}static instance=null;_subscreens;_mainMenu;_modButtonOptions;get subscreens(){return this._subscreens}get mainMenu(){return this._mainMenu}constructor(e=null){if(super(),t.instance)throw new Error("Duplicate initialization");for(let i of f())i.settingsScreen;this._mainMenu=e?.mainMenu?new e.mainMenu(this):new k(this),this._subscreens=[this._mainMenu],this._modButtonOptions=e,t.instance=this}load(){if(this._modButtonOptions){for(let e of f())e.settingsScreen&&this._subscreens.push(new e.settingsScreen(e));this._mainMenu.subscreens=this._subscreens,PreferenceRegisterExtensionSetting({Identifier:this._modButtonOptions.identifier,ButtonText:this._modButtonOptions.buttonText,Image:this._modButtonOptions.image,load:s(async()=>{await T(this._mainMenu)},"load"),run:s(()=>{},"run"),click:s(()=>{},"click"),exit:s(()=>{},"exit")})}}};var R=class t extends B{static{s(this,"VersionModule")}static isItNewVersion=!1;static version;static newVersionMessage="";static migrators=[];static beforeEach;static afterEach;static beforeAll;static afterAll;constructor(e){super(),e??={},t.newVersionMessage=e.newVersionMessage,e.migrators&&(t.migrators=e.migrators,t.migrators.sort((i,n)=>i.migrationVersion.localeCompare(n.migrationVersion))),t.beforeEach=e.beforeEach,t.afterEach=e.afterEach,t.beforeAll=e.beforeAll,t.afterAll=e.afterAll}load(){t.version=MOD_VERSION,t.checkVersionUpdate(),u.playerStorage.GlobalModule.doShowNewVersionMessage&&t.isItNewVersion&&t.sendNewVersionMessage()}static checkVersionUpdate(){let e=t.loadVersion(),i=t.version;t.isNewVersion(e,i)&&(t.isItNewVersion=!0,t.checkVersionMigration(),t.saveVersion()),u.save()}static checkVersionMigration(){let e=t.loadVersion(),i=t.migrators.filter(n=>t.isNewVersion(e,n.migrationVersion));if(i.length){t.beforeAll?.();for(let n of i)t.beforeEach?.(),n.migrate(),p.info(`Migrating from ${e} to ${n.migrationVersion} with ${n.constructor.name}`),t.afterEach?.();t.afterAll?.()}}static sendNewVersionMessage(){if(!t.newVersionMessage)return;let i=FriendListBeepLog.push({MemberNumber:Player.MemberNumber,MemberName:w,ChatRoomName:d("module.version.version_update"),ChatRoomSpace:"X",Private:!1,Sent:!1,Time:new Date,Message:t.newVersionMessage})-1,n=CommonStringPartitionReplace(d("module.version.new_version_toast_title"),{$modName$:w,$modVersion$:t.version}).join(""),o=FriendListBeepLog[i];ServerShowBeep(t.newVersionMessage,1e4,{memberNumber:o.MemberNumber,memberName:o.MemberName,chatRoomName:o.ChatRoomName,...o.Message&&{onClick:s(()=>{FriendListShowBeep(i)},"onClick")}},n)}static isNewVersion(e,i){if(e!==void 0){let n=e.split("."),o=i.split(".");for(let r=0;r<3;r++)if(n[r]!==o[r])return o[r]>n[r]}return e===void 0||e===""||!e}static saveVersion(){u.playerStorage&&(u.playerStorage.Version=t.version)}static loadVersion(){return u.playerStorage?.Version}};var D=class extends m{static{s(this,"GuiDebug")}static subscreenOptions={name:"debug"};get pageStructure(){return[[{type:"checkbox",id:"debug-show-incoming-server-transactions",label:"Show Incoming Server Transactions",setElementValue:s(()=>this.module.debugSettings.showIncomingServerTransactions,"setElementValue"),setSettingValue:s(e=>{this.module.debugSettings.showIncomingServerTransactions=e},"setSettingValue")},{type:"dropdown",id:"debug-incoming-filter-mode",label:"Filter Mode",description:["Configure which incoming message types to show or hide.",ElementCreate({tag:"br"}),"Include: only show these message types.",ElementCreate({tag:"br"}),"Exclude: hide these message types."],optionsList:[{attributes:{value:"include",label:"Include",selected:this.module.debugSettings.incomingMessageFilterMode==="include"}},{attributes:{value:"exclude",label:"Exclude",selected:this.module.debugSettings.incomingMessageFilterMode==="exclude"}}],setSettingValue:s(e=>{this.module.debugSettings.incomingMessageFilterMode=e},"setSettingValue")},{type:"text",id:"debug-incoming-message-types",label:"Message Types",description:'Comma-separated list of message types (e.g., "ChatRoomChat, ChatRoomSync")',setElementValue:s(()=>this.module.debugSettings.incomingMessageTypes,"setElementValue"),setSettingValue:s(e=>{this.module.debugSettings.incomingMessageTypes=e},"setSettingValue")},{type:"checkbox",id:"debug-show-outcoming-server-transactions",label:"Show Outcoming Server Transactions",setElementValue:s(()=>this.module.debugSettings.showOutcomingServerTransactions,"setElementValue"),setSettingValue:s(e=>{this.module.debugSettings.showOutcomingServerTransactions=e},"setSettingValue")},{type:"dropdown",id:"debug-outcoming-filter-mode",label:"Filter Mode",description:["Configure which outcoming message types to show or hide.",ElementCreate({tag:"br"}),"Include: only show these message types.",ElementCreate({tag:"br"}),"Exclude: hide these message types."],optionsList:[{attributes:{value:"include",label:"Include",selected:this.module.debugSettings.outcomingMessageFilterMode==="include"}},{attributes:{value:"exclude",label:"Exclude",selected:this.module.debugSettings.outcomingMessageFilterMode==="exclude"}}],setSettingValue:s(e=>{this.module.debugSettings.outcomingMessageFilterMode=e},"setSettingValue")},{type:"text",id:"debug-outcoming-message-types",label:"Message Types",description:'Comma-separated list of message types (e.g., "ChatRoomMessage, AccountUpdate")',setElementValue:s(()=>this.module.debugSettings.outcomingMessageTypes,"setElementValue"),setSettingValue:s(e=>{this.module.debugSettings.outcomingMessageTypes=e},"setSettingValue")},{type:"checkbox",id:"debug-show-raw-translations",label:"Show Raw Translations",setElementValue:s(()=>this.module.debugSettings.showRawTranslations,"setElementValue"),setSettingValue:s(e=>{this.module.debugSettings.showRawTranslations=e},"setSettingValue")},{type:"checkbox",id:"debug-show-file-names",label:"Show File Names",description:"Show the file name of the translation in the translation string.",setElementValue:s(()=>this.module.debugSettings.showFileNames,"setElementValue"),setSettingValue:s(e=>{this.module.debugSettings.showFileNames=e},"setSettingValue")},{type:"checkbox",id:"debug-show-raw-asset-names",label:"Show Raw Asset Names",setElementValue:s(()=>this.module.debugSettings.showRawAssetNames,"setElementValue"),setSettingValue:s(e=>{this.module.debugSettings.showRawAssetNames=e},"setSettingValue")},{type:"checkbox",id:"debug-show-raw-activity-names",label:"Show Raw Activity Names",setElementValue:s(()=>this.module.debugSettings.showRawActivityNames,"setElementValue"),setSettingValue:s(e=>{this.module.debugSettings.showRawActivityNames=e},"setSettingValue")}],[{type:"button",id:"test-deeplib-big-button",options:{label:"Big Button",tooltip:"This is a big button",image:"Icons/Exit.png"},size:[405,80],onClick(){v.info("Big Button Clicked")}},{type:"button",id:"test-deeplib-small-button",options:{tooltip:"This is a small button",image:"Icons/Exit.png"},size:[90,90],onClick(){v.info("Small Button Clicked")}},{type:"checkbox",id:"test-deeplib-checkbox",label:"Checkbox",description:"This is a checkbox",setElementValue(){return!0},setSettingValue(e){v.info("Checkbox value:",e)}},{type:"text",id:"test-deeplib-text-input",label:"Input",description:"This is a text input",setElementValue(){return"Input Value"},setSettingValue(e){v.info("Input value:",e)}},{type:"number",id:"test-deeplib-number-input",label:"Input",description:"This is a number input",setElementValue(){return"123"},setSettingValue(e){v.info("Input value:",e)}},{type:"label",id:"test-deeplib-label",label:"Label",description:"This is a label"}],[{type:"button",id:"test-deeplib-big-button2",options:{label:"Big Button",tooltip:"This is a big button",image:"Icons/Exit.png"},size:[405,80],onClick(){v.info("Big Button Clicked")}},{type:"button",id:"test-deeplib-small-button2",options:{tooltip:"This is a small button",image:"Icons/Next.png"},size:[90,90],onClick(){v.info("Small Button Clicked")}},{type:"checkbox",id:"test-deeplib-checkbox2",label:"Checkbox",description:"This is a checkbox",setElementValue(){return!0},setSettingValue(e){v.info("Checkbox value:",e)}},{type:"text",id:"test-deeplib-text-input2",label:"Input",description:"This is a text input",setElementValue(){return"Input Value"},setSettingValue(e){v.info("Input value:",e)}},{type:"number",id:"test-deeplib-number-input2",label:"Input",description:"This is a number input",setElementValue(){return"123"},setSettingValue(e){v.info("Input value:",e)}},{type:"label",id:"test-deeplib-label2",label:"Label",description:"This is a label"},{type:"dropdown",id:"test-deeplib-dropdown",label:"Dropdown",description:"This is a dropdown",optionsList:["Option 1","Option 2","Option 3"],setElementValue(){return"Option 2"},setSettingValue(e){v.info("Dropdown value:",e)}}]]}exit(){this.module.saveDebugSettings(),super.exit()}};function oe(t){return t!==null&&typeof t=="object"&&Object.getPrototypeOf(t)===Object.prototype&&!Array.isArray(t)}s(oe,"isPlainObject");function b(t,e,i={concatArrays:!0,matchingOnly:!1}){if(t===void 0)return e;if(e===void 0)return t;if(Array.isArray(t)&&Array.isArray(e)&&i.concatArrays)return[...t,...e];if(oe(t)&&oe(e)){let n={...t},o=i.matchingOnly?Object.keys(e).filter(r=>r in t):Object.keys(e);for(let r of o)r==="__proto__"||r==="constructor"||r==="prototype"||(n[r]=r in t?b(t[r],e[r],i):e[r]);return n}return e}s(b,"deepMerge");function Gt(t){let e=JSON.parse(JSON.stringify(t)),i=[];for(;e.length>0;){let n=Math.floor(Math.random()*e.length);i.push(e[n]),e.splice(n,1)}return i}s(Gt,"shuffleArray");function C(t,e){let i=t.split("."),n=globalThis;for(let o=0;o<i.length-1;o++)n[i[o]]||(n[i[o]]={}),n=n[i[o]];n[i[i.length-1]]=e}s(C,"exportToGlobal");function z(t,e){for(;t&&t!==Object.prototype;){if(Object.getOwnPropertyDescriptor(t,e)?.get)return!0;t=Object.getPrototypeOf(t)}return!1}s(z,"hasGetter");function wt(t,e){for(;t&&t!==Object.prototype;){if(Object.getOwnPropertyDescriptor(t,e)?.set)return!0;t=Object.getPrototypeOf(t)}return!1}s(wt,"hasSetter");var se=s(t=>Math.round(t/100)/10,"byteToKB");function A(t,e){try{return{ok:!0,value:t()}}catch(i){return{ok:!1,error:e?e(i):i}}}s(A,"tryCatch");async function Tt(t,e){try{return{ok:!0,value:await t()}}catch(i){return{ok:!1,error:e?e(i):i}}}s(Tt,"tryCatchAsync");var c={createButton:he,createCheckbox:fe,createInput:ye,createLabel:Ie,createCustom:ve,createDropdown:xe,createTooltip:Be,getTooltip:re,setTooltip:j,createBackNext:Ce};function he(t){t.id??=ElementGenerateID();let e=document.getElementById(t.id);if(e)return e;t.type="button";let i;t.options?.image&&(i=t.options.image,t.options.image=void 0);let n=typeof t?.disabled=="function"?t?.disabled():t?.disabled,o=ElementButton.Create(t.id,t?.onClick??(()=>{}),b({labelPosition:"center"},t.options),b({button:{classList:["deeplib-button"],attributes:{disabled:n},children:[i?b({tag:"img",attributes:{id:`${t.id}-image`,alt:"",decoding:"async",loading:"lazy",src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},style:{"--image":`url("${i}")`}},t.htmlOptions?.img):void 0]}},t.htmlOptions??{}));return m.currentElements.push([o,t]),o}s(he,"elementCreateButton");function fe(t){let e=document.getElementById(t.id);if(e)return e;t.type="checkbox";let i=typeof t?.disabled=="function"?t?.disabled():t?.disabled,n=ElementCreate(b({tag:"label",classList:["deeplib-checkbox-container"],attributes:{id:`${t.id}-container`,for:t.id},children:[b({tag:"input",classList:["checkbox","deeplib-input"],attributes:{type:"checkbox",id:t.id,disabled:i,checked:t?.setElementValue?.()||void 0},eventListeners:{change:s(function(){t?.setSettingValue?.(this.checked)},"change")}},t.htmlOptions?.checkbox),b({tag:"span",classList:["deeplib-text"],attributes:{id:`${t.id}-label`},children:[t.label]},t.htmlOptions?.label)]},t.htmlOptions?.container));return t.description&&(n.addEventListener("mouseover",function(o){U.call(this,o,t.description||null)}),n.addEventListener("mouseout",function(o){Q.call(this,o)})),m.currentElements.push([n,t]),n}s(fe,"elementCreateCheckbox");function ve(t){t.id??=ElementGenerateID(),t.htmlOptions.attributes??={},t.htmlOptions.attributes.id??=t.id;let e=document.getElementById(t.htmlOptions.attributes.id);if(e)return e;t.type="custom";let i=ElementCreate(t.htmlOptions);return m.currentElements.push([i,t]),i}s(ve,"elementCreateCustom");function ye(t){let e=document.getElementById(t.id);if(e)return e;let i=typeof t?.disabled=="function"?t?.disabled():t?.disabled,n=ElementCreate(b({tag:"label",classList:["deeplib-input-container"],attributes:{id:`${t.id}-container`,for:t.id},children:[b({tag:"input",classList:["deeplib-input"],attributes:{type:t.type,id:t.id,placeholder:" ",disabled:i,value:t?.setElementValue?.()||void 0},eventListeners:{input:s(function(){t?.setSettingValue?.(this.value)},"input")}},t.htmlOptions?.input),t.label?b({tag:"span",classList:["deeplib-text"],attributes:{id:`${t.id}-label`},children:[t.label]},t.htmlOptions?.label):void 0]},t.htmlOptions?.container));return t.description&&(n.addEventListener("mouseover",function(o){U.call(this,o,t.description||null)}),n.addEventListener("mouseout",function(o){Q.call(this,o)})),m.currentElements.push([n,t]),n}s(ye,"elementCreateInput");function Ie(t){let e=document.getElementById(t.id);if(e)return e;t.type="label";let i=ElementCreate(b({tag:"label",classList:["deeplib-label","deeplib-text"],attributes:{id:t.id},children:[t.label]},t.htmlOptions));return t.description&&(i.addEventListener("mouseover",function(n){U.call(this,n,t.description||null)}),i.addEventListener("mouseout",function(n){Q.call(this,n)})),m.currentElements.push([i,t]),i}s(Ie,"elementCreateLabel");function xe(t){t.id??=ElementGenerateID();let e=document.getElementById(`${t.id}-container`);if(e)return e;t.type="dropdown";let i=ElementCreate(b({tag:"label",classList:["deeplib-dropdown-container"],attributes:{id:`${t.id}-container`,for:t.id},children:[t.label?b({tag:"span",classList:["deeplib-text"],attributes:{id:`${t.id}-label`},children:[t.label]},t.htmlOptions?.label):void 0,ElementCreateDropdown(t.id,t.optionsList,function(){return t.setSettingValue?.(this.value)},t.options,t.htmlOptions?.select)],eventListeners:{mouseover:s(function(n){U.call(this,n,t.description||null)},"mouseover"),mouseout:s(function(n){Q.call(this,n)},"mouseout")}},t.htmlOptions?.container));return m.currentElements.push([i,t]),i}s(xe,"elementCreateDropdown");function Be(){return ElementCreate({tag:"div",classList:["deeplib-tooltip","anchor-bottom"],attributes:{id:"deeplib-tooltip"},style:{display:"none"}})}s(Be,"elementCreateTooltip");function re(){return document.getElementById("deeplib-tooltip")??void 0}s(re,"elementGetTooltip");function U(t,e){let i=this.getBoundingClientRect();j(e,"bottom");let n=re();if(n){n.offsetHeight;let o=n.getBoundingClientRect();(G.doRectsOverlap(i,o)?"top":"bottom")==="top"&&ae("top")}}s(U,"tooltipMouseOver");function Q(t){j(null)}s(Q,"tooltipMouseOut");function j(t,e="bottom"){let i=document.getElementById("deeplib-tooltip");if(!i)return!1;ae(e);let n=t==null?null:CommonIsObject(t)&&"tag"in t?[ElementCreate(t)]:CommonIsArray(t)?t.map(o=>CommonIsObject(o)&&"tag"in o?ElementCreate(o):typeof o=="string"||CommonIsObject(t)&&"tag"in t||o instanceof HTMLElement?o:null).filter(o=>o!==null):typeof t=="string"?[t]:null;return n===null?(i.childNodes.forEach(o=>o.remove()),i.style.display="none",!0):(i.replaceChildren(...n),i.style.display="",!0)}s(j,"elementSetTooltip");function ae(t){let e=document.getElementById("deeplib-tooltip");if(!e)return!1;e.classList.toggle("anchor-bottom",t==="bottom"),e.classList.toggle("anchor-top",t==="top")}s(ae,"elementSetTooltipPosition");function Ce(t){let e=document.getElementById(t.id);if(e)return e;let i=s(a=>{let l=document.getElementById(`${t.id}-label`);if(!l)return!1;l.textContent=a},"setLabel"),n=s(a=>{let l=document.getElementById(`deeplib-prev-next-${t.id}-prev-button-tooltip`);if(!l)return!1;l.textContent=a},"setPrevTooltip"),o=s(a=>{let l=document.getElementById(`deeplib-prev-next-${t.id}-next-button-tooltip`);if(!l)return!1;l.textContent=a},"setNextTooltip");return ElementCreate({tag:"div",classList:["deeplib-prev-next"],attributes:{id:t.id},children:[c.createButton({id:`deeplib-prev-next-${t.id}-prev-button`,onClick:s(()=>{t.back({setLabel:i,setBackTooltip:n,setNextTooltip:o})},"onClick"),htmlOptions:{button:{classList:["deeplib-prev-next-button"]}},options:{noStyling:!0,image:`${PUBLIC_URL}/dl_images/arrow_left.svg`,tooltip:t.initialPrevTooltip}}),c.createLabel({id:`${t.id}-label`,label:t.initialLabel,htmlOptions:{classList:["deeplib-prev-next-label"]}}),c.createButton({id:`deeplib-prev-next-${t.id}-next-button`,onClick:s(()=>{t.next({setLabel:i,setBackTooltip:n,setNextTooltip:o})},"onClick"),htmlOptions:{button:{classList:["deeplib-prev-next-button"]}},options:{noStyling:!0,image:`${PUBLIC_URL}/dl_images/arrow_right.svg`,tooltip:t.initialNextTooltip}})]})}s(Ce,"elementPrevNext");var k=class t extends m{static{s(this,"MainMenu")}subscreens=[];static options={};static subscreenOptions={name:"mainmenu",doShowExitButton:!1,settingsWidth:600};constructor(e){super(e),this.subscreens=e.subscreens}load(){if(!L.instance||CurrentModule!=="DeepLibMod"){this.setSubscreen(this);return}super.load();let e=c.createButton({id:"exit",size:[90,90],onClick:s(()=>{this.exit()},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/exit.svg`,tooltip:d("settings.button.back_button_hint")}}),i=document.getElementById("deeplib-nav-menu");i&&i.append(e);for(let o of this.subscreens){if(o.options.name==="mainmenu")continue;let r=c.createButton({id:`${o.options.name}-button`,onClick:s(()=>{this.setSubscreen(o)},"onClick"),size:[null,90],options:{image:o.options.icon,label:d(`mainmenu.button.${o.options.name}`)}});g.appendToSettingsDiv(r)}let n=g.getMiscDiv();if(g.appendToSubscreen(n),t.options.wikiLink){let o=c.createButton({id:"deeplib-wiki-button",onClick:s(()=>{window.open(t.options.wikiLink,"_blank")},"onClick"),size:[null,80],options:{image:`${PUBLIC_URL}/dl_images/notebook.svg`,label:d("mainmenu.button.wiki")}});g.appendToMiscDiv(o)}if(t.options.repoLink){let o=c.createButton({id:"deeplib-repo-button",onClick:s(()=>{window.open(t.options.repoLink,"_blank")},"onClick"),size:[null,80],options:{image:`${PUBLIC_URL}/dl_images/git.svg`,label:d("mainmenu.button.repo")}});g.appendToMiscDiv(o)}if(t.options.resetSubscreen){let o=c.createButton({id:"deeplib-reset-button",onClick:s(()=>{this.setSubscreen(t.options.resetSubscreen)},"onClick"),size:[null,80],options:{image:`${PUBLIC_URL}/dl_images/trash_bin.svg`,label:d("mainmenu.button.reset")}});g.appendToMiscDiv(o)}if(t.options.importExportSubscreen){let o=c.createButton({id:"deeplib-import-export-button",onClick:s(()=>{this.setSubscreen(t.options.importExportSubscreen)},"onClick"),size:[null,80],options:{image:`${PUBLIC_URL}/dl_images/transfer.svg`,label:d("mainmenu.button.import_export")}});g.appendToMiscDiv(o)}if(t.options.storageFullnessIndicator){let r=se(u.storageSize()),a=(r/180*100).toFixed(1),l=c.createButton({id:CommonGenerateUniqueID(),size:[null,80],options:{tooltipPosition:"left",noStyling:!0,tooltip:CommonStringPartitionReplace(d("mainmenu.meter.storage_hint"),{$percentage$:`${a}`}).join(""),label:CommonStringPartitionReplace(d("mainmenu.meter.storage_label"),{$currentCapacity$:`${r}`,$maxCapacity$:"180"}).join("")},htmlOptions:{button:{children:[{tag:"div",attributes:{id:"deeplib-storage-meter"},children:[{tag:"div",attributes:{id:"deeplib-storage-bar"},style:{width:`${a}%`}}]}]}}});g.appendToMiscDiv(l)}if(IS_DEBUG||x("DebugModule")){let o=c.createButton({id:"deeplib-debug-button",onClick:s(()=>{this.setSubscreen(new D(x("DebugModule")))},"onClick"),size:[90,90],options:{image:`${PUBLIC_URL}/dl_images/bug.svg`}});i&&i.prepend(o)}}run(){super.run()}click(){}exit(){CharacterAppearanceForceUpCharacter=-1,CharacterLoadCanvas(Player);let e=typeof this.options.returnScreen=="function"?this.options.returnScreen():this.options.returnScreen;e?e instanceof m?T(e).then(()=>{}):Array.isArray(e)&&CommonSetScreen(...e):PreferenceOpenSubscreen("Extensions").then(()=>{PreferenceSubscreenExtensionsClear()})}resize(){super.resize(),ElementSetPosition("deeplib-misc",1905,930,"bottom-right"),ElementSetSize("deeplib-misc",405,null)}static setOptions(e){t.options=e}};var M=class t{static{s(this,"Localization")}static LibTranslation={};static ModTranslation={};static PathToModTranslation;static PathToLibTranslation=`${PUBLIC_URL}/dl_translations/`;static DefaultLanguage="en";static initialized=!1;static async init(e){if(t.initialized)return;t.initialized=!0,t.PathToModTranslation=(()=>{if(e?.pathToTranslationsFolder)return e.pathToTranslationsFolder.endsWith("/")?e.pathToTranslationsFolder:`${e.pathToTranslationsFolder}/`})(),t.DefaultLanguage=e?.defaultLanguage||t.DefaultLanguage;let i=e?.fixedLanguage?t.DefaultLanguage:TranslationLanguage.toLowerCase(),n=await t.fetchLanguageFile(t.PathToLibTranslation,i);if(i===t.DefaultLanguage)t.LibTranslation=n;else{let r=await t.fetchLanguageFile(t.PathToLibTranslation,t.DefaultLanguage);t.LibTranslation={...r,...n}}if(!t.PathToModTranslation)return;let o=await t.fetchLanguageFile(t.PathToModTranslation,i);if(i===t.DefaultLanguage)t.ModTranslation=o;else{let r=await t.fetchLanguageFile(t.PathToModTranslation,t.DefaultLanguage);t.ModTranslation={...r,...o}}}static getTextMod(e){return t.ModTranslation?.[e]||void 0}static getTextLib(e){return t.LibTranslation?.[e]||void 0}static async fetchLanguageFile(e,i){let n=await fetch(`${e}${i}.lang`);if(i!==t.DefaultLanguage&&!n.ok)return this.fetchLanguageFile(e,t.DefaultLanguage);if(!n.ok)return{};let o=await n.text();return this.parseLanguageFile(o)}static parseLanguageFile(e){let i={},n=e.split(`
364
- `);for(let o of n){let r=o.trim();if(!r||r.startsWith("#"))continue;let[a,...l]=r.split("=");i[a.trim()]=l.join("=").trim()}return i}},d=s(t=>M.getTextMod(t)||M.getTextLib(t)||t,"getText");var W=class t{constructor(e){this.opts=e;e??={},e.closeOnBackdrop??=!0;let i=`modal-prompt-${Date.now()}`,n=(CommonIsArray(e.prompt)?e.prompt:[e.prompt]).filter(o=>o!==null)??[""];this.dialog=ElementCreate({tag:"dialog",classList:["deeplib-modal"],attributes:{id:this.opts.modalId??`modal-${Date.now()}`,role:"dialog","aria-modal":"true","aria-labelledby":i},style:{fontFamily:CommonGetFontName()},children:[{tag:"div",classList:["deeplib-modal-prompt-container"],children:[...n]},{tag:"div",classList:["deeplib-modal-prompt"],attributes:{id:i},children:[e.input?this.renderInput(e.input):void 0]},this.renderButtons()]}),this.blocker=this.createBlocker(),this.renderButtons(),document.body.append(this.createBlocker(),this.dialog),this.setupFocusTrap(),e.timeoutMs&&(this.timeoutId=window.setTimeout(()=>this.close("timeout"),e.timeoutMs))}static{s(this,"Modal")}dialog;blocker;inputEl;timeoutId;static queue=[];static processing=!1;show(){return t.enqueue(this)}static async alert(e,i={}){await new t({prompt:e,buttons:[{action:"close",text:d("modal.button.ok")}],timeoutMs:i.timeoutMs,escapeAction:"close",modalId:i.modalId}).show()}static async confirm(e,i={}){let[n]=await new t({prompt:e,buttons:[{text:d("modal.button.decline"),action:"decline"},{text:d("modal.button.confirm"),action:"confirm"}],escapeAction:"decline",enterAction:"confirm",modalId:i.modalId}).show();return n==="confirm"}static async prompt(e,i={}){let[n,o]=await new t({prompt:e,timeoutMs:0,input:{type:"input",defaultValue:i.defaultValue},buttons:[{text:d("modal.button.cancel"),action:"cancel"},{text:d("modal.button.submit"),action:"submit"}],escapeAction:"cancel",enterAction:"submit",modalId:i.modalId}).show();return n==="submit"?o:null}renderInput(e){let i=document.createElement(e.type);return i.classList.add("deeplib-modal-input"),e.placeholder&&(i.placeholder=e.placeholder),e.readOnly&&(i.readOnly=!0),e.defaultValue&&(i.value=e.defaultValue),e.type==="textarea"&&(i.rows=5),i.addEventListener("input",()=>{let n=e.validate?.(i.value);i.setCustomValidity(n||"")}),this.inputEl=i,i}renderButtons(){let e=document.createElement("div");return e.classList.add("deeplib-modal-button-container"),(this.opts.buttons?[...this.opts.buttons]:[]).forEach(n=>{let o=c.createButton({id:`deeplib-modal-${n.action}`,onClick:s(()=>this.close(n.action),"onClick"),options:{disabled:n.disabled,label:n.text}});e.append(o)}),e}createBlocker(){let e=document.createElement("div");return e.classList.add("deeplib-modal-blocker"),e.title="Click to close",this.opts.closeOnBackdrop!==!1&&e.addEventListener("click",()=>this.close("close")),e}setupFocusTrap(){let i=Array.from(this.dialog.querySelectorAll('button, [href], input, textarea, select, [tabindex]:not([tabindex="-1"])')),n=i[0],o=i[i.length-1];this.dialog.addEventListener("keydown",r=>{if(r.key==="Tab"){if(i.length===0){r.preventDefault();return}r.shiftKey?document.activeElement===n&&(o.focus(),r.preventDefault()):document.activeElement===o&&(n.focus(),r.preventDefault())}else if(r.key==="Escape")r.stopPropagation(),this.close(this.opts.escapeAction??"close");else if(r.key==="Enter"){if(i.some(a=>a===document.activeElement)&&document.activeElement!==this.inputEl)return;r.preventDefault(),r.stopPropagation(),this.close(this.opts.enterAction??"submit")}}),window.requestAnimationFrame(()=>{(this.inputEl||n)?.focus()})}close(e){this.timeoutId&&clearTimeout(this.timeoutId),this.dialog.close(),this.dialog.remove(),this.blocker.remove(),document.body.querySelector(".deeplib-modal-blocker")?.remove();let i=this.inputEl?.value??"";this.resolve([e,i]),t.dequeue()}resolve=s(()=>{},"resolve");static enqueue(e){return t.queue.push(e),t.processing||t.dequeue(),new Promise(i=>e.resolve=i)}static dequeue(){let e=t.queue.shift();e?(t.processing=!0,e.dialog.show()):t.processing=!1}};var le=class extends m{static{s(this,"GuiImportExport")}importExportOptions;static subscreenOptions={name:"import-export"};constructor(e){super(),this.importExportOptions=e}load(){super.load();let e=c.createButton({id:"deeplib-import-file-button",size:[600,90],onClick:s(()=>{this.dataImport("file")},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/file_import.svg`,label:d("import-export.button.import_file")}});g.appendToSettingsDiv(e);let i=c.createButton({id:"deeplib-export-file-button",size:[600,90],onClick:s(()=>{this.dataExport("file")},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/file_export.svg`,label:d("import-export.button.export_file")}});g.appendToSettingsDiv(i);let n=c.createButton({id:"deeplib-import-clipboard-button",size:[600,90],onClick:s(()=>{this.dataImport("clipboard")},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/clipboard_import.svg`,label:d("import-export.button.import_clipboard")}});g.appendToSettingsDiv(n);let o=c.createButton({id:"deeplib-export-clipboard-button",size:[600,90],onClick:s(()=>{this.dataExport("clipboard")},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/clipboard_export.svg`,label:d("import-export.button.export_clipboard")}});g.appendToSettingsDiv(o)}resize(){super.resize()}async dataExport(e){try{let i=await this.getSelectedModules(f(),"export");if(!i)return;if(i.length===0){ToastManager.error("No modules selected for export.");return}let n=this.buildExportPayload(i);if(e==="clipboard")await this.exportToClipboard(n);else if(e==="file"&&!await this.exportToFile(n,"settings"))return;this.importExportOptions.onExport?.(),ToastManager.success("Data exported successfully.")}catch(i){ToastManager.error("Data export failed."),p.error("Data export failed.",i)}}async dataImport(e){try{let i=e==="clipboard"?await this.importFromClipboard():await this.importFromFile();if(i===null)return;if(!i)throw new Error("No data");if(!await this.applyImportPayload(i))return;this.importExportOptions.onImport?.(),ToastManager.success("Data imported successfully.")}catch(i){ToastManager.error("Data import failed."),p.error("Data import failed.",i)}}async exportToFile(e,i){let n=this.importExportOptions.customFileExtension.startsWith(".")?this.importExportOptions.customFileExtension:"."+this.importExportOptions.customFileExtension,o=i.endsWith(n)?i:i+n;if("showSaveFilePicker"in window)try{let a=await(await window.showSaveFilePicker({suggestedName:o,types:[{description:"Custom Data Files",accept:{"text/plain":[n]}}]})).createWritable();return await a.write(e),await a.close(),!0}catch(r){throw new Error("File save cancelled or failed: "+r.message)}else{let r=await W.prompt("Enter file name",{defaultValue:o});if(r===null)return!1;if(r==="")throw new Error("File name cannot be empty.");let a=new Blob([e],{type:"text/plain"}),l=ElementCreate({tag:"a",attributes:{href:URL.createObjectURL(a),download:r.endsWith(n)?r:r+n}});return l.click(),URL.revokeObjectURL(l.href),!0}}async importFromFile(){let e=this.importExportOptions.customFileExtension.startsWith(".")?this.importExportOptions.customFileExtension:"."+this.importExportOptions.customFileExtension;async function i(n){if(!n.name.endsWith(e))throw new Error(`Invalid file type. Expected a ${e} file.`);return new Promise((o,r)=>{let a=new FileReader;a.onload=()=>o(a.result),a.onerror=()=>r(new Error("Failed to read file.")),a.readAsText(n)})}if(s(i,"importFromFileInternal"),"showOpenFilePicker"in window)try{let[n]=await window.showOpenFilePicker({types:[{description:"Custom Data Files",accept:{"text/plain":[e]}}],multiple:!1}),o=await n.getFile();return await i(o)}catch(n){throw new Error("File selection cancelled or failed: "+n.message)}else return new Promise((n,o)=>{let r=document.createElement("input");r.type="file",r.accept=e,r.onchange=async a=>{let l=a.target.files?.[0];if(l)try{let y=await i(l);n(y)}catch(y){o(y)}else o(new Error("No file selected."))},r.click()})}async exportToClipboard(e){return navigator.clipboard.writeText(e).catch(i=>{throw new Error("Failed to copy data to clipboard."+i)})}async importFromClipboard(){return W.prompt("Enter data to import").catch(e=>{throw new Error("Failed to read data from clipboard."+e)})}async getSelectedModules(e,i){let n=e.filter(h=>z(h,"settings")&&!!h.settings),o=Object.fromEntries(n.map(h=>[h.constructor.name,!0]));if(n.length===0)throw new Error("No modules to choose from.");let r=n.map(h=>c.createCheckbox({id:h.constructor.name,label:d(h.constructor.name),setElementValue:s(()=>o[h.constructor.name],"setElementValue"),setSettingValue:s(Y=>o[h.constructor.name]=Y,"setSettingValue")})),a=i==="import"?"import_export.import.select_modules":"import_export.export.select_modules";if(!await W.confirm([d(a),ElementCreate({tag:"br"}),d("import_export.text.not_sure"),{tag:"div",classList:["deeplib-modal-checkbox-container"],children:r}],{modalId:"deeplib-modal-import_export"}))return null;let y=Object.entries(o).filter(([h,Y])=>Y).map(([h])=>x(h)).filter(h=>!!h);if(y.length===0)throw new Error("No modules selected.");return y}buildExportPayload(e){let i={};for(let n of e)!z(n,"settings")||n.settings===null||(i[n.constructor.name]=n.settings);return LZString.compressToBase64(JSON.stringify(i))}async applyImportPayload(e){let i=JSON.parse(LZString.decompressFromBase64(e)??"");if(!i)throw new Error("Invalid import format.");let n=Object.keys(i).map(r=>x(r)).filter(r=>!!r),o=await this.getSelectedModules(n,"import");if(!o)return!1;if(o.length===0)throw new Error("No modules selected.");for(let r of o){let a=i[r.constructor.name];if(!a)continue;let l=b(r.defaultSettings,a);l&&(r.settings=l)}return!0}};var X=class t{static{s(this,"ModStorage")}static _instance=null;modName;constructor(e){return t._instance||(t._instance=this,this.modName=e),this.modName??=e,t._instance}get playerStorage(){return Player[this.modName]}set playerStorage(e){Player[this.modName]=e}get extensionStorage(){return Player.ExtensionSettings[this.modName]}set extensionStorage(e){Player.ExtensionSettings[this.modName]=e}setLocalStorage(e,i){localStorage.setItem(`${this.modName}_${e}`,t.dataCompress(i))}getLocalStorage(e){let i=localStorage.getItem(`${this.modName}_${e}`);return i?t.dataDecompress(i):null}load(){if(this.extensionStorage){let e=t.dataDecompress(this.extensionStorage||"");e===null||!Object.hasOwn(e,"Version")?this.playerStorage={Version:MOD_VERSION}:this.playerStorage=e}else this.playerStorage={}}save(){this.extensionStorage||(this.extensionStorage=""),this.extensionStorage=t.dataCompress(this.playerStorage),ServerPlayerExtensionSettingsSync(this.modName)}storageSize(){return t.measureSize(this.extensionStorage)}static dataDecompress(e){let i=LZString.decompressFromBase64(e),n=null;try{n=JSON.parse(i)}catch(o){p.error(o)}return n}static dataCompress(e){return LZString.compressToBase64(JSON.stringify(e))}static measureSize(e){try{if(typeof e!="string"&&(e=JSON.stringify(e)||""),typeof e=="string")return new TextEncoder().encode(e).byteLength;throw new Error}catch{return NaN}}};var G={autoSetPosition:Ge,autoSetSize:we,hide:Te,unhide:Le,hasOverflow:Se,doRectsOverlap:Ze};function Ge(t,e){let i,n,o;if(Array.isArray(e))i=e[0],n=e[1],o=e[2];else if(typeof e=="function"){let r=e();i=r[0],n=r[1],o=r[2]}i!==void 0&&n!==void 0&&ElementSetPosition(t,i,n,o)}s(Ge,"autoSetPosition");function we(t,e){let i,n;if(Array.isArray(e))i=e[0],n=e[1];else if(typeof e=="function"){let o=e();i=o[0],n=o[1]}i!==void 0&&n!==void 0&&ElementSetSize(t,i,n)}s(we,"autoSetSize");function Te(t){let e=ElementWrap(t);e&&(e.style.display="none")}s(Te,"hide");function Le(t){let e=ElementWrap(t);e&&(e.style.display="")}s(Le,"unhide");function Se(t){let e=ElementWrap(t);if(!e)return null;let i=e.scrollHeight>e.clientHeight,n=e.scrollWidth>e.clientWidth;return{any:i||n,vertical:i,horizontal:n}}s(Se,"hasOverflow");function Ze(t,e){return!(t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom)}s(Ze,"doRectsOverlap");var g={getSubscreen:P,appendToSubscreen:ke,removeSubscreen:Oe,getSettingsDiv:K,appendToSettingsDiv:Me,removeSettingsDiv:Ee,getMiscDiv:J,appendToMiscDiv:We,removeMiscDiv:Fe};function P(){let t=ElementWrap("deeplib-subscreen");if(t)return t;let e=ElementCreate({tag:"div",classList:["deeplib-subscreen","HideOnPopup"],attributes:{id:"deeplib-subscreen"}});return document.body.appendChild(e)}s(P,"elementGetSubscreenDiv");function Oe(){return P()?.remove()}s(Oe,"elementRemoveSubscreenDiv");function ke(...t){return P()?.append(...t)}s(ke,"elementAppendToSubscreenDiv");function K(){let t=ElementWrap("deeplib-settings");return t||ElementCreate({tag:"div",classList:["deeplib-settings","scroll-box"],attributes:{id:"deeplib-settings"}})}s(K,"elementGetSettingsDiv");function Me(...t){return K()?.append(...t)}s(Me,"elementAppendToSettingsDiv");function Ee(){return K()?.remove()}s(Ee,"elementRemoveSettingsDiv");function J(){let t=ElementWrap("deeplib-misc");return t||ElementCreate({tag:"div",classList:["deeplib-misc"],attributes:{id:"deeplib-misc"}})}s(J,"elementGetMiscDiv");function We(...t){return J()?.append(...t)}s(We,"elementAppendToMiscDiv");function Fe(){return J()?.remove()}s(Fe,"elementRemoveMiscDiv");var V=class t extends Array{static{s(this,"Logger")}ModName="DeepLib";constructor(e){super(),e&&(this.ModName=e)}_Log(e,...i){let n={logLevel:e,args:[...i],date:new Date(Date.now())},o=navigator.userAgent.toLowerCase();if(o.includes("chrome")||o.includes("firefox")){let r=t.colorizeLog(e);i.forEach(a=>{typeof a=="string"&&(a=`
365
- %c${a}`)}),console.log(`%c${this.ModName}:`,r,...i)}else console.log(`${this.ModName}:`,...i);this.push(n)}info(...e){this._Log("info",...e)}log(...e){this._Log("log",...e)}warn(...e){this._Log("warn",...e)}error(...e){this._Log("error",...e)}debug(...e){this._Log("debug",...e)}static colorizeLog(e){return{info:"color: #32CCCC",log:"color: #CCCC32",warn:"color: #eec355",error:"color: #750b0b",debug:"color: #9E4BCF"}[e]}},v=new V;function ci(t,e,i){let n=ElementCreate({tag:"div",classList:["ChatMessage","deeplib-message","ChatMessageNonDialogue"],attributes:{id:t??`DEEPLIB_LOCAL_MESSAGE_${Date.now()}`,"data-time":ChatRoomCurrentTime(),"data-sender":Player.MemberNumber?.toString()},children:[{tag:"span",classList:["deeplib-text"],innerHTML:e.replaceAll(`
366
- `,"")},{tag:"br"},{tag:"a",classList:["deeplib-text"],attributes:{href:"#"},innerHTML:"<b>Close (Click)</b>",eventListeners:{click:s(()=>{n.remove()},"click")}}]});ChatRoomAppendChat(n),i&&setTimeout(()=>n.remove(),i*1e3)}s(ci,"sendLocalMessage");function di(t,e=void 0,i=[]){t&&ServerSend("ChatRoomChat",{Content:"DEEPLIB_CUSTOM_ACTION",Type:"Action",Target:e??void 0,Dictionary:[{Tag:'MISSING TEXT IN "Interface.csv": DEEPLIB_CUSTOM_ACTION',Text:t},...i]})}s(di,"sendActionMessage");var S={Observe:0,AddBehavior:1,ModifyBehavior:5,OverrideBehavior:10,Top:100},E=class{static{s(this,"ModSdkManager")}SDK;patchedFunctions=new Map;constructor(e,i){this.SDK=bcModSdk.registerMod(e,i)}initPatchableFunction(e){let i=this.patchedFunctions.get(e);return i||(i={name:e,hooks:[]},this.patchedFunctions.set(e,i)),i}hookFunction(e,i,n,o=null){let r=this.initPatchableFunction(e);if(r.hooks.some(l=>l.hook===n))return()=>null;let a=this.SDK.hookFunction(e,i,n);return r.hooks.push({hook:n,priority:i,module:o,removeCallback:a}),r.hooks.sort((l,y)=>y.priority-l.priority),a}patchFunction(e,i){this.SDK.patchFunction(e,i)}unpatchFunction(e){this.SDK.removePatches(e)}removeHookByModule(e,i){let n=this.initPatchableFunction(e);for(let o=n.hooks.length-1;o>=0;o--)n.hooks[o].module===i&&(n.hooks[o].removeCallback(),n.hooks.splice(o,1));return!0}removeAllHooksByModule(e){for(let i of this.patchedFunctions.values())for(let n=i.hooks.length-1;n>=0;n--)i.hooks[n].module===e&&(i.hooks[n].removeCallback(),i.hooks.splice(n,1));return!0}unload(){this.SDK.unload()}};var N={injectInline(t,e){if(document.getElementById(t))return;let n=document.createElement("style");n.id=t,n.appendChild(document.createTextNode(e)),document.head.appendChild(n)},injectEmbed(t,e){if(document.getElementById(t))return;let n=document.createElement("link");n.id=t,n.rel="stylesheet",n.href=e,document.head.appendChild(n)},eject(t){let e=document.getElementById(t);e&&e.remove()},reload(t,e){N.eject(t),N.injectInline(t,e)},async fetch(t){return fetch(t).then(e=>e.text())}};var ce=class{constructor(e){this.channelName=e;I.hookFunction("ChatRoomMessageProcessHidden",0,(i,n)=>{if(!this.isChannelMessage(i[0]))return n(i);let[o,r]=i,{type:a,data:l}=o.Dictionary[0],y=this.listeners[a];return y&&y.forEach(h=>h(l,r)),n(i)},`EventChannel-${e}`)}static{s(this,"EventChannel")}listeners={};unload(){Object.keys(this.listeners).forEach(e=>delete this.listeners[e]),E.prototype.removeHookByModule("ChatRoomMessageProcessHidden",`EventChannel-${this.channelName}`)}sendEvent(e,i,n=null){let o={Type:"Hidden",Content:this.channelName,Sender:Player.MemberNumber,...n?{Target:n}:{},Dictionary:[{type:e,data:i}]};ServerSend("ChatRoomChat",o)}registerListener(e,i){let n=this.listeners[e]??[];return n.push(i),this.listeners[e]=n,()=>this.unregisterListener(e,i)}unregisterListener(e,i){let n=this.listeners[e];if(n){let o=n.indexOf(i);o!==-1&&n.splice(o,1)}}isChannelMessage(e){return e&&e.Type==="Hidden"&&e.Content===this.channelName&&e.Sender&&e.Sender!==Player.MemberNumber&&e.Dictionary&&!!e.Dictionary[0]?.data&&!!e.Dictionary[0]?.type||!1}};export{ne as BaseMigrator,B as BaseModule,m as BaseSubscreen,F as DebugModule,ce as EventChannel,L as GUI,D as GuiDebug,le as GuiImportExport,S as HookPriority,M as Localization,V as Logger,w as MOD_NAME,k as MainMenu,E as ModSdkManager,X as ModStorage,W as Modal,N as Style,R as VersionModule,c as advElement,se as byteToKB,v as deepLibLogger,b as deepMerge,G as domUtil,C as exportToGlobal,x as getModule,d as getText,z as hasGetter,wt as hasSetter,st as initMod,g as layout,p as modLogger,u as modStorage,f as modules,ie as registerModule,I as sdk,di as sendActionMessage,ci as sendLocalMessage,T as setSubscreen,Gt as shuffleArray,A as tryCatch,Tt as tryCatchAsync,be as unloadMod};
393
+ /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9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bTtcbiAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICB3aWR0aDogYXV0bztcbiAgICAgIHBhZGRpbmc6IG1pbigwLjR2aCwgMC4ydncpIG1pbigydmgsIDF2dyk7XG5cbiAgICAgIC5idXR0b24tbGFiZWwge1xuICAgICAgICBkaXNwbGF5OiBjb250ZW50cztcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICAuZGVlcGxpYi1tb2RhbC1wcm9tcHQtY29udGFpbmVyIHtcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgfVxufVxuXG4uZGVlcGxpYi1tb2RhbC1ibG9ja2VyIHtcbiAgei1pbmRleDogMTAwMDtcbiAgcG9zaXRpb246IGZpeGVkO1xuICB0b3A6IDA7XG4gIGxlZnQ6IDA7XG4gIHdpZHRoOiAxMDBkdnc7XG4gIGhlaWdodDogMTAwZHZoO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDAsIDAsIDAsIDAuNSk7XG59XG5cbiNkZWVwbGliLW1vZGFsLWltcG9ydF9leHBvcnQge1xuICAuZGVlcGxpYi1tb2RhbC1jaGVja2JveC1jb250YWluZXIge1xuICAgIG1hcmdpbi10b3A6IDAuNWVtO1xuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgICBnYXA6IHZhcigtLWhhbGYtZ2FwKTtcbiAgfVxufSJdfQ== */`;var X=class extends L{static{r(this,"DebugModule")}debugSettings={showRawTranslations:!1,showFileNames:!1,showIncomingServerTransactions:!1,incomingMessageFilterMode:"exclude",incomingMessageTypes:"",showOutcomingServerTransactions:!1,outcomingMessageFilterMode:"exclude",outcomingMessageTypes:"",showRawActivityNames:!1,showRawAssetNames:!1};load(){let e=p.getLocalStorage("debugOptions");e&&(this.debugSettings=Object.assign(this.debugSettings,e)),Le(),w.hookFunction("TextGet",E.ModifyBehavior,(n,i)=>{if(!this.debugSettings.showRawTranslations)return i(n);let[o]=n,s=TextScreenCache?.fileName()??"[unknown]";return this.debugSettings.showFileNames?`${s}::${o}`:o}),w.hookFunction("TextGetInScope",E.ModifyBehavior,(n,i)=>{if(!this.debugSettings.showRawTranslations)return i(n);let[o,s]=n,l=o.lastIndexOf("/");l===-1?l=0:l=l+1;let c=o.substring(l);return this.debugSettings.showFileNames?`${c}::${s}`:s}),w.hookFunction("InterfaceTextGet",E.ModifyBehavior,(n,i)=>{if(!this.debugSettings.showRawTranslations)return i(n);let[o]=n,s=InterfaceStringsPath.lastIndexOf("/");s===-1?s=0:s=s+1;let l=InterfaceStringsPath.substring(s);return this.debugSettings.showFileNames?`${l}::${o}`:o}),w.hookFunction("ActivityDictionaryText",E.ModifyBehavior,(n,i)=>{if(!this.debugSettings.showRawActivityNames)return i(n);let[o]=n;return o}),w.hookFunction("ElementButton.CreateForAsset",E.ModifyBehavior,(n,i)=>{if(!this.debugSettings.showRawAssetNames)return i(n);let[,o,,,s]=n;return o=("Asset"in o?o:{Asset:o}).Asset,s??={},s.label=o.Name,i(n)})}unload(){Oe()}saveDebugSettings(){p.setLocalStorage("debugOptions",this.debugSettings)}},M;function se(...t){let e=Array.isArray(t[0])&&typeof t[0][0]=="string"?t[0][0]:"[unknown]",n=Array.isArray(t[0])?t[0].slice(1):[],i=C("DebugModule");return i.debugSettings.showIncomingServerTransactions&&le(e,i.debugSettings.incomingMessageTypes,i.debugSettings.incomingMessageFilterMode)&&m.debug("\u25BC Receive",e,...n),M?.apply(this,t)}r(se,"processIncomingTransaction");var V;function ae(...t){let e=typeof t[0]=="string"?t[0]:"[unknown]",n=Array.isArray(t[1])?t[1]:[t[1]],i=C("DebugModule");return i.debugSettings.showOutcomingServerTransactions&&le(e,i.debugSettings.outcomingMessageTypes,i.debugSettings.outcomingMessageFilterMode)&&m.debug("\u25B2 Send",e,...n),V?.apply(this,t)}r(ae,"processOutcomingTransaction");function le(t,e,n){if(!e.trim())return!0;let o=e.split(",").map(s=>s.trim()).filter(s=>s.length>0).some(s=>t===s);return n==="include"?o:!o}r(le,"shouldLogMessage");function Le(){M===void 0&&typeof ServerSocket?.__proto__?.emitEvent=="function"&&(M=ServerSocket.__proto__.emitEvent,ServerSocket.__proto__.emitEvent=se),V===void 0&&typeof ServerSocket?.__proto__?.emit=="function"&&(V=ServerSocket.__proto__.emit,ServerSocket.__proto__.emit=ae)}r(Le,"loadServerTransactions");function Oe(){M&&ServerSocket.__proto__.emitEvent===se&&(ServerSocket.__proto__.emitEvent=M,M=void 0),V&&ServerSocket.__proto__.emit===ae&&(ServerSocket.__proto__.emit=V,V=void 0)}r(Oe,"unloadServerTransactions");var de=oe($(),1);var p,w,m;async function wt(t){w=new W({name:MOD_INFO.name,fullName:MOD_INFO.fullName,version:MOD_VERSION,repository:MOD_INFO.repository}),p=new Y(MOD_INFO.name),m=de.default.get(MOD_INFO.name),H.injectInline("deeplib-style-5.0.0",re),m.debug("Init wait"),(!CurrentScreen||CurrentScreen==="Login")&&t.beforeLogin?.(),await ServerIsLoggedInAsync(),Se(t)}r(wt,"initMod");async function Se(t){if(window[MOD_INFO.name+"Loaded"])return;let e=N(()=>{p.load()},s=>s);e.ok||m.error(e.error);let n=await ge(async()=>{await A.init(t.translationOptions)},s=>s);n.ok||m.error(n.error);let i=Object.entries(t.modules??{}),o=[];if(i.some(s=>s[1]instanceof U)||o.push(["VersionModule",new U]),IS_DEBUG&&!i.some(s=>s[1]instanceof X)&&o.push(["DebugModule",new X]),o.push(...i),!Fe(o)){Ze();return}await t.initFunction?.(),t.mainMenuOptions&&C("GUI")&&R.setOptions({...t.mainMenuOptions,repoLink:MOD_INFO.repository}),window[MOD_INFO.name+"Loaded"]=!0,m.log(`Loaded! Version: ${MOD_VERSION_CAPTION}`)}r(Se,"init");function Fe(t){for(let[e,n]of t)ue(e,n);for(let e of x()){let n=N(()=>e.init(),i=>i);n.ok||m.error(n.error)}for(let e of x()){let n=N(()=>e.load(),i=>i);n.ok||m.error(n.error)}for(let e of x()){let n=N(()=>e.run(),i=>i);n.ok||m.error(n.error)}for(let e of x())e.registerDefaultSettings(p.playerStorage);return m.debug("Modules Loaded."),!0}r(Fe,"initModules");function Ze(){return ke(),w.unload(),delete window[MOD_INFO.name+"Loaded"],m.debug("Unloaded."),!0}r(Ze,"unloadMod");function ke(){for(let t of x())t.unload()}r(ke,"unloadModules");var _=new Map;function x(){return[..._.values()]}r(x,"modules");function ue(t,e){return _.set(t,e),e}r(ue,"registerModule");function C(t){return _.get(t)}r(C,"getModule");var pe=class{static{r(this,"BaseMigrator")}};var k=class t extends L{static{r(this,"GUI")}static instance=null;_subscreens=[];_mainMenu=null;_modButtonOptions;get subscreens(){return this._subscreens}get mainMenu(){return this._mainMenu}constructor(e=null){if(super(),t.instance)throw new Error("Duplicate initialization");for(let n of x())n.settingsScreen;this._modButtonOptions=e,t.instance=this}load(){if(!this._modButtonOptions)return;let e=this._modButtonOptions;this._mainMenu=e?.mainMenu?new e.mainMenu(this):new R(this),this._subscreens=[this._mainMenu];for(let n of x())n.settingsScreen&&this._subscreens.push(new n.settingsScreen(n));this._mainMenu.subscreens=this._subscreens,PreferenceRegisterExtensionSetting({Identifier:this._modButtonOptions.identifier,ButtonText:this._modButtonOptions.buttonText,Image:this._modButtonOptions.image,load:r(async()=>{this._mainMenu&&await Z(this._mainMenu)},"load"),run:r(()=>{},"run"),click:r(()=>{},"click"),exit:r(()=>{},"exit")})}};var U=class t extends L{static{r(this,"VersionModule")}static isItNewVersion=!1;static version;static newVersionMessage="";static migrators=[];static beforeEach;static afterEach;static beforeAll;static afterAll;constructor(e){super(),e??={},t.newVersionMessage=e.newVersionMessage,e.migrators&&(t.migrators=e.migrators,t.migrators.sort((n,i)=>n.migrationVersion.localeCompare(i.migrationVersion))),t.beforeEach=e.beforeEach,t.afterEach=e.afterEach,t.beforeAll=e.beforeAll,t.afterAll=e.afterAll}load(){t.version=MOD_VERSION,t.checkVersionUpdate(),p.playerStorage.GlobalModule.doShowNewVersionMessage&&t.isItNewVersion&&t.sendNewVersionMessage()}static checkVersionUpdate(){let e=t.loadVersion(),n=t.version;t.isNewVersion(e,n)&&(t.isItNewVersion=!0,t.checkVersionMigration(),t.saveVersion()),p.save()}static checkVersionMigration(){let e=t.loadVersion(),n=t.migrators.filter(i=>t.isNewVersion(e,i.migrationVersion));if(n.length){t.beforeAll?.();for(let i of n)t.beforeEach?.(),i.migrate(),m.info(`Migrating from ${e} to ${i.migrationVersion} with ${i.constructor.name}`),t.afterEach?.();t.afterAll?.()}}static sendNewVersionMessage(){if(!t.newVersionMessage)return;let n=FriendListBeepLog.push({MemberNumber:Player.MemberNumber,MemberName:MOD_INFO.name,ChatRoomName:g("module.version.version_update"),ChatRoomSpace:"X",Private:!1,Sent:!1,Time:new Date,Message:t.newVersionMessage})-1,i=g("module.version.new_version_toast_title",{$modName$:MOD_INFO.name,$modVersion$:t.version}),o=FriendListBeepLog[n];ServerShowBeep(t.newVersionMessage,1e4,{memberNumber:o.MemberNumber,memberName:o.MemberName,chatRoomName:o.ChatRoomName,...o.Message&&{onClick:r(()=>{FriendListShowBeep(n)},"onClick")}},i)}static isNewVersion(e,n){if(e!==void 0){let i=e.split("."),o=n.split(".");for(let s=0;s<3;s++)if(i[s]!==o[s])return o[s]>i[s]}return e===void 0||e===""||!e}static saveVersion(){p.playerStorage&&(p.playerStorage.Version=t.version)}static loadVersion(){return p.playerStorage?.Version}};var j=class extends I{static{r(this,"GuiDebug")}static subscreenOptions={name:"debug"};get pageStructure(){return[[{type:"checkbox",id:"debug-show-incoming-server-transactions",label:"Show Incoming Server Transactions",setElementValue:r(()=>this.module.debugSettings.showIncomingServerTransactions,"setElementValue"),setSettingValue:r(e=>{this.module.debugSettings.showIncomingServerTransactions=e},"setSettingValue")},{type:"dropdown",id:"debug-incoming-filter-mode",label:"Filter Mode",description:["Configure which incoming message types to show or hide.",ElementCreate({tag:"br"}),"Include: only show these message types.",ElementCreate({tag:"br"}),"Exclude: hide these message types."],optionsList:[{attributes:{value:"include",label:"Include",selected:this.module.debugSettings.incomingMessageFilterMode==="include"}},{attributes:{value:"exclude",label:"Exclude",selected:this.module.debugSettings.incomingMessageFilterMode==="exclude"}}],setSettingValue:r(e=>{this.module.debugSettings.incomingMessageFilterMode=e},"setSettingValue")},{type:"text",id:"debug-incoming-message-types",label:"Message Types",description:'Comma-separated list of message types (e.g., "ChatRoomChat, ChatRoomSync")',setElementValue:r(()=>this.module.debugSettings.incomingMessageTypes,"setElementValue"),setSettingValue:r(e=>{this.module.debugSettings.incomingMessageTypes=e},"setSettingValue")},{type:"checkbox",id:"debug-show-outcoming-server-transactions",label:"Show Outcoming Server Transactions",setElementValue:r(()=>this.module.debugSettings.showOutcomingServerTransactions,"setElementValue"),setSettingValue:r(e=>{this.module.debugSettings.showOutcomingServerTransactions=e},"setSettingValue")},{type:"dropdown",id:"debug-outcoming-filter-mode",label:"Filter Mode",description:["Configure which outcoming message types to show or hide.",ElementCreate({tag:"br"}),"Include: only show these message types.",ElementCreate({tag:"br"}),"Exclude: hide these message types."],optionsList:[{attributes:{value:"include",label:"Include",selected:this.module.debugSettings.outcomingMessageFilterMode==="include"}},{attributes:{value:"exclude",label:"Exclude",selected:this.module.debugSettings.outcomingMessageFilterMode==="exclude"}}],setSettingValue:r(e=>{this.module.debugSettings.outcomingMessageFilterMode=e},"setSettingValue")},{type:"text",id:"debug-outcoming-message-types",label:"Message Types",description:'Comma-separated list of message types (e.g., "ChatRoomMessage, AccountUpdate")',setElementValue:r(()=>this.module.debugSettings.outcomingMessageTypes,"setElementValue"),setSettingValue:r(e=>{this.module.debugSettings.outcomingMessageTypes=e},"setSettingValue")},{type:"checkbox",id:"debug-show-raw-translations",label:"Show Raw Translations",setElementValue:r(()=>this.module.debugSettings.showRawTranslations,"setElementValue"),setSettingValue:r(e=>{this.module.debugSettings.showRawTranslations=e},"setSettingValue")},{type:"checkbox",id:"debug-show-file-names",label:"Show File Names",description:"Show the file name of the translation in the translation string.",setElementValue:r(()=>this.module.debugSettings.showFileNames,"setElementValue"),setSettingValue:r(e=>{this.module.debugSettings.showFileNames=e},"setSettingValue")},{type:"checkbox",id:"debug-show-raw-asset-names",label:"Show Raw Asset Names",setElementValue:r(()=>this.module.debugSettings.showRawAssetNames,"setElementValue"),setSettingValue:r(e=>{this.module.debugSettings.showRawAssetNames=e},"setSettingValue")},{type:"checkbox",id:"debug-show-raw-activity-names",label:"Show Raw Activity Names",setElementValue:r(()=>this.module.debugSettings.showRawActivityNames,"setElementValue"),setSettingValue:r(e=>{this.module.debugSettings.showRawActivityNames=e},"setSettingValue")}],[{type:"button",id:"test-deeplib-big-button",options:{label:"Big Button",tooltip:"This is a big button",image:"Icons/Exit.png"},size:[405,80],onClick(){G.info("Big Button Clicked")}},{type:"button",id:"test-deeplib-small-button",options:{tooltip:"This is a small button",image:"Icons/Exit.png"},size:[90,90],onClick(){G.info("Small Button Clicked")}},{type:"checkbox",id:"test-deeplib-checkbox",label:"Checkbox",description:"This is a checkbox",setElementValue(){return!0},setSettingValue(e){G.info("Checkbox value:",e)}},{type:"text",id:"test-deeplib-text-input",label:"Input",description:"This is a text input",setElementValue(){return"Input Value"},setSettingValue(e){G.info("Input value:",e)}},{type:"number",id:"test-deeplib-number-input",label:"Input",description:"This is a number input",setElementValue(){return"123"},setSettingValue(e){G.info("Input value:",e)}},{type:"label",id:"test-deeplib-label",label:"Label",description:"This is a label"}],[{type:"button",id:"test-deeplib-big-button2",options:{label:"Big Button",tooltip:"This is a big button",image:"Icons/Exit.png"},size:[405,80],onClick(){G.info("Big Button Clicked")}},{type:"button",id:"test-deeplib-small-button2",options:{tooltip:"This is a small button",image:"Icons/Next.png"},size:[90,90],onClick(){G.info("Small Button Clicked")}},{type:"checkbox",id:"test-deeplib-checkbox2",label:"Checkbox",description:"This is a checkbox",setElementValue(){return!0},setSettingValue(e){G.info("Checkbox value:",e)}},{type:"text",id:"test-deeplib-text-input2",label:"Input",description:"This is a text input",setElementValue(){return"Input Value"},setSettingValue(e){G.info("Input value:",e)}},{type:"number",id:"test-deeplib-number-input2",label:"Input",description:"This is a number input",setElementValue(){return"123"},setSettingValue(e){G.info("Input value:",e)}},{type:"label",id:"test-deeplib-label2",label:"Label",description:"This is a label"},{type:"dropdown",id:"test-deeplib-dropdown",label:"Dropdown",description:"This is a dropdown",optionsList:["Option 1","Option 2","Option 3"],setElementValue(){return"Option 2"},setSettingValue(e){G.info("Dropdown value:",e)}}]]}exit(){this.module.saveDebugSettings(),super.exit()}};function be(t){return t!==null&&typeof t=="object"&&Object.getPrototypeOf(t)===Object.prototype&&!Array.isArray(t)}r(be,"isPlainObject");function f(t,e,n={concatArrays:!0,matchingOnly:!1}){if(t===void 0)return e;if(e===void 0)return t;if(Array.isArray(t)&&Array.isArray(e)&&n.concatArrays)return[...t,...e];if(be(t)&&be(e)){let i={...t},o=Object.keys(t).length===0,s=n.matchingOnly&&!o?Object.keys(e).filter(l=>l in t):Object.keys(e);for(let l of s)l==="__proto__"||l==="constructor"||l==="prototype"||(i[l]=l in t?f(t[l],e[l],n):e[l]);return i}return e}r(f,"deepMerge");function Yt(t){let e=JSON.parse(JSON.stringify(t)),n=[];for(;e.length>0;){let i=Math.floor(Math.random()*e.length);n.push(e[i]),e.splice(i,1)}return n}r(Yt,"shuffleArray");function O(t,e){let n=t.split("."),i=globalThis;for(let o=0;o<n.length-1;o++)i[n[o]]||(i[n[o]]={}),i=i[n[o]];i[n[n.length-1]]=e}r(O,"exportToGlobal");function q(t,e){for(;t&&t!==Object.prototype;){if(Object.getOwnPropertyDescriptor(t,e)?.get)return!0;t=Object.getPrototypeOf(t)}return!1}r(q,"hasGetter");function Ht(t,e){for(;t&&t!==Object.prototype;){if(Object.getOwnPropertyDescriptor(t,e)?.set)return!0;t=Object.getPrototypeOf(t)}return!1}r(Ht,"hasSetter");var me=r(t=>Math.round(t/100)/10,"byteToKB");function N(t,e){try{return{ok:!0,value:t()}}catch(n){return{ok:!1,error:e?e(n):n}}}r(N,"tryCatch");async function ge(t,e){try{return{ok:!0,value:await t()}}catch(n){return{ok:!1,error:e?e(n):n}}}r(ge,"tryCatchAsync");var u={createButton:Ee,createCheckbox:Me,createInput:Re,createLabel:Ae,createCustom:Ve,createDropdown:We,createTooltip:De,getTooltip:he,setTooltip:ee,createBackNext:Xe};function Ee(t){t.id??=ElementGenerateID();let e=document.getElementById(t.id);if(e)return e;t.type="button";let n;t.options?.image&&(n=t.options.image,t.options.image=void 0);let i=typeof t?.disabled=="function"?t?.disabled():t?.disabled,o=ElementButton.Create(t.id,t?.onClick??(()=>{}),f({labelPosition:"center"},t.options),f({button:{classList:["deeplib-button"],attributes:{disabled:i},children:[n?f({tag:"img",attributes:{id:`${t.id}-image`,alt:"",decoding:"async",loading:"lazy",src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},style:{"--image":`url("${n}")`}},t.htmlOptions?.img):void 0]}},t.htmlOptions??{}));return I.currentElements.push([o,t]),o}r(Ee,"elementCreateButton");function Me(t){t.id??=ElementGenerateID();let e=document.getElementById(t.id);if(e)return e;t.type="checkbox";let n=typeof t?.disabled=="function"?t?.disabled():t?.disabled,i=ElementCreate(f({tag:"label",classList:["deeplib-checkbox-container",t?.options?.direction??"rowReverse"],attributes:{id:`${t.id}-container`,for:t.id},children:[t.label?f({tag:"span",classList:["deeplib-text"],attributes:{id:`${t.id}-label`},children:[t.label]},t.htmlOptions?.label):void 0,f({tag:"input",classList:["checkbox","deeplib-input"],attributes:{type:"checkbox",id:t.id,disabled:n,checked:t?.setElementValue?.()||void 0},eventListeners:{change:r(function(){t?.setSettingValue?.(this.checked)},"change")}},t.htmlOptions?.checkbox)]},t.htmlOptions?.container));return t.description&&(i.addEventListener("mouseover",function(o){z.call(this,o,t.description||null)}),i.addEventListener("mouseout",function(o){P.call(this,o)})),I.currentElements.push([i,t]),i}r(Me,"elementCreateCheckbox");function Ve(t){t.id??=ElementGenerateID(),t.htmlOptions.attributes??={},t.htmlOptions.attributes.id??=t.id;let e=document.getElementById(t.htmlOptions.attributes.id);if(e)return e;t.type="custom";let n=ElementCreate(t.htmlOptions);return I.currentElements.push([n,t]),n}r(Ve,"elementCreateCustom");function Re(t){t.id??=ElementGenerateID();let e=document.getElementById(t.id);if(e)return e;let n=typeof t?.disabled=="function"?t?.disabled():t?.disabled,i=ElementCreate(f({tag:"label",classList:["deeplib-input-container",t?.options?.direction??void 0],attributes:{id:`${t.id}-container`,for:t.id},children:[t.label?f({tag:"span",classList:["deeplib-text"],attributes:{id:`${t.id}-label`},children:[t.label]},t.htmlOptions?.label):void 0,f({tag:"input",classList:["deeplib-input"],attributes:{type:t.type,id:t.id,placeholder:" ",disabled:n,value:t?.setElementValue?.()||void 0},eventListeners:{input:r(function(){t?.setSettingValue?.(this.value)},"input")}},t.htmlOptions?.input)]},t.htmlOptions?.container));return t.description&&(i.addEventListener("mouseover",function(o){z.call(this,o,t.description||null)}),i.addEventListener("mouseout",function(o){P.call(this,o)})),I.currentElements.push([i,t]),i}r(Re,"elementCreateInput");function Ae(t){t.id??=ElementGenerateID();let e=document.getElementById(t.id);if(e)return e;t.type="label";let n=ElementCreate(f({tag:"label",classList:["deeplib-label","deeplib-text"],attributes:{id:t.id},children:[t.label]},t.htmlOptions));return t.description&&(n.addEventListener("mouseover",function(i){z.call(this,i,t.description||null)}),n.addEventListener("mouseout",function(i){P.call(this,i)})),I.currentElements.push([n,t]),n}r(Ae,"elementCreateLabel");function We(t){t.id??=ElementGenerateID();let e=document.getElementById(`${t.id}-container`);if(e)return e;t.type="dropdown";let n=ElementDropdown.CreateLabelled(t.id,t.optionsList,t.label??"",t.onChange??function(){return t.setSettingValue?.(this.value)},t.options,f({container:{classList:["deeplib-dropdown-container",t?.options?.direction??void 0],attributes:{id:`${t.id}-container`,for:t.id},eventListeners:{mouseover:r(function(i){z.call(this,i,t.description||null)},"mouseover"),mouseout:r(function(i){P.call(this,i)},"mouseout")}},label:{classList:["deeplib-text"],attributes:{id:`${t.id}-label`}}},t.htmlOptions));return I.currentElements.push([n,t]),n}r(We,"elementCreateDropdown");function De(){return ElementCreate({tag:"div",classList:["deeplib-tooltip","anchor-bottom"],attributes:{id:"deeplib-tooltip"},style:{display:"none"}})}r(De,"elementCreateTooltip");function he(){return document.getElementById("deeplib-tooltip")??void 0}r(he,"elementGetTooltip");function z(t,e){let n=this.getBoundingClientRect();ee(e,"bottom");let i=he();if(i){i.offsetHeight;let o=i.getBoundingClientRect();(S.doRectsOverlap(n,o)?"top":"bottom")==="top"&&fe("top")}}r(z,"tooltipMouseOver");function P(t){ee(null)}r(P,"tooltipMouseOut");function ee(t,e="bottom"){let n=document.getElementById("deeplib-tooltip");if(!n)return!1;fe(e);let i=t==null?null:CommonIsObject(t)&&"tag"in t?[ElementCreate(t)]:CommonIsArray(t)?t.map(o=>CommonIsObject(o)&&"tag"in o?ElementCreate(o):typeof o=="string"||CommonIsObject(t)&&"tag"in t||o instanceof HTMLElement?o:null).filter(o=>o!==null):typeof t=="string"?[t]:null;return i===null?(n.childNodes.forEach(o=>o.remove()),n.style.display="none",!0):(n.replaceChildren(...i),n.style.display="",!0)}r(ee,"elementSetTooltip");function fe(t){let e=document.getElementById("deeplib-tooltip");if(!e)return!1;e.classList.toggle("anchor-bottom",t==="bottom"),e.classList.toggle("anchor-top",t==="top")}r(fe,"elementSetTooltipPosition");function Xe(t){t.id??=ElementGenerateID();let e=document.getElementById(t.id);if(e)return e;let n=r(l=>{let c=document.getElementById(`${t.id}-label`);if(!c)return!1;c.textContent=l},"setLabel"),i=r(l=>{let c=document.getElementById(`deeplib-prev-next-${t.id}-prev-button-tooltip`);if(!c)return!1;c.textContent=l},"setPrevTooltip"),o=r(l=>{let c=document.getElementById(`deeplib-prev-next-${t.id}-next-button-tooltip`);if(!c)return!1;c.textContent=l},"setNextTooltip");return ElementCreate({tag:"div",classList:["deeplib-prev-next"],attributes:{id:t.id},children:[u.createButton({id:`deeplib-prev-next-${t.id}-prev-button`,onClick:r(()=>{t.back({setLabel:n,setBackTooltip:i,setNextTooltip:o})},"onClick"),htmlOptions:{button:{classList:["deeplib-prev-next-button"]}},options:{noStyling:!0,image:`${PUBLIC_URL}/dl_images/arrow_left.svg`,tooltip:t.initialPrevTooltip}}),u.createLabel({id:`${t.id}-label`,label:t.initialLabel,htmlOptions:{classList:["deeplib-prev-next-label"]}}),u.createButton({id:`deeplib-prev-next-${t.id}-next-button`,onClick:r(()=>{t.next({setLabel:n,setBackTooltip:i,setNextTooltip:o})},"onClick"),htmlOptions:{button:{classList:["deeplib-prev-next-button"]}},options:{noStyling:!0,image:`${PUBLIC_URL}/dl_images/arrow_right.svg`,tooltip:t.initialNextTooltip}})]})}r(Xe,"elementPrevNext");var R=class t extends I{static{r(this,"MainMenu")}subscreens=[];static options={};static subscreenOptions={name:"mainmenu",doShowExitButton:!1,settingsWidth:600};constructor(e){super(e),this.subscreens=e.subscreens}load(){if(!k.instance||CurrentModule!=="DeepLibMod"){this.setSubscreen(this);return}super.load();let e=u.createButton({id:"exit",size:[90,90],onClick:r(()=>{this.exit()},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/exit.svg`,tooltip:g("settings.button.back_button_hint")}}),n=document.getElementById("deeplib-nav-menu");n&&n.append(e);for(let o of this.subscreens){if(o.options.name==="mainmenu")continue;let s=u.createButton({id:`${o.options.name}-button`,onClick:r(()=>{this.setSubscreen(o)},"onClick"),size:[null,90],options:{image:o.options.icon,label:g(`mainmenu.button.${o.options.name}`)}});b.appendToSettingsDiv(s)}let i=b.getMiscDiv();if(b.appendToSubscreen(i),t.options.wikiLink){let o=u.createButton({id:"deeplib-wiki-button",onClick:r(()=>{window.open(t.options.wikiLink,"_blank")},"onClick"),size:[null,80],options:{image:`${PUBLIC_URL}/dl_images/notebook.svg`,label:g("mainmenu.button.wiki")}});b.appendToMiscDiv(o)}if(t.options.repoLink){let o=u.createButton({id:"deeplib-repo-button",onClick:r(()=>{window.open(t.options.repoLink,"_blank")},"onClick"),size:[null,80],options:{image:`${PUBLIC_URL}/dl_images/git.svg`,label:g("mainmenu.button.repo")}});b.appendToMiscDiv(o)}if(t.options.resetSubscreen){let o=u.createButton({id:"deeplib-reset-button",onClick:r(()=>{this.setSubscreen(t.options.resetSubscreen)},"onClick"),size:[null,80],options:{image:`${PUBLIC_URL}/dl_images/trash_bin.svg`,label:g("mainmenu.button.reset")}});b.appendToMiscDiv(o)}if(t.options.importExportSubscreen){let o=u.createButton({id:"deeplib-import-export-button",onClick:r(()=>{this.setSubscreen(t.options.importExportSubscreen)},"onClick"),size:[null,80],options:{image:`${PUBLIC_URL}/dl_images/transfer.svg`,label:g("mainmenu.button.import_export")}});b.appendToMiscDiv(o)}if(t.options.storageFullnessIndicator){let s=me(p.storageSize()),l=(s/180*100).toFixed(1),c=u.createButton({id:CommonGenerateUniqueID(),size:[null,80],options:{tooltipPosition:"left",noStyling:!0,tooltip:g("mainmenu.meter.storage_hint",{$percentage$:l}),label:g("mainmenu.meter.storage_label",{$currentCapacity$:s,$maxCapacity$:180})},htmlOptions:{button:{children:[{tag:"div",attributes:{id:"deeplib-storage-meter"},children:[{tag:"div",attributes:{id:"deeplib-storage-bar"},style:{width:`${l}%`}}]}]}}});b.appendToMiscDiv(c)}if(IS_DEBUG||C("DebugModule")){let o=u.createButton({id:"deeplib-debug-button",onClick:r(()=>{this.setSubscreen(new j(C("DebugModule")))},"onClick"),size:[90,90],options:{image:`${PUBLIC_URL}/dl_images/bug.svg`}});n&&n.prepend(o)}}run(){super.run()}click(){}exit(){CharacterAppearanceForceUpCharacter=-1,CharacterLoadCanvas(Player);let e=typeof this.options.returnScreen=="function"?this.options.returnScreen():this.options.returnScreen;e?e instanceof I?Z(e).then(()=>{}):Array.isArray(e)&&CommonSetScreen(...e):PreferenceOpenSubscreen("Extensions").then(()=>{PreferenceSubscreenExtensionsClear()})}resize(){super.resize(),ElementSetPosition("deeplib-misc",1905,930,"bottom-right"),ElementSetSize("deeplib-misc",405,null)}static setOptions(e){t.options=e}};var A=class t{static{r(this,"Localization")}static LibTranslation={};static ModTranslation={};static PathToModTranslation;static PathToLibTranslation=`${PUBLIC_URL}/dl_translations/`;static DefaultLanguage="en";static FetchFolder=!1;static initialized=!1;static async init(e){if(t.initialized)return;t.initialized=!0,t.PathToModTranslation=(()=>{if(e?.pathToTranslationsFolder)return e.pathToTranslationsFolder.endsWith("/")?e.pathToTranslationsFolder:`${e.pathToTranslationsFolder}/`})(),t.DefaultLanguage=e?.defaultLanguage||t.DefaultLanguage,t.FetchFolder=e?.fetchFolder||t.FetchFolder;let n=e?.fixedLanguage?t.DefaultLanguage:TranslationLanguage.toLowerCase(),i=await t.fetchTranslation(t.PathToLibTranslation,n);if(n===t.DefaultLanguage)t.LibTranslation=i;else{let s=await t.fetchTranslation(t.PathToLibTranslation,t.DefaultLanguage);t.LibTranslation={...s,...i}}if(!t.PathToModTranslation)return;let o=await t.fetchTranslation(t.PathToModTranslation,n,t.FetchFolder);if(n===t.DefaultLanguage)t.ModTranslation=o;else{let s=await t.fetchTranslation(t.PathToModTranslation,t.DefaultLanguage,t.FetchFolder);t.ModTranslation={...s,...o}}}static getTextMod(e){return t.ModTranslation?.[e]||void 0}static getTextLib(e){return t.LibTranslation?.[e]||void 0}static async fetchTranslation(e,n,i=!1){if(i){let l=`${e}${n}/`,c=await this.fetchLanguageFolder(l);if(Object.keys(c).length>0)return c}let o=`${e}${n}.lang`,s=await t.fetchLanguageFile(o);if(n!==t.DefaultLanguage&&!s){let l=`${e}${t.DefaultLanguage}.lang`;return await this.fetchLanguageFile(l)||{}}return s||{}}static async fetchLanguageFile(e){let n=await fetch(e).catch(o=>(m.error("Failed to fetch translation file:",o),new Response(null,{status:500})));if(!n.ok)return!1;let i=await n.text();return this.parseTranslation(i)}static async fetchLanguageFolder(e){let n={},i="manifest.txt",o=null,s=await fetch(`${e}${i}`).catch(l=>(m.error("Failed to fetch language folder manifest:",l),new Response(null,{status:500})));if(s.ok&&(o=(await s.text()).trim().split(`
394
+ `).map(c=>c.trim()).filter(c=>c&&!c.startsWith("#"))),o&&o.length>0){let l=o.map(async d=>{try{let a=await t.fetchLanguageFile(`${e}${d}`);if(a)return a}catch{}return{}}),c=await Promise.all(l);for(let d of c)Object.assign(n,d);if(Object.keys(n).length>0)return n}return n}static parseTranslation(e){let n={},i=e.split(`
395
+ `);for(let o of i){let s=o.trim();if(!s||s.startsWith("#"))continue;let[l,...c]=s.split("=");n[l.trim()]=c.join("=").trim()}return n}},g=r((t,e)=>{let n=A.getTextMod(t)||A.getTextLib(t)||t;if(e){let i=Object.fromEntries(Object.entries(e).map(([o,s])=>[o,s.toString()]));return CommonStringPartitionReplace(n,i).join("")}return n},"getText");var D=class t{constructor(e){this.opts=e;e??={},e.closeOnBackdrop??=!0,e.modalClassList??=[];let n=`modal-prompt-${Date.now()}`,i=(CommonIsArray(e.prompt)?e.prompt:[e.prompt]).filter(o=>o!==null)??[""];this.dialog=ElementCreate({tag:"dialog",classList:["deeplib-modal",...e.modalClassList],attributes:{id:this.opts.modalId??`modal-${Date.now()}`,role:"dialog","aria-modal":"true","aria-labelledby":n},children:[{tag:"div",classList:["deeplib-modal-prompt-container"],children:[...i]},{tag:"div",classList:["deeplib-modal-prompt"],attributes:{id:n},children:[e.input?this.renderInput(e.input):void 0]},this.renderButtons()]}),ElementSetFontSize(this.dialog,"auto"),this.blocker=this.createBlocker(),this.renderButtons(),document.body.append(this.createBlocker(),this.dialog),this.setupFocusTrap(),e.timeoutMs&&(this.timeoutId=window.setTimeout(()=>this.close("timeout"),e.timeoutMs)),e.onShow&&e.onShow.call(this.dialog),this.updateIntervalId=window.setInterval(()=>{ElementSetFontSize(this.dialog,"auto")},1e3)}opts;static{r(this,"Modal")}dialog;blocker;inputEl;timeoutId;updateIntervalId;static queue=[];static processing=!1;show(){return t.enqueue(this)}static async alert(e,n={}){await new t({prompt:e,buttons:[...n.buttons??[],{action:"close",text:g("modal.button.ok")}],timeoutMs:n.timeoutMs,escapeAction:"close",modalId:n.modalId,modalClassList:n.modalClassList,onShow:n.onShow}).show()}static async confirm(e,n={}){let[i]=await new t({prompt:e,buttons:[...n.buttons??[],{text:g("modal.button.decline"),action:"decline"},{text:g("modal.button.confirm"),action:"confirm"}],escapeAction:"decline",enterAction:"confirm",modalId:n.modalId,modalClassList:n.modalClassList,onShow:n.onShow}).show();return i==="confirm"}static async prompt(e,n={}){let[i,o]=await new t({prompt:e,timeoutMs:0,input:{type:"input",defaultValue:n.defaultValue},buttons:[...n.buttons??[],{text:g("modal.button.cancel"),action:"cancel"},{text:g("modal.button.submit"),action:"submit"}],escapeAction:"cancel",enterAction:"submit",modalId:n.modalId,modalClassList:n.modalClassList,onShow:n.onShow}).show();return i==="submit"?o:null}renderInput(e){let n=document.createElement(e.type);return n.classList.add("deeplib-modal-input"),e.placeholder&&(n.placeholder=e.placeholder),e.readOnly&&(n.readOnly=!0),e.defaultValue&&(n.value=e.defaultValue),e.type==="textarea"&&(n.rows=5),n.addEventListener("input",()=>{let i=e.validate?.(n.value);n.setCustomValidity(i||"")}),this.inputEl=n,n}renderButtons(){let e=document.createElement("div");return e.classList.add("deeplib-modal-button-container"),(this.opts.buttons?[...this.opts.buttons]:[]).forEach(i=>{let o=u.createButton({id:`deeplib-modal-${i.action}`,onClick:r(()=>typeof i.action=="function"?i.action():this.close(i.action),"onClick"),options:{disabled:i.disabled,label:i.text}});e.append(o)}),e}createBlocker(){let e=document.createElement("div");return e.classList.add("deeplib-modal-blocker"),e.title="Click to close",this.opts.closeOnBackdrop!==!1&&e.addEventListener("click",()=>this.close("close")),e}setupFocusTrap(){let n=Array.from(this.dialog.querySelectorAll('button, [href], input, textarea, select, [tabindex]:not([tabindex="-1"])')),i=n[0],o=n[n.length-1];this.dialog.addEventListener("keydown",s=>{if(s.key==="Tab"){if(n.length===0){s.preventDefault();return}s.shiftKey?document.activeElement===i&&(o.focus(),s.preventDefault()):document.activeElement===o&&(i.focus(),s.preventDefault())}else if(s.key==="Escape")s.stopPropagation(),this.close(this.opts.escapeAction??"close");else if(s.key==="Enter"){if(n.some(l=>l===document.activeElement)&&document.activeElement!==this.inputEl)return;s.preventDefault(),s.stopPropagation(),this.close(this.opts.enterAction??"submit")}}),window.requestAnimationFrame(()=>{(this.inputEl||i)?.focus()})}close(e){this.timeoutId&&clearTimeout(this.timeoutId),clearInterval(this.updateIntervalId),this.dialog.close(),this.dialog.remove(),this.blocker.remove(),document.body.querySelector(".deeplib-modal-blocker")?.remove();let n=this.inputEl?.value??"";this.resolve([e,n]),t.dequeue()}resolve=r(()=>{},"resolve");static enqueue(e){return t.queue.push(e),t.processing||t.dequeue(),new Promise(n=>e.resolve=n)}static dequeue(){let e=t.queue.shift();e?(t.processing=!0,e.dialog.show()):t.processing=!1}};var ve=class extends I{static{r(this,"GuiImportExport")}importExportOptions;static subscreenOptions={name:"import-export"};constructor(e){super(),this.importExportOptions=e}load(){super.load();let e=u.createButton({id:"deeplib-import-file-button",size:[600,90],onClick:r(()=>{this.dataImport("file")},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/file_import.svg`,label:g("import-export.button.import_file")}});b.appendToSettingsDiv(e);let n=u.createButton({id:"deeplib-export-file-button",size:[600,90],onClick:r(()=>{this.dataExport("file")},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/file_export.svg`,label:g("import-export.button.export_file")}});b.appendToSettingsDiv(n);let i=u.createButton({id:"deeplib-import-clipboard-button",size:[600,90],onClick:r(()=>{this.dataImport("clipboard")},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/clipboard_import.svg`,label:g("import-export.button.import_clipboard")}});b.appendToSettingsDiv(i);let o=u.createButton({id:"deeplib-export-clipboard-button",size:[600,90],onClick:r(()=>{this.dataExport("clipboard")},"onClick"),options:{image:`${PUBLIC_URL}/dl_images/clipboard_export.svg`,label:g("import-export.button.export_clipboard")}});b.appendToSettingsDiv(o)}resize(){super.resize()}async dataExport(e){try{let n=await this.getSelectedModules(x(),"export");if(!n)return;if(n.length===0){ToastManager.error("No modules selected for export.");return}let i=this.buildExportPayload(n);if(e==="clipboard")await this.exportToClipboard(i);else if(e==="file"&&!await this.exportToFile(i,"settings"))return;this.importExportOptions.onExport?.(),ToastManager.success("Data exported successfully.")}catch(n){ToastManager.error("Data export failed."),m.error("Data export failed.",n)}}async dataImport(e){try{let n=e==="clipboard"?await this.importFromClipboard():await this.importFromFile();if(n===null)return;if(!n)throw new Error("No data");if(!await this.applyImportPayload(n))return;this.importExportOptions.onImport?.(),ToastManager.success("Data imported successfully.")}catch(n){ToastManager.error("Data import failed."),m.error("Data import failed.",n)}}async exportToFile(e,n){let i=this.importExportOptions.customFileExtension.startsWith(".")?this.importExportOptions.customFileExtension:"."+this.importExportOptions.customFileExtension;if("showSaveFilePicker"in window)try{let s=await(await window.showSaveFilePicker({suggestedName:n+i,types:[{description:"Custom Data Files",accept:{"text/plain":[i]}}]})).createWritable();return await s.write(e),await s.close(),!0}catch(o){let s=o instanceof Error?o.message:String(o);throw new Error(`File save cancelled or failed: ${s}`,{cause:o})}else{let o=await D.prompt("Enter file name",{defaultValue:n});if(o===null)return!1;if(o==="")throw new Error("File name cannot be empty.");let s=new Blob([e],{type:"text/plain"}),l=ElementCreate({tag:"a",attributes:{href:URL.createObjectURL(s),download:o+i}});return l.click(),URL.revokeObjectURL(l.href),!0}}async importFromFile(){let e=this.importExportOptions.customFileExtension.startsWith(".")?this.importExportOptions.customFileExtension:"."+this.importExportOptions.customFileExtension;async function n(i){if(!i.name.endsWith(e))throw new Error(`Invalid file type. Expected a ${e} file.`);return new Promise((o,s)=>{let l=new FileReader;l.onload=()=>o(l.result),l.onerror=()=>s(new Error("Failed to read file.")),l.readAsText(i)})}if(r(n,"importFromFileInternal"),"showOpenFilePicker"in window)try{let[i]=await window.showOpenFilePicker({types:[{description:"Custom Data Files",accept:{"text/plain":[e]}}],multiple:!1}),o=await i.getFile();return await n(o)}catch(i){let o=i instanceof Error?i.message:String(i);throw new Error(`File selection cancelled or failed: ${o}`,{cause:i})}else return new Promise((i,o)=>{let s=document.createElement("input");s.type="file",s.accept=e,s.onchange=async l=>{let c=l.target.files?.[0];if(c)try{let d=await n(c);i(d)}catch(d){o(d)}else o(new Error("No file selected."))},s.click()})}async exportToClipboard(e){return navigator.clipboard.writeText(e).catch(n=>{let i=n instanceof Error?n.message:String(n);throw new Error(`Failed to copy data to clipboard: ${i}`,{cause:n})})}async importFromClipboard(){return D.prompt("Enter data to import").catch(e=>{let n=e instanceof Error?e.message:String(e);throw new Error(`Failed to read data from clipboard: ${n}`,{cause:e})})}async getSelectedModules(e,n){let i=e.filter(a=>q(a,"settings")&&!!a.settings),o=Object.fromEntries(i.map(a=>[a.constructor.name,!0]));if(i.length===0)throw new Error("No modules to choose from.");let s=i.map(a=>u.createCheckbox({id:a.constructor.name,label:g(a.constructor.name),setElementValue:r(()=>o[a.constructor.name],"setElementValue"),setSettingValue:r(h=>o[a.constructor.name]=h,"setSettingValue")})),l=n==="import"?"import_export.import.select_modules":"import_export.export.select_modules";if(!await D.confirm([g(l),ElementCreate({tag:"br"}),g("import_export.text.not_sure"),{tag:"div",classList:["deeplib-modal-checkbox-container"],children:s}],{modalId:"deeplib-modal-import_export"}))return null;let d=Object.entries(o).filter(([a,h])=>h).map(([a])=>C(a)).filter(a=>!!a);if(d.length===0)throw new Error("No modules selected.");return d}buildExportPayload(e){let n={};for(let i of e)!q(i,"settings")||i.settings===null||(n[i.constructor.name]=i.settings);return LZString.compressToBase64(JSON.stringify(n))}async applyImportPayload(e){let n=JSON.parse(LZString.decompressFromBase64(e)??"");if(!n)throw new Error("Invalid import format.");let i=Object.keys(n).map(s=>C(s)).filter(s=>!!s),o=await this.getSelectedModules(i,"import");if(!o)return!1;if(o.length===0)throw new Error("No modules selected.");for(let s of o){let l=n[s.constructor.name];if(!l)continue;let c=f(s.defaultSettings,l);c&&(s.settings=c)}return!0}};var Y=class t{static{r(this,"ModStorage")}static _instance=null;modName;constructor(e){return t._instance||(t._instance=this,this.modName=e),this.modName??=e,t._instance}get playerStorage(){return Player[this.modName]}set playerStorage(e){Player[this.modName]=e}get extensionStorage(){return Player.ExtensionSettings[this.modName]}set extensionStorage(e){Player.ExtensionSettings[this.modName]=e}setLocalStorage(e,n){localStorage.setItem(`${this.modName}_${e}`,t.dataCompress(n))}getLocalStorage(e){let n=localStorage.getItem(`${this.modName}_${e}`);return n?t.dataDecompress(n):null}load(){if(this.extensionStorage){let e=t.dataDecompress(this.extensionStorage||"");e===null||!Object.hasOwn(e,"Version")?this.playerStorage={Version:MOD_VERSION}:this.playerStorage=e}else this.playerStorage={}}save(){this.extensionStorage||(this.extensionStorage=""),this.extensionStorage=t.dataCompress(this.playerStorage),ServerPlayerExtensionSettingsSync(this.modName)}storageSize(){return t.measureSize(this.extensionStorage)}static dataDecompress(e){let n=LZString.decompressFromBase64(e),i=null;try{i=JSON.parse(n)}catch(o){m.error(o)}return i}static dataCompress(e){return LZString.compressToBase64(JSON.stringify(e))}static measureSize(e){try{if(typeof e!="string"&&(e=JSON.stringify(e)||""),typeof e=="string")return new TextEncoder().encode(e).byteLength;throw new Error}catch{return NaN}}};var S={autoSetPosition:Ne,autoSetSize:Ue,hide:Qe,unhide:Ye,hasOverflow:He,doRectsOverlap:je};function Ne(t,e){let n,i,o;if(Array.isArray(e))n=e[0],i=e[1],o=e[2];else if(typeof e=="function"){let s=e();n=s[0],i=s[1],o=s[2]}n!==void 0&&i!==void 0&&ElementSetPosition(t,n,i,o)}r(Ne,"autoSetPosition");function Ue(t,e){let n,i;if(Array.isArray(e))n=e[0],i=e[1];else if(typeof e=="function"){let o=e();n=o[0],i=o[1]}n!==void 0&&i!==void 0&&ElementSetSize(t,n,i)}r(Ue,"autoSetSize");function Qe(t){let e=ElementWrap(t);e&&(e.style.display="none")}r(Qe,"hide");function Ye(t){let e=ElementWrap(t);e&&(e.style.display="")}r(Ye,"unhide");function He(t){let e=ElementWrap(t);if(!e)return null;let n=e.scrollHeight>e.clientHeight,i=e.scrollWidth>e.clientWidth;return{any:n||i,vertical:n,horizontal:i}}r(He,"hasOverflow");function je(t,e){return!(t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom)}r(je,"doRectsOverlap");var b={getSubscreen:te,appendToSubscreen:Pe,removeSubscreen:ze,getSettingsDiv:ne,appendToSettingsDiv:Ke,removeSettingsDiv:Je,getMiscDiv:ie,appendToMiscDiv:$e,removeMiscDiv:_e};function te(){let t=ElementWrap("deeplib-subscreen");if(t)return t;let e=ElementCreate({tag:"div",classList:["deeplib-subscreen","HideOnPopup"],attributes:{id:"deeplib-subscreen"}});return document.body.appendChild(e)}r(te,"elementGetSubscreenDiv");function ze(){return te()?.remove()}r(ze,"elementRemoveSubscreenDiv");function Pe(...t){return te()?.append(...t)}r(Pe,"elementAppendToSubscreenDiv");function ne(){let t=ElementWrap("deeplib-settings");return t||ElementCreate({tag:"div",classList:["deeplib-settings","scroll-box"],attributes:{id:"deeplib-settings"}})}r(ne,"elementGetSettingsDiv");function Ke(...t){return ne()?.append(...t)}r(Ke,"elementAppendToSettingsDiv");function Je(){return ne()?.remove()}r(Je,"elementRemoveSettingsDiv");function ie(){let t=ElementWrap("deeplib-misc");return t||ElementCreate({tag:"div",classList:["deeplib-misc"],attributes:{id:"deeplib-misc"}})}r(ie,"elementGetMiscDiv");function $e(...t){return ie()?.append(...t)}r($e,"elementAppendToMiscDiv");function _e(){return ie()?.remove()}r(_e,"elementRemoveMiscDiv");var K=oe($(),1);function qe(t){let e=t.name;return{INFO:"color: #32CCCC",TRACE:"color: #CCCC32",WARN:"color: #eec355",ERROR:"color: #750b0b",DEBUG:"color: #9E4BCF",TIME:"color: #CCCC32"}[e]}r(qe,"colorizeLog");var G=K.default.get("DeepLib");K.default.useDefaults({defaultLevel:K.default.DEBUG,formatter:r(function(t,e){let n=e.name||"DeepLib",i=navigator.userAgent.toLowerCase();if(i.includes("chrome")||i.includes("firefox")){let o=qe(e.level);t.unshift(`%c${n}:`,o)}else t.unshift(`${n}:`)},"formatter")});function Zn(t,e,n){let i=ElementCreate({tag:"div",classList:["ChatMessage","deeplib-message","ChatMessageNonDialogue"],attributes:{id:t??`DEEPLIB_LOCAL_MESSAGE_${Date.now()}`,"data-time":ChatRoomCurrentTime(),"data-sender":Player.MemberNumber?.toString()},children:[{tag:"span",classList:["deeplib-text"],innerHTML:e.replaceAll(`
396
+ `,"")},{tag:"br"},{tag:"a",classList:["deeplib-text"],attributes:{href:"#"},innerHTML:"<b>Close (Click)</b>",eventListeners:{click:r(()=>{i.remove()},"click")}}]});ChatRoomAppendChat(i),n&&setTimeout(()=>i.remove(),n*1e3)}r(Zn,"sendLocalMessage");function kn(t,e=void 0,n=[]){t&&ServerSend("ChatRoomChat",{Content:"DEEPLIB_CUSTOM_ACTION",Type:"Action",Target:e??void 0,Dictionary:[{Tag:'MISSING TEXT IN "Interface.csv": DEEPLIB_CUSTOM_ACTION',Text:t},...n]})}r(kn,"sendActionMessage");var E={Observe:0,AddBehavior:1,ModifyBehavior:5,OverrideBehavior:10,Top:100},W=class{static{r(this,"ModSdkManager")}SDK;patchedFunctions=new Map;constructor(e,n){this.SDK=bcModSdk.registerMod(e,n)}initPatchableFunction(e){let n=this.patchedFunctions.get(e);return n||(n={name:e,hooks:[]},this.patchedFunctions.set(e,n)),n}hookFunction(e,n,i,o=null){let s=this.initPatchableFunction(e);if(s.hooks.some(c=>c.hook===i))return()=>null;let l=this.SDK.hookFunction(e,n,i);return s.hooks.push({hook:i,priority:n,module:o,removeCallback:l}),s.hooks.sort((c,d)=>d.priority-c.priority),l}patchFunction(e,n){this.SDK.patchFunction(e,n)}unpatchFunction(e){this.SDK.removePatches(e)}removeHookByModule(e,n){let i=this.initPatchableFunction(e);for(let o=i.hooks.length-1;o>=0;o--)i.hooks[o].module===n&&(i.hooks[o].removeCallback(),i.hooks.splice(o,1));return!0}removeAllHooksByModule(e){for(let n of this.patchedFunctions.values())for(let i=n.hooks.length-1;i>=0;i--)n.hooks[i].module===e&&(n.hooks[i].removeCallback(),n.hooks.splice(i,1));return!0}unload(){this.SDK.unload()}};var H={injectInline(t,e){if(document.getElementById(t))return;let i=document.createElement("style");i.id=t,i.appendChild(document.createTextNode(e)),document.head.appendChild(i)},injectEmbed(t,e){if(document.getElementById(t))return;let i=document.createElement("link");i.id=t,i.rel="stylesheet",i.href=e,document.head.appendChild(i)},eject(t){let e=document.getElementById(t);e&&e.remove()},reload(t,e){H.eject(t),H.injectInline(t,e)},async fetch(t){return fetch(t).then(e=>e.text()).catch(e=>(m.error("Failed to fetch stylesheet:",e),""))}};var Ie=class{constructor(e){this.channelName=e;w.hookFunction("ChatRoomMessageProcessHidden",0,(n,i)=>{if(!this.isChannelMessage(n[0]))return i(n);let[o,s]=n,{type:l,data:c}=o.Dictionary[0],d=this.listeners[l];return d&&d.forEach(a=>a(c,s)),i(n)},`EventChannel-${e}`)}channelName;static{r(this,"EventChannel")}listeners={};unload(){Object.keys(this.listeners).forEach(e=>delete this.listeners[e]),W.prototype.removeHookByModule("ChatRoomMessageProcessHidden",`EventChannel-${this.channelName}`)}sendEvent(e,n,i=null){let o={Type:"Hidden",Content:this.channelName,Sender:Player.MemberNumber,...i?{Target:i}:{},Dictionary:[{type:e,data:n}]};ServerSend("ChatRoomChat",o)}registerListener(e,n){let i=this.listeners[e]??[];return i.push(n),this.listeners[e]=i,()=>this.unregisterListener(e,n)}unregisterListener(e,n){let i=this.listeners[e];if(i){let o=i.indexOf(n);o!==-1&&i.splice(o,1)}}isChannelMessage(e){return e&&e.Type==="Hidden"&&e.Content===this.channelName&&e.Sender&&e.Sender!==Player.MemberNumber&&e.Dictionary&&!!e.Dictionary[0]?.data&&!!e.Dictionary[0]?.type||!1}};export{pe as BaseMigrator,L as BaseModule,I as BaseSubscreen,X as DebugModule,Ie as EventChannel,k as GUI,j as GuiDebug,ve as GuiImportExport,E as HookPriority,A as Localization,R as MainMenu,W as ModSdkManager,Y as ModStorage,D as Modal,H as Style,U as VersionModule,u as advElement,me as byteToKB,G as deepLibLogger,f as deepMerge,S as domUtil,O as exportToGlobal,C as getModule,g as getText,q as hasGetter,Ht as hasSetter,wt as initMod,b as layout,m as modLogger,p as modStorage,x as modules,ue as registerModule,w as sdk,kn as sendActionMessage,Zn as sendLocalMessage,Z as setSubscreen,Yt as shuffleArray,N as tryCatch,ge as tryCatchAsync,Ze as unloadMod};
397
+ /*! Bundled license information:
398
+
399
+ js-logger/src/logger.js:
400
+ (*!
401
+ * js-logger - http://github.com/jonnyreeves/js-logger
402
+ * Jonny Reeves, http://jonnyreeves.co.uk/
403
+ * js-logger may be freely distributed under the MIT license.
404
+ *)
405
+ */
367
406
  //# sourceMappingURL=deeplib.js.map