narrat 0.18.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // Version: 0.18.0 - June 25, 2022 02:07:06
1
+ // Version: 1.2.0 - June 25, 2022 14:14:05
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -34,7 +34,7 @@ function styleInject(css, ref) {
34
34
  }
35
35
  }
36
36
 
37
- var css_248z = "/*! @import */\n\n/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'],\n[type='reset'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their instrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity));\n}\n\n.border {\n border-width: 1px;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.hidden {\n display: none;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.flex-shrink {\n flex-shrink: 1;\n}\n\n.list-disc {\n list-style-type: disc;\n}\n\n.absolute {\n position: absolute;\n}\n\n.resize {\n resize: both;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.table-auto {\n table-layout: auto;\n}\n\n.line-through {\n text-decoration: line-through;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n:root {\n --bg-color: #131720;\n --text-color: #d9e1f2;\n --primary: hsl(255, 30%, 55%);\n --focus: hsl(210, 90%, 50%);\n --secondary: #42b983;\n --border-color: hsla(0, 0%, 100%, 0.2);\n --light-1: hsl(210, 30%, 40%);\n --light-2: hsl(255, 30%, 50%);\n --light-background: linear-gradient(to right, var(--light-1), var(--light-2));\n --shadow-1: hsla(236, 50%, 50%, 0.3);\n --shadow-2: hsla(236, 50%, 50%, 0.4);\n --hud-background: rgba(0, 0, 0, 0.4);\n --hud-text-color: var(--text-color);\n --notifications-bg: darkslateblue;\n --skills-text-background: rgba(0, 0, 0, 0.5);\n --skills-text-color: var(--text-color);\n --skills-level-background: rgba(0, 0, 0, 0.5);\n --skills-level-color: orange;\n --skills-xp-bar-height: 40px;\n --skill-check-name-color: orange;\n --skill-check-difficulty: orange;\n --skill-check-success: green;\n --skill-check-failed: red;\n --skill-check-color: orange;\n --dialog-choice-color: orange;\n --dialog-choice-hover-color: var(--text-color);\n --inventory-text-background: rgba(0, 0, 0, 0.5);\n --inventory-text-color: var(--text-color);\n --inventory-amount-background: rgba(0, 0, 0, 0.5);\n --inventory-amount-color: orange;\n}\n\n.list-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.list-enter-active,\n.list-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .list-move {\n transition: transform 0.3s ease;\n} */\n\n.list-enter-from,\n.list-leave-to {\n opacity: 0;\n transform: translateX(300px);\n}\n\n.notification-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.notification-enter-active,\n.notification-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .notification-move {\n transition: transform 0.3s ease;\n} */\n\n.notification-enter-from,\n.notification-leave-to {\n opacity: 0;\n transform: translateY(-300px);\n}\n\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\n.fade-leave-to {\n opacity: 0;\n}\n\n.fade-in-enter-active {\n transition: opacity 0.1s ease;\n}\n\n.fade-in-enter-from {\n opacity: 0;\n}\n\nbody {\n padding: 0;\n margin: 0;\n font-family: Arial, sans-serif;\n background-color: black;\n}\n\n.select {\n background: var(--light-background);\n padding: 10px;\n}\n\n.option {\n background-color: var(--light-2);\n padding: 5px;\n color: var(--text-color);\n}\n\n.button {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.button:focus,\n.button:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\n.input {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.input:focus,\n.input:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\ntd {\n padding: 4px;\n border: 1px solid var(--text-color);\n text-align: center;\n}\n\n#game-holder {\n width: 100vw;\n height: 100vh;\n padding: 0;\n margin: 0;\n top: 0;\n left: 0;\n background-color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: -webkit-fill-available;\n}\n\n.title {\n font-size: 30px;\n font-weight: 700;\n text-align: center;\n}\n\n.container {\n padding: 20px;\n}\n\nh1,\nh2,\nh3,\nh4 {\n font-weight: 700;\n}\n\nh1 {\n font-size: 30px;\n}\n\nh2 {\n font-size: 26px;\n}\n\nh3 {\n font-size: 24px;\n}\n\nhr.solid {\n border: 1px solid var(--text-color);\n margin-top: 30px;\n margin-bottom: 30px;\n}\n\n.card-1 {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.card-1:hover {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-2 {\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-3 {\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-4 {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-5 {\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);\n}\n\n.dialog-choice {\n transition: 0.2s;\n}\n\n.dialog-choice:hover {\n transform: scale(1.05, 1.05);\n transform-origin: center;\n}\n\n/* Somewhat arcane CSS to force the hover color to override the child style.\nOtherwise hovering choices doesn't change the color of skill check prompts. */\n\n.dialog-choice:not(:hover) > .skill-check-name,\n.passive-skill-check > .skill-check-name {\n color: var(--skill-check-name-color);\n}\n\n.dialog-choice:not(:hover) > .skill-check-difficulty,\n.passive-skill-check > .skill-check-difficulty {\n color: var(--skill-check-difficulty);\n}\n\n.skill-check-difficulty {\n font-weight: 700;\n}\n\n.dialog-choice:not(:hover) > .skill-check-success,\n.passive-skill-check > .skill-check-success {\n color: var(--skill-check-success);\n}\n\n.dialog-choice:not(:hover) > .skill-check-failed,\n.passive-skill-check > .skill-check-failed {\n color: var(--skill-check-failed);\n}\n\n.dialog-choice:not(:hover) > .skill-check,\n.passive-skill-check.skill-check {\n color: var(--skill-check-color);\n}\n\n.narrat-canvas {\n position: absolute;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n/* Looks ugly */\n\n/* @keyframes strike-anim {\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n}\n.strike-anim {\n position: relative;\n}\n.strike-anim::after {\n content: ' ';\n position: absolute;\n top: 50%;\n left: 0;\n width: 100%;\n height: 1px;\n background: var(--text-color);\n animation-name: strike-anim;\n animation-duration: 0.5s;\n animation-timing-function: linear;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n} */\n\n#touchTrigger {\n pointer-events: none;\n}\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\n";
37
+ var css_248z = "/*! @import */\n\n/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */\n\n/*\nDocument\n========\n*/\n\n/**\nUse a better box model (opinionated).\n*/\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n/**\nUse a more readable tab size (opinionated).\n*/\n\n:root {\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n\n/**\n1. Correct the line height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n*/\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/*\nSections\n========\n*/\n\n/**\nRemove the margin in all browsers.\n*/\n\nbody {\n margin: 0;\n}\n\n/**\nImprove consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n*/\n\nbody {\n font-family:\n\t\tsystem-ui,\n\t\t-apple-system, /* Firefox supports this but not yet `system-ui` */\n\t\t'Segoe UI',\n\t\tRoboto,\n\t\tHelvetica,\n\t\tArial,\n\t\tsans-serif,\n\t\t'Apple Color Emoji',\n\t\t'Segoe UI Emoji';\n}\n\n/*\nGrouping content\n================\n*/\n\n/**\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n}\n\n/*\nText-level semantics\n====================\n*/\n\n/**\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr[title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/**\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)\n2. Correct the odd 'em' font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family:\n\t\tui-monospace,\n\t\tSFMono-Regular,\n\t\tConsolas,\n\t\t'Liberation Mono',\n\t\tMenlo,\n\t\tmonospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/**\nPrevent 'sub' and 'sup' elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\nTabular data\n============\n*/\n\n/**\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n}\n\n/*\nForms\n=====\n*/\n\n/**\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\nRemove the inheritance of text transform in Edge and Firefox.\n1. Remove the inheritance of text transform in Firefox.\n*/\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\nCorrect the inability to style clickable types in iOS and Safari.\n*/\n\nbutton,\n[type='button'],\n[type='reset'] {\n -webkit-appearance: button;\n}\n\n/**\nRemove the inner border and padding in Firefox.\n*/\n\n/**\nRestore the focus styles unset by the previous rule.\n*/\n\n/**\nRemove the additional ':invalid' styles in Firefox.\nSee: https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737\n*/\n\n/**\nRemove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers.\n*/\n\nlegend {\n padding: 0;\n}\n\n/**\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n/**\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n/**\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to 'inherit' in Safari.\n*/\n\n/*\nInteractive\n===========\n*/\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/**\n * Manually forked from SUIT CSS Base: https://github.com/suitcss/base\n * A thin layer on top of normalize.css that provides a starting point more\n * suitable for web applications.\n */\n\n/**\n * Removes the default spacing and border for appropriate elements.\n */\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nbutton {\n background-color: transparent;\n background-image: none;\n}\n\n/**\n * Work around a Firefox/IE bug where the transparent `button` background\n * results in a loss of the default `button` focus styles.\n */\n\nbutton:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nol,\nul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/**\n * Tailwind custom reset styles\n */\n\n/**\n * 1. Use the user's configured `sans` font-family (with Tailwind's default\n * sans-serif font stack as a fallback) as a sane default.\n * 2. Use Tailwind's default \"normal\" line-height so the user isn't forced\n * to override it to ensure consistency even when using the default theme.\n */\n\nhtml {\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 1 */\n line-height: 1.5; /* 2 */\n}\n\n/**\n * Inherit font-family and line-height from `html` so users can set them as\n * a class directly on the `html` element.\n */\n\nbody {\n font-family: inherit;\n line-height: inherit;\n}\n\n/**\n * 1. Prevent padding and border from affecting element width.\n *\n * We used to set this in the html element and inherit from\n * the parent element for everything else. This caused issues\n * in shadow-dom-enhanced elements like <details> where the content\n * is wrapped by a div with box-sizing set to `content-box`.\n *\n * https://github.com/mozdevs/cssremedy/issues/4\n *\n *\n * 2. Allow adding a border to an element by just adding a border-width.\n *\n * By default, the way the browser specifies that an element should have no\n * border is by setting it's border-style to `none` in the user-agent\n * stylesheet.\n *\n * In order to easily add borders to elements by just setting the `border-width`\n * property, we change the default border-style for all elements to `solid`, and\n * use border-width to hide them instead. This way our `border` utilities only\n * need to set the `border-width` property instead of the entire `border`\n * shorthand, making our border utilities much more straightforward to compose.\n *\n * https://github.com/tailwindcss/tailwindcss/pull/116\n */\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n/*\n * Ensure horizontal rules are visible by default\n */\n\nhr {\n border-top-width: 1px;\n}\n\n/**\n * Undo the `border-style: none` reset that Normalize applies to images so that\n * our `border-{width}` utilities have the expected effect.\n *\n * The Normalize reset is unnecessary for us since we default the border-width\n * to 0 on all elements.\n *\n * https://github.com/tailwindcss/tailwindcss/issues/362\n */\n\nimg {\n border-style: solid;\n}\n\ntextarea {\n resize: vertical;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #9ca3af;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #9ca3af;\n}\n\ninput::placeholder,\ntextarea::placeholder {\n color: #9ca3af;\n}\n\nbutton {\n cursor: pointer;\n}\n\ntable {\n border-collapse: collapse;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/**\n * Reset links to optimize for opt-in styling instead of\n * opt-out.\n */\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/**\n * Reset form element properties that are easy to forget to\n * style explicitly so you don't inadvertently introduce\n * styles that deviate from your design system. These styles\n * supplement a partial reset that is already applied by\n * normalize.css.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n padding: 0;\n line-height: inherit;\n color: inherit;\n}\n\n/**\n * Use the configured 'mono' font family for elements that\n * are expected to be rendered with a monospace font, falling\n * back to the system monospace stack if there is no configured\n * 'mono' font family.\n */\n\npre,\ncode,\nkbd,\nsamp {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n\n/**\n * Make replaced elements `display: block` by default as that's\n * the behavior you want almost all of the time. Inspired by\n * CSS Remedy, with `svg` added as well.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block;\n vertical-align: middle;\n}\n\n/**\n * Constrain images and videos to the parent width and preserve\n * their instrinsic aspect ratio.\n *\n * https://github.com/mozdevs/cssremedy/issues/14\n */\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n .container {\n max-width: 1536px;\n }\n}\n\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity));\n}\n\n.border {\n border-width: 1px;\n}\n\n.flex {\n display: flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.hidden {\n display: none;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.flex-shrink {\n flex-shrink: 1;\n}\n\n.list-disc {\n list-style-type: disc;\n}\n\n.absolute {\n position: absolute;\n}\n\n.resize {\n resize: both;\n}\n\n* {\n --tw-shadow: 0 0 #0000;\n}\n\n* {\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgba(59, 130, 246, 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n}\n\n.table-auto {\n table-layout: auto;\n}\n\n.line-through {\n text-decoration: line-through;\n}\n\n.w-full {\n width: 100%;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n\n.transform {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n\n.transition {\n transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n@-webkit-keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n@-webkit-keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@keyframes pulse {\n 50% {\n opacity: .5;\n }\n}\n\n@-webkit-keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n -webkit-animation-timing-function: cubic-bezier(0.8,0,1,1);\n animation-timing-function: cubic-bezier(0.8,0,1,1);\n }\n\n 50% {\n transform: none;\n -webkit-animation-timing-function: cubic-bezier(0,0,0.2,1);\n animation-timing-function: cubic-bezier(0,0,0.2,1);\n }\n}\n\n:root {\n --bg-color: #131720;\n --text-color: #d9e1f2;\n --primary: hsl(255, 30%, 55%);\n --focus: hsl(210, 90%, 50%);\n --secondary: #42b983;\n --border-color: hsla(0, 0%, 100%, 0.2);\n --light-1: hsl(210, 30%, 40%);\n --light-2: hsl(255, 30%, 50%);\n --light-background: linear-gradient(to right, var(--light-1), var(--light-2));\n --shadow-1: hsla(236, 50%, 50%, 0.3);\n --shadow-2: hsla(236, 50%, 50%, 0.4);\n --hud-background: rgba(0, 0, 0, 0.4);\n --hud-text-color: var(--text-color);\n --notifications-bg: darkslateblue;\n --skills-text-background: rgba(0, 0, 0, 0.5);\n --skills-text-color: var(--text-color);\n --skills-level-background: rgba(0, 0, 0, 0.5);\n --skills-level-color: orange;\n --skills-xp-bar-height: 40px;\n --skill-check-name-color: orange;\n --skill-check-difficulty: orange;\n --skill-check-success: green;\n --skill-check-failed: red;\n --skill-check-color: orange;\n --dialog-choice-color: orange;\n --dialog-choice-hover-color: var(--text-color);\n --inventory-text-background: rgba(0, 0, 0, 0.5);\n --inventory-text-color: var(--text-color);\n --inventory-amount-background: rgba(0, 0, 0, 0.5);\n --inventory-amount-color: orange;\n --quest-title-color: yellow;\n --completed-quest-title-color: grey;\n --objective-in-progress-color: white;\n --objective-completed-color: grey;\n}\n\n.list-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.list-enter-active,\r\n.list-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .list-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.list-enter-from,\r\n.list-leave-to {\n opacity: 0;\n transform: translateX(300px);\n}\n\n.notification-item {\n display: inline-block;\n margin-right: 10px;\n}\n\n.notification-enter-active,\r\n.notification-leave-active {\n transition: all 0.3s ease;\n}\n\n/* .notification-move {\r\n transition: transform 0.3s ease;\r\n} */\n\n.notification-enter-from,\r\n.notification-leave-to {\n opacity: 0;\n transform: translateY(-300px);\n}\n\n.fade-enter-active,\r\n.fade-leave-active {\n transition: opacity 0.3s ease;\n}\n\n.fade-enter-from,\r\n.fade-leave-to {\n opacity: 0;\n}\n\n.fade-in-enter-active {\n transition: opacity 0.1s ease;\n}\n\n.fade-in-enter-from {\n opacity: 0;\n}\n\nbody {\n padding: 0;\n margin: 0;\n font-family: Arial, sans-serif;\n background-color: black;\n}\n\n.select {\n background: var(--light-background);\n padding: 10px;\n}\n\n.option {\n background-color: var(--light-2);\n padding: 5px;\n color: var(--text-color);\n}\n\n.button {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.button:focus,\r\n.button:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\n.input {\n background: var(--light-background);\n color: var(--text-color);\n box-shadow: 0.4rem 0.4rem 2.4rem 0.2rem var(--shadow-1);\n border-radius: 100px;\n padding: 10px;\n font-weight: 800;\n font-size: 16px;\n margin: 10px;\n transition: 0.2s;\n}\n\n.input:focus,\r\n.input:hover {\n transform: translateY(-0.2rem);\n box-shadow: 0 0 2.4rem 0.2rem var(--shadow-2);\n}\n\na {\n color: pink;\n text-decoration: underline;\n}\n\nth,\r\ntd {\n padding: 4px;\n border: 1px solid var(--text-color);\n text-align: center;\n}\n\n#game-holder {\n width: 100vw;\n height: 100vh;\n padding: 0;\n margin: 0;\n top: 0;\n left: 0;\n background-color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: -webkit-fill-available;\n}\n\n.title {\n font-size: 30px;\n font-weight: 700;\n text-align: center;\n}\n\n.container {\n padding: 20px;\n}\n\nh1,\r\nh2,\r\nh3,\r\nh4 {\n font-weight: 700;\n}\n\nh1 {\n font-size: 30px;\n}\n\nh2 {\n font-size: 26px;\n}\n\nh3 {\n font-size: 24px;\n}\n\nhr.solid {\n border: 1px solid var(--text-color);\n margin-top: 30px;\n margin-bottom: 30px;\n}\n\n.card-1 {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);\n transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);\n}\n\n.card-1:hover {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-2 {\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-3 {\n box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);\n}\n\n.card-4 {\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n\n.card-5 {\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);\n}\n\n.dialog-choice {\n transition: 0.2s;\n}\n\n.dialog-choice:hover {\n transform: scale(1.05, 1.05);\n transform-origin: center;\n}\n\n/* Somewhat arcane CSS to force the hover color to override the child style.\r\nOtherwise hovering choices doesn't change the color of skill check prompts. */\n\n.dialog-choice:not(:hover) > .skill-check-name,\r\n.passive-skill-check > .skill-check-name {\n color: var(--skill-check-name-color);\n}\n\n.dialog-choice:not(:hover) > .skill-check-difficulty,\r\n.passive-skill-check > .skill-check-difficulty {\n color: var(--skill-check-difficulty);\n}\n\n.skill-check-difficulty {\n font-weight: 700;\n}\n\n.dialog-choice:not(:hover) > .skill-check-success,\r\n.passive-skill-check > .skill-check-success {\n color: var(--skill-check-success);\n}\n\n.dialog-choice:not(:hover) > .skill-check-failed,\r\n.passive-skill-check > .skill-check-failed {\n color: var(--skill-check-failed);\n}\n\n.dialog-choice:not(:hover) > .skill-check,\r\n.passive-skill-check.skill-check {\n color: var(--skill-check-color);\n}\n\n.narrat-canvas {\n position: absolute;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n/* Looks ugly */\n\n/* @keyframes strike-anim {\r\n 0% {\r\n width: 0;\r\n }\r\n 100% {\r\n width: 100%;\r\n }\r\n}\r\n.strike-anim {\r\n position: relative;\r\n}\r\n.strike-anim::after {\r\n content: ' ';\r\n position: absolute;\r\n top: 50%;\r\n left: 0;\r\n width: 100%;\r\n height: 1px;\r\n background: var(--text-color);\r\n animation-name: strike-anim;\r\n animation-duration: 0.5s;\r\n animation-timing-function: linear;\r\n animation-iteration-count: 1;\r\n animation-fill-mode: forwards;\r\n} */\n\n#touchTrigger {\n pointer-events: none;\n}\n\n@media (min-width: 640px) {\n}\n\n@media (min-width: 768px) {\n}\n\n@media (min-width: 1024px) {\n}\n\n@media (min-width: 1280px) {\n}\n\n@media (min-width: 1536px) {\n}\r\n";
38
38
  styleInject(css_248z);
