diff --git a/build/bundle.css b/build/bundle.css index bfeabdb..ce67985 100644 --- a/build/bundle.css +++ b/build/bundle.css @@ -1 +1 @@ -main.svelte-1oaol5r .main-content-wrapper.svelte-1oaol5r{min-height:100vh}nav.svelte-nghfuw.svelte-nghfuw{background-color:var(--color-navbar);padding:0 1em;position:fixed;top:0;width:100%;height:50px;z-index:1024;white-space:nowrap;backdrop-filter:blur(6px);overflow-x:auto;-webkit-backdrop-filter:blur(6px)}nav.svelte-nghfuw div.left.svelte-nghfuw{margin-right:2em}nav.svelte-nghfuw div.left img.svelte-nghfuw{width:auto;height:1.5em;margin-right:10px}nav.svelte-nghfuw div.right img.svelte-nghfuw{height:24px;width:auto;margin-top:4px}nav.svelte-nghfuw div.right img.smaller.svelte-nghfuw{height:20px}nav.svelte-nghfuw a.svelte-nghfuw{color:var(--color-text);text-decoration:none}nav.svelte-nghfuw a.svelte-nghfuw:not(:last-child){margin-right:1em}nav.svelte-nghfuw a.svelte-nghfuw:hover:not(.active){opacity:0.65}nav.svelte-nghfuw a.active.svelte-nghfuw{pointer-events:none}.below-navbar{margin-top:50px}section#page-not-found.svelte-hx25dd.svelte-hx25dd{min-height:100vh;display:flex;flex-direction:column;justify-content:center}section#page-not-found.svelte-hx25dd .disclaimer.svelte-hx25dd{margin-top:4em}#help-section.svelte-17enwed{min-height:100vh}#home-section.svelte-17ltnax{min-height:100vh}.toggle-pkg-view-btn.svelte-1n6bue6{z-index:1024;position:fixed;top:75px;right:25px}#footer.svelte-1qvog4t.svelte-1qvog4t{background-color:var(--color-footer);color:var(--color-text);width:100%;flex-direction:column}#footer.svelte-1qvog4t .heart.svelte-1qvog4t{color:rgb(218, 76, 135)}#footer.svelte-1qvog4t a.svelte-1qvog4t{white-space:nowrap}button.svelte-1yt6472.svelte-1yt6472{height:20px;width:20px}button.svelte-1yt6472 img.svelte-1yt6472{height:100%;width:auto}button.svelte-1yt6472.svelte-1yt6472:hover{opacity:0.65}.content-area-wrapper.svelte-pbl49w.svelte-pbl49w{width:100%;padding:3em 1em}.content-area-wrapper.banded.svelte-pbl49w.svelte-pbl49w{background-color:var(--color-bg-secondary)}@media only screen and (max-width: 1280px){.content-area-wrapper.svelte-pbl49w .content-area.svelte-pbl49w{width:100%}}@media only screen and (min-width: 1280px){.content-area-wrapper.svelte-pbl49w .content-area.svelte-pbl49w{width:1280px}}.section-header.svelte-yl4kn8.svelte-yl4kn8{text-align:left;display:inline-block}.section-header.svelte-yl4kn8 hr.svelte-yl4kn8{background-color:var(--color-accent);height:2px;border:0;border-radius:2px;width:85%;margin:0}input[type=file].svelte-1h6fkxa:hover{cursor:pointer}input[type=file].svelte-1h6fkxa::file-selector-button{display:none}input[type=file].invalid.svelte-1h6fkxa{border-color:var(--color-error)}button.svelte-11os9j4.svelte-11os9j4{background:none;color:var(--color-text);border-radius:4px}button.border.svelte-11os9j4.svelte-11os9j4{border:1px solid var(--color-text)}button.use-bg.svelte-11os9j4.svelte-11os9j4{background-color:var(--color-bg)}button.svelte-11os9j4.svelte-11os9j4:not(.border){border:none}button.svelte-11os9j4 img.svelte-11os9j4{height:18px;width:auto;margin-right:10px}button.large.svelte-11os9j4.svelte-11os9j4{font-size:1.2em}button.large.svelte-11os9j4 img.svelte-11os9j4{height:32px}button.active.svelte-11os9j4.svelte-11os9j4:hover,button.active.svelte-11os9j4.svelte-11os9j4:focus{cursor:pointer;background-color:var(--color-accent-secondary);border-color:var(--color-accent-secondary);color:var(--color-bg)}button.active:hover.danger.svelte-11os9j4.svelte-11os9j4,button.active:focus.danger.svelte-11os9j4.svelte-11os9j4{background-color:var(--color-error);border-color:var(--color-error);color:var(--color-light)}button.active:hover.danger.svelte-11os9j4 img.is-svg.svelte-11os9j4,button.active:focus.danger.svelte-11os9j4 img.is-svg.svelte-11os9j4{filter:var(--filter-light)}button.active.svelte-11os9j4:hover:not(.danger) img.is-svg.svelte-11os9j4,button.active.svelte-11os9j4:focus:not(.danger) img.is-svg.svelte-11os9j4{filter:var(--filter-svg-invert)}button.svelte-11os9j4.svelte-11os9j4:not(.active){border-color:var(--color-text-subtle);color:var(--color-text-subtle);cursor:not-allowed}button.svelte-11os9j4.svelte-11os9j4:not(.active):hover{cursor:not-allowed}button.svelte-11os9j4:not(.active) img.svelte-11os9j4{opacity:0.65}#warning-button.svelte-zid4w7.svelte-zid4w7{position:fixed;right:20px;bottom:20px;background-color:var(--color-bg-secondary);border-radius:4px}#warning-button.svelte-zid4w7 img.svelte-zid4w7{height:1.2em;width:auto}#discord-pkg-viewer.svelte-10zh8g1{height:100vh}#discord-plaintext-viewer.svelte-1kzj8hp{height:100vh}#discord-plaintext-viewer.html-content.svelte-1kzj8hp{padding-top:0}.new-resource-btn.svelte-157t23e{position:fixed;bottom:25px;right:25px}.movable-window.svelte-hqowq0.svelte-hqowq0{z-index:1024;position:fixed;width:360px;height:400px;right:20px;bottom:20px;background-color:var(--color-card);border:1px solid var(--color-bg-secondary);border-radius:4px}.movable-window.svelte-hqowq0 .window-content.svelte-hqowq0{overflow-y:auto;max-width:100%;overflow-x:hidden;max-height:360px}.movable-window.svelte-hqowq0 .movable-window-header.svelte-hqowq0{background-color:var(--color-card-secondary);border-top-left-radius:4px;border-top-right-radius:4px}.movable-window.svelte-hqowq0 .movable-window-header img.svelte-hqowq0{height:1em}.splitview.svelte-wmnfim.svelte-wmnfim{position:absolute;top:50px;left:0;right:0;bottom:0}.splitview.is-resizing.svelte-wmnfim.svelte-wmnfim{cursor:col-resize}.splitview.svelte-wmnfim .collapsed-left-panel.svelte-wmnfim,.splitview.svelte-wmnfim .left-panel.svelte-wmnfim,.splitview.svelte-wmnfim .right-panel.svelte-wmnfim,.splitview.svelte-wmnfim .resizer.svelte-wmnfim{position:absolute;top:0;bottom:0;overflow:hidden}.splitview.svelte-wmnfim .collapsed-left-panel.svelte-wmnfim{width:25px;background-color:var(--color-bg-secondary);font-size:14px;display:flex;flex-direction:column;align-items:center}.splitview.svelte-wmnfim .collapsed-left-panel span.svelte-wmnfim{writing-mode:vertical-lr;text-orientation:mixed;transform:rotate(-180deg);margin-top:16px;opacity:0.65}.splitview.svelte-wmnfim .collapsed-left-panel span.svelte-wmnfim:hover{cursor:pointer;opacity:1}.splitview.svelte-wmnfim .left-panel.svelte-wmnfim{left:0;width:350px}.splitview.svelte-wmnfim .right-panel.svelte-wmnfim{right:0;left:352px}.splitview.svelte-wmnfim .resizer.svelte-wmnfim{left:348px;width:4px;box-sizing:border-box;cursor:col-resize;border-right:2px solid var(--color-bg-secondary);background-color:transparent;z-index:512}.splitview.svelte-wmnfim .resizer.highlight.svelte-wmnfim{border-right-color:var(--color-accent)}.cursor-r.svelte-wmnfim.svelte-wmnfim{cursor:e-resize !important}.prevent-interaction.svelte-wmnfim.svelte-wmnfim{pointer-events:none;user-select:none}.grammar-select.svelte-1hgivyd{position:fixed;bottom:20px;right:20px;z-index:1024}button.svelte-17u6hw2{background:none;height:40px;border:1px solid var(--color-bg-secondary);background-color:var(--color-card-secondary);border-radius:4px;padding:0.8em;color:var(--color-text)}button.svelte-17u6hw2:disabled{pointer-events:none;opacity:0.65}button.svelte-17u6hw2:not(:disabled):hover{cursor:pointer;background-color:var(--color-accent-secondary);color:var(--color-bg)}.overlay.svelte-1piiy29.svelte-1piiy29{z-index:4096;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.overlay.svelte-1piiy29 .popup.svelte-1piiy29{max-width:768px;padding:1em}.overlay.svelte-1piiy29 .popup.large.svelte-1piiy29{max-width:1280px}.overlay.svelte-1piiy29 .popup.fill.svelte-1piiy29{width:100%}button.svelte-15lm59s.svelte-15lm59s{background:none;border:1px solid var(--color-divider);padding:0.5em;border-radius:4px}button.round.svelte-15lm59s.svelte-15lm59s{border-radius:50%}button.use-bg.svelte-15lm59s.svelte-15lm59s{background-color:var(--color-bg)}button.no-border.svelte-15lm59s.svelte-15lm59s{border:none !important}button.small.svelte-15lm59s.svelte-15lm59s{padding-left:0.65em;padding-right:0.65em}button.svelte-15lm59s img.svelte-15lm59s{height:18px;width:auto}button.svelte-15lm59s img.small.svelte-15lm59s{height:14px}button.active.svelte-15lm59s.svelte-15lm59s:hover,button.active.svelte-15lm59s.svelte-15lm59s:focus{cursor:pointer;background-color:var(--color-accent-secondary);border-color:var(--color-accent-secondary)}button.active:hover.danger-bg.svelte-15lm59s.svelte-15lm59s,button.active:focus.danger-bg.svelte-15lm59s.svelte-15lm59s{background-color:var(--color-error);border-color:var(--color-error)}button.active.svelte-15lm59s:hover img.svelte-15lm59s,button.active.svelte-15lm59s:focus img.svelte-15lm59s{filter:var(--filter-svg-invert)}button.svelte-15lm59s.svelte-15lm59s:not(.active){opacity:0.65}button.svelte-15lm59s.svelte-15lm59s:not(.active):hover{cursor:not-allowed}.text-input.fill-width.svelte-8ce34a.svelte-8ce34a{flex-grow:1}.text-input.svelte-8ce34a input.svelte-8ce34a,.text-input.svelte-8ce34a label.svelte-8ce34a{display:block}.text-input.svelte-8ce34a input.invalid.svelte-8ce34a{border-color:var(--color-error)}img.svelte-4un9ln{display:inline;height:0.8em;margin-left:0.2em;margin-right:0.2em}.checkbox.svelte-6qqi0r.svelte-6qqi0r{white-space:nowrap}.checkbox.svelte-6qqi0r input.svelte-6qqi0r:hover:not(:disabled),.checkbox.svelte-6qqi0r label.svelte-6qqi0r:hover:not(:disabled){cursor:pointer}.checkbox.svelte-6qqi0r input.svelte-6qqi0r:disabled,.checkbox.svelte-6qqi0r label.svelte-6qqi0r:disabled{opacity:0.65;pointer-events:none}#entries-menu.svelte-1nvua8m.svelte-1nvua8m{background-color:var(--color-bg-secondary);height:100%;min-width:200px}#entries-menu.svelte-1nvua8m img.svelte-1nvua8m{height:1.2em;width:auto}#entries-menu.svelte-1nvua8m .entries-wrapper.svelte-1nvua8m{overflow-y:auto;height:88%}#entries-menu.svelte-1nvua8m .no-entries-container.svelte-1nvua8m{height:100%;width:100%;text-align:center}#entries-menu.svelte-1nvua8m .no-entries-container h3.svelte-1nvua8m{color:var(--color-text-subtle)}.prism-wrapper.svelte-wezena.svelte-wezena{max-width:100%;height:100%;overflow-x:auto;overflow-y:auto}.prism-wrapper.svelte-wezena img.svelte-wezena{border:1px solid var(--color-text);max-width:256px;max-height:256px}button#go-to-file-button.svelte-wezena.svelte-wezena{position:fixed;z-index:5000;background:none;border:1px solid var(--color-bg-secondary);background-color:var(--color-card-secondary);border-radius:4px;padding:0.25em;color:var(--color-text)}button#go-to-file-button.svelte-wezena.svelte-wezena:hover{cursor:pointer;background-color:var(--color-bg-secondary)}textarea.svelte-hs9zs3{resize:none;background-color:var(--color-bg-secondary);border-radius:8px;padding:8px;width:100%;height:350px;overflow-y:auto;overflow-x:auto;white-space:pre}.primary-entry.svelte-ze3hg8{background-color:var(--color-bg-secondary);border-radius:4px}.primary-entry.has-simdata.svelte-ze3hg8{border-radius:4px 4px 0 4px}.linked-entry.svelte-ze3hg8{background-color:var(--color-bg-secondary);border-radius:0;border-top:1px solid var(--color-bg);padding:0.5em;margin-left:2em}.linked-entry.svelte-ze3hg8:last-child{border-radius:0 0 4px 4px}.html-replacement-view.svelte-12q8wk4.svelte-12q8wk4{max-height:100vh;padding-top:50px;display:flex;flex-direction:column}.html-replacement-view.svelte-12q8wk4 button.svelte-12q8wk4{background-color:transparent;border-radius:4px;padding:1em;color:var(--color-accent);border:1px solid var(--color-accent)}.html-replacement-view.svelte-12q8wk4 button.svelte-12q8wk4:hover{background-color:var(--color-accent);color:var(--color-bg);cursor:pointer}.html-replacement-view.svelte-12q8wk4 .preview-wrapper.svelte-12q8wk4{max-width:100%;overflow-x:auto;overflow-y:auto}button.svelte-1on8w4u.svelte-1on8w4u{position:fixed;z-index:4096;top:25px;right:25px;width:40px;height:40px}button.svelte-1on8w4u img.svelte-1on8w4u{width:100%;height:100%}button.svelte-1on8w4u img.svelte-1on8w4u:hover{cursor:pointer;opacity:0.65}.select-with-label.svelte-1kanbjl select.svelte-1kanbjl{height:42px}.select-with-label.svelte-1kanbjl select.small.svelte-1kanbjl{height:28px;font-size:0.8em;padding:0.15em}.select-with-label.svelte-1kanbjl select option.svelte-1kanbjl{background-color:var(--color-bg)}.select-with-label.svelte-1kanbjl select.svelte-1kanbjl:disabled{opacity:0.65}.select-with-label.svelte-1kanbjl label.svelte-1kanbjl,.select-with-label.svelte-1kanbjl select.svelte-1kanbjl{display:block}.select-with-label.svelte-1kanbjl label.small.svelte-1kanbjl{font-size:0.6em}.entry-row.svelte-1g3dsgo.svelte-1g3dsgo{position:relative;border-radius:4px;overflow-x:hidden;border:1px solid var(--color-bg-secondary)}.entry-row.active.svelte-1g3dsgo.svelte-1g3dsgo{border-color:var(--color-text);background-color:var(--color-card)}.entry-row.svelte-1g3dsgo.svelte-1g3dsgo:not(.active):hover{cursor:pointer;background-color:var(--color-card)}.entry-row.svelte-1g3dsgo .warning-img-wrapper.svelte-1g3dsgo{background-color:var(--color-warning);opacity:0.8;position:absolute;z-index:512;top:5px;right:5px;height:20px;min-width:40px;border-radius:4px;padding:2px;gap:4px}.entry-row.svelte-1g3dsgo .warning-img-wrapper img.svelte-1g3dsgo{max-height:16px}.entry-row.svelte-1g3dsgo .warning-img-wrapper p.svelte-1g3dsgo{color:var(--color-dark);font-size:0.8em !important} \ No newline at end of file +main.svelte-1oaol5r .main-content-wrapper.svelte-1oaol5r{min-height:100vh}nav.svelte-nghfuw.svelte-nghfuw{background-color:var(--color-navbar);padding:0 1em;position:fixed;top:0;width:100%;height:50px;z-index:1024;white-space:nowrap;backdrop-filter:blur(6px);overflow-x:auto;-webkit-backdrop-filter:blur(6px)}nav.svelte-nghfuw div.left.svelte-nghfuw{margin-right:2em}nav.svelte-nghfuw div.left img.svelte-nghfuw{width:auto;height:1.5em;margin-right:10px}nav.svelte-nghfuw div.right img.svelte-nghfuw{height:24px;width:auto;margin-top:4px}nav.svelte-nghfuw div.right img.smaller.svelte-nghfuw{height:20px}nav.svelte-nghfuw a.svelte-nghfuw{color:var(--color-text);text-decoration:none}nav.svelte-nghfuw a.svelte-nghfuw:not(:last-child){margin-right:1em}nav.svelte-nghfuw a.svelte-nghfuw:hover:not(.active){opacity:0.65}nav.svelte-nghfuw a.active.svelte-nghfuw{pointer-events:none}.below-navbar{margin-top:50px}section#page-not-found.svelte-hx25dd.svelte-hx25dd{min-height:100vh;display:flex;flex-direction:column;justify-content:center}section#page-not-found.svelte-hx25dd .disclaimer.svelte-hx25dd{margin-top:4em}#home-section.svelte-17ltnax{min-height:100vh}.toggle-pkg-view-btn.svelte-1n6bue6{z-index:1024;position:fixed;top:75px;right:25px}#help-section.svelte-17enwed{min-height:100vh}button.svelte-1yt6472.svelte-1yt6472{height:20px;width:20px}button.svelte-1yt6472 img.svelte-1yt6472{height:100%;width:auto}button.svelte-1yt6472.svelte-1yt6472:hover{opacity:0.65}#footer.svelte-1qvog4t.svelte-1qvog4t{background-color:var(--color-footer);color:var(--color-text);width:100%;flex-direction:column}#footer.svelte-1qvog4t .heart.svelte-1qvog4t{color:rgb(218, 76, 135)}#footer.svelte-1qvog4t a.svelte-1qvog4t{white-space:nowrap}input[type=file].svelte-1h6fkxa:hover{cursor:pointer}input[type=file].svelte-1h6fkxa::file-selector-button{display:none}input[type=file].invalid.svelte-1h6fkxa{border-color:var(--color-error)}.section-header.svelte-yl4kn8.svelte-yl4kn8{text-align:left;display:inline-block}.section-header.svelte-yl4kn8 hr.svelte-yl4kn8{background-color:var(--color-accent);height:2px;border:0;border-radius:2px;width:85%;margin:0}.content-area-wrapper.svelte-pbl49w.svelte-pbl49w{width:100%;padding:3em 1em}.content-area-wrapper.banded.svelte-pbl49w.svelte-pbl49w{background-color:var(--color-bg-secondary)}@media only screen and (max-width: 1280px){.content-area-wrapper.svelte-pbl49w .content-area.svelte-pbl49w{width:100%}}@media only screen and (min-width: 1280px){.content-area-wrapper.svelte-pbl49w .content-area.svelte-pbl49w{width:1280px}}button.svelte-11os9j4.svelte-11os9j4{background:none;color:var(--color-text);border-radius:4px}button.border.svelte-11os9j4.svelte-11os9j4{border:1px solid var(--color-text)}button.use-bg.svelte-11os9j4.svelte-11os9j4{background-color:var(--color-bg)}button.svelte-11os9j4.svelte-11os9j4:not(.border){border:none}button.svelte-11os9j4 img.svelte-11os9j4{height:18px;width:auto;margin-right:10px}button.large.svelte-11os9j4.svelte-11os9j4{font-size:1.2em}button.large.svelte-11os9j4 img.svelte-11os9j4{height:32px}button.active.svelte-11os9j4.svelte-11os9j4:hover,button.active.svelte-11os9j4.svelte-11os9j4:focus{cursor:pointer;background-color:var(--color-accent-secondary);border-color:var(--color-accent-secondary);color:var(--color-bg)}button.active:hover.danger.svelte-11os9j4.svelte-11os9j4,button.active:focus.danger.svelte-11os9j4.svelte-11os9j4{background-color:var(--color-error);border-color:var(--color-error);color:var(--color-light)}button.active:hover.danger.svelte-11os9j4 img.is-svg.svelte-11os9j4,button.active:focus.danger.svelte-11os9j4 img.is-svg.svelte-11os9j4{filter:var(--filter-light)}button.active.svelte-11os9j4:hover:not(.danger) img.is-svg.svelte-11os9j4,button.active.svelte-11os9j4:focus:not(.danger) img.is-svg.svelte-11os9j4{filter:var(--filter-svg-invert)}button.svelte-11os9j4.svelte-11os9j4:not(.active){border-color:var(--color-text-subtle);color:var(--color-text-subtle);cursor:not-allowed}button.svelte-11os9j4.svelte-11os9j4:not(.active):hover{cursor:not-allowed}button.svelte-11os9j4:not(.active) img.svelte-11os9j4{opacity:0.65}.new-resource-btn.svelte-157t23e{position:fixed;bottom:25px;right:25px}#warning-button.svelte-zid4w7.svelte-zid4w7{position:fixed;right:20px;bottom:20px;background-color:var(--color-bg-secondary);border-radius:4px}#warning-button.svelte-zid4w7 img.svelte-zid4w7{height:1.2em;width:auto}#discord-pkg-viewer.svelte-10zh8g1{height:100vh}#discord-plaintext-viewer.svelte-1kzj8hp{height:100vh}#discord-plaintext-viewer.html-content.svelte-1kzj8hp{padding-top:0}.text-input.fill-width.svelte-8ce34a.svelte-8ce34a{flex-grow:1}.text-input.svelte-8ce34a input.svelte-8ce34a,.text-input.svelte-8ce34a label.svelte-8ce34a{display:block}.text-input.svelte-8ce34a input.invalid.svelte-8ce34a{border-color:var(--color-error)}img.svelte-4un9ln{display:inline;height:0.8em;margin-left:0.2em;margin-right:0.2em}.checkbox.svelte-6qqi0r.svelte-6qqi0r{white-space:nowrap}.checkbox.svelte-6qqi0r input.svelte-6qqi0r:hover:not(:disabled),.checkbox.svelte-6qqi0r label.svelte-6qqi0r:hover:not(:disabled){cursor:pointer}.checkbox.svelte-6qqi0r input.svelte-6qqi0r:disabled,.checkbox.svelte-6qqi0r label.svelte-6qqi0r:disabled{opacity:0.65;pointer-events:none}button.svelte-17u6hw2{background:none;height:40px;border:1px solid var(--color-bg-secondary);background-color:var(--color-card-secondary);border-radius:4px;padding:0.8em;color:var(--color-text)}button.svelte-17u6hw2:disabled{pointer-events:none;opacity:0.65}button.svelte-17u6hw2:not(:disabled):hover{cursor:pointer;background-color:var(--color-accent-secondary);color:var(--color-bg)}.overlay.svelte-1piiy29.svelte-1piiy29{z-index:4096;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.overlay.svelte-1piiy29 .popup.svelte-1piiy29{max-width:768px;padding:1em}.overlay.svelte-1piiy29 .popup.large.svelte-1piiy29{max-width:1280px}.overlay.svelte-1piiy29 .popup.fill.svelte-1piiy29{width:100%}.movable-window.svelte-hqowq0.svelte-hqowq0{z-index:1024;position:fixed;width:360px;height:400px;right:20px;bottom:20px;background-color:var(--color-card);border:1px solid var(--color-bg-secondary);border-radius:4px}.movable-window.svelte-hqowq0 .window-content.svelte-hqowq0{overflow-y:auto;max-width:100%;overflow-x:hidden;max-height:360px}.movable-window.svelte-hqowq0 .movable-window-header.svelte-hqowq0{background-color:var(--color-card-secondary);border-top-left-radius:4px;border-top-right-radius:4px}.movable-window.svelte-hqowq0 .movable-window-header img.svelte-hqowq0{height:1em}button.svelte-15lm59s.svelte-15lm59s{background:none;border:1px solid var(--color-divider);padding:0.5em;border-radius:4px}button.round.svelte-15lm59s.svelte-15lm59s{border-radius:50%}button.use-bg.svelte-15lm59s.svelte-15lm59s{background-color:var(--color-bg)}button.no-border.svelte-15lm59s.svelte-15lm59s{border:none !important}button.small.svelte-15lm59s.svelte-15lm59s{padding-left:0.65em;padding-right:0.65em}button.svelte-15lm59s img.svelte-15lm59s{height:18px;width:auto}button.svelte-15lm59s img.small.svelte-15lm59s{height:14px}button.active.svelte-15lm59s.svelte-15lm59s:hover,button.active.svelte-15lm59s.svelte-15lm59s:focus{cursor:pointer;background-color:var(--color-accent-secondary);border-color:var(--color-accent-secondary)}button.active:hover.danger-bg.svelte-15lm59s.svelte-15lm59s,button.active:focus.danger-bg.svelte-15lm59s.svelte-15lm59s{background-color:var(--color-error);border-color:var(--color-error)}button.active.svelte-15lm59s:hover img.svelte-15lm59s,button.active.svelte-15lm59s:focus img.svelte-15lm59s{filter:var(--filter-svg-invert)}button.svelte-15lm59s.svelte-15lm59s:not(.active){opacity:0.65}button.svelte-15lm59s.svelte-15lm59s:not(.active):hover{cursor:not-allowed}.splitview.svelte-wmnfim.svelte-wmnfim{position:absolute;top:50px;left:0;right:0;bottom:0}.splitview.is-resizing.svelte-wmnfim.svelte-wmnfim{cursor:col-resize}.splitview.svelte-wmnfim .collapsed-left-panel.svelte-wmnfim,.splitview.svelte-wmnfim .left-panel.svelte-wmnfim,.splitview.svelte-wmnfim .right-panel.svelte-wmnfim,.splitview.svelte-wmnfim .resizer.svelte-wmnfim{position:absolute;top:0;bottom:0;overflow:hidden}.splitview.svelte-wmnfim .collapsed-left-panel.svelte-wmnfim{width:25px;background-color:var(--color-bg-secondary);font-size:14px;display:flex;flex-direction:column;align-items:center}.splitview.svelte-wmnfim .collapsed-left-panel span.svelte-wmnfim{writing-mode:vertical-lr;text-orientation:mixed;transform:rotate(-180deg);margin-top:16px;opacity:0.65}.splitview.svelte-wmnfim .collapsed-left-panel span.svelte-wmnfim:hover{cursor:pointer;opacity:1}.splitview.svelte-wmnfim .left-panel.svelte-wmnfim{left:0;width:350px}.splitview.svelte-wmnfim .right-panel.svelte-wmnfim{right:0;left:352px}.splitview.svelte-wmnfim .resizer.svelte-wmnfim{left:348px;width:4px;box-sizing:border-box;cursor:col-resize;border-right:2px solid var(--color-bg-secondary);background-color:transparent;z-index:512}.splitview.svelte-wmnfim .resizer.highlight.svelte-wmnfim{border-right-color:var(--color-accent)}.cursor-r.svelte-wmnfim.svelte-wmnfim{cursor:e-resize !important}.prevent-interaction.svelte-wmnfim.svelte-wmnfim{pointer-events:none;user-select:none}.grammar-select.svelte-1hgivyd{position:fixed;bottom:20px;right:20px;z-index:1024}textarea.svelte-hs9zs3{resize:none;background-color:var(--color-bg-secondary);border-radius:8px;padding:8px;width:100%;height:350px;overflow-y:auto;overflow-x:auto;white-space:pre}#entries-menu.svelte-1nvua8m.svelte-1nvua8m{background-color:var(--color-bg-secondary);height:100%;min-width:200px}#entries-menu.svelte-1nvua8m img.svelte-1nvua8m{height:1.2em;width:auto}#entries-menu.svelte-1nvua8m .entries-wrapper.svelte-1nvua8m{overflow-y:auto;height:88%}#entries-menu.svelte-1nvua8m .no-entries-container.svelte-1nvua8m{height:100%;width:100%;text-align:center}#entries-menu.svelte-1nvua8m .no-entries-container h3.svelte-1nvua8m{color:var(--color-text-subtle)}.primary-entry.svelte-ze3hg8{background-color:var(--color-bg-secondary);border-radius:4px}.primary-entry.has-simdata.svelte-ze3hg8{border-radius:4px 4px 0 4px}.linked-entry.svelte-ze3hg8{background-color:var(--color-bg-secondary);border-radius:0;border-top:1px solid var(--color-bg);padding:0.5em;margin-left:2em}.linked-entry.svelte-ze3hg8:last-child{border-radius:0 0 4px 4px}.prism-wrapper.svelte-wezena.svelte-wezena{max-width:100%;height:100%;overflow-x:auto;overflow-y:auto}.prism-wrapper.svelte-wezena img.svelte-wezena{border:1px solid var(--color-text);max-width:256px;max-height:256px}button#go-to-file-button.svelte-wezena.svelte-wezena{position:fixed;z-index:5000;background:none;border:1px solid var(--color-bg-secondary);background-color:var(--color-card-secondary);border-radius:4px;padding:0.25em;color:var(--color-text)}button#go-to-file-button.svelte-wezena.svelte-wezena:hover{cursor:pointer;background-color:var(--color-bg-secondary)}.html-replacement-view.svelte-12q8wk4.svelte-12q8wk4{max-height:100vh;padding-top:50px;display:flex;flex-direction:column}.html-replacement-view.svelte-12q8wk4 button.svelte-12q8wk4{background-color:transparent;border-radius:4px;padding:1em;color:var(--color-accent);border:1px solid var(--color-accent)}.html-replacement-view.svelte-12q8wk4 button.svelte-12q8wk4:hover{background-color:var(--color-accent);color:var(--color-bg);cursor:pointer}.html-replacement-view.svelte-12q8wk4 .preview-wrapper.svelte-12q8wk4{max-width:100%;overflow-x:auto;overflow-y:auto}button.svelte-1on8w4u.svelte-1on8w4u{position:fixed;z-index:4096;top:25px;right:25px;width:40px;height:40px}button.svelte-1on8w4u img.svelte-1on8w4u{width:100%;height:100%}button.svelte-1on8w4u img.svelte-1on8w4u:hover{cursor:pointer;opacity:0.65}.select-with-label.svelte-1kanbjl select.svelte-1kanbjl{height:42px}.select-with-label.svelte-1kanbjl select.small.svelte-1kanbjl{height:28px;font-size:0.8em;padding:0.15em}.select-with-label.svelte-1kanbjl select option.svelte-1kanbjl{background-color:var(--color-bg)}.select-with-label.svelte-1kanbjl select.svelte-1kanbjl:disabled{opacity:0.65}.select-with-label.svelte-1kanbjl label.svelte-1kanbjl,.select-with-label.svelte-1kanbjl select.svelte-1kanbjl{display:block}.select-with-label.svelte-1kanbjl label.small.svelte-1kanbjl{font-size:0.6em}.entry-row.svelte-1g3dsgo.svelte-1g3dsgo{position:relative;border-radius:4px;overflow-x:hidden;border:1px solid var(--color-bg-secondary)}.entry-row.active.svelte-1g3dsgo.svelte-1g3dsgo{border-color:var(--color-text);background-color:var(--color-card)}.entry-row.svelte-1g3dsgo.svelte-1g3dsgo:not(.active):hover{cursor:pointer;background-color:var(--color-card)}.entry-row.svelte-1g3dsgo .warning-img-wrapper.svelte-1g3dsgo{background-color:var(--color-warning);opacity:0.8;position:absolute;z-index:512;top:5px;right:5px;height:20px;min-width:40px;border-radius:4px;padding:2px;gap:4px}.entry-row.svelte-1g3dsgo .warning-img-wrapper img.svelte-1g3dsgo{max-height:16px}.entry-row.svelte-1g3dsgo .warning-img-wrapper p.svelte-1g3dsgo{color:var(--color-dark);font-size:0.8em !important} \ No newline at end of file diff --git a/build/bundle.js b/build/bundle.js index fd122f0..9b27fed 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -1,4 +1,4 @@ -var app=function(){"use strict";function e(){}const t=e=>e;function n(e,t){for(const n in t)e[n]=t[n];return e}function r(e){return e()}function i(){return Object.create(null)}function a(e){e.forEach(r)}function s(e){return"function"==typeof e}function o(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let l;function c(e,t){return l||(l=document.createElement("a")),l.href=t,e===l.href}function u(t,...n){if(null==t)return e;const r=t.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function f(e,t,n,r){if(e){const i=d(e,t,n,r);return e[0](i)}}function d(e,t,r,i){return e[1]&&i?n(r.ctx.slice(),e[1](i(t))):r.ctx}function h(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(void 0===t.dirty)return i;if("object"==typeof i){const e=[],n=Math.max(t.dirty.length,i.length);for(let r=0;r32){const t=[],n=e.ctx.length/32;for(let e=0;ewindow.performance.now():()=>Date.now(),w=v?e=>requestAnimationFrame(e):e;const b=new Set;function $(e){b.forEach((t=>{t.c(e)||(b.delete(t),t.f())})),0!==b.size&&w($)}function _(e){let t;return 0===b.size&&w($),{promise:new Promise((n=>{b.add(t={c:e,f:n})})),abort(){b.delete(t)}}}function k(e,t){e.appendChild(t)}function x(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function S(e){const t=E("style");return function(e,t){k(e.head||e,t)}(x(e),t),t.sheet}function C(e,t,n){e.insertBefore(t,n||null)}function T(e){e.parentNode.removeChild(e)}function E(e){return document.createElement(e)}function A(e){return document.createTextNode(e)}function I(){return A(" ")}function D(){return A("")}function B(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function z(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function R(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function O(e,t){e.value=null==t?"":t}function N(e,t){for(let n=0;n>>0}(u)}_${o}`,d=x(e),{stylesheet:h,rules:p}=M.get(d)||function(e,t){const n={stylesheet:S(t),rules:{}};return M.set(e,n),n}(d,e);p[f]||(p[f]=!0,h.insertRule(`@keyframes ${f} ${u}`,h.cssRules.length));const m=e.style.animation||"";return e.style.animation=`${m?`${m}, `:""}${f} ${r}ms linear ${i}ms 1 both`,j+=1,f}function H(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),i=n.length-r.length;i&&(e.style.animation=r.join(", "),j-=i,j||w((()=>{j||(M.forEach((e=>{const{stylesheet:t}=e;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.rules={}})),M.clear())})))}function K(e){U=e}function Z(){if(!U)throw new Error("Function called outside component initialization");return U}function G(e){Z().$$.on_mount.push(e)}function q(e){Z().$$.on_destroy.push(e)}function X(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e.call(this,t)))}const V=[],Y=[],J=[],Q=[],ee=Promise.resolve();let te=!1;function ne(){te||(te=!0,ee.then(ce))}function re(){return ne(),ee}function ie(e){J.push(e)}function ae(e){Q.push(e)}const se=new Set;let oe,le=0;function ce(){const e=U;do{for(;le{oe=null}))),oe}function de(e,t,n){e.dispatchEvent(F(`${t?"intro":"outro"}${n}`))}const he=new Set;let pe;function me(){pe={r:0,c:[],p:pe}}function ge(){pe.r||a(pe.c),pe=pe.p}function ve(e,t){e&&e.i&&(he.delete(e),e.i(t))}function ye(e,t,n,r){if(e&&e.o){if(he.has(e))return;he.add(e),pe.c.push((()=>{he.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}else r&&r()}const we={duration:0};function be(n,r,i,o){let l=r(n,i),c=o?0:1,u=null,f=null,d=null;function h(){d&&H(n,d)}function p(e,t){const n=e.b-c;return t*=Math.abs(n),{a:c,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function m(r){const{delay:i=0,duration:s=300,easing:o=t,tick:m=e,css:g}=l||we,v={start:y()+i,b:r};r||(v.group=pe,pe.r+=1),u||f?f=v:(g&&(h(),d=W(n,c,r,s,i,o,g)),r&&m(0,1),u=p(v,s),ie((()=>de(n,r,"start"))),_((e=>{if(f&&e>f.start&&(u=p(f,s),f=null,de(n,u.b,"start"),g&&(h(),d=W(n,c,u.b,u.duration,0,o,l.css))),u)if(e>=u.end)m(c=u.b,1-c),de(n,u.b,"end"),f||(u.b?h():--u.group.r||a(u.group.c)),u=null;else if(e>=u.start){const t=e-u.start;c=u.a+u.d*o(t/u.duration),m(c,1-c)}return!(!u&&!f)})))}return{run(e){s(l)?fe().then((()=>{l=l(),m(e)})):m(e)},end(){h(),u=f=null}}}function $e(e,t){e.d(1),t.delete(e.key)}function _e(e,t){ye(e,1,1,(()=>{t.delete(e.key)}))}function ke(e,t,n,r,i,a,s,o,l,c,u,f){let d=e.length,h=a.length,p=d;const m={};for(;p--;)m[e[p].key]=p;const g=[],v=new Map,y=new Map;for(p=h;p--;){const e=f(i,a,p),o=n(e);let l=s.get(o);l?r&&l.p(e,t):(l=c(o,e),l.c()),v.set(o,g[p]=l),o in m&&y.set(o,Math.abs(p-m[o]))}const w=new Set,b=new Set;function $(e){ve(e,1),e.m(o,u),s.set(e.key,e),u=e.first,h--}for(;d&&h;){const t=g[h-1],n=e[d-1],r=t.key,i=n.key;t===n?(u=t.first,d--,h--):v.has(i)?!s.has(r)||w.has(r)?$(t):b.has(i)?d--:y.get(r)>y.get(i)?(b.add(r),$(t)):(w.add(i),d--):(l(n,s),d--)}for(;d--;){const t=e[d];v.has(t.key)||l(t,s)}for(;h;)$(g[h-1]);return g}function xe(e,t){const n={},r={},i={$$scope:1};let a=e.length;for(;a--;){const s=e[a],o=t[a];if(o){for(const e in s)e in o||(r[e]=1);for(const e in o)i[e]||(n[e]=o[e],i[e]=1);e[a]=o}else for(const e in s)i[e]=1}for(const e in r)e in n||(n[e]=void 0);return n}function Se(e){return"object"==typeof e&&null!==e?e:{}}function Ce(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function Te(e){e&&e.c()}function Ee(e,t,n,i){const{fragment:o,on_mount:l,on_destroy:c,after_update:u}=e.$$;o&&o.m(t,n),i||ie((()=>{const t=l.map(r).filter(s);c?c.push(...t):a(t),e.$$.on_mount=[]})),u.forEach(ie)}function Ae(e,t){const n=e.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ie(t,n,r,s,o,l,c,u=[-1]){const f=U;K(t);const d=t.$$={fragment:null,ctx:null,props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(f?f.$$.context:[])),callbacks:i(),dirty:u,skip_bound:!1,root:n.target||f.$$.root};c&&c(d.root);let h=!1;if(d.ctx=r?r(t,n.props||{},((e,n,...r)=>{const i=r.length?r[0]:n;return d.ctx&&o(d.ctx[e],d.ctx[e]=i)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](i),h&&function(e,t){-1===e.$$.dirty[0]&&(V.push(e),ne(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Be=[];function ze(e,t){return{subscribe:Re(e,t).subscribe}}function Re(t,n=e){let r;const i=new Set;function a(e){if(o(t,e)&&(t=e,r)){const e=!Be.length;for(const e of i)e[1](),Be.push(e,t);if(e){for(let e=0;e{i.delete(l),0===i.size&&(r(),r=null)}}}}function Oe(t,n,r){const i=!Array.isArray(t),o=i?[t]:t,l=n.length<2;return ze(r,(t=>{let r=!1;const c=[];let f=0,d=e;const h=()=>{if(f)return;d();const r=n(i?c[0]:c,t);l?t(r):d=s(r)?r:e},p=o.map(((e,t)=>u(e,(e=>{c[t]=e,f&=~(1<{f|=1<{Ae(e,1)})),ge()}s?(t=new s(o()),t.$on("routeEvent",e[7]),Te(t.$$.fragment),ve(t.$$.fragment,1),Ee(t,r.parentNode,r)):t=null}else s&&t.$set(i)},i(e){i||(t&&ve(t.$$.fragment,e),i=!0)},o(e){t&&ye(t.$$.fragment,e),i=!1},d(e){e&&T(r),t&&Ae(t,e)}}}function Le(e){let t,r,i;const a=[{params:e[1]},e[2]];var s=e[0];function o(e){let t={};for(let e=0;e{Ae(e,1)})),ge()}s?(t=new s(o()),t.$on("routeEvent",e[6]),Te(t.$$.fragment),ve(t.$$.fragment,1),Ee(t,r.parentNode,r)):t=null}else s&&t.$set(i)},i(e){i||(t&&ve(t.$$.fragment,e),i=!0)},o(e){t&&ye(t.$$.fragment,e),i=!1},d(e){e&&T(r),t&&Ae(t,e)}}}function Fe(e){let t,n,r,i;const a=[Le,Ne],s=[];function o(e,t){return e[1]?0:1}return t=o(e),n=s[t]=a[t](e),{c(){n.c(),r=D()},m(e,n){s[t].m(e,n),C(e,r,n),i=!0},p(e,[i]){let l=t;t=o(e),t===l?s[t].p(e,i):(me(),ye(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=a[t](e),n.c()),ve(n,1),n.m(r.parentNode,r))},i(e){i||(ve(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&T(r)}}}function Pe(){const e=window.location.href.indexOf("#/");let t=e>-1?window.location.href.substr(e+1):"/";const n=t.indexOf("?");let r="";return n>-1&&(r=t.substr(n+1),t=t.substr(0,n)),{location:t,querystring:r}}const Me=ze(null,(function(e){e(Pe());const t=()=>{e(Pe())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}})),Ue=Oe(Me,(e=>e.location));Oe(Me,(e=>e.querystring));const je=Re(void 0);function We(e,t){if(t=Ke(t),!e||!e.tagName||"a"!=e.tagName.toLowerCase())throw Error('Action "link" can only be used with tags');return He(e,t),{update(t){t=Ke(t),He(e,t)}}}function He(e,t){let n=t.href||e.getAttribute("href");if(n&&"/"==n.charAt(0))n="#"+n;else if(!n||n.length<2||"#/"!=n.slice(0,2))throw Error('Invalid value for "href" attribute: '+n);e.setAttribute("href",n),e.addEventListener("click",(e=>{e.preventDefault(),t.disabled||function(e){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0,void 0),window.location.hash=e}(e.currentTarget.getAttribute("href"))}))}function Ke(e){return e&&"string"==typeof e?{href:e}:e||{}}function Ze(e,t,n){let{routes:r={}}=t,{prefix:i=""}=t,{restoreScrollState:a=!1}=t;class s{constructor(e,t){if(!t||"function"!=typeof t&&("object"!=typeof t||!0!==t._sveltesparouter))throw Error("Invalid component object");if(!e||"string"==typeof e&&(e.length<1||"/"!=e.charAt(0)&&"*"!=e.charAt(0))||"object"==typeof e&&!(e instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:n,keys:r}=function(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,s=[],o="",l=e.split("/");for(l[0]||l.shift();i=l.shift();)"*"===(n=i[0])?(s.push("wild"),o+="/(.*)"):":"===n?(r=i.indexOf("?",1),a=i.indexOf(".",1),s.push(i.substring(1,~r?r:~a?a:i.length)),o+=~r&&!~a?"(?:/([^/]+?))?":"/([^/]+?)",~a&&(o+=(~r?"?":"")+"\\"+i.substring(a))):o+="/"+i;return{keys:s,pattern:new RegExp("^"+o+(t?"(?=$|/)":"/?$"),"i")}}(e);this.path=e,"object"==typeof t&&!0===t._sveltesparouter?(this.component=t.component,this.conditions=t.conditions||[],this.userData=t.userData,this.props=t.props||{}):(this.component=()=>Promise.resolve(t),this.conditions=[],this.props={}),this._pattern=n,this._keys=r}match(e){if(i)if("string"==typeof i){if(!e.startsWith(i))return null;e=e.substr(i.length)||"/"}else if(i instanceof RegExp){const t=e.match(i);if(!t||!t[0])return null;e=e.substr(t[0].length)||"/"}const t=this._pattern.exec(e);if(null===t)return null;if(!1===this._keys)return t;const n={};let r=0;for(;r{o.push(new s(t,e))})):Object.keys(r).forEach((e=>{o.push(new s(e,r[e]))}));let l=null,c=null,u={};const f=function(){const e=Z();return(t,n,{cancelable:r=!1}={})=>{const i=e.$$.callbacks[t];if(i){const a=F(t,n,{cancelable:r});return i.slice().forEach((t=>{t.call(e,a)})),!a.defaultPrevented}return!0}}();async function d(e,t){await re(),f(e,t)}let h=null,p=null;var m;a&&(p=e=>{h=e.state&&e.state.__svelte_spa_router_scrollY?e.state:null},window.addEventListener("popstate",p),m=()=>{h?window.scrollTo(h.__svelte_spa_router_scrollX,h.__svelte_spa_router_scrollY):window.scrollTo(0,0)},Z().$$.after_update.push(m));let g=null,v=null;const y=Me.subscribe((async e=>{g=e;let t=0;for(;t{je.set(c)}))}n(0,l=null),v=null,je.set(void 0)}));return q((()=>{y(),p&&window.removeEventListener("popstate",p)})),e.$$set=e=>{"routes"in e&&n(3,r=e.routes),"prefix"in e&&n(4,i=e.prefix),"restoreScrollState"in e&&n(5,a=e.restoreScrollState)},e.$$.update=()=>{32&e.$$.dirty&&(history.scrollRestoration=a?"manual":"auto")},[l,c,u,r,i,a,function(t){X.call(this,e,t)},function(t){X.call(this,e,t)}]}class Ge extends De{constructor(e){super(),Ie(this,e,Ze,Fe,o,{routes:3,prefix:4,restoreScrollState:5})}}const qe=e=>"s:"+e;const Xe=(Ve={isLightTheme:(Ye=function(e){document.documentElement.setAttribute("data-theme",e?"light":"dark")},{get(e,t=!1){const n=localStorage.getItem(qe(e));return n?"true"===n:t},set(e,t){localStorage.setItem(qe(e),t?"true":"false"),Ye?.(t)}})},new Proxy(Ve,{get:(e,t)=>e[t].get(t),set:(e,t,n)=>(e[t].set(t,n),!0)}));var Ve,Ye;const Je=function(e){const t=Re(Xe[e]);return t.subscribe((t=>{Xe[e]=t})),t}("isLightTheme"),Qe=Re(0);function et(t){let n,r,i,a,s;return{c(){n=E("button"),r=E("img"),c(r.src,i=t[1])||z(r,"src",i),z(r,"alt",t[0]),z(r,"class","is-svg svelte-1yt6472"),z(r,"title","Toggle Theme"),z(n,"class","button-wrapper svelte-1yt6472")},m(e,i){C(e,n,i),k(n,r),a||(s=B(n,"click",t[2]),a=!0)},p(e,[t]){2&t&&!c(r.src,i=e[1])&&z(r,"src",i),1&t&&z(r,"alt",e[0])},i:e,o:e,d(e){e&&T(n),a=!1,s()}}}function tt(e,t,n){let r,i,a=Xe.isLightTheme;const s=Je.subscribe((e=>{n(3,a=e)}));return q((()=>{s()})),e.$$.update=()=>{8&e.$$.dirty&&n(1,r=`../assets/${a?"sunny":"moon"}-outline.svg`),8&e.$$.dirty&&n(0,i=(a?"Light":"Dark")+" Theme")},[i,r,function(){n(3,a=!a),document.documentElement.classList.add("theme-transition"),window.setTimeout((()=>{document.documentElement.classList.remove("theme-transition")}),500),Je.set(a)},a]}class nt extends De{constructor(e){super(),Ie(this,e,tt,et,o,{})}}function rt(e){let t,n,r,i,s,o,l,u,f,d,h,p,m,v,y,w,b;return v=new nt({}),{c(){t=E("nav"),n=E("div"),r=E("a"),r.innerHTML='S4TK \n