39
39
 
40
40
  const f=vue.ref([]),v=vue.ref(null),m=vue.ref(null),g=vue.ref(null),h=vue.reactive({current:""}),y=[],b=vue.ref(!1),k=vue.readonly(f),w=vue.readonly(v),M=vue.readonly(m),q=vue.readonly(g),x=vue.readonly(h),$=(e=w.value)=>{h.current=e;const t=k.value.findIndex((t=>t.name===e)),n=k.value.map((e=>e.name));for(let a=0;a<n.length;a++){if(a>0&&a<n.length-1){const e=n[a]+"Minus",r=n[a]+"Plus";h[e]=t<=a,h[r]=t>=a;}h[n[a]]=n[a]===e;}},V=(e=M.value)=>{h.orientation=e,h.isLandscape="landscape"===e,h.isPortrait="portrait"===e;},O=(e=q.value||"light")=>{h.theme=e,h.isDark="dark"===e,h.isLight="light"===e;};function j(e,t){if("undefined"==typeof window||!window.matchMedia)return !1;if("undefined"!=typeof window&&!window.matchMedia)return console.error("Vue3 Mq: No MatchMedia support detected in this browser. Responsive breakpoints not available."),!1;{b.value=!0;const n=window.matchMedia(e),a=({matches:e})=>{e&&t();};y.push({mql:n,cb:a});n.addEventListener&&"function"==typeof n.addEventListener?n.addEventListener("change",a):n.addListener(a),a(n);}}var L=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",bootstrap5:{xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},bootstrap4:{xs:0,sm:576,md:768,lg:992,xl:1200},bootstrap3:{xs:0,sm:768,md:992,lg:1200},vuetify:{xs:0,sm:600,md:960,lg:1264,xl:1904},tailwind:{xs:0,sm:640,md:768,lg:1024,xl:1280,xxl:1536},devices:{phone:0,tablet:768,laptop:1370,desktop:1906}});const T=e=>{if(!e||"object"!=typeof e)return !1;const t=[];for(let n in e){const a=parseFloat(e[n]);n&&"string"==typeof n?/^[^a-z]/i.test(n)||/[^a-zA-Z0-9_]/.test(n)?console.warn(`Vue3 Mq: "${n}" is an invalid breakpoint key. Breakpoint keys must start with a letter and contain only alphanumeric characters and underscores. Skipping.`):!a&&0!==a||isNaN(a)||a<0?console.warn(`Vue3 Mq: "${n}: ${e[n]}" is not a valid breakpoint. Breakpoints should be a number of zero or above. Skipping.`):t.push({name:n,min:a}):console.warn(`Vue3 Mq: Invalid or missing breakpoint key (${JSON.stringify(n)}). Skipping.`);}t.some((e=>0===e.min))||console.warn("Vue3 Mq: You have not declared a breakpoint with a minimum value of 0. There may be screen sizes to which Vue3Mq does not respond.");return new Set(t.map((e=>e.min))).size<t.length&&console.warn("Vue3 Mq: Your breakpoint configuration contains duplicate values. Behaviour may be unpredictable."),0!==t.length&&t.sort(((e,t)=>e.min-t.min))};function R({breakpoints:e,preset:t}){const n=(e=>{if("string"==typeof e&&L[e])return L[e];{const t=Object.keys(L);return console.error(`Vue3 Mq: "${e}" is not a valid preset. Available options are: ${t.join(", ")}`),!1}})(t),a=T(e);if(!1===n&&!a)throw new TypeError("Vue3 Mq: You must provide a valid preset, or valid breakpoint settings.");var r;r=a||T(n),f.value=r,function(){for(;y.length>0;){const e=y.shift();if(e&&"object"==typeof e){const{mql:t,cb:n}=e;t.addEventListener&&"function"==typeof t.addEventListener?t.removeEventListener("change",n):t.removeListener(n);}}}(),(()=>{const e=Object.keys(h);for(let t of e)delete h[t];$(),V(),O();})();const o=k.value.reduce(((e,t,n,a)=>{const r=`(min-width: ${t.min}px)`,o=n<a.length-1?`(max-width: ${a[n+1].min-1}px)`:null,i=r+(o?" and "+o:"");return Object.assign(e,{[t.name]:i})}),{});for(const i in o){j(o[i],(()=>{$(i);}));}["portrait","landscape"].forEach((e=>{j(`(orientation: ${e})`,(()=>{V(e);}));})),["light","dark"].forEach((e=>{j(`(prefers-color-scheme: ${e})`,(()=>{O(e);}));}));}var N={install:(e,{preset:t="bootstrap5",breakpoints:n,defaultBreakpoint:a,defaultOrientation:r="landscape",defaultTheme:o}={})=>{try{const l=!1===["landscape","portrait"].includes(s=r)?(console.error(`Vue3 Mq: "${s}" is not a valid default orientation. Reverting to unset value.`),null):s,u=((e=null)=>!1===["dark","light"].includes(e)&&null!==e?(console.error(`Vue3 Mq: "${e}" is not a valid default theme. Reverting to unset value.`),null):e)(o);i=a,v.value=i,(e=>{m.value=e;})(l),(e=>{g.value=e;})(u),e.provide("mq",x),e.provide("updateBreakpoints",R),R({breakpoints:n,preset:t});}catch(l){console.error(l);}var i,s;}};