S4TK Packages

',i=I(),s=E("div"),o=E("a"),l=E("img"),f=I(),d=E("a"),h=E("img"),m=I(),Te(v.$$.fragment),z(r,"href","/"),z(r,"class","flex-center-v flex-space-between svelte-nghfuw"),z(n,"class","left flex-center-v flex-space-between svelte-nghfuw"),z(l,"class","is-svg smaller svelte-nghfuw"),c(l.src,u="./assets/"+e[2]+".svg")||z(l,"src",u),z(l,"alt","Home"),z(o,"href","/"),z(o,"title","Home"),z(o,"class","svelte-nghfuw"),L(o,"active","/"===e[0]),z(h,"class","is-svg svelte-nghfuw"),c(h.src,p="./assets/"+e[1]+".svg")||z(h,"src",p),z(h,"alt","Help"),z(d,"href","/help"),z(d,"title","Help"),z(d,"class","svelte-nghfuw"),L(d,"active","/help"===e[0]),z(s,"class","right flex-center-v flex-space-between"),z(t,"class","flex-center-v flex-space-between bottom-shadow svelte-nghfuw")},m(e,a){C(e,t,a),k(t,n),k(n,r),k(t,i),k(t,s),k(s,o),k(o,l),k(s,f),k(s,d),k(d,h),k(s,m),Ee(v,s,null),y=!0,w||(b=[g(We.call(null,r)),g(We.call(null,o)),g(We.call(null,d))],w=!0)},p(e,[t]){(!y||4&t&&!c(l.src,u="./assets/"+e[2]+".svg"))&&z(l,"src",u),1&t&&L(o,"active","/"===e[0]),(!y||2&t&&!c(h.src,p="./assets/"+e[1]+".svg"))&&z(h,"src",p),1&t&&L(d,"active","/help"===e[0])},i(e){y||(ve(v.$$.fragment,e),y=!0)},o(e){ye(v.$$.fragment,e),y=!1},d(e){e&&T(t),Ae(v),w=!1,a(b)}}}function it(e,t,n){let r,i,a;var s,o;return s=Ue,o=e=>n(0,a=e),e.$$.on_destroy.push(u(s,o)),e.$$.update=()=>{1&e.$$.dirty&&n(2,r="/"===a?"home":"home-outline"),1&e.$$.dirty&&n(1,i="/help"===a?"help-circle":"help-circle-outline")},[a,i,r]}class at extends De{constructor(e){super(),Ie(this,e,it,rt,o,{})}}function st(e){let t,n,r;const i=e[3].default,a=f(i,e,e[2],null);return{c(){t=E("div"),n=E("div"),a&&a.c(),z(n,"class","content-area svelte-pbl49w"),z(t,"class","content-area-wrapper flex-center svelte-pbl49w"),L(t,"banded",e[0]),L(t,"bottom-shadow",e[1])},m(e,i){C(e,t,i),k(t,n),a&&a.m(n,null),r=!0},p(e,[n]){a&&a.p&&(!r||4&n)&&p(a,i,e,e[2],r?h(i,e[2],n,null):m(e[2]),null),1&n&&L(t,"banded",e[0]),2&n&&L(t,"bottom-shadow",e[1])},i(e){r||(ve(a,e),r=!0)},o(e){ye(a,e),r=!1},d(e){e&&T(t),a&&a.d(e)}}}function ot(e,t,n){let{$$slots:r={},$$scope:i}=t,{banded:a=!1}=t,{bottomShadow:s=!1}=t;return e.$$set=e=>{"banded"in e&&n(0,a=e.banded),"bottomShadow"in e&&n(1,s=e.bottomShadow),"$$scope"in e&&n(2,i=e.$$scope)},[a,s,i,r]}class lt extends De{constructor(e){super(),Ie(this,e,ot,st,o,{banded:0,bottomShadow:1})}}function ct(t){let n,r,i,a,s,o,l;return{c(){n=E("div"),n.innerHTML='

Created with by Frankk using Sims 4 Toolkit

\n

Frankk's Mods\n |\n Sims 4 Toolkit\n |\n \n |\n Patreon\n |\n Ko-fi\n |\n Discord