@@ -102,6 +102,7 @@ const defaultConfig = {
102
102
  },
103
103
  hudStats: {},
104
104
  items: {},
105
+ quests: {},
105
106
  };
106
107
 
107
108
  function parserError(ctx, line, text) {
@@ -135,6 +136,12 @@ function getItemConfig(id) {
135
136
  error(`Item config for skill ${id} doesn't exist`);
136
137
  }
137
138
  return item;
139
+ }
140
+ function getQuestConfig(questId) {
141
+ return config.quests[questId];
142
+ }
143
+ function getObjectiveConfig(quest, objectiveId) {
144
+ return getQuestConfig(quest).objectives[objectiveId];
138
145
  }
139
146
 
140
147
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -3748,6 +3755,29 @@ const useHud = pinia.defineStore('hud', {
3748
3755
  },
3749
3756
  });
3750
3757
 
3758
+ // Generate a pinia store named notifications with a state using the type NotificationsState, and save type NotificationsSave, with actions:
3759
+ // addNotification(text: string): Adds a new notification to the state, and deletes it after a timeout
3760
+ // deleteNotification(id: string): Deletes a notification from the state
3761
+ const useNotifications = pinia.defineStore('notifications', {
3762
+ state: () => ({ notifications: {} }),
3763
+ actions: {
3764
+ async addNotification(text) {
3765
+ const id = `${Date.now()}-${Math.random() * 10000}`;
3766
+ this.notifications[id] = {
3767
+ text,
3768
+ };
3769
+ if (getConfig().notifications.alsoPrintInDialogue) {
3770
+ writeText(`[NOTIFICATION] ${text}`);
3771
+ }
3772
+ await timeout(getConfig().notifications.timeOnScreen * 1000);
3773
+ this.deleteNotification(id);
3774
+ },
3775
+ deleteNotification(id) {
3776
+ delete this.notifications[id];
3777
+ },
3778
+ },
3779
+ });
3780
+
3751
3781
  // create a pinia store named inventory with a state containing items and actions to add and delete items
3752
3782
  // create a pinia store named inventory with a state of type ItemState and actions to add and delete items. Adding items should increase the amount of any existing item that matches the id.