',r=I(),i=E("p"),i.textContent="The Sims™ and its plumbob icon are registered trademarks of Electronic\n Arts, Inc. (EA). Sims 4 Toolkit is not affiliated with or endorsed by EA.",a=I(),s=E("p"),s.innerHTML='All icons on this website are supplied by\n Ionicons and\n GitHub Octicons.',o=I(),l=E("p"),l.textContent="2022 © Frank Kulak",z(n,"class","mb-3"),z(i,"class","disclaimer"),z(s,"class","disclaimer"),z(l,"class","disclaimer")},m(e,t){C(e,n,t),C(e,r,t),C(e,i,t),C(e,a,t),C(e,s,t),C(e,o,t),C(e,l,t)},p:e,d(e){e&&T(n),e&&T(r),e&&T(i),e&&T(a),e&&T(s),e&&T(o),e&&T(l)}}}function ut(e){let t,n,r;return n=new lt({props:{$$slots:{default:[ct]},$$scope:{ctx:e}}}),{c(){t=E("div"),Te(n.$$.fragment),z(t,"id","footer"),z(t,"class","flex-center text-center svelte-1qvog4t")},m(e,i){C(e,t,i),Ee(n,t,null),r=!0},p(e,[t]){const r={};1&t&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(ve(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&T(t),Ae(n)}}}class ft extends De{constructor(e){super(),Ie(this,e,null,ut,o,{})}}function dt(t){let n,r,i,a,s;return{c(){n=E("div"),r=E("h3"),i=A(t[0]),a=I(),s=E("hr"),z(r,"class","mt-0 mb-half nowrap"),z(s,"class","svelte-yl4kn8"),z(n,"class","section-header svelte-yl4kn8")},m(e,t){C(e,n,t),k(n,r),k(r,i),k(n,a),k(n,s)},p(e,[t]){1&t&&R(i,e[0])},i:e,o:e,d(e){e&&T(n)}}}function ht(e,t,n){let{title:r}=t;return e.$$set=e=>{"title"in e&&n(0,r=e.title)},[r]}class pt extends De{constructor(e){super(),Ie(this,e,ht,dt,o,{title:0})}}function mt(e){let t,n,r,i,a,s,o,l,c,u;return i=new pt({props:{title:e[0]}}),{c(){t=E("button"),n=E("div"),r=E("div"),Te(i.$$.fragment),a=I(),s=E("p"),o=A(e[1]),z(r,"class","mb-1"),z(s,"class","my-0"),z(n,"class","floating-card drop-shadow move-on-hover text-left h-100"),z(t,"class","button-wrapper")},m(f,d){C(f,t,d),k(t,n),k(n,r),Ee(i,r,null),k(n,a),k(n,s),k(s,o),l=!0,c||(u=B(t,"click",e[2]),c=!0)},p(e,[t]){const n={};1&t&&(n.title=e[0]),i.$set(n),(!l||2&t)&&R(o,e[1])},i(e){l||(ve(i.$$.fragment,e),l=!0)},o(e){ye(i.$$.fragment,e),l=!1},d(e){e&&T(t),Ae(i),c=!1,u()}}}function gt(e,t,n){let{name:r}=t,{description:i}=t,{link:a}=t;return e.$$set=e=>{"name"in e&&n(0,r=e.name),"description"in e&&n(1,i=e.description),"link"in e&&n(3,a=e.link)},[r,i,function(){!async function(e){if(!e||e.length<1||"/"!=e.charAt(0)&&0!==e.indexOf("#/"))throw Error("Invalid parameter location");await re();const t=("#"==e.charAt(0)?"":"#")+e;try{const e={...history.state};delete e.__svelte_spa_router_scrollX,delete e.__svelte_spa_router_scrollY,window.history.replaceState(e,void 0,t)}catch(e){console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}("/"+a)},a]}class vt extends De{constructor(e){super(),Ie(this,e,gt,mt,o,{name:0,description:1,link:3})}}function yt(t){let n,r,i,a,s;return r=new vt({props:{name:"Package Viewer",description:"View the contents of a package and scan it for potential issues.",link:"view"}}),a=new vt({props:{name:"Tuning Generator",description:"Mass generate tuning and SimData files with custom templates.",link:"generate"}}),{c(){n=E("div"),Te(r.$$.fragment),i=I(),Te(a.$$.fragment),z(n,"class","floating-card-group mt-2")},m(e,t){C(e,n,t),Ee(r,n,null),k(n,i),Ee(a,n,null),s=!0},p:e,i(e){s||(ve(r.$$.fragment,e),ve(a.$$.fragment,e),s=!0)},o(e){ye(r.$$.fragment,e),ye(a.$$.fragment,e),s=!1},d(e){e&&T(n),Ae(r),Ae(a)}}}function wt(e){let t,n,r,i,a,s;return r=new lt({props:{$$slots:{default:[yt]},$$scope:{ctx:e}}}),a=new ft({}),{c(){t=I(),n=E("section"),Te(r.$$.fragment),i=I(),Te(a.$$.fragment),document.title="Package Viewer",z(n,"id","home-section"),z(n,"class","flex-col flex-space-between svelte-17ltnax")},m(e,o){C(e,t,o),C(e,n,o),Ee(r,n,null),k(n,i),Ee(a,n,null),s=!0},p(e,[t]){const n={};1&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n)},i(e){s||(ve(r.$$.fragment,e),ve(a.$$.fragment,e),s=!0)},o(e){ye(r.$$.fragment,e),ye(a.$$.fragment,e),s=!1},d(e){e&&T(t),e&&T(n),Ae(r),Ae(a)}}}class bt extends De{constructor(e){super(),Ie(this,e,null,wt,o,{})}}function $t(t){let n,r,i;return{c(){n=E("h2"),r=E("span"),i=A(t[0]),z(r,"class","default-gradient-text text-shadow"),z(n,"class","my-0 nowrap-truncate")},m(e,t){C(e,n,t),k(n,r),k(r,i)},p(e,[t]){1&t&&R(i,e[0])},i:e,o:e,d(e){e&&T(n)}}}function _t(e,t,n){let{title:r}=t;return e.$$set=e=>{"title"in e&&n(0,r=e.title)},[r]}class kt extends De{constructor(e){super(),Ie(this,e,_t,$t,o,{title:0})}}function xt(t){let n,r,i,a,s,o;return n=new kt({props:{title:"Unlock this page for $4.04"}}),{c(){Te(n.$$.fragment),r=I(),i=E("p"),i.innerHTML='Just kidding. This page doesn't exist. Please go home.',a=I(),s=E("p"),s.textContent="Error 404",z(s,"class","disclaimer svelte-hx25dd")},m(e,t){Ee(n,e,t),C(e,r,t),C(e,i,t),C(e,a,t),C(e,s,t),o=!0},p:e,i(e){o||(ve(n.$$.fragment,e),o=!0)},o(e){ye(n.$$.fragment,e),o=!1},d(e){Ae(n,e),e&&T(r),e&&T(i),e&&T(a),e&&T(s)}}}function St(e){let t,n,r,i;return r=new lt({props:{$$slots:{default:[xt]},$$scope:{ctx:e}}}),{c(){t=I(),n=E("section"),Te(r.$$.fragment),document.title="Page Not Found",z(n,"id","page-not-found"),z(n,"class","svelte-hx25dd")},m(e,a){C(e,t,a),C(e,n,a),Ee(r,n,null),i=!0},p(e,[t]){const n={};2&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n)},i(e){i||(ve(r.$$.fragment,e),i=!0)},o(e){ye(r.$$.fragment,e),i=!1},d(e){e&&T(t),e&&T(n),Ae(r)}}}function Ct(e,t,n){let{params:r}=t;return e.$$set=e=>{"params"in e&&n(0,r=e.params)},[r]}class Tt extends De{constructor(e){super(),Ie(this,e,Ct,St,o,{params:0})}}function Et(t){let n,r,i,s,o,l,c,u,f,d,h;return n=new pt({props:{title:"What is this website for?"}}),{c(){Te(n.$$.fragment),r=I(),i=E("p"),s=A("This website renders Sims 4 package files and scans them for common\n issues. It is primarily intended for use with the S4TK Discord bot, but\n you can "),o=E("a"),o.textContent="manually upload files",l=A(" and\n "),c=E("a"),c.textContent="mass generate tuning",u=A(" as well."),z(o,"href","/view"),z(c,"href","/generate")},m(e,t){Ee(n,e,t),C(e,r,t),C(e,i,t),k(i,s),k(i,o),k(i,l),k(i,c),k(i,u),f=!0,d||(h=[g(We.call(null,o)),g(We.call(null,c))],d=!0)},p:e,i(e){f||(ve(n.$$.fragment,e),f=!0)},o(e){ye(n.$$.fragment,e),f=!1},d(e){Ae(n,e),e&&T(r),e&&T(i),d=!1,a(h)}}}function At(t){let n,r,i,a;return n=new pt({props:{title:"Experiencing issues?"}}),{c(){Te(n.$$.fragment),r=I(),i=E("p"),i.innerHTML='This website relies on an API that I host myself. If packages aren't\n loading, there is a chance that it is down. Please report this issue to\n me ASAP on Discord.'},m(e,t){Ee(n,e,t),C(e,r,t),C(e,i,t),a=!0},p:e,i(e){a||(ve(n.$$.fragment,e),a=!0)},o(e){ye(n.$$.fragment,e),a=!1},d(e){Ae(n,e),e&&T(r),e&&T(i)}}}function It(e){let t,n,r,i,a,s,o,l,c;return i=new lt({props:{banded:!0,$$slots:{default:[Et]},$$scope:{ctx:e}}}),s=new lt({props:{$$slots:{default:[At]},$$scope:{ctx:e}}}),l=new ft({}),{c(){t=I(),n=E("section"),r=E("div"),Te(i.$$.fragment),a=I(),Te(s.$$.fragment),o=I(),Te(l.$$.fragment),document.title="Package Viewer",z(n,"id","help-section"),z(n,"class","flex-col flex-space-between svelte-17enwed")},m(e,u){C(e,t,u),C(e,n,u),k(n,r),Ee(i,r,null),k(r,a),Ee(s,r,null),k(n,o),Ee(l,n,null),c=!0},p(e,[t]){const n={};1&t&&(n.$$scope={dirty:t,ctx:e}),i.$set(n);const r={};1&t&&(r.$$scope={dirty:t,ctx:e}),s.$set(r)},i(e){c||(ve(i.$$.fragment,e),ve(s.$$.fragment,e),ve(l.$$.fragment,e),c=!0)},o(e){ye(i.$$.fragment,e),ye(s.$$.fragment,e),ye(l.$$.fragment,e),c=!1},d(e){e&&T(t),e&&T(n),Ae(i),Ae(s),Ae(l)}}}class Dt extends De{constructor(e){super(),Ie(this,e,null,It,o,{})}}var Bt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function zt(e){var t={exports:{}};return e(t,t.exports),t.exports}function Rt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}var Ot=zt((function(e,t){function n(e){return o(e),s(e,8,!1)}function r(e){return o(e),s(e,8,!1)}function i(e){return function(e){if(e<0n||e>0xffffffffffffffffn)throw new Error(`Expected value to be a positive, 64-bit integer, but got ${e}.`)}(e),s(e,16,!1)}function a(e,t,a,s=":"){return`${n(e)}${s}${r(t)}${s}${i(a)}`}function s(e,t,n=!1){return`${n?"0x":""}${e.toString(16).padStart(t,"0").toUpperCase()}`}function o(e){if(Number.isNaN(e)||e<0||e>4294967295)throw new Error(`Expected value to be a positive, 32-bit integer, but got ${e}.`)}Object.defineProperty(t,"__esModule",{value:!0}),t.formatAsHexString=t.formatResourceKey=t.formatResourceTGI=t.formatResourceInstance=t.formatResourceGroup=t.formatResourceType=t.formatStringKey=void 0,t.formatStringKey=function(e){return o(e),s(e,8,!0)},t.formatResourceType=n,t.formatResourceGroup=r,t.formatResourceInstance=i,t.formatResourceTGI=a,t.formatResourceKey=function(e,t=":"){return a(e.type,e.group,e.instance,t)},t.formatAsHexString=s}));const{BinaryResourceType:Nt,TuningResourceType:Lt,SimDataGroup:Ft,StringTableLocale:Pt,EncodingType:Mt}=window.S4TK.enums,{formatAsHexString:Ut,formatResourceInstance:jt,formatStringKey:Wt,formatResourceKey:Ht}=window.S4TK.formatting,{fnv64:Kt}=window.S4TK.hashing,Zt=new Set(["Preference","Reward","HouseholdReward","SimReward","RelationshipBit","SocialContextBit","Aspiration","AspirationAssignment","AspirationBasic","AspirationCareer","AspirationGig","AspirationFamilialTrigger","AspirationNotification","AspirationOrganizationTask","AspirationSimInfoPanel","AspirationWhimSet","ObjectivelessWhimSet","TimedAspiration","ZoneDirectorEventListener"]),Gt=new Set(["DevelopmentalMilestone"]);function qt(e,t){try{return e===Nt.SimData?t in Ft?`${Jt(Ft[t])} SimData`:"SimData":e in Lt?e===Lt.Tuning?"Generic Tuning":Jt(Lt[e])+" Tuning":e in Nt?Jt(Nt[e]):"Type "+Ut(e,8,!1)}catch(e){return console.error(e),"Error"}}function Xt(e){try{switch(e.value.encodingType){case Mt.XML:return e.value.root.name;case Mt.DATA:return e.value.instance.name;case Mt.STBL:return Pt[Pt.getLocale(e.key.instance)]+" String Table";case Mt.DDS:return(e.key.type===Nt.DdsImage?"DDS":"DST")+" Image";case Mt.Unknown:return e.value.isXml()?"Unnamed XML":"Unnamed";default:return"Unnamed"}}catch(e){return console.error(e),"Error"}}const Vt=new Set([Mt.XML,Mt.STBL,Mt.DATA,Mt.DDS]);function Yt(e){const t=new Map,n=new Set,r=new Map,i=new Map;return e.entries.forEach((e=>{try{const a=e.key.type in Lt,s=e.key.type===Nt.SimData;if(a&&r.set(e.key.instance,e.key.type),i.has(e.key.instance)){if(a){const t=i.get(e.key.instance);t.tuning?t.otherTuning=!0:t.tuning=!0}else if(s){const t=i.get(e.key.instance);t.simdata?t.otherSimData=!0:t.simdata=!0}}else i.set(e.key.instance,{simdata:s,tuning:a,otherTuning:!1,otherSimData:!1});const o=function(e,t){const n=[],r=Ht(e.key,"-");t.has(r)?n.push(`The key ${r} is already in use by another resource.`):t.add(r);e.key.instance||n.push("Instance ID should never be 0.");if(e.key.type===Nt.SimData)0===e.key.group&&n.push('SimData group should never be 0. Check the SimDataGroup docs for a list of expected groups.');else if(e.key.type===Nt.StringTable){const t=e.value,r=t.findRepeatedKeys();r.length&&n.push(`Found repeated keys: [${r.map(Wt).join(", ")}]`),t.hasKey(2166136261)&&n.push("At least one entry is using the key 0x811C9DC5, which is the FNV-32 hash of an empty string. You should change it."),t.hasValue("")&&n.push("At least one string is empty.")}else if(e.value.isXml()){const t=e.value;try{t.root}catch(e){return console.error(e),void n.push(`XML could not be parsed. ${e}`)}const r=BigInt(t.root.id);if("I"===t.root.tag){if(e.key.instance>0xffffffffn&&(Zt.has(t.root.attributes.c)&&n.push(`The class "${t.root.attributes.c}" is known to require a 32-bit instance, but this resource has a 64-bit instance. You might want to replace ${Ut(e.key.instance,16)} with ${Ut(0xffffffffn&e.key.instance,8)}.`),e.key.type===Lt.Trait&&"PERSONALITY"===t.root.findChild("trait_type").innerValue.trim()&&n.push(`Personality traits are known to require a 32-bit instance, but this one has a 64-bit instance. You might want to replace ${Ut(e.key.instance,16)} with ${Ut(0xffffffffn&e.key.instance,8)}.`)),e.key.instance>2147483647n&&Gt.has(t.root.attributes.c)){const r=2147483647n&e.key.instance;n.push(`The class "${t.root.attributes.c}" is a special case, and its instance must be 31 bits or lower (max value = 2,147,483,647). You may want to use ${Ut(r,8)} instead.`)}if(Lt.parseAttr(t.root.attributes.i)!==e.key.type){const r=Lt.parseAttr(t.root.attributes.i);n.push(`Type of ${Lt[e.key.type]} (${Ut(e.key.type,8)}) is incompatible with i="${t.root.attributes.i}". Either the type should be ${Lt[r]} (${Ut(r,8)}), or the i attribute should be "${Lt.getAttr(e.key.type)}".`)}}else if("M"===t.root.tag){const e=Kt(t.root.name.replace(/\./g,"-"));r!==e&&n.push(`Module instance does not match its name. It must be the FNV-64 hash of the filename with all '.' characters are replaced with '-', which is ${e}.`)}0xcbf29ce484222325n===r?n.push("0xCBF29CE484222325 is the FNV-64 hash of an empty string, and using it as the instance of your tuning is not a good idea. You should change it."):0x811c9dc5n===r&&n.push("0x811C9DC5 is the FNV-32 hash of an empty string, and using it as the instance of your tuning is not a good idea. You should change it."),r!==e.key.instance&&n.push(`Instance of ${jt(e.key.instance)} does not match s="${t.root.id}".`)}return n}(e,n);o.length&&t.set(e.id,o)}catch(n){t.set(e.id,["Exception was thrown while parsing this file. This does not necessarily mean that there is something wrong with it."])}})),e.entries.forEach((e=>{try{const n=()=>(t.has(e.id)||t.set(e.id,[]),t.get(e.id));if(e.key.type===Nt.SimData){if(r.has(e.key.instance)){const t=Ft.getForTuning(r.get(e.key.instance));t!==e.key.group&&n().push(`Expected ${Lt[r.get(e.key.instance)]} SimData to have a group of ${Ut(t,8)}, but got ${Ut(e.key.group,8)} instead.`)}i.get(e.key.instance).otherSimData&&n().push("At least one other SimData resource has the same instance as this one. The only resources that should have the same instance are tuning/SimData pairs.")}else if(e.key.type in Lt){const t=i.get(e.key.instance);t.otherTuning&&n().push("At least one other tuning resource has the same instance as this one. The only resources that should have the same instance are tuning/SimData pairs."),e.key.type!==Lt.Snippet&&Ft.getForTuning(e.key.type)&&!t.simdata&&n().push(`Type of ${Lt[e.key.type]} (${Ut(e.key.type,8)}) is known to require SimData, but no matching SimData was found in this package.`)}}catch(e){}})),t}function Jt(e){return e.replace(/([A-Z])/g," $1")}function Qt(e){let t,n,r,i,a,o,l,u,f=e[4].length+"";return{c(){t=E("button"),n=E("img"),i=I(),a=E("p"),o=A(f),c(n.src,r="./assets/warning-outline.svg")||z(n,"src","./assets/warning-outline.svg"),z(n,"class","is-svg dark-svg svelte-1g3dsgo"),z(n,"alt","Warning"),z(n,"title","This entry has warnings!"),z(a,"class","my-0 monospace svelte-1g3dsgo"),z(t,"class","button-wrapper warning-img-wrapper flex-center drop-shadow svelte-1g3dsgo")},m(r,c){C(r,t,c),k(t,n),k(t,i),k(t,a),k(a,o),l||(u=B(t,"click",(function(){s(e[1])&&e[1].apply(this,arguments)})),l=!0)},p(t,n){e=t,16&n&&f!==(f=e[4].length+"")&&R(o,f)},d(e){e&&T(t),l=!1,u()}}}function en(t){let n,r,i,a,o,l,c,u,f,d,h,p,m,g=Xt(t[2])+"",v=qt(t[2].key.type,t[2].key.group)+"",y=t[4]&&Qt(t);return{c(){n=E("button"),r=E("div"),i=E("p"),a=A(g),o=I(),l=E("p"),c=A(v),u=I(),f=E("p"),d=A(t[6]),h=I(),y&&y.c(),z(i,"class","mt-0 mb-half nowrap svelte-1g3dsgo"),z(l,"class","small-title my-0 nowrap svelte-1g3dsgo"),z(f,"class","small-title monospace my-0 nowrap svelte-1g3dsgo"),z(r,"class","entry-row p-half mb-half mr-half svelte-1g3dsgo"),L(r,"active",t[3]),z(n,"class","button-wrapper w-100 text-left")},m(e,g){C(e,n,g),k(n,r),k(r,i),k(i,a),k(r,o),k(r,l),k(l,c),k(r,u),k(r,f),k(f,d),k(r,h),y&&y.m(r,null),t[9](n),p||(m=B(n,"click",(function(){s(t[0])&&t[0].apply(this,arguments)})),p=!0)},p(e,[n]){t=e,4&n&&g!==(g=Xt(t[2])+"")&&R(a,g),4&n&&v!==(v=qt(t[2].key.type,t[2].key.group)+"")&&R(c,v),64&n&&R(d,t[6]),t[4]?y?y.p(t,n):(y=Qt(t),y.c(),y.m(r,null)):y&&(y.d(1),y=null),8&n&&L(r,"active",t[3])},i:e,o:e,d(e){e&&T(n),y&&y.d(),t[9](null),p=!1,m()}}}function tn(e,t,n){let r,i,{onClick:a}=t,{onWarningClick:s}=t,{entry:o}=t,{active:l}=t,{warnings:c}=t,{viewSettings:u}=t,{entriesMenuElement:f}=t;return e.$$set=e=>{"onClick"in e&&n(0,a=e.onClick),"onWarningClick"in e&&n(1,s=e.onWarningClick),"entry"in e&&n(2,o=e.entry),"active"in e&&n(3,l=e.active),"warnings"in e&&n(4,c=e.warnings),"viewSettings"in e&&n(7,u=e.viewSettings),"entriesMenuElement"in e&&n(8,f=e.entriesMenuElement)},e.$$.update=()=>{132&e.$$.dirty&&n(6,r=0===u.resourceKeyFormat?Ot.formatResourceKey(o.key):o.key.instance),296&e.$$.dirty&&l&&i&&f&&async function(){const e=f.getBoundingClientRect(),t=i.getBoundingClientRect(),n=e.y,r=e.y+e.height,a=t.y,s=t.y+t.height;(ar)&&i.scrollIntoView()}()},[a,s,o,l,c,i,r,u,f,function(e){Y[e?"unshift":"push"]((()=>{i=e,n(5,i)}))}]}class nn extends De{constructor(e){super(),Ie(this,e,tn,en,o,{onClick:0,onWarningClick:1,entry:2,active:3,warnings:4,viewSettings:7,entriesMenuElement:8})}}var rn,an=zt((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.camelToPascal=t.pascalToCamel=t.pascalToSnake=t.snakeToPascal=t.getAllEnumValues=t.readUntilFalsey=t.promisify=t.bufferContainsDATA=t.bufferContainsXml=t.arraysAreEqual=t.removeFromArray=t.makeList=void 0,t.makeList=function(e,t,n=!1,r){const i=[];for(let a=0;a=r)break}return i},t.removeFromArray=function(e,t){let n=!1;return e.forEach((e=>{const r=t.findIndex((t=>t===e));r<0||(t.splice(r,1),n=!0)})),n},t.arraysAreEqual=function(e,t){return e.length===t?.length&&e.every((e=>t.some((t=>e.equals(t)))))},t.bufferContainsXml=function(e){return e.length>=5&&"=4&&"DATA"===e.toString("utf-8",0,4)},t.promisify=function(e){return new Promise(((t,n)=>{try{t(e())}catch(e){n(e)}}))},t.readUntilFalsey=function(e,t=0,n=(e=>Boolean(e))){let r;for(r=t;r"number"==typeof e))},t.snakeToPascal=function(e){return e?.split("_").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join("")},t.pascalToSnake=function(e){return e?.split(/(?=[A-Z])/).join("_").toLowerCase()},t.pascalToCamel=function(e){return e?e.charAt(0).toLowerCase()+e.slice(1):""},t.camelToPascal=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}}));!function(e){e[e.CombinedTuning=1659456824]="CombinedTuning",e[e.DdsImage=3066607264]="DdsImage",e[e.DstImage=11720834]="DstImage",e[e.ObjectDefinition=3235601127]="ObjectDefinition",e[e.SimData=1415235194]="SimData",e[e.StringTable=570775514]="StringTable"}(rn||(rn={})),function(e){e.all=function(){return(0,an.getAllEnumValues)(e)}}(rn||(rn={}));var sn,on=rn,ln=Object.defineProperty({default:on},"__esModule",{value:!0});!function(e){e[e.Boolean=0]="Boolean",e[e.Character=1]="Character",e[e.Int8=2]="Int8",e[e.UInt8=3]="UInt8",e[e.Int16=4]="Int16",e[e.UInt16=5]="UInt16",e[e.Int32=6]="Int32",e[e.UInt32=7]="UInt32",e[e.Int64=8]="Int64",e[e.UInt64=9]="UInt64",e[e.Float=10]="Float",e[e.String=11]="String",e[e.HashedString=12]="HashedString",e[e.Object=13]="Object",e[e.Vector=14]="Vector",e[e.Float2=15]="Float2",e[e.Float3=16]="Float3",e[e.Float4=17]="Float4",e[e.TableSetReference=18]="TableSetReference",e[e.ResourceKey=19]="ResourceKey",e[e.LocalizationKey=20]="LocalizationKey",e[e.Variant=21]="Variant",e[e.Undefined=22]="Undefined"}(sn||(sn={})),function(e){e.getAlignment=function(t){switch(t){case e.Boolean:case e.Character:case e.Int8:case e.UInt8:return 1;case e.Int16:case e.UInt16:return 2;case e.Int32:case e.UInt32:case e.Float:case e.String:case e.HashedString:case e.Object:case e.Vector:case e.Float2:case e.Float3:case e.Float4:case e.LocalizationKey:case e.Variant:return 4;case e.Int64:case e.UInt64:case e.TableSetReference:case e.ResourceKey:return 8;default:return 1}},e.getBytes=function(t){switch(t){case e.Character:case e.Int8:case e.UInt8:return 1;case e.Int16:case e.UInt16:return 2;case e.Boolean:case e.Int32:case e.UInt32:case e.Float:case e.String:case e.Object:case e.LocalizationKey:return 4;case e.Int64:case e.UInt64:case e.HashedString:case e.Vector:case e.Float2:case e.TableSetReference:case e.Variant:return 8;case e.Float3:return 12;case e.Float4:case e.ResourceKey:return 16;default:throw new Error(`DataType ${t} not recognized.`)}},e.getSims4StudioName=function(t){switch(t){case e.Character:throw new Error("Character values cannot be represented in S4S XML. If you are reading this error, please let me know about it ASAP (https://github.com/sims4toolkit/models/issues).");case e.Float:return"Single";default:return e[t]}},e.parseSims4StudioName=function(t){return"Single"===t?e.Float:e[t]},e.isNumberInRange=function(t,n){if(null==t||Number.isNaN(t))return!1;switch(n){case e.Int8:return t>=-128&&t<=127;case e.UInt8:return t>=0&&t<=255;case e.Int16:return t>=-524288&&t<=32767;case e.UInt16:return t>=0&&t<=65535;case e.Int32:return t>=-34359738368&&t<=2147483647;case e.LocalizationKey:case e.UInt32:return t>=0&&t<=4294967295;case e.Float:return!0;default:throw new Error(`Type ${n} is not a SimDataNumber.`)}},e.isBigIntInRange=function(t,n){if(null==t)return!1;switch(n){case e.Int64:return t>=-0x8000000000000000n&&t<=0x7fffffffffffffffn;case e.TableSetReference:case e.UInt64:return t>=0n&&t<=0xffffffffffffffffn;default:throw new Error(`Type ${n} is not a SimDataBigInt.`)}},e.parseNumber=function(t,n){return"number"==typeof(t=t??0)?t:"string"==typeof t?n===e.Float?parseFloat(t):parseInt(t):NaN}}(sn||(sn={}));var cn,un=sn,fn=Object.defineProperty({default:un},"__esModule",{value:!0});!function(e){e.Unknown="Unknown",e.Null="Null",e.DATA="DATA",e.DDS="DDS",e.OBJDEF="OBJDEF",e.STBL="STBL",e.XML="XML"}(cn||(cn={}));var dn,hn=cn,pn=Object.defineProperty({default:hn},"__esModule",{value:!0});!function(e){e[e.Achievement=2018877086]="Achievement",e[e.AchievementCategory=609337601]="AchievementCategory",e[e.AchievementCollection=80917605]="AchievementCollection",e[e.Action=209137191]="Action",e[e.Animation=3994535597]="Animation",e[e.AspirationCategory=3813727192]="AspirationCategory",e[e.AspirationTrack=3223387309]="AspirationTrack",e[e.Aspiration=683034229]="Aspiration",e[e.AwayAction=2947394632]="AwayAction",e[e.Balloon=3966406598]="Balloon",e[e.Breed=874331941]="Breed",e[e.Broadcaster=3736796019]="Broadcaster",e[e.BucksPerk=3963461902]="BucksPerk",e[e.Buff=1612179606]="Buff",e[e.Business=1977092083]="Business",e[e.CasMenuItem=213537012]="CasMenuItem",e[e.CasMenu=2472182722]="CasMenu",e[e.CasPreferenceCategory=3456433227]="CasPreferenceCategory",e[e.CasPreferenceItem=3966303522]="CasPreferenceItem",e[e.CasStoriesAnswer=2163289367]="CasStoriesAnswer",e[e.CasStoriesQuestion=52718493]="CasStoriesQuestion",e[e.CasStoriesTraitChooser=2376930633]="CasStoriesTraitChooser",e[e.CallToAction=4114068192]="CallToAction",e[e.CareerEvent=2487354146]="CareerEvent",e[e.CareerGig=3436908253]="CareerGig",e[e.CareerLevel=745582072]="CareerLevel",e[e.CareerTrack=1221024995]="CareerTrack",e[e.Career=1939434475]="Career",e[e.Clan=3737052837]="Clan",e[e.ClanValue=2576273579]="ClanValue",e[e.ClubInteractionGroup=4195351092]="ClubInteractionGroup",e[e.ClubSeed=794407991]="ClubSeed",e[e.ConditionalLayer=2441338001]="ConditionalLayer",e[e.DetectiveClue=1400130038]="DetectiveClue",e[e.DevelopmentalMilestone=3307360148]="DevelopmentalMilestone",e[e.DramaNode=626258997]="DramaNode",e[e.Ensemble=3112702240]="Ensemble",e[e.GameRuleset=3779558936]="GameRuleset",e[e.Headline=4093714525]="Headline",e[e.HolidayDefinition=238120813]="HolidayDefinition",e[e.HolidayTradition=1070408838]="HolidayTradition",e[e.HouseholdMilestone=963831539]="HouseholdMilestone",e[e.Interaction=3900887599]="Interaction",e[e.LotDecorationPreset=3726571771]="LotDecorationPreset",e[e.LotDecoration=4264407467]="LotDecoration",e[e.LotTuning=3632270694]="LotTuning",e[e.Mood=3128647864]="Mood",e[e.Narrative=1047870521]="Narrative",e[e.NotebookEntry=2567109238]="NotebookEntry",e[e.ObjectPart=1900520272]="ObjectPart",e[e.ObjectState=1526890910]="ObjectState",e[e.Object=3055412916]="Object",e[e.Objective=6899006]="Objective",e[e.OpenStreetDirector=1265622724]="OpenStreetDirector",e[e.PieMenuCategory=65657188]="PieMenuCategory",e[e.Posture=2909789983]="Posture",e[e.RabbitHole=2976568058]="RabbitHole",e[e.Recipe=3952605219]="Recipe",e[e.Region=1374134669]="Region",e[e.RelationshipBit=151314192]="RelationshipBit",e[e.RelationshipLock=2922702451]="RelationshipLock",e[e.Reward=1873057832]="Reward",e[e.RoleState=239932923]="RoleState",e[e.Royalty=938421991]="Royalty",e[e.Season=3381515358]="Season",e[e.ServiceNpc=2629964386]="ServiceNpc",e[e.Sickness=3288062174]="Sickness",e[e.SimFilter=1846401695]="SimFilter",e[e.SimInfoFixup=3797424274]="SimInfoFixup",e[e.SimTemplate=212125579]="SimTemplate",e[e.SituationGoalSet=2649944562]="SituationGoalSet",e[e.SituationGoal=1502554343]="SituationGoal",e[e.SituationJob=2617738591]="SituationJob",e[e.Situation=4223905515]="Situation",e[e.SlotTypeSet=1058419973]="SlotTypeSet",e[e.SlotType=1772477092]="SlotType",e[e.Snippet=2113017500]="Snippet",e[e.SocialGroup=776446212]="SocialGroup",e[e.Spell=523506649]="Spell",e[e.Scommodity=1359443523]="Scommodity",e[e.Statistic=865846717]="Statistic",e[e.Strategy=1646578134]="Strategy",e[e.Street=4142189312]="Street",e[e.Subroot=3086978965]="Subroot",e[e.TagSet=1228493570]="TagSet",e[e.TemplateChooser=1220728301]="TemplateChooser",e[e.TestBasedScore=1332976878]="TestBasedScore",e[e.Topic=1938713686]="Topic",e[e.Trait=3412057543]="Trait",e[e.Tuning=62078431]="Tuning",e[e.TutorialTip=2410930353]="TutorialTip",e[e.Tutorial=3762955427]="Tutorial",e[e.UniversityCourseData=689745854]="UniversityCourseData",e[e.UniversityMajor=660124491]="UniversityMajor",e[e.University=3646477745]="University",e[e.UserInterfaceInfo=3099531875]="UserInterfaceInfo",e[e.Venue=3871070174]="Venue",e[e.WalkBy=1070998590]="WalkBy",e[e.WeatherEvent=1476851130]="WeatherEvent",e[e.WeatherForecast=1233072753]="WeatherForecast",e[e.Whim=1956251190]="Whim",e[e.ZoneDirector=4183335058]="ZoneDirector",e[e.ZoneModifier=1008568217]="ZoneModifier"}(dn||(dn={})),function(e){e.all=function(){return(0,an.getAllEnumValues)(e)},e.parseAttr=function(t){if("relbit"===t)return e.RelationshipBit;{const n=(0,an.snakeToPascal)(t);return e[n]??e.Tuning}},e.getAttr=function(t){switch(t){case e.Tuning:return null;case e.RelationshipBit:return"relbit";default:return t in e?(0,an.pascalToSnake)(e[t]):null}}}(dn||(dn={}));var mn=dn,gn=Object.defineProperty({default:mn},"__esModule",{value:!0});const vn=(Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(gn);var yn;!function(e){e[e.Achievement=5611238]="Achievement",e[e.AchievementCategory=5357861]="AchievementCategory",e[e.AchievementCollection=13808737]="AchievementCollection",e[e.Aspiration=11945565]="Aspiration",e[e.AspirationCategory=5299003]="AspirationCategory",e[e.AspirationTrack=2161773]="AspirationTrack",e[e.Automation=13722210]="Automation",e[e.Breed=1916689]="Breed",e[e.Buff=1566966]="Buff",e[e.BuildBuy=246679]="BuildBuy",e[e.Business=14157702]="Business",e[e.Career=10054552]="Career",e[e.CareerGig=14355985]="CareerGig",e[e.CareerLevel=7384532]="CareerLevel",e[e.CareerTrack=13065387]="CareerTrack",e[e.CasMenu=5931857]="CasMenu",e[e.CasMenuItem=12210424]="CasMenuItem",e[e.CasOccultSkintone=12807221]="CasOccultSkintone",e[e.CasPreferenceCategory=326789]="CasPreferenceCategory",e[e.CasPreferenceItem=6880718]="CasPreferenceItem",e[e.CasStoriesAnswer=15805847]="CasStoriesAnswer",e[e.CasStoriesQuestion=2386846]="CasStoriesQuestion",e[e.CasStoriesTraitChooser=11343300]="CasStoriesTraitChooser",e[e.Clan=12510843]="Clan",e[e.ClanValue=9359410]="ClanValue",e[e.ClientCasCameraTuning=5955271]="ClientCasCameraTuning",e[e.ClientCasLighting=669200]="ClientCasLighting",e[e.ClientCasModifierTuning=11272143]="ClientCasModifierTuning",e[e.ClientCasOccultTuning=9923016]="ClientCasOccultTuning",e[e.ClientCasThumbnailCamera=4810306]="ClientCasThumbnailCamera",e[e.ClientCasThumbnailPartTuning=13750274]="ClientCasThumbnailPartTuning",e[e.ClientCasTuning=4936293]="ClientCasTuning",e[e.ClientRegionSortTuning=5753018]="ClientRegionSortTuning",e[e.ClientTagCategoriesMetadata=1233988]="ClientTagCategoriesMetadata",e[e.ClientTags=12159328]="ClientTags",e[e.ClientTagsMapping=359697]="ClientTagsMapping",e[e.ClientTagsTraitGroupMetadata=4080149]="ClientTagsTraitGroupMetadata",e[e.ClientThumbnailPoses=12745782]="ClientThumbnailPoses",e[e.ClientTutorial=7538507]="ClientTutorial",e[e.ClubInteractionGroup=1047246]="ClubInteractionGroup",e[e.ClubSeed=5878808]="ClubSeed",e[e.DevelopmentalMilestone=2248529]="DevelopmentalMilestone",e[e.DramaNode=5501968]="DramaNode",e[e.Headline=73897]="Headline",e[e.HolidayTradition=13444281]="HolidayTradition",e[e.HouseholdMilestone=7530186]="HouseholdMilestone",e[e.LotDecorationPreset=2029605]="LotDecorationPreset",e[e.Module=7119620]="Module",e[e.Mood=8085506]="Mood",e[e.NativeBuildBuy=9759150]="NativeBuildBuy",e[e.NativeSeasonsWeather=3824229]="NativeSeasonsWeather",e[e.Objective=6899006]="Objective",e[e.PieMenuCategory=15325543]="PieMenuCategory",e[e.Recipe=9959624]="Recipe",e[e.Region=15180252]="Region",e[e.RelationshipBit=5110660]="RelationshipBit",e[e.RendererCas=2709620]="RendererCas",e[e.RendererHsvTweakerSettings=16552157]="RendererHsvTweakerSettings",e[e.RendererMinspec=2069982]="RendererMinspec",e[e.Reward=10786887]="Reward",e[e.Season=9294999]="Season",e[e.SituationJob=492995]="SituationJob",e[e.SlotTypeSet=1455418]="SlotTypeSet",e[e.Snippet=15865569]="Snippet",e[e.Spell=3412934]="Spell",e[e.Statistic=10208654]="Statistic",e[e.Street=14994422]="Street",e[e.Subroot=16748322]="Subroot",e[e.Trait=6282508]="Trait",e[e.Tutorial=4858947]="Tutorial",e[e.TutorialTip=11788350]="TutorialTip",e[e.University=5821800]="University",e[e.UniversityCourseData=1879959]="UniversityCourseData",e[e.UniversityMajor=5813100]="UniversityMajor",e[e.UserInterfaceInfo=12524251]="UserInterfaceInfo",e[e.Venue=12310328]="Venue",e[e.VideoPlaylist=12535179]="VideoPlaylist",e[e.WeatherForecast=8335928]="WeatherForecast",e[e.ZoneModifier=1935269]="ZoneModifier"}(yn||(yn={})),function(e){e.all=function(){return(0,an.getAllEnumValues)(e)},e.getForTuning=function(t){return e[vn.default[t]]}}(yn||(yn={}));var wn,bn=yn,$n=Object.defineProperty({default:bn},"__esModule",{value:!0});!function(e){e[e.English=0]="English",e[e.ChineseSimplified=1]="ChineseSimplified",e[e.ChineseTraditional=2]="ChineseTraditional",e[e.Czech=3]="Czech",e[e.Danish=4]="Danish",e[e.Dutch=5]="Dutch",e[e.Finnish=6]="Finnish",e[e.French=7]="French",e[e.German=8]="German",e[e.Italian=11]="Italian",e[e.Japanese=12]="Japanese",e[e.Korean=13]="Korean",e[e.Norwegian=14]="Norwegian",e[e.Polish=15]="Polish",e[e.Portuguese=17]="Portuguese",e[e.Russian=18]="Russian",e[e.Spanish=19]="Spanish",e[e.Swedish=21]="Swedish"}(wn||(wn={})),function(e){e.all=function(){return(0,an.getAllEnumValues)(e)},e.setHighByte=function(t,n){return e.getInstanceBase(n)|BigInt(t)<<56n},e.getLocale=function(e){return Number(e>>56n)},e.getInstanceBase=function(e){return 0xffffffffffffffn&e},e.getLocaleCode=function(t){switch(t){case e.English:return"ENG_US";case e.ChineseSimplified:return"CHS_CN";case e.ChineseTraditional:return"CHT_CN";case e.Czech:return"CZE_CZ";case e.Danish:return"DAN_DK";case e.Dutch:return"DUT_NL";case e.Finnish:return"FIN_FI";case e.French:return"FRE_FR";case e.German:return"GER_DE";case e.Italian:return"ITA_IT";case e.Japanese:return"JPN_JP";case e.Korean:return"KOR_KR";case e.Norwegian:return"NOR_NO";case e.Polish:return"POL_PL";case e.Portuguese:return"POR_BR";case e.Russian:return"RUS_RU";case e.Spanish:return"SPA_EA";case e.Swedish:return"SWE_SE";default:return}}}(wn||(wn={}));var _n=wn,kn=Object.defineProperty({default:_n},"__esModule",{value:!0}),xn=zt((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectDefinitionType=void 0,(n=t.ObjectDefinitionType||(t.ObjectDefinitionType={}))[n.Components=3873710587]="Components",n[n.EnvironmentScoreEmotionTags=561163966]="EnvironmentScoreEmotionTags",n[n.EnvironmentScoreEmotionTags_32=558077772]="EnvironmentScoreEmotionTags_32",n[n.EnvironmentScores=3704652692]="EnvironmentScores",n[n.Footprints=1819507416]="Footprints",n[n.Icons=3403602056]="Icons",n[n.IsBaby=2934340124]="IsBaby",n[n.MaterialVariant=3973425503]="MaterialVariant",n[n.Models=2367728838]="Models",n[n.Name=3891296134]="Name",n[n.NegativeEnvironmentScore=1157395730]="NegativeEnvironmentScore",n[n.PositiveEnvironmentScore=1916190442]="PositiveEnvironmentScore",n[n.Rigs=3792088655]="Rigs",n[n.SimoleonPrice=3841260196]="SimoleonPrice",n[n.Slots=2324017139]="Slots",n[n.ThumbnailGeometryState=1110702240]="ThumbnailGeometryState",n[n.Tuning=2031068348]="Tuning",n[n.TuningId=3113485211]="TuningId",n[n.Unknown1=2894994368]="Unknown1",n[n.Unknown2=3963032294]="Unknown2",n[n.Unknown3=1391981756]="Unknown3",n[n.Unknown4=4086524560]="Unknown4"})),Sn=zt((function(e,t){var n=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectDefinitionType=t.TuningResourceType=t.StringTableLocale=t.SimDataGroup=t.EncodingType=t.DataType=t.BinaryResourceType=void 0;const r=n(ln);t.BinaryResourceType=r.default;const i=n(fn);t.DataType=i.default;const a=n(pn);t.EncodingType=a.default;const s=n($n);t.SimDataGroup=s.default;const o=n(kn);t.StringTableLocale=o.default;const l=n(gn);t.TuningResourceType=l.default,Object.defineProperty(t,"ObjectDefinitionType",{enumerable:!0,get:function(){return xn.ObjectDefinitionType}})}));function Cn(e){let t,n,r,i,a,o,l,c,u,d,g,v,y,w;const b=e[5].default,$=f(b,e,e[4],null);return{c(){t=E("div"),n=E("div"),r=E("div"),i=E("p"),a=A(e[0]),o=I(),l=E("p"),l.textContent="(Draggable)",c=I(),u=E("button"),u.innerHTML='Close',d=I(),g=E("div"),$&&$.c(),z(i,"class","my-0 small-title unselectable-text"),z(l,"class","my-0 subtle-text"),z(r,"class","flex-center-v flex-gap-small"),z(u,"class","button-wrapper"),z(n,"class","movable-window-header flex-space-between flex-center-v p-half grabbable svelte-hqowq0"),z(g,"class","p-half window-content svelte-hqowq0"),z(t,"class","movable-window drop-shadow svelte-hqowq0")},m(f,h){C(f,t,h),k(t,n),k(n,r),k(r,i),k(i,a),k(r,o),k(r,l),k(n,c),k(n,u),e[6](n),k(t,d),k(t,g),$&&$.m(g,null),e[7](t),v=!0,y||(w=B(u,"click",(function(){s(e[1])&&e[1].apply(this,arguments)})),y=!0)},p(t,[n]){e=t,(!v||1&n)&&R(a,e[0]),$&&$.p&&(!v||16&n)&&p($,b,e,e[4],v?h(b,e[4],n,null):m(e[4]),null)},i(e){v||(ve($,e),v=!0)},o(e){ye($,e),v=!1},d(n){n&&T(t),e[6](null),$&&$.d(n),e[7](null),y=!1,w()}}}function Tn(e,t,n){let r,i,{$$slots:a={},$$scope:s}=t,{title:o}=t,{onClose:l}=t,c=0;const u=Qe.subscribe((e=>{c=e}));return G((()=>{if(function(){let e=0,t=0,a=0,s=0;function o(i){(i=i||window.event).preventDefault(),e=a-i.clientX,t=s-i.clientY,a=i.clientX,s=i.clientY,n(2,r.style.top=r.offsetTop-t+"px",r),n(2,r.style.left=r.offsetLeft-e+"px",r)}function l(){document.onmouseup=null,document.onmousemove=null,r.offsetTop<0?n(2,r.style.top="10px",r):r.offsetTop>window.innerHeight-r.offsetHeight-10&&n(2,r.style.top=window.innerHeight-r.offsetHeight-10+"px",r),r.offsetLeft<0?n(2,r.style.left="10px",r):r.offsetLeft>window.innerWidth-r.offsetWidth-10&&n(2,r.style.left=window.innerWidth-r.offsetWidth-10+"px",r)}n(3,i.onmousedown=function(e){(e=e||window.event).preventDefault(),a=e.clientX,s=e.clientY,document.onmouseup=l,document.onmousemove=o},i)}(),c>0){let e=40+r.offsetWidth;e*=c,window.innerWidth>=e+40+r.offsetWidth&&n(2,r.style.right=e+"px",r),n(2,r.style.zIndex=(1024+c).toString(),r)}Qe.set(c+1)})),q((()=>{u(),Qe.set(c-1)})),e.$$set=e=>{"title"in e&&n(0,o=e.title),"onClose"in e&&n(1,l=e.onClose),"$$scope"in e&&n(4,s=e.$$scope)},[o,l,r,i,s,a,function(e){Y[e?"unshift":"push"]((()=>{i=e,n(3,i)}))},function(e){Y[e?"unshift":"push"]((()=>{r=e,n(2,r)}))}]}class En extends De{constructor(e){super(),Ie(this,e,Tn,Cn,o,{title:0,onClose:1})}}function An(e){let t,n,r;return{c(){t=E("div"),n=E("label"),r=A(e[1]),z(n,"class","small-title mb-half svelte-8ce34a"),z(n,"for",e[2]),z(t,"class","flex-center-v")},m(e,i){C(e,t,i),k(t,n),k(n,r)},p(e,t){2&t&&R(r,e[1]),4&t&&z(n,"for",e[2])},d(e){e&&T(t)}}}function In(t){let n,r,i,a,s,o=Boolean(t[1]),l=o&&An(t);return{c(){n=E("div"),l&&l.c(),r=I(),i=E("input"),z(i,"id",t[2]),z(i,"name",t[2]),z(i,"type","text"),z(i,"class","input-height svelte-8ce34a"),z(i,"placeholder",t[3]),z(i,"autocomplete","off"),L(i,"monospace",t[4]),L(i,"w-100",t[5]),L(i,"invalid",!t[6]),z(n,"class","text-input svelte-8ce34a"),L(n,"fill-width",t[5])},m(e,o){C(e,n,o),l&&l.m(n,null),k(n,r),k(n,i),t[9](i),O(i,t[0]),a||(s=B(i,"input",t[10]),a=!0)},p(e,[t]){2&t&&(o=Boolean(e[1])),o?l?l.p(e,t):(l=An(e),l.c(),l.m(n,r)):l&&(l.d(1),l=null),4&t&&z(i,"id",e[2]),4&t&&z(i,"name",e[2]),8&t&&z(i,"placeholder",e[3]),1&t&&i.value!==e[0]&&O(i,e[0]),16&t&&L(i,"monospace",e[4]),32&t&&L(i,"w-100",e[5]),64&t&&L(i,"invalid",!e[6]),32&t&&L(n,"fill-width",e[5])},i:e,o:e,d(e){e&&T(n),l&&l.d(),t[9](null),a=!1,s()}}}function Dn(e,t,n){let r,{label:i}=t,{name:a}=t,{placeholder:s}=t,{monospace:o=!1}=t,{value:l=""}=t,{fillWidth:c=!1}=t,{focusOnMount:u=!1}=t,{isValid:f=!0}=t;return G((()=>{u&&r.focus()})),e.$$set=e=>{"label"in e&&n(1,i=e.label),"name"in e&&n(2,a=e.name),"placeholder"in e&&n(3,s=e.placeholder),"monospace"in e&&n(4,o=e.monospace),"value"in e&&n(0,l=e.value),"fillWidth"in e&&n(5,c=e.fillWidth),"focusOnMount"in e&&n(8,u=e.focusOnMount),"isValid"in e&&n(6,f=e.isValid)},[l,i,a,s,o,c,f,r,u,function(e){Y[e?"unshift":"push"]((()=>{r=e,n(7,r)}))},function(){l=this.value,n(0,l)}]}class Bn extends De{constructor(e){super(),Ie(this,e,Dn,In,o,{label:1,name:2,placeholder:3,monospace:4,value:0,fillWidth:5,focusOnMount:8,isValid:6})}}function zn(e,t,n){const r=e.slice();return r[8]=t[n],r[10]=n,r}function Rn(e){let t,n;return{c(){t=E("label"),n=A(e[1]),z(t,"class","small-title mb-half svelte-1kanbjl"),z(t,"for",e[2]),L(t,"small",e[4])},m(e,r){C(e,t,r),k(t,n)},p(e,r){2&r&&R(n,e[1]),4&r&&z(t,"for",e[2]),16&r&&L(t,"small",e[4])},d(e){e&&T(t)}}}function On(e,t){let n,r,i,a,s=t[8].text+"";return{key:e,first:null,c(){n=E("option"),r=A(s),i=I(),n.__value=a=t[8].value,n.value=n.__value,z(n,"class","svelte-1kanbjl"),this.first=n},m(e,t){C(e,n,t),k(n,r),k(n,i)},p(e,i){t=e,64&i&&s!==(s=t[8].text+"")&&R(r,s),64&i&&a!==(a=t[8].value)&&(n.__value=a,n.value=n.__value)},d(e){e&&T(n)}}}function Nn(t){let n,r,i,a,s,o=Boolean(t[1]),l=[],c=new Map,u=o&&Rn(t),f=t[6];const d=e=>e[10];for(let e=0;et[7].call(i))),L(i,"w-100",t[3]),L(i,"small",t[4]),z(n,"class","select-with-label svelte-1kanbjl"),L(n,"w-100",t[3])},m(e,o){C(e,n,o),u&&u.m(n,null),k(n,r),k(n,i);for(let e=0;e{"label"in e&&n(1,r=e.label),"name"in e&&n(2,i=e.name),"selected"in e&&n(0,a=e.selected),"fillWidth"in e&&n(3,s=e.fillWidth),"small"in e&&n(4,o=e.small),"disabled"in e&&n(5,l=e.disabled),"options"in e&&n(6,c=e.options)},[a,r,i,s,o,l,c,function(){a=function(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}(this),n(0,a),n(6,c)}]}class Fn extends De{constructor(e){super(),Ie(this,e,Ln,Nn,o,{label:1,name:2,selected:0,fillWidth:3,small:4,disabled:5,options:6})}}function Pn(e){let t,n,r;return{c(){t=E("input"),z(t,"type","checkbox"),t.disabled=e[3],z(t,"class","svelte-6qqi0r")},m(i,a){C(i,t,a),t.checked=e[0],n||(r=B(t,"change",e[5]),n=!0)},p(e,n){8&n&&(t.disabled=e[3]),1&n&&(t.checked=e[0])},d(e){e&&T(t),n=!1,r()}}}function Mn(e){let t,n,r;return{c(){t=E("input"),z(t,"type","checkbox"),t.disabled=e[3],z(t,"class","svelte-6qqi0r")},m(i,a){C(i,t,a),t.checked=e[1].checked,n||(r=B(t,"change",e[4]),n=!0)},p(e,n){8&n&&(t.disabled=e[3]),2&n&&(t.checked=e[1].checked)},d(e){e&&T(t),n=!1,r()}}}function Un(t){let n,r,i,a;function s(e,t){return e[1]?Mn:Pn}let o=s(t),l=o(t);return{c(){n=E("div"),r=E("label"),l.c(),i=I(),a=A(t[2]),z(r,"disabled",t[3]),z(r,"class","svelte-6qqi0r"),z(n,"class","checkbox svelte-6qqi0r")},m(e,t){C(e,n,t),k(n,r),l.m(r,null),k(r,i),k(r,a)},p(e,[t]){o===(o=s(e))&&l?l.p(e,t):(l.d(1),l=o(e),l&&(l.c(),l.m(r,i))),4&t&&R(a,e[2]),8&t&&z(r,"disabled",e[3])},i:e,o:e,d(e){e&&T(n),l.d()}}}function jn(e,t,n){let{label:r}=t,{disabled:i=!1}=t,{checked:a}=t,{checkable:s}=t;return e.$$set=e=>{"label"in e&&n(2,r=e.label),"disabled"in e&&n(3,i=e.disabled),"checked"in e&&n(0,a=e.checked),"checkable"in e&&n(1,s=e.checkable)},[a,s,r,i,function(){s.checked=this.checked,n(1,s)},function(){a=this.checked,n(0,a)}]}class Wn extends De{constructor(e){super(),Ie(this,e,jn,Un,o,{label:2,disabled:3,checked:0,checkable:1})}}function Hn(e){let t,n,r,i,a;function s(t){e[9](t)}let o={label:"simdata group",name:"simdata-group-filter",options:e[4],fillWidth:!0};return void 0!==e[0].simDataGroup&&(o.selected=e[0].simDataGroup),t=new Fn({props:o}),Y.push((()=>Ce(t,"selected",s))),{c(){Te(t.$$.fragment),r=I(),i=E("br")},m(e,n){Ee(t,e,n),C(e,r,n),C(e,i,n),a=!0},p(e,r){const i={};!n&&1&r&&(n=!0,i.selected=e[0].simDataGroup,ae((()=>n=!1))),t.$set(i)},i(e){a||(ve(t.$$.fragment,e),a=!0)},o(e){ye(t.$$.fragment,e),a=!1},d(e){Ae(t,e),e&&T(r),e&&T(i)}}}function Kn(e){let t,n,r;function i(t){e[11](t)}let a={label:"filename substring",name:"filename-filter",placeholder:"Filename",fillWidth:!0};return void 0!==e[0].filename&&(a.value=e[0].filename),t=new Bn({props:a}),Y.push((()=>Ce(t,"value",i))),{c(){Te(t.$$.fragment)},m(e,n){Ee(t,e,n),r=!0},p(e,r){const i={};!n&&1&r&&(n=!0,i.value=e[0].filename,ae((()=>n=!1))),t.$set(i)},i(e){r||(ve(t.$$.fragment,e),r=!0)},o(e){ye(t.$$.fragment,e),r=!1},d(e){Ae(t,e)}}}function Zn(e){let t,n,r;function i(t){e[10](t)}let a={label:"stbl locale",name:"stbl-locale-filter",options:e[5],fillWidth:!0};return void 0!==e[0].stblLocale&&(a.selected=e[0].stblLocale),t=new Fn({props:a}),Y.push((()=>Ce(t,"selected",i))),{c(){Te(t.$$.fragment)},m(e,n){Ee(t,e,n),r=!0},p(e,r){const i={};!n&&1&r&&(n=!0,i.selected=e[0].stblLocale,ae((()=>n=!1))),t.$set(i)},i(e){r||(ve(t.$$.fragment,e),r=!0)},o(e){ye(t.$$.fragment,e),r=!1},d(e){Ae(t,e)}}}function Gn(e){let t,n,r,i,a,s,o,l,c,u,f,d,h,p,m,g,v,y,w,b,$,_,x,S,A;function D(t){e[6](t)}let B={label:"Show unsupported files"};function z(t){e[7](t)}void 0!==e[0].showUnsupported&&(B.checked=e[0].showUnsupported),n=new Wn({props:B}),Y.push((()=>Ce(n,"checked",D)));let R={label:"Show non-English STBLs"};function O(t){e[8](t)}void 0!==e[0].showNonEnStbls&&(R.checked=e[0].showNonEnStbls),o=new Wn({props:R}),Y.push((()=>Ce(o,"checked",z)));let N={label:"file type",name:"resource-type-filter",options:e[3],fillWidth:!0};void 0!==e[0].fileType&&(N.selected=e[0].fileType),d=new Fn({props:N}),Y.push((()=>Ce(d,"selected",O)));let L=e[0].fileType===e[2].SimData&&Hn(e);const F=[Zn,Kn],P=[];function M(e,t){return e[0].fileType===e[2].StringTable?0:1}function U(t){e[12](t)}y=M(e),w=P[y]=F[y](e);let j={label:"instance substring",name:"instance-filter",placeholder:"Instance",fillWidth:!0};return void 0!==e[0].instanceHex&&(j.value=e[0].instanceHex),x=new Bn({props:j}),Y.push((()=>Ce(x,"value",U))),{c(){t=E("div"),Te(n.$$.fragment),i=I(),a=E("br"),s=I(),Te(o.$$.fragment),c=I(),u=E("br"),f=I(),Te(d.$$.fragment),p=I(),m=E("br"),g=I(),L&&L.c(),v=I(),w.c(),b=I(),$=E("br"),_=I(),Te(x.$$.fragment)},m(e,r){C(e,t,r),Ee(n,t,null),k(t,i),k(t,a),k(t,s),Ee(o,t,null),k(t,c),k(t,u),k(t,f),Ee(d,t,null),k(t,p),k(t,m),k(t,g),L&&L.m(t,null),k(t,v),P[y].m(t,null),k(t,b),k(t,$),k(t,_),Ee(x,t,null),A=!0},p(e,i){const a={};!r&&1&i&&(r=!0,a.checked=e[0].showUnsupported,ae((()=>r=!1))),n.$set(a);const s={};!l&&1&i&&(l=!0,s.checked=e[0].showNonEnStbls,ae((()=>l=!1))),o.$set(s);const c={};!h&&1&i&&(h=!0,c.selected=e[0].fileType,ae((()=>h=!1))),d.$set(c),e[0].fileType===e[2].SimData?L?(L.p(e,i),1&i&&ve(L,1)):(L=Hn(e),L.c(),ve(L,1),L.m(t,v)):L&&(me(),ye(L,1,1,(()=>{L=null})),ge());let u=y;y=M(e),y===u?P[y].p(e,i):(me(),ye(P[u],1,1,(()=>{P[u]=null})),ge(),w=P[y],w?w.p(e,i):(w=P[y]=F[y](e),w.c()),ve(w,1),w.m(t,b));const f={};!S&&1&i&&(S=!0,f.value=e[0].instanceHex,ae((()=>S=!1))),x.$set(f)},i(e){A||(ve(n.$$.fragment,e),ve(o.$$.fragment,e),ve(d.$$.fragment,e),ve(L),ve(w),ve(x.$$.fragment,e),A=!0)},o(e){ye(n.$$.fragment,e),ye(o.$$.fragment,e),ye(d.$$.fragment,e),ye(L),ye(w),ye(x.$$.fragment,e),A=!1},d(e){e&&T(t),Ae(n),Ae(o),Ae(d),L&&L.d(),P[y].d(),Ae(x)}}}function qn(e){let t,n;return t=new En({props:{title:"Filter",onClose:e[1],$$slots:{default:[Gn]},$$scope:{ctx:e}}}),{c(){Te(t.$$.fragment)},m(e,r){Ee(t,e,r),n=!0},p(e,[n]){const r={};2&n&&(r.onClose=e[1]),32769&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(ve(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){Ae(t,e)}}}function Xn(e,t,n){const{BinaryResourceType:r,TuningResourceType:i,SimDataGroup:a}=window.S4TK.enums;let{onClose:s}=t,{filterSettings:o}=t,l=[{value:0,text:"All"},...r.all().map((e=>({value:e,text:r[e]}))),...i.all().map((e=>({value:e,text:i[e]})))].sort(((e,t)=>0===t.value||e.text>t.text?1:e.text({value:e,text:a[e]})))],u=[{value:null,text:"All"},...Sn.StringTableLocale.all().map((e=>({value:e,text:Sn.StringTableLocale[e]})))].sort(((e,t)=>null===t.value||e.text>t.text?1:e.text{"onClose"in e&&n(1,s=e.onClose),"filterSettings"in e&&n(0,o=e.filterSettings)},e.$$.update=()=>{1&e.$$.dirty&&o.fileType===r.StringTable&&n(0,o.showNonEnStbls=!0,o)},[o,s,r,l,c,u,function(t){e.$$.not_equal(o.showUnsupported,t)&&(o.showUnsupported=t,n(0,o))},function(t){e.$$.not_equal(o.showNonEnStbls,t)&&(o.showNonEnStbls=t,n(0,o))},function(t){e.$$.not_equal(o.fileType,t)&&(o.fileType=t,n(0,o))},function(t){e.$$.not_equal(o.simDataGroup,t)&&(o.simDataGroup=t,n(0,o))},function(t){e.$$.not_equal(o.stblLocale,t)&&(o.stblLocale=t,n(0,o))},function(t){e.$$.not_equal(o.filename,t)&&(o.filename=t,n(0,o))},function(t){e.$$.not_equal(o.instanceHex,t)&&(o.instanceHex=t,n(0,o))}]}class Vn extends De{constructor(e){super(),Ie(this,e,Xn,qn,o,{onClose:1,filterSettings:0})}} +var app=function(){"use strict";function e(){}const t=e=>e;function n(e,t){for(const n in t)e[n]=t[n];return e}function r(e){return e()}function i(){return Object.create(null)}function a(e){e.forEach(r)}function s(e){return"function"==typeof e}function o(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let l;function c(e,t){return l||(l=document.createElement("a")),l.href=t,e===l.href}function u(t,...n){if(null==t)return e;const r=t.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function f(e,t,n,r){if(e){const i=d(e,t,n,r);return e[0](i)}}function d(e,t,r,i){return e[1]&&i?n(r.ctx.slice(),e[1](i(t))):r.ctx}function h(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(void 0===t.dirty)return i;if("object"==typeof i){const e=[],n=Math.max(t.dirty.length,i.length);for(let r=0;r32){const t=[],n=e.ctx.length/32;for(let e=0;ewindow.performance.now():()=>Date.now(),w=v?e=>requestAnimationFrame(e):e;const b=new Set;function $(e){b.forEach((t=>{t.c(e)||(b.delete(t),t.f())})),0!==b.size&&w($)}function _(e){let t;return 0===b.size&&w($),{promise:new Promise((n=>{b.add(t={c:e,f:n})})),abort(){b.delete(t)}}}function k(e,t){e.appendChild(t)}function x(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function S(e){const t=E("style");return function(e,t){k(e.head||e,t)}(x(e),t),t.sheet}function C(e,t,n){e.insertBefore(t,n||null)}function T(e){e.parentNode.removeChild(e)}function E(e){return document.createElement(e)}function A(e){return document.createTextNode(e)}function I(){return A(" ")}function D(){return A("")}function B(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function z(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function R(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function O(e,t){e.value=null==t?"":t}function N(e,t){for(let n=0;n>>0}(u)}_${o}`,d=x(e),{stylesheet:h,rules:p}=M.get(d)||function(e,t){const n={stylesheet:S(t),rules:{}};return M.set(e,n),n}(d,e);p[f]||(p[f]=!0,h.insertRule(`@keyframes ${f} ${u}`,h.cssRules.length));const m=e.style.animation||"";return e.style.animation=`${m?`${m}, `:""}${f} ${r}ms linear ${i}ms 1 both`,j+=1,f}function H(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),i=n.length-r.length;i&&(e.style.animation=r.join(", "),j-=i,j||w((()=>{j||(M.forEach((e=>{const{stylesheet:t}=e;let n=t.cssRules.length;for(;n--;)t.deleteRule(n);e.rules={}})),M.clear())})))}function K(e){U=e}function Z(){if(!U)throw new Error("Function called outside component initialization");return U}function G(e){Z().$$.on_mount.push(e)}function q(e){Z().$$.on_destroy.push(e)}function X(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e.call(this,t)))}const V=[],Y=[],J=[],Q=[],ee=Promise.resolve();let te=!1;function ne(){te||(te=!0,ee.then(ce))}function re(){return ne(),ee}function ie(e){J.push(e)}function ae(e){Q.push(e)}const se=new Set;let oe,le=0;function ce(){const e=U;do{for(;le{oe=null}))),oe}function de(e,t,n){e.dispatchEvent(F(`${t?"intro":"outro"}${n}`))}const he=new Set;let pe;function me(){pe={r:0,c:[],p:pe}}function ge(){pe.r||a(pe.c),pe=pe.p}function ve(e,t){e&&e.i&&(he.delete(e),e.i(t))}function ye(e,t,n,r){if(e&&e.o){if(he.has(e))return;he.add(e),pe.c.push((()=>{he.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}else r&&r()}const we={duration:0};function be(n,r,i,o){let l=r(n,i),c=o?0:1,u=null,f=null,d=null;function h(){d&&H(n,d)}function p(e,t){const n=e.b-c;return t*=Math.abs(n),{a:c,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function m(r){const{delay:i=0,duration:s=300,easing:o=t,tick:m=e,css:g}=l||we,v={start:y()+i,b:r};r||(v.group=pe,pe.r+=1),u||f?f=v:(g&&(h(),d=W(n,c,r,s,i,o,g)),r&&m(0,1),u=p(v,s),ie((()=>de(n,r,"start"))),_((e=>{if(f&&e>f.start&&(u=p(f,s),f=null,de(n,u.b,"start"),g&&(h(),d=W(n,c,u.b,u.duration,0,o,l.css))),u)if(e>=u.end)m(c=u.b,1-c),de(n,u.b,"end"),f||(u.b?h():--u.group.r||a(u.group.c)),u=null;else if(e>=u.start){const t=e-u.start;c=u.a+u.d*o(t/u.duration),m(c,1-c)}return!(!u&&!f)})))}return{run(e){s(l)?fe().then((()=>{l=l(),m(e)})):m(e)},end(){h(),u=f=null}}}function $e(e,t){e.d(1),t.delete(e.key)}function _e(e,t){ye(e,1,1,(()=>{t.delete(e.key)}))}function ke(e,t,n,r,i,a,s,o,l,c,u,f){let d=e.length,h=a.length,p=d;const m={};for(;p--;)m[e[p].key]=p;const g=[],v=new Map,y=new Map;for(p=h;p--;){const e=f(i,a,p),o=n(e);let l=s.get(o);l?r&&l.p(e,t):(l=c(o,e),l.c()),v.set(o,g[p]=l),o in m&&y.set(o,Math.abs(p-m[o]))}const w=new Set,b=new Set;function $(e){ve(e,1),e.m(o,u),s.set(e.key,e),u=e.first,h--}for(;d&&h;){const t=g[h-1],n=e[d-1],r=t.key,i=n.key;t===n?(u=t.first,d--,h--):v.has(i)?!s.has(r)||w.has(r)?$(t):b.has(i)?d--:y.get(r)>y.get(i)?(b.add(r),$(t)):(w.add(i),d--):(l(n,s),d--)}for(;d--;){const t=e[d];v.has(t.key)||l(t,s)}for(;h;)$(g[h-1]);return g}function xe(e,t){const n={},r={},i={$$scope:1};let a=e.length;for(;a--;){const s=e[a],o=t[a];if(o){for(const e in s)e in o||(r[e]=1);for(const e in o)i[e]||(n[e]=o[e],i[e]=1);e[a]=o}else for(const e in s)i[e]=1}for(const e in r)e in n||(n[e]=void 0);return n}function Se(e){return"object"==typeof e&&null!==e?e:{}}function Ce(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function Te(e){e&&e.c()}function Ee(e,t,n,i){const{fragment:o,on_mount:l,on_destroy:c,after_update:u}=e.$$;o&&o.m(t,n),i||ie((()=>{const t=l.map(r).filter(s);c?c.push(...t):a(t),e.$$.on_mount=[]})),u.forEach(ie)}function Ae(e,t){const n=e.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ie(t,n,r,s,o,l,c,u=[-1]){const f=U;K(t);const d=t.$$={fragment:null,ctx:null,props:l,update:e,not_equal:o,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(f?f.$$.context:[])),callbacks:i(),dirty:u,skip_bound:!1,root:n.target||f.$$.root};c&&c(d.root);let h=!1;if(d.ctx=r?r(t,n.props||{},((e,n,...r)=>{const i=r.length?r[0]:n;return d.ctx&&o(d.ctx[e],d.ctx[e]=i)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](i),h&&function(e,t){-1===e.$$.dirty[0]&&(V.push(e),ne(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Be=[];function ze(e,t){return{subscribe:Re(e,t).subscribe}}function Re(t,n=e){let r;const i=new Set;function a(e){if(o(t,e)&&(t=e,r)){const e=!Be.length;for(const e of i)e[1](),Be.push(e,t);if(e){for(let e=0;e{i.delete(l),0===i.size&&(r(),r=null)}}}}function Oe(t,n,r){const i=!Array.isArray(t),o=i?[t]:t,l=n.length<2;return ze(r,(t=>{let r=!1;const c=[];let f=0,d=e;const h=()=>{if(f)return;d();const r=n(i?c[0]:c,t);l?t(r):d=s(r)?r:e},p=o.map(((e,t)=>u(e,(e=>{c[t]=e,f&=~(1<{f|=1<{Ae(e,1)})),ge()}s?(t=new s(o()),t.$on("routeEvent",e[7]),Te(t.$$.fragment),ve(t.$$.fragment,1),Ee(t,r.parentNode,r)):t=null}else s&&t.$set(i)},i(e){i||(t&&ve(t.$$.fragment,e),i=!0)},o(e){t&&ye(t.$$.fragment,e),i=!1},d(e){e&&T(r),t&&Ae(t,e)}}}function Le(e){let t,r,i;const a=[{params:e[1]},e[2]];var s=e[0];function o(e){let t={};for(let e=0;e{Ae(e,1)})),ge()}s?(t=new s(o()),t.$on("routeEvent",e[6]),Te(t.$$.fragment),ve(t.$$.fragment,1),Ee(t,r.parentNode,r)):t=null}else s&&t.$set(i)},i(e){i||(t&&ve(t.$$.fragment,e),i=!0)},o(e){t&&ye(t.$$.fragment,e),i=!1},d(e){e&&T(r),t&&Ae(t,e)}}}function Fe(e){let t,n,r,i;const a=[Le,Ne],s=[];function o(e,t){return e[1]?0:1}return t=o(e),n=s[t]=a[t](e),{c(){n.c(),r=D()},m(e,n){s[t].m(e,n),C(e,r,n),i=!0},p(e,[i]){let l=t;t=o(e),t===l?s[t].p(e,i):(me(),ye(s[l],1,1,(()=>{s[l]=null})),ge(),n=s[t],n?n.p(e,i):(n=s[t]=a[t](e),n.c()),ve(n,1),n.m(r.parentNode,r))},i(e){i||(ve(n),i=!0)},o(e){ye(n),i=!1},d(e){s[t].d(e),e&&T(r)}}}function Pe(){const e=window.location.href.indexOf("#/");let t=e>-1?window.location.href.substr(e+1):"/";const n=t.indexOf("?");let r="";return n>-1&&(r=t.substr(n+1),t=t.substr(0,n)),{location:t,querystring:r}}const Me=ze(null,(function(e){e(Pe());const t=()=>{e(Pe())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}})),Ue=Oe(Me,(e=>e.location));Oe(Me,(e=>e.querystring));const je=Re(void 0);function We(e,t){if(t=Ke(t),!e||!e.tagName||"a"!=e.tagName.toLowerCase())throw Error('Action "link" can only be used with tags');return He(e,t),{update(t){t=Ke(t),He(e,t)}}}function He(e,t){let n=t.href||e.getAttribute("href");if(n&&"/"==n.charAt(0))n="#"+n;else if(!n||n.length<2||"#/"!=n.slice(0,2))throw Error('Invalid value for "href" attribute: '+n);e.setAttribute("href",n),e.addEventListener("click",(e=>{e.preventDefault(),t.disabled||function(e){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0,void 0),window.location.hash=e}(e.currentTarget.getAttribute("href"))}))}function Ke(e){return e&&"string"==typeof e?{href:e}:e||{}}function Ze(e,t,n){let{routes:r={}}=t,{prefix:i=""}=t,{restoreScrollState:a=!1}=t;class s{constructor(e,t){if(!t||"function"!=typeof t&&("object"!=typeof t||!0!==t._sveltesparouter))throw Error("Invalid component object");if(!e||"string"==typeof e&&(e.length<1||"/"!=e.charAt(0)&&"*"!=e.charAt(0))||"object"==typeof e&&!(e instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:n,keys:r}=function(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,s=[],o="",l=e.split("/");for(l[0]||l.shift();i=l.shift();)"*"===(n=i[0])?(s.push("wild"),o+="/(.*)"):":"===n?(r=i.indexOf("?",1),a=i.indexOf(".",1),s.push(i.substring(1,~r?r:~a?a:i.length)),o+=~r&&!~a?"(?:/([^/]+?))?":"/([^/]+?)",~a&&(o+=(~r?"?":"")+"\\"+i.substring(a))):o+="/"+i;return{keys:s,pattern:new RegExp("^"+o+(t?"(?=$|/)":"/?$"),"i")}}(e);this.path=e,"object"==typeof t&&!0===t._sveltesparouter?(this.component=t.component,this.conditions=t.conditions||[],this.userData=t.userData,this.props=t.props||{}):(this.component=()=>Promise.resolve(t),this.conditions=[],this.props={}),this._pattern=n,this._keys=r}match(e){if(i)if("string"==typeof i){if(!e.startsWith(i))return null;e=e.substr(i.length)||"/"}else if(i instanceof RegExp){const t=e.match(i);if(!t||!t[0])return null;e=e.substr(t[0].length)||"/"}const t=this._pattern.exec(e);if(null===t)return null;if(!1===this._keys)return t;const n={};let r=0;for(;r{o.push(new s(t,e))})):Object.keys(r).forEach((e=>{o.push(new s(e,r[e]))}));let l=null,c=null,u={};const f=function(){const e=Z();return(t,n,{cancelable:r=!1}={})=>{const i=e.$$.callbacks[t];if(i){const a=F(t,n,{cancelable:r});return i.slice().forEach((t=>{t.call(e,a)})),!a.defaultPrevented}return!0}}();async function d(e,t){await re(),f(e,t)}let h=null,p=null;var m;a&&(p=e=>{h=e.state&&e.state.__svelte_spa_router_scrollY?e.state:null},window.addEventListener("popstate",p),m=()=>{h?window.scrollTo(h.__svelte_spa_router_scrollX,h.__svelte_spa_router_scrollY):window.scrollTo(0,0)},Z().$$.after_update.push(m));let g=null,v=null;const y=Me.subscribe((async e=>{g=e;let t=0;for(;t{je.set(c)}))}n(0,l=null),v=null,je.set(void 0)}));return q((()=>{y(),p&&window.removeEventListener("popstate",p)})),e.$$set=e=>{"routes"in e&&n(3,r=e.routes),"prefix"in e&&n(4,i=e.prefix),"restoreScrollState"in e&&n(5,a=e.restoreScrollState)},e.$$.update=()=>{32&e.$$.dirty&&(history.scrollRestoration=a?"manual":"auto")},[l,c,u,r,i,a,function(t){X.call(this,e,t)},function(t){X.call(this,e,t)}]}class Ge extends De{constructor(e){super(),Ie(this,e,Ze,Fe,o,{routes:3,prefix:4,restoreScrollState:5})}}const qe=e=>"s:"+e;const Xe=(Ve={isLightTheme:(Ye=function(e){document.documentElement.setAttribute("data-theme",e?"light":"dark")},{get(e,t=!1){const n=localStorage.getItem(qe(e));return n?"true"===n:t},set(e,t){localStorage.setItem(qe(e),t?"true":"false"),Ye?.(t)}})},new Proxy(Ve,{get:(e,t)=>e[t].get(t),set:(e,t,n)=>(e[t].set(t,n),!0)}));var Ve,Ye;const Je=function(e){const t=Re(Xe[e]);return t.subscribe((t=>{Xe[e]=t})),t}("isLightTheme"),Qe=Re(0);function et(t){let n,r,i,a,s;return{c(){n=E("button"),r=E("img"),c(r.src,i=t[1])||z(r,"src",i),z(r,"alt",t[0]),z(r,"class","is-svg svelte-1yt6472"),z(r,"title","Toggle Theme"),z(n,"class","button-wrapper svelte-1yt6472")},m(e,i){C(e,n,i),k(n,r),a||(s=B(n,"click",t[2]),a=!0)},p(e,[t]){2&t&&!c(r.src,i=e[1])&&z(r,"src",i),1&t&&z(r,"alt",e[0])},i:e,o:e,d(e){e&&T(n),a=!1,s()}}}function tt(e,t,n){let r,i,a=Xe.isLightTheme;const s=Je.subscribe((e=>{n(3,a=e)}));return q((()=>{s()})),e.$$.update=()=>{8&e.$$.dirty&&n(1,r=`../assets/${a?"sunny":"moon"}-outline.svg`),8&e.$$.dirty&&n(0,i=(a?"Light":"Dark")+" Theme")},[i,r,function(){n(3,a=!a),document.documentElement.classList.add("theme-transition"),window.setTimeout((()=>{document.documentElement.classList.remove("theme-transition")}),500),Je.set(a)},a]}class nt extends De{constructor(e){super(),Ie(this,e,tt,et,o,{})}}function rt(e){let t,n,r,i,s,o,l,u,f,d,h,p,m,v,y,w,b;return v=new nt({}),{c(){t=E("nav"),n=E("div"),r=E("a"),r.innerHTML='S4TK \n

S4TK Packages

',i=I(),s=E("div"),o=E("a"),l=E("img"),f=I(),d=E("a"),h=E("img"),m=I(),Te(v.$$.fragment),z(r,"href","/"),z(r,"class","flex-center-v flex-space-between svelte-nghfuw"),z(n,"class","left flex-center-v flex-space-between svelte-nghfuw"),z(l,"class","is-svg smaller svelte-nghfuw"),c(l.src,u="./assets/"+e[2]+".svg")||z(l,"src",u),z(l,"alt","Home"),z(o,"href","/"),z(o,"title","Home"),z(o,"class","svelte-nghfuw"),L(o,"active","/"===e[0]),z(h,"class","is-svg svelte-nghfuw"),c(h.src,p="./assets/"+e[1]+".svg")||z(h,"src",p),z(h,"alt","Help"),z(d,"href","/help"),z(d,"title","Help"),z(d,"class","svelte-nghfuw"),L(d,"active","/help"===e[0]),z(s,"class","right flex-center-v flex-space-between"),z(t,"class","flex-center-v flex-space-between bottom-shadow svelte-nghfuw")},m(e,a){C(e,t,a),k(t,n),k(n,r),k(t,i),k(t,s),k(s,o),k(o,l),k(s,f),k(s,d),k(d,h),k(s,m),Ee(v,s,null),y=!0,w||(b=[g(We.call(null,r)),g(We.call(null,o)),g(We.call(null,d))],w=!0)},p(e,[t]){(!y||4&t&&!c(l.src,u="./assets/"+e[2]+".svg"))&&z(l,"src",u),1&t&&L(o,"active","/"===e[0]),(!y||2&t&&!c(h.src,p="./assets/"+e[1]+".svg"))&&z(h,"src",p),1&t&&L(d,"active","/help"===e[0])},i(e){y||(ve(v.$$.fragment,e),y=!0)},o(e){ye(v.$$.fragment,e),y=!1},d(e){e&&T(t),Ae(v),w=!1,a(b)}}}function it(e,t,n){let r,i,a;var s,o;return s=Ue,o=e=>n(0,a=e),e.$$.on_destroy.push(u(s,o)),e.$$.update=()=>{1&e.$$.dirty&&n(2,r="/"===a?"home":"home-outline"),1&e.$$.dirty&&n(1,i="/help"===a?"help-circle":"help-circle-outline")},[a,i,r]}class at extends De{constructor(e){super(),Ie(this,e,it,rt,o,{})}}function st(e){let t,n,r;const i=e[3].default,a=f(i,e,e[2],null);return{c(){t=E("div"),n=E("div"),a&&a.c(),z(n,"class","content-area svelte-pbl49w"),z(t,"class","content-area-wrapper flex-center svelte-pbl49w"),L(t,"banded",e[0]),L(t,"bottom-shadow",e[1])},m(e,i){C(e,t,i),k(t,n),a&&a.m(n,null),r=!0},p(e,[n]){a&&a.p&&(!r||4&n)&&p(a,i,e,e[2],r?h(i,e[2],n,null):m(e[2]),null),1&n&&L(t,"banded",e[0]),2&n&&L(t,"bottom-shadow",e[1])},i(e){r||(ve(a,e),r=!0)},o(e){ye(a,e),r=!1},d(e){e&&T(t),a&&a.d(e)}}}function ot(e,t,n){let{$$slots:r={},$$scope:i}=t,{banded:a=!1}=t,{bottomShadow:s=!1}=t;return e.$$set=e=>{"banded"in e&&n(0,a=e.banded),"bottomShadow"in e&&n(1,s=e.bottomShadow),"$$scope"in e&&n(2,i=e.$$scope)},[a,s,i,r]}class lt extends De{constructor(e){super(),Ie(this,e,ot,st,o,{banded:0,bottomShadow:1})}}function ct(t){let n,r,i,a,s,o,l;return{c(){n=E("div"),n.innerHTML='

Created with by Frankk using Sims 4 Toolkit

\n

Frankk's Mods\n |\n Sims 4 Toolkit\n |\n \n |\n Patreon\n |\n Ko-fi\n |\n Discord

',r=I(),i=E("p"),i.textContent="The Sims™ and its plumbob icon are registered trademarks of Electronic\n Arts, Inc. (EA). Sims 4 Toolkit is not affiliated with or endorsed by EA.",a=I(),s=E("p"),s.innerHTML='All icons on this website are supplied by\n Ionicons and\n GitHub Octicons.',o=I(),l=E("p"),l.textContent="2022 © Frank Kulak",z(n,"class","mb-3"),z(i,"class","disclaimer"),z(s,"class","disclaimer"),z(l,"class","disclaimer")},m(e,t){C(e,n,t),C(e,r,t),C(e,i,t),C(e,a,t),C(e,s,t),C(e,o,t),C(e,l,t)},p:e,d(e){e&&T(n),e&&T(r),e&&T(i),e&&T(a),e&&T(s),e&&T(o),e&&T(l)}}}function ut(e){let t,n,r;return n=new lt({props:{$$slots:{default:[ct]},$$scope:{ctx:e}}}),{c(){t=E("div"),Te(n.$$.fragment),z(t,"id","footer"),z(t,"class","flex-center text-center svelte-1qvog4t")},m(e,i){C(e,t,i),Ee(n,t,null),r=!0},p(e,[t]){const r={};1&t&&(r.$$scope={dirty:t,ctx:e}),n.$set(r)},i(e){r||(ve(n.$$.fragment,e),r=!0)},o(e){ye(n.$$.fragment,e),r=!1},d(e){e&&T(t),Ae(n)}}}class ft extends De{constructor(e){super(),Ie(this,e,null,ut,o,{})}}function dt(t){let n,r,i,a,s;return{c(){n=E("div"),r=E("h3"),i=A(t[0]),a=I(),s=E("hr"),z(r,"class","mt-0 mb-half nowrap"),z(s,"class","svelte-yl4kn8"),z(n,"class","section-header svelte-yl4kn8")},m(e,t){C(e,n,t),k(n,r),k(r,i),k(n,a),k(n,s)},p(e,[t]){1&t&&R(i,e[0])},i:e,o:e,d(e){e&&T(n)}}}function ht(e,t,n){let{title:r}=t;return e.$$set=e=>{"title"in e&&n(0,r=e.title)},[r]}class pt extends De{constructor(e){super(),Ie(this,e,ht,dt,o,{title:0})}}function mt(e){let t,n,r,i,a,s,o,l,c,u;return i=new pt({props:{title:e[0]}}),{c(){t=E("button"),n=E("div"),r=E("div"),Te(i.$$.fragment),a=I(),s=E("p"),o=A(e[1]),z(r,"class","mb-1"),z(s,"class","my-0"),z(n,"class","floating-card drop-shadow move-on-hover text-left h-100"),z(t,"class","button-wrapper")},m(f,d){C(f,t,d),k(t,n),k(n,r),Ee(i,r,null),k(n,a),k(n,s),k(s,o),l=!0,c||(u=B(t,"click",e[2]),c=!0)},p(e,[t]){const n={};1&t&&(n.title=e[0]),i.$set(n),(!l||2&t)&&R(o,e[1])},i(e){l||(ve(i.$$.fragment,e),l=!0)},o(e){ye(i.$$.fragment,e),l=!1},d(e){e&&T(t),Ae(i),c=!1,u()}}}function gt(e,t,n){let{name:r}=t,{description:i}=t,{link:a}=t;return e.$$set=e=>{"name"in e&&n(0,r=e.name),"description"in e&&n(1,i=e.description),"link"in e&&n(3,a=e.link)},[r,i,function(){!async function(e){if(!e||e.length<1||"/"!=e.charAt(0)&&0!==e.indexOf("#/"))throw Error("Invalid parameter location");await re();const t=("#"==e.charAt(0)?"":"#")+e;try{const e={...history.state};delete e.__svelte_spa_router_scrollX,delete e.__svelte_spa_router_scrollY,window.history.replaceState(e,void 0,t)}catch(e){console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}("/"+a)},a]}class vt extends De{constructor(e){super(),Ie(this,e,gt,mt,o,{name:0,description:1,link:3})}}function yt(t){let n,r,i,a,s;return r=new vt({props:{name:"Package Viewer",description:"View the contents of a package and scan it for potential issues.",link:"view"}}),a=new vt({props:{name:"Tuning Generator",description:"Mass generate tuning and SimData files with custom templates.",link:"generate"}}),{c(){n=E("div"),Te(r.$$.fragment),i=I(),Te(a.$$.fragment),z(n,"class","floating-card-group mt-2")},m(e,t){C(e,n,t),Ee(r,n,null),k(n,i),Ee(a,n,null),s=!0},p:e,i(e){s||(ve(r.$$.fragment,e),ve(a.$$.fragment,e),s=!0)},o(e){ye(r.$$.fragment,e),ye(a.$$.fragment,e),s=!1},d(e){e&&T(n),Ae(r),Ae(a)}}}function wt(e){let t,n,r,i,a,s;return r=new lt({props:{$$slots:{default:[yt]},$$scope:{ctx:e}}}),a=new ft({}),{c(){t=I(),n=E("section"),Te(r.$$.fragment),i=I(),Te(a.$$.fragment),document.title="Package Viewer",z(n,"id","home-section"),z(n,"class","flex-col flex-space-between svelte-17ltnax")},m(e,o){C(e,t,o),C(e,n,o),Ee(r,n,null),k(n,i),Ee(a,n,null),s=!0},p(e,[t]){const n={};1&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n)},i(e){s||(ve(r.$$.fragment,e),ve(a.$$.fragment,e),s=!0)},o(e){ye(r.$$.fragment,e),ye(a.$$.fragment,e),s=!1},d(e){e&&T(t),e&&T(n),Ae(r),Ae(a)}}}class bt extends De{constructor(e){super(),Ie(this,e,null,wt,o,{})}}function $t(t){let n,r,i;return{c(){n=E("h2"),r=E("span"),i=A(t[0]),z(r,"class","default-gradient-text text-shadow"),z(n,"class","my-0 nowrap-truncate")},m(e,t){C(e,n,t),k(n,r),k(r,i)},p(e,[t]){1&t&&R(i,e[0])},i:e,o:e,d(e){e&&T(n)}}}function _t(e,t,n){let{title:r}=t;return e.$$set=e=>{"title"in e&&n(0,r=e.title)},[r]}class kt extends De{constructor(e){super(),Ie(this,e,_t,$t,o,{title:0})}}function xt(t){let n,r,i,a,s,o;return n=new kt({props:{title:"Unlock this page for $4.04"}}),{c(){Te(n.$$.fragment),r=I(),i=E("p"),i.innerHTML='Just kidding. This page doesn't exist. Please go home.',a=I(),s=E("p"),s.textContent="Error 404",z(s,"class","disclaimer svelte-hx25dd")},m(e,t){Ee(n,e,t),C(e,r,t),C(e,i,t),C(e,a,t),C(e,s,t),o=!0},p:e,i(e){o||(ve(n.$$.fragment,e),o=!0)},o(e){ye(n.$$.fragment,e),o=!1},d(e){Ae(n,e),e&&T(r),e&&T(i),e&&T(a),e&&T(s)}}}function St(e){let t,n,r,i;return r=new lt({props:{$$slots:{default:[xt]},$$scope:{ctx:e}}}),{c(){t=I(),n=E("section"),Te(r.$$.fragment),document.title="Page Not Found",z(n,"id","page-not-found"),z(n,"class","svelte-hx25dd")},m(e,a){C(e,t,a),C(e,n,a),Ee(r,n,null),i=!0},p(e,[t]){const n={};2&t&&(n.$$scope={dirty:t,ctx:e}),r.$set(n)},i(e){i||(ve(r.$$.fragment,e),i=!0)},o(e){ye(r.$$.fragment,e),i=!1},d(e){e&&T(t),e&&T(n),Ae(r)}}}function Ct(e,t,n){let{params:r}=t;return e.$$set=e=>{"params"in e&&n(0,r=e.params)},[r]}class Tt extends De{constructor(e){super(),Ie(this,e,Ct,St,o,{params:0})}}function Et(t){let n,r,i,s,o,l,c,u,f,d,h;return n=new pt({props:{title:"What is this website for?"}}),{c(){Te(n.$$.fragment),r=I(),i=E("p"),s=A("This website renders Sims 4 package files and scans them for common\n issues. It is primarily intended for use with the S4TK Discord bot, but\n you can "),o=E("a"),o.textContent="manually upload files",l=A(" and\n "),c=E("a"),c.textContent="mass generate tuning",u=A(" as well."),z(o,"href","/view"),z(c,"href","/generate")},m(e,t){Ee(n,e,t),C(e,r,t),C(e,i,t),k(i,s),k(i,o),k(i,l),k(i,c),k(i,u),f=!0,d||(h=[g(We.call(null,o)),g(We.call(null,c))],d=!0)},p:e,i(e){f||(ve(n.$$.fragment,e),f=!0)},o(e){ye(n.$$.fragment,e),f=!1},d(e){Ae(n,e),e&&T(r),e&&T(i),d=!1,a(h)}}}function At(t){let n,r,i,a;return n=new pt({props:{title:"Experiencing issues?"}}),{c(){Te(n.$$.fragment),r=I(),i=E("p"),i.innerHTML='This website relies on an API that I host myself. If packages aren't\n loading, there is a chance that it is down. Please report this issue to\n me ASAP on Discord.'},m(e,t){Ee(n,e,t),C(e,r,t),C(e,i,t),a=!0},p:e,i(e){a||(ve(n.$$.fragment,e),a=!0)},o(e){ye(n.$$.fragment,e),a=!1},d(e){Ae(n,e),e&&T(r),e&&T(i)}}}function It(e){let t,n,r,i,a,s,o,l,c;return i=new lt({props:{banded:!0,$$slots:{default:[Et]},$$scope:{ctx:e}}}),s=new lt({props:{$$slots:{default:[At]},$$scope:{ctx:e}}}),l=new ft({}),{c(){t=I(),n=E("section"),r=E("div"),Te(i.$$.fragment),a=I(),Te(s.$$.fragment),o=I(),Te(l.$$.fragment),document.title="Package Viewer",z(n,"id","help-section"),z(n,"class","flex-col flex-space-between svelte-17enwed")},m(e,u){C(e,t,u),C(e,n,u),k(n,r),Ee(i,r,null),k(r,a),Ee(s,r,null),k(n,o),Ee(l,n,null),c=!0},p(e,[t]){const n={};1&t&&(n.$$scope={dirty:t,ctx:e}),i.$set(n);const r={};1&t&&(r.$$scope={dirty:t,ctx:e}),s.$set(r)},i(e){c||(ve(i.$$.fragment,e),ve(s.$$.fragment,e),ve(l.$$.fragment,e),c=!0)},o(e){ye(i.$$.fragment,e),ye(s.$$.fragment,e),ye(l.$$.fragment,e),c=!1},d(e){e&&T(t),e&&T(n),Ae(i),Ae(s),Ae(l)}}}class Dt extends De{constructor(e){super(),Ie(this,e,null,It,o,{})}}var Bt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function zt(e){var t={exports:{}};return e(t,t.exports),t.exports}function Rt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}var Ot=zt((function(e,t){function n(e){return o(e),s(e,8,!1)}function r(e){return o(e),s(e,8,!1)}function i(e){return function(e){if(e<0n||e>0xffffffffffffffffn)throw new Error(`Expected value to be a positive, 64-bit integer, but got ${e}.`)}(e),s(e,16,!1)}function a(e,t,a,s=":"){return`${n(e)}${s}${r(t)}${s}${i(a)}`}function s(e,t,n=!1){return`${n?"0x":""}${e.toString(16).padStart(t,"0").toUpperCase()}`}function o(e){if(Number.isNaN(e)||e<0||e>4294967295)throw new Error(`Expected value to be a positive, 32-bit integer, but got ${e}.`)}Object.defineProperty(t,"__esModule",{value:!0}),t.formatAsHexString=t.formatResourceKey=t.formatResourceTGI=t.formatResourceInstance=t.formatResourceGroup=t.formatResourceType=t.formatStringKey=void 0,t.formatStringKey=function(e){return o(e),s(e,8,!0)},t.formatResourceType=n,t.formatResourceGroup=r,t.formatResourceInstance=i,t.formatResourceTGI=a,t.formatResourceKey=function(e,t=":"){return a(e.type,e.group,e.instance,t)},t.formatAsHexString=s}));const{BinaryResourceType:Nt,TuningResourceType:Lt,SimDataGroup:Ft,StringTableLocale:Pt,EncodingType:Mt}=window.S4TK.enums,{formatAsHexString:Ut,formatResourceInstance:jt,formatStringKey:Wt,formatResourceKey:Ht}=window.S4TK.formatting,{fnv64:Kt}=window.S4TK.hashing,Zt=new Set(["Preference","Reward","HouseholdReward","SimReward","RelationshipBit","SocialContextBit","Aspiration","AspirationAssignment","AspirationBasic","AspirationCareer","AspirationGig","AspirationFamilialTrigger","AspirationNotification","AspirationOrganizationTask","AspirationSimInfoPanel","AspirationWhimSet","ObjectivelessWhimSet","TimedAspiration","ZoneDirectorEventListener"]),Gt=new Set(["DevelopmentalMilestone"]);function qt(e,t){try{return e===Nt.SimData?t in Ft?`${Jt(Ft[t])} SimData`:"SimData":e in Lt?e===Lt.Tuning?"Generic Tuning":Jt(Lt[e])+" Tuning":e in Nt?Jt(Nt[e]):"Type "+Ut(e,8,!1)}catch(e){return console.error(e),"Error"}}function Xt(e){try{switch(e.value.encodingType){case Mt.XML:return e.value.root.name;case Mt.DATA:return e.value.instance.name;case Mt.STBL:return Pt[Pt.getLocale(e.key.instance)]+" String Table";case Mt.DDS:return(e.key.type===Nt.DdsImage?"DDS":"DST")+" Image";case Mt.Unknown:return e.value.isXml()?"Unnamed XML":"Unnamed";default:return"Unnamed"}}catch(e){return console.error(e),"Error"}}const Vt=new Set([Mt.XML,Mt.STBL,Mt.DATA,Mt.DDS]);function Yt(e){const t=new Map,n=new Set,r=new Map,i=new Map;return e.entries.forEach((e=>{try{const a=e.key.type in Lt,s=e.key.type===Nt.SimData;if(a&&r.set(e.key.instance,e.key.type),i.has(e.key.instance)){if(a){const t=i.get(e.key.instance);t.tuning?t.otherTuning=!0:t.tuning=!0}else if(s){const t=i.get(e.key.instance);t.simdata?t.otherSimData=!0:t.simdata=!0}}else i.set(e.key.instance,{simdata:s,tuning:a,otherTuning:!1,otherSimData:!1});const o=function(e,t){if(new Set([47570707,2142678410]).has(e.key.type))return;const n=[],r=Ht(e.key,"-");t.has(r)?n.push(`The key ${r} is already in use by another resource.`):t.add(r);e.key.instance||n.push("Instance ID should never be 0.");if(e.key.type===Nt.SimData)0===e.key.group&&n.push('SimData group should never be 0. Check the SimDataGroup docs for a list of expected groups.');else if(e.key.type===Nt.StringTable){const t=e.value,r=t.findRepeatedKeys();r.length&&n.push(`Found repeated keys: [${r.map(Wt).join(", ")}]`),t.hasKey(2166136261)&&n.push("At least one entry is using the key 0x811C9DC5, which is the FNV-32 hash of an empty string. You should change it."),t.hasValue("")&&n.push("At least one string is empty.")}else if(e.value.isXml()){const t=e.value;try{t.root}catch(e){return console.error(e),void n.push(`XML could not be parsed. ${e}`)}const r=BigInt(t.root.id);if("I"===t.root.tag){if(e.key.instance>0xffffffffn&&(Zt.has(t.root.attributes.c)&&n.push(`The class "${t.root.attributes.c}" is known to require a 32-bit instance, but this resource has a 64-bit instance. You might want to replace ${Ut(e.key.instance,16)} with ${Ut(0xffffffffn&e.key.instance,8)}.`),e.key.type===Lt.Trait&&"PERSONALITY"===t.root.findChild("trait_type").innerValue.trim()&&n.push(`Personality traits are known to require a 32-bit instance, but this one has a 64-bit instance. You might want to replace ${Ut(e.key.instance,16)} with ${Ut(0xffffffffn&e.key.instance,8)}.`)),e.key.instance>2147483647n&&Gt.has(t.root.attributes.c)){const r=2147483647n&e.key.instance;n.push(`The class "${t.root.attributes.c}" is a special case, and its instance must be 31 bits or lower (max value = 2,147,483,647). You may want to use ${Ut(r,8)} instead.`)}if(Lt.parseAttr(t.root.attributes.i)!==e.key.type){const r=Lt.parseAttr(t.root.attributes.i);n.push(`Type of ${Lt[e.key.type]} (${Ut(e.key.type,8)}) is incompatible with i="${t.root.attributes.i}". Either the type should be ${Lt[r]} (${Ut(r,8)}), or the i attribute should be "${Lt.getAttr(e.key.type)}".`)}}else if("M"===t.root.tag){const e=Kt(t.root.name.replace(/\./g,"-"));r!==e&&n.push(`Module instance does not match its name. It must be the FNV-64 hash of the filename with all '.' characters are replaced with '-', which is ${e}.`)}0xcbf29ce484222325n===r?n.push("0xCBF29CE484222325 is the FNV-64 hash of an empty string, and using it as the instance of your tuning is not a good idea. You should change it."):0x811c9dc5n===r&&n.push("0x811C9DC5 is the FNV-32 hash of an empty string, and using it as the instance of your tuning is not a good idea. You should change it."),r!==e.key.instance&&n.push(`Instance of ${jt(e.key.instance)} does not match s="${t.root.id}".`)}return n}(e,n);o.length&&t.set(e.id,o)}catch(n){t.set(e.id,["Exception was thrown while parsing this file. This does not necessarily mean that there is something wrong with it."])}})),e.entries.forEach((e=>{try{const n=()=>(t.has(e.id)||t.set(e.id,[]),t.get(e.id));if(e.key.type===Nt.SimData){if(r.has(e.key.instance)){const t=Ft.getForTuning(r.get(e.key.instance));t!==e.key.group&&n().push(`Expected ${Lt[r.get(e.key.instance)]} SimData to have a group of ${Ut(t,8)}, but got ${Ut(e.key.group,8)} instead.`)}i.get(e.key.instance).otherSimData&&n().push("At least one other SimData resource has the same instance as this one. The only resources that should have the same instance are tuning/SimData pairs.")}else if(e.key.type in Lt){const t=i.get(e.key.instance);t.otherTuning&&n().push("At least one other tuning resource has the same instance as this one. The only resources that should have the same instance are tuning/SimData pairs."),e.key.type!==Lt.Snippet&&Ft.getForTuning(e.key.type)&&!t.simdata&&n().push(`Type of ${Lt[e.key.type]} (${Ut(e.key.type,8)}) is known to require SimData, but no matching SimData was found in this package.`)}}catch(e){}})),t}function Jt(e){return e.replace(/([A-Z])/g," $1")}function Qt(e){let t,n,r,i,a,o,l,u,f=e[4].length+"";return{c(){t=E("button"),n=E("img"),i=I(),a=E("p"),o=A(f),c(n.src,r="./assets/warning-outline.svg")||z(n,"src","./assets/warning-outline.svg"),z(n,"class","is-svg dark-svg svelte-1g3dsgo"),z(n,"alt","Warning"),z(n,"title","This entry has warnings!"),z(a,"class","my-0 monospace svelte-1g3dsgo"),z(t,"class","button-wrapper warning-img-wrapper flex-center drop-shadow svelte-1g3dsgo")},m(r,c){C(r,t,c),k(t,n),k(t,i),k(t,a),k(a,o),l||(u=B(t,"click",(function(){s(e[1])&&e[1].apply(this,arguments)})),l=!0)},p(t,n){e=t,16&n&&f!==(f=e[4].length+"")&&R(o,f)},d(e){e&&T(t),l=!1,u()}}}function en(t){let n,r,i,a,o,l,c,u,f,d,h,p,m,g=Xt(t[2])+"",v=qt(t[2].key.type,t[2].key.group)+"",y=t[4]&&Qt(t);return{c(){n=E("button"),r=E("div"),i=E("p"),a=A(g),o=I(),l=E("p"),c=A(v),u=I(),f=E("p"),d=A(t[6]),h=I(),y&&y.c(),z(i,"class","mt-0 mb-half nowrap svelte-1g3dsgo"),z(l,"class","small-title my-0 nowrap svelte-1g3dsgo"),z(f,"class","small-title monospace my-0 nowrap svelte-1g3dsgo"),z(r,"class","entry-row p-half mb-half mr-half svelte-1g3dsgo"),L(r,"active",t[3]),z(n,"class","button-wrapper w-100 text-left")},m(e,g){C(e,n,g),k(n,r),k(r,i),k(i,a),k(r,o),k(r,l),k(l,c),k(r,u),k(r,f),k(f,d),k(r,h),y&&y.m(r,null),t[9](n),p||(m=B(n,"click",(function(){s(t[0])&&t[0].apply(this,arguments)})),p=!0)},p(e,[n]){t=e,4&n&&g!==(g=Xt(t[2])+"")&&R(a,g),4&n&&v!==(v=qt(t[2].key.type,t[2].key.group)+"")&&R(c,v),64&n&&R(d,t[6]),t[4]?y?y.p(t,n):(y=Qt(t),y.c(),y.m(r,null)):y&&(y.d(1),y=null),8&n&&L(r,"active",t[3])},i:e,o:e,d(e){e&&T(n),y&&y.d(),t[9](null),p=!1,m()}}}function tn(e,t,n){let r,i,{onClick:a}=t,{onWarningClick:s}=t,{entry:o}=t,{active:l}=t,{warnings:c}=t,{viewSettings:u}=t,{entriesMenuElement:f}=t;return e.$$set=e=>{"onClick"in e&&n(0,a=e.onClick),"onWarningClick"in e&&n(1,s=e.onWarningClick),"entry"in e&&n(2,o=e.entry),"active"in e&&n(3,l=e.active),"warnings"in e&&n(4,c=e.warnings),"viewSettings"in e&&n(7,u=e.viewSettings),"entriesMenuElement"in e&&n(8,f=e.entriesMenuElement)},e.$$.update=()=>{132&e.$$.dirty&&n(6,r=0===u.resourceKeyFormat?Ot.formatResourceKey(o.key):o.key.instance),296&e.$$.dirty&&l&&i&&f&&async function(){const e=f.getBoundingClientRect(),t=i.getBoundingClientRect(),n=e.y,r=e.y+e.height,a=t.y,s=t.y+t.height;(ar)&&i.scrollIntoView()}()},[a,s,o,l,c,i,r,u,f,function(e){Y[e?"unshift":"push"]((()=>{i=e,n(5,i)}))}]}class nn extends De{constructor(e){super(),Ie(this,e,tn,en,o,{onClick:0,onWarningClick:1,entry:2,active:3,warnings:4,viewSettings:7,entriesMenuElement:8})}}var rn,an=zt((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.camelToPascal=t.pascalToCamel=t.pascalToSnake=t.snakeToPascal=t.getAllEnumValues=t.readUntilFalsey=t.promisify=t.bufferContainsDATA=t.bufferContainsXml=t.arraysAreEqual=t.removeFromArray=t.makeList=void 0,t.makeList=function(e,t,n=!1,r){const i=[];for(let a=0;a=r)break}return i},t.removeFromArray=function(e,t){let n=!1;return e.forEach((e=>{const r=t.findIndex((t=>t===e));r<0||(t.splice(r,1),n=!0)})),n},t.arraysAreEqual=function(e,t){return e.length===t?.length&&e.every((e=>t.some((t=>e.equals(t)))))},t.bufferContainsXml=function(e){return e.length>=5&&"=4&&"DATA"===e.toString("utf-8",0,4)},t.promisify=function(e){return new Promise(((t,n)=>{try{t(e())}catch(e){n(e)}}))},t.readUntilFalsey=function(e,t=0,n=(e=>Boolean(e))){let r;for(r=t;r"number"==typeof e))},t.snakeToPascal=function(e){return e?.split("_").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join("")},t.pascalToSnake=function(e){return e?.split(/(?=[A-Z])/).join("_").toLowerCase()},t.pascalToCamel=function(e){return e?e.charAt(0).toLowerCase()+e.slice(1):""},t.camelToPascal=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}}));!function(e){e[e.CombinedTuning=1659456824]="CombinedTuning",e[e.DdsImage=3066607264]="DdsImage",e[e.DstImage=11720834]="DstImage",e[e.ObjectDefinition=3235601127]="ObjectDefinition",e[e.SimData=1415235194]="SimData",e[e.StringTable=570775514]="StringTable"}(rn||(rn={})),function(e){e.all=function(){return(0,an.getAllEnumValues)(e)}}(rn||(rn={}));var sn,on=rn,ln=Object.defineProperty({default:on},"__esModule",{value:!0});!function(e){e[e.Boolean=0]="Boolean",e[e.Character=1]="Character",e[e.Int8=2]="Int8",e[e.UInt8=3]="UInt8",e[e.Int16=4]="Int16",e[e.UInt16=5]="UInt16",e[e.Int32=6]="Int32",e[e.UInt32=7]="UInt32",e[e.Int64=8]="Int64",e[e.UInt64=9]="UInt64",e[e.Float=10]="Float",e[e.String=11]="String",e[e.HashedString=12]="HashedString",e[e.Object=13]="Object",e[e.Vector=14]="Vector",e[e.Float2=15]="Float2",e[e.Float3=16]="Float3",e[e.Float4=17]="Float4",e[e.TableSetReference=18]="TableSetReference",e[e.ResourceKey=19]="ResourceKey",e[e.LocalizationKey=20]="LocalizationKey",e[e.Variant=21]="Variant",e[e.Undefined=22]="Undefined"}(sn||(sn={})),function(e){e.getAlignment=function(t){switch(t){case e.Boolean:case e.Character:case e.Int8:case e.UInt8:return 1;case e.Int16:case e.UInt16:return 2;case e.Int32:case e.UInt32:case e.Float:case e.String:case e.HashedString:case e.Object:case e.Vector:case e.Float2:case e.Float3:case e.Float4:case e.LocalizationKey:case e.Variant:return 4;case e.Int64:case e.UInt64:case e.TableSetReference:case e.ResourceKey:return 8;default:return 1}},e.getBytes=function(t){switch(t){case e.Character:case e.Int8:case e.UInt8:return 1;case e.Int16:case e.UInt16:return 2;case e.Boolean:case e.Int32:case e.UInt32:case e.Float:case e.String:case e.Object:case e.LocalizationKey:return 4;case e.Int64:case e.UInt64:case e.HashedString:case e.Vector:case e.Float2:case e.TableSetReference:case e.Variant:return 8;case e.Float3:return 12;case e.Float4:case e.ResourceKey:return 16;default:throw new Error(`DataType ${t} not recognized.`)}},e.getSims4StudioName=function(t){switch(t){case e.Character:throw new Error("Character values cannot be represented in S4S XML. If you are reading this error, please let me know about it ASAP (https://github.com/sims4toolkit/models/issues).");case e.Float:return"Single";default:return e[t]}},e.parseSims4StudioName=function(t){return"Single"===t?e.Float:e[t]},e.isNumberInRange=function(t,n){if(null==t||Number.isNaN(t))return!1;switch(n){case e.Int8:return t>=-128&&t<=127;case e.UInt8:return t>=0&&t<=255;case e.Int16:return t>=-524288&&t<=32767;case e.UInt16:return t>=0&&t<=65535;case e.Int32:return t>=-34359738368&&t<=2147483647;case e.LocalizationKey:case e.UInt32:return t>=0&&t<=4294967295;case e.Float:return!0;default:throw new Error(`Type ${n} is not a SimDataNumber.`)}},e.isBigIntInRange=function(t,n){if(null==t)return!1;switch(n){case e.Int64:return t>=-0x8000000000000000n&&t<=0x7fffffffffffffffn;case e.TableSetReference:case e.UInt64:return t>=0n&&t<=0xffffffffffffffffn;default:throw new Error(`Type ${n} is not a SimDataBigInt.`)}},e.parseNumber=function(t,n){return"number"==typeof(t=t??0)?t:"string"==typeof t?n===e.Float?parseFloat(t):parseInt(t):NaN}}(sn||(sn={}));var cn,un=sn,fn=Object.defineProperty({default:un},"__esModule",{value:!0});!function(e){e.Unknown="Unknown",e.Null="Null",e.DATA="DATA",e.DDS="DDS",e.OBJDEF="OBJDEF",e.STBL="STBL",e.XML="XML"}(cn||(cn={}));var dn,hn=cn,pn=Object.defineProperty({default:hn},"__esModule",{value:!0});!function(e){e[e.Achievement=2018877086]="Achievement",e[e.AchievementCategory=609337601]="AchievementCategory",e[e.AchievementCollection=80917605]="AchievementCollection",e[e.Action=209137191]="Action",e[e.Animation=3994535597]="Animation",e[e.AspirationCategory=3813727192]="AspirationCategory",e[e.AspirationTrack=3223387309]="AspirationTrack",e[e.Aspiration=683034229]="Aspiration",e[e.AwayAction=2947394632]="AwayAction",e[e.Balloon=3966406598]="Balloon",e[e.Breed=874331941]="Breed",e[e.Broadcaster=3736796019]="Broadcaster",e[e.BucksPerk=3963461902]="BucksPerk",e[e.Buff=1612179606]="Buff",e[e.Business=1977092083]="Business",e[e.CasMenuItem=213537012]="CasMenuItem",e[e.CasMenu=2472182722]="CasMenu",e[e.CasPreferenceCategory=3456433227]="CasPreferenceCategory",e[e.CasPreferenceItem=3966303522]="CasPreferenceItem",e[e.CasStoriesAnswer=2163289367]="CasStoriesAnswer",e[e.CasStoriesQuestion=52718493]="CasStoriesQuestion",e[e.CasStoriesTraitChooser=2376930633]="CasStoriesTraitChooser",e[e.CallToAction=4114068192]="CallToAction",e[e.CareerEvent=2487354146]="CareerEvent",e[e.CareerGig=3436908253]="CareerGig",e[e.CareerLevel=745582072]="CareerLevel",e[e.CareerTrack=1221024995]="CareerTrack",e[e.Career=1939434475]="Career",e[e.Clan=3737052837]="Clan",e[e.ClanValue=2576273579]="ClanValue",e[e.ClubInteractionGroup=4195351092]="ClubInteractionGroup",e[e.ClubSeed=794407991]="ClubSeed",e[e.ConditionalLayer=2441338001]="ConditionalLayer",e[e.DetectiveClue=1400130038]="DetectiveClue",e[e.DevelopmentalMilestone=3307360148]="DevelopmentalMilestone",e[e.DramaNode=626258997]="DramaNode",e[e.Ensemble=3112702240]="Ensemble",e[e.GameRuleset=3779558936]="GameRuleset",e[e.Headline=4093714525]="Headline",e[e.HolidayDefinition=238120813]="HolidayDefinition",e[e.HolidayTradition=1070408838]="HolidayTradition",e[e.HouseholdMilestone=963831539]="HouseholdMilestone",e[e.Interaction=3900887599]="Interaction",e[e.LotDecorationPreset=3726571771]="LotDecorationPreset",e[e.LotDecoration=4264407467]="LotDecoration",e[e.LotTuning=3632270694]="LotTuning",e[e.Mood=3128647864]="Mood",e[e.Narrative=1047870521]="Narrative",e[e.NotebookEntry=2567109238]="NotebookEntry",e[e.ObjectPart=1900520272]="ObjectPart",e[e.ObjectState=1526890910]="ObjectState",e[e.Object=3055412916]="Object",e[e.Objective=6899006]="Objective",e[e.OpenStreetDirector=1265622724]="OpenStreetDirector",e[e.PieMenuCategory=65657188]="PieMenuCategory",e[e.Posture=2909789983]="Posture",e[e.RabbitHole=2976568058]="RabbitHole",e[e.Recipe=3952605219]="Recipe",e[e.Region=1374134669]="Region",e[e.RelationshipBit=151314192]="RelationshipBit",e[e.RelationshipLock=2922702451]="RelationshipLock",e[e.Reward=1873057832]="Reward",e[e.RoleState=239932923]="RoleState",e[e.Royalty=938421991]="Royalty",e[e.Season=3381515358]="Season",e[e.ServiceNpc=2629964386]="ServiceNpc",e[e.Sickness=3288062174]="Sickness",e[e.SimFilter=1846401695]="SimFilter",e[e.SimInfoFixup=3797424274]="SimInfoFixup",e[e.SimTemplate=212125579]="SimTemplate",e[e.SituationGoalSet=2649944562]="SituationGoalSet",e[e.SituationGoal=1502554343]="SituationGoal",e[e.SituationJob=2617738591]="SituationJob",e[e.Situation=4223905515]="Situation",e[e.SlotTypeSet=1058419973]="SlotTypeSet",e[e.SlotType=1772477092]="SlotType",e[e.Snippet=2113017500]="Snippet",e[e.SocialGroup=776446212]="SocialGroup",e[e.Spell=523506649]="Spell",e[e.Scommodity=1359443523]="Scommodity",e[e.Statistic=865846717]="Statistic",e[e.Strategy=1646578134]="Strategy",e[e.Street=4142189312]="Street",e[e.Subroot=3086978965]="Subroot",e[e.TagSet=1228493570]="TagSet",e[e.TemplateChooser=1220728301]="TemplateChooser",e[e.TestBasedScore=1332976878]="TestBasedScore",e[e.Topic=1938713686]="Topic",e[e.Trait=3412057543]="Trait",e[e.Tuning=62078431]="Tuning",e[e.TutorialTip=2410930353]="TutorialTip",e[e.Tutorial=3762955427]="Tutorial",e[e.UniversityCourseData=689745854]="UniversityCourseData",e[e.UniversityMajor=660124491]="UniversityMajor",e[e.University=3646477745]="University",e[e.UserInterfaceInfo=3099531875]="UserInterfaceInfo",e[e.Venue=3871070174]="Venue",e[e.WalkBy=1070998590]="WalkBy",e[e.WeatherEvent=1476851130]="WeatherEvent",e[e.WeatherForecast=1233072753]="WeatherForecast",e[e.Whim=1956251190]="Whim",e[e.ZoneDirector=4183335058]="ZoneDirector",e[e.ZoneModifier=1008568217]="ZoneModifier"}(dn||(dn={})),function(e){e.all=function(){return(0,an.getAllEnumValues)(e)},e.parseAttr=function(t){if("relbit"===t)return e.RelationshipBit;{const n=(0,an.snakeToPascal)(t);return e[n]??e.Tuning}},e.getAttr=function(t){switch(t){case e.Tuning:return null;case e.RelationshipBit:return"relbit";default:return t in e?(0,an.pascalToSnake)(e[t]):null}}}(dn||(dn={}));var mn=dn,gn=Object.defineProperty({default:mn},"__esModule",{value:!0});const vn=(Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(gn);var yn;!function(e){e[e.Achievement=5611238]="Achievement",e[e.AchievementCategory=5357861]="AchievementCategory",e[e.AchievementCollection=13808737]="AchievementCollection",e[e.Aspiration=11945565]="Aspiration",e[e.AspirationCategory=5299003]="AspirationCategory",e[e.AspirationTrack=2161773]="AspirationTrack",e[e.Automation=13722210]="Automation",e[e.Breed=1916689]="Breed",e[e.Buff=1566966]="Buff",e[e.BuildBuy=246679]="BuildBuy",e[e.Business=14157702]="Business",e[e.Career=10054552]="Career",e[e.CareerGig=14355985]="CareerGig",e[e.CareerLevel=7384532]="CareerLevel",e[e.CareerTrack=13065387]="CareerTrack",e[e.CasMenu=5931857]="CasMenu",e[e.CasMenuItem=12210424]="CasMenuItem",e[e.CasOccultSkintone=12807221]="CasOccultSkintone",e[e.CasPreferenceCategory=326789]="CasPreferenceCategory",e[e.CasPreferenceItem=6880718]="CasPreferenceItem",e[e.CasStoriesAnswer=15805847]="CasStoriesAnswer",e[e.CasStoriesQuestion=2386846]="CasStoriesQuestion",e[e.CasStoriesTraitChooser=11343300]="CasStoriesTraitChooser",e[e.Clan=12510843]="Clan",e[e.ClanValue=9359410]="ClanValue",e[e.ClientCasCameraTuning=5955271]="ClientCasCameraTuning",e[e.ClientCasLighting=669200]="ClientCasLighting",e[e.ClientCasModifierTuning=11272143]="ClientCasModifierTuning",e[e.ClientCasOccultTuning=9923016]="ClientCasOccultTuning",e[e.ClientCasThumbnailCamera=4810306]="ClientCasThumbnailCamera",e[e.ClientCasThumbnailPartTuning=13750274]="ClientCasThumbnailPartTuning",e[e.ClientCasTuning=4936293]="ClientCasTuning",e[e.ClientRegionSortTuning=5753018]="ClientRegionSortTuning",e[e.ClientTagCategoriesMetadata=1233988]="ClientTagCategoriesMetadata",e[e.ClientTags=12159328]="ClientTags",e[e.ClientTagsMapping=359697]="ClientTagsMapping",e[e.ClientTagsTraitGroupMetadata=4080149]="ClientTagsTraitGroupMetadata",e[e.ClientThumbnailPoses=12745782]="ClientThumbnailPoses",e[e.ClientTutorial=7538507]="ClientTutorial",e[e.ClubInteractionGroup=1047246]="ClubInteractionGroup",e[e.ClubSeed=5878808]="ClubSeed",e[e.DevelopmentalMilestone=2248529]="DevelopmentalMilestone",e[e.DramaNode=5501968]="DramaNode",e[e.Headline=73897]="Headline",e[e.HolidayTradition=13444281]="HolidayTradition",e[e.HouseholdMilestone=7530186]="HouseholdMilestone",e[e.LotDecorationPreset=2029605]="LotDecorationPreset",e[e.Module=7119620]="Module",e[e.Mood=8085506]="Mood",e[e.NativeBuildBuy=9759150]="NativeBuildBuy",e[e.NativeSeasonsWeather=3824229]="NativeSeasonsWeather",e[e.Objective=6899006]="Objective",e[e.PieMenuCategory=15325543]="PieMenuCategory",e[e.Recipe=9959624]="Recipe",e[e.Region=15180252]="Region",e[e.RelationshipBit=5110660]="RelationshipBit",e[e.RendererCas=2709620]="RendererCas",e[e.RendererHsvTweakerSettings=16552157]="RendererHsvTweakerSettings",e[e.RendererMinspec=2069982]="RendererMinspec",e[e.Reward=10786887]="Reward",e[e.Season=9294999]="Season",e[e.SituationJob=492995]="SituationJob",e[e.SlotTypeSet=1455418]="SlotTypeSet",e[e.Snippet=15865569]="Snippet",e[e.Spell=3412934]="Spell",e[e.Statistic=10208654]="Statistic",e[e.Street=14994422]="Street",e[e.Subroot=16748322]="Subroot",e[e.Trait=6282508]="Trait",e[e.Tutorial=4858947]="Tutorial",e[e.TutorialTip=11788350]="TutorialTip",e[e.University=5821800]="University",e[e.UniversityCourseData=1879959]="UniversityCourseData",e[e.UniversityMajor=5813100]="UniversityMajor",e[e.UserInterfaceInfo=12524251]="UserInterfaceInfo",e[e.Venue=12310328]="Venue",e[e.VideoPlaylist=12535179]="VideoPlaylist",e[e.WeatherForecast=8335928]="WeatherForecast",e[e.ZoneModifier=1935269]="ZoneModifier"}(yn||(yn={})),function(e){e.all=function(){return(0,an.getAllEnumValues)(e)},e.getForTuning=function(t){return e[vn.default[t]]}}(yn||(yn={}));var wn,bn=yn,$n=Object.defineProperty({default:bn},"__esModule",{value:!0});!function(e){e[e.English=0]="English",e[e.ChineseSimplified=1]="ChineseSimplified",e[e.ChineseTraditional=2]="ChineseTraditional",e[e.Czech=3]="Czech",e[e.Danish=4]="Danish",e[e.Dutch=5]="Dutch",e[e.Finnish=6]="Finnish",e[e.French=7]="French",e[e.German=8]="German",e[e.Italian=11]="Italian",e[e.Japanese=12]="Japanese",e[e.Korean=13]="Korean",e[e.Norwegian=14]="Norwegian",e[e.Polish=15]="Polish",e[e.Portuguese=17]="Portuguese",e[e.Russian=18]="Russian",e[e.Spanish=19]="Spanish",e[e.Swedish=21]="Swedish"}(wn||(wn={})),function(e){e.all=function(){return(0,an.getAllEnumValues)(e)},e.setHighByte=function(t,n){return e.getInstanceBase(n)|BigInt(t)<<56n},e.getLocale=function(e){return Number(e>>56n)},e.getInstanceBase=function(e){return 0xffffffffffffffn&e},e.getLocaleCode=function(t){switch(t){case e.English:return"ENG_US";case e.ChineseSimplified:return"CHS_CN";case e.ChineseTraditional:return"CHT_CN";case e.Czech:return"CZE_CZ";case e.Danish:return"DAN_DK";case e.Dutch:return"DUT_NL";case e.Finnish:return"FIN_FI";case e.French:return"FRE_FR";case e.German:return"GER_DE";case e.Italian:return"ITA_IT";case e.Japanese:return"JPN_JP";case e.Korean:return"KOR_KR";case e.Norwegian:return"NOR_NO";case e.Polish:return"POL_PL";case e.Portuguese:return"POR_BR";case e.Russian:return"RUS_RU";case e.Spanish:return"SPA_EA";case e.Swedish:return"SWE_SE";default:return}}}(wn||(wn={}));var _n=wn,kn=Object.defineProperty({default:_n},"__esModule",{value:!0}),xn=zt((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectDefinitionType=void 0,(n=t.ObjectDefinitionType||(t.ObjectDefinitionType={}))[n.Components=3873710587]="Components",n[n.EnvironmentScoreEmotionTags=561163966]="EnvironmentScoreEmotionTags",n[n.EnvironmentScoreEmotionTags_32=558077772]="EnvironmentScoreEmotionTags_32",n[n.EnvironmentScores=3704652692]="EnvironmentScores",n[n.Footprints=1819507416]="Footprints",n[n.Icons=3403602056]="Icons",n[n.IsBaby=2934340124]="IsBaby",n[n.MaterialVariant=3973425503]="MaterialVariant",n[n.Models=2367728838]="Models",n[n.Name=3891296134]="Name",n[n.NegativeEnvironmentScore=1157395730]="NegativeEnvironmentScore",n[n.PositiveEnvironmentScore=1916190442]="PositiveEnvironmentScore",n[n.Rigs=3792088655]="Rigs",n[n.SimoleonPrice=3841260196]="SimoleonPrice",n[n.Slots=2324017139]="Slots",n[n.ThumbnailGeometryState=1110702240]="ThumbnailGeometryState",n[n.Tuning=2031068348]="Tuning",n[n.TuningId=3113485211]="TuningId",n[n.Unknown1=2894994368]="Unknown1",n[n.Unknown2=3963032294]="Unknown2",n[n.Unknown3=1391981756]="Unknown3",n[n.Unknown4=4086524560]="Unknown4"})),Sn=zt((function(e,t){var n=Bt&&Bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectDefinitionType=t.TuningResourceType=t.StringTableLocale=t.SimDataGroup=t.EncodingType=t.DataType=t.BinaryResourceType=void 0;const r=n(ln);t.BinaryResourceType=r.default;const i=n(fn);t.DataType=i.default;const a=n(pn);t.EncodingType=a.default;const s=n($n);t.SimDataGroup=s.default;const o=n(kn);t.StringTableLocale=o.default;const l=n(gn);t.TuningResourceType=l.default,Object.defineProperty(t,"ObjectDefinitionType",{enumerable:!0,get:function(){return xn.ObjectDefinitionType}})}));function Cn(e){let t,n,r,i,a,o,l,c,u,d,g,v,y,w;const b=e[5].default,$=f(b,e,e[4],null);return{c(){t=E("div"),n=E("div"),r=E("div"),i=E("p"),a=A(e[0]),o=I(),l=E("p"),l.textContent="(Draggable)",c=I(),u=E("button"),u.innerHTML='Close',d=I(),g=E("div"),$&&$.c(),z(i,"class","my-0 small-title unselectable-text"),z(l,"class","my-0 subtle-text"),z(r,"class","flex-center-v flex-gap-small"),z(u,"class","button-wrapper"),z(n,"class","movable-window-header flex-space-between flex-center-v p-half grabbable svelte-hqowq0"),z(g,"class","p-half window-content svelte-hqowq0"),z(t,"class","movable-window drop-shadow svelte-hqowq0")},m(f,h){C(f,t,h),k(t,n),k(n,r),k(r,i),k(i,a),k(r,o),k(r,l),k(n,c),k(n,u),e[6](n),k(t,d),k(t,g),$&&$.m(g,null),e[7](t),v=!0,y||(w=B(u,"click",(function(){s(e[1])&&e[1].apply(this,arguments)})),y=!0)},p(t,[n]){e=t,(!v||1&n)&&R(a,e[0]),$&&$.p&&(!v||16&n)&&p($,b,e,e[4],v?h(b,e[4],n,null):m(e[4]),null)},i(e){v||(ve($,e),v=!0)},o(e){ye($,e),v=!1},d(n){n&&T(t),e[6](null),$&&$.d(n),e[7](null),y=!1,w()}}}function Tn(e,t,n){let r,i,{$$slots:a={},$$scope:s}=t,{title:o}=t,{onClose:l}=t,c=0;const u=Qe.subscribe((e=>{c=e}));return G((()=>{if(function(){let e=0,t=0,a=0,s=0;function o(i){(i=i||window.event).preventDefault(),e=a-i.clientX,t=s-i.clientY,a=i.clientX,s=i.clientY,n(2,r.style.top=r.offsetTop-t+"px",r),n(2,r.style.left=r.offsetLeft-e+"px",r)}function l(){document.onmouseup=null,document.onmousemove=null,r.offsetTop<0?n(2,r.style.top="10px",r):r.offsetTop>window.innerHeight-r.offsetHeight-10&&n(2,r.style.top=window.innerHeight-r.offsetHeight-10+"px",r),r.offsetLeft<0?n(2,r.style.left="10px",r):r.offsetLeft>window.innerWidth-r.offsetWidth-10&&n(2,r.style.left=window.innerWidth-r.offsetWidth-10+"px",r)}n(3,i.onmousedown=function(e){(e=e||window.event).preventDefault(),a=e.clientX,s=e.clientY,document.onmouseup=l,document.onmousemove=o},i)}(),c>0){let e=40+r.offsetWidth;e*=c,window.innerWidth>=e+40+r.offsetWidth&&n(2,r.style.right=e+"px",r),n(2,r.style.zIndex=(1024+c).toString(),r)}Qe.set(c+1)})),q((()=>{u(),Qe.set(c-1)})),e.$$set=e=>{"title"in e&&n(0,o=e.title),"onClose"in e&&n(1,l=e.onClose),"$$scope"in e&&n(4,s=e.$$scope)},[o,l,r,i,s,a,function(e){Y[e?"unshift":"push"]((()=>{i=e,n(3,i)}))},function(e){Y[e?"unshift":"push"]((()=>{r=e,n(2,r)}))}]}class En extends De{constructor(e){super(),Ie(this,e,Tn,Cn,o,{title:0,onClose:1})}}function An(e){let t,n,r;return{c(){t=E("div"),n=E("label"),r=A(e[1]),z(n,"class","small-title mb-half svelte-8ce34a"),z(n,"for",e[2]),z(t,"class","flex-center-v")},m(e,i){C(e,t,i),k(t,n),k(n,r)},p(e,t){2&t&&R(r,e[1]),4&t&&z(n,"for",e[2])},d(e){e&&T(t)}}}function In(t){let n,r,i,a,s,o=Boolean(t[1]),l=o&&An(t);return{c(){n=E("div"),l&&l.c(),r=I(),i=E("input"),z(i,"id",t[2]),z(i,"name",t[2]),z(i,"type","text"),z(i,"class","input-height svelte-8ce34a"),z(i,"placeholder",t[3]),z(i,"autocomplete","off"),L(i,"monospace",t[4]),L(i,"w-100",t[5]),L(i,"invalid",!t[6]),z(n,"class","text-input svelte-8ce34a"),L(n,"fill-width",t[5])},m(e,o){C(e,n,o),l&&l.m(n,null),k(n,r),k(n,i),t[9](i),O(i,t[0]),a||(s=B(i,"input",t[10]),a=!0)},p(e,[t]){2&t&&(o=Boolean(e[1])),o?l?l.p(e,t):(l=An(e),l.c(),l.m(n,r)):l&&(l.d(1),l=null),4&t&&z(i,"id",e[2]),4&t&&z(i,"name",e[2]),8&t&&z(i,"placeholder",e[3]),1&t&&i.value!==e[0]&&O(i,e[0]),16&t&&L(i,"monospace",e[4]),32&t&&L(i,"w-100",e[5]),64&t&&L(i,"invalid",!e[6]),32&t&&L(n,"fill-width",e[5])},i:e,o:e,d(e){e&&T(n),l&&l.d(),t[9](null),a=!1,s()}}}function Dn(e,t,n){let r,{label:i}=t,{name:a}=t,{placeholder:s}=t,{monospace:o=!1}=t,{value:l=""}=t,{fillWidth:c=!1}=t,{focusOnMount:u=!1}=t,{isValid:f=!0}=t;return G((()=>{u&&r.focus()})),e.$$set=e=>{"label"in e&&n(1,i=e.label),"name"in e&&n(2,a=e.name),"placeholder"in e&&n(3,s=e.placeholder),"monospace"in e&&n(4,o=e.monospace),"value"in e&&n(0,l=e.value),"fillWidth"in e&&n(5,c=e.fillWidth),"focusOnMount"in e&&n(8,u=e.focusOnMount),"isValid"in e&&n(6,f=e.isValid)},[l,i,a,s,o,c,f,r,u,function(e){Y[e?"unshift":"push"]((()=>{r=e,n(7,r)}))},function(){l=this.value,n(0,l)}]}class Bn extends De{constructor(e){super(),Ie(this,e,Dn,In,o,{label:1,name:2,placeholder:3,monospace:4,value:0,fillWidth:5,focusOnMount:8,isValid:6})}}function zn(e,t,n){const r=e.slice();return r[8]=t[n],r[10]=n,r}function Rn(e){let t,n;return{c(){t=E("label"),n=A(e[1]),z(t,"class","small-title mb-half svelte-1kanbjl"),z(t,"for",e[2]),L(t,"small",e[4])},m(e,r){C(e,t,r),k(t,n)},p(e,r){2&r&&R(n,e[1]),4&r&&z(t,"for",e[2]),16&r&&L(t,"small",e[4])},d(e){e&&T(t)}}}function On(e,t){let n,r,i,a,s=t[8].text+"";return{key:e,first:null,c(){n=E("option"),r=A(s),i=I(),n.__value=a=t[8].value,n.value=n.__value,z(n,"class","svelte-1kanbjl"),this.first=n},m(e,t){C(e,n,t),k(n,r),k(n,i)},p(e,i){t=e,64&i&&s!==(s=t[8].text+"")&&R(r,s),64&i&&a!==(a=t[8].value)&&(n.__value=a,n.value=n.__value)},d(e){e&&T(n)}}}function Nn(t){let n,r,i,a,s,o=Boolean(t[1]),l=[],c=new Map,u=o&&Rn(t),f=t[6];const d=e=>e[10];for(let e=0;et[7].call(i))),L(i,"w-100",t[3]),L(i,"small",t[4]),z(n,"class","select-with-label svelte-1kanbjl"),L(n,"w-100",t[3])},m(e,o){C(e,n,o),u&&u.m(n,null),k(n,r),k(n,i);for(let e=0;e{"label"in e&&n(1,r=e.label),"name"in e&&n(2,i=e.name),"selected"in e&&n(0,a=e.selected),"fillWidth"in e&&n(3,s=e.fillWidth),"small"in e&&n(4,o=e.small),"disabled"in e&&n(5,l=e.disabled),"options"in e&&n(6,c=e.options)},[a,r,i,s,o,l,c,function(){a=function(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}(this),n(0,a),n(6,c)}]}class Fn extends De{constructor(e){super(),Ie(this,e,Ln,Nn,o,{label:1,name:2,selected:0,fillWidth:3,small:4,disabled:5,options:6})}}function Pn(e){let t,n,r;return{c(){t=E("input"),z(t,"type","checkbox"),t.disabled=e[3],z(t,"class","svelte-6qqi0r")},m(i,a){C(i,t,a),t.checked=e[0],n||(r=B(t,"change",e[5]),n=!0)},p(e,n){8&n&&(t.disabled=e[3]),1&n&&(t.checked=e[0])},d(e){e&&T(t),n=!1,r()}}}function Mn(e){let t,n,r;return{c(){t=E("input"),z(t,"type","checkbox"),t.disabled=e[3],z(t,"class","svelte-6qqi0r")},m(i,a){C(i,t,a),t.checked=e[1].checked,n||(r=B(t,"change",e[4]),n=!0)},p(e,n){8&n&&(t.disabled=e[3]),2&n&&(t.checked=e[1].checked)},d(e){e&&T(t),n=!1,r()}}}function Un(t){let n,r,i,a;function s(e,t){return e[1]?Mn:Pn}let o=s(t),l=o(t);return{c(){n=E("div"),r=E("label"),l.c(),i=I(),a=A(t[2]),z(r,"disabled",t[3]),z(r,"class","svelte-6qqi0r"),z(n,"class","checkbox svelte-6qqi0r")},m(e,t){C(e,n,t),k(n,r),l.m(r,null),k(r,i),k(r,a)},p(e,[t]){o===(o=s(e))&&l?l.p(e,t):(l.d(1),l=o(e),l&&(l.c(),l.m(r,i))),4&t&&R(a,e[2]),8&t&&z(r,"disabled",e[3])},i:e,o:e,d(e){e&&T(n),l.d()}}}function jn(e,t,n){let{label:r}=t,{disabled:i=!1}=t,{checked:a}=t,{checkable:s}=t;return e.$$set=e=>{"label"in e&&n(2,r=e.label),"disabled"in e&&n(3,i=e.disabled),"checked"in e&&n(0,a=e.checked),"checkable"in e&&n(1,s=e.checkable)},[a,s,r,i,function(){s.checked=this.checked,n(1,s)},function(){a=this.checked,n(0,a)}]}class Wn extends De{constructor(e){super(),Ie(this,e,jn,Un,o,{label:2,disabled:3,checked:0,checkable:1})}}function Hn(e){let t,n,r,i,a;function s(t){e[9](t)}let o={label:"simdata group",name:"simdata-group-filter",options:e[4],fillWidth:!0};return void 0!==e[0].simDataGroup&&(o.selected=e[0].simDataGroup),t=new Fn({props:o}),Y.push((()=>Ce(t,"selected",s))),{c(){Te(t.$$.fragment),r=I(),i=E("br")},m(e,n){Ee(t,e,n),C(e,r,n),C(e,i,n),a=!0},p(e,r){const i={};!n&&1&r&&(n=!0,i.selected=e[0].simDataGroup,ae((()=>n=!1))),t.$set(i)},i(e){a||(ve(t.$$.fragment,e),a=!0)},o(e){ye(t.$$.fragment,e),a=!1},d(e){Ae(t,e),e&&T(r),e&&T(i)}}}function Kn(e){let t,n,r;function i(t){e[11](t)}let a={label:"filename substring",name:"filename-filter",placeholder:"Filename",fillWidth:!0};return void 0!==e[0].filename&&(a.value=e[0].filename),t=new Bn({props:a}),Y.push((()=>Ce(t,"value",i))),{c(){Te(t.$$.fragment)},m(e,n){Ee(t,e,n),r=!0},p(e,r){const i={};!n&&1&r&&(n=!0,i.value=e[0].filename,ae((()=>n=!1))),t.$set(i)},i(e){r||(ve(t.$$.fragment,e),r=!0)},o(e){ye(t.$$.fragment,e),r=!1},d(e){Ae(t,e)}}}function Zn(e){let t,n,r;function i(t){e[10](t)}let a={label:"stbl locale",name:"stbl-locale-filter",options:e[5],fillWidth:!0};return void 0!==e[0].stblLocale&&(a.selected=e[0].stblLocale),t=new Fn({props:a}),Y.push((()=>Ce(t,"selected",i))),{c(){Te(t.$$.fragment)},m(e,n){Ee(t,e,n),r=!0},p(e,r){const i={};!n&&1&r&&(n=!0,i.selected=e[0].stblLocale,ae((()=>n=!1))),t.$set(i)},i(e){r||(ve(t.$$.fragment,e),r=!0)},o(e){ye(t.$$.fragment,e),r=!1},d(e){Ae(t,e)}}}function Gn(e){let t,n,r,i,a,s,o,l,c,u,f,d,h,p,m,g,v,y,w,b,$,_,x,S,A;function D(t){e[6](t)}let B={label:"Show unsupported files"};function z(t){e[7](t)}void 0!==e[0].showUnsupported&&(B.checked=e[0].showUnsupported),n=new Wn({props:B}),Y.push((()=>Ce(n,"checked",D)));let R={label:"Show non-English STBLs"};function O(t){e[8](t)}void 0!==e[0].showNonEnStbls&&(R.checked=e[0].showNonEnStbls),o=new Wn({props:R}),Y.push((()=>Ce(o,"checked",z)));let N={label:"file type",name:"resource-type-filter",options:e[3],fillWidth:!0};void 0!==e[0].fileType&&(N.selected=e[0].fileType),d=new Fn({props:N}),Y.push((()=>Ce(d,"selected",O)));let L=e[0].fileType===e[2].SimData&&Hn(e);const F=[Zn,Kn],P=[];function M(e,t){return e[0].fileType===e[2].StringTable?0:1}function U(t){e[12](t)}y=M(e),w=P[y]=F[y](e);let j={label:"instance substring",name:"instance-filter",placeholder:"Instance",fillWidth:!0};return void 0!==e[0].instanceHex&&(j.value=e[0].instanceHex),x=new Bn({props:j}),Y.push((()=>Ce(x,"value",U))),{c(){t=E("div"),Te(n.$$.fragment),i=I(),a=E("br"),s=I(),Te(o.$$.fragment),c=I(),u=E("br"),f=I(),Te(d.$$.fragment),p=I(),m=E("br"),g=I(),L&&L.c(),v=I(),w.c(),b=I(),$=E("br"),_=I(),Te(x.$$.fragment)},m(e,r){C(e,t,r),Ee(n,t,null),k(t,i),k(t,a),k(t,s),Ee(o,t,null),k(t,c),k(t,u),k(t,f),Ee(d,t,null),k(t,p),k(t,m),k(t,g),L&&L.m(t,null),k(t,v),P[y].m(t,null),k(t,b),k(t,$),k(t,_),Ee(x,t,null),A=!0},p(e,i){const a={};!r&&1&i&&(r=!0,a.checked=e[0].showUnsupported,ae((()=>r=!1))),n.$set(a);const s={};!l&&1&i&&(l=!0,s.checked=e[0].showNonEnStbls,ae((()=>l=!1))),o.$set(s);const c={};!h&&1&i&&(h=!0,c.selected=e[0].fileType,ae((()=>h=!1))),d.$set(c),e[0].fileType===e[2].SimData?L?(L.p(e,i),1&i&&ve(L,1)):(L=Hn(e),L.c(),ve(L,1),L.m(t,v)):L&&(me(),ye(L,1,1,(()=>{L=null})),ge());let u=y;y=M(e),y===u?P[y].p(e,i):(me(),ye(P[u],1,1,(()=>{P[u]=null})),ge(),w=P[y],w?w.p(e,i):(w=P[y]=F[y](e),w.c()),ve(w,1),w.m(t,b));const f={};!S&&1&i&&(S=!0,f.value=e[0].instanceHex,ae((()=>S=!1))),x.$set(f)},i(e){A||(ve(n.$$.fragment,e),ve(o.$$.fragment,e),ve(d.$$.fragment,e),ve(L),ve(w),ve(x.$$.fragment,e),A=!0)},o(e){ye(n.$$.fragment,e),ye(o.$$.fragment,e),ye(d.$$.fragment,e),ye(L),ye(w),ye(x.$$.fragment,e),A=!1},d(e){e&&T(t),Ae(n),Ae(o),Ae(d),L&&L.d(),P[y].d(),Ae(x)}}}function qn(e){let t,n;return t=new En({props:{title:"Filter",onClose:e[1],$$slots:{default:[Gn]},$$scope:{ctx:e}}}),{c(){Te(t.$$.fragment)},m(e,r){Ee(t,e,r),n=!0},p(e,[n]){const r={};2&n&&(r.onClose=e[1]),32769&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(ve(t.$$.fragment,e),n=!0)},o(e){ye(t.$$.fragment,e),n=!1},d(e){Ae(t,e)}}}function Xn(e,t,n){const{BinaryResourceType:r,TuningResourceType:i,SimDataGroup:a}=window.S4TK.enums;let{onClose:s}=t,{filterSettings:o}=t,l=[{value:0,text:"All"},...r.all().map((e=>({value:e,text:r[e]}))),...i.all().map((e=>({value:e,text:i[e]})))].sort(((e,t)=>0===t.value||e.text>t.text?1:e.text({value:e,text:a[e]})))],u=[{value:null,text:"All"},...Sn.StringTableLocale.all().map((e=>({value:e,text:Sn.StringTableLocale[e]})))].sort(((e,t)=>null===t.value||e.text>t.text?1:e.text{"onClose"in e&&n(1,s=e.onClose),"filterSettings"in e&&n(0,o=e.filterSettings)},e.$$.update=()=>{1&e.$$.dirty&&o.fileType===r.StringTable&&n(0,o.showNonEnStbls=!0,o)},[o,s,r,l,c,u,function(t){e.$$.not_equal(o.showUnsupported,t)&&(o.showUnsupported=t,n(0,o))},function(t){e.$$.not_equal(o.showNonEnStbls,t)&&(o.showNonEnStbls=t,n(0,o))},function(t){e.$$.not_equal(o.fileType,t)&&(o.fileType=t,n(0,o))},function(t){e.$$.not_equal(o.simDataGroup,t)&&(o.simDataGroup=t,n(0,o))},function(t){e.$$.not_equal(o.stblLocale,t)&&(o.stblLocale=t,n(0,o))},function(t){e.$$.not_equal(o.filename,t)&&(o.filename=t,n(0,o))},function(t){e.$$.not_equal(o.instanceHex,t)&&(o.instanceHex=t,n(0,o))}]}class Vn extends De{constructor(e){super(),Ie(this,e,Xn,qn,o,{onClose:1,filterSettings:0})}} /*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files diff --git a/build/bundle.js.map b/build/bundle.js.map index 57ae252..0b0ed74 100644 --- a/build/bundle.js.map +++ b/build/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/svelte/store/index.mjs","../../node_modules/svelte-spa-router/Router.svelte","../../node_modules/regexparam/dist/index.mjs","../../src/typescript/storage.ts","../../src/typescript/doc-attrs.ts","../../src/typescript/stores.ts","../../src/components/shared/ThemeToggler.svelte","../../src/components/Navbar.svelte","../../src/components/layout/ContentArea.svelte","../../src/components/Footer.svelte","../../src/components/shared/SectionHeader.svelte","../../src/components/pages/home/ToolView.svelte","../../src/components/pages/home/HomePage.svelte","../../src/components/shared/GradientHeader.svelte","../../src/components/pages/NotFoundPage.svelte","../../src/components/pages/help/HelpPage.svelte","../../node_modules/@s4tk/hashing/formatting.js","../../src/typescript/helpers.ts","../../src/components/pages/viewer/PackageEntryRow.svelte","../../node_modules/@s4tk/models/lib/enums/binary-resources.js","../../node_modules/@s4tk/models/lib/common/helpers.js","../../node_modules/@s4tk/models/lib/enums/data-type.js","../../node_modules/@s4tk/models/lib/enums/encoding-type.js","../../node_modules/@s4tk/models/lib/enums/tuning-resources.js","../../node_modules/@s4tk/models/lib/enums/simdata-groups.js","../../node_modules/@s4tk/models/lib/enums/stbl-locales.js","../../node_modules/@s4tk/models/lib/resources/object-definition/types.js","../../node_modules/@s4tk/models/enums.js","../../src/components/layout/MovableWindow.svelte","../../src/components/shared/TextInput.svelte","../../src/components/shared/Select.svelte","../../src/components/shared/Checkbox.svelte","../../src/components/pages/viewer/FilterWindow.svelte","../../node_modules/jszip/dist/jszip.min.js","../../node_modules/file-saver/dist/FileSaver.min.js","../../src/components/pages/viewer/EntriesDownloadBar.svelte","../../src/components/shared/Button.svelte","../../src/components/pages/viewer/ViewOptionsWindow.svelte","../../src/components/pages/viewer/EntriesMenu.svelte","../../src/components/layout/ResizableSplitView.svelte","../../src/components/layout/PrismWrapper.svelte","../../src/components/pages/viewer/EntryView.svelte","../../src/components/pages/viewer/PkgViewer.svelte","../../node_modules/svelte/transition/index.mjs","../../src/components/shared/FileInput.svelte","../../src/components/pages/viewer/PkgViewerUploaded.svelte","../../src/config.ts","../../src/components/pages/viewer/PkgViewerDiscord.svelte","../../src/components/pages/viewer/HtmlReplacementView.svelte","../../src/components/pages/viewer/TextViewerDiscord.svelte","../../src/components/pages/viewer/DiscordDelegate.svelte","../../src/typescript/keybindings.ts","../../src/components/shared/StickyCloseButton.svelte","../../src/components/layout/BlurOverlay.svelte","../../src/components/shared/IconButton.svelte","../../src/components/shared/InlineImage.svelte","../../src/components/pages/generator/AddOnManualKey.svelte","../../src/components/pages/generator/AddOnSimData.svelte","../../src/components/pages/generator/AddOnTemplateId.svelte","../../src/components/pages/generator/GeneratedFileEntry.svelte","../../src/components/pages/generator/TemplatesEditor.svelte","../../src/components/pages/generator/PkgBuilderView.svelte","../../src/components/shared/IconTextButton.svelte","../../src/typescript/generator.ts","../../src/components/pages/generator/PkgGeneratorPage.svelte","../../src/App.svelte","../../src/main.ts"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not \n let children = target.childNodes;\n // If target is , there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes, is_svg) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration(undefined, is_svg);\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes, is_svg);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value === null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, cancelable, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(is_svg = false) {\n this.is_svg = false;\n this.is_svg = is_svg;\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n if (this.is_svg)\n this.e = svg_element(target.nodeName);\n else\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes, is_svg = false) {\n super(is_svg);\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { stylesheet } = info;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n info.rules = {};\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail, { cancelable = false } = {}) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail, { cancelable });\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n return !event.defaultPrevented;\n }\n return true;\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n return context;\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n else if (callback) {\n callback();\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;\nfunction is_void(name) {\n return void_element_names.test(name) || name.toLowerCase() === '!doctype';\n}\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst ATTR_REGEX = /[&\"]/g;\nconst CONTENT_REGEX = /[&<]/g;\n/**\n * Note: this method is performance sensitive and has been optimized\n * https://github.com/sveltejs/svelte/pull/5701\n */\nfunction escape(value, is_attr = false) {\n const str = String(value);\n const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n pattern.lastIndex = 0;\n let escaped = '';\n let last = 0;\n while (pattern.test(str)) {\n const i = pattern.lastIndex - 1;\n const ch = str[i];\n escaped += str.substring(last, i) + (ch === '&' ? '&' : (ch === '\"' ? '"' : '<'));\n last = i + 1;\n }\n return escaped + str.substring(last);\n}\nfunction escape_attribute_value(value) {\n // keep booleans, null, and undefined for the sake of `spread`\n const should_escape = typeof value === 'string' || (value && typeof value === 'object');\n return should_escape ? escape(value, true) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n const assignment = (boolean && value === true) ? '' : `=\"${escape(value, true)}\"`;\n return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${style_object[key]};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.49.0' }, detail), { bubbles: true }));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nfunction validate_dynamic_element(tag) {\n const is_string = typeof tag === 'string';\n if (tag && !is_string) {\n throw new Error(' expects \"this\" attribute to be a string.');\n }\n}\nfunction validate_void_dynamic_element(tag) {\n if (tag && is_void(tag)) {\n throw new Error(` is self-closing and cannot have content.`);\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, is_void, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, validate_void_dynamic_element, xlink_attr };\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","\n\n{#if componentParams}\n \n{:else}\n \n{/if}\n\n\n","export function parse(str, loose) {\n\tif (str instanceof RegExp) return { keys:false, pattern:str };\n\tvar c, o, tmp, ext, keys=[], pattern='', arr = str.split('/');\n\tarr[0] || arr.shift();\n\n\twhile (tmp = arr.shift()) {\n\t\tc = tmp[0];\n\t\tif (c === '*') {\n\t\t\tkeys.push('wild');\n\t\t\tpattern += '/(.*)';\n\t\t} else if (c === ':') {\n\t\t\to = tmp.indexOf('?', 1);\n\t\t\text = tmp.indexOf('.', 1);\n\t\t\tkeys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) );\n\t\t\tpattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)';\n\t\t\tif (!!~ext) pattern += (!!~o ? '?' : '') + '\\\\' + tmp.substring(ext);\n\t\t} else {\n\t\t\tpattern += '/' + tmp;\n\t\t}\n\t}\n\n\treturn {\n\t\tkeys: keys,\n\t\tpattern: new RegExp('^' + pattern + (loose ? '(?=$|\\/)' : '\\/?$'), 'i')\n\t};\n}\n\nvar RGX = /*#__PURE__*/ /(\\/|^)([:*][^/]*?)(\\?)?(?=[/.]|$)/g;\n\n// error if key missing?\nexport function inject(route, values) {\n\treturn route.replace(RGX, (x, lead, key, optional) => {\n\t\tx = values[key=='*' ? 'wild' : key.substring(1)];\n\t\treturn x ? '/'+x : (optional || key=='*') ? '' : '/' + key;\n\t});\n}\n","import { toggleLightTheme } from \"./doc-attrs\";\n//#region Key Generators\nconst settingKey = (uuid) => \"s:\" + uuid;\nfunction StoredString() {\n return {\n get(prop, defaultValue = \"\") {\n return localStorage.getItem(settingKey(prop)) ?? defaultValue;\n },\n set(prop, value) {\n localStorage.setItem(settingKey(prop), value);\n }\n };\n}\n;\nfunction StoredBoolean(uiUpdateFn) {\n return {\n get(prop, defaultValue = false) {\n const value = localStorage.getItem(settingKey(prop));\n return value ? value === \"true\" : defaultValue;\n },\n set(prop, value) {\n localStorage.setItem(settingKey(prop), value ? \"true\" : \"false\");\n uiUpdateFn?.(value);\n }\n };\n}\n;\nfunction StoredInteger() {\n return {\n get(prop, defaultValue = 0) {\n const value = localStorage.getItem(settingKey(prop));\n return value ? parseInt(value) : defaultValue;\n },\n set(prop, value) {\n localStorage.setItem(settingKey(prop), value.toString());\n }\n };\n}\n;\nfunction StoredStringList() {\n return {\n get(prop, defaultValue = []) {\n const value = localStorage.getItem(settingKey(prop));\n return value ? JSON.parse(value) : defaultValue;\n },\n set(prop, value) {\n localStorage.setItem(settingKey(prop), JSON.stringify(value));\n }\n };\n}\n;\n//#endregion Types\nfunction getSettingsProxy(settings) {\n return new Proxy(settings, {\n get(target, prop) {\n return target[prop].get(prop);\n },\n set(target, prop, value) {\n target[prop].set(prop, value);\n return true;\n }\n });\n}\n/**\n * Interface for all user settings and single values.\n */\nexport const Settings = getSettingsProxy({\n isLightTheme: StoredBoolean(toggleLightTheme),\n});\n","export function toggleLightTheme(isLightTheme) {\n document.documentElement.setAttribute(\"data-theme\", isLightTheme ? \"light\" : \"dark\");\n}\n","import { writable } from \"svelte/store\";\nimport { Settings } from \"./storage\";\nfunction createSettingStore(name) {\n const store = writable(Settings[name]);\n store.subscribe(value => {\n Settings[name] = value;\n });\n return store;\n}\nexport const isLightThemeStore = createSettingStore(\"isLightTheme\");\nexport const numMovableWindowsStore = writable(0);\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n
\n \n
\n\n\n\n","\n\n\n\n\n","\n\n
\n

{title}

\n
\n
\n\n\n","\n\n\n","\n\n\n Package Viewer\n\n\n
\n \n
\n \n \n
\n
\n
\n
\n\n\n","\n\n

\n {title}\n

\n\n\n","\n\n\n Page Not Found\n\n
\n \n \n

\n Just kidding. This page doesn't exist. Please go home.\n

\n

Error 404

\n \n
\n\n\n","\n\n\n Package Viewer\n\n\n
\n
\n \n \n

\n This website renders Sims 4 package files and scans them for common\n issues. It is primarily intended for use with the S4TK Discord bot, but\n you can manually upload files and\n mass generate tuning as well.\n

\n
\n \n \n

\n This website relies on an API that I host myself. If packages aren't\n loading, there is a chance that it is down. Please report this issue to\n me ASAP on Discord.\n

\n
\n
\n
\n
\n\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatAsHexString = exports.formatResourceKey = exports.formatResourceTGI = exports.formatResourceInstance = exports.formatResourceGroup = exports.formatResourceType = exports.formatStringKey = void 0;\n/**\n * Formats a string table entry's key as a 32-bit hex string with a 0x prefix.\n *\n * @param key String key to format\n */\nfunction formatStringKey(key) {\n validatePositive32bit(key);\n return formatAsHexString(key, 8, true);\n}\nexports.formatStringKey = formatStringKey;\n/**\n * Formats a resource's type as a 32-bit hex string with no prefix.\n *\n * @param value Value to format\n */\nfunction formatResourceType(value) {\n validatePositive32bit(value);\n return formatAsHexString(value, 8, false);\n}\nexports.formatResourceType = formatResourceType;\n/**\n * Formats a resource's group as a 32-bit hex string with no prefix.\n *\n * @param value Value to format\n */\nfunction formatResourceGroup(value) {\n validatePositive32bit(value);\n return formatAsHexString(value, 8, false);\n}\nexports.formatResourceGroup = formatResourceGroup;\n/**\n * Formats a resource's instance as a 64-bit hex string with no prefix.\n *\n * @param value Value to format\n */\nfunction formatResourceInstance(value) {\n validatePositive64bit(value);\n return formatAsHexString(value, 16, false);\n}\nexports.formatResourceInstance = formatResourceInstance;\n/**\n * Formats the type, group, and instance of a resource using the given delimeter\n * (':' by default). To format a ResourceKey object, use `formatResourceKey`.\n *\n * @param type Type of key\n * @param group Group of key\n * @param instance Instance of key\n * @param delimeter Character to separate the numbers with\n */\nfunction formatResourceTGI(type, group, instance, delimeter = \":\") {\n return `${formatResourceType(type)}${delimeter}${formatResourceGroup(group)}${delimeter}${formatResourceInstance(instance)}`;\n}\nexports.formatResourceTGI = formatResourceTGI;\n/**\n * Formats a resource key using the given delimeter (':' by default).\n *\n * @param key Resource key to format\n * @param delimeter Character to separate the numbers with\n */\nfunction formatResourceKey(key, delimeter = \":\") {\n return formatResourceTGI(key.type, key.group, key.instance, delimeter);\n}\nexports.formatResourceKey = formatResourceKey;\n/**\n * Formats the given number or bigint as a hex string, padding the start with\n * zeros to match the number of given digits, with or without a \"0x\" prefix.\n *\n * @param value Values to format as hex\n * @param digits Digits to pad start of hex number with\n * @param usePrefix Whether or not the prefix string with \"0x\"\n */\nfunction formatAsHexString(value, digits, usePrefix = false) {\n return `${usePrefix ? '0x' : ''}${value.toString(16).padStart(digits, '0').toUpperCase()}`;\n}\nexports.formatAsHexString = formatAsHexString;\n//#region Validation Helpers\n/**\n * Validates that the given value is a positive 32-bit integer.\n *\n * @param value Value to validate\n * @throws If the value is not a positive 32-bit integer\n */\nfunction validatePositive32bit(value) {\n if (Number.isNaN(value) || value < 0 || value > 0xFFFFFFFF) {\n throw new Error(`Expected value to be a positive, 32-bit integer, but got ${value}.`);\n }\n}\n/**\n * Validates that the given value is a positive 64-bit integer.\n *\n * @param value Value to validate\n * @throws If the value is not a positive 64-bit integer\n */\nfunction validatePositive64bit(value) {\n if (value < 0n || value > 0xffffffffffffffffn) {\n throw new Error(`Expected value to be a positive, 64-bit integer, but got ${value}.`);\n }\n}\n//#endregion Validation Helpers\n","const { BinaryResourceType, TuningResourceType, SimDataGroup, StringTableLocale, EncodingType } = window.S4TK.enums;\nconst { formatAsHexString, formatResourceInstance, formatStringKey, formatResourceKey } = window.S4TK.formatting;\nconst { fnv64 } = window.S4TK.hashing;\nconst BIT32_CLASSES = new Set([\n 'Preference',\n 'Reward',\n 'HouseholdReward',\n 'SimReward',\n 'RelationshipBit',\n 'SocialContextBit',\n 'Aspiration',\n 'AspirationAssignment',\n 'AspirationBasic',\n 'AspirationCareer',\n 'AspirationGig',\n 'AspirationFamilialTrigger',\n 'AspirationNotification',\n 'AspirationOrganizationTask',\n 'AspirationSimInfoPanel',\n 'AspirationWhimSet',\n 'ObjectivelessWhimSet',\n 'TimedAspiration',\n 'ZoneDirectorEventListener',\n]);\nconst BIT31_CLASSES = new Set([\n 'DevelopmentalMilestone',\n]);\nexport function getTypeDisplay(type, group) {\n try {\n if (type === BinaryResourceType.SimData) {\n return group in SimDataGroup\n ? `${useSpaces(SimDataGroup[group])} SimData`\n : \"SimData\";\n }\n else if (type in TuningResourceType) {\n if (type === TuningResourceType.Tuning)\n return \"Generic Tuning\";\n return useSpaces(TuningResourceType[type]) + \" Tuning\";\n }\n else if (type in BinaryResourceType) {\n return useSpaces(BinaryResourceType[type]);\n }\n else {\n return \"Type \" + formatAsHexString(type, 8, false);\n }\n }\n catch (e) {\n console.error(e);\n return \"Error\";\n }\n}\nexport function getDisplayName(entry) {\n try {\n switch (entry.value.encodingType) {\n case EncodingType.XML:\n return entry.value.root.name;\n case EncodingType.DATA:\n return entry.value.instance.name;\n case EncodingType.STBL:\n const locale = StringTableLocale[StringTableLocale.getLocale(entry.key.instance)];\n return locale + \" String Table\";\n case EncodingType.DDS:\n return (entry.key.type === BinaryResourceType.DdsImage\n ? \"DDS\"\n : \"DST\") + \" Image\";\n case EncodingType.Unknown:\n return entry.value.isXml() ? \"Unnamed XML\" : \"Unnamed\";\n default:\n return \"Unnamed\";\n }\n }\n catch (e) {\n console.error(e);\n return \"Error\";\n }\n}\nconst SUPPORTED_ENCODINGS = new Set([\n EncodingType.XML,\n EncodingType.STBL,\n EncodingType.DATA,\n EncodingType.DDS,\n]);\nexport function isEncodingSupported(entry) {\n return (SUPPORTED_ENCODINGS.has(entry.value.encodingType) ||\n entry.value.isXml());\n}\nexport function getDefaultFilters() {\n return {\n fileType: 0,\n filename: \"\",\n instanceHex: \"\",\n showNonEnStbls: false,\n showUnsupported: false,\n simDataGroup: 0,\n stblLocale: null,\n };\n}\nexport function scanPackageForWarnings(pkg) {\n // FIXME: very ugly, very bad, hate hate hate\n const allWarnings = new Map;\n const seenKeys = new Set();\n const instToTypeMap = new Map();\n const instCounts = new Map();\n pkg.entries.forEach(entry => {\n try {\n const isTuning = entry.key.type in TuningResourceType;\n const isSimdata = entry.key.type === BinaryResourceType.SimData;\n if (isTuning) {\n instToTypeMap.set(entry.key.instance, entry.key.type);\n }\n if (!instCounts.has(entry.key.instance)) {\n instCounts.set(entry.key.instance, {\n simdata: isSimdata,\n tuning: isTuning,\n otherTuning: false,\n otherSimData: false,\n });\n }\n else if (isTuning) {\n const data = instCounts.get(entry.key.instance);\n if (data.tuning)\n data.otherTuning = true;\n else\n data.tuning = true;\n }\n else if (isSimdata) {\n const data = instCounts.get(entry.key.instance);\n if (data.simdata)\n data.otherSimData = true;\n else\n data.simdata = true;\n }\n const warnings = scanEntryForWarnings(entry, seenKeys);\n if (warnings.length)\n allWarnings.set(entry.id, warnings);\n }\n catch (err) {\n allWarnings.set(entry.id, [\"Exception was thrown while parsing this file. This does not necessarily mean that there is something wrong with it.\"]);\n }\n });\n pkg.entries.forEach(entry => {\n try {\n const safeGetWarnings = () => {\n if (!allWarnings.has(entry.id))\n allWarnings.set(entry.id, []);\n return allWarnings.get(entry.id);\n };\n if (entry.key.type === BinaryResourceType.SimData) {\n if (instToTypeMap.has(entry.key.instance)) {\n const expectedGroup = SimDataGroup.getForTuning(instToTypeMap.get(entry.key.instance));\n if (expectedGroup !== entry.key.group) {\n safeGetWarnings().push(`Expected ${TuningResourceType[instToTypeMap.get(entry.key.instance)]} SimData to have a group of ${formatAsHexString(expectedGroup, 8)}, but got ${formatAsHexString(entry.key.group, 8)} instead.`);\n }\n }\n if (instCounts.get(entry.key.instance).otherSimData) {\n safeGetWarnings().push(\"At least one other SimData resource has the same instance as this one. The only resources that should have the same instance are tuning/SimData pairs.\");\n }\n }\n else if (entry.key.type in TuningResourceType) {\n const instData = instCounts.get(entry.key.instance);\n if (instData.otherTuning) {\n safeGetWarnings().push(\"At least one other tuning resource has the same instance as this one. The only resources that should have the same instance are tuning/SimData pairs.\");\n }\n if (entry.key.type !== TuningResourceType.Snippet && SimDataGroup.getForTuning(entry.key.type) && !instData.simdata) {\n safeGetWarnings().push(`Type of ${TuningResourceType[entry.key.type]} (${formatAsHexString(entry.key.type, 8)}) is known to require SimData, but no matching SimData was found in this package.`);\n }\n }\n }\n catch (e) {\n // intentionally blank\n }\n });\n return allWarnings;\n}\nfunction scanEntryForWarnings(entry, seenKeys) {\n // FIXME: very ugly, very bad, hate hate hate\n const warnings = [];\n const formattedKey = formatResourceKey(entry.key, \"-\");\n if (seenKeys.has(formattedKey)) {\n warnings.push(`The key ${formattedKey} is already in use by another resource.`);\n }\n else {\n seenKeys.add(formattedKey);\n }\n if (!entry.key.instance)\n warnings.push(\"Instance ID should never be 0.\");\n if (entry.key.type === BinaryResourceType.SimData) {\n if (entry.key.group === 0) {\n warnings.push(`SimData group should never be 0. Check the SimDataGroup docs for a list of expected groups.`);\n }\n }\n else if (entry.key.type === BinaryResourceType.StringTable) {\n const stbl = entry.value;\n const repeatedKeys = stbl.findRepeatedKeys();\n if (repeatedKeys.length) {\n warnings.push(`Found repeated keys: [${repeatedKeys.map(formatStringKey).join(\", \")}]`);\n }\n if (stbl.hasKey(0x811C9DC5)) {\n warnings.push(\"At least one entry is using the key 0x811C9DC5, which is the FNV-32 hash of an empty string. You should change it.\");\n }\n if (stbl.hasValue(\"\")) {\n warnings.push(\"At least one string is empty.\");\n }\n }\n else if (entry.value.isXml()) {\n const xml = entry.value;\n try {\n xml.root;\n }\n catch (err) {\n console.error(err);\n warnings.push(`XML could not be parsed. ${err}`);\n return;\n }\n const xmlTuningId = BigInt(xml.root.id);\n if (xml.root.tag === \"I\") {\n if (entry.key.instance > 0xffffffffn) {\n if (BIT32_CLASSES.has(xml.root.attributes.c)) {\n warnings.push(`The class \"${xml.root.attributes.c}\" is known to require a 32-bit instance, but this resource has a 64-bit instance. You might want to replace ${formatAsHexString(entry.key.instance, 16)} with ${formatAsHexString(entry.key.instance & 0xffffffffn, 8)}.`);\n }\n if ((entry.key.type === TuningResourceType.Trait) && (xml.root.findChild(\"trait_type\").innerValue.trim() === \"PERSONALITY\")) {\n warnings.push(`Personality traits are known to require a 32-bit instance, but this one has a 64-bit instance. You might want to replace ${formatAsHexString(entry.key.instance, 16)} with ${formatAsHexString(entry.key.instance & 0xffffffffn, 8)}.`);\n }\n }\n if (entry.key.instance > 2147483647n) {\n if (BIT31_CLASSES.has(xml.root.attributes.c)) {\n const expected = entry.key.instance & 2147483647n;\n warnings.push(`The class \"${xml.root.attributes.c}\" is a special case, and its instance must be 31 bits or lower (max value = 2,147,483,647). You may want to use ${formatAsHexString(expected, 8)} instead.`);\n }\n }\n if (TuningResourceType.parseAttr(xml.root.attributes.i) !== entry.key.type) {\n const expectedType = TuningResourceType.parseAttr(xml.root.attributes.i);\n warnings.push(`Type of ${TuningResourceType[entry.key.type]} (${formatAsHexString(entry.key.type, 8)}) is incompatible with i=\"${xml.root.attributes.i}\". Either the type should be ${TuningResourceType[expectedType]} (${formatAsHexString(expectedType, 8)}), or the i attribute should be \"${TuningResourceType.getAttr(entry.key.type)}\".`);\n }\n }\n else if (xml.root.tag === \"M\") {\n const expectedHash = fnv64(xml.root.name.replace(/\\./g, \"-\"));\n if (xmlTuningId !== expectedHash) {\n warnings.push(`Module instance does not match its name. It must be the FNV-64 hash of the filename with all '.' characters are replaced with '-', which is ${expectedHash}.`);\n }\n }\n if (xmlTuningId === 0xcbf29ce484222325n) {\n warnings.push(`0xCBF29CE484222325 is the FNV-64 hash of an empty string, and using it as the instance of your tuning is not a good idea. You should change it.`);\n }\n else if (xmlTuningId === 0x811c9dc5n) {\n warnings.push(`0x811C9DC5 is the FNV-32 hash of an empty string, and using it as the instance of your tuning is not a good idea. You should change it.`);\n }\n if (xmlTuningId !== entry.key.instance) {\n warnings.push(`Instance of ${formatResourceInstance(entry.key.instance)} does not match s=\"${xml.root.id}\".`);\n }\n }\n return warnings;\n}\nfunction useSpaces(name) {\n return name.replace(/([A-Z])/g, \" $1\");\n}\n","\n\n\n
\n

{getDisplayName(entry)}

\n

\n {getTypeDisplay(entry.key.type, entry.key.group)}\n

\n

\n {resourceKey}\n

\n {#if warnings}\n \n \n

{warnings.length}

\n \n {/if}\n
\n\n\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst helpers_1 = require(\"../common/helpers\");\n/**\n * Types for binary resources (i.e. any resource that follows a BT). Note that\n * this enum is intentionally incomplete, as other binary resources are not yet\n * supported by S4TK.\n */\nvar BinaryResourceType;\n(function (BinaryResourceType) {\n // Some types will be added in comments as I come across them, but they will\n // only become part of the actual enum when/if they have a model implemented\n BinaryResourceType[BinaryResourceType[\"CombinedTuning\"] = 1659456824] = \"CombinedTuning\";\n BinaryResourceType[BinaryResourceType[\"DdsImage\"] = 3066607264] = \"DdsImage\";\n BinaryResourceType[BinaryResourceType[\"DstImage\"] = 11720834] = \"DstImage\";\n // Footprint = 0xD382BF57,\n // Light = 0x03B4C61D,\n // ModelLod = 0x01D10F34,\n // ObjectCatalog = 0x319E4F1D,\n BinaryResourceType[BinaryResourceType[\"ObjectDefinition\"] = 3235601127] = \"ObjectDefinition\";\n // Rig = 0x8EAF13DE,\n BinaryResourceType[BinaryResourceType[\"SimData\"] = 1415235194] = \"SimData\";\n // Slot = 0xD3044521,\n BinaryResourceType[BinaryResourceType[\"StringTable\"] = 570775514] = \"StringTable\";\n})(BinaryResourceType || (BinaryResourceType = {}));\n(function (BinaryResourceType) {\n /**\n * Returns an array of all binary resource types.\n */\n function all() {\n return (0, helpers_1.getAllEnumValues)(BinaryResourceType);\n }\n BinaryResourceType.all = all;\n})(BinaryResourceType || (BinaryResourceType = {}));\n// `export default enum` not supported by TS\nexports.default = BinaryResourceType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.camelToPascal = exports.pascalToCamel = exports.pascalToSnake = exports.snakeToPascal = exports.getAllEnumValues = exports.readUntilFalsey = exports.promisify = exports.bufferContainsDATA = exports.bufferContainsXml = exports.arraysAreEqual = exports.removeFromArray = exports.makeList = void 0;\n/**\n * Creates an array with a set number of arguments populated by a function. If\n * `skipNulls = true`, then any iterations of the function that return either\n * `undefined` or `null` will not be added to the resulting array.\n *\n * @param length Number of items to populate the array with\n * @param fn Function that dictates what the array items should be\n * @param skipNulls Optional argument to specify whether null/undefined results\n * should be skipped, rather than added to the array. False by default.\n * @param limit Maximum length of the list. If not provided, there is no maximum\n * length.\n * @returns Array containing values generated by the function\n */\nfunction makeList(length, fn, skipNulls = false, limit) {\n const list = [];\n for (let i = 0; i < length; i++) {\n const item = fn(i);\n if ((item != undefined) || !skipNulls)\n list.push(item);\n if ((limit != undefined) && (list.length >= limit))\n break;\n }\n return list;\n}\nexports.makeList = makeList;\n/**\n * Removes objects from the given array by reference equality.\n *\n * @param toRemove Objects to remove\n * @param removeFrom Array to remove objects from\n * @returns True if at least one item was removed, else false\n */\nfunction removeFromArray(toRemove, removeFrom) {\n let anyRemoved = false;\n toRemove.forEach(obj => {\n const index = removeFrom.findIndex(o => o === obj);\n if (index < 0)\n return;\n removeFrom.splice(index, 1);\n anyRemoved = true;\n });\n return anyRemoved;\n}\nexports.removeFromArray = removeFromArray;\n/**\n * Checks if the two given arrays contain the same contents, as dictacted by\n * the first array's children's `equals()` methods. The elements do not need to\n * be in the same order. Time complexity is O(n^2), so use sparingly.\n *\n * @param arr1 First array to check\n * @param arr2 Second array to check\n */\nfunction arraysAreEqual(arr1, arr2) {\n if (arr1.length !== arr2?.length)\n return false;\n return arr1.every(a => arr2.some(b => a.equals(b)));\n}\nexports.arraysAreEqual = arraysAreEqual;\n/**\n * Checks the given buffer and returns whether or not it contains XML content.\n * This is determined by the presence of an XML header, so it will return false\n * for XML files that do not have a header.\n *\n * @param buffer Buffer to check contents of\n * @returns True if this buffer contains XML, false otherwise\n */\nfunction bufferContainsXml(buffer) {\n return buffer.length >= 5 && buffer.toString(\"utf-8\", 0, 5) === \"= 4 && buffer.toString(\"utf-8\", 0, 4) === \"DATA\";\n}\nexports.bufferContainsDATA = bufferContainsDATA;\n/**\n * Returns a Promise that resolves with the result of the given function.\n *\n * @param fn Function that returns the object to be wrapped in a Promise\n */\nfunction promisify(fn) {\n return new Promise((resolve, reject) => {\n try {\n const result = fn();\n resolve(result);\n }\n catch (e) {\n reject(e);\n }\n });\n}\nexports.promisify = promisify;\n/**\n * Returns a subarray of the given array that contains of all values between the\n * given start index and the first value that is mapped to something falsey.\n *\n * @param arr Source array\n * @param startIndex (Optional) Index to start at, 0 by default\n * @param fn (Optional) Mapper function, identity by default\n */\nfunction readUntilFalsey(arr, startIndex = 0, fn = (t) => Boolean(t)) {\n let i;\n for (i = startIndex; i < arr.length; i++)\n if (!fn(arr[i]))\n break;\n return arr.slice(startIndex, i);\n}\nexports.readUntilFalsey = readUntilFalsey;\n/**\n * Returns an array containing all of the numerical values of an enum.\n *\n * @param enumObj Enum to get values of\n */\nfunction getAllEnumValues(enumObj) {\n return Object.values(enumObj)\n .filter(value => typeof value === \"number\");\n}\nexports.getAllEnumValues = getAllEnumValues;\n/**\n * Converts a string in snake case (like_this) to pascal case (LikeThis).\n *\n * @param snakeCase String in snake case\n */\nfunction snakeToPascal(snakeCase) {\n return snakeCase?.split(\"_\")\n .map(segment => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join(\"\");\n}\nexports.snakeToPascal = snakeToPascal;\n/**\n * Converts a string in pascal case (LikeThis) to snake case (like_this).\n *\n * @param pascalCase String in pascal case\n */\nfunction pascalToSnake(pascalCase) {\n return pascalCase?.split(/(?=[A-Z])/).join('_').toLowerCase();\n}\nexports.pascalToSnake = pascalToSnake;\n/**\n * Converts a string in pascal case (LikeThis) to camel case (likeThis).\n *\n * @param pascalCase String in pascal case\n */\nfunction pascalToCamel(pascalCase) {\n if (!pascalCase)\n return \"\";\n return pascalCase.charAt(0).toLowerCase() + pascalCase.slice(1);\n}\nexports.pascalToCamel = pascalToCamel;\n/**\n * Converts a string in camel case (likeThis) to pascal case (LikeThis).\n *\n * @param camelCase String in camel case\n */\nfunction camelToPascal(camelCase) {\n if (!camelCase)\n return \"\";\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n}\nexports.camelToPascal = camelToPascal;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Types of data that can be stored in a DATA file. The order of these values\n * 100% matters, do NOT change them - they match the BT.\n */\nvar DataType;\n(function (DataType) {\n DataType[DataType[\"Boolean\"] = 0] = \"Boolean\";\n DataType[DataType[\"Character\"] = 1] = \"Character\";\n DataType[DataType[\"Int8\"] = 2] = \"Int8\";\n DataType[DataType[\"UInt8\"] = 3] = \"UInt8\";\n DataType[DataType[\"Int16\"] = 4] = \"Int16\";\n DataType[DataType[\"UInt16\"] = 5] = \"UInt16\";\n DataType[DataType[\"Int32\"] = 6] = \"Int32\";\n DataType[DataType[\"UInt32\"] = 7] = \"UInt32\";\n DataType[DataType[\"Int64\"] = 8] = \"Int64\";\n DataType[DataType[\"UInt64\"] = 9] = \"UInt64\";\n DataType[DataType[\"Float\"] = 10] = \"Float\";\n DataType[DataType[\"String\"] = 11] = \"String\";\n DataType[DataType[\"HashedString\"] = 12] = \"HashedString\";\n DataType[DataType[\"Object\"] = 13] = \"Object\";\n DataType[DataType[\"Vector\"] = 14] = \"Vector\";\n DataType[DataType[\"Float2\"] = 15] = \"Float2\";\n DataType[DataType[\"Float3\"] = 16] = \"Float3\";\n DataType[DataType[\"Float4\"] = 17] = \"Float4\";\n DataType[DataType[\"TableSetReference\"] = 18] = \"TableSetReference\";\n DataType[DataType[\"ResourceKey\"] = 19] = \"ResourceKey\";\n DataType[DataType[\"LocalizationKey\"] = 20] = \"LocalizationKey\";\n DataType[DataType[\"Variant\"] = 21] = \"Variant\";\n DataType[DataType[\"Undefined\"] = 22] = \"Undefined\"; // 22\n})(DataType || (DataType = {}));\n(function (DataType) {\n /**\n * Returns the alignment for the given DataType.\n *\n * @param dataType The DataType to get the alignment for\n */\n function getAlignment(dataType) {\n switch (dataType) {\n case DataType.Boolean:\n case DataType.Character:\n case DataType.Int8:\n case DataType.UInt8:\n return 1;\n case DataType.Int16:\n case DataType.UInt16:\n return 2;\n case DataType.Int32:\n case DataType.UInt32:\n case DataType.Float:\n case DataType.String:\n case DataType.HashedString:\n case DataType.Object:\n case DataType.Vector:\n case DataType.Float2:\n case DataType.Float3:\n case DataType.Float4:\n case DataType.LocalizationKey:\n case DataType.Variant:\n return 4;\n case DataType.Int64:\n case DataType.UInt64:\n case DataType.TableSetReference:\n case DataType.ResourceKey:\n return 8;\n default:\n return 1;\n }\n }\n DataType.getAlignment = getAlignment;\n /**\n * Returns the number of bytes used by the given DataType.\n *\n * @param dataType The DataType to get the number of bytes for\n */\n function getBytes(dataType) {\n switch (dataType) {\n case DataType.Character:\n case DataType.Int8:\n case DataType.UInt8:\n return 1;\n case DataType.Int16:\n case DataType.UInt16:\n return 2;\n case DataType.Boolean: // booleans are 1 byte, but this requires some voodoo\n case DataType.Int32:\n case DataType.UInt32:\n case DataType.Float:\n case DataType.String:\n case DataType.Object:\n case DataType.LocalizationKey:\n return 4;\n case DataType.Int64:\n case DataType.UInt64:\n case DataType.HashedString:\n case DataType.Vector:\n case DataType.Float2:\n case DataType.TableSetReference:\n case DataType.Variant:\n return 8;\n case DataType.Float3:\n return 12;\n case DataType.Float4:\n case DataType.ResourceKey:\n return 16;\n default:\n throw new Error(`DataType ${dataType} not recognized.`);\n }\n }\n DataType.getBytes = getBytes;\n /**\n * Gets the name to use for the given DataType in S4S-style XML.\n *\n * @param dataType DataType to get the S4S name of\n */\n function getSims4StudioName(dataType) {\n switch (dataType) {\n case DataType.Character:\n throw new Error(`Character values cannot be represented in S4S XML. If you are reading this error, please let me know about it ASAP (https://github.com/sims4toolkit/models/issues).`);\n case DataType.Float:\n return \"Single\";\n default:\n return DataType[dataType];\n }\n }\n DataType.getSims4StudioName = getSims4StudioName;\n /**\n * Gets the data type associated with the given S4S XML type name.\n *\n * @param name Name of data type as it appears in S4S XML\n */\n function parseSims4StudioName(name) {\n if (name === \"Single\")\n return DataType.Float;\n return DataType[name];\n }\n DataType.parseSims4StudioName = parseSims4StudioName;\n /**\n * Verifies that the given value is within the range for the give type.\n *\n * @param value Value to verify\n * @param dataType Data type to determine range for\n */\n function isNumberInRange(value, dataType) {\n if (value == undefined || Number.isNaN(value))\n return false;\n switch (dataType) {\n case DataType.Int8:\n return value >= -0x80 && value <= 0x7F;\n case DataType.UInt8:\n return value >= 0 && value <= 0xFF;\n case DataType.Int16:\n return value >= -0x80000 && value <= 0x7FFF;\n case DataType.UInt16:\n return value >= 0 && value <= 0xFFFF;\n case DataType.Int32:\n return value >= -0x800000000 && value <= 0x7FFFFFFF;\n case DataType.LocalizationKey:\n // fallthrough\n case DataType.UInt32:\n return value >= 0 && value <= 0xFFFFFFFF;\n case DataType.Float:\n return true; // FIXME: find limits\n default:\n throw new Error(`Type ${dataType} is not a SimDataNumber.`);\n }\n }\n DataType.isNumberInRange = isNumberInRange;\n /**\n * Verifies that the given value is within the range for the give type.\n *\n * @param value Value to verify\n * @param dataType Data type to determine range for\n */\n function isBigIntInRange(value, dataType) {\n if (value == undefined)\n return false;\n switch (dataType) {\n case DataType.Int64:\n return value >= -0x8000000000000000n && value <= 0x7fffffffffffffffn;\n case DataType.TableSetReference:\n // fallthrough\n case DataType.UInt64:\n return value >= 0n && value <= 0xffffffffffffffffn;\n default:\n throw new Error(`Type ${dataType} is not a SimDataBigInt.`);\n }\n }\n DataType.isBigIntInRange = isBigIntInRange;\n /**\n * Parses a number from the given value using the given type. The parsed\n * number is NOT guaranteed to fit within the bounds of the given type; it\n * is just used to determine the base system to use, and whether it is parsing\n * an integer or float.\n *\n * If the value is `undefined` or `null`, a value of `0` is returned.\n *\n * If no number can be parsed, `NaN` is returned.\n *\n * @param value Value to parse as a number\n * @param dataType Data type to parse value as\n */\n function parseNumber(value, dataType) {\n value = value ?? 0;\n if (typeof value === 'number') {\n return value; // includes NaN\n }\n else if (typeof value === 'string') {\n return dataType === DataType.Float ? parseFloat(value) : parseInt(value);\n }\n else {\n return NaN;\n }\n }\n DataType.parseNumber = parseNumber;\n})(DataType || (DataType = {}));\nexports.default = DataType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * How resources are encoded.\n */\nvar EncodingType;\n(function (EncodingType) {\n // special cases\n EncodingType[\"Unknown\"] = \"Unknown\";\n EncodingType[\"Null\"] = \"Null\";\n // known encoding\n EncodingType[\"DATA\"] = \"DATA\";\n EncodingType[\"DDS\"] = \"DDS\";\n EncodingType[\"OBJDEF\"] = \"OBJDEF\";\n EncodingType[\"STBL\"] = \"STBL\";\n EncodingType[\"XML\"] = \"XML\";\n})(EncodingType || (EncodingType = {}));\n// `export default enum` not supported by TS\nexports.default = EncodingType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst helpers_1 = require(\"../common/helpers\");\n/**\n * Types for tuning resources (i.e. any XML resource that is loaded as tuning).\n */\nvar TuningResourceType;\n(function (TuningResourceType) {\n TuningResourceType[TuningResourceType[\"Achievement\"] = 2018877086] = \"Achievement\";\n TuningResourceType[TuningResourceType[\"AchievementCategory\"] = 609337601] = \"AchievementCategory\";\n TuningResourceType[TuningResourceType[\"AchievementCollection\"] = 80917605] = \"AchievementCollection\";\n TuningResourceType[TuningResourceType[\"Action\"] = 209137191] = \"Action\";\n TuningResourceType[TuningResourceType[\"Animation\"] = 3994535597] = \"Animation\";\n TuningResourceType[TuningResourceType[\"AspirationCategory\"] = 3813727192] = \"AspirationCategory\";\n TuningResourceType[TuningResourceType[\"AspirationTrack\"] = 3223387309] = \"AspirationTrack\";\n TuningResourceType[TuningResourceType[\"Aspiration\"] = 683034229] = \"Aspiration\";\n TuningResourceType[TuningResourceType[\"AwayAction\"] = 2947394632] = \"AwayAction\";\n TuningResourceType[TuningResourceType[\"Balloon\"] = 3966406598] = \"Balloon\";\n TuningResourceType[TuningResourceType[\"Breed\"] = 874331941] = \"Breed\";\n TuningResourceType[TuningResourceType[\"Broadcaster\"] = 3736796019] = \"Broadcaster\";\n TuningResourceType[TuningResourceType[\"BucksPerk\"] = 3963461902] = \"BucksPerk\";\n TuningResourceType[TuningResourceType[\"Buff\"] = 1612179606] = \"Buff\";\n TuningResourceType[TuningResourceType[\"Business\"] = 1977092083] = \"Business\";\n TuningResourceType[TuningResourceType[\"CasMenuItem\"] = 213537012] = \"CasMenuItem\";\n TuningResourceType[TuningResourceType[\"CasMenu\"] = 2472182722] = \"CasMenu\";\n TuningResourceType[TuningResourceType[\"CasPreferenceCategory\"] = 3456433227] = \"CasPreferenceCategory\";\n TuningResourceType[TuningResourceType[\"CasPreferenceItem\"] = 3966303522] = \"CasPreferenceItem\";\n TuningResourceType[TuningResourceType[\"CasStoriesAnswer\"] = 2163289367] = \"CasStoriesAnswer\";\n TuningResourceType[TuningResourceType[\"CasStoriesQuestion\"] = 52718493] = \"CasStoriesQuestion\";\n TuningResourceType[TuningResourceType[\"CasStoriesTraitChooser\"] = 2376930633] = \"CasStoriesTraitChooser\";\n TuningResourceType[TuningResourceType[\"CallToAction\"] = 4114068192] = \"CallToAction\";\n TuningResourceType[TuningResourceType[\"CareerEvent\"] = 2487354146] = \"CareerEvent\";\n TuningResourceType[TuningResourceType[\"CareerGig\"] = 3436908253] = \"CareerGig\";\n TuningResourceType[TuningResourceType[\"CareerLevel\"] = 745582072] = \"CareerLevel\";\n TuningResourceType[TuningResourceType[\"CareerTrack\"] = 1221024995] = \"CareerTrack\";\n TuningResourceType[TuningResourceType[\"Career\"] = 1939434475] = \"Career\";\n TuningResourceType[TuningResourceType[\"Clan\"] = 3737052837] = \"Clan\";\n TuningResourceType[TuningResourceType[\"ClanValue\"] = 2576273579] = \"ClanValue\";\n TuningResourceType[TuningResourceType[\"ClubInteractionGroup\"] = 4195351092] = \"ClubInteractionGroup\";\n TuningResourceType[TuningResourceType[\"ClubSeed\"] = 794407991] = \"ClubSeed\";\n TuningResourceType[TuningResourceType[\"ConditionalLayer\"] = 2441338001] = \"ConditionalLayer\";\n TuningResourceType[TuningResourceType[\"DetectiveClue\"] = 1400130038] = \"DetectiveClue\";\n TuningResourceType[TuningResourceType[\"DevelopmentalMilestone\"] = 3307360148] = \"DevelopmentalMilestone\";\n TuningResourceType[TuningResourceType[\"DramaNode\"] = 626258997] = \"DramaNode\";\n TuningResourceType[TuningResourceType[\"Ensemble\"] = 3112702240] = \"Ensemble\";\n TuningResourceType[TuningResourceType[\"GameRuleset\"] = 3779558936] = \"GameRuleset\";\n TuningResourceType[TuningResourceType[\"Headline\"] = 4093714525] = \"Headline\";\n TuningResourceType[TuningResourceType[\"HolidayDefinition\"] = 238120813] = \"HolidayDefinition\";\n TuningResourceType[TuningResourceType[\"HolidayTradition\"] = 1070408838] = \"HolidayTradition\";\n TuningResourceType[TuningResourceType[\"HouseholdMilestone\"] = 963831539] = \"HouseholdMilestone\";\n TuningResourceType[TuningResourceType[\"Interaction\"] = 3900887599] = \"Interaction\";\n TuningResourceType[TuningResourceType[\"LotDecorationPreset\"] = 3726571771] = \"LotDecorationPreset\";\n TuningResourceType[TuningResourceType[\"LotDecoration\"] = 4264407467] = \"LotDecoration\";\n TuningResourceType[TuningResourceType[\"LotTuning\"] = 3632270694] = \"LotTuning\";\n TuningResourceType[TuningResourceType[\"Mood\"] = 3128647864] = \"Mood\";\n TuningResourceType[TuningResourceType[\"Narrative\"] = 1047870521] = \"Narrative\";\n TuningResourceType[TuningResourceType[\"NotebookEntry\"] = 2567109238] = \"NotebookEntry\";\n TuningResourceType[TuningResourceType[\"ObjectPart\"] = 1900520272] = \"ObjectPart\";\n TuningResourceType[TuningResourceType[\"ObjectState\"] = 1526890910] = \"ObjectState\";\n TuningResourceType[TuningResourceType[\"Object\"] = 3055412916] = \"Object\";\n TuningResourceType[TuningResourceType[\"Objective\"] = 6899006] = \"Objective\";\n TuningResourceType[TuningResourceType[\"OpenStreetDirector\"] = 1265622724] = \"OpenStreetDirector\";\n TuningResourceType[TuningResourceType[\"PieMenuCategory\"] = 65657188] = \"PieMenuCategory\";\n TuningResourceType[TuningResourceType[\"Posture\"] = 2909789983] = \"Posture\";\n TuningResourceType[TuningResourceType[\"RabbitHole\"] = 2976568058] = \"RabbitHole\";\n TuningResourceType[TuningResourceType[\"Recipe\"] = 3952605219] = \"Recipe\";\n TuningResourceType[TuningResourceType[\"Region\"] = 1374134669] = \"Region\";\n TuningResourceType[TuningResourceType[\"RelationshipBit\"] = 151314192] = \"RelationshipBit\";\n TuningResourceType[TuningResourceType[\"RelationshipLock\"] = 2922702451] = \"RelationshipLock\";\n TuningResourceType[TuningResourceType[\"Reward\"] = 1873057832] = \"Reward\";\n TuningResourceType[TuningResourceType[\"RoleState\"] = 239932923] = \"RoleState\";\n TuningResourceType[TuningResourceType[\"Royalty\"] = 938421991] = \"Royalty\";\n TuningResourceType[TuningResourceType[\"Season\"] = 3381515358] = \"Season\";\n TuningResourceType[TuningResourceType[\"ServiceNpc\"] = 2629964386] = \"ServiceNpc\";\n TuningResourceType[TuningResourceType[\"Sickness\"] = 3288062174] = \"Sickness\";\n TuningResourceType[TuningResourceType[\"SimFilter\"] = 1846401695] = \"SimFilter\";\n TuningResourceType[TuningResourceType[\"SimInfoFixup\"] = 3797424274] = \"SimInfoFixup\";\n TuningResourceType[TuningResourceType[\"SimTemplate\"] = 212125579] = \"SimTemplate\";\n TuningResourceType[TuningResourceType[\"SituationGoalSet\"] = 2649944562] = \"SituationGoalSet\";\n TuningResourceType[TuningResourceType[\"SituationGoal\"] = 1502554343] = \"SituationGoal\";\n TuningResourceType[TuningResourceType[\"SituationJob\"] = 2617738591] = \"SituationJob\";\n TuningResourceType[TuningResourceType[\"Situation\"] = 4223905515] = \"Situation\";\n TuningResourceType[TuningResourceType[\"SlotTypeSet\"] = 1058419973] = \"SlotTypeSet\";\n TuningResourceType[TuningResourceType[\"SlotType\"] = 1772477092] = \"SlotType\";\n TuningResourceType[TuningResourceType[\"Snippet\"] = 2113017500] = \"Snippet\";\n TuningResourceType[TuningResourceType[\"SocialGroup\"] = 776446212] = \"SocialGroup\";\n TuningResourceType[TuningResourceType[\"Spell\"] = 523506649] = \"Spell\";\n TuningResourceType[TuningResourceType[\"Scommodity\"] = 1359443523] = \"Scommodity\";\n TuningResourceType[TuningResourceType[\"Statistic\"] = 865846717] = \"Statistic\";\n TuningResourceType[TuningResourceType[\"Strategy\"] = 1646578134] = \"Strategy\";\n TuningResourceType[TuningResourceType[\"Street\"] = 4142189312] = \"Street\";\n TuningResourceType[TuningResourceType[\"Subroot\"] = 3086978965] = \"Subroot\";\n TuningResourceType[TuningResourceType[\"TagSet\"] = 1228493570] = \"TagSet\";\n TuningResourceType[TuningResourceType[\"TemplateChooser\"] = 1220728301] = \"TemplateChooser\";\n TuningResourceType[TuningResourceType[\"TestBasedScore\"] = 1332976878] = \"TestBasedScore\";\n TuningResourceType[TuningResourceType[\"Topic\"] = 1938713686] = \"Topic\";\n TuningResourceType[TuningResourceType[\"Trait\"] = 3412057543] = \"Trait\";\n TuningResourceType[TuningResourceType[\"Tuning\"] = 62078431] = \"Tuning\";\n TuningResourceType[TuningResourceType[\"TutorialTip\"] = 2410930353] = \"TutorialTip\";\n TuningResourceType[TuningResourceType[\"Tutorial\"] = 3762955427] = \"Tutorial\";\n TuningResourceType[TuningResourceType[\"UniversityCourseData\"] = 689745854] = \"UniversityCourseData\";\n TuningResourceType[TuningResourceType[\"UniversityMajor\"] = 660124491] = \"UniversityMajor\";\n TuningResourceType[TuningResourceType[\"University\"] = 3646477745] = \"University\";\n TuningResourceType[TuningResourceType[\"UserInterfaceInfo\"] = 3099531875] = \"UserInterfaceInfo\";\n TuningResourceType[TuningResourceType[\"Venue\"] = 3871070174] = \"Venue\";\n TuningResourceType[TuningResourceType[\"WalkBy\"] = 1070998590] = \"WalkBy\";\n TuningResourceType[TuningResourceType[\"WeatherEvent\"] = 1476851130] = \"WeatherEvent\";\n TuningResourceType[TuningResourceType[\"WeatherForecast\"] = 1233072753] = \"WeatherForecast\";\n TuningResourceType[TuningResourceType[\"Whim\"] = 1956251190] = \"Whim\";\n TuningResourceType[TuningResourceType[\"ZoneDirector\"] = 4183335058] = \"ZoneDirector\";\n TuningResourceType[TuningResourceType[\"ZoneModifier\"] = 1008568217] = \"ZoneModifier\";\n})(TuningResourceType || (TuningResourceType = {}));\n(function (TuningResourceType) {\n /**\n * Returns an array of all tuning resource types.\n */\n function all() {\n return (0, helpers_1.getAllEnumValues)(TuningResourceType);\n }\n TuningResourceType.all = all;\n /**\n * Returns the TuningResourceType value for tunings with the given type\n * attribute. This attribute is either the `n` in R nodes in combined\n * tuning, or the `i` in regular tuning instances. If there is no type for\n * the given attribute, `Tuning` is assumed.\n *\n * @param attr Attribute to parse as a tuning type\n */\n function parseAttr(attr) {\n switch (attr) {\n // special cases must be added to this enum manually\n case \"relbit\": return TuningResourceType.RelationshipBit;\n default:\n const enumName = (0, helpers_1.snakeToPascal)(attr);\n const enumValue = TuningResourceType[enumName];\n return enumValue ?? TuningResourceType.Tuning;\n }\n }\n TuningResourceType.parseAttr = parseAttr;\n /**\n * Returns the `i` attribute to use for a tuning file of the given type. If\n * there is no attribute for the given type, result is null.\n *\n * @param type Tuning type to get attribute for\n */\n function getAttr(type) {\n switch (type) {\n // special cases must be added to this enum manually\n case TuningResourceType.Tuning: return null;\n case TuningResourceType.RelationshipBit: return \"relbit\";\n default:\n return (type in TuningResourceType)\n ? (0, helpers_1.pascalToSnake)(TuningResourceType[type])\n : null;\n }\n }\n TuningResourceType.getAttr = getAttr;\n})(TuningResourceType || (TuningResourceType = {}));\n// `export default enum` not supported by TS\nexports.default = TuningResourceType;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst helpers_1 = require(\"../common/helpers\");\nconst tuning_resources_1 = __importDefault(require(\"./tuning-resources\"));\n/**\n * Groups for SimDatas.\n */\nvar SimDataGroup;\n(function (SimDataGroup) {\n SimDataGroup[SimDataGroup[\"Achievement\"] = 5611238] = \"Achievement\";\n SimDataGroup[SimDataGroup[\"AchievementCategory\"] = 5357861] = \"AchievementCategory\";\n SimDataGroup[SimDataGroup[\"AchievementCollection\"] = 13808737] = \"AchievementCollection\";\n SimDataGroup[SimDataGroup[\"Aspiration\"] = 11945565] = \"Aspiration\";\n SimDataGroup[SimDataGroup[\"AspirationCategory\"] = 5299003] = \"AspirationCategory\";\n SimDataGroup[SimDataGroup[\"AspirationTrack\"] = 2161773] = \"AspirationTrack\";\n SimDataGroup[SimDataGroup[\"Automation\"] = 13722210] = \"Automation\";\n SimDataGroup[SimDataGroup[\"Breed\"] = 1916689] = \"Breed\";\n SimDataGroup[SimDataGroup[\"Buff\"] = 1566966] = \"Buff\";\n SimDataGroup[SimDataGroup[\"BuildBuy\"] = 246679] = \"BuildBuy\";\n SimDataGroup[SimDataGroup[\"Business\"] = 14157702] = \"Business\";\n SimDataGroup[SimDataGroup[\"Career\"] = 10054552] = \"Career\";\n SimDataGroup[SimDataGroup[\"CareerGig\"] = 14355985] = \"CareerGig\";\n SimDataGroup[SimDataGroup[\"CareerLevel\"] = 7384532] = \"CareerLevel\";\n SimDataGroup[SimDataGroup[\"CareerTrack\"] = 13065387] = \"CareerTrack\";\n SimDataGroup[SimDataGroup[\"CasMenu\"] = 5931857] = \"CasMenu\";\n SimDataGroup[SimDataGroup[\"CasMenuItem\"] = 12210424] = \"CasMenuItem\";\n SimDataGroup[SimDataGroup[\"CasOccultSkintone\"] = 12807221] = \"CasOccultSkintone\";\n SimDataGroup[SimDataGroup[\"CasPreferenceCategory\"] = 326789] = \"CasPreferenceCategory\";\n SimDataGroup[SimDataGroup[\"CasPreferenceItem\"] = 6880718] = \"CasPreferenceItem\";\n SimDataGroup[SimDataGroup[\"CasStoriesAnswer\"] = 15805847] = \"CasStoriesAnswer\";\n SimDataGroup[SimDataGroup[\"CasStoriesQuestion\"] = 2386846] = \"CasStoriesQuestion\";\n SimDataGroup[SimDataGroup[\"CasStoriesTraitChooser\"] = 11343300] = \"CasStoriesTraitChooser\";\n SimDataGroup[SimDataGroup[\"Clan\"] = 12510843] = \"Clan\";\n SimDataGroup[SimDataGroup[\"ClanValue\"] = 9359410] = \"ClanValue\";\n SimDataGroup[SimDataGroup[\"ClientCasCameraTuning\"] = 5955271] = \"ClientCasCameraTuning\";\n SimDataGroup[SimDataGroup[\"ClientCasLighting\"] = 669200] = \"ClientCasLighting\";\n SimDataGroup[SimDataGroup[\"ClientCasModifierTuning\"] = 11272143] = \"ClientCasModifierTuning\";\n SimDataGroup[SimDataGroup[\"ClientCasOccultTuning\"] = 9923016] = \"ClientCasOccultTuning\";\n SimDataGroup[SimDataGroup[\"ClientCasThumbnailCamera\"] = 4810306] = \"ClientCasThumbnailCamera\";\n SimDataGroup[SimDataGroup[\"ClientCasThumbnailPartTuning\"] = 13750274] = \"ClientCasThumbnailPartTuning\";\n SimDataGroup[SimDataGroup[\"ClientCasTuning\"] = 4936293] = \"ClientCasTuning\";\n SimDataGroup[SimDataGroup[\"ClientRegionSortTuning\"] = 5753018] = \"ClientRegionSortTuning\";\n SimDataGroup[SimDataGroup[\"ClientTagCategoriesMetadata\"] = 1233988] = \"ClientTagCategoriesMetadata\";\n SimDataGroup[SimDataGroup[\"ClientTags\"] = 12159328] = \"ClientTags\";\n SimDataGroup[SimDataGroup[\"ClientTagsMapping\"] = 359697] = \"ClientTagsMapping\";\n SimDataGroup[SimDataGroup[\"ClientTagsTraitGroupMetadata\"] = 4080149] = \"ClientTagsTraitGroupMetadata\";\n SimDataGroup[SimDataGroup[\"ClientThumbnailPoses\"] = 12745782] = \"ClientThumbnailPoses\";\n SimDataGroup[SimDataGroup[\"ClientTutorial\"] = 7538507] = \"ClientTutorial\";\n SimDataGroup[SimDataGroup[\"ClubInteractionGroup\"] = 1047246] = \"ClubInteractionGroup\";\n SimDataGroup[SimDataGroup[\"ClubSeed\"] = 5878808] = \"ClubSeed\";\n SimDataGroup[SimDataGroup[\"DevelopmentalMilestone\"] = 2248529] = \"DevelopmentalMilestone\";\n SimDataGroup[SimDataGroup[\"DramaNode\"] = 5501968] = \"DramaNode\";\n SimDataGroup[SimDataGroup[\"Headline\"] = 73897] = \"Headline\";\n SimDataGroup[SimDataGroup[\"HolidayTradition\"] = 13444281] = \"HolidayTradition\";\n SimDataGroup[SimDataGroup[\"HouseholdMilestone\"] = 7530186] = \"HouseholdMilestone\";\n SimDataGroup[SimDataGroup[\"LotDecorationPreset\"] = 2029605] = \"LotDecorationPreset\";\n SimDataGroup[SimDataGroup[\"Module\"] = 7119620] = \"Module\";\n SimDataGroup[SimDataGroup[\"Mood\"] = 8085506] = \"Mood\";\n SimDataGroup[SimDataGroup[\"NativeBuildBuy\"] = 9759150] = \"NativeBuildBuy\";\n SimDataGroup[SimDataGroup[\"NativeSeasonsWeather\"] = 3824229] = \"NativeSeasonsWeather\";\n SimDataGroup[SimDataGroup[\"Objective\"] = 6899006] = \"Objective\";\n SimDataGroup[SimDataGroup[\"PieMenuCategory\"] = 15325543] = \"PieMenuCategory\";\n SimDataGroup[SimDataGroup[\"Recipe\"] = 9959624] = \"Recipe\";\n SimDataGroup[SimDataGroup[\"Region\"] = 15180252] = \"Region\";\n SimDataGroup[SimDataGroup[\"RelationshipBit\"] = 5110660] = \"RelationshipBit\";\n SimDataGroup[SimDataGroup[\"RendererCas\"] = 2709620] = \"RendererCas\";\n SimDataGroup[SimDataGroup[\"RendererHsvTweakerSettings\"] = 16552157] = \"RendererHsvTweakerSettings\";\n SimDataGroup[SimDataGroup[\"RendererMinspec\"] = 2069982] = \"RendererMinspec\";\n SimDataGroup[SimDataGroup[\"Reward\"] = 10786887] = \"Reward\";\n SimDataGroup[SimDataGroup[\"Season\"] = 9294999] = \"Season\";\n SimDataGroup[SimDataGroup[\"SituationJob\"] = 492995] = \"SituationJob\";\n SimDataGroup[SimDataGroup[\"SlotTypeSet\"] = 1455418] = \"SlotTypeSet\";\n SimDataGroup[SimDataGroup[\"Snippet\"] = 15865569] = \"Snippet\";\n SimDataGroup[SimDataGroup[\"Spell\"] = 3412934] = \"Spell\";\n SimDataGroup[SimDataGroup[\"Statistic\"] = 10208654] = \"Statistic\";\n SimDataGroup[SimDataGroup[\"Street\"] = 14994422] = \"Street\";\n SimDataGroup[SimDataGroup[\"Subroot\"] = 16748322] = \"Subroot\";\n SimDataGroup[SimDataGroup[\"Trait\"] = 6282508] = \"Trait\";\n SimDataGroup[SimDataGroup[\"Tutorial\"] = 4858947] = \"Tutorial\";\n SimDataGroup[SimDataGroup[\"TutorialTip\"] = 11788350] = \"TutorialTip\";\n SimDataGroup[SimDataGroup[\"University\"] = 5821800] = \"University\";\n SimDataGroup[SimDataGroup[\"UniversityCourseData\"] = 1879959] = \"UniversityCourseData\";\n SimDataGroup[SimDataGroup[\"UniversityMajor\"] = 5813100] = \"UniversityMajor\";\n SimDataGroup[SimDataGroup[\"UserInterfaceInfo\"] = 12524251] = \"UserInterfaceInfo\";\n SimDataGroup[SimDataGroup[\"Venue\"] = 12310328] = \"Venue\";\n SimDataGroup[SimDataGroup[\"VideoPlaylist\"] = 12535179] = \"VideoPlaylist\";\n SimDataGroup[SimDataGroup[\"WeatherForecast\"] = 8335928] = \"WeatherForecast\";\n SimDataGroup[SimDataGroup[\"ZoneModifier\"] = 1935269] = \"ZoneModifier\";\n})(SimDataGroup || (SimDataGroup = {}));\n(function (SimDataGroup) {\n /**\n * Returns an array of all SimData groups.\n */\n function all() {\n return (0, helpers_1.getAllEnumValues)(SimDataGroup);\n }\n SimDataGroup.all = all;\n /**\n * Returns the SimDataGroup to use for the given tuning type. The given value\n * does not have to be from the enum, it can also be the plain number.\n *\n * For example, to get the group for a trait, you can do either:\n * ```ts\n * getForTuning(TuningResourceType.Trait)\n * getForTuning(0xCB5FDDC7)\n * ```\n *\n * @param tuningType Tuning type to get SimData group for\n */\n function getForTuning(tuningType) {\n return SimDataGroup[tuning_resources_1.default[tuningType]];\n }\n SimDataGroup.getForTuning = getForTuning;\n})(SimDataGroup || (SimDataGroup = {}));\n// `export default enum` not supported by TS\nexports.default = SimDataGroup;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst helpers_1 = require(\"../common/helpers\");\n/**\n * High bytes to set for specific locales for String Table instances.\n */\nvar StringTableLocale;\n(function (StringTableLocale) {\n StringTableLocale[StringTableLocale[\"English\"] = 0] = \"English\";\n StringTableLocale[StringTableLocale[\"ChineseSimplified\"] = 1] = \"ChineseSimplified\";\n StringTableLocale[StringTableLocale[\"ChineseTraditional\"] = 2] = \"ChineseTraditional\";\n StringTableLocale[StringTableLocale[\"Czech\"] = 3] = \"Czech\";\n StringTableLocale[StringTableLocale[\"Danish\"] = 4] = \"Danish\";\n StringTableLocale[StringTableLocale[\"Dutch\"] = 5] = \"Dutch\";\n StringTableLocale[StringTableLocale[\"Finnish\"] = 6] = \"Finnish\";\n StringTableLocale[StringTableLocale[\"French\"] = 7] = \"French\";\n StringTableLocale[StringTableLocale[\"German\"] = 8] = \"German\";\n StringTableLocale[StringTableLocale[\"Italian\"] = 11] = \"Italian\";\n StringTableLocale[StringTableLocale[\"Japanese\"] = 12] = \"Japanese\";\n StringTableLocale[StringTableLocale[\"Korean\"] = 13] = \"Korean\";\n StringTableLocale[StringTableLocale[\"Norwegian\"] = 14] = \"Norwegian\";\n StringTableLocale[StringTableLocale[\"Polish\"] = 15] = \"Polish\";\n StringTableLocale[StringTableLocale[\"Portuguese\"] = 17] = \"Portuguese\";\n StringTableLocale[StringTableLocale[\"Russian\"] = 18] = \"Russian\";\n StringTableLocale[StringTableLocale[\"Spanish\"] = 19] = \"Spanish\";\n StringTableLocale[StringTableLocale[\"Swedish\"] = 21] = \"Swedish\";\n})(StringTableLocale || (StringTableLocale = {}));\n(function (StringTableLocale) {\n /**\n * Returns an array of all string table locales.\n */\n function all() {\n return (0, helpers_1.getAllEnumValues)(StringTableLocale);\n }\n StringTableLocale.all = all;\n /**\n * Sets the high byte on the instance to the value for the given locale.\n *\n * @param locale Locale to set on instance\n * @param instance Instance to set locale for\n */\n function setHighByte(locale, instance) {\n return StringTableLocale.getInstanceBase(instance) | BigInt(locale) << 56n;\n }\n StringTableLocale.setHighByte = setHighByte;\n /**\n * Determines and returns the locale for the given instance ID.\n *\n * @param instance Instance to get locale from\n */\n function getLocale(instance) {\n return Number(instance >> 56n);\n }\n StringTableLocale.getLocale = getLocale;\n /**\n * Removes the locale code from the given instance and returns the result.\n *\n * @param instance Instance to get base from\n */\n function getInstanceBase(instance) {\n return instance & 0xffffffffffffffn;\n }\n StringTableLocale.getInstanceBase = getInstanceBase;\n /**\n * Returns the 5-letter code that is appended to string table packages that\n * are shipped with the game. Returns undefined if locale is not recognized.\n *\n * @param locale Locale to get code for\n */\n function getLocaleCode(locale) {\n switch (locale) {\n case StringTableLocale.English: return \"ENG_US\";\n case StringTableLocale.ChineseSimplified: return \"CHS_CN\";\n case StringTableLocale.ChineseTraditional: return \"CHT_CN\";\n case StringTableLocale.Czech: return \"CZE_CZ\";\n case StringTableLocale.Danish: return \"DAN_DK\";\n case StringTableLocale.Dutch: return \"DUT_NL\";\n case StringTableLocale.Finnish: return \"FIN_FI\";\n case StringTableLocale.French: return \"FRE_FR\";\n case StringTableLocale.German: return \"GER_DE\";\n case StringTableLocale.Italian: return \"ITA_IT\";\n case StringTableLocale.Japanese: return \"JPN_JP\";\n case StringTableLocale.Korean: return \"KOR_KR\";\n case StringTableLocale.Norwegian: return \"NOR_NO\";\n case StringTableLocale.Polish: return \"POL_PL\";\n case StringTableLocale.Portuguese: return \"POR_BR\";\n case StringTableLocale.Russian: return \"RUS_RU\";\n case StringTableLocale.Spanish: return \"SPA_EA\";\n case StringTableLocale.Swedish: return \"SWE_SE\";\n default: return undefined;\n }\n }\n StringTableLocale.getLocaleCode = getLocaleCode;\n})(StringTableLocale || (StringTableLocale = {}));\n// `export default enum` not supported by TS\nexports.default = StringTableLocale;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ObjectDefinitionType = void 0;\n/**\n * Types of properties in an object definition.\n */\nvar ObjectDefinitionType;\n(function (ObjectDefinitionType) {\n ObjectDefinitionType[ObjectDefinitionType[\"Components\"] = 3873710587] = \"Components\";\n ObjectDefinitionType[ObjectDefinitionType[\"EnvironmentScoreEmotionTags\"] = 561163966] = \"EnvironmentScoreEmotionTags\";\n ObjectDefinitionType[ObjectDefinitionType[\"EnvironmentScoreEmotionTags_32\"] = 558077772] = \"EnvironmentScoreEmotionTags_32\";\n ObjectDefinitionType[ObjectDefinitionType[\"EnvironmentScores\"] = 3704652692] = \"EnvironmentScores\";\n ObjectDefinitionType[ObjectDefinitionType[\"Footprints\"] = 1819507416] = \"Footprints\";\n ObjectDefinitionType[ObjectDefinitionType[\"Icons\"] = 3403602056] = \"Icons\";\n ObjectDefinitionType[ObjectDefinitionType[\"IsBaby\"] = 2934340124] = \"IsBaby\";\n ObjectDefinitionType[ObjectDefinitionType[\"MaterialVariant\"] = 3973425503] = \"MaterialVariant\";\n ObjectDefinitionType[ObjectDefinitionType[\"Models\"] = 2367728838] = \"Models\";\n ObjectDefinitionType[ObjectDefinitionType[\"Name\"] = 3891296134] = \"Name\";\n ObjectDefinitionType[ObjectDefinitionType[\"NegativeEnvironmentScore\"] = 1157395730] = \"NegativeEnvironmentScore\";\n ObjectDefinitionType[ObjectDefinitionType[\"PositiveEnvironmentScore\"] = 1916190442] = \"PositiveEnvironmentScore\";\n ObjectDefinitionType[ObjectDefinitionType[\"Rigs\"] = 3792088655] = \"Rigs\";\n ObjectDefinitionType[ObjectDefinitionType[\"SimoleonPrice\"] = 3841260196] = \"SimoleonPrice\";\n ObjectDefinitionType[ObjectDefinitionType[\"Slots\"] = 2324017139] = \"Slots\";\n ObjectDefinitionType[ObjectDefinitionType[\"ThumbnailGeometryState\"] = 1110702240] = \"ThumbnailGeometryState\";\n ObjectDefinitionType[ObjectDefinitionType[\"Tuning\"] = 2031068348] = \"Tuning\";\n ObjectDefinitionType[ObjectDefinitionType[\"TuningId\"] = 3113485211] = \"TuningId\";\n ObjectDefinitionType[ObjectDefinitionType[\"Unknown1\"] = 2894994368] = \"Unknown1\";\n ObjectDefinitionType[ObjectDefinitionType[\"Unknown2\"] = 3963032294] = \"Unknown2\";\n ObjectDefinitionType[ObjectDefinitionType[\"Unknown3\"] = 1391981756] = \"Unknown3\";\n ObjectDefinitionType[ObjectDefinitionType[\"Unknown4\"] = 4086524560] = \"Unknown4\";\n})(ObjectDefinitionType = exports.ObjectDefinitionType || (exports.ObjectDefinitionType = {}));\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ObjectDefinitionType = exports.TuningResourceType = exports.StringTableLocale = exports.SimDataGroup = exports.EncodingType = exports.DataType = exports.BinaryResourceType = void 0;\nconst binary_resources_1 = __importDefault(require(\"./lib/enums/binary-resources\"));\nexports.BinaryResourceType = binary_resources_1.default;\nconst data_type_1 = __importDefault(require(\"./lib/enums/data-type\"));\nexports.DataType = data_type_1.default;\nconst encoding_type_1 = __importDefault(require(\"./lib/enums/encoding-type\"));\nexports.EncodingType = encoding_type_1.default;\nconst simdata_groups_1 = __importDefault(require(\"./lib/enums/simdata-groups\"));\nexports.SimDataGroup = simdata_groups_1.default;\nconst stbl_locales_1 = __importDefault(require(\"./lib/enums/stbl-locales\"));\nexports.StringTableLocale = stbl_locales_1.default;\nconst tuning_resources_1 = __importDefault(require(\"./lib/enums/tuning-resources\"));\nexports.TuningResourceType = tuning_resources_1.default;\nconst types_1 = require(\"./lib/resources/object-definition/types\");\nObject.defineProperty(exports, \"ObjectDefinitionType\", { enumerable: true, get: function () { return types_1.ObjectDefinitionType; } });\n","\n\n
\n \n
\n

{title}

\n

(Draggable)

\n
\n \n
\n
\n \n
\n\n\n\n","\n\n
\n {#if Boolean(label)}\n
\n \n
\n {/if}\n \n
\n\n\n","\n\n
\n {#if Boolean(label)}\n \n {/if}\n \n {#each options as option, key (key)}\n \n {/each}\n \n
\n\n\n","\n\n
\n \n \n
\n\n\n","\n\n\n
\n \n
\n \n
\n \n
\n {#if filterSettings.fileType === BinaryResourceType.SimData}\n \n
\n {/if}\n {#if filterSettings.fileType === BinaryResourceType.StringTable}\n \n {:else}\n \n {/if}\n
\n \n
\n
\n\n\n","/*!\n\nJSZip v3.10.1 - A JavaScript class for generating and reading zip files\n\n\n(c) 2009-2016 Stuart Knightley \nDual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.\n\nJSZip uses the library pako released under the MIT license :\nhttps://github.com/nodeca/pako/blob/main/LICENSE\n*/\n\n!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this).JSZip=e()}}(function(){return function s(a,o,h){function u(r,e){if(!o[r]){if(!a[r]){var t=\"function\"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error(\"Cannot find module '\"+r+\"'\");throw n.code=\"MODULE_NOT_FOUND\",n}var i=o[r]={exports:{}};a[r][0].call(i.exports,function(e){var t=a[r][1][e];return u(t||e)},i,i.exports,s,a,o,h)}return o[r].exports}for(var l=\"function\"==typeof require&&require,e=0;e>2,s=(3&t)<<4|r>>4,a=1>6:64,o=2>4,r=(15&i)<<4|(s=p.indexOf(e.charAt(o++)))>>2,n=(3&s)<<6|(a=p.indexOf(e.charAt(o++))),l[h++]=t,64!==s&&(l[h++]=r),64!==a&&(l[h++]=n);return l}},{\"./support\":30,\"./utils\":32}],2:[function(e,t,r){\"use strict\";var n=e(\"./external\"),i=e(\"./stream/DataWorker\"),s=e(\"./stream/Crc32Probe\"),a=e(\"./stream/DataLengthProbe\");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a(\"data_length\")),t=this;return e.on(\"end\",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error(\"Bug : uncompressed data size mismatch\")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo(\"compressedSize\",this.compressedSize).withStreamInfo(\"uncompressedSize\",this.uncompressedSize).withStreamInfo(\"crc32\",this.crc32).withStreamInfo(\"compression\",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a(\"uncompressedSize\")).pipe(t.compressWorker(r)).pipe(new a(\"compressedSize\")).withStreamInfo(\"compression\",t)},t.exports=o},{\"./external\":6,\"./stream/Crc32Probe\":25,\"./stream/DataLengthProbe\":26,\"./stream/DataWorker\":27}],3:[function(e,t,r){\"use strict\";var n=e(\"./stream/GenericWorker\");r.STORE={magic:\"\\0\\0\",compressWorker:function(){return new n(\"STORE compression\")},uncompressWorker:function(){return new n(\"STORE decompression\")}},r.DEFLATE=e(\"./flate\")},{\"./flate\":7,\"./stream/GenericWorker\":28}],4:[function(e,t,r){\"use strict\";var n=e(\"./utils\");var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?\"string\"!==n.getTypeOf(e)?function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},{\"./utils\":32}],5:[function(e,t,r){\"use strict\";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){\"use strict\";var n=null;n=\"undefined\"!=typeof Promise?Promise:e(\"lie\"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){\"use strict\";var n=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Uint32Array,i=e(\"pako\"),s=e(\"./utils\"),a=e(\"./stream/GenericWorker\"),o=n?\"uint8array\":\"array\";function h(e,t){a.call(this,\"FlateWorker/\"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic=\"\\b\\0\",s.inherits(h,a),h.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(e){return new h(\"Deflate\",e)},r.uncompressWorker=function(){return new h(\"Inflate\",{})}},{\"./stream/GenericWorker\":28,\"./utils\":32,pako:38}],8:[function(e,t,r){\"use strict\";function A(e,t){var r,n=\"\";for(r=0;r>>=8;return n}function n(e,t,r,n,i,s){var a,o,h=e.file,u=e.compression,l=s!==O.utf8encode,f=I.transformTo(\"string\",s(h.name)),c=I.transformTo(\"string\",O.utf8encode(h.name)),d=h.comment,p=I.transformTo(\"string\",s(d)),m=I.transformTo(\"string\",O.utf8encode(d)),_=c.length!==h.name.length,g=m.length!==d.length,b=\"\",v=\"\",y=\"\",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(x.crc32=e.crc32,x.compressedSize=e.compressedSize,x.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),\"UNIX\"===i?(C=798,z|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(e){return 63&(e||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+c,b+=\"up\"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+=\"uc\"+A(y.length,2)+y);var E=\"\";return E+=\"\\n\\0\",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+\"\\0\\0\\0\\0\"+A(z,4)+A(n,4)+f+b+p}}var I=e(\"../utils\"),i=e(\"../stream/GenericWorker\"),O=e(\"../utf8\"),B=e(\"../crc32\"),R=e(\"../signature\");function s(e,t,r,n){i.call(this,\"ZipFileWorker\"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}I.inherits(s,i),s.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},s.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},s.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return R.DATA_DESCRIPTOR+A(e.crc32,4)+A(e.compressedSize,4)+A(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},s.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo(\"string\",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{\"../utils\":32}],19:[function(e,t,r){\"use strict\";var n=e(\"./Uint8ArrayReader\");function i(e){n.call(this,e)}e(\"../utils\").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{\"../utils\":32,\"./Uint8ArrayReader\":21}],20:[function(e,t,r){\"use strict\";var n=e(\"./DataReader\");function i(e){n.call(this,e)}e(\"../utils\").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{\"../utils\":32,\"./DataReader\":18}],21:[function(e,t,r){\"use strict\";var n=e(\"./ArrayReader\");function i(e){n.call(this,e)}e(\"../utils\").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{\"../utils\":32,\"./ArrayReader\":17}],22:[function(e,t,r){\"use strict\";var n=e(\"../utils\"),i=e(\"../support\"),s=e(\"./ArrayReader\"),a=e(\"./StringReader\"),o=e(\"./NodeBufferReader\"),h=e(\"./Uint8ArrayReader\");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),\"string\"!==t||i.uint8array?\"nodebuffer\"===t?new o(e):i.uint8array?new h(n.transformTo(\"uint8array\",e)):new s(n.transformTo(\"array\",e)):new a(e)}},{\"../support\":30,\"../utils\":32,\"./ArrayReader\":17,\"./NodeBufferReader\":19,\"./StringReader\":20,\"./Uint8ArrayReader\":21}],23:[function(e,t,r){\"use strict\";r.LOCAL_FILE_HEADER=\"PK\u0003\u0004\",r.CENTRAL_FILE_HEADER=\"PK\u0001\u0002\",r.CENTRAL_DIRECTORY_END=\"PK\u0005\u0006\",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR=\"PK\u0006\u0007\",r.ZIP64_CENTRAL_DIRECTORY_END=\"PK\u0006\u0006\",r.DATA_DESCRIPTOR=\"PK\u0007\\b\"},{}],24:[function(e,t,r){\"use strict\";var n=e(\"./GenericWorker\"),i=e(\"../utils\");function s(e){n.call(this,\"ConvertWorker to \"+e),this.destType=e}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{\"../utils\":32,\"./GenericWorker\":28}],25:[function(e,t,r){\"use strict\";var n=e(\"./GenericWorker\"),i=e(\"../crc32\");function s(){n.call(this,\"Crc32Probe\"),this.withStreamInfo(\"crc32\",0)}e(\"../utils\").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{\"../crc32\":4,\"../utils\":32,\"./GenericWorker\":28}],26:[function(e,t,r){\"use strict\";var n=e(\"../utils\"),i=e(\"./GenericWorker\");function s(e){i.call(this,\"DataLengthProbe for \"+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{\"../utils\":32,\"./GenericWorker\":28}],27:[function(e,t,r){\"use strict\";var n=e(\"../utils\"),i=e(\"./GenericWorker\");function s(e){i.call(this,\"DataWorker\");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=\"\",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case\"string\":e=this.data.substring(this.index,t);break;case\"uint8array\":e=this.data.subarray(this.index,t);break;case\"array\":case\"nodebuffer\":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{\"../utils\":32,\"./GenericWorker\":28}],28:[function(e,t,r){\"use strict\";function n(e){this.name=e||\"default\",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit(\"data\",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(\"end\"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(\"error\",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(\"error\",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r \"+e:e}},t.exports=n},{}],29:[function(e,t,r){\"use strict\";var h=e(\"../utils\"),i=e(\"./ConvertWorker\"),s=e(\"./GenericWorker\"),u=e(\"../base64\"),n=e(\"../support\"),a=e(\"../external\"),o=null;if(n.nodestream)try{o=e(\"../nodejs/NodejsStreamOutputAdapter\")}catch(e){}function l(e,o){return new a.Promise(function(t,r){var n=[],i=e._internalType,s=e._outputType,a=e._mimeType;e.on(\"data\",function(e,t){n.push(e),o&&o(t)}).on(\"error\",function(e){n=[],r(e)}).on(\"end\",function(){try{var e=function(e,t,r){switch(e){case\"blob\":return h.newBlob(h.transformTo(\"arraybuffer\",t),r);case\"base64\":return u.encode(t);default:return h.transformTo(e,t)}}(s,function(e,t){var r,n=0,i=null,s=0;for(r=0;r>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},s.utf8decode=function(e){return h.nodebuffer?o.transformTo(\"nodebuffer\",e).toString(\"utf-8\"):function(e){var t,r,n,i,s=e.length,a=new Array(2*s);for(t=r=0;t>10&1023,a[r++]=56320|1023&n)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(e=o.transformTo(h.uint8array?\"uint8array\":\"array\",e))},o.inherits(a,n),a.prototype.processChunk=function(e){var t=o.transformTo(h.uint8array?\"uint8array\":\"array\",e.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}(t),i=t;n!==t.length&&(h.uint8array?(i=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(i=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:s.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=a,o.inherits(l,n),l.prototype.processChunk=function(e){this.push({data:s.utf8encode(e.data),meta:e.meta})},s.Utf8EncodeWorker=l},{\"./nodejsUtils\":14,\"./stream/GenericWorker\":28,\"./support\":30,\"./utils\":32}],32:[function(e,t,a){\"use strict\";var o=e(\"./support\"),h=e(\"./base64\"),r=e(\"./nodejsUtils\"),u=e(\"./external\");function n(e){return e}function l(e,t){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||\"/\"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new h.Buf8(e.length),r=0,n=t.length;r>10&1023,o[n++]=56320|1023&i)}return l(o,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}},{\"./common\":41}],43:[function(e,t,r){\"use strict\";t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){\"use strict\";var h,c=e(\"../utils/common\"),u=e(\"./trees\"),d=e(\"./adler32\"),p=e(\"./crc32\"),n=e(\"./messages\"),l=0,f=4,m=0,_=-2,g=-1,b=4,i=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(e,t){return e.msg=n[t],t}function T(e){return(e<<1)-(4e.avail_out&&(r=e.avail_out),0!==r&&(c.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function N(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function U(e,t){e.pending_buf[e.pending++]=t}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function L(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,h=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,u=e.window,l=e.w_mask,f=e.prev,c=e.strstart+S,d=u[s+a-1],p=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===d&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&sh&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,r,n,i,s,a,o,h,u,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-z)){for(c.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f}if(0===e.strm.avail_in)break;if(a=e.strm,o=e.window,h=e.strstart+e.lookahead,u=i,l=void 0,l=a.avail_in,u=x)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x)if(n=u._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-x,n=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===l)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,N(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-z&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(e,t){return Y(e,t,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?_:(e.state.gzhead=t,m):_},r.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||5>8&255),U(n,n.gzhead.time>>16&255),U(n,n.gzhead.time>>24&255),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(U(n,255&n.gzhead.extra.length),U(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=p(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(U(n,0),U(n,0),U(n,0),U(n,0),U(n,0),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,3),n.status=E);else{var a=v+(n.w_bits-8<<4)<<8;a|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=E,P(n,a),0!==n.strstart&&(P(n,e.adler>>>16),P(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending!==n.pending_buf_size));)U(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindexi&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&F(e),n.pending+2<=n.pending_buf_size&&(U(n,255&e.adler),U(n,e.adler>>8&255),e.adler=0,n.status=E)):n.status=E),0!==n.pending){if(F(e),0===e.avail_out)return n.last_flush=-1,m}else if(0===e.avail_in&&T(t)<=T(r)&&t!==f)return R(e,-5);if(666===n.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==l&&666!==n.status){var o=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===l)return A;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=S){if(j(e),e.lookahead<=S&&t===l)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=x?(r=u._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):h[n.level].func(n,t);if(o!==O&&o!==B||(n.status=666),o===A||o===O)return 0===e.avail_out&&(n.last_flush=-1),m;if(o===I&&(1===t?u._tr_align(n):5!==t&&(u._tr_stored_block(n,0,0,!1),3===t&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),F(e),0===e.avail_out))return n.last_flush=-1,m}return t!==f?m:n.wrap<=0?1:(2===n.wrap?(U(n,255&e.adler),U(n,e.adler>>8&255),U(n,e.adler>>16&255),U(n,e.adler>>24&255),U(n,255&e.total_in),U(n,e.total_in>>8&255),U(n,e.total_in>>16&255),U(n,e.total_in>>24&255)):(P(n,e.adler>>>16),P(n,65535&e.adler)),F(e),0=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new c.Buf8(r.w_size),c.arraySet(u,t,l-r.w_size,r.w_size,0),t=u,l=r.w_size),a=e.avail_in,o=e.next_in,h=e.input,e.avail_in=l,e.next_in=0,e.input=t,j(r);r.lookahead>=x;){for(n=r.strstart,i=r.lookahead-(x-1);r.ins_h=(r.ins_h<>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<>>=y,p-=y),p<15&&(d+=z[n++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<>>=y,p-=y,(y=s-a)>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=\"\",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg=\"incorrect header check\",r.mode=30;break}if(8!=(15&u)){e.msg=\"unknown compression method\",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg=\"invalid window size\",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg=\"invalid block type\",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<>>16^65535)){e.msg=\"invalid stored block lengths\",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg=\"invalid code lengths set\",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l>>=_,l-=_,0===r.have){e.msg=\"invalid bit length repeat\",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l>>=_)),u>>>=3,l-=3}else{for(z=_+7;l>>=_)),u>>>=7,l-=7}if(r.have+d>r.nlen+r.ndist){e.msg=\"invalid bit length repeat\",r.mode=30;break}for(;d--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){e.msg=\"invalid code -- missing end-of-block\",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg=\"invalid literal/lengths set\",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg=\"invalid distances set\",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg=\"invalid literal/length code\",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg=\"invalid distance code\",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg=\"invalid distance too far back\",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg=\"invalid distance too far back\",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=a-r.offset,d=r.length;for(hd?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]]}if(k>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o))}}function W(e){var t;for(t=0;t>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u>=7;n>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{\"../utils/common\":41}],53:[function(e,t,r){\"use strict\";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(r,n){\"use strict\";if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i=\"[object process]\"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e)})}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1},r.postMessage(\"\",\"*\"),r.onmessage=t,e}}()?(a=\"setImmediate$\"+Math.random()+\"$\",r.addEventListener?r.addEventListener(\"message\",d,!1):r.attachEvent(\"onmessage\",d),function(e){r.postMessage(a+e,\"*\")}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data)},function(e){t.port2.postMessage(e)}):l&&\"onreadystatechange\"in l.createElement(\"script\")?(s=l.documentElement,function(e){var t=l.createElement(\"script\");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null},s.appendChild(t)}):function(e){setTimeout(c,0,e)},e.setImmediate=function(e){\"function\"!=typeof e&&(e=new Function(\"\"+e));for(var t=new Array(arguments.length-1),r=0;r=b.status}function e(a){try{a.dispatchEvent(new MouseEvent(\"click\"))}catch(c){var b=document.createEvent(\"MouseEvents\");b.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f=\"object\"==typeof window&&window.window===window?window:\"object\"==typeof self&&self.self===self?self:\"object\"==typeof global&&global.global===global?global:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||(\"object\"!=typeof window||window!==f?function(){}:\"download\"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement(\"a\");g=g||b.name||\"download\",j.download=g,j.rel=\"noopener\",\"string\"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target=\"_blank\")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:\"msSaveOrOpenBlob\"in navigator?function(f,g,h){if(g=g||f.name||\"download\",\"string\"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement(\"a\");i.href=f,i.target=\"_blank\",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open(\"\",\"_blank\"),g&&(g.document.title=g.document.body.innerText=\"downloading...\"),\"string\"==typeof b)return c(b,d,e);var h=\"application/octet-stream\"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\\/[\\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&\"undefined\"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,\"data:attachment/file;\"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,\"undefined\"!=typeof module&&(module.exports=g)});\n\n//# sourceMappingURL=FileSaver.min.js.map","\n\n
\n {#if isDownloading}\n

Downloading...

\n {:else}\n

Download:

\n \n \n \"Download\"\n \n {/if}\n
\n","\n\n\n (showFilterWindow = !showFilterWindow)}\n title=\"Filter\"\n >\n \"Filter\"\n

Filter

\n \n \n \"Close\"\n

Close

\n \n \n \n
\n {#if pkg != undefined}\n {#if filteredEntries && filteredEntries?.length !== pkg.size}\n
\n
\n \n

\n {filteredText}\n

\n
\n \n
\n {/if}\n {#if filteredEntries?.length}\n {#each filteredEntries as entry (entry.id)}\n (selectedIndex = entry.id)}\n {entriesMenuElement}\n {onWarningClick}\n {entry}\n {viewSettings}\n warnings={warnings.get(entry.id)}\n active={selectedIndex === entry.id}\n />\n {/each}\n {:else}\n
\n

No entries found.

\n
\n {/if}\n {/if}\n
\n \n\n\n{#if showFilterWindow}\n (showFilterWindow = false)}\n />\n{/if}\n\n{#if showViewWindow}\n (showViewWindow = false)}\n />\n{/if}\n\n\n","\n\n\n {#if leftIsCollapsed}\n \n {leftPanelName}\n \n {/if}\n