3753
3783
  const useInventory = pinia.defineStore('inventory', {
@@ -3757,14 +3787,14 @@ const useInventory = pinia.defineStore('inventory', {
3757
3787
  actions: {
3758
3788
  generateSaveData() {
3759
3789
  return {
3760
- items: this.items
3790
+ items: this.items,
3761
3791
  };
3762
3792
  },
3763
3793
  loadSaveData(save) {
3764
3794
  this.items = { ...this.items, ...save.items };
3765
3795
  },
3766
3796
  setupItems(items) {
3767
- Object.keys(items).forEach(key => {
3797
+ Object.keys(items).forEach((key) => {
3768
3798
  this.items[key] = {
3769
3799
  amount: 0,
3770
3800
  id: key,
@@ -3785,11 +3815,13 @@ const useInventory = pinia.defineStore('inventory', {
3785
3815
  else {
3786
3816
  this.items[item.id] = { ...item };
3787
3817
  }
3818
+ useNotifications().addNotification(`Received item: ${getItemConfig(item.id).name} x ${item.amount}`);
3788
3819
  },
3789
3820
  remove(item) {
3790
3821
  const existingItem = this.getExistingItem(item.id);
3791
3822
  if (existingItem) {
3792
3823
  existingItem.amount -= item.amount;
3824
+ useNotifications().addNotification(`Lost item: ${getItemConfig(item.id).name} x ${item.amount}`);
3793
3825
  if (existingItem.amount <= 0) {
3794
3826
  this.deleteItem(item.id);
3795
3827
  }
@@ -3804,29 +3836,6 @@ const useInventory = pinia.defineStore('inventory', {
3804
3836
  },
3805
3837
  });
3806
3838
 
3807
- // Generate a pinia store named notifications with a state using the type NotificationsState, and save type NotificationsSave, with actions:
3808
- // addNotification(text: string): Adds a new notification to the state, and deletes it after a timeout
3809
- // deleteNotification(id: string): Deletes a notification from the state
3810
- const useNotifications = pinia.defineStore('notifications', {
3811
- state: () => ({ notifications: {} }),
3812
- actions: {
3813
- async addNotification(text) {
3814
- const id = `${Date.now()}-${Math.random() * 10000}`;
3815
- this.notifications[id] = {
3816
- text,
3817
- };
3818
- if (getConfig().notifications.alsoPrintInDialogue) {
3819
- writeText(`[NOTIFICATION] ${text}`);
3820
- }
3821
- await timeout(getConfig().notifications.timeOnScreen * 1000);
3822
- this.deleteNotification(id);
3823
- },
3824
- deleteNotification(id) {
3825
- delete this.notifications[id];
3826
- },
3827
- },
3828
- });
3829
-
3830
3839
  // Create a pinia store named skills with a state using the type Skills, with actions:
3831
3840
  // setupSkillCheck(skillCheck: SkillCheckState, id: string)
3832
3841
  // passSkillCheck(skillCheckId: string)
@@ -3914,6 +3923,101 @@ function getFile(url) {
3914
3923
  });
3915
3924
  }
3916
3925
 
3926
+ const everyObject = (object, predicate) => {
3927
+ for (const key in object) {
3928
+ if (!predicate(object[key])) {
3929
+ return false;
3930
+ }
3931
+ }
3932
+ return true;
3933
+ };
3934
+ const filterObject = (object, predicate) => {
3935
+ const result = {};
3936
+ for (const key in object) {
3937
+ if (predicate(object[key])) {
3938
+ result[key] = object[key];
3939
+ }
3940
+ }
3941
+ return result;
3942
+ };
3943
+
3944
+ const useQuests = pinia.defineStore('quests', {
3945
+ state: () => ({
3946
+ quests: {},
3947
+ }),
3948
+ actions: {
3949
+ getQuest(questId) {
3950
+ const quest = this.quests[questId];
3951
+ if (quest) {
3952
+ return quest;
3953
+ }
3954
+ error(`Quest ${questId} doesn't exist!`);
3955
+ },
3956
+ getObjective(quest, objectiveId) {
3957
+ const questObjective = this.getQuest(quest).objectives[objectiveId];
3958
+ if (questObjective) {
3959
+ return questObjective;
3960
+ }
3961
+ error(`Objective ${objectiveId} doesn't exist in quest ${quest}!`);
3962
+ },
3963
+ setupQuests(quests) {
3964
+ // iterate through quests to generate quest states to add to this.quests object
3965
+ for (const key of Object.keys(quests)) {
3966
+ const data = quests[key];
3967
+ this.quests[key] = {
3968
+ id: key,
3969
+ state: 'hidden',
3970
+ objectives: {},
3971
+ };
3972
+ // iterate through data.objectives to populate the objectives array of this.quests[key]
3973
+ for (const objectiveKey of Object.keys(data.objectives)) {
3974
+ const objective = data.objectives[objectiveKey];
3975
+ this.quests[key].objectives[objectiveKey] = {
3976
+ id: objectiveKey,
3977
+ state: objective.hidden ? 'hidden' : 'unlocked',
3978
+ };
3979
+ }
3980
+ }
3981
+ },
3982
+ startQuest(questId) {
3983
+ this.getQuest(questId).state = 'unlocked';
3984
+ useNotifications().addNotification(`Started quest: ${getQuestConfig(questId).title}`);
3985
+ },
3986
+ startObjective(questId, objectiveId) {
3987
+ this.getObjective(questId, objectiveId).state = 'unlocked';
3988
+ useNotifications().addNotification(`New quest objective: ${getObjectiveConfig(questId, objectiveId).description}`);
3989
+ },
3990
+ completeObjective(questId, objectiveId) {
3991
+ this.getObjective(questId, objectiveId).state = 'completed';
3992
+ useNotifications().addNotification(`Objective completed!`);
3993
+ },
3994
+ completeQuest(questId, ending) {
3995
+ this.getQuest(questId).state = 'completed';
3996
+ if (ending) {
3997
+ this.getQuest(questId).ending = ending;
3998
+ }
3999
+ useNotifications().addNotification(`Quest completed: ${getQuestConfig(questId).title}`);
4000
+ },
4001
+ isQuestCompleted(questId) {
4002
+ const quest = this.getQuest(questId);
4003
+ return everyObject(quest.objectives, (objective) => objective.state === 'completed');
4004
+ },
4005
+ removeQuest(id) {
4006
+ delete this.quests[id];
4007
+ },
4008
+ generateSaveData() {
4009
+ return {
4010
+ quests: {
4011
+ ...this.quests,
4012
+ },
4013
+ };
4014
+ },
4015
+ loadSaveData(data) {
4016
+ this.quests = data.quests;
4017
+ },
4018
+ },
4019
+ });
4020
+
3917
4021
  // Create a pinia store named screens with a state using the type ScreenState, with actions:
3918
4022
  // setScreen(screen: string): Sets the current screen to the given screen
3919
4023
  // setButtons(buttons: { [key: string]: ButtonConfig }): Adds buttons to the buttons state by using the values in the buttons config object
@@ -3987,6 +4091,7 @@ function getModifiableDataPinia() {
3987
4091
  skills: skills.skills,
3988
4092
  buttons: screens.buttons,
3989
4093
  items: inventory.items,
4094
+ quests: useQuests().quests,
3990
4095
  };
3991
4096
  }
3992
4097
 
@@ -4573,9 +4678,9 @@ async function runCommand(cmd, choices) {
4573
4678
  catch (err) {
4574
4679
  logger.log(`Error at: `, vmStore.currentStack.label);
4575
4680
  console.error(err);
4576
- error(`Narrat script runtime error at <span class="error-filename">${cmd.fileName}:${cmd.line + 1}</span>
4577
- <b>${err}</b>
4578
- Script: ${cmd.code}
4681
+ error(`Narrat script runtime error at <span class="error-filename">${cmd.fileName}:${cmd.line + 1}</span>
4682
+ <b>${err}</b>
4683
+ Script: ${cmd.code}
4579
4684
  Label: ${vmStore.currentStack.label}`);
4580
4685
  }
4581
4686
  }
@@ -4710,6 +4815,8 @@ const useMain = pinia.defineStore('main', {
4710
4815
  hudStore.setupHudStats(config.hudStats);
4711
4816
  const inventoryStore = useInventory();
4712
4817
  inventoryStore.setupItems(config.items);
4818
+ const questsStore = useQuests();
4819
+ questsStore.setupQuests(config.quests);
4713
4820
  },
4714
4821
  startMachine() {
4715
4822
  const vmStore = useVM();
@@ -4815,6 +4922,7 @@ const useMain = pinia.defineStore('main', {
4815
4922
  hud: hudStore.generateSaveData(),
4816
4923
  audio: audioStore.generateSaveData(),
4817
4924
  inventory: inventoryStore.generateSaveData(),
4925
+ quests: useQuests().generateSaveData(),
4818
4926
  };
4819
4927
  localStorage.setItem(SAVE_FILE, JSON.stringify(save));
4820
4928
  },
@@ -4835,6 +4943,7 @@ const useMain = pinia.defineStore('main', {
4835
4943
  hudStore.loadSaveData(save.hud);
4836
4944
  audioStore.loadSaveData(save.audio);
4837
4945
  inventoryStore.loadSaveData(save.inventory);
4946
+ useQuests().loadSaveData(save.quests);
4838
4947
  },
4839
4948
  getAllStates() {
4840
4949
  return {
@@ -4848,6 +4957,7 @@ const useMain = pinia.defineStore('main', {
4848
4957
  rendering: useRenderingStore(),
4849
4958
  notifications: useNotifications(),
4850
4959
  inventory: useInventory(),
4960
+ quests: useQuests(),
4851
4961
  };
4852
4962
  },
4853
4963
  overrideStates(override) {
@@ -5073,7 +5183,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
5073
5183
  ], 4))
5074
5184
  }
5075
5185
 
5076
- var css_248z$1 = ".dialog-title {\n font-size: 20px;\n font-weight: bold;\n}\n\n.dialog-text {\n font-size: 16px;\n}\n\n.dialog-box {\n /* border-radius: 10px; */\n /* border: 1px solid #a8a8a8; */\n color: var(--text-color);\n /* background-color: #2e2e2e; */\n padding: 10px;\n padding-left: 2em;\n margin-bottom: 10px;\n}\n\n.dialog-choice {\n color: var(--dialog-choice-color);\n}\n\n.dialog-choice:hover {\n color: var(--dialog-choice-hover-color);\n cursor: pointer;\n}\n\n.buttons-container {\n width: 100%;\n padding: 10px;\n display: flex;\n justify-content: space-evenly;\n align-items: stretch;\n box-sizing: border-box;\n}\n\n.interact-button {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n height: 50px;\n color: var(--text-color);\n border: 1px solid black;\n font-weight: bold;\n font-size: 24px;\n text-align: center;\n flex-grow: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.interact-button:not(:last-child) {\n margin-right: 10px;\n}\n";
5186
+ var css_248z$1 = ".dialog-title {\n font-size: 20px;\n font-weight: bold;\n}\n\n.dialog-text {\n font-size: 16px;\n}\n\n.dialog-box {\n /* border-radius: 10px; */\n /* border: 1px solid #a8a8a8; */\n color: var(--text-color);\n /* background-color: #2e2e2e; */\n padding: 10px;\n padding-left: 2em;\n margin-bottom: 10px;\n}\n\n.dialog-choice {\n color: var(--dialog-choice-color);\n}\n\n.dialog-choice:hover {\n color: var(--dialog-choice-hover-color);\n cursor: pointer;\n}\n\n.buttons-container {\n width: 100%;\n padding: 10px;\n display: flex;\n justify-content: space-evenly;\n align-items: stretch;\n box-sizing: border-box;\n}\n\n.interact-button {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n height: 50px;\n color: var(--text-color);\n border: 1px solid black;\n font-weight: bold;\n font-size: 24px;\n text-align: center;\n flex-grow: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.interact-button:not(:last-child) {\n margin-right: 10px;\n}\r\n";
5077
5187
  styleInject(css_248z$1);
5078
5188
 
5079
5189
  script.render = render;
@@ -5120,7 +5230,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
5120
5230
  ], 4))
5121
5231
  }
5122
5232
 
5123
- var css_248z$2 = ".dialog-picture {\n position: absolute;\n width: 80px;\n height: 80px;\n border: 2px solid white;\n border-radius: 10px;\n background-color: grey;\n z-index: 99;\n}\n\n.dialog-picture img {\n width: 100%;\n height: 100%;\n}\n";
5233
+ var css_248z$2 = ".dialog-picture {\n position: absolute;\n width: 80px;\n height: 80px;\n border: 2px solid white;\n border-radius: 10px;\n background-color: grey;\n z-index: 99;\n}\n\n.dialog-picture img {\n width: 100%;\n height: 100%;\n}\r\n";
5124
5234
  styleInject(css_248z$2);
5125
5235
 
5126
5236
  script$1.render = render$1;
@@ -5174,7 +5284,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
5174
5284
  }))
5175
5285
  }
5176
5286
 
5177
- var css_248z$3 = ".modal-mask {\n position: absolute;\n z-index: 9998;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n transition: opacity 0.3s ease;\n display: flex;\n flex-direction: column;\n flex-shrink: 2 2;\n align-items: center;\n justify-content: center;\n}\n\n.modal-container {\n min-width: 300px;\n max-width: 90vw;\n max-height: 100%;\n overflow-y: hidden;\n margin: 10px auto;\n padding: 20px 30px;\n border-radius: 5px;\n transition: all 0.3s ease;\n font-family: Helvetica, Arial, sans-serif;\n background: linear-gradient(to right, hsl(210, 30%, 20%), hsl(255, 30%, 25%));\n display: flex;\n flex-direction: column;\n}\n\n.modal-header {\n position: relative;\n}\n\n.modal-header h3 {\n flex-shrink: 0;\n margin-top: 0;\n color: var(--secondary);\n}\n\n.modal-body {\n margin: 20px 0;\n overflow-y: auto;\n flex-shrink: 2;\n}\n\n.modal-default-button {\n float: right;\n}\n\n/*\n * The following styles are auto-applied to elements with\n * transition=\"modal\" when their visibility is toggled\n * by Vue.js.\n *\n * You can easily play with the modal transition by editing\n * these styles.\n */\n\n.modal-enter {\n opacity: 0;\n}\n\n.modal-leave-active {\n opacity: 0;\n}\n\n.modal-enter .modal-container,\n.modal-leave-active .modal-container {\n transform: scale(1.1);\n}\n\n.close-button {\n border: 1px solid var(--text-color);\n border-radius: 50px;\n font-size: 30px;\n font-weight: 700;\n position: absolute;\n right: -20px;\n top: -10px;\n width: 50px;\n height: 50px;\n}\n\n.close-button:hover {\n background-color: var(--focus);\n}\n";
5287
+ var css_248z$3 = ".modal-mask {\n position: absolute;\n z-index: 9998;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n transition: opacity 0.3s ease;\n display: flex;\n flex-direction: column;\n flex-shrink: 2 2;\n align-items: center;\n justify-content: center;\n}\n\n.modal-container {\n min-width: 300px;\n max-width: 90vw;\n max-height: 100%;\n overflow-y: hidden;\n margin: 10px auto;\n padding: 20px 30px;\n border-radius: 5px;\n transition: all 0.3s ease;\n font-family: Helvetica, Arial, sans-serif;\n background: linear-gradient(to right, hsl(210, 30%, 20%), hsl(255, 30%, 25%));\n display: flex;\n flex-direction: column;\n}\n\n.modal-header {\n position: relative;\n}\n\n.modal-header h3 {\n flex-shrink: 0;\n margin-top: 0;\n color: var(--secondary);\n}\n\n.modal-body {\n margin: 20px 0;\n overflow-y: auto;\n flex-shrink: 2;\n}\n\n.modal-default-button {\n float: right;\n}\n\n/*\r\n * The following styles are auto-applied to elements with\r\n * transition=\"modal\" when their visibility is toggled\r\n * by Vue.js.\r\n *\r\n * You can easily play with the modal transition by editing\r\n * these styles.\r\n */\n\n.modal-enter {\n opacity: 0;\n}\n\n.modal-leave-active {\n opacity: 0;\n}\n\n.modal-enter .modal-container,\r\n.modal-leave-active .modal-container {\n transform: scale(1.1);\n}\n\n.close-button {\n border: 1px solid var(--text-color);\n border-radius: 50px;\n font-size: 30px;\n font-weight: 700;\n position: absolute;\n right: -20px;\n top: -10px;\n width: 50px;\n height: 50px;\n}\n\n.close-button:hover {\n background-color: var(--focus);\n}\r\n";
5178
5288
  styleInject(css_248z$3);
5179
5289
 
5180
5290
  script$2.render = render$2;
@@ -7418,7 +7528,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
7418
7528
  ]))
7419
7529
  }
7420
7530
 
7421
- var css_248z$4 = ".debug-menu {\n z-index: 9999;\n}\n\n.debug-button {\n position: fixed;\n bottom: 10px;\n right: 10px;\n padding: 5px;\n}\n\n.error-message {\n color: orangered;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n\n.error-filename {\n color: grey;\n text-decoration: underline;\n}\n\n.debug-menu-container {\n width: 100%;\n}\n\n.search-result {\n border: 1px solid var(--text-color);\n padding: 10px;\n font-weight: 700;\n font-size: 20px;\n width: 100;\n}\n\n.jump-menu-container {\n width: 80%;\n}\n\n.debug-info {\n position: fixed;\n background-color: rgba(0, 0, 0, 0.6);\n border: 1px dotted var(--text-color);\n top: 0;\n left: 0;\n padding: 5px;\n}\n\n.variables-viewer {\n height: 100%;\n}\n";
7531
+ var css_248z$4 = ".debug-menu {\n z-index: 9999;\n}\n\n.debug-button {\n position: fixed;\n bottom: 10px;\n right: 10px;\n padding: 5px;\n}\n\n.error-message {\n color: orangered;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n\n.error-filename {\n color: grey;\n text-decoration: underline;\n}\n\n.debug-menu-container {\n width: 100%;\n}\n\n.search-result {\n border: 1px solid var(--text-color);\n padding: 10px;\n font-weight: 700;\n font-size: 20px;\n width: 100;\n}\n\n.jump-menu-container {\n width: 80%;\n}\n\n.debug-info {\n position: fixed;\n background-color: rgba(0, 0, 0, 0.6);\n border: 1px dotted var(--text-color);\n top: 0;\n left: 0;\n padding: 5px;\n}\n\n.variables-viewer {\n height: 100%;\n}\r\n";
7422
7532
  styleInject(css_248z$4);
7423
7533
 
7424
7534
  script$3.render = render$3;
@@ -7475,7 +7585,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
7475
7585
  ]))
7476
7586
  }
7477
7587
 
7478
- var css_248z$5 = ".volume-label {\n /* margin: 5px 20px; */\n margin-right: 10px;\n font-size: 20px;\n font-weight: 700;\n}\n\n.volume-controls {\n font-size: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 20px;\n}\n\n.volume-slider {\n width: 200px;\n background-color: blue;\n}\n";
7588
+ var css_248z$5 = ".volume-label {\n /* margin: 5px 20px; */\n margin-right: 10px;\n font-size: 20px;\n font-weight: 700;\n}\n\n.volume-controls {\n font-size: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 20px;\n}\n\n.volume-slider {\n width: 200px;\n background-color: blue;\n}\r\n";
7479
7589
  styleInject(css_248z$5);
7480
7590
 
7481
7591
  script$4.render = render$4;
@@ -7533,7 +7643,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
7533
7643
  ], 4))
7534
7644
  }
7535
7645
 
7536
- var css_248z$6 = ".hud {\n position: absolute;\n right: 0;\n top: 0;\n display: flex;\n flex-direction: row-reverse;\n z-index: 3;\n}\n\n.hud-stat {\n border: 1px dotted white;\n background-color: var(--hud-background);\n color: var(--hud-text-color);\n padding: 5px;\n}\n\n.hud-icon {\n display: inline-block;\n height: 1em;\n}\n\n.hud-text {\n margin-left: 5px;\n}\n";
7646
+ var css_248z$6 = ".hud {\n position: absolute;\n right: 0;\n top: 0;\n display: flex;\n flex-direction: row-reverse;\n z-index: 3;\n}\n\n.hud-stat {\n border: 1px dotted white;\n background-color: var(--hud-background);\n color: var(--hud-text-color);\n padding: 5px;\n}\n\n.hud-icon {\n display: inline-block;\n height: 1em;\n}\n\n.hud-text {\n margin-left: 5px;\n}\r\n";
7537
7647
  styleInject(css_248z$6);
7538
7648
 
7539
7649
  script$5.render = render$5;
@@ -7570,7 +7680,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
7570
7680
  ]))
7571
7681
  }
7572
7682
 
7573
- var css_248z$7 = "#loading-bar {\n position: relative;\n width: 40vw;\n height: 100px;\n border-radius: 50px;\n background: black;\n}\n\n#inner-loading-bar {\n height: 100%;\n border-radius: 50px 0px 0px 50px;\n background: var(--light-background);\n}\n\n#loading-text {\n z-index: 99999;\n display: flex;\n align-items: center;\n justify-content: space-around;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n}\n";
7683
+ var css_248z$7 = "#loading-bar {\n position: relative;\n width: 40vw;\n height: 100px;\n border-radius: 50px;\n background: black;\n}\n\n#inner-loading-bar {\n height: 100%;\n border-radius: 50px 0px 0px 50px;\n background: var(--light-background);\n}\n\n#loading-text {\n z-index: 99999;\n display: flex;\n align-items: center;\n justify-content: space-around;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n}\r\n";
7574
7684
  styleInject(css_248z$7);
7575
7685
 
7576
7686
  script$6.render = render$6;
@@ -7595,7 +7705,7 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
7595
7705
  class: "notification",
7596
7706
  key: id
7597
7707
  }, [
7598
- vue.createElementVNode("h2", null, vue.toDisplayString(notification.text), 1)
7708
+ vue.createElementVNode("h3", null, vue.toDisplayString(notification.text), 1)
7599
7709
  ]))
7600
7710
  }), 128))
7601
7711
  ]),
@@ -7603,7 +7713,7 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
7603
7713
  }))
7604
7714
  }
7605
7715
 
7606
- var css_248z$8 = ".notifications-holder {\n position: fixed;\n top: 0;\n left: 0;\n padding: 10px;\n display: flex;\n flex-direction: column-reverse;\n align-items: center;\n pointer-events: none;\n}\n\n.notification {\n margin-top: 10px;\n margin-bottom: 10px;\n border-radius: 10px;\n padding: 15px;\n background: var(--notifications-bg);\n width: 40vh;\n text-align: center;\n}\n";
7716
+ var css_248z$8 = ".notifications-holder {\n position: fixed;\n top: 0;\n right: 0;\n padding: 10px;\n display: flex;\n flex-direction: column-reverse;\n align-items: center;\n pointer-events: none;\n}\n\n.notification {\n margin-top: 10px;\n margin-bottom: 10px;\n border-radius: 10px;\n padding: 15px;\n background: var(--notifications-bg);\n width: 40vh;\n text-align: center;\n}\r\n";
7607
7717
  styleInject(css_248z$8);
7608
7718
 
7609
7719
  script$7.render = render$7;
@@ -7617,6 +7727,7 @@ function processText(text) {
7617
7727
  data: vmStore.data,
7618
7728
  skills: skillStore.skills,
7619
7729
  items: useInventory().items,
7730
+ quests: useQuests().quests,
7620
7731
  };
7621
7732
  const [obj, newKey] = findDataHelper(searchableState, key);
7622
7733
  return obj[newKey];
@@ -7759,6 +7870,9 @@ var script$8 = vue.defineComponent({
7759
7870
  openInventory() {
7760
7871
  useMain().openModal('inventory');
7761
7872
  },
7873
+ openQuests() {
7874
+ useMain().openModal('quests');
7875
+ },
7762
7876
  closeMenu() {
7763
7877
  useMain().closeModal();
7764
7878
  },
@@ -7778,7 +7892,13 @@ var script$8 = vue.defineComponent({
7778
7892
  return true;
7779
7893
  }
7780
7894
  return false;
7781
- }
7895
+ },
7896
+ showQuests() {
7897
+ if (Object.entries(getConfig().quests).length > 0) {
7898
+ return true;
7899
+ }
7900
+ return false;
7901
+ },
7782
7902
  },
7783
7903
  });
7784
7904
 
@@ -7806,11 +7926,19 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
7806
7926
  id: "inventory-menu-button",
7807
7927
  onClick: _cache[2] || (_cache[2] = (...args) => (_ctx.openInventory && _ctx.openInventory(...args)))
7808
7928
  }, " Items "))
7929
+ : vue.createCommentVNode("", true),
7930
+ (_ctx.showQuests)
7931
+ ? (vue.openBlock(), vue.createElementBlock("button", {
7932
+ key: 2,
7933
+ class: "button menu-toggle-button",
7934
+ id: "quests-menu-button",
7935
+ onClick: _cache[3] || (_cache[3] = (...args) => (_ctx.openQuests && _ctx.openQuests(...args)))
7936
+ }, " Quests "))
7809
7937
  : vue.createCommentVNode("", true)
7810
7938
  ]))
7811
7939
  }
7812
7940
 
7813
- var css_248z$9 = ".menu-content {\n text-align: center;\n}\n\n.menu-toggle-button {\n margin: 0;\n padding: 2px;\n border-radius: 5px;\n}\n\n.menu-toggle-button:not(:last-child) {\n margin-right: 10px;\n}\n\n.menu-modal {\n width: 500px;\n}\n";
7941
+ var css_248z$9 = ".menu-content {\n text-align: center;\n}\n\n.menu-toggle-button {\n margin: 0;\n padding: 2px;\n border-radius: 5px;\n}\n\n.menu-toggle-button:not(:last-child) {\n margin-right: 10px;\n}\n\n.menu-modal {\n width: 500px;\n}\r\n";
7814
7942
  styleInject(css_248z$9);
7815
7943
 
7816
7944
  script$8.render = render$8;
@@ -7878,7 +8006,7 @@ function render$9(_ctx, _cache, $props, $setup, $data, $options) {
7878
8006
  }, 8, ["onClose"]))
7879
8007
  }
7880
8008
 
7881
- var css_248z$a = ".quit-button {\n margin: 20px;\n text-align: center;\n}\n";
8009
+ var css_248z$a = ".quit-button {\n margin: 20px;\n text-align: center;\n}\r\n";
7882
8010
  styleInject(css_248z$a);
7883
8011
 
7884
8012
  script$9.render = render$9;
@@ -8023,7 +8151,7 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) {
8023
8151
  }, 8, ["onClose"]))
8024
8152
  }
8025
8153
 
8026
- var css_248z$b = ".skills-modal {\n width: 800px;\n}\n\n.skills-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.skill-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-size: cover;\n}\n\n.skill-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--skills-text-color);\n background: var(--skills-text-background);\n}\n\n.skill-level {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--skills-level-color);\n width: var(--skills-xp-bar-height);\n height: var(--skills-xp-bar-height);\n background-color: var(--skills-level-background);\n}\n\n.skill-description-container {\n justify-content: space-between;\n align-items: center;\n}\n\n.skill-left {\n flex-direction: column;\n}\n\n.skill-right {\n flex-direction: column;\n align-items: baseline;\n}\n\n.skill-xp-container {\n position: absolute;\n top: 0;\n left: 0;\n height: var(--skills-xp-bar-height);\n width: calc(100% - var(--skills-xp-bar-height));\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.skill-xp-bar {\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n background-color: rgba(0, 0, 250, 0.5);\n}\n\n.skill-xp-text {\n z-index: 2;\n}\n";
8154
+ var css_248z$b = ".skills-modal {\n width: 800px;\n}\n\n.skills-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.skill-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-size: cover;\n}\n\n.skill-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--skills-text-color);\n background: var(--skills-text-background);\n}\n\n.skill-level {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--skills-level-color);\n width: var(--skills-xp-bar-height);\n height: var(--skills-xp-bar-height);\n background-color: var(--skills-level-background);\n}\n\n.skill-description-container {\n justify-content: space-between;\n align-items: center;\n}\n\n.skill-left {\n flex-direction: column;\n}\n\n.skill-right {\n flex-direction: column;\n align-items: baseline;\n}\n\n.skill-xp-container {\n position: absolute;\n top: 0;\n left: 0;\n height: var(--skills-xp-bar-height);\n width: calc(100% - var(--skills-xp-bar-height));\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.skill-xp-bar {\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n height: 100%;\n background-color: rgba(0, 0, 250, 0.5);\n}\n\n.skill-xp-text {\n z-index: 2;\n}\r\n";
8027
8155
  styleInject(css_248z$b);
8028
8156
 
8029
8157
  script$a.render = render$a;
@@ -8165,12 +8293,144 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) {
8165
8293
  }, 8, ["onClose"]))
8166
8294
  }
8167
8295
 
8168
- var css_248z$c = ".inventory-modal {\n width: 800px;\n}\n\n.inventory-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.item-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n.item-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--inventory-text-color);\n background: var(--inventory-text-background);\n}\n\n.item-amount {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--inventory-amount-color);\n width: 40px;\n height: 40px;\n background-color: var(--inventory-amount-background);\n}\n\n.item-description-container {\n justify-content: space-between;\n align-items: center;\n}\n\n.item-left {\n flex-direction: column;\n}\n\n.item-right {\n flex-direction: column;\n align-items: baseline;\n}\n\n";
8296
+ var css_248z$c = ".inventory-modal {\n width: 800px;\n min-height: 50%;\n}\n\n.inventory-container {\n display: grid;\n grid-auto-rows: auto;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 20px 20px;\n}\n\n.item-display {\n width: 200px;\n height: 300px;\n position: relative;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n.item-title {\n position: absolute;\n bottom: 0px;\n text-align: center;\n width: 100%;\n color: var(--inventory-text-color);\n background: var(--inventory-text-background);\n}\n\n.item-amount {\n position: absolute;\n top: 0;\n right: 0;\n font-weight: 700;\n font-size: 25px;\n color: var(--inventory-amount-color);\n width: 40px;\n height: 40px;\n background-color: var(--inventory-amount-background);\n}\n\n.item-description-container {\n justify-content: space-between;\n align-items: center;\n}\n\n.item-left {\n flex-direction: column;\n}\n\n.item-right {\n flex-direction: column;\n align-items: baseline;\n}\r\n";
8169
8297
  styleInject(css_248z$c);
8170
8298
 
8171
8299
  script$b.render = render$b;
8172
8300
 
8173
8301
  var script$c = vue.defineComponent({
8302
+ setup() {
8303
+ const questsStore = useQuests();
8304
+ const quests = vue.computed(() => questsStore.quests);
8305
+ return { quests };
8306
+ },
8307
+ computed: {
8308
+ questsToDisplay() {
8309
+ return filterObject(this.quests, (quest) => quest.state !== 'hidden');
8310
+ },
8311
+ },
8312
+ props: {
8313
+ close: (() => { }),
8314
+ },
8315
+ methods: {
8316
+ getQuestData(questId) {
8317
+ return getQuestConfig(questId);
8318
+ },
8319
+ getObjectiveData(questId, objectiveId) {
8320
+ return getObjectiveConfig(questId, objectiveId);
8321
+ },
8322
+ getDisplayTextForQuestState(quest) {
8323
+ switch (quest.state) {
8324
+ case 'hidden':
8325
+ return ' Hidden';
8326
+ case 'unlocked':
8327
+ return '';
8328
+ case 'completed':
8329
+ return ' (Completed)';
8330
+ default:
8331
+ return ' Unknown';
8332
+ }
8333
+ },
8334
+ getQuestDescription(quest) {
8335
+ if (quest.ending) {
8336
+ return quest.ending;
8337
+ }
8338
+ return this.getQuestData(quest.id).description;
8339
+ },
8340
+ getAvailableObjectives(quest) {
8341
+ return filterObject(quest.objectives, (objective) => {
8342
+ return objective.state !== 'hidden';
8343
+ });
8344
+ },
8345
+ },
8346
+ components: {
8347
+ Modal: script$2,
8348
+ VolumeControls: script$4,
8349
+ },
8350
+ });
8351
+
8352
+ const _hoisted_1$b = /*#__PURE__*/vue.createElementVNode("h3", { class: "title" }, "Quests", -1);
8353
+ const _hoisted_2$9 = {
8354
+ key: 0,
8355
+ class: "quests-container"
8356
+ };
8357
+ const _hoisted_3$6 = { class: "quest-title" };
8358
+ const _hoisted_4$5 = { class: "quest-description" };
8359
+ const _hoisted_5$5 = {
8360
+ key: 0,
8361
+ class: "quest-objectives-container list-disc"
8362
+ };
8363
+ const _hoisted_6$5 = {
8364
+ key: 1,
8365
+ class: "menu-container"
8366
+ };
8367
+ const _hoisted_7$4 = /*#__PURE__*/vue.createElementVNode("h2", { class: "title" }, "There are no quests!", -1);
8368
+ const _hoisted_8$3 = [
8369
+ _hoisted_7$4
8370
+ ];
8371
+
8372
+ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
8373
+ const _component_modal = vue.resolveComponent("modal");
8374
+
8375
+ return (vue.openBlock(), vue.createBlock(_component_modal, {
8376
+ class: "quests",
8377
+ onClose: _ctx.close,
8378
+ containerCssClass: "quests-modal"
8379
+ }, {
8380
+ header: vue.withCtx(() => [
8381
+ _hoisted_1$b
8382
+ ]),
8383
+ body: vue.withCtx(() => [
8384
+ (Object.keys(_ctx.questsToDisplay).length > 0)
8385
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$9, [
8386
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.questsToDisplay, (quest) => {
8387
+ return (vue.openBlock(), vue.createElementBlock("div", {
8388
+ class: "quest-display",
8389
+ key: quest.id
8390
+ }, [
8391
+ vue.createElementVNode("div", {
8392
+ class: vue.normalizeClass(["quest-header",
8393
+ quest.state === 'completed'
8394
+ ? 'quest-completed'
8395
+ : 'quest-in-progress'
8396
+ ])
8397
+ }, [
8398
+ vue.createElementVNode("h3", _hoisted_3$6, vue.toDisplayString(_ctx.getQuestData(quest.id).title) + " " + vue.toDisplayString(_ctx.getDisplayTextForQuestState(quest)), 1)
8399
+ ], 2),
8400
+ vue.createElementVNode("p", _hoisted_4$5, vue.toDisplayString(_ctx.getQuestDescription(quest)), 1),
8401
+ (quest.state !== 'completed')
8402
+ ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_5$5, [
8403
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.getAvailableObjectives(quest), (objective) => {
8404
+ return (vue.openBlock(), vue.createElementBlock("li", {
8405
+ class: "quest-objective-display",
8406
+ key: objective.id
8407
+ }, [
8408
+ vue.createElementVNode("p", {
8409
+ class: vue.normalizeClass(["quest-objective-description",
8410
+ objective.state === 'completed'
8411
+ ? 'quest-objective-completed'
8412
+ : 'quest-objctive-in-progress'
8413
+ ])
8414
+ }, vue.toDisplayString(_ctx.getObjectiveData(quest.id, objective.id).description), 3)
8415
+ ]))
8416
+ }), 128))
8417
+ ]))
8418
+ : vue.createCommentVNode("", true)
8419
+ ]))
8420
+ }), 128))
8421
+ ]))
8422
+ : (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$5, _hoisted_8$3))
8423
+ ]),
8424
+ _: 1
8425
+ }, 8, ["onClose"]))
8426
+ }
8427
+
8428
+ var css_248z$d = "/* Write CSS for this vue component */\n\n.quests-modal {\n width: 100%;\n min-height: 50%;\n}\n\n/* CSS for .quest-header with row flex */\n\n.quest-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.quest-display {\n}\n\n.quest-title {\n font-size: 1.5rem;\n font-weight: bold;\n margin-bottom: 0.5rem;\n}\n\n.quest-completed {\n color: var(--completed-quest-title-color);\n}\n\n.quest-in-progress {\n color: var(--quest-title-color);\n}\n\n.quest-state {\n font-size: 1.25rem;\n font-weight: bold;\n margin-bottom: 0.5rem;\n}\n\n.quest-description {\n font-size: 1.1rem;\n text-align: justify;\n font-style: italic;\n margin-bottom: 0.5rem;\n}\n\n.quest-objectives-container {\n margin-left: 10px;\n}\n\n.quest-objective-completed {\n color: var(--objective-completed-color);\n text-decoration: line-through;\n}\n\n.quest-objective-in-progress {\n color: var(--objective-in-progress-color);\n}\n\n.quest-objective-description {\n font-size: 1rem;\n margin-bottom: 0.5rem;\n}\r\n";
8429
+ styleInject(css_248z$d);
8430
+
8431
+ script$c.render = render$c;
8432
+
8433
+ var script$d = vue.defineComponent({
8174
8434
  setup() {
8175
8435
  const dialogStore = useDialogStore();
8176
8436
  const vmStore = useVM();
@@ -8197,6 +8457,7 @@ var script$c = vue.defineComponent({
8197
8457
  MainMenu: script$9,
8198
8458
  Skills: script$a,
8199
8459
  Inventory: script$b,
8460
+ Quests: script$c,
8200
8461
  },
8201
8462
  data() {
8202
8463
  return {
@@ -8464,23 +8725,24 @@ var script$c = vue.defineComponent({
8464
8725
  },
8465
8726
  });
8466
8727
 
8467
- const _hoisted_1$b = ["width", "height"];
8468
- const _hoisted_2$9 = /*#__PURE__*/vue.createElementVNode("div", { class: "anchor" }, null, -1);
8469
- const _hoisted_3$6 = {
8728
+ const _hoisted_1$c = ["width", "height"];
8729
+ const _hoisted_2$a = /*#__PURE__*/vue.createElementVNode("div", { class: "anchor" }, null, -1);
8730
+ const _hoisted_3$7 = {
8470
8731
  key: 2,
8471
8732
  class: "flex flex-col",
8472
8733
  style: {"height":"100%","padding":"20px"}
8473
8734
  };
8474
- const _hoisted_4$5 = { id: "game-title-container" };
8475
- const _hoisted_5$5 = { id: "game-title-text" };
8476
- const _hoisted_6$5 = { class: "flex flex-col" };
8477
- const _hoisted_7$4 = { key: 3 };
8735
+ const _hoisted_4$6 = { id: "game-title-container" };
8736
+ const _hoisted_5$6 = { id: "game-title-text" };
8737
+ const _hoisted_6$6 = { class: "flex flex-col" };
8738
+ const _hoisted_7$5 = { key: 3 };
8478
8739
 
8479
- function render$c(_ctx, _cache, $props, $setup, $data, $options) {
8740
+ function render$d(_ctx, _cache, $props, $setup, $data, $options) {
8480
8741
  const _component_Hud = vue.resolveComponent("Hud");
8481
8742
  const _component_Menu = vue.resolveComponent("Menu");
8482
8743
  const _component_Skills = vue.resolveComponent("Skills");
8483
8744
  const _component_Inventory = vue.resolveComponent("Inventory");
8745
+ const _component_Quests = vue.resolveComponent("Quests");
8484
8746
  const _component_MainMenu = vue.resolveComponent("MainMenu");
8485
8747
  const _component_DialogPicture = vue.resolveComponent("DialogPicture");
8486
8748
  const _component_DialogBox = vue.resolveComponent("DialogBox");
@@ -8514,9 +8776,15 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
8514
8776
  onClose: _ctx.closeModal
8515
8777
  }, null, 8, ["onClose"]))
8516
8778
  : vue.createCommentVNode("", true),
8779
+ (_ctx.modal === 'quests')
8780
+ ? (vue.openBlock(), vue.createBlock(_component_Quests, {
8781
+ key: 2,
8782
+ onClose: _ctx.closeModal
8783
+ }, null, 8, ["onClose"]))
8784
+ : vue.createCommentVNode("", true),
8517
8785
  (_ctx.modal === 'menu')
8518
8786
  ? (vue.openBlock(), vue.createBlock(_component_MainMenu, {
8519
- key: 2,
8787
+ key: 3,
8520
8788
  onClose: _ctx.closeModal
8521
8789
  }, null, 8, ["onClose"]))
8522
8790
  : vue.createCommentVNode("", true),
@@ -8533,7 +8801,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
8533
8801
  }),
8534
8802
  (_ctx.inGame)
8535
8803
  ? (vue.openBlock(), vue.createElementBlock("div", {
8536
- key: 3,
8804
+ key: 4,
8537
8805
  class: "background",
8538
8806
  style: vue.normalizeStyle(_ctx.backgroundStyle)
8539
8807
  }, [
@@ -8542,12 +8810,12 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
8542
8810
  height: _ctx.layoutHeight,
8543
8811
  id: "background-canvas",
8544
8812
  class: "narrat-canvas"
8545
- }, null, 8, _hoisted_1$b)
8813
+ }, null, 8, _hoisted_1$c)
8546
8814
  ], 4))
8547
8815
  : vue.createCommentVNode("", true),
8548
8816
  (_ctx.inGame)
8549
8817
  ? (vue.openBlock(), vue.createElementBlock("div", {
8550
- key: 4,
8818
+ key: 5,
8551
8819
  class: "dialog override",
8552
8820
  ref: "dialog",
8553
8821
  style: vue.normalizeStyle(_ctx.dialogStyle)
@@ -8569,16 +8837,16 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
8569
8837
  ]),
8570
8838
  _: 1
8571
8839
  }, 8, ["style"]),
8572
- _hoisted_2$9
8840
+ _hoisted_2$a
8573
8841
  ], 4))
8574
8842
  : vue.createCommentVNode("", true)
8575
8843
  ], 4))
8576
8844
  : (_ctx.gameLoaded)
8577
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$6, [
8578
- vue.createElementVNode("div", _hoisted_4$5, [
8579
- vue.createElementVNode("h1", _hoisted_5$5, vue.toDisplayString(_ctx.gameTitle), 1)
8845
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$7, [
8846
+ vue.createElementVNode("div", _hoisted_4$6, [
8847
+ vue.createElementVNode("h1", _hoisted_5$6, vue.toDisplayString(_ctx.gameTitle), 1)
8580
8848
  ]),
8581
- vue.createElementVNode("div", _hoisted_6$5, [
8849
+ vue.createElementVNode("div", _hoisted_6$6, [
8582
8850
  vue.createElementVNode("button", {
8583
8851
  class: "button menu-button start-button override",
8584
8852
  onClick: _cache[0] || (_cache[0] = (...args) => (_ctx.startGame && _ctx.startGame(...args)))
@@ -8592,7 +8860,7 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
8592
8860
  : vue.createCommentVNode("", true)
8593
8861
  ])
8594
8862
  ]))
8595
- : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$4, [
8863
+ : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$5, [
8596
8864
  vue.createVNode(_component_LoadingBar, {
8597
8865
  percentage: _ctx.loadingPercentage,
8598
8866
  step: _ctx.loadingStep
@@ -8605,10 +8873,10 @@ function render$c(_ctx, _cache, $props, $setup, $data, $options) {
8605
8873
  ], 4))
8606
8874
  }
8607
8875
 
8608
- var css_248z$d = "#app {\n background-color: var(--bg-color);\n width: 100%;\n height: 100%;\n position: absolute;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n color: var(--text-color);\n box-sizing: border-box;\n overflow: hidden;\n transform-origin: center center;\n}\n\n.game {\n background-color: var(--bg-color);\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n.interact-button {\n height: 50px;\n border: 1px solid black;\n font-weight: bold;\n font-size: 20px;\n text-align: center;\n flex-grow: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.interact-button:not(:last-child) {\n margin-right: 10px;\n}\n\n.dialog-container {\n flex-shrink: 2;\n /* padding: 20px; */\n min-height: 100%;\n width: 100%;\n background-color: (var(--bg-color));\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: center;\n overflow-x: hidden;\n}\n\n.dialog {\n overflow-y: auto;\n overflow-x: hidden;\n position: relative;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n}\n\n.dialog::-webkit-scrollbar {\n display: none; /* webkit */\n}\n\n.dialog * {\n overflow-anchor: none;\n}\n\n.background {\n margin: 0;\n}\n\n#background-canvas {\n height: 100%;\n}\n\n.anchor {\n overflow-anchor: auto;\n height: 1px;\n}\n\n.menu-toggle {\n position: fixed;\n bottom: 0px;\n right: 15%;\n z-index: 2;\n}\n\n#game-title-container {\n margin-bottom: 50px;\n}\n\n#game-title-text {\n text-align: center;\n font-size: 50px;\n}\n\n.menu-button {\n font-size: 25px;\n}\n";
8609
- styleInject(css_248z$d);
8876
+ var css_248z$e = "#app {\n background-color: var(--bg-color);\n width: 100%;\n height: 100%;\n position: absolute;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n color: var(--text-color);\n box-sizing: border-box;\n overflow: hidden;\n transform-origin: center center;\n}\n\n.game {\n background-color: var(--bg-color);\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n.interact-button {\n height: 50px;\n border: 1px solid black;\n font-weight: bold;\n font-size: 20px;\n text-align: center;\n flex-grow: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.interact-button:not(:last-child) {\n margin-right: 10px;\n}\n\n.dialog-container {\n flex-shrink: 2;\n /* padding: 20px; */\n min-height: 100%;\n width: 100%;\n background-color: (var(--bg-color));\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: center;\n overflow-x: hidden;\n}\n\n.dialog {\n overflow-y: auto;\n overflow-x: hidden;\n position: relative;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n}\n\n.dialog::-webkit-scrollbar {\n display: none; /* webkit */\n}\n\n.dialog * {\n overflow-anchor: none;\n}\n\n.background {\n margin: 0;\n}\n\n#background-canvas {\n height: 100%;\n}\n\n.anchor {\n overflow-anchor: auto;\n height: 1px;\n}\n\n.menu-toggle {\n position: fixed;\n bottom: 0px;\n right: 15%;\n z-index: 2;\n}\n\n#game-title-container {\n margin-bottom: 50px;\n}\n\n#game-title-text {\n text-align: center;\n font-size: 50px;\n}\n\n.menu-button {\n font-size: 25px;\n}\r\n";
8877
+ styleInject(css_248z$e);
8610
8878
 
8611
- script$c.render = render$c;
8879
+ script$d.render = render$d;
8612
8880
 
8613
8881
  let canvas;
8614
8882
  let ctx;
@@ -9132,6 +9400,41 @@ const removeItemPlugin = new CommandPlugin('remove_item', async (cmd) => {
9132
9400
  return useVM().nextLine();
9133
9401
  }, generateParser('remove_item'));
9134
9402
 
9403
+ // Write a CommandPlugin for starting a quest with the useQuests quests store
9404
+ const startQuestPlugin = new CommandPlugin('start_quest', async (cmd) => {
9405
+ const questId = cmd.args[0];
9406
+ const quests = useQuests();
9407
+ quests.startQuest(questId);
9408
+ return useVM().nextLine();
9409
+ }, generateParser('start_quest'));
9410
+ // Write a CommandPlugin for starting a quest objective with the cmd having arguments questId and objectiveId, using the useQuests store's startObjective method
9411
+ const startObjectivePlugin = new CommandPlugin('start_objective', async (cmd) => {
9412
+ const questId = cmd.args[0];
9413
+ const objectiveId = cmd.args[1];
9414
+ const quests = useQuests();
9415
+ quests.startObjective(questId, objectiveId);
9416
+ return useVM().nextLine();
9417
+ }, generateParser('start_objective'));
9418
+ // Write a CommandPlugin for completing a quest objective with the cmd having arguments questId and objectiveId, using the useQuests store's completeObjective method
9419
+ const completeObjectivePlugin = new CommandPlugin('complete_objective', async (cmd) => {
9420
+ const questId = cmd.args[0];
9421
+ const objectiveId = cmd.args[1];
9422
+ const quests = useQuests();
9423
+ quests.completeObjective(questId, objectiveId);
9424
+ return useVM().nextLine();
9425
+ }, generateParser('complete_objective'));
9426
+ // Write a CommandPlugin for completing a quest with the cmd having arguments questId, using the useQuests store's completeQuest method
9427
+ const completeQuestPlugin = new CommandPlugin('complete_quest', async (cmd) => {
9428
+ const questId = cmd.args[0];
9429
+ let ending;
9430
+ if (cmd.args.length > 1) {
9431
+ ending = cmd.args[1];
9432
+ }
9433
+ const quests = useQuests();
9434
+ quests.completeQuest(questId, ending);
9435
+ return useVM().nextLine();
9436
+ }, generateParser('complete_quest'));
9437
+
9135
9438
  function registerBaseCommands(vm) {
9136
9439
  vm.addCommand(addItemPlugin);
9137
9440
  vm.addCommand(addLevelPlugin);
@@ -9154,6 +9457,11 @@ function registerBaseCommands(vm) {
9154
9457
  vm.addCommand(talkCommand);
9155
9458
  vm.addCommand(textCommandPlugin);
9156
9459
  vm.addCommand(waitCommand);
9460
+ // Quests
9461
+ vm.addCommand(startQuestPlugin);
9462
+ vm.addCommand(startObjectivePlugin);
9463
+ vm.addCommand(completeObjectivePlugin);
9464
+ vm.addCommand(completeQuestPlugin);
9157
9465
  }
9158
9466
 
9159
9467
  class NarratPlugin {
@@ -9179,7 +9487,7 @@ vm.callHook('onPageLoaded');
9179
9487
  async function startApp(config, options) {
9180
9488
  const configFile = await getFile('data/config.json');
9181
9489
  setConfig(JSON.parse(configFile));
9182
- app = vue.createApp(script$c, {
9490
+ app = vue.createApp(script$d, {
9183
9491
  config,
9184
9492
  options,
9185
9493
  });
@@ -9196,7 +9504,7 @@ async function startApp(config, options) {
9196
9504
  });
9197
9505
  registerBaseCommands(vm);
9198
9506
  logManager.setupDebugger(options.debug);
9199
- console.log('%c Narrat game engine – 0.18.0 - June 25, 2022 02:07:06', 'background: #222; color: #bada55');
9507
+ console.log('%c Narrat game engine – 1.2.0 - June 25, 2022 14:14:05', 'background: #222; color: #bada55');
9200
9508
  vm.callHook('onNarratSetup');
9201
9509
  app.mount('#game-holder');
9202
9510
  if (options.debug) {
@@ -9227,6 +9535,8 @@ exports.aspectRatioFit = aspectRatioFit;
9227
9535
  exports.generateParser = generateParser;
9228
9536
  exports.getConfig = getConfig;
9229
9537
  exports.getItemConfig = getItemConfig;
9538
+ exports.getObjectiveConfig = getObjectiveConfig;
9539
+ exports.getQuestConfig = getQuestConfig;
9230
9540
  exports.getSkillConfig = getSkillConfig;
9231
9541
  exports.registerPlugin = registerPlugin;
9232
9542
  exports.setConfig = setConfig